@@ -4,11 +4,38 @@ import { Nullable, PublicKey } from '@metaplex-foundation/umi';
4
4
// RPC input. //
5
5
// ---------------------------------------- //
6
6
7
+ /**
8
+ * Display options for asset queries
9
+ */
10
+ export type DisplayOptions = {
11
+ /**
12
+ * Whether to show unverified collections
13
+ */
14
+ showUnverifiedCollections ?: boolean ;
15
+ /**
16
+ * Whether to show collection metadata
17
+ */
18
+ showCollectionMetadata ?: boolean ;
19
+ /**
20
+ * Whether to show fungible assets
21
+ */
22
+ showFungible ?: boolean ;
23
+ /**
24
+ * Whether to show inscription data
25
+ */
26
+ showInscription ?: boolean ;
27
+ } ;
28
+
7
29
export type GetAssetsByAuthorityRpcInput = {
8
30
/**
9
31
* The address of the authority of the assets.
10
32
*/
11
33
authority : PublicKey ;
34
+
35
+ /**
36
+ * Display options for the query
37
+ */
38
+ displayOptions ?: DisplayOptions ;
12
39
} & Pagination ;
13
40
14
41
export type GetAssetsByCreatorRpcInput = {
@@ -21,6 +48,11 @@ export type GetAssetsByCreatorRpcInput = {
21
48
* Indicates whether to retrieve only verified assets or not.
22
49
*/
23
50
onlyVerified : boolean ;
51
+
52
+ /**
53
+ * Display options for the query
54
+ */
55
+ displayOptions ?: DisplayOptions ;
24
56
} & Pagination ;
25
57
26
58
export type GetAssetsByGroupRpcInput = {
@@ -33,65 +65,75 @@ export type GetAssetsByGroupRpcInput = {
33
65
* The value of the group
34
66
*/
35
67
groupValue : string ;
68
+
69
+ /**
70
+ * Display options for the query
71
+ */
72
+ displayOptions ?: DisplayOptions ;
36
73
} & Pagination ;
37
74
38
75
export type GetAssetsByOwnerRpcInput = {
39
76
/**
40
77
* The address of the owner of the assets.
41
78
*/
42
79
owner : PublicKey ;
80
+
81
+ /**
82
+ * Display options for the query
83
+ */
84
+ displayOptions ?: DisplayOptions ;
43
85
} & Pagination ;
44
86
45
87
export type SearchAssetsRpcInput = {
46
88
/**
47
- * Indicates whether the search criteria should be inverted or not .
89
+ * The address of the authority .
48
90
*/
49
- negate ?: Nullable < boolean > ;
91
+ authority ?: Nullable < PublicKey > ;
50
92
51
93
/**
52
- * Indicates whether to retrieve all or any asset that matches the search criteria .
94
+ * The address of the creator .
53
95
*/
54
- conditionType ?: Nullable < 'all' | 'any' > ;
96
+ creator ?: Nullable < PublicKey > ;
55
97
56
98
/**
57
- * The interface value of the asset .
99
+ * Indicates whether the creator must be verified or not .
58
100
*/
59
- interface ?: Nullable < DasApiAssetInterface > ;
101
+ creatorVerified ?: Nullable < boolean > ;
60
102
61
103
/**
62
- * The value for the JSON URI .
104
+ * The grouping (`key`, `value`) pair .
63
105
*/
64
- jsonUri ?: Nullable < string > ;
106
+ grouping ?: Nullable < [ string , string ] > ;
65
107
66
108
/**
67
- * The address of the owner .
109
+ * The interface value of the asset .
68
110
*/
69
- owner ?: Nullable < PublicKey > ;
111
+ interface ?: Nullable < DasApiAssetInterface > ;
70
112
71
113
/**
72
- * Type of ownership .
114
+ * Indicates whether the search criteria should be inverted or not .
73
115
*/
74
- ownerType ?: Nullable < 'single' | 'token' > ;
116
+ negate ?: Nullable < boolean > ;
75
117
76
118
/**
77
- * The address of the creator .
119
+ * The name of the asset .
78
120
*/
79
- creator ?: Nullable < PublicKey > ;
121
+ name ?: Nullable < string > ;
80
122
81
123
/**
82
- * Indicates whether the creator must be verified or not .
124
+ * Indicates whether to retrieve all or any asset that matches the search criteria .
83
125
*/
84
- creatorVerified ?: Nullable < boolean > ;
126
+ conditionType ?: Nullable < 'all' | 'any' > ;
85
127
86
128
/**
87
- * The address of the authority .
129
+ * The address of the owner .
88
130
*/
89
- authority ?: Nullable < PublicKey > ;
131
+ owner ?: Nullable < PublicKey > ;
90
132
91
133
/**
92
- * The grouping (`key`, `value`) pair .
134
+ * Type of ownership .
93
135
*/
94
- grouping ?: Nullable < [ string , string ] > ;
136
+ ownerType ?: Nullable < 'single' | 'token' > ;
95
137
96
138
/**
97
139
* The address of the delegate.
@@ -113,6 +155,11 @@ export type SearchAssetsRpcInput = {
113
155
*/
114
156
supplyMint ?: Nullable < PublicKey > ;
115
157
158
+ /**
159
+ * The type of token to search for.
160
+ */
161
+ tokenType ?: Nullable < TokenType > ;
162
+
116
163
/**
117
164
* Indicates whether the asset is compressed or not.
118
165
*/
@@ -142,8 +189,48 @@ export type SearchAssetsRpcInput = {
142
189
* Indicates whether the asset is burnt or not.
143
190
*/
144
191
burnt ?: Nullable < boolean > ;
192
+
193
+ /**
194
+ * The value for the JSON URI.
195
+ */
196
+ jsonUri ?: Nullable < string > ;
197
+
198
+ /**
199
+ * Display options for the query
200
+ */
201
+ displayOptions ?: DisplayOptions ;
145
202
} & Pagination ;
146
203
204
+ /**
205
+ * Input parameters for getAsset RPC call
206
+ */
207
+ export type GetAssetRpcInput = {
208
+ /**
209
+ * The asset ID to fetch
210
+ */
211
+ assetId : PublicKey ;
212
+
213
+ /**
214
+ * Display options for the query
215
+ */
216
+ displayOptions ?: DisplayOptions ;
217
+ } ;
218
+
219
+ /**
220
+ * Input parameters for getAssets RPC call
221
+ */
222
+ export type GetAssetsRpcInput = {
223
+ /**
224
+ * Array of asset IDs to fetch
225
+ */
226
+ assetIds : PublicKey [ ] ;
227
+
228
+ /**
229
+ * Display options for the query
230
+ */
231
+ displayOptions ?: DisplayOptions ;
232
+ } ;
233
+
147
234
// ---------------------------------------- //
148
235
// Result types. //
149
236
// ---------------------------------------- //
@@ -321,6 +408,11 @@ type Pagination = {
321
408
* Retrieve assets after the specified `ID` value.
322
409
*/
323
410
after ?: Nullable < string > ;
411
+
412
+ /**
413
+ *
414
+ */
415
+ cursor ?: Nullable < string > ;
324
416
} ;
325
417
326
418
/**
@@ -337,6 +429,7 @@ export type DasApiAssetInterface =
337
429
| 'LEGACY_NFT'
338
430
| 'V2_NFT'
339
431
| 'FungibleAsset'
432
+ | 'FungibleToken'
340
433
| 'Custom'
341
434
| 'Identity'
342
435
| 'Executable'
@@ -407,6 +500,13 @@ export type DasApiPropGroupKey = 'collection';
407
500
export type DasApiAssetGrouping = {
408
501
group_key : DasApiPropGroupKey ;
409
502
group_value : string ;
503
+ verified ?: boolean ;
504
+ collection_metadata ?: {
505
+ name : string ;
506
+ symbol : string ;
507
+ description : string ;
508
+ image : string ;
509
+ } ;
410
510
} ;
411
511
412
512
export type DasApiAuthorityScope =
@@ -531,3 +631,10 @@ export type GetAssetSignaturesRpcResponse = {
531
631
*/
532
632
items : DasApiTransactionSignature [ ] ;
533
633
} ;
634
+
635
+ export type TokenType =
636
+ | 'Fungible'
637
+ | 'NonFungible'
638
+ | 'regularNFT'
639
+ | 'compressedNFT'
640
+ | 'All' ;
0 commit comments