wasm-ast-types 0.11.3 → 0.13.0
Sign up to get free protection for your applications and to get access to all the features.
- package/main/client/test/ts-client.issue-71.test.js +103 -0
- package/main/context/context.js +2 -1
- package/main/utils/types.js +20 -7
- package/module/client/test/ts-client.issue-71.test.js +21 -0
- package/module/context/context.js +2 -1
- package/module/utils/types.js +20 -7
- package/package.json +5 -3
- package/src/client/client.ts +665 -0
- package/src/client/index.ts +1 -0
- package/src/client/test/__snapshots__/ts-client.account-nfts.spec.ts.snap +497 -0
- package/src/client/test/__snapshots__/ts-client.arrays-ref.spec.ts.snap +452 -0
- package/src/client/test/__snapshots__/ts-client.arrays.spec.ts.snap +101 -0
- package/src/client/test/__snapshots__/ts-client.cw-named-groups.test.ts.snap +141 -0
- package/src/client/test/__snapshots__/ts-client.cw-proposal-single.test.ts.snap +341 -0
- package/src/client/test/__snapshots__/ts-client.empty-enums.spec.ts.snap +20 -0
- package/src/client/test/__snapshots__/ts-client.issue-71.test.ts.snap +432 -0
- package/src/client/test/__snapshots__/ts-client.issues.test.ts.snap +984 -0
- package/src/client/test/__snapshots__/ts-client.sg721.spec.ts.snap +350 -0
- package/src/client/test/__snapshots__/ts-client.spec.ts.snap +723 -0
- package/src/client/test/__snapshots__/ts-client.vectis.spec.ts.snap +337 -0
- package/src/client/test/ts-client.account-nfts.spec.ts +55 -0
- package/src/client/test/ts-client.arrays-ref.spec.ts +48 -0
- package/src/client/test/ts-client.arrays.spec.ts +58 -0
- package/src/client/test/ts-client.cw-named-groups.test.ts +48 -0
- package/src/client/test/ts-client.cw-proposal-single.test.ts +50 -0
- package/src/client/test/ts-client.empty-enums.spec.ts +28 -0
- package/src/client/test/ts-client.issue-71.test.ts +51 -0
- package/src/client/test/ts-client.issues.test.ts +52 -0
- package/src/client/test/ts-client.sg721.spec.ts +46 -0
- package/src/client/test/ts-client.spec.ts +166 -0
- package/src/client/test/ts-client.vectis.spec.ts +97 -0
- package/src/context/context.ts +134 -0
- package/src/context/imports.ts +126 -0
- package/src/context/index.ts +2 -0
- package/src/index.ts +7 -0
- package/src/message-composer/__snapshots__/message-composer.spec.ts.snap +271 -0
- package/src/message-composer/index.ts +1 -0
- package/src/message-composer/message-composer.spec.ts +25 -0
- package/src/message-composer/message-composer.ts +305 -0
- package/src/react-query/__snapshots__/react-query.spec.ts.snap +913 -0
- package/src/react-query/index.ts +1 -0
- package/src/react-query/react-query.spec.ts +75 -0
- package/src/react-query/react-query.ts +913 -0
- package/src/recoil/__snapshots__/recoil.spec.ts.snap +203 -0
- package/src/recoil/index.ts +1 -0
- package/src/recoil/recoil.spec.ts +38 -0
- package/src/recoil/recoil.ts +307 -0
- package/src/types.ts +44 -0
- package/src/utils/__snapshots__/babel.spec.ts.snap +75 -0
- package/src/utils/babel.spec.ts +511 -0
- package/src/utils/babel.ts +315 -0
- package/src/utils/index.ts +2 -0
- package/src/utils/types.ts +459 -0
- package/types/client/client.d.ts +1 -1
- package/types/context/context.d.ts +1 -0
@@ -0,0 +1,497 @@
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
2
|
+
|
3
|
+
exports[`execute classes array types 1`] = `
|
4
|
+
"export class SG721Client implements SG721Instance {
|
5
|
+
client: SigningCosmWasmClient;
|
6
|
+
sender: string;
|
7
|
+
contractAddress: string;
|
8
|
+
|
9
|
+
constructor(client: SigningCosmWasmClient, sender: string, contractAddress: string) {
|
10
|
+
this.client = client;
|
11
|
+
this.sender = sender;
|
12
|
+
this.contractAddress = contractAddress;
|
13
|
+
this.proposedNewOwner = this.proposedNewOwner.bind(this);
|
14
|
+
this.allowedVaults = this.allowedVaults.bind(this);
|
15
|
+
this.allDebtShares = this.allDebtShares.bind(this);
|
16
|
+
this.allPreviousOwners = this.allPreviousOwners.bind(this);
|
17
|
+
this.ownerOf = this.ownerOf.bind(this);
|
18
|
+
this.approval = this.approval.bind(this);
|
19
|
+
this.approvals = this.approvals.bind(this);
|
20
|
+
this.allOperators = this.allOperators.bind(this);
|
21
|
+
this.numTokens = this.numTokens.bind(this);
|
22
|
+
this.contractInfo = this.contractInfo.bind(this);
|
23
|
+
this.nftInfo = this.nftInfo.bind(this);
|
24
|
+
this.allNftInfo = this.allNftInfo.bind(this);
|
25
|
+
this.tokens = this.tokens.bind(this);
|
26
|
+
this.allTokens = this.allTokens.bind(this);
|
27
|
+
this.minter = this.minter.bind(this);
|
28
|
+
}
|
29
|
+
|
30
|
+
proposedNewOwner = async (fee: number | StdFee | \\"auto\\" = \\"auto\\", memo?: string, funds?: Coin[]): Promise<ExecuteResult> => {
|
31
|
+
return await this.client.execute(this.sender, this.contractAddress, {
|
32
|
+
proposed_new_owner: {}
|
33
|
+
}, fee, memo, funds);
|
34
|
+
};
|
35
|
+
allowedVaults = async ({
|
36
|
+
limit,
|
37
|
+
startAfter
|
38
|
+
}: {
|
39
|
+
limit?: number;
|
40
|
+
startAfter?: VaultBase_for_String;
|
41
|
+
}, fee: number | StdFee | \\"auto\\" = \\"auto\\", memo?: string, funds?: Coin[]): Promise<ExecuteResult> => {
|
42
|
+
return await this.client.execute(this.sender, this.contractAddress, {
|
43
|
+
allowed_vaults: {
|
44
|
+
limit,
|
45
|
+
start_after: startAfter
|
46
|
+
}
|
47
|
+
}, fee, memo, funds);
|
48
|
+
};
|
49
|
+
allDebtShares = async ({
|
50
|
+
limit,
|
51
|
+
startAfter
|
52
|
+
}: {
|
53
|
+
limit?: number;
|
54
|
+
startAfter?: string[][];
|
55
|
+
}, fee: number | StdFee | \\"auto\\" = \\"auto\\", memo?: string, funds?: Coin[]): Promise<ExecuteResult> => {
|
56
|
+
return await this.client.execute(this.sender, this.contractAddress, {
|
57
|
+
all_debt_shares: {
|
58
|
+
limit,
|
59
|
+
start_after: startAfter
|
60
|
+
}
|
61
|
+
}, fee, memo, funds);
|
62
|
+
};
|
63
|
+
allPreviousOwners = async (fee: number | StdFee | \\"auto\\" = \\"auto\\", memo?: string, funds?: Coin[]): Promise<ExecuteResult> => {
|
64
|
+
return await this.client.execute(this.sender, this.contractAddress, {
|
65
|
+
all_previous_owners: {}
|
66
|
+
}, fee, memo, funds);
|
67
|
+
};
|
68
|
+
ownerOf = async ({
|
69
|
+
includeExpired,
|
70
|
+
tokenId
|
71
|
+
}: {
|
72
|
+
includeExpired?: boolean;
|
73
|
+
tokenId: string;
|
74
|
+
}, fee: number | StdFee | \\"auto\\" = \\"auto\\", memo?: string, funds?: Coin[]): Promise<ExecuteResult> => {
|
75
|
+
return await this.client.execute(this.sender, this.contractAddress, {
|
76
|
+
owner_of: {
|
77
|
+
include_expired: includeExpired,
|
78
|
+
token_id: tokenId
|
79
|
+
}
|
80
|
+
}, fee, memo, funds);
|
81
|
+
};
|
82
|
+
approval = async ({
|
83
|
+
includeExpired,
|
84
|
+
spender,
|
85
|
+
tokenId
|
86
|
+
}: {
|
87
|
+
includeExpired?: boolean;
|
88
|
+
spender: string;
|
89
|
+
tokenId: string;
|
90
|
+
}, fee: number | StdFee | \\"auto\\" = \\"auto\\", memo?: string, funds?: Coin[]): Promise<ExecuteResult> => {
|
91
|
+
return await this.client.execute(this.sender, this.contractAddress, {
|
92
|
+
approval: {
|
93
|
+
include_expired: includeExpired,
|
94
|
+
spender,
|
95
|
+
token_id: tokenId
|
96
|
+
}
|
97
|
+
}, fee, memo, funds);
|
98
|
+
};
|
99
|
+
approvals = async ({
|
100
|
+
includeExpired,
|
101
|
+
tokenId
|
102
|
+
}: {
|
103
|
+
includeExpired?: boolean;
|
104
|
+
tokenId: string;
|
105
|
+
}, fee: number | StdFee | \\"auto\\" = \\"auto\\", memo?: string, funds?: Coin[]): Promise<ExecuteResult> => {
|
106
|
+
return await this.client.execute(this.sender, this.contractAddress, {
|
107
|
+
approvals: {
|
108
|
+
include_expired: includeExpired,
|
109
|
+
token_id: tokenId
|
110
|
+
}
|
111
|
+
}, fee, memo, funds);
|
112
|
+
};
|
113
|
+
allOperators = async ({
|
114
|
+
includeExpired,
|
115
|
+
limit,
|
116
|
+
owner,
|
117
|
+
startAfter
|
118
|
+
}: {
|
119
|
+
includeExpired?: boolean;
|
120
|
+
limit?: number;
|
121
|
+
owner: string;
|
122
|
+
startAfter?: string;
|
123
|
+
}, fee: number | StdFee | \\"auto\\" = \\"auto\\", memo?: string, funds?: Coin[]): Promise<ExecuteResult> => {
|
124
|
+
return await this.client.execute(this.sender, this.contractAddress, {
|
125
|
+
all_operators: {
|
126
|
+
include_expired: includeExpired,
|
127
|
+
limit,
|
128
|
+
owner,
|
129
|
+
start_after: startAfter
|
130
|
+
}
|
131
|
+
}, fee, memo, funds);
|
132
|
+
};
|
133
|
+
numTokens = async (fee: number | StdFee | \\"auto\\" = \\"auto\\", memo?: string, funds?: Coin[]): Promise<ExecuteResult> => {
|
134
|
+
return await this.client.execute(this.sender, this.contractAddress, {
|
135
|
+
num_tokens: {}
|
136
|
+
}, fee, memo, funds);
|
137
|
+
};
|
138
|
+
contractInfo = async (fee: number | StdFee | \\"auto\\" = \\"auto\\", memo?: string, funds?: Coin[]): Promise<ExecuteResult> => {
|
139
|
+
return await this.client.execute(this.sender, this.contractAddress, {
|
140
|
+
contract_info: {}
|
141
|
+
}, fee, memo, funds);
|
142
|
+
};
|
143
|
+
nftInfo = async ({
|
144
|
+
tokenId
|
145
|
+
}: {
|
146
|
+
tokenId: string;
|
147
|
+
}, fee: number | StdFee | \\"auto\\" = \\"auto\\", memo?: string, funds?: Coin[]): Promise<ExecuteResult> => {
|
148
|
+
return await this.client.execute(this.sender, this.contractAddress, {
|
149
|
+
nft_info: {
|
150
|
+
token_id: tokenId
|
151
|
+
}
|
152
|
+
}, fee, memo, funds);
|
153
|
+
};
|
154
|
+
allNftInfo = async ({
|
155
|
+
includeExpired,
|
156
|
+
tokenId
|
157
|
+
}: {
|
158
|
+
includeExpired?: boolean;
|
159
|
+
tokenId: string;
|
160
|
+
}, fee: number | StdFee | \\"auto\\" = \\"auto\\", memo?: string, funds?: Coin[]): Promise<ExecuteResult> => {
|
161
|
+
return await this.client.execute(this.sender, this.contractAddress, {
|
162
|
+
all_nft_info: {
|
163
|
+
include_expired: includeExpired,
|
164
|
+
token_id: tokenId
|
165
|
+
}
|
166
|
+
}, fee, memo, funds);
|
167
|
+
};
|
168
|
+
tokens = async ({
|
169
|
+
limit,
|
170
|
+
owner,
|
171
|
+
startAfter
|
172
|
+
}: {
|
173
|
+
limit?: number;
|
174
|
+
owner: string;
|
175
|
+
startAfter?: string;
|
176
|
+
}, fee: number | StdFee | \\"auto\\" = \\"auto\\", memo?: string, funds?: Coin[]): Promise<ExecuteResult> => {
|
177
|
+
return await this.client.execute(this.sender, this.contractAddress, {
|
178
|
+
tokens: {
|
179
|
+
limit,
|
180
|
+
owner,
|
181
|
+
start_after: startAfter
|
182
|
+
}
|
183
|
+
}, fee, memo, funds);
|
184
|
+
};
|
185
|
+
allTokens = async ({
|
186
|
+
limit,
|
187
|
+
startAfter
|
188
|
+
}: {
|
189
|
+
limit?: number;
|
190
|
+
startAfter?: string;
|
191
|
+
}, fee: number | StdFee | \\"auto\\" = \\"auto\\", memo?: string, funds?: Coin[]): Promise<ExecuteResult> => {
|
192
|
+
return await this.client.execute(this.sender, this.contractAddress, {
|
193
|
+
all_tokens: {
|
194
|
+
limit,
|
195
|
+
start_after: startAfter
|
196
|
+
}
|
197
|
+
}, fee, memo, funds);
|
198
|
+
};
|
199
|
+
minter = async (fee: number | StdFee | \\"auto\\" = \\"auto\\", memo?: string, funds?: Coin[]): Promise<ExecuteResult> => {
|
200
|
+
return await this.client.execute(this.sender, this.contractAddress, {
|
201
|
+
minter: {}
|
202
|
+
}, fee, memo, funds);
|
203
|
+
};
|
204
|
+
}"
|
205
|
+
`;
|
206
|
+
|
207
|
+
exports[`execute interfaces no extends 1`] = `
|
208
|
+
"export interface SG721Instance {
|
209
|
+
contractAddress: string;
|
210
|
+
sender: string;
|
211
|
+
proposedNewOwner: (fee?: number | StdFee | \\"auto\\", memo?: string, funds?: Coin[]) => Promise<ExecuteResult>;
|
212
|
+
allowedVaults: ({
|
213
|
+
limit,
|
214
|
+
startAfter
|
215
|
+
}: {
|
216
|
+
limit?: number;
|
217
|
+
startAfter?: VaultBase_for_String;
|
218
|
+
}, fee?: number | StdFee | \\"auto\\", memo?: string, funds?: Coin[]) => Promise<ExecuteResult>;
|
219
|
+
allDebtShares: ({
|
220
|
+
limit,
|
221
|
+
startAfter
|
222
|
+
}: {
|
223
|
+
limit?: number;
|
224
|
+
startAfter?: string[][];
|
225
|
+
}, fee?: number | StdFee | \\"auto\\", memo?: string, funds?: Coin[]) => Promise<ExecuteResult>;
|
226
|
+
allPreviousOwners: (fee?: number | StdFee | \\"auto\\", memo?: string, funds?: Coin[]) => Promise<ExecuteResult>;
|
227
|
+
ownerOf: ({
|
228
|
+
includeExpired,
|
229
|
+
tokenId
|
230
|
+
}: {
|
231
|
+
includeExpired?: boolean;
|
232
|
+
tokenId: string;
|
233
|
+
}, fee?: number | StdFee | \\"auto\\", memo?: string, funds?: Coin[]) => Promise<ExecuteResult>;
|
234
|
+
approval: ({
|
235
|
+
includeExpired,
|
236
|
+
spender,
|
237
|
+
tokenId
|
238
|
+
}: {
|
239
|
+
includeExpired?: boolean;
|
240
|
+
spender: string;
|
241
|
+
tokenId: string;
|
242
|
+
}, fee?: number | StdFee | \\"auto\\", memo?: string, funds?: Coin[]) => Promise<ExecuteResult>;
|
243
|
+
approvals: ({
|
244
|
+
includeExpired,
|
245
|
+
tokenId
|
246
|
+
}: {
|
247
|
+
includeExpired?: boolean;
|
248
|
+
tokenId: string;
|
249
|
+
}, fee?: number | StdFee | \\"auto\\", memo?: string, funds?: Coin[]) => Promise<ExecuteResult>;
|
250
|
+
allOperators: ({
|
251
|
+
includeExpired,
|
252
|
+
limit,
|
253
|
+
owner,
|
254
|
+
startAfter
|
255
|
+
}: {
|
256
|
+
includeExpired?: boolean;
|
257
|
+
limit?: number;
|
258
|
+
owner: string;
|
259
|
+
startAfter?: string;
|
260
|
+
}, fee?: number | StdFee | \\"auto\\", memo?: string, funds?: Coin[]) => Promise<ExecuteResult>;
|
261
|
+
numTokens: (fee?: number | StdFee | \\"auto\\", memo?: string, funds?: Coin[]) => Promise<ExecuteResult>;
|
262
|
+
contractInfo: (fee?: number | StdFee | \\"auto\\", memo?: string, funds?: Coin[]) => Promise<ExecuteResult>;
|
263
|
+
nftInfo: ({
|
264
|
+
tokenId
|
265
|
+
}: {
|
266
|
+
tokenId: string;
|
267
|
+
}, fee?: number | StdFee | \\"auto\\", memo?: string, funds?: Coin[]) => Promise<ExecuteResult>;
|
268
|
+
allNftInfo: ({
|
269
|
+
includeExpired,
|
270
|
+
tokenId
|
271
|
+
}: {
|
272
|
+
includeExpired?: boolean;
|
273
|
+
tokenId: string;
|
274
|
+
}, fee?: number | StdFee | \\"auto\\", memo?: string, funds?: Coin[]) => Promise<ExecuteResult>;
|
275
|
+
tokens: ({
|
276
|
+
limit,
|
277
|
+
owner,
|
278
|
+
startAfter
|
279
|
+
}: {
|
280
|
+
limit?: number;
|
281
|
+
owner: string;
|
282
|
+
startAfter?: string;
|
283
|
+
}, fee?: number | StdFee | \\"auto\\", memo?: string, funds?: Coin[]) => Promise<ExecuteResult>;
|
284
|
+
allTokens: ({
|
285
|
+
limit,
|
286
|
+
startAfter
|
287
|
+
}: {
|
288
|
+
limit?: number;
|
289
|
+
startAfter?: string;
|
290
|
+
}, fee?: number | StdFee | \\"auto\\", memo?: string, funds?: Coin[]) => Promise<ExecuteResult>;
|
291
|
+
minter: (fee?: number | StdFee | \\"auto\\", memo?: string, funds?: Coin[]) => Promise<ExecuteResult>;
|
292
|
+
}"
|
293
|
+
`;
|
294
|
+
|
295
|
+
exports[`execute_msg_for__empty 1`] = `"export type QueryMsg = QueryMsg;"`;
|
296
|
+
|
297
|
+
exports[`query classes 1`] = `
|
298
|
+
"export class SG721QueryClient implements SG721ReadOnlyInstance {
|
299
|
+
client: CosmWasmClient;
|
300
|
+
contractAddress: string;
|
301
|
+
|
302
|
+
constructor(client: CosmWasmClient, contractAddress: string) {
|
303
|
+
this.client = client;
|
304
|
+
this.contractAddress = contractAddress;
|
305
|
+
this.proposedNewOwner = this.proposedNewOwner.bind(this);
|
306
|
+
this.allowedVaults = this.allowedVaults.bind(this);
|
307
|
+
this.allDebtShares = this.allDebtShares.bind(this);
|
308
|
+
this.allPreviousOwners = this.allPreviousOwners.bind(this);
|
309
|
+
this.ownerOf = this.ownerOf.bind(this);
|
310
|
+
this.approval = this.approval.bind(this);
|
311
|
+
this.approvals = this.approvals.bind(this);
|
312
|
+
this.allOperators = this.allOperators.bind(this);
|
313
|
+
this.numTokens = this.numTokens.bind(this);
|
314
|
+
this.contractInfo = this.contractInfo.bind(this);
|
315
|
+
this.nftInfo = this.nftInfo.bind(this);
|
316
|
+
this.allNftInfo = this.allNftInfo.bind(this);
|
317
|
+
this.tokens = this.tokens.bind(this);
|
318
|
+
this.allTokens = this.allTokens.bind(this);
|
319
|
+
this.minter = this.minter.bind(this);
|
320
|
+
}
|
321
|
+
|
322
|
+
proposedNewOwner = async (): Promise<ProposedNewOwnerResponse> => {
|
323
|
+
return this.client.queryContractSmart(this.contractAddress, {
|
324
|
+
proposed_new_owner: {}
|
325
|
+
});
|
326
|
+
};
|
327
|
+
allowedVaults = async ({
|
328
|
+
limit,
|
329
|
+
startAfter
|
330
|
+
}: {
|
331
|
+
limit?: number;
|
332
|
+
startAfter?: VaultBase_for_String;
|
333
|
+
}): Promise<AllowedVaultsResponse> => {
|
334
|
+
return this.client.queryContractSmart(this.contractAddress, {
|
335
|
+
allowed_vaults: {
|
336
|
+
limit,
|
337
|
+
start_after: startAfter
|
338
|
+
}
|
339
|
+
});
|
340
|
+
};
|
341
|
+
allDebtShares = async ({
|
342
|
+
limit,
|
343
|
+
startAfter
|
344
|
+
}: {
|
345
|
+
limit?: number;
|
346
|
+
startAfter?: string[][];
|
347
|
+
}): Promise<AllDebtSharesResponse> => {
|
348
|
+
return this.client.queryContractSmart(this.contractAddress, {
|
349
|
+
all_debt_shares: {
|
350
|
+
limit,
|
351
|
+
start_after: startAfter
|
352
|
+
}
|
353
|
+
});
|
354
|
+
};
|
355
|
+
allPreviousOwners = async (): Promise<AllPreviousOwnersResponse> => {
|
356
|
+
return this.client.queryContractSmart(this.contractAddress, {
|
357
|
+
all_previous_owners: {}
|
358
|
+
});
|
359
|
+
};
|
360
|
+
ownerOf = async ({
|
361
|
+
includeExpired,
|
362
|
+
tokenId
|
363
|
+
}: {
|
364
|
+
includeExpired?: boolean;
|
365
|
+
tokenId: string;
|
366
|
+
}): Promise<OwnerOfResponse> => {
|
367
|
+
return this.client.queryContractSmart(this.contractAddress, {
|
368
|
+
owner_of: {
|
369
|
+
include_expired: includeExpired,
|
370
|
+
token_id: tokenId
|
371
|
+
}
|
372
|
+
});
|
373
|
+
};
|
374
|
+
approval = async ({
|
375
|
+
includeExpired,
|
376
|
+
spender,
|
377
|
+
tokenId
|
378
|
+
}: {
|
379
|
+
includeExpired?: boolean;
|
380
|
+
spender: string;
|
381
|
+
tokenId: string;
|
382
|
+
}): Promise<ApprovalResponse> => {
|
383
|
+
return this.client.queryContractSmart(this.contractAddress, {
|
384
|
+
approval: {
|
385
|
+
include_expired: includeExpired,
|
386
|
+
spender,
|
387
|
+
token_id: tokenId
|
388
|
+
}
|
389
|
+
});
|
390
|
+
};
|
391
|
+
approvals = async ({
|
392
|
+
includeExpired,
|
393
|
+
tokenId
|
394
|
+
}: {
|
395
|
+
includeExpired?: boolean;
|
396
|
+
tokenId: string;
|
397
|
+
}): Promise<ApprovalsResponse> => {
|
398
|
+
return this.client.queryContractSmart(this.contractAddress, {
|
399
|
+
approvals: {
|
400
|
+
include_expired: includeExpired,
|
401
|
+
token_id: tokenId
|
402
|
+
}
|
403
|
+
});
|
404
|
+
};
|
405
|
+
allOperators = async ({
|
406
|
+
includeExpired,
|
407
|
+
limit,
|
408
|
+
owner,
|
409
|
+
startAfter
|
410
|
+
}: {
|
411
|
+
includeExpired?: boolean;
|
412
|
+
limit?: number;
|
413
|
+
owner: string;
|
414
|
+
startAfter?: string;
|
415
|
+
}): Promise<AllOperatorsResponse> => {
|
416
|
+
return this.client.queryContractSmart(this.contractAddress, {
|
417
|
+
all_operators: {
|
418
|
+
include_expired: includeExpired,
|
419
|
+
limit,
|
420
|
+
owner,
|
421
|
+
start_after: startAfter
|
422
|
+
}
|
423
|
+
});
|
424
|
+
};
|
425
|
+
numTokens = async (): Promise<NumTokensResponse> => {
|
426
|
+
return this.client.queryContractSmart(this.contractAddress, {
|
427
|
+
num_tokens: {}
|
428
|
+
});
|
429
|
+
};
|
430
|
+
contractInfo = async (): Promise<ContractInfoResponse> => {
|
431
|
+
return this.client.queryContractSmart(this.contractAddress, {
|
432
|
+
contract_info: {}
|
433
|
+
});
|
434
|
+
};
|
435
|
+
nftInfo = async ({
|
436
|
+
tokenId
|
437
|
+
}: {
|
438
|
+
tokenId: string;
|
439
|
+
}): Promise<NftInfoResponse> => {
|
440
|
+
return this.client.queryContractSmart(this.contractAddress, {
|
441
|
+
nft_info: {
|
442
|
+
token_id: tokenId
|
443
|
+
}
|
444
|
+
});
|
445
|
+
};
|
446
|
+
allNftInfo = async ({
|
447
|
+
includeExpired,
|
448
|
+
tokenId
|
449
|
+
}: {
|
450
|
+
includeExpired?: boolean;
|
451
|
+
tokenId: string;
|
452
|
+
}): Promise<AllNftInfoResponse> => {
|
453
|
+
return this.client.queryContractSmart(this.contractAddress, {
|
454
|
+
all_nft_info: {
|
455
|
+
include_expired: includeExpired,
|
456
|
+
token_id: tokenId
|
457
|
+
}
|
458
|
+
});
|
459
|
+
};
|
460
|
+
tokens = async ({
|
461
|
+
limit,
|
462
|
+
owner,
|
463
|
+
startAfter
|
464
|
+
}: {
|
465
|
+
limit?: number;
|
466
|
+
owner: string;
|
467
|
+
startAfter?: string;
|
468
|
+
}): Promise<TokensResponse> => {
|
469
|
+
return this.client.queryContractSmart(this.contractAddress, {
|
470
|
+
tokens: {
|
471
|
+
limit,
|
472
|
+
owner,
|
473
|
+
start_after: startAfter
|
474
|
+
}
|
475
|
+
});
|
476
|
+
};
|
477
|
+
allTokens = async ({
|
478
|
+
limit,
|
479
|
+
startAfter
|
480
|
+
}: {
|
481
|
+
limit?: number;
|
482
|
+
startAfter?: string;
|
483
|
+
}): Promise<AllTokensResponse> => {
|
484
|
+
return this.client.queryContractSmart(this.contractAddress, {
|
485
|
+
all_tokens: {
|
486
|
+
limit,
|
487
|
+
start_after: startAfter
|
488
|
+
}
|
489
|
+
});
|
490
|
+
};
|
491
|
+
minter = async (): Promise<MinterResponse> => {
|
492
|
+
return this.client.queryContractSmart(this.contractAddress, {
|
493
|
+
minter: {}
|
494
|
+
});
|
495
|
+
};
|
496
|
+
}"
|
497
|
+
`;
|