wasm-ast-types 0.26.3 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- package/LICENSE-Apache +201 -0
- package/LICENSE-MIT +21 -0
- package/README.md +24 -1
- package/{types/client → client}/client.d.ts +2 -2
- package/client/client.js +275 -0
- package/client/index.js +17 -0
- package/{types/context → context}/context.d.ts +9 -22
- package/context/context.js +114 -0
- package/{types/context → context}/imports.d.ts +9 -8
- package/context/imports.js +166 -0
- package/context/index.js +18 -0
- package/esm/client/client.js +238 -0
- package/esm/client/index.js +1 -0
- package/esm/context/context.js +104 -0
- package/esm/context/imports.js +136 -0
- package/{module → esm}/context/index.js +1 -1
- package/{src/index.ts → esm/index.js} +0 -1
- package/esm/message-builder/message-builder.js +64 -0
- package/esm/message-composer/message-composer.js +105 -0
- package/esm/provider/provider.js +97 -0
- package/esm/react-query/react-query.js +458 -0
- package/esm/recoil/recoil.js +110 -0
- package/esm/utils/babel.js +231 -0
- package/esm/utils/constants.js +20 -0
- package/esm/utils/ref.js +4 -0
- package/esm/utils/types.js +343 -0
- package/{types/index.d.ts → index.d.ts} +0 -1
- package/index.js +24 -0
- package/message-builder/index.js +17 -0
- package/{types/message-builder → message-builder}/message-builder.d.ts +1 -1
- package/message-builder/message-builder.js +91 -0
- package/message-composer/index.d.ts +1 -0
- package/message-composer/index.js +17 -0
- package/{types/message-composer → message-composer}/message-composer.d.ts +1 -1
- package/message-composer/message-composer.js +133 -0
- package/package.json +19 -68
- package/provider/index.d.ts +1 -0
- package/provider/index.js +17 -0
- package/provider/provider.js +127 -0
- package/react-query/index.d.ts +1 -0
- package/react-query/index.js +17 -0
- package/{types/react-query → react-query}/react-query.d.ts +2 -3
- package/react-query/react-query.js +490 -0
- package/recoil/index.d.ts +1 -0
- package/recoil/index.js +17 -0
- package/{types/recoil → recoil}/recoil.d.ts +1 -1
- package/recoil/recoil.js +140 -0
- package/{types/utils → utils}/babel.d.ts +9 -8
- package/utils/babel.js +285 -0
- package/utils/constants.js +46 -0
- package/utils/index.js +26 -0
- package/{types/utils → utils}/ref.d.ts +1 -1
- package/utils/ref.js +8 -0
- package/{types/utils → utils}/types.d.ts +8 -8
- package/utils/types.js +379 -0
- package/main/client/client.js +0 -196
- package/main/client/index.js +0 -16
- package/main/client/test/ts-client.account-nfts.spec.js +0 -28
- package/main/client/test/ts-client.arrays-ref.spec.js +0 -19
- package/main/client/test/ts-client.arrays.spec.js +0 -26
- package/main/client/test/ts-client.cw-named-groups.test.js +0 -19
- package/main/client/test/ts-client.cw-proposal-single.test.js +0 -23
- package/main/client/test/ts-client.empty-enums.spec.js +0 -13
- package/main/client/test/ts-client.issue-101.spec.js +0 -23
- package/main/client/test/ts-client.issue-103.test.js +0 -44
- package/main/client/test/ts-client.issue-71.test.js +0 -81
- package/main/client/test/ts-client.issue-98.test.js +0 -28
- package/main/client/test/ts-client.issues.test.js +0 -81
- package/main/client/test/ts-client.overrides.spec.js +0 -33
- package/main/client/test/ts-client.sg721.spec.js +0 -19
- package/main/client/test/ts-client.spec.js +0 -87
- package/main/client/test/ts-client.vectis.spec.js +0 -46
- package/main/client/test/ts-client.wager.spec.js +0 -39
- package/main/context/context.js +0 -162
- package/main/context/imports.js +0 -159
- package/main/context/index.js +0 -27
- package/main/index.js +0 -104
- package/main/message-builder/index.js +0 -16
- package/main/message-builder/message-builder.js +0 -62
- package/main/message-builder/message-builder.spec.js +0 -20
- package/main/message-composer/index.js +0 -16
- package/main/message-composer/message-composer.js +0 -86
- package/main/message-composer/message-composer.spec.js +0 -23
- package/main/provider/index.js +0 -16
- package/main/provider/provider.js +0 -71
- package/main/provider/provider.spec.js +0 -60
- package/main/react-query/index.js +0 -16
- package/main/react-query/react-query.js +0 -413
- package/main/react-query/react-query.spec.js +0 -91
- package/main/recoil/index.js +0 -16
- package/main/recoil/recoil.js +0 -61
- package/main/recoil/recoil.spec.js +0 -20
- package/main/types.js +0 -4
- package/main/utils/babel.js +0 -282
- package/main/utils/babel.spec.js +0 -109
- package/main/utils/constants.js +0 -26
- package/main/utils/index.js +0 -65
- package/main/utils/ref.js +0 -12
- package/main/utils/types.js +0 -343
- package/module/client/client.js +0 -166
- package/module/client/index.js +0 -1
- package/module/client/test/ts-client.account-nfts.spec.js +0 -25
- package/module/client/test/ts-client.arrays-ref.spec.js +0 -16
- package/module/client/test/ts-client.arrays.spec.js +0 -23
- package/module/client/test/ts-client.cw-named-groups.test.js +0 -16
- package/module/client/test/ts-client.cw-proposal-single.test.js +0 -20
- package/module/client/test/ts-client.empty-enums.spec.js +0 -10
- package/module/client/test/ts-client.issue-101.spec.js +0 -22
- package/module/client/test/ts-client.issue-103.test.js +0 -41
- package/module/client/test/ts-client.issue-71.test.js +0 -21
- package/module/client/test/ts-client.issue-98.test.js +0 -25
- package/module/client/test/ts-client.issues.test.js +0 -21
- package/module/client/test/ts-client.overrides.spec.js +0 -30
- package/module/client/test/ts-client.sg721.spec.js +0 -16
- package/module/client/test/ts-client.spec.js +0 -84
- package/module/client/test/ts-client.vectis.spec.js +0 -43
- package/module/client/test/ts-client.wager.spec.js +0 -36
- package/module/context/context.js +0 -116
- package/module/context/imports.js +0 -127
- package/module/index.js +0 -9
- package/module/message-builder/index.js +0 -1
- package/module/message-builder/message-builder.js +0 -52
- package/module/message-builder/message-builder.spec.js +0 -17
- package/module/message-composer/index.js +0 -1
- package/module/message-composer/message-composer.js +0 -70
- package/module/message-composer/message-composer.spec.js +0 -20
- package/module/provider/index.js +0 -1
- package/module/provider/provider.js +0 -45
- package/module/provider/provider.spec.js +0 -58
- package/module/react-query/index.js +0 -1
- package/module/react-query/react-query.js +0 -403
- package/module/react-query/react-query.spec.js +0 -85
- package/module/recoil/index.js +0 -1
- package/module/recoil/recoil.js +0 -46
- package/module/recoil/recoil.spec.js +0 -14
- package/module/types.js +0 -3
- package/module/utils/babel.js +0 -203
- package/module/utils/babel.spec.js +0 -70
- package/module/utils/constants.js +0 -12
- package/module/utils/index.js +0 -6
- package/module/utils/ref.js +0 -4
- package/module/utils/types.js +0 -301
- package/src/client/client.ts +0 -584
- package/src/client/index.ts +0 -1
- package/src/client/test/__snapshots__/ts-client.account-nfts.spec.ts.snap +0 -497
- package/src/client/test/__snapshots__/ts-client.arrays-ref.spec.ts.snap +0 -452
- package/src/client/test/__snapshots__/ts-client.arrays.spec.ts.snap +0 -101
- package/src/client/test/__snapshots__/ts-client.cw-named-groups.test.ts.snap +0 -141
- package/src/client/test/__snapshots__/ts-client.cw-proposal-single.test.ts.snap +0 -341
- package/src/client/test/__snapshots__/ts-client.empty-enums.spec.ts.snap +0 -20
- package/src/client/test/__snapshots__/ts-client.issue-101.spec.ts.snap +0 -47
- package/src/client/test/__snapshots__/ts-client.issue-103.test.ts.snap +0 -79
- package/src/client/test/__snapshots__/ts-client.issue-71.test.ts.snap +0 -432
- package/src/client/test/__snapshots__/ts-client.issue-98.test.ts.snap +0 -117
- package/src/client/test/__snapshots__/ts-client.issues.test.ts.snap +0 -984
- package/src/client/test/__snapshots__/ts-client.overrides.spec.ts.snap +0 -709
- package/src/client/test/__snapshots__/ts-client.sg721.spec.ts.snap +0 -350
- package/src/client/test/__snapshots__/ts-client.spec.ts.snap +0 -723
- package/src/client/test/__snapshots__/ts-client.vectis.spec.ts.snap +0 -337
- package/src/client/test/__snapshots__/ts-client.wager.spec.ts.snap +0 -132
- package/src/client/test/ts-client.account-nfts.spec.ts +0 -55
- package/src/client/test/ts-client.arrays-ref.spec.ts +0 -48
- package/src/client/test/ts-client.arrays.spec.ts +0 -58
- package/src/client/test/ts-client.cw-named-groups.test.ts +0 -48
- package/src/client/test/ts-client.cw-proposal-single.test.ts +0 -50
- package/src/client/test/ts-client.empty-enums.spec.ts +0 -28
- package/src/client/test/ts-client.issue-101.spec.ts +0 -37
- package/src/client/test/ts-client.issue-103.test.ts +0 -106
- package/src/client/test/ts-client.issue-71.test.ts +0 -51
- package/src/client/test/ts-client.issue-98.test.ts +0 -55
- package/src/client/test/ts-client.issues.test.ts +0 -52
- package/src/client/test/ts-client.overrides.spec.ts +0 -74
- package/src/client/test/ts-client.sg721.spec.ts +0 -46
- package/src/client/test/ts-client.spec.ts +0 -166
- package/src/client/test/ts-client.vectis.spec.ts +0 -97
- package/src/client/test/ts-client.wager.spec.ts +0 -63
- package/src/context/context.ts +0 -229
- package/src/context/imports.ts +0 -195
- package/src/context/index.ts +0 -2
- package/src/message-builder/__snapshots__/message-builder.spec.ts.snap +0 -270
- package/src/message-builder/message-builder.spec.ts +0 -24
- package/src/message-builder/message-builder.ts +0 -119
- package/src/message-composer/__snapshots__/message-composer.spec.ts.snap +0 -331
- package/src/message-composer/index.ts +0 -1
- package/src/message-composer/message-composer.spec.ts +0 -46
- package/src/message-composer/message-composer.ts +0 -262
- package/src/provider/__snapshots__/provider.spec.ts.snap +0 -49
- package/src/provider/index.ts +0 -1
- package/src/provider/provider.spec.ts +0 -81
- package/src/provider/provider.ts +0 -237
- package/src/react-query/__snapshots__/react-query.spec.ts.snap +0 -1359
- package/src/react-query/index.ts +0 -1
- package/src/react-query/react-query.spec.ts +0 -116
- package/src/react-query/react-query.ts +0 -1072
- package/src/recoil/__snapshots__/recoil.spec.ts.snap +0 -203
- package/src/recoil/index.ts +0 -1
- package/src/recoil/recoil.spec.ts +0 -38
- package/src/recoil/recoil.ts +0 -307
- package/src/types.ts +0 -44
- package/src/utils/__snapshots__/babel.spec.ts.snap +0 -75
- package/src/utils/babel.spec.ts +0 -511
- package/src/utils/babel.ts +0 -352
- package/src/utils/constants.ts +0 -37
- package/src/utils/ref.ts +0 -6
- package/src/utils/types.ts +0 -478
- package/types/types.d.ts +0 -41
- /package/{types/client → client}/index.d.ts +0 -0
- /package/{types/context → context}/index.d.ts +0 -0
- /package/{src/message-builder/index.ts → esm/message-builder/index.js} +0 -0
- /package/{types/message-composer/index.d.ts → esm/message-composer/index.js} +0 -0
- /package/{types/provider/index.d.ts → esm/provider/index.js} +0 -0
- /package/{types/react-query/index.d.ts → esm/react-query/index.js} +0 -0
- /package/{types/recoil/index.d.ts → esm/recoil/index.js} +0 -0
- /package/{src/utils/index.ts → esm/utils/index.js} +0 -0
- /package/{types/message-builder → message-builder}/index.d.ts +0 -0
- /package/{types/provider → provider}/provider.d.ts +0 -0
- /package/{types/utils → utils}/constants.d.ts +0 -0
- /package/{types/utils → utils}/index.d.ts +0 -0
@@ -1,723 +0,0 @@
|
|
1
|
-
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
2
|
-
|
3
|
-
exports[`all_nft_info_response 1`] = `
|
4
|
-
"export interface AllNftInfoResponse {
|
5
|
-
access: OwnerOfResponse;
|
6
|
-
info: NftInfoResponse_for_Empty;
|
7
|
-
}"
|
8
|
-
`;
|
9
|
-
|
10
|
-
exports[`approval_response 1`] = `
|
11
|
-
"export interface ApprovalResponse {
|
12
|
-
approval: Approval;
|
13
|
-
}"
|
14
|
-
`;
|
15
|
-
|
16
|
-
exports[`approvals_response 1`] = `
|
17
|
-
"export interface ApprovalsResponse {
|
18
|
-
approvals: Approval[];
|
19
|
-
}"
|
20
|
-
`;
|
21
|
-
|
22
|
-
exports[`collection_info_response 1`] = `
|
23
|
-
"export interface CollectionInfoResponse {
|
24
|
-
creator: string;
|
25
|
-
description: string;
|
26
|
-
externalLink?: string;
|
27
|
-
image: string;
|
28
|
-
royaltyInfo?: RoyaltyInfoResponse;
|
29
|
-
}"
|
30
|
-
`;
|
31
|
-
|
32
|
-
exports[`contract_info_response 1`] = `
|
33
|
-
"export interface ContractInfoResponse {
|
34
|
-
name: string;
|
35
|
-
symbol: string;
|
36
|
-
}"
|
37
|
-
`;
|
38
|
-
|
39
|
-
exports[`execute classes 1`] = `
|
40
|
-
"export class SG721Client extends SG721QueryClient implements SG721Instance {
|
41
|
-
client: SigningCosmWasmClient;
|
42
|
-
sender: string;
|
43
|
-
contractAddress: string;
|
44
|
-
|
45
|
-
constructor(client: SigningCosmWasmClient, sender: string, contractAddress: string) {
|
46
|
-
super(client, contractAddress);
|
47
|
-
this.client = client;
|
48
|
-
this.sender = sender;
|
49
|
-
this.contractAddress = contractAddress;
|
50
|
-
this.transferNft = this.transferNft.bind(this);
|
51
|
-
this.sendNft = this.sendNft.bind(this);
|
52
|
-
this.approve = this.approve.bind(this);
|
53
|
-
this.revoke = this.revoke.bind(this);
|
54
|
-
this.approveAll = this.approveAll.bind(this);
|
55
|
-
this.revokeAll = this.revokeAll.bind(this);
|
56
|
-
this.mint = this.mint.bind(this);
|
57
|
-
this.burn = this.burn.bind(this);
|
58
|
-
}
|
59
|
-
|
60
|
-
transferNft = async ({
|
61
|
-
recipient,
|
62
|
-
tokenId
|
63
|
-
}: {
|
64
|
-
recipient: string;
|
65
|
-
tokenId: string;
|
66
|
-
}, fee: number | StdFee | \\"auto\\" = \\"auto\\", memo?: string, _funds?: Coin[]): Promise<ExecuteResult> => {
|
67
|
-
return await this.client.execute(this.sender, this.contractAddress, {
|
68
|
-
transfer_nft: {
|
69
|
-
recipient,
|
70
|
-
token_id: tokenId
|
71
|
-
}
|
72
|
-
}, fee, memo, _funds);
|
73
|
-
};
|
74
|
-
sendNft = async ({
|
75
|
-
contract,
|
76
|
-
msg,
|
77
|
-
tokenId
|
78
|
-
}: {
|
79
|
-
contract: string;
|
80
|
-
msg: Binary;
|
81
|
-
tokenId: string;
|
82
|
-
}, fee: number | StdFee | \\"auto\\" = \\"auto\\", memo?: string, _funds?: Coin[]): Promise<ExecuteResult> => {
|
83
|
-
return await this.client.execute(this.sender, this.contractAddress, {
|
84
|
-
send_nft: {
|
85
|
-
contract,
|
86
|
-
msg,
|
87
|
-
token_id: tokenId
|
88
|
-
}
|
89
|
-
}, fee, memo, _funds);
|
90
|
-
};
|
91
|
-
approve = async ({
|
92
|
-
expires,
|
93
|
-
spender,
|
94
|
-
tokenId
|
95
|
-
}: {
|
96
|
-
expires?: Expiration;
|
97
|
-
spender: string;
|
98
|
-
tokenId: string;
|
99
|
-
}, fee: number | StdFee | \\"auto\\" = \\"auto\\", memo?: string, _funds?: Coin[]): Promise<ExecuteResult> => {
|
100
|
-
return await this.client.execute(this.sender, this.contractAddress, {
|
101
|
-
approve: {
|
102
|
-
expires,
|
103
|
-
spender,
|
104
|
-
token_id: tokenId
|
105
|
-
}
|
106
|
-
}, fee, memo, _funds);
|
107
|
-
};
|
108
|
-
revoke = async ({
|
109
|
-
spender,
|
110
|
-
tokenId
|
111
|
-
}: {
|
112
|
-
spender: string;
|
113
|
-
tokenId: string;
|
114
|
-
}, fee: number | StdFee | \\"auto\\" = \\"auto\\", memo?: string, _funds?: Coin[]): Promise<ExecuteResult> => {
|
115
|
-
return await this.client.execute(this.sender, this.contractAddress, {
|
116
|
-
revoke: {
|
117
|
-
spender,
|
118
|
-
token_id: tokenId
|
119
|
-
}
|
120
|
-
}, fee, memo, _funds);
|
121
|
-
};
|
122
|
-
approveAll = async ({
|
123
|
-
expires,
|
124
|
-
operator
|
125
|
-
}: {
|
126
|
-
expires?: Expiration;
|
127
|
-
operator: string;
|
128
|
-
}, fee: number | StdFee | \\"auto\\" = \\"auto\\", memo?: string, _funds?: Coin[]): Promise<ExecuteResult> => {
|
129
|
-
return await this.client.execute(this.sender, this.contractAddress, {
|
130
|
-
approve_all: {
|
131
|
-
expires,
|
132
|
-
operator
|
133
|
-
}
|
134
|
-
}, fee, memo, _funds);
|
135
|
-
};
|
136
|
-
revokeAll = async ({
|
137
|
-
operator
|
138
|
-
}: {
|
139
|
-
operator: string;
|
140
|
-
}, fee: number | StdFee | \\"auto\\" = \\"auto\\", memo?: string, _funds?: Coin[]): Promise<ExecuteResult> => {
|
141
|
-
return await this.client.execute(this.sender, this.contractAddress, {
|
142
|
-
revoke_all: {
|
143
|
-
operator
|
144
|
-
}
|
145
|
-
}, fee, memo, _funds);
|
146
|
-
};
|
147
|
-
mint = async ({
|
148
|
-
extension,
|
149
|
-
owner,
|
150
|
-
tokenId,
|
151
|
-
tokenUri
|
152
|
-
}: {
|
153
|
-
extension: Empty;
|
154
|
-
owner: string;
|
155
|
-
tokenId: string;
|
156
|
-
tokenUri?: string;
|
157
|
-
}, fee: number | StdFee | \\"auto\\" = \\"auto\\", memo?: string, _funds?: Coin[]): Promise<ExecuteResult> => {
|
158
|
-
return await this.client.execute(this.sender, this.contractAddress, {
|
159
|
-
mint: {
|
160
|
-
extension,
|
161
|
-
owner,
|
162
|
-
token_id: tokenId,
|
163
|
-
token_uri: tokenUri
|
164
|
-
}
|
165
|
-
}, fee, memo, _funds);
|
166
|
-
};
|
167
|
-
burn = async ({
|
168
|
-
tokenId
|
169
|
-
}: {
|
170
|
-
tokenId: string;
|
171
|
-
}, fee: number | StdFee | \\"auto\\" = \\"auto\\", memo?: string, _funds?: Coin[]): Promise<ExecuteResult> => {
|
172
|
-
return await this.client.execute(this.sender, this.contractAddress, {
|
173
|
-
burn: {
|
174
|
-
token_id: tokenId
|
175
|
-
}
|
176
|
-
}, fee, memo, _funds);
|
177
|
-
};
|
178
|
-
}"
|
179
|
-
`;
|
180
|
-
|
181
|
-
exports[`execute classes array types 1`] = `
|
182
|
-
"export class SG721Client implements SG721Instance {
|
183
|
-
client: SigningCosmWasmClient;
|
184
|
-
sender: string;
|
185
|
-
contractAddress: string;
|
186
|
-
|
187
|
-
constructor(client: SigningCosmWasmClient, sender: string, contractAddress: string) {
|
188
|
-
this.client = client;
|
189
|
-
this.sender = sender;
|
190
|
-
this.contractAddress = contractAddress;
|
191
|
-
this.update = this.update.bind(this);
|
192
|
-
this.removeGroup = this.removeGroup.bind(this);
|
193
|
-
this.updateOwner = this.updateOwner.bind(this);
|
194
|
-
}
|
195
|
-
|
196
|
-
update = async ({
|
197
|
-
addressesToAdd,
|
198
|
-
addressesToRemove,
|
199
|
-
group
|
200
|
-
}: {
|
201
|
-
addressesToAdd?: string[];
|
202
|
-
addressesToRemove?: string[];
|
203
|
-
group: string;
|
204
|
-
}, fee: number | StdFee | \\"auto\\" = \\"auto\\", memo?: string, _funds?: Coin[]): Promise<ExecuteResult> => {
|
205
|
-
return await this.client.execute(this.sender, this.contractAddress, {
|
206
|
-
update: {
|
207
|
-
addresses_to_add: addressesToAdd,
|
208
|
-
addresses_to_remove: addressesToRemove,
|
209
|
-
group
|
210
|
-
}
|
211
|
-
}, fee, memo, _funds);
|
212
|
-
};
|
213
|
-
removeGroup = async ({
|
214
|
-
group
|
215
|
-
}: {
|
216
|
-
group: string;
|
217
|
-
}, fee: number | StdFee | \\"auto\\" = \\"auto\\", memo?: string, _funds?: Coin[]): Promise<ExecuteResult> => {
|
218
|
-
return await this.client.execute(this.sender, this.contractAddress, {
|
219
|
-
remove_group: {
|
220
|
-
group
|
221
|
-
}
|
222
|
-
}, fee, memo, _funds);
|
223
|
-
};
|
224
|
-
updateOwner = async ({
|
225
|
-
owner
|
226
|
-
}: {
|
227
|
-
owner: string;
|
228
|
-
}, fee: number | StdFee | \\"auto\\" = \\"auto\\", memo?: string, _funds?: Coin[]): Promise<ExecuteResult> => {
|
229
|
-
return await this.client.execute(this.sender, this.contractAddress, {
|
230
|
-
update_owner: {
|
231
|
-
owner
|
232
|
-
}
|
233
|
-
}, fee, memo, _funds);
|
234
|
-
};
|
235
|
-
}"
|
236
|
-
`;
|
237
|
-
|
238
|
-
exports[`execute classes no extends 1`] = `
|
239
|
-
"export class SG721Client implements SG721Instance {
|
240
|
-
client: SigningCosmWasmClient;
|
241
|
-
sender: string;
|
242
|
-
contractAddress: string;
|
243
|
-
|
244
|
-
constructor(client: SigningCosmWasmClient, sender: string, contractAddress: string) {
|
245
|
-
this.client = client;
|
246
|
-
this.sender = sender;
|
247
|
-
this.contractAddress = contractAddress;
|
248
|
-
this.transferNft = this.transferNft.bind(this);
|
249
|
-
this.sendNft = this.sendNft.bind(this);
|
250
|
-
this.approve = this.approve.bind(this);
|
251
|
-
this.revoke = this.revoke.bind(this);
|
252
|
-
this.approveAll = this.approveAll.bind(this);
|
253
|
-
this.revokeAll = this.revokeAll.bind(this);
|
254
|
-
this.mint = this.mint.bind(this);
|
255
|
-
this.burn = this.burn.bind(this);
|
256
|
-
}
|
257
|
-
|
258
|
-
transferNft = async ({
|
259
|
-
recipient,
|
260
|
-
tokenId
|
261
|
-
}: {
|
262
|
-
recipient: string;
|
263
|
-
tokenId: string;
|
264
|
-
}, fee: number | StdFee | \\"auto\\" = \\"auto\\", memo?: string, _funds?: Coin[]): Promise<ExecuteResult> => {
|
265
|
-
return await this.client.execute(this.sender, this.contractAddress, {
|
266
|
-
transfer_nft: {
|
267
|
-
recipient,
|
268
|
-
token_id: tokenId
|
269
|
-
}
|
270
|
-
}, fee, memo, _funds);
|
271
|
-
};
|
272
|
-
sendNft = async ({
|
273
|
-
contract,
|
274
|
-
msg,
|
275
|
-
tokenId
|
276
|
-
}: {
|
277
|
-
contract: string;
|
278
|
-
msg: Binary;
|
279
|
-
tokenId: string;
|
280
|
-
}, fee: number | StdFee | \\"auto\\" = \\"auto\\", memo?: string, _funds?: Coin[]): Promise<ExecuteResult> => {
|
281
|
-
return await this.client.execute(this.sender, this.contractAddress, {
|
282
|
-
send_nft: {
|
283
|
-
contract,
|
284
|
-
msg,
|
285
|
-
token_id: tokenId
|
286
|
-
}
|
287
|
-
}, fee, memo, _funds);
|
288
|
-
};
|
289
|
-
approve = async ({
|
290
|
-
expires,
|
291
|
-
spender,
|
292
|
-
tokenId
|
293
|
-
}: {
|
294
|
-
expires?: Expiration;
|
295
|
-
spender: string;
|
296
|
-
tokenId: string;
|
297
|
-
}, fee: number | StdFee | \\"auto\\" = \\"auto\\", memo?: string, _funds?: Coin[]): Promise<ExecuteResult> => {
|
298
|
-
return await this.client.execute(this.sender, this.contractAddress, {
|
299
|
-
approve: {
|
300
|
-
expires,
|
301
|
-
spender,
|
302
|
-
token_id: tokenId
|
303
|
-
}
|
304
|
-
}, fee, memo, _funds);
|
305
|
-
};
|
306
|
-
revoke = async ({
|
307
|
-
spender,
|
308
|
-
tokenId
|
309
|
-
}: {
|
310
|
-
spender: string;
|
311
|
-
tokenId: string;
|
312
|
-
}, fee: number | StdFee | \\"auto\\" = \\"auto\\", memo?: string, _funds?: Coin[]): Promise<ExecuteResult> => {
|
313
|
-
return await this.client.execute(this.sender, this.contractAddress, {
|
314
|
-
revoke: {
|
315
|
-
spender,
|
316
|
-
token_id: tokenId
|
317
|
-
}
|
318
|
-
}, fee, memo, _funds);
|
319
|
-
};
|
320
|
-
approveAll = async ({
|
321
|
-
expires,
|
322
|
-
operator
|
323
|
-
}: {
|
324
|
-
expires?: Expiration;
|
325
|
-
operator: string;
|
326
|
-
}, fee: number | StdFee | \\"auto\\" = \\"auto\\", memo?: string, _funds?: Coin[]): Promise<ExecuteResult> => {
|
327
|
-
return await this.client.execute(this.sender, this.contractAddress, {
|
328
|
-
approve_all: {
|
329
|
-
expires,
|
330
|
-
operator
|
331
|
-
}
|
332
|
-
}, fee, memo, _funds);
|
333
|
-
};
|
334
|
-
revokeAll = async ({
|
335
|
-
operator
|
336
|
-
}: {
|
337
|
-
operator: string;
|
338
|
-
}, fee: number | StdFee | \\"auto\\" = \\"auto\\", memo?: string, _funds?: Coin[]): Promise<ExecuteResult> => {
|
339
|
-
return await this.client.execute(this.sender, this.contractAddress, {
|
340
|
-
revoke_all: {
|
341
|
-
operator
|
342
|
-
}
|
343
|
-
}, fee, memo, _funds);
|
344
|
-
};
|
345
|
-
mint = async ({
|
346
|
-
extension,
|
347
|
-
owner,
|
348
|
-
tokenId,
|
349
|
-
tokenUri
|
350
|
-
}: {
|
351
|
-
extension: Empty;
|
352
|
-
owner: string;
|
353
|
-
tokenId: string;
|
354
|
-
tokenUri?: string;
|
355
|
-
}, fee: number | StdFee | \\"auto\\" = \\"auto\\", memo?: string, _funds?: Coin[]): Promise<ExecuteResult> => {
|
356
|
-
return await this.client.execute(this.sender, this.contractAddress, {
|
357
|
-
mint: {
|
358
|
-
extension,
|
359
|
-
owner,
|
360
|
-
token_id: tokenId,
|
361
|
-
token_uri: tokenUri
|
362
|
-
}
|
363
|
-
}, fee, memo, _funds);
|
364
|
-
};
|
365
|
-
burn = async ({
|
366
|
-
tokenId
|
367
|
-
}: {
|
368
|
-
tokenId: string;
|
369
|
-
}, fee: number | StdFee | \\"auto\\" = \\"auto\\", memo?: string, _funds?: Coin[]): Promise<ExecuteResult> => {
|
370
|
-
return await this.client.execute(this.sender, this.contractAddress, {
|
371
|
-
burn: {
|
372
|
-
token_id: tokenId
|
373
|
-
}
|
374
|
-
}, fee, memo, _funds);
|
375
|
-
};
|
376
|
-
}"
|
377
|
-
`;
|
378
|
-
|
379
|
-
exports[`execute interfaces no extends 1`] = `
|
380
|
-
"export interface SG721Instance {
|
381
|
-
contractAddress: string;
|
382
|
-
sender: string;
|
383
|
-
transferNft: ({
|
384
|
-
recipient,
|
385
|
-
tokenId
|
386
|
-
}: {
|
387
|
-
recipient: string;
|
388
|
-
tokenId: string;
|
389
|
-
}, fee?: number | StdFee | \\"auto\\", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
|
390
|
-
sendNft: ({
|
391
|
-
contract,
|
392
|
-
msg,
|
393
|
-
tokenId
|
394
|
-
}: {
|
395
|
-
contract: string;
|
396
|
-
msg: Binary;
|
397
|
-
tokenId: string;
|
398
|
-
}, fee?: number | StdFee | \\"auto\\", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
|
399
|
-
approve: ({
|
400
|
-
expires,
|
401
|
-
spender,
|
402
|
-
tokenId
|
403
|
-
}: {
|
404
|
-
expires?: Expiration;
|
405
|
-
spender: string;
|
406
|
-
tokenId: string;
|
407
|
-
}, fee?: number | StdFee | \\"auto\\", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
|
408
|
-
revoke: ({
|
409
|
-
spender,
|
410
|
-
tokenId
|
411
|
-
}: {
|
412
|
-
spender: string;
|
413
|
-
tokenId: string;
|
414
|
-
}, fee?: number | StdFee | \\"auto\\", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
|
415
|
-
approveAll: ({
|
416
|
-
expires,
|
417
|
-
operator
|
418
|
-
}: {
|
419
|
-
expires?: Expiration;
|
420
|
-
operator: string;
|
421
|
-
}, fee?: number | StdFee | \\"auto\\", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
|
422
|
-
revokeAll: ({
|
423
|
-
operator
|
424
|
-
}: {
|
425
|
-
operator: string;
|
426
|
-
}, fee?: number | StdFee | \\"auto\\", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
|
427
|
-
mint: ({
|
428
|
-
extension,
|
429
|
-
owner,
|
430
|
-
tokenId,
|
431
|
-
tokenUri
|
432
|
-
}: {
|
433
|
-
extension: Empty;
|
434
|
-
owner: string;
|
435
|
-
tokenId: string;
|
436
|
-
tokenUri?: string;
|
437
|
-
}, fee?: number | StdFee | \\"auto\\", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
|
438
|
-
burn: ({
|
439
|
-
tokenId
|
440
|
-
}: {
|
441
|
-
tokenId: string;
|
442
|
-
}, fee?: number | StdFee | \\"auto\\", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
|
443
|
-
}"
|
444
|
-
`;
|
445
|
-
|
446
|
-
exports[`instantiate_msg 1`] = `
|
447
|
-
"export interface InstantiateMsg {
|
448
|
-
collectionInfo: CollectionInfo_for_RoyaltyInfoResponse;
|
449
|
-
minter: string;
|
450
|
-
name: string;
|
451
|
-
symbol: string;
|
452
|
-
}"
|
453
|
-
`;
|
454
|
-
|
455
|
-
exports[`nft_info_response 1`] = `
|
456
|
-
"export interface NftInfoResponse {
|
457
|
-
extension: Empty;
|
458
|
-
tokenUri?: string;
|
459
|
-
}"
|
460
|
-
`;
|
461
|
-
|
462
|
-
exports[`num_tokens_response 1`] = `
|
463
|
-
"export interface NumTokensResponse {
|
464
|
-
count: number;
|
465
|
-
}"
|
466
|
-
`;
|
467
|
-
|
468
|
-
exports[`operators_response 1`] = `
|
469
|
-
"export interface OperatorsResponse {
|
470
|
-
operators: Approval[];
|
471
|
-
}"
|
472
|
-
`;
|
473
|
-
|
474
|
-
exports[`owner_of_response 1`] = `
|
475
|
-
"export interface OwnerOfResponse {
|
476
|
-
approvals: Approval[];
|
477
|
-
owner: string;
|
478
|
-
}"
|
479
|
-
`;
|
480
|
-
|
481
|
-
exports[`query classes 1`] = `
|
482
|
-
"export class SG721QueryClient implements SG721ReadOnlyInstance {
|
483
|
-
client: CosmWasmClient;
|
484
|
-
contractAddress: string;
|
485
|
-
|
486
|
-
constructor(client: CosmWasmClient, contractAddress: string) {
|
487
|
-
this.client = client;
|
488
|
-
this.contractAddress = contractAddress;
|
489
|
-
this.ownerOf = this.ownerOf.bind(this);
|
490
|
-
this.approval = this.approval.bind(this);
|
491
|
-
this.approvals = this.approvals.bind(this);
|
492
|
-
this.allOperators = this.allOperators.bind(this);
|
493
|
-
this.numTokens = this.numTokens.bind(this);
|
494
|
-
this.contractInfo = this.contractInfo.bind(this);
|
495
|
-
this.nftInfo = this.nftInfo.bind(this);
|
496
|
-
this.allNftInfo = this.allNftInfo.bind(this);
|
497
|
-
this.tokens = this.tokens.bind(this);
|
498
|
-
this.allTokens = this.allTokens.bind(this);
|
499
|
-
this.minter = this.minter.bind(this);
|
500
|
-
this.collectionInfo = this.collectionInfo.bind(this);
|
501
|
-
}
|
502
|
-
|
503
|
-
ownerOf = async ({
|
504
|
-
includeExpired,
|
505
|
-
tokenId
|
506
|
-
}: {
|
507
|
-
includeExpired?: boolean;
|
508
|
-
tokenId: string;
|
509
|
-
}): Promise<OwnerOfResponse> => {
|
510
|
-
return this.client.queryContractSmart(this.contractAddress, {
|
511
|
-
owner_of: {
|
512
|
-
include_expired: includeExpired,
|
513
|
-
token_id: tokenId
|
514
|
-
}
|
515
|
-
});
|
516
|
-
};
|
517
|
-
approval = async ({
|
518
|
-
includeExpired,
|
519
|
-
spender,
|
520
|
-
tokenId
|
521
|
-
}: {
|
522
|
-
includeExpired?: boolean;
|
523
|
-
spender: string;
|
524
|
-
tokenId: string;
|
525
|
-
}): Promise<ApprovalResponse> => {
|
526
|
-
return this.client.queryContractSmart(this.contractAddress, {
|
527
|
-
approval: {
|
528
|
-
include_expired: includeExpired,
|
529
|
-
spender,
|
530
|
-
token_id: tokenId
|
531
|
-
}
|
532
|
-
});
|
533
|
-
};
|
534
|
-
approvals = async ({
|
535
|
-
includeExpired,
|
536
|
-
tokenId
|
537
|
-
}: {
|
538
|
-
includeExpired?: boolean;
|
539
|
-
tokenId: string;
|
540
|
-
}): Promise<ApprovalsResponse> => {
|
541
|
-
return this.client.queryContractSmart(this.contractAddress, {
|
542
|
-
approvals: {
|
543
|
-
include_expired: includeExpired,
|
544
|
-
token_id: tokenId
|
545
|
-
}
|
546
|
-
});
|
547
|
-
};
|
548
|
-
allOperators = async ({
|
549
|
-
includeExpired,
|
550
|
-
limit,
|
551
|
-
owner,
|
552
|
-
startAfter
|
553
|
-
}: {
|
554
|
-
includeExpired?: boolean;
|
555
|
-
limit?: number;
|
556
|
-
owner: string;
|
557
|
-
startAfter?: string;
|
558
|
-
}): Promise<AllOperatorsResponse> => {
|
559
|
-
return this.client.queryContractSmart(this.contractAddress, {
|
560
|
-
all_operators: {
|
561
|
-
include_expired: includeExpired,
|
562
|
-
limit,
|
563
|
-
owner,
|
564
|
-
start_after: startAfter
|
565
|
-
}
|
566
|
-
});
|
567
|
-
};
|
568
|
-
numTokens = async (): Promise<NumTokensResponse> => {
|
569
|
-
return this.client.queryContractSmart(this.contractAddress, {
|
570
|
-
num_tokens: {}
|
571
|
-
});
|
572
|
-
};
|
573
|
-
contractInfo = async (): Promise<ContractInfoResponse> => {
|
574
|
-
return this.client.queryContractSmart(this.contractAddress, {
|
575
|
-
contract_info: {}
|
576
|
-
});
|
577
|
-
};
|
578
|
-
nftInfo = async ({
|
579
|
-
tokenId
|
580
|
-
}: {
|
581
|
-
tokenId: string;
|
582
|
-
}): Promise<NftInfoResponse> => {
|
583
|
-
return this.client.queryContractSmart(this.contractAddress, {
|
584
|
-
nft_info: {
|
585
|
-
token_id: tokenId
|
586
|
-
}
|
587
|
-
});
|
588
|
-
};
|
589
|
-
allNftInfo = async ({
|
590
|
-
includeExpired,
|
591
|
-
tokenId
|
592
|
-
}: {
|
593
|
-
includeExpired?: boolean;
|
594
|
-
tokenId: string;
|
595
|
-
}): Promise<AllNftInfoResponse> => {
|
596
|
-
return this.client.queryContractSmart(this.contractAddress, {
|
597
|
-
all_nft_info: {
|
598
|
-
include_expired: includeExpired,
|
599
|
-
token_id: tokenId
|
600
|
-
}
|
601
|
-
});
|
602
|
-
};
|
603
|
-
tokens = async ({
|
604
|
-
limit,
|
605
|
-
owner,
|
606
|
-
startAfter
|
607
|
-
}: {
|
608
|
-
limit?: number;
|
609
|
-
owner: string;
|
610
|
-
startAfter?: string;
|
611
|
-
}): Promise<TokensResponse> => {
|
612
|
-
return this.client.queryContractSmart(this.contractAddress, {
|
613
|
-
tokens: {
|
614
|
-
limit,
|
615
|
-
owner,
|
616
|
-
start_after: startAfter
|
617
|
-
}
|
618
|
-
});
|
619
|
-
};
|
620
|
-
allTokens = async ({
|
621
|
-
limit,
|
622
|
-
startAfter
|
623
|
-
}: {
|
624
|
-
limit?: number;
|
625
|
-
startAfter?: string;
|
626
|
-
}): Promise<AllTokensResponse> => {
|
627
|
-
return this.client.queryContractSmart(this.contractAddress, {
|
628
|
-
all_tokens: {
|
629
|
-
limit,
|
630
|
-
start_after: startAfter
|
631
|
-
}
|
632
|
-
});
|
633
|
-
};
|
634
|
-
minter = async (): Promise<MinterResponse> => {
|
635
|
-
return this.client.queryContractSmart(this.contractAddress, {
|
636
|
-
minter: {}
|
637
|
-
});
|
638
|
-
};
|
639
|
-
collectionInfo = async (): Promise<CollectionInfoResponse> => {
|
640
|
-
return this.client.queryContractSmart(this.contractAddress, {
|
641
|
-
collection_info: {}
|
642
|
-
});
|
643
|
-
};
|
644
|
-
}"
|
645
|
-
`;
|
646
|
-
|
647
|
-
exports[`query interfaces 1`] = `
|
648
|
-
"export interface SG721ReadOnlyInstance {
|
649
|
-
contractAddress: string;
|
650
|
-
ownerOf: ({
|
651
|
-
includeExpired,
|
652
|
-
tokenId
|
653
|
-
}: {
|
654
|
-
includeExpired?: boolean;
|
655
|
-
tokenId: string;
|
656
|
-
}) => Promise<OwnerOfResponse>;
|
657
|
-
approval: ({
|
658
|
-
includeExpired,
|
659
|
-
spender,
|
660
|
-
tokenId
|
661
|
-
}: {
|
662
|
-
includeExpired?: boolean;
|
663
|
-
spender: string;
|
664
|
-
tokenId: string;
|
665
|
-
}) => Promise<ApprovalResponse>;
|
666
|
-
approvals: ({
|
667
|
-
includeExpired,
|
668
|
-
tokenId
|
669
|
-
}: {
|
670
|
-
includeExpired?: boolean;
|
671
|
-
tokenId: string;
|
672
|
-
}) => Promise<ApprovalsResponse>;
|
673
|
-
allOperators: ({
|
674
|
-
includeExpired,
|
675
|
-
limit,
|
676
|
-
owner,
|
677
|
-
startAfter
|
678
|
-
}: {
|
679
|
-
includeExpired?: boolean;
|
680
|
-
limit?: number;
|
681
|
-
owner: string;
|
682
|
-
startAfter?: string;
|
683
|
-
}) => Promise<AllOperatorsResponse>;
|
684
|
-
numTokens: () => Promise<NumTokensResponse>;
|
685
|
-
contractInfo: () => Promise<ContractInfoResponse>;
|
686
|
-
nftInfo: ({
|
687
|
-
tokenId
|
688
|
-
}: {
|
689
|
-
tokenId: string;
|
690
|
-
}) => Promise<NftInfoResponse>;
|
691
|
-
allNftInfo: ({
|
692
|
-
includeExpired,
|
693
|
-
tokenId
|
694
|
-
}: {
|
695
|
-
includeExpired?: boolean;
|
696
|
-
tokenId: string;
|
697
|
-
}) => Promise<AllNftInfoResponse>;
|
698
|
-
tokens: ({
|
699
|
-
limit,
|
700
|
-
owner,
|
701
|
-
startAfter
|
702
|
-
}: {
|
703
|
-
limit?: number;
|
704
|
-
owner: string;
|
705
|
-
startAfter?: string;
|
706
|
-
}) => Promise<TokensResponse>;
|
707
|
-
allTokens: ({
|
708
|
-
limit,
|
709
|
-
startAfter
|
710
|
-
}: {
|
711
|
-
limit?: number;
|
712
|
-
startAfter?: string;
|
713
|
-
}) => Promise<AllTokensResponse>;
|
714
|
-
minter: () => Promise<MinterResponse>;
|
715
|
-
collectionInfo: () => Promise<CollectionInfoResponse>;
|
716
|
-
}"
|
717
|
-
`;
|
718
|
-
|
719
|
-
exports[`tokens_response 1`] = `
|
720
|
-
"export interface TokensResponse {
|
721
|
-
tokens: string[];
|
722
|
-
}"
|
723
|
-
`;
|