@@ -99,7 +99,9 @@ export interface DasApiInterface {
99
99
function cleanInput < T extends Record < string , unknown > > ( obj : T ) : Partial < T > {
100
100
return Object . fromEntries (
101
101
Object . entries ( obj ) . filter (
102
- ( [ _ , value ] ) => value !== null && ( typeof value !== 'object' || ( value && Object . keys ( value ) . length > 0 ) )
102
+ ( [ _ , value ] ) =>
103
+ value !== null &&
104
+ ( typeof value !== 'object' || ( value && Object . keys ( value ) . length > 0 ) )
103
105
)
104
106
) as Partial < T > ;
105
107
}
@@ -184,10 +186,10 @@ export const createDasApiDecorator = (
184
186
displayOptions : input . displayOptions ?? { } ,
185
187
cursor : input . cursor ?? null ,
186
188
} ) ;
187
- const assetList = await rpc . call < DasApiAssetList | null , typeof cleanedInput > (
188
- 'getAssetsByAuthority' ,
189
- cleanedInput
190
- ) ;
189
+ const assetList = await rpc . call <
190
+ DasApiAssetList | null ,
191
+ typeof cleanedInput
192
+ > ( 'getAssetsByAuthority' , cleanedInput ) ;
191
193
if ( ! assetList ) {
192
194
throw new DasApiError (
193
195
`No assets found for authority: ${ input . authority } `
@@ -208,10 +210,10 @@ export const createDasApiDecorator = (
208
210
displayOptions : input . displayOptions ?? { } ,
209
211
cursor : input . cursor ?? null ,
210
212
} ) ;
211
- const assetList = await rpc . call < DasApiAssetList | null , typeof cleanedInput > (
212
- 'getAssetsByCreator' ,
213
- cleanedInput
214
- ) ;
213
+ const assetList = await rpc . call <
214
+ DasApiAssetList | null ,
215
+ typeof cleanedInput
216
+ > ( 'getAssetsByCreator' , cleanedInput ) ;
215
217
if ( ! assetList ) {
216
218
throw new DasApiError ( `No assets found for creator: ${ input . creator } ` ) ;
217
219
}
@@ -230,10 +232,10 @@ export const createDasApiDecorator = (
230
232
displayOptions : input . displayOptions ?? { } ,
231
233
cursor : input . cursor ?? null ,
232
234
} ) ;
233
- const assetList = await rpc . call < DasApiAssetList | null , typeof cleanedInput > (
234
- 'getAssetsByGroup' ,
235
- cleanedInput
236
- ) ;
235
+ const assetList = await rpc . call <
236
+ DasApiAssetList | null ,
237
+ typeof cleanedInput
238
+ > ( 'getAssetsByGroup' , cleanedInput ) ;
237
239
if ( ! assetList ) {
238
240
throw new DasApiError (
239
241
`No assets found for group: ${ input . groupKey } => ${ input . groupValue } `
@@ -253,10 +255,10 @@ export const createDasApiDecorator = (
253
255
displayOptions : input . displayOptions ?? { } ,
254
256
cursor : input . cursor ?? null ,
255
257
} ) ;
256
- const assetList = await rpc . call < DasApiAssetList | null , typeof cleanedInput > (
257
- 'getAssetsByOwner' ,
258
- cleanedInput
259
- ) ;
258
+ const assetList = await rpc . call <
259
+ DasApiAssetList | null ,
260
+ typeof cleanedInput
261
+ > ( 'getAssetsByOwner' , cleanedInput ) ;
260
262
if ( ! assetList ) {
261
263
throw new DasApiError ( `No assets found for owner: ${ input . owner } ` ) ;
262
264
}
@@ -295,10 +297,10 @@ export const createDasApiDecorator = (
295
297
displayOptions : input . displayOptions ?? { } ,
296
298
tokenType : input . tokenType ?? null ,
297
299
} ) ;
298
- const assetList = await rpc . call < DasApiAssetList | null , typeof cleanedInput > (
299
- 'searchAssets' ,
300
- cleanedInput
301
- ) ;
300
+ const assetList = await rpc . call <
301
+ DasApiAssetList | null ,
302
+ typeof cleanedInput
303
+ > ( 'searchAssets' , cleanedInput ) ;
302
304
if ( ! assetList ) {
303
305
throw new DasApiError ( 'No assets found for the given search criteria' ) ;
304
306
}
@@ -317,10 +319,10 @@ export const createDasApiDecorator = (
317
319
cursor : input . cursor ?? null ,
318
320
sortDirection : input . sort_direction ?? null ,
319
321
} ) ;
320
- const signatures = await rpc . call < GetAssetSignaturesRpcResponse | null , typeof cleanedInput > (
321
- 'getAssetSignaturesV2' ,
322
- cleanedInput
323
- ) ;
322
+ const signatures = await rpc . call <
323
+ GetAssetSignaturesRpcResponse | null ,
324
+ typeof cleanedInput
325
+ > ( 'getAssetSignaturesV2' , cleanedInput ) ;
324
326
if ( ! signatures ) {
325
327
const identifier =
326
328
'assetId' in input
0 commit comments