@clonegod/ttd-sol-common 1.0.12 → 1.0.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,408 @@
1
+ import { AssetSortBy, AssetSortDirection, Interface, Scope, Context, OwnershipModel, RoyaltyModel, UseMethods } from './enums';
2
+ import { FullRwaAccount } from './types';
3
+ export declare namespace DAS {
4
+ interface AssetsByOwnerRequest {
5
+ ownerAddress: string;
6
+ page: number;
7
+ limit?: number;
8
+ before?: string;
9
+ after?: string;
10
+ displayOptions?: DisplayOptions;
11
+ sortBy?: AssetSortingRequest;
12
+ }
13
+ type AssetsByCreatorRequest = {
14
+ creatorAddress: string;
15
+ page: number;
16
+ onlyVerified?: boolean;
17
+ limit?: number;
18
+ before?: string;
19
+ after?: string;
20
+ displayOptions?: DisplayOptions;
21
+ sortBy?: AssetSortingRequest;
22
+ };
23
+ type GetAssetBatchRequest = {
24
+ ids: Array<string>;
25
+ displayOptions?: GetAssetDisplayOptions;
26
+ };
27
+ type AssetsByGroupRequest = {
28
+ groupValue: string;
29
+ groupKey: string;
30
+ page: number;
31
+ limit?: number;
32
+ before?: string;
33
+ after?: string;
34
+ displayOptions?: DisplayOptions;
35
+ sortBy?: AssetSortingRequest;
36
+ };
37
+ type GetAssetsBatchRequest = {
38
+ ids: string[];
39
+ };
40
+ interface SearchAssetsRequest {
41
+ page: number;
42
+ limit?: number;
43
+ before?: string;
44
+ after?: string;
45
+ creatorAddress?: string;
46
+ ownerAddress?: string;
47
+ jsonUri?: string;
48
+ grouping?: string[];
49
+ burnt?: boolean;
50
+ sortBy?: AssetSortingRequest;
51
+ frozen?: boolean;
52
+ supplyMint?: string;
53
+ supply?: number;
54
+ interface?: string;
55
+ delegate?: string;
56
+ ownerType?: OwnershipModel;
57
+ royaltyAmount?: number;
58
+ royaltyTarget?: string;
59
+ royaltyTargetType?: RoyaltyModel;
60
+ compressible?: boolean;
61
+ compressed?: boolean;
62
+ tokenType?: TokenType;
63
+ }
64
+ type AssetsByAuthorityRequest = {
65
+ authorityAddress: string;
66
+ page: number;
67
+ limit?: number;
68
+ before?: string;
69
+ after?: string;
70
+ displayOptions?: DisplayOptions;
71
+ sortBy?: AssetSortingRequest;
72
+ };
73
+ type GetAssetRequest = {
74
+ id: string;
75
+ displayOptions?: GetAssetDisplayOptions;
76
+ };
77
+ type GetRwaAssetRequest = {
78
+ id: string;
79
+ };
80
+ type GetAssetProofRequest = {
81
+ id: string;
82
+ };
83
+ type GetSignaturesForAssetRequest = {
84
+ id: string;
85
+ page: number;
86
+ limit?: number;
87
+ before?: string;
88
+ after?: string;
89
+ };
90
+ interface AssetSorting {
91
+ sort_by: AssetSortBy;
92
+ sort_direction: AssetSortDirection;
93
+ }
94
+ type AssetSortingRequest = {
95
+ sortBy: AssetSortBy;
96
+ sortDirection: AssetSortDirection;
97
+ };
98
+ type GetAssetResponse = {
99
+ interface: Interface;
100
+ id: string;
101
+ content?: Content;
102
+ authorities?: Authorities[];
103
+ compression?: Compression;
104
+ grouping?: Grouping[];
105
+ royalty?: Royalty;
106
+ ownership: Ownership;
107
+ creators?: Creators[];
108
+ uses?: Uses;
109
+ supply?: Supply;
110
+ mutable: boolean;
111
+ burnt: boolean;
112
+ mint_extensions?: MintExtensions;
113
+ token_info?: TokenInfo;
114
+ };
115
+ type GetRwaAssetResponse = {
116
+ items: FullRwaAccount;
117
+ };
118
+ type GetAssetResponseList = {
119
+ grand_total?: number;
120
+ total: number;
121
+ limit: number;
122
+ page: number;
123
+ items: GetAssetResponse[];
124
+ };
125
+ interface GetAssetProofResponse {
126
+ root: string;
127
+ proof: Array<string>;
128
+ node_index: number;
129
+ leaf: string;
130
+ tree_id: string;
131
+ }
132
+ interface GetSignaturesForAssetResponse {
133
+ total: number;
134
+ limit: number;
135
+ page?: number;
136
+ before?: string;
137
+ after?: string;
138
+ items: Array<Array<string>>;
139
+ }
140
+ type DisplayOptions = {
141
+ showUnverifiedCollections?: boolean;
142
+ showCollectionMetadata?: boolean;
143
+ showGrandTotal?: boolean;
144
+ showRawData?: boolean;
145
+ showFungible?: boolean;
146
+ requireFullIndex?: boolean;
147
+ showSystemMetadata?: boolean;
148
+ showZeroBalance?: boolean;
149
+ showClosedAccounts?: boolean;
150
+ showNativeBalance?: boolean;
151
+ };
152
+ type GetAssetDisplayOptions = {
153
+ showUnverifiedCollections?: boolean;
154
+ showCollectionMetadata?: boolean;
155
+ showRawData?: boolean;
156
+ showFungible?: boolean;
157
+ requireFullIndex?: boolean;
158
+ showSystemMetadata?: boolean;
159
+ showNativeBalance?: boolean;
160
+ showInscription?: boolean;
161
+ };
162
+ interface Ownership {
163
+ frozen: boolean;
164
+ delegated: boolean;
165
+ delegate?: string;
166
+ ownership_model: OwnershipModel;
167
+ owner: string;
168
+ }
169
+ interface Supply {
170
+ print_max_supply: number;
171
+ print_current_supply: number;
172
+ edition_nonce?: number;
173
+ }
174
+ interface Uses {
175
+ use_method: UseMethods;
176
+ remaining: number;
177
+ total: number;
178
+ }
179
+ interface Creators {
180
+ address: string;
181
+ share: number;
182
+ verified: boolean;
183
+ }
184
+ interface Royalty {
185
+ royalty_model: RoyaltyModel;
186
+ target?: string;
187
+ percent: number;
188
+ basis_points: number;
189
+ primary_sale_happened: boolean;
190
+ locked: boolean;
191
+ }
192
+ interface Grouping {
193
+ group_key: string;
194
+ group_value: string;
195
+ verified?: boolean;
196
+ collection_metadata?: CollectionMetadata;
197
+ }
198
+ interface CollectionMetadata {
199
+ name?: string;
200
+ symbol?: string;
201
+ image?: string;
202
+ description?: string;
203
+ external_url?: string;
204
+ }
205
+ interface Authorities {
206
+ address: string;
207
+ scopes: Array<Scope>;
208
+ }
209
+ type Links = {
210
+ external_url?: string;
211
+ image?: string;
212
+ animation_url?: string;
213
+ [Symbol.iterator](): Iterator<Links>;
214
+ };
215
+ interface Content {
216
+ $schema: string;
217
+ json_uri: string;
218
+ files?: Files;
219
+ metadata: Metadata;
220
+ links?: Links;
221
+ }
222
+ interface File {
223
+ uri?: string;
224
+ mime?: string;
225
+ cdn_uri?: string;
226
+ quality?: FileQuality;
227
+ contexts?: Context[];
228
+ [Symbol.iterator](): Iterator<File>;
229
+ }
230
+ type Files = File[];
231
+ interface FileQuality {
232
+ schema: string;
233
+ }
234
+ interface Metadata {
235
+ attributes?: Attribute[];
236
+ description: string;
237
+ name: string;
238
+ symbol: string;
239
+ token_standard?: TokenType;
240
+ }
241
+ interface Attribute {
242
+ value: string;
243
+ trait_type: string;
244
+ }
245
+ interface Compression {
246
+ eligible: boolean;
247
+ compressed: boolean;
248
+ data_hash: string;
249
+ creator_hash: string;
250
+ asset_hash: string;
251
+ tree: string;
252
+ seq: number;
253
+ leaf_id: number;
254
+ }
255
+ interface Editions {
256
+ mint?: string;
257
+ edition_address?: string;
258
+ edition?: number;
259
+ }
260
+ interface GetNftEditionsRequest {
261
+ mint?: string;
262
+ page?: number;
263
+ limit?: number;
264
+ }
265
+ interface GetNftEditionsResponse {
266
+ total?: number;
267
+ limit?: number;
268
+ page?: number;
269
+ master_edition_address?: string;
270
+ supply?: number;
271
+ max_supply?: number;
272
+ editions?: Editions[];
273
+ }
274
+ interface TokenAccounts {
275
+ address?: string;
276
+ mint?: string;
277
+ owner?: string;
278
+ amount?: number;
279
+ delegated_amount?: number;
280
+ frozen?: boolean;
281
+ token_extensions: any;
282
+ }
283
+ interface GetTokenAccountsRequest {
284
+ mint?: string;
285
+ owner?: string;
286
+ page?: number;
287
+ limit?: number;
288
+ cursor?: string;
289
+ before?: string;
290
+ after?: string;
291
+ options?: {
292
+ showZeroBalance?: boolean;
293
+ };
294
+ }
295
+ interface GetTokenAccountsResponse {
296
+ total?: number;
297
+ limit?: number;
298
+ page?: number;
299
+ cursor?: string;
300
+ token_accounts?: TokenAccounts[];
301
+ }
302
+ type TokenType = 'fungible' | 'nonFungible' | 'compressedNft' | 'regularNft' | 'all' | (string & {});
303
+ interface MintExtensions {
304
+ confidential_transfer_mint?: ConfidentialTransferMint;
305
+ confidential_transfer_fee_config?: ConfidentialTransferFeeConfig;
306
+ transfer_fee_config?: TransferFeeConfig;
307
+ metadata_pointer?: MetadataPointer;
308
+ mint_close_authority?: MintCloseAuthority;
309
+ permanent_delegate?: PermanentDelegate;
310
+ transfer_hook?: TransferHook;
311
+ interest_bearing_config?: InterestBearingConfig;
312
+ default_account_state?: DefaultAccountState;
313
+ confidential_transfer_account?: ConfidentialTransferAccount;
314
+ metadata?: MintExtensionMetadata;
315
+ }
316
+ interface ConfidentialTransferMint {
317
+ authority: string;
318
+ auto_approve_new_accounts: boolean;
319
+ auditor_elgamal_pubkey: string;
320
+ }
321
+ interface ConfidentialTransferFeeConfig {
322
+ authority: string;
323
+ withdraw_withheld_authority_elgamal_pubkey: string;
324
+ harvest_to_mint_enabled: boolean;
325
+ withheld_amount: string;
326
+ }
327
+ interface TransferFeeConfig {
328
+ transfer_fee_config_authority: string;
329
+ withdraw_withheld_authority: string;
330
+ withheld_amount: number;
331
+ older_transfer_fee: OlderTransferFee;
332
+ newer_transfer_fee: NewTransferFee;
333
+ }
334
+ interface OlderTransferFee {
335
+ epoch: string;
336
+ maximum_fee: string;
337
+ transfer_fee_basis_points: string;
338
+ }
339
+ interface NewTransferFee {
340
+ epoch: string;
341
+ }
342
+ interface MetadataPointer {
343
+ authority: string;
344
+ metadata_address: string;
345
+ }
346
+ interface MintCloseAuthority {
347
+ close_authority: string;
348
+ }
349
+ interface PermanentDelegate {
350
+ delegate: string;
351
+ }
352
+ interface TransferHook {
353
+ authority: string;
354
+ programId: string;
355
+ }
356
+ interface InterestBearingConfig {
357
+ rate_authority: string;
358
+ initialization_timestamp: number;
359
+ pre_update_average_rate: number;
360
+ last_update_timestamp: number;
361
+ current_rate: number;
362
+ }
363
+ interface DefaultAccountState {
364
+ state: string;
365
+ }
366
+ interface ConfidentialTransferAccount {
367
+ approved: boolean;
368
+ elgamal_pubkey: string;
369
+ pending_balance_lo: string;
370
+ pending_balance_hi: string;
371
+ available_balance: string;
372
+ decryptable_available_balance: string;
373
+ allow_confidential_credits: boolean;
374
+ allow_non_confidential_credits: boolean;
375
+ pending_balance_credit_counter: number;
376
+ maximum_pending_balance_credit_counter: number;
377
+ expected_pending_balance_credit_counter: number;
378
+ actual_pending_balance_credit_counter: number;
379
+ }
380
+ interface MintExtensionMetadata {
381
+ updateAuthority: string;
382
+ mint: string;
383
+ name: string;
384
+ symbol: string;
385
+ uri: string;
386
+ additionalMetadata: AdditionalMetadata;
387
+ }
388
+ interface AdditionalMetadata {
389
+ key: string;
390
+ value: string;
391
+ }
392
+ interface TokenInfo {
393
+ symbol?: string;
394
+ balance?: number;
395
+ supply?: number;
396
+ decimals?: number;
397
+ token_program?: string;
398
+ associated_token_address?: string;
399
+ price_info?: PriceInfo;
400
+ mint_authority?: string;
401
+ freeze_authority?: string;
402
+ }
403
+ interface PriceInfo {
404
+ price_per_token: number;
405
+ currency: string;
406
+ total_price?: number;
407
+ }
408
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });