wasm-ast-types 0.11.3 → 0.12.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/utils/types.js +20 -7
- package/module/client/test/ts-client.issue-71.test.js +21 -0
- 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 +132 -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
@@ -0,0 +1,452 @@
|
|
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.createEdge = this.createEdge.bind(this);
|
14
|
+
this.editEdge = this.editEdge.bind(this);
|
15
|
+
this.removeEdge = this.removeEdge.bind(this);
|
16
|
+
this.createGraph = this.createGraph.bind(this);
|
17
|
+
this.createGraphSimplified = this.createGraphSimplified.bind(this);
|
18
|
+
this.editGraphSimplified = this.editGraphSimplified.bind(this);
|
19
|
+
this.removeGraph = this.removeGraph.bind(this);
|
20
|
+
this.updateEdges = this.updateEdges.bind(this);
|
21
|
+
this.findSavings = this.findSavings.bind(this);
|
22
|
+
this.findSavingsInAGraph = this.findSavingsInAGraph.bind(this);
|
23
|
+
this.reset = this.reset.bind(this);
|
24
|
+
this.saveNetworkToFile = this.saveNetworkToFile.bind(this);
|
25
|
+
this.createGraphFromFile = this.createGraphFromFile.bind(this);
|
26
|
+
this.applySetOffFromFile = this.applySetOffFromFile.bind(this);
|
27
|
+
}
|
28
|
+
|
29
|
+
createEdge = async ({
|
30
|
+
amount,
|
31
|
+
creditor
|
32
|
+
}: {
|
33
|
+
amount: number;
|
34
|
+
creditor: Addr;
|
35
|
+
}, fee: number | StdFee | \\"auto\\" = \\"auto\\", memo?: string, funds?: Coin[]): Promise<ExecuteResult> => {
|
36
|
+
return await this.client.execute(this.sender, this.contractAddress, {
|
37
|
+
create_edge: {
|
38
|
+
amount,
|
39
|
+
creditor
|
40
|
+
}
|
41
|
+
}, fee, memo, funds);
|
42
|
+
};
|
43
|
+
editEdge = async ({
|
44
|
+
amount,
|
45
|
+
creditor,
|
46
|
+
edgeId
|
47
|
+
}: {
|
48
|
+
amount: number;
|
49
|
+
creditor: Addr;
|
50
|
+
edgeId: number;
|
51
|
+
}, fee: number | StdFee | \\"auto\\" = \\"auto\\", memo?: string, funds?: Coin[]): Promise<ExecuteResult> => {
|
52
|
+
return await this.client.execute(this.sender, this.contractAddress, {
|
53
|
+
edit_edge: {
|
54
|
+
amount,
|
55
|
+
creditor,
|
56
|
+
edge_id: edgeId
|
57
|
+
}
|
58
|
+
}, fee, memo, funds);
|
59
|
+
};
|
60
|
+
removeEdge = async ({
|
61
|
+
edgeId
|
62
|
+
}: {
|
63
|
+
edgeId: number;
|
64
|
+
}, fee: number | StdFee | \\"auto\\" = \\"auto\\", memo?: string, funds?: Coin[]): Promise<ExecuteResult> => {
|
65
|
+
return await this.client.execute(this.sender, this.contractAddress, {
|
66
|
+
remove_edge: {
|
67
|
+
edge_id: edgeId
|
68
|
+
}
|
69
|
+
}, fee, memo, funds);
|
70
|
+
};
|
71
|
+
createGraph = async ({
|
72
|
+
graph
|
73
|
+
}: {
|
74
|
+
graph: Edge[];
|
75
|
+
}, fee: number | StdFee | \\"auto\\" = \\"auto\\", memo?: string, funds?: Coin[]): Promise<ExecuteResult> => {
|
76
|
+
return await this.client.execute(this.sender, this.contractAddress, {
|
77
|
+
create_graph: {
|
78
|
+
graph
|
79
|
+
}
|
80
|
+
}, fee, memo, funds);
|
81
|
+
};
|
82
|
+
createGraphSimplified = async ({
|
83
|
+
graph,
|
84
|
+
graphId
|
85
|
+
}: {
|
86
|
+
graph: Addr[][];
|
87
|
+
graphId: number;
|
88
|
+
}, fee: number | StdFee | \\"auto\\" = \\"auto\\", memo?: string, funds?: Coin[]): Promise<ExecuteResult> => {
|
89
|
+
return await this.client.execute(this.sender, this.contractAddress, {
|
90
|
+
create_graph_simplified: {
|
91
|
+
graph,
|
92
|
+
graph_id: graphId
|
93
|
+
}
|
94
|
+
}, fee, memo, funds);
|
95
|
+
};
|
96
|
+
editGraphSimplified = async ({
|
97
|
+
graph,
|
98
|
+
graphId
|
99
|
+
}: {
|
100
|
+
graph: Addr[][];
|
101
|
+
graphId: number;
|
102
|
+
}, fee: number | StdFee | \\"auto\\" = \\"auto\\", memo?: string, funds?: Coin[]): Promise<ExecuteResult> => {
|
103
|
+
return await this.client.execute(this.sender, this.contractAddress, {
|
104
|
+
edit_graph_simplified: {
|
105
|
+
graph,
|
106
|
+
graph_id: graphId
|
107
|
+
}
|
108
|
+
}, fee, memo, funds);
|
109
|
+
};
|
110
|
+
removeGraph = async ({
|
111
|
+
graphId
|
112
|
+
}: {
|
113
|
+
graphId: number;
|
114
|
+
}, fee: number | StdFee | \\"auto\\" = \\"auto\\", memo?: string, funds?: Coin[]): Promise<ExecuteResult> => {
|
115
|
+
return await this.client.execute(this.sender, this.contractAddress, {
|
116
|
+
remove_graph: {
|
117
|
+
graph_id: graphId
|
118
|
+
}
|
119
|
+
}, fee, memo, funds);
|
120
|
+
};
|
121
|
+
updateEdges = async ({
|
122
|
+
edges
|
123
|
+
}: {
|
124
|
+
edges: number[][];
|
125
|
+
}, fee: number | StdFee | \\"auto\\" = \\"auto\\", memo?: string, funds?: Coin[]): Promise<ExecuteResult> => {
|
126
|
+
return await this.client.execute(this.sender, this.contractAddress, {
|
127
|
+
update_edges: {
|
128
|
+
edges
|
129
|
+
}
|
130
|
+
}, fee, memo, funds);
|
131
|
+
};
|
132
|
+
findSavings = async (fee: number | StdFee | \\"auto\\" = \\"auto\\", memo?: string, funds?: Coin[]): Promise<ExecuteResult> => {
|
133
|
+
return await this.client.execute(this.sender, this.contractAddress, {
|
134
|
+
find_savings: {}
|
135
|
+
}, fee, memo, funds);
|
136
|
+
};
|
137
|
+
findSavingsInAGraph = async ({
|
138
|
+
graphId
|
139
|
+
}: {
|
140
|
+
graphId: number;
|
141
|
+
}, fee: number | StdFee | \\"auto\\" = \\"auto\\", memo?: string, funds?: Coin[]): Promise<ExecuteResult> => {
|
142
|
+
return await this.client.execute(this.sender, this.contractAddress, {
|
143
|
+
find_savings_in_a_graph: {
|
144
|
+
graph_id: graphId
|
145
|
+
}
|
146
|
+
}, fee, memo, funds);
|
147
|
+
};
|
148
|
+
reset = async (fee: number | StdFee | \\"auto\\" = \\"auto\\", memo?: string, funds?: Coin[]): Promise<ExecuteResult> => {
|
149
|
+
return await this.client.execute(this.sender, this.contractAddress, {
|
150
|
+
reset: {}
|
151
|
+
}, fee, memo, funds);
|
152
|
+
};
|
153
|
+
saveNetworkToFile = async ({
|
154
|
+
filepath
|
155
|
+
}: {
|
156
|
+
filepath: string;
|
157
|
+
}, fee: number | StdFee | \\"auto\\" = \\"auto\\", memo?: string, funds?: Coin[]): Promise<ExecuteResult> => {
|
158
|
+
return await this.client.execute(this.sender, this.contractAddress, {
|
159
|
+
save_network_to_file: {
|
160
|
+
filepath
|
161
|
+
}
|
162
|
+
}, fee, memo, funds);
|
163
|
+
};
|
164
|
+
createGraphFromFile = async ({
|
165
|
+
filepath
|
166
|
+
}: {
|
167
|
+
filepath: string;
|
168
|
+
}, fee: number | StdFee | \\"auto\\" = \\"auto\\", memo?: string, funds?: Coin[]): Promise<ExecuteResult> => {
|
169
|
+
return await this.client.execute(this.sender, this.contractAddress, {
|
170
|
+
create_graph_from_file: {
|
171
|
+
filepath
|
172
|
+
}
|
173
|
+
}, fee, memo, funds);
|
174
|
+
};
|
175
|
+
applySetOffFromFile = async ({
|
176
|
+
filepath
|
177
|
+
}: {
|
178
|
+
filepath: string;
|
179
|
+
}, fee: number | StdFee | \\"auto\\" = \\"auto\\", memo?: string, funds?: Coin[]): Promise<ExecuteResult> => {
|
180
|
+
return await this.client.execute(this.sender, this.contractAddress, {
|
181
|
+
apply_set_off_from_file: {
|
182
|
+
filepath
|
183
|
+
}
|
184
|
+
}, fee, memo, funds);
|
185
|
+
};
|
186
|
+
}"
|
187
|
+
`;
|
188
|
+
|
189
|
+
exports[`execute interfaces no extends 1`] = `
|
190
|
+
"export interface SG721Instance {
|
191
|
+
contractAddress: string;
|
192
|
+
sender: string;
|
193
|
+
createEdge: ({
|
194
|
+
amount,
|
195
|
+
creditor
|
196
|
+
}: {
|
197
|
+
amount: number;
|
198
|
+
creditor: Addr;
|
199
|
+
}, fee?: number | StdFee | \\"auto\\", memo?: string, funds?: Coin[]) => Promise<ExecuteResult>;
|
200
|
+
editEdge: ({
|
201
|
+
amount,
|
202
|
+
creditor,
|
203
|
+
edgeId
|
204
|
+
}: {
|
205
|
+
amount: number;
|
206
|
+
creditor: Addr;
|
207
|
+
edgeId: number;
|
208
|
+
}, fee?: number | StdFee | \\"auto\\", memo?: string, funds?: Coin[]) => Promise<ExecuteResult>;
|
209
|
+
removeEdge: ({
|
210
|
+
edgeId
|
211
|
+
}: {
|
212
|
+
edgeId: number;
|
213
|
+
}, fee?: number | StdFee | \\"auto\\", memo?: string, funds?: Coin[]) => Promise<ExecuteResult>;
|
214
|
+
createGraph: ({
|
215
|
+
graph
|
216
|
+
}: {
|
217
|
+
graph: Edge[];
|
218
|
+
}, fee?: number | StdFee | \\"auto\\", memo?: string, funds?: Coin[]) => Promise<ExecuteResult>;
|
219
|
+
createGraphSimplified: ({
|
220
|
+
graph,
|
221
|
+
graphId
|
222
|
+
}: {
|
223
|
+
graph: Addr[][];
|
224
|
+
graphId: number;
|
225
|
+
}, fee?: number | StdFee | \\"auto\\", memo?: string, funds?: Coin[]) => Promise<ExecuteResult>;
|
226
|
+
editGraphSimplified: ({
|
227
|
+
graph,
|
228
|
+
graphId
|
229
|
+
}: {
|
230
|
+
graph: Addr[][];
|
231
|
+
graphId: number;
|
232
|
+
}, fee?: number | StdFee | \\"auto\\", memo?: string, funds?: Coin[]) => Promise<ExecuteResult>;
|
233
|
+
removeGraph: ({
|
234
|
+
graphId
|
235
|
+
}: {
|
236
|
+
graphId: number;
|
237
|
+
}, fee?: number | StdFee | \\"auto\\", memo?: string, funds?: Coin[]) => Promise<ExecuteResult>;
|
238
|
+
updateEdges: ({
|
239
|
+
edges
|
240
|
+
}: {
|
241
|
+
edges: number[][];
|
242
|
+
}, fee?: number | StdFee | \\"auto\\", memo?: string, funds?: Coin[]) => Promise<ExecuteResult>;
|
243
|
+
findSavings: (fee?: number | StdFee | \\"auto\\", memo?: string, funds?: Coin[]) => Promise<ExecuteResult>;
|
244
|
+
findSavingsInAGraph: ({
|
245
|
+
graphId
|
246
|
+
}: {
|
247
|
+
graphId: number;
|
248
|
+
}, fee?: number | StdFee | \\"auto\\", memo?: string, funds?: Coin[]) => Promise<ExecuteResult>;
|
249
|
+
reset: (fee?: number | StdFee | \\"auto\\", memo?: string, funds?: Coin[]) => Promise<ExecuteResult>;
|
250
|
+
saveNetworkToFile: ({
|
251
|
+
filepath
|
252
|
+
}: {
|
253
|
+
filepath: string;
|
254
|
+
}, fee?: number | StdFee | \\"auto\\", memo?: string, funds?: Coin[]) => Promise<ExecuteResult>;
|
255
|
+
createGraphFromFile: ({
|
256
|
+
filepath
|
257
|
+
}: {
|
258
|
+
filepath: string;
|
259
|
+
}, fee?: number | StdFee | \\"auto\\", memo?: string, funds?: Coin[]) => Promise<ExecuteResult>;
|
260
|
+
applySetOffFromFile: ({
|
261
|
+
filepath
|
262
|
+
}: {
|
263
|
+
filepath: string;
|
264
|
+
}, fee?: number | StdFee | \\"auto\\", memo?: string, funds?: Coin[]) => Promise<ExecuteResult>;
|
265
|
+
}"
|
266
|
+
`;
|
267
|
+
|
268
|
+
exports[`execute_msg_for__empty 1`] = `"export type ExecuteMsg = ExecuteMsg;"`;
|
269
|
+
|
270
|
+
exports[`query classes 1`] = `
|
271
|
+
"export class SG721QueryClient implements SG721ReadOnlyInstance {
|
272
|
+
client: CosmWasmClient;
|
273
|
+
contractAddress: string;
|
274
|
+
|
275
|
+
constructor(client: CosmWasmClient, contractAddress: string) {
|
276
|
+
this.client = client;
|
277
|
+
this.contractAddress = contractAddress;
|
278
|
+
this.createEdge = this.createEdge.bind(this);
|
279
|
+
this.editEdge = this.editEdge.bind(this);
|
280
|
+
this.removeEdge = this.removeEdge.bind(this);
|
281
|
+
this.createGraph = this.createGraph.bind(this);
|
282
|
+
this.createGraphSimplified = this.createGraphSimplified.bind(this);
|
283
|
+
this.editGraphSimplified = this.editGraphSimplified.bind(this);
|
284
|
+
this.removeGraph = this.removeGraph.bind(this);
|
285
|
+
this.updateEdges = this.updateEdges.bind(this);
|
286
|
+
this.findSavings = this.findSavings.bind(this);
|
287
|
+
this.findSavingsInAGraph = this.findSavingsInAGraph.bind(this);
|
288
|
+
this.reset = this.reset.bind(this);
|
289
|
+
this.saveNetworkToFile = this.saveNetworkToFile.bind(this);
|
290
|
+
this.createGraphFromFile = this.createGraphFromFile.bind(this);
|
291
|
+
this.applySetOffFromFile = this.applySetOffFromFile.bind(this);
|
292
|
+
}
|
293
|
+
|
294
|
+
createEdge = async ({
|
295
|
+
amount,
|
296
|
+
creditor
|
297
|
+
}: {
|
298
|
+
amount: number;
|
299
|
+
creditor: Addr;
|
300
|
+
}): Promise<CreateEdgeResponse> => {
|
301
|
+
return this.client.queryContractSmart(this.contractAddress, {
|
302
|
+
create_edge: {
|
303
|
+
amount,
|
304
|
+
creditor
|
305
|
+
}
|
306
|
+
});
|
307
|
+
};
|
308
|
+
editEdge = async ({
|
309
|
+
amount,
|
310
|
+
creditor,
|
311
|
+
edgeId
|
312
|
+
}: {
|
313
|
+
amount: number;
|
314
|
+
creditor: Addr;
|
315
|
+
edgeId: number;
|
316
|
+
}): Promise<EditEdgeResponse> => {
|
317
|
+
return this.client.queryContractSmart(this.contractAddress, {
|
318
|
+
edit_edge: {
|
319
|
+
amount,
|
320
|
+
creditor,
|
321
|
+
edge_id: edgeId
|
322
|
+
}
|
323
|
+
});
|
324
|
+
};
|
325
|
+
removeEdge = async ({
|
326
|
+
edgeId
|
327
|
+
}: {
|
328
|
+
edgeId: number;
|
329
|
+
}): Promise<RemoveEdgeResponse> => {
|
330
|
+
return this.client.queryContractSmart(this.contractAddress, {
|
331
|
+
remove_edge: {
|
332
|
+
edge_id: edgeId
|
333
|
+
}
|
334
|
+
});
|
335
|
+
};
|
336
|
+
createGraph = async ({
|
337
|
+
graph
|
338
|
+
}: {
|
339
|
+
graph: Edge[];
|
340
|
+
}): Promise<CreateGraphResponse> => {
|
341
|
+
return this.client.queryContractSmart(this.contractAddress, {
|
342
|
+
create_graph: {
|
343
|
+
graph
|
344
|
+
}
|
345
|
+
});
|
346
|
+
};
|
347
|
+
createGraphSimplified = async ({
|
348
|
+
graph,
|
349
|
+
graphId
|
350
|
+
}: {
|
351
|
+
graph: Addr[][];
|
352
|
+
graphId: number;
|
353
|
+
}): Promise<CreateGraphSimplifiedResponse> => {
|
354
|
+
return this.client.queryContractSmart(this.contractAddress, {
|
355
|
+
create_graph_simplified: {
|
356
|
+
graph,
|
357
|
+
graph_id: graphId
|
358
|
+
}
|
359
|
+
});
|
360
|
+
};
|
361
|
+
editGraphSimplified = async ({
|
362
|
+
graph,
|
363
|
+
graphId
|
364
|
+
}: {
|
365
|
+
graph: Addr[][];
|
366
|
+
graphId: number;
|
367
|
+
}): Promise<EditGraphSimplifiedResponse> => {
|
368
|
+
return this.client.queryContractSmart(this.contractAddress, {
|
369
|
+
edit_graph_simplified: {
|
370
|
+
graph,
|
371
|
+
graph_id: graphId
|
372
|
+
}
|
373
|
+
});
|
374
|
+
};
|
375
|
+
removeGraph = async ({
|
376
|
+
graphId
|
377
|
+
}: {
|
378
|
+
graphId: number;
|
379
|
+
}): Promise<RemoveGraphResponse> => {
|
380
|
+
return this.client.queryContractSmart(this.contractAddress, {
|
381
|
+
remove_graph: {
|
382
|
+
graph_id: graphId
|
383
|
+
}
|
384
|
+
});
|
385
|
+
};
|
386
|
+
updateEdges = async ({
|
387
|
+
edges
|
388
|
+
}: {
|
389
|
+
edges: number[][];
|
390
|
+
}): Promise<UpdateEdgesResponse> => {
|
391
|
+
return this.client.queryContractSmart(this.contractAddress, {
|
392
|
+
update_edges: {
|
393
|
+
edges
|
394
|
+
}
|
395
|
+
});
|
396
|
+
};
|
397
|
+
findSavings = async (): Promise<FindSavingsResponse> => {
|
398
|
+
return this.client.queryContractSmart(this.contractAddress, {
|
399
|
+
find_savings: {}
|
400
|
+
});
|
401
|
+
};
|
402
|
+
findSavingsInAGraph = async ({
|
403
|
+
graphId
|
404
|
+
}: {
|
405
|
+
graphId: number;
|
406
|
+
}): Promise<FindSavingsInAGraphResponse> => {
|
407
|
+
return this.client.queryContractSmart(this.contractAddress, {
|
408
|
+
find_savings_in_a_graph: {
|
409
|
+
graph_id: graphId
|
410
|
+
}
|
411
|
+
});
|
412
|
+
};
|
413
|
+
reset = async (): Promise<ResetResponse> => {
|
414
|
+
return this.client.queryContractSmart(this.contractAddress, {
|
415
|
+
reset: {}
|
416
|
+
});
|
417
|
+
};
|
418
|
+
saveNetworkToFile = async ({
|
419
|
+
filepath
|
420
|
+
}: {
|
421
|
+
filepath: string;
|
422
|
+
}): Promise<SaveNetworkToFileResponse> => {
|
423
|
+
return this.client.queryContractSmart(this.contractAddress, {
|
424
|
+
save_network_to_file: {
|
425
|
+
filepath
|
426
|
+
}
|
427
|
+
});
|
428
|
+
};
|
429
|
+
createGraphFromFile = async ({
|
430
|
+
filepath
|
431
|
+
}: {
|
432
|
+
filepath: string;
|
433
|
+
}): Promise<CreateGraphFromFileResponse> => {
|
434
|
+
return this.client.queryContractSmart(this.contractAddress, {
|
435
|
+
create_graph_from_file: {
|
436
|
+
filepath
|
437
|
+
}
|
438
|
+
});
|
439
|
+
};
|
440
|
+
applySetOffFromFile = async ({
|
441
|
+
filepath
|
442
|
+
}: {
|
443
|
+
filepath: string;
|
444
|
+
}): Promise<ApplySetOffFromFileResponse> => {
|
445
|
+
return this.client.queryContractSmart(this.contractAddress, {
|
446
|
+
apply_set_off_from_file: {
|
447
|
+
filepath
|
448
|
+
}
|
449
|
+
});
|
450
|
+
};
|
451
|
+
}"
|
452
|
+
`;
|
@@ -0,0 +1,101 @@
|
|
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.updateEdges = this.updateEdges.bind(this);
|
14
|
+
}
|
15
|
+
|
16
|
+
updateEdges = async ({
|
17
|
+
edges3,
|
18
|
+
edges2,
|
19
|
+
edges,
|
20
|
+
nested,
|
21
|
+
supernested
|
22
|
+
}: {
|
23
|
+
edges3?: number[][][];
|
24
|
+
edges2: number[][][];
|
25
|
+
edges: number[][];
|
26
|
+
nested: number[][][];
|
27
|
+
supernested: string[][][][][][];
|
28
|
+
}, fee: number | StdFee | \\"auto\\" = \\"auto\\", memo?: string, funds?: Coin[]): Promise<ExecuteResult> => {
|
29
|
+
return await this.client.execute(this.sender, this.contractAddress, {
|
30
|
+
update_edges: {
|
31
|
+
edges3,
|
32
|
+
edges2,
|
33
|
+
edges,
|
34
|
+
nested,
|
35
|
+
supernested
|
36
|
+
}
|
37
|
+
}, fee, memo, funds);
|
38
|
+
};
|
39
|
+
}"
|
40
|
+
`;
|
41
|
+
|
42
|
+
exports[`execute interfaces no extends 1`] = `
|
43
|
+
"export interface SG721Instance {
|
44
|
+
contractAddress: string;
|
45
|
+
sender: string;
|
46
|
+
updateEdges: ({
|
47
|
+
edges3,
|
48
|
+
edges2,
|
49
|
+
edges,
|
50
|
+
nested,
|
51
|
+
supernested
|
52
|
+
}: {
|
53
|
+
edges3?: number[][][];
|
54
|
+
edges2: number[][][];
|
55
|
+
edges: number[][];
|
56
|
+
nested: number[][][];
|
57
|
+
supernested: string[][][][][][];
|
58
|
+
}, fee?: number | StdFee | \\"auto\\", memo?: string, funds?: Coin[]) => Promise<ExecuteResult>;
|
59
|
+
}"
|
60
|
+
`;
|
61
|
+
|
62
|
+
exports[`execute_msg_for__empty 1`] = `"export type ExecuteMsg = ExecuteMsg;"`;
|
63
|
+
|
64
|
+
exports[`getPropertyType 1`] = `"number[][][]"`;
|
65
|
+
|
66
|
+
exports[`query classes 1`] = `
|
67
|
+
"export class SG721QueryClient implements SG721ReadOnlyInstance {
|
68
|
+
client: CosmWasmClient;
|
69
|
+
contractAddress: string;
|
70
|
+
|
71
|
+
constructor(client: CosmWasmClient, contractAddress: string) {
|
72
|
+
this.client = client;
|
73
|
+
this.contractAddress = contractAddress;
|
74
|
+
this.updateEdges = this.updateEdges.bind(this);
|
75
|
+
}
|
76
|
+
|
77
|
+
updateEdges = async ({
|
78
|
+
edges3,
|
79
|
+
edges2,
|
80
|
+
edges,
|
81
|
+
nested,
|
82
|
+
supernested
|
83
|
+
}: {
|
84
|
+
edges3?: number[][][];
|
85
|
+
edges2: number[][][];
|
86
|
+
edges: number[][];
|
87
|
+
nested: number[][][];
|
88
|
+
supernested: string[][][][][][];
|
89
|
+
}): Promise<UpdateEdgesResponse> => {
|
90
|
+
return this.client.queryContractSmart(this.contractAddress, {
|
91
|
+
update_edges: {
|
92
|
+
edges3,
|
93
|
+
edges2,
|
94
|
+
edges,
|
95
|
+
nested,
|
96
|
+
supernested
|
97
|
+
}
|
98
|
+
});
|
99
|
+
};
|
100
|
+
}"
|
101
|
+
`;
|
@@ -0,0 +1,141 @@
|
|
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.update = this.update.bind(this);
|
14
|
+
this.removeGroup = this.removeGroup.bind(this);
|
15
|
+
this.updateOwner = this.updateOwner.bind(this);
|
16
|
+
}
|
17
|
+
|
18
|
+
update = async ({
|
19
|
+
addressesToAdd,
|
20
|
+
addressesToRemove,
|
21
|
+
group
|
22
|
+
}: {
|
23
|
+
addressesToAdd?: string[];
|
24
|
+
addressesToRemove?: string[];
|
25
|
+
group: string;
|
26
|
+
}, fee: number | StdFee | \\"auto\\" = \\"auto\\", memo?: string, funds?: Coin[]): Promise<ExecuteResult> => {
|
27
|
+
return await this.client.execute(this.sender, this.contractAddress, {
|
28
|
+
update: {
|
29
|
+
addresses_to_add: addressesToAdd,
|
30
|
+
addresses_to_remove: addressesToRemove,
|
31
|
+
group
|
32
|
+
}
|
33
|
+
}, fee, memo, funds);
|
34
|
+
};
|
35
|
+
removeGroup = async ({
|
36
|
+
group
|
37
|
+
}: {
|
38
|
+
group: string;
|
39
|
+
}, fee: number | StdFee | \\"auto\\" = \\"auto\\", memo?: string, funds?: Coin[]): Promise<ExecuteResult> => {
|
40
|
+
return await this.client.execute(this.sender, this.contractAddress, {
|
41
|
+
remove_group: {
|
42
|
+
group
|
43
|
+
}
|
44
|
+
}, fee, memo, funds);
|
45
|
+
};
|
46
|
+
updateOwner = async ({
|
47
|
+
owner
|
48
|
+
}: {
|
49
|
+
owner: string;
|
50
|
+
}, fee: number | StdFee | \\"auto\\" = \\"auto\\", memo?: string, funds?: Coin[]): Promise<ExecuteResult> => {
|
51
|
+
return await this.client.execute(this.sender, this.contractAddress, {
|
52
|
+
update_owner: {
|
53
|
+
owner
|
54
|
+
}
|
55
|
+
}, fee, memo, funds);
|
56
|
+
};
|
57
|
+
}"
|
58
|
+
`;
|
59
|
+
|
60
|
+
exports[`execute interfaces no extends 1`] = `
|
61
|
+
"export interface SG721Instance {
|
62
|
+
contractAddress: string;
|
63
|
+
sender: string;
|
64
|
+
update: ({
|
65
|
+
addressesToAdd,
|
66
|
+
addressesToRemove,
|
67
|
+
group
|
68
|
+
}: {
|
69
|
+
addressesToAdd?: string[];
|
70
|
+
addressesToRemove?: string[];
|
71
|
+
group: string;
|
72
|
+
}, fee?: number | StdFee | \\"auto\\", memo?: string, funds?: Coin[]) => Promise<ExecuteResult>;
|
73
|
+
removeGroup: ({
|
74
|
+
group
|
75
|
+
}: {
|
76
|
+
group: string;
|
77
|
+
}, fee?: number | StdFee | \\"auto\\", memo?: string, funds?: Coin[]) => Promise<ExecuteResult>;
|
78
|
+
updateOwner: ({
|
79
|
+
owner
|
80
|
+
}: {
|
81
|
+
owner: string;
|
82
|
+
}, fee?: number | StdFee | \\"auto\\", memo?: string, funds?: Coin[]) => Promise<ExecuteResult>;
|
83
|
+
}"
|
84
|
+
`;
|
85
|
+
|
86
|
+
exports[`execute_msg 1`] = `"export type ExecuteMsg = ExecuteMsg;"`;
|
87
|
+
|
88
|
+
exports[`query classes 1`] = `
|
89
|
+
"export class SG721QueryClient implements SG721ReadOnlyInstance {
|
90
|
+
client: CosmWasmClient;
|
91
|
+
contractAddress: string;
|
92
|
+
|
93
|
+
constructor(client: CosmWasmClient, contractAddress: string) {
|
94
|
+
this.client = client;
|
95
|
+
this.contractAddress = contractAddress;
|
96
|
+
this.update = this.update.bind(this);
|
97
|
+
this.removeGroup = this.removeGroup.bind(this);
|
98
|
+
this.updateOwner = this.updateOwner.bind(this);
|
99
|
+
}
|
100
|
+
|
101
|
+
update = async ({
|
102
|
+
addressesToAdd,
|
103
|
+
addressesToRemove,
|
104
|
+
group
|
105
|
+
}: {
|
106
|
+
addressesToAdd?: string[];
|
107
|
+
addressesToRemove?: string[];
|
108
|
+
group: string;
|
109
|
+
}): Promise<UpdateResponse> => {
|
110
|
+
return this.client.queryContractSmart(this.contractAddress, {
|
111
|
+
update: {
|
112
|
+
addresses_to_add: addressesToAdd,
|
113
|
+
addresses_to_remove: addressesToRemove,
|
114
|
+
group
|
115
|
+
}
|
116
|
+
});
|
117
|
+
};
|
118
|
+
removeGroup = async ({
|
119
|
+
group
|
120
|
+
}: {
|
121
|
+
group: string;
|
122
|
+
}): Promise<RemoveGroupResponse> => {
|
123
|
+
return this.client.queryContractSmart(this.contractAddress, {
|
124
|
+
remove_group: {
|
125
|
+
group
|
126
|
+
}
|
127
|
+
});
|
128
|
+
};
|
129
|
+
updateOwner = async ({
|
130
|
+
owner
|
131
|
+
}: {
|
132
|
+
owner: string;
|
133
|
+
}): Promise<UpdateOwnerResponse> => {
|
134
|
+
return this.client.queryContractSmart(this.contractAddress, {
|
135
|
+
update_owner: {
|
136
|
+
owner
|
137
|
+
}
|
138
|
+
});
|
139
|
+
};
|
140
|
+
}"
|
141
|
+
`;
|