@@ -24,7 +24,6 @@ use iota_sdk::types::base_types::SequenceNumber;
24
24
use iota_sdk:: types:: id:: UID ;
25
25
use iota_sdk:: types:: object:: Owner ;
26
26
use iota_sdk:: types:: TypeTag ;
27
- use iota_sdk:: IotaClient ;
28
27
use move_core_types:: ident_str;
29
28
use move_core_types:: language_storage:: StructTag ;
30
29
use secret_storage:: Signer ;
69
68
T : DeserializeOwned ,
70
69
{
71
70
/// Resolves an [`AuthenticatedAsset`] by its ID `id`.
72
- pub async fn get_by_id ( id : ObjectID , client : & IotaClient ) -> Result < Self , Error > {
71
+ pub async fn get_by_id < S > ( id : ObjectID , client : & IdentityClient < S > ) -> Result < Self , Error > {
73
72
let res = client
74
73
. read_api ( )
75
74
. get_object_with_options ( id, IotaObjectDataOptions :: new ( ) . with_content ( ) )
89
88
}
90
89
91
90
impl < T > AuthenticatedAsset < T > {
92
- async fn object_ref ( & self , client : & IotaClient ) -> Result < ObjectRef , Error > {
91
+ async fn object_ref < S > ( & self , client : & IdentityClient < S > ) -> Result < ObjectRef , Error > {
93
92
client
94
93
. read_api ( )
95
94
. get_object_with_options ( self . id ( ) , IotaObjectDataOptions :: default ( ) )
@@ -259,7 +258,7 @@ impl MoveType for TransferProposal {
259
258
260
259
impl TransferProposal {
261
260
/// Resolves a [`TransferProposal`] by its ID `id`.
262
- pub async fn get_by_id ( id : ObjectID , client : & IotaClient ) -> Result < Self , Error > {
261
+ pub async fn get_by_id < S > ( id : ObjectID , client : & IdentityClient < S > ) -> Result < Self , Error > {
263
262
let res = client
264
263
. read_api ( )
265
264
. get_object_with_options ( id, IotaObjectDataOptions :: new ( ) . with_content ( ) )
@@ -294,7 +293,7 @@ impl TransferProposal {
294
293
} )
295
294
}
296
295
297
- async fn asset_metadata ( & self , client : & IotaClient ) -> anyhow:: Result < ( ObjectRef , TypeTag ) > {
296
+ async fn asset_metadata < S > ( & self , client : & IdentityClient < S > ) -> anyhow:: Result < ( ObjectRef , TypeTag ) > {
298
297
let res = client
299
298
. read_api ( )
300
299
. get_object_with_options ( self . asset_id , IotaObjectDataOptions :: default ( ) . with_type ( ) )
@@ -318,7 +317,7 @@ impl TransferProposal {
318
317
Ok ( ( asset_ref, param_type) )
319
318
}
320
319
321
- async fn initial_shared_version ( & self , client : & IotaClient ) -> anyhow:: Result < SequenceNumber > {
320
+ async fn initial_shared_version < S > ( & self , client : & IdentityClient < S > ) -> anyhow:: Result < SequenceNumber > {
322
321
let owner = client
323
322
. read_api ( )
324
323
. get_object_with_options ( * self . id . object_id ( ) , IotaObjectDataOptions :: default ( ) . with_owner ( ) )
0 commit comments