wasm-ast-types 0.26.4 → 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 +1 -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,984 +0,0 @@
|
|
1
|
-
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
2
|
-
|
3
|
-
exports[`execute class /issues/55/batch.json 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
|
-
}
|
14
|
-
|
15
|
-
}"
|
16
|
-
`;
|
17
|
-
|
18
|
-
exports[`execute class /issues/55/denom_response.json 1`] = `
|
19
|
-
"export class SG721Client implements SG721Instance {
|
20
|
-
client: SigningCosmWasmClient;
|
21
|
-
sender: string;
|
22
|
-
contractAddress: string;
|
23
|
-
|
24
|
-
constructor(client: SigningCosmWasmClient, sender: string, contractAddress: string) {
|
25
|
-
this.client = client;
|
26
|
-
this.sender = sender;
|
27
|
-
this.contractAddress = contractAddress;
|
28
|
-
}
|
29
|
-
|
30
|
-
}"
|
31
|
-
`;
|
32
|
-
|
33
|
-
exports[`execute class /issues/55/edge.json 1`] = `
|
34
|
-
"export class SG721Client implements SG721Instance {
|
35
|
-
client: SigningCosmWasmClient;
|
36
|
-
sender: string;
|
37
|
-
contractAddress: string;
|
38
|
-
|
39
|
-
constructor(client: SigningCosmWasmClient, sender: string, contractAddress: string) {
|
40
|
-
this.client = client;
|
41
|
-
this.sender = sender;
|
42
|
-
this.contractAddress = contractAddress;
|
43
|
-
}
|
44
|
-
|
45
|
-
}"
|
46
|
-
`;
|
47
|
-
|
48
|
-
exports[`execute class /issues/55/execute_msg.json 1`] = `
|
49
|
-
"export class SG721Client implements SG721Instance {
|
50
|
-
client: SigningCosmWasmClient;
|
51
|
-
sender: string;
|
52
|
-
contractAddress: string;
|
53
|
-
|
54
|
-
constructor(client: SigningCosmWasmClient, sender: string, contractAddress: string) {
|
55
|
-
this.client = client;
|
56
|
-
this.sender = sender;
|
57
|
-
this.contractAddress = contractAddress;
|
58
|
-
this.createEdge = this.createEdge.bind(this);
|
59
|
-
this.editEdge = this.editEdge.bind(this);
|
60
|
-
this.removeEdge = this.removeEdge.bind(this);
|
61
|
-
this.createGraph = this.createGraph.bind(this);
|
62
|
-
this.createGraphSimplified = this.createGraphSimplified.bind(this);
|
63
|
-
this.editGraphSimplified = this.editGraphSimplified.bind(this);
|
64
|
-
this.removeGraph = this.removeGraph.bind(this);
|
65
|
-
this.updateEdges = this.updateEdges.bind(this);
|
66
|
-
this.findSavings = this.findSavings.bind(this);
|
67
|
-
this.findSavingsInAGraph = this.findSavingsInAGraph.bind(this);
|
68
|
-
this.reset = this.reset.bind(this);
|
69
|
-
this.saveNetworkToFile = this.saveNetworkToFile.bind(this);
|
70
|
-
this.createGraphFromFile = this.createGraphFromFile.bind(this);
|
71
|
-
this.applySetOffFromFile = this.applySetOffFromFile.bind(this);
|
72
|
-
}
|
73
|
-
|
74
|
-
createEdge = async ({
|
75
|
-
amount,
|
76
|
-
creditor
|
77
|
-
}: {
|
78
|
-
amount: number;
|
79
|
-
creditor: Addr;
|
80
|
-
}, fee: number | StdFee | \\"auto\\" = \\"auto\\", memo?: string, _funds?: Coin[]): Promise<ExecuteResult> => {
|
81
|
-
return await this.client.execute(this.sender, this.contractAddress, {
|
82
|
-
create_edge: {
|
83
|
-
amount,
|
84
|
-
creditor
|
85
|
-
}
|
86
|
-
}, fee, memo, _funds);
|
87
|
-
};
|
88
|
-
editEdge = async ({
|
89
|
-
amount,
|
90
|
-
creditor,
|
91
|
-
edgeId
|
92
|
-
}: {
|
93
|
-
amount: number;
|
94
|
-
creditor: Addr;
|
95
|
-
edgeId: number;
|
96
|
-
}, fee: number | StdFee | \\"auto\\" = \\"auto\\", memo?: string, _funds?: Coin[]): Promise<ExecuteResult> => {
|
97
|
-
return await this.client.execute(this.sender, this.contractAddress, {
|
98
|
-
edit_edge: {
|
99
|
-
amount,
|
100
|
-
creditor,
|
101
|
-
edge_id: edgeId
|
102
|
-
}
|
103
|
-
}, fee, memo, _funds);
|
104
|
-
};
|
105
|
-
removeEdge = async ({
|
106
|
-
edgeId
|
107
|
-
}: {
|
108
|
-
edgeId: number;
|
109
|
-
}, fee: number | StdFee | \\"auto\\" = \\"auto\\", memo?: string, _funds?: Coin[]): Promise<ExecuteResult> => {
|
110
|
-
return await this.client.execute(this.sender, this.contractAddress, {
|
111
|
-
remove_edge: {
|
112
|
-
edge_id: edgeId
|
113
|
-
}
|
114
|
-
}, fee, memo, _funds);
|
115
|
-
};
|
116
|
-
createGraph = async ({
|
117
|
-
graph
|
118
|
-
}: {
|
119
|
-
graph: Edge[];
|
120
|
-
}, fee: number | StdFee | \\"auto\\" = \\"auto\\", memo?: string, _funds?: Coin[]): Promise<ExecuteResult> => {
|
121
|
-
return await this.client.execute(this.sender, this.contractAddress, {
|
122
|
-
create_graph: {
|
123
|
-
graph
|
124
|
-
}
|
125
|
-
}, fee, memo, _funds);
|
126
|
-
};
|
127
|
-
createGraphSimplified = async ({
|
128
|
-
graph,
|
129
|
-
graphId
|
130
|
-
}: {
|
131
|
-
graph: Addr[][];
|
132
|
-
graphId: number;
|
133
|
-
}, fee: number | StdFee | \\"auto\\" = \\"auto\\", memo?: string, _funds?: Coin[]): Promise<ExecuteResult> => {
|
134
|
-
return await this.client.execute(this.sender, this.contractAddress, {
|
135
|
-
create_graph_simplified: {
|
136
|
-
graph,
|
137
|
-
graph_id: graphId
|
138
|
-
}
|
139
|
-
}, fee, memo, _funds);
|
140
|
-
};
|
141
|
-
editGraphSimplified = async ({
|
142
|
-
graph,
|
143
|
-
graphId
|
144
|
-
}: {
|
145
|
-
graph: Addr[][];
|
146
|
-
graphId: number;
|
147
|
-
}, fee: number | StdFee | \\"auto\\" = \\"auto\\", memo?: string, _funds?: Coin[]): Promise<ExecuteResult> => {
|
148
|
-
return await this.client.execute(this.sender, this.contractAddress, {
|
149
|
-
edit_graph_simplified: {
|
150
|
-
graph,
|
151
|
-
graph_id: graphId
|
152
|
-
}
|
153
|
-
}, fee, memo, _funds);
|
154
|
-
};
|
155
|
-
removeGraph = async ({
|
156
|
-
graphId
|
157
|
-
}: {
|
158
|
-
graphId: number;
|
159
|
-
}, fee: number | StdFee | \\"auto\\" = \\"auto\\", memo?: string, _funds?: Coin[]): Promise<ExecuteResult> => {
|
160
|
-
return await this.client.execute(this.sender, this.contractAddress, {
|
161
|
-
remove_graph: {
|
162
|
-
graph_id: graphId
|
163
|
-
}
|
164
|
-
}, fee, memo, _funds);
|
165
|
-
};
|
166
|
-
updateEdges = async ({
|
167
|
-
edges
|
168
|
-
}: {
|
169
|
-
edges: number[][];
|
170
|
-
}, fee: number | StdFee | \\"auto\\" = \\"auto\\", memo?: string, _funds?: Coin[]): Promise<ExecuteResult> => {
|
171
|
-
return await this.client.execute(this.sender, this.contractAddress, {
|
172
|
-
update_edges: {
|
173
|
-
edges
|
174
|
-
}
|
175
|
-
}, fee, memo, _funds);
|
176
|
-
};
|
177
|
-
findSavings = async (fee: number | StdFee | \\"auto\\" = \\"auto\\", memo?: string, _funds?: Coin[]): Promise<ExecuteResult> => {
|
178
|
-
return await this.client.execute(this.sender, this.contractAddress, {
|
179
|
-
find_savings: {}
|
180
|
-
}, fee, memo, _funds);
|
181
|
-
};
|
182
|
-
findSavingsInAGraph = async ({
|
183
|
-
graphId
|
184
|
-
}: {
|
185
|
-
graphId: number;
|
186
|
-
}, fee: number | StdFee | \\"auto\\" = \\"auto\\", memo?: string, _funds?: Coin[]): Promise<ExecuteResult> => {
|
187
|
-
return await this.client.execute(this.sender, this.contractAddress, {
|
188
|
-
find_savings_in_a_graph: {
|
189
|
-
graph_id: graphId
|
190
|
-
}
|
191
|
-
}, fee, memo, _funds);
|
192
|
-
};
|
193
|
-
reset = async (fee: number | StdFee | \\"auto\\" = \\"auto\\", memo?: string, _funds?: Coin[]): Promise<ExecuteResult> => {
|
194
|
-
return await this.client.execute(this.sender, this.contractAddress, {
|
195
|
-
reset: {}
|
196
|
-
}, fee, memo, _funds);
|
197
|
-
};
|
198
|
-
saveNetworkToFile = async ({
|
199
|
-
filepath
|
200
|
-
}: {
|
201
|
-
filepath: string;
|
202
|
-
}, fee: number | StdFee | \\"auto\\" = \\"auto\\", memo?: string, _funds?: Coin[]): Promise<ExecuteResult> => {
|
203
|
-
return await this.client.execute(this.sender, this.contractAddress, {
|
204
|
-
save_network_to_file: {
|
205
|
-
filepath
|
206
|
-
}
|
207
|
-
}, fee, memo, _funds);
|
208
|
-
};
|
209
|
-
createGraphFromFile = async ({
|
210
|
-
filepath
|
211
|
-
}: {
|
212
|
-
filepath: string;
|
213
|
-
}, fee: number | StdFee | \\"auto\\" = \\"auto\\", memo?: string, _funds?: Coin[]): Promise<ExecuteResult> => {
|
214
|
-
return await this.client.execute(this.sender, this.contractAddress, {
|
215
|
-
create_graph_from_file: {
|
216
|
-
filepath
|
217
|
-
}
|
218
|
-
}, fee, memo, _funds);
|
219
|
-
};
|
220
|
-
applySetOffFromFile = async ({
|
221
|
-
filepath
|
222
|
-
}: {
|
223
|
-
filepath: string;
|
224
|
-
}, fee: number | StdFee | \\"auto\\" = \\"auto\\", memo?: string, _funds?: Coin[]): Promise<ExecuteResult> => {
|
225
|
-
return await this.client.execute(this.sender, this.contractAddress, {
|
226
|
-
apply_set_off_from_file: {
|
227
|
-
filepath
|
228
|
-
}
|
229
|
-
}, fee, memo, _funds);
|
230
|
-
};
|
231
|
-
}"
|
232
|
-
`;
|
233
|
-
|
234
|
-
exports[`execute class /issues/55/instantiate_msg.json 1`] = `
|
235
|
-
"export class SG721Client implements SG721Instance {
|
236
|
-
client: SigningCosmWasmClient;
|
237
|
-
sender: string;
|
238
|
-
contractAddress: string;
|
239
|
-
|
240
|
-
constructor(client: SigningCosmWasmClient, sender: string, contractAddress: string) {
|
241
|
-
this.client = client;
|
242
|
-
this.sender = sender;
|
243
|
-
this.contractAddress = contractAddress;
|
244
|
-
}
|
245
|
-
|
246
|
-
}"
|
247
|
-
`;
|
248
|
-
|
249
|
-
exports[`execute class /issues/55/network.json 1`] = `
|
250
|
-
"export class SG721Client implements SG721Instance {
|
251
|
-
client: SigningCosmWasmClient;
|
252
|
-
sender: string;
|
253
|
-
contractAddress: string;
|
254
|
-
|
255
|
-
constructor(client: SigningCosmWasmClient, sender: string, contractAddress: string) {
|
256
|
-
this.client = client;
|
257
|
-
this.sender = sender;
|
258
|
-
this.contractAddress = contractAddress;
|
259
|
-
}
|
260
|
-
|
261
|
-
}"
|
262
|
-
`;
|
263
|
-
|
264
|
-
exports[`execute class /issues/55/query_msg.json 1`] = `
|
265
|
-
"export class SG721Client implements SG721Instance {
|
266
|
-
client: SigningCosmWasmClient;
|
267
|
-
sender: string;
|
268
|
-
contractAddress: string;
|
269
|
-
|
270
|
-
constructor(client: SigningCosmWasmClient, sender: string, contractAddress: string) {
|
271
|
-
this.client = client;
|
272
|
-
this.sender = sender;
|
273
|
-
this.contractAddress = contractAddress;
|
274
|
-
this.getDenom = this.getDenom.bind(this);
|
275
|
-
this.getOwner = this.getOwner.bind(this);
|
276
|
-
this.allEdges = this.allEdges.bind(this);
|
277
|
-
this.oneEdge = this.oneEdge.bind(this);
|
278
|
-
this.oneBatch = this.oneBatch.bind(this);
|
279
|
-
this.oneGraph = this.oneGraph.bind(this);
|
280
|
-
this.getEdgesByAddress = this.getEdgesByAddress.bind(this);
|
281
|
-
this.getEdgesAsCounterparty = this.getEdgesAsCounterparty.bind(this);
|
282
|
-
this.getTotalDebtPerAddress = this.getTotalDebtPerAddress.bind(this);
|
283
|
-
this.getTotalCreditPerAddress = this.getTotalCreditPerAddress.bind(this);
|
284
|
-
this.getTotalDebtByGraph = this.getTotalDebtByGraph.bind(this);
|
285
|
-
this.getTotalDebt = this.getTotalDebt.bind(this);
|
286
|
-
}
|
287
|
-
|
288
|
-
getDenom = async (fee: number | StdFee | \\"auto\\" = \\"auto\\", memo?: string, _funds?: Coin[]): Promise<ExecuteResult> => {
|
289
|
-
return await this.client.execute(this.sender, this.contractAddress, {
|
290
|
-
get_denom: {}
|
291
|
-
}, fee, memo, _funds);
|
292
|
-
};
|
293
|
-
getOwner = async (fee: number | StdFee | \\"auto\\" = \\"auto\\", memo?: string, _funds?: Coin[]): Promise<ExecuteResult> => {
|
294
|
-
return await this.client.execute(this.sender, this.contractAddress, {
|
295
|
-
get_owner: {}
|
296
|
-
}, fee, memo, _funds);
|
297
|
-
};
|
298
|
-
allEdges = async (fee: number | StdFee | \\"auto\\" = \\"auto\\", memo?: string, _funds?: Coin[]): Promise<ExecuteResult> => {
|
299
|
-
return await this.client.execute(this.sender, this.contractAddress, {
|
300
|
-
all_edges: {}
|
301
|
-
}, fee, memo, _funds);
|
302
|
-
};
|
303
|
-
oneEdge = async ({
|
304
|
-
edgeId
|
305
|
-
}: {
|
306
|
-
edgeId: number;
|
307
|
-
}, fee: number | StdFee | \\"auto\\" = \\"auto\\", memo?: string, _funds?: Coin[]): Promise<ExecuteResult> => {
|
308
|
-
return await this.client.execute(this.sender, this.contractAddress, {
|
309
|
-
one_edge: {
|
310
|
-
edge_id: edgeId
|
311
|
-
}
|
312
|
-
}, fee, memo, _funds);
|
313
|
-
};
|
314
|
-
oneBatch = async ({
|
315
|
-
batchId
|
316
|
-
}: {
|
317
|
-
batchId: number;
|
318
|
-
}, fee: number | StdFee | \\"auto\\" = \\"auto\\", memo?: string, _funds?: Coin[]): Promise<ExecuteResult> => {
|
319
|
-
return await this.client.execute(this.sender, this.contractAddress, {
|
320
|
-
one_batch: {
|
321
|
-
batch_id: batchId
|
322
|
-
}
|
323
|
-
}, fee, memo, _funds);
|
324
|
-
};
|
325
|
-
oneGraph = async ({
|
326
|
-
graphId
|
327
|
-
}: {
|
328
|
-
graphId: number;
|
329
|
-
}, fee: number | StdFee | \\"auto\\" = \\"auto\\", memo?: string, _funds?: Coin[]): Promise<ExecuteResult> => {
|
330
|
-
return await this.client.execute(this.sender, this.contractAddress, {
|
331
|
-
one_graph: {
|
332
|
-
graph_id: graphId
|
333
|
-
}
|
334
|
-
}, fee, memo, _funds);
|
335
|
-
};
|
336
|
-
getEdgesByAddress = async ({
|
337
|
-
address
|
338
|
-
}: {
|
339
|
-
address: Addr;
|
340
|
-
}, fee: number | StdFee | \\"auto\\" = \\"auto\\", memo?: string, _funds?: Coin[]): Promise<ExecuteResult> => {
|
341
|
-
return await this.client.execute(this.sender, this.contractAddress, {
|
342
|
-
get_edges_by_address: {
|
343
|
-
address
|
344
|
-
}
|
345
|
-
}, fee, memo, _funds);
|
346
|
-
};
|
347
|
-
getEdgesAsCounterparty = async ({
|
348
|
-
address
|
349
|
-
}: {
|
350
|
-
address: Addr;
|
351
|
-
}, fee: number | StdFee | \\"auto\\" = \\"auto\\", memo?: string, _funds?: Coin[]): Promise<ExecuteResult> => {
|
352
|
-
return await this.client.execute(this.sender, this.contractAddress, {
|
353
|
-
get_edges_as_counterparty: {
|
354
|
-
address
|
355
|
-
}
|
356
|
-
}, fee, memo, _funds);
|
357
|
-
};
|
358
|
-
getTotalDebtPerAddress = async ({
|
359
|
-
address
|
360
|
-
}: {
|
361
|
-
address: Addr;
|
362
|
-
}, fee: number | StdFee | \\"auto\\" = \\"auto\\", memo?: string, _funds?: Coin[]): Promise<ExecuteResult> => {
|
363
|
-
return await this.client.execute(this.sender, this.contractAddress, {
|
364
|
-
get_total_debt_per_address: {
|
365
|
-
address
|
366
|
-
}
|
367
|
-
}, fee, memo, _funds);
|
368
|
-
};
|
369
|
-
getTotalCreditPerAddress = async ({
|
370
|
-
address
|
371
|
-
}: {
|
372
|
-
address: Addr;
|
373
|
-
}, fee: number | StdFee | \\"auto\\" = \\"auto\\", memo?: string, _funds?: Coin[]): Promise<ExecuteResult> => {
|
374
|
-
return await this.client.execute(this.sender, this.contractAddress, {
|
375
|
-
get_total_credit_per_address: {
|
376
|
-
address
|
377
|
-
}
|
378
|
-
}, fee, memo, _funds);
|
379
|
-
};
|
380
|
-
getTotalDebtByGraph = async ({
|
381
|
-
graphId
|
382
|
-
}: {
|
383
|
-
graphId: number;
|
384
|
-
}, fee: number | StdFee | \\"auto\\" = \\"auto\\", memo?: string, _funds?: Coin[]): Promise<ExecuteResult> => {
|
385
|
-
return await this.client.execute(this.sender, this.contractAddress, {
|
386
|
-
get_total_debt_by_graph: {
|
387
|
-
graph_id: graphId
|
388
|
-
}
|
389
|
-
}, fee, memo, _funds);
|
390
|
-
};
|
391
|
-
getTotalDebt = async (fee: number | StdFee | \\"auto\\" = \\"auto\\", memo?: string, _funds?: Coin[]): Promise<ExecuteResult> => {
|
392
|
-
return await this.client.execute(this.sender, this.contractAddress, {
|
393
|
-
get_total_debt: {}
|
394
|
-
}, fee, memo, _funds);
|
395
|
-
};
|
396
|
-
}"
|
397
|
-
`;
|
398
|
-
|
399
|
-
exports[`execute interface /issues/55/batch.json 1`] = `
|
400
|
-
"export interface SG721Instance {
|
401
|
-
contractAddress: string;
|
402
|
-
sender: string;
|
403
|
-
}"
|
404
|
-
`;
|
405
|
-
|
406
|
-
exports[`execute interface /issues/55/denom_response.json 1`] = `
|
407
|
-
"export interface SG721Instance {
|
408
|
-
contractAddress: string;
|
409
|
-
sender: string;
|
410
|
-
}"
|
411
|
-
`;
|
412
|
-
|
413
|
-
exports[`execute interface /issues/55/edge.json 1`] = `
|
414
|
-
"export interface SG721Instance {
|
415
|
-
contractAddress: string;
|
416
|
-
sender: string;
|
417
|
-
}"
|
418
|
-
`;
|
419
|
-
|
420
|
-
exports[`execute interface /issues/55/execute_msg.json 1`] = `
|
421
|
-
"export interface SG721Instance {
|
422
|
-
contractAddress: string;
|
423
|
-
sender: string;
|
424
|
-
createEdge: ({
|
425
|
-
amount,
|
426
|
-
creditor
|
427
|
-
}: {
|
428
|
-
amount: number;
|
429
|
-
creditor: Addr;
|
430
|
-
}, fee?: number | StdFee | \\"auto\\", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
|
431
|
-
editEdge: ({
|
432
|
-
amount,
|
433
|
-
creditor,
|
434
|
-
edgeId
|
435
|
-
}: {
|
436
|
-
amount: number;
|
437
|
-
creditor: Addr;
|
438
|
-
edgeId: number;
|
439
|
-
}, fee?: number | StdFee | \\"auto\\", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
|
440
|
-
removeEdge: ({
|
441
|
-
edgeId
|
442
|
-
}: {
|
443
|
-
edgeId: number;
|
444
|
-
}, fee?: number | StdFee | \\"auto\\", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
|
445
|
-
createGraph: ({
|
446
|
-
graph
|
447
|
-
}: {
|
448
|
-
graph: Edge[];
|
449
|
-
}, fee?: number | StdFee | \\"auto\\", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
|
450
|
-
createGraphSimplified: ({
|
451
|
-
graph,
|
452
|
-
graphId
|
453
|
-
}: {
|
454
|
-
graph: Addr[][];
|
455
|
-
graphId: number;
|
456
|
-
}, fee?: number | StdFee | \\"auto\\", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
|
457
|
-
editGraphSimplified: ({
|
458
|
-
graph,
|
459
|
-
graphId
|
460
|
-
}: {
|
461
|
-
graph: Addr[][];
|
462
|
-
graphId: number;
|
463
|
-
}, fee?: number | StdFee | \\"auto\\", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
|
464
|
-
removeGraph: ({
|
465
|
-
graphId
|
466
|
-
}: {
|
467
|
-
graphId: number;
|
468
|
-
}, fee?: number | StdFee | \\"auto\\", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
|
469
|
-
updateEdges: ({
|
470
|
-
edges
|
471
|
-
}: {
|
472
|
-
edges: number[][];
|
473
|
-
}, fee?: number | StdFee | \\"auto\\", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
|
474
|
-
findSavings: (fee?: number | StdFee | \\"auto\\", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
|
475
|
-
findSavingsInAGraph: ({
|
476
|
-
graphId
|
477
|
-
}: {
|
478
|
-
graphId: number;
|
479
|
-
}, fee?: number | StdFee | \\"auto\\", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
|
480
|
-
reset: (fee?: number | StdFee | \\"auto\\", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
|
481
|
-
saveNetworkToFile: ({
|
482
|
-
filepath
|
483
|
-
}: {
|
484
|
-
filepath: string;
|
485
|
-
}, fee?: number | StdFee | \\"auto\\", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
|
486
|
-
createGraphFromFile: ({
|
487
|
-
filepath
|
488
|
-
}: {
|
489
|
-
filepath: string;
|
490
|
-
}, fee?: number | StdFee | \\"auto\\", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
|
491
|
-
applySetOffFromFile: ({
|
492
|
-
filepath
|
493
|
-
}: {
|
494
|
-
filepath: string;
|
495
|
-
}, fee?: number | StdFee | \\"auto\\", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
|
496
|
-
}"
|
497
|
-
`;
|
498
|
-
|
499
|
-
exports[`execute interface /issues/55/instantiate_msg.json 1`] = `
|
500
|
-
"export interface SG721Instance {
|
501
|
-
contractAddress: string;
|
502
|
-
sender: string;
|
503
|
-
}"
|
504
|
-
`;
|
505
|
-
|
506
|
-
exports[`execute interface /issues/55/network.json 1`] = `
|
507
|
-
"export interface SG721Instance {
|
508
|
-
contractAddress: string;
|
509
|
-
sender: string;
|
510
|
-
}"
|
511
|
-
`;
|
512
|
-
|
513
|
-
exports[`execute interface /issues/55/query_msg.json 1`] = `
|
514
|
-
"export interface SG721Instance {
|
515
|
-
contractAddress: string;
|
516
|
-
sender: string;
|
517
|
-
getDenom: (fee?: number | StdFee | \\"auto\\", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
|
518
|
-
getOwner: (fee?: number | StdFee | \\"auto\\", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
|
519
|
-
allEdges: (fee?: number | StdFee | \\"auto\\", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
|
520
|
-
oneEdge: ({
|
521
|
-
edgeId
|
522
|
-
}: {
|
523
|
-
edgeId: number;
|
524
|
-
}, fee?: number | StdFee | \\"auto\\", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
|
525
|
-
oneBatch: ({
|
526
|
-
batchId
|
527
|
-
}: {
|
528
|
-
batchId: number;
|
529
|
-
}, fee?: number | StdFee | \\"auto\\", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
|
530
|
-
oneGraph: ({
|
531
|
-
graphId
|
532
|
-
}: {
|
533
|
-
graphId: number;
|
534
|
-
}, fee?: number | StdFee | \\"auto\\", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
|
535
|
-
getEdgesByAddress: ({
|
536
|
-
address
|
537
|
-
}: {
|
538
|
-
address: Addr;
|
539
|
-
}, fee?: number | StdFee | \\"auto\\", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
|
540
|
-
getEdgesAsCounterparty: ({
|
541
|
-
address
|
542
|
-
}: {
|
543
|
-
address: Addr;
|
544
|
-
}, fee?: number | StdFee | \\"auto\\", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
|
545
|
-
getTotalDebtPerAddress: ({
|
546
|
-
address
|
547
|
-
}: {
|
548
|
-
address: Addr;
|
549
|
-
}, fee?: number | StdFee | \\"auto\\", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
|
550
|
-
getTotalCreditPerAddress: ({
|
551
|
-
address
|
552
|
-
}: {
|
553
|
-
address: Addr;
|
554
|
-
}, fee?: number | StdFee | \\"auto\\", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
|
555
|
-
getTotalDebtByGraph: ({
|
556
|
-
graphId
|
557
|
-
}: {
|
558
|
-
graphId: number;
|
559
|
-
}, fee?: number | StdFee | \\"auto\\", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
|
560
|
-
getTotalDebt: (fee?: number | StdFee | \\"auto\\", memo?: string, _funds?: Coin[]) => Promise<ExecuteResult>;
|
561
|
-
}"
|
562
|
-
`;
|
563
|
-
|
564
|
-
exports[`execute_msg_for__empty /issues/55/batch.json 1`] = `
|
565
|
-
"export interface Batch {
|
566
|
-
batchId: number;
|
567
|
-
setoffs: number[][];
|
568
|
-
}"
|
569
|
-
`;
|
570
|
-
|
571
|
-
exports[`execute_msg_for__empty /issues/55/denom_response.json 1`] = `
|
572
|
-
"export interface DenomResponse {
|
573
|
-
denom: string;
|
574
|
-
}"
|
575
|
-
`;
|
576
|
-
|
577
|
-
exports[`execute_msg_for__empty /issues/55/edge.json 1`] = `
|
578
|
-
"export interface Edge {
|
579
|
-
amount: number;
|
580
|
-
creditor: Addr;
|
581
|
-
debtor: Addr;
|
582
|
-
edgeId: number;
|
583
|
-
graphId?: number;
|
584
|
-
}"
|
585
|
-
`;
|
586
|
-
|
587
|
-
exports[`execute_msg_for__empty /issues/55/execute_msg.json 1`] = `"export type ExecuteMsg = ExecuteMsg;"`;
|
588
|
-
|
589
|
-
exports[`execute_msg_for__empty /issues/55/instantiate_msg.json 1`] = `
|
590
|
-
"export interface InstantiateMsg {
|
591
|
-
denom: string;
|
592
|
-
}"
|
593
|
-
`;
|
594
|
-
|
595
|
-
exports[`execute_msg_for__empty /issues/55/network.json 1`] = `
|
596
|
-
"export interface Network {
|
597
|
-
denom: string;
|
598
|
-
owner: Addr;
|
599
|
-
}"
|
600
|
-
`;
|
601
|
-
|
602
|
-
exports[`execute_msg_for__empty /issues/55/query_msg.json 1`] = `"export type QueryMsg = QueryMsg;"`;
|
603
|
-
|
604
|
-
exports[`query classes /issues/55/batch.json 1`] = `
|
605
|
-
"export class SG721QueryClient implements SG721ReadOnlyInstance {
|
606
|
-
client: CosmWasmClient;
|
607
|
-
contractAddress: string;
|
608
|
-
|
609
|
-
constructor(client: CosmWasmClient, contractAddress: string) {
|
610
|
-
this.client = client;
|
611
|
-
this.contractAddress = contractAddress;
|
612
|
-
}
|
613
|
-
|
614
|
-
}"
|
615
|
-
`;
|
616
|
-
|
617
|
-
exports[`query classes /issues/55/denom_response.json 1`] = `
|
618
|
-
"export class SG721QueryClient implements SG721ReadOnlyInstance {
|
619
|
-
client: CosmWasmClient;
|
620
|
-
contractAddress: string;
|
621
|
-
|
622
|
-
constructor(client: CosmWasmClient, contractAddress: string) {
|
623
|
-
this.client = client;
|
624
|
-
this.contractAddress = contractAddress;
|
625
|
-
}
|
626
|
-
|
627
|
-
}"
|
628
|
-
`;
|
629
|
-
|
630
|
-
exports[`query classes /issues/55/edge.json 1`] = `
|
631
|
-
"export class SG721QueryClient implements SG721ReadOnlyInstance {
|
632
|
-
client: CosmWasmClient;
|
633
|
-
contractAddress: string;
|
634
|
-
|
635
|
-
constructor(client: CosmWasmClient, contractAddress: string) {
|
636
|
-
this.client = client;
|
637
|
-
this.contractAddress = contractAddress;
|
638
|
-
}
|
639
|
-
|
640
|
-
}"
|
641
|
-
`;
|
642
|
-
|
643
|
-
exports[`query classes /issues/55/execute_msg.json 1`] = `
|
644
|
-
"export class SG721QueryClient implements SG721ReadOnlyInstance {
|
645
|
-
client: CosmWasmClient;
|
646
|
-
contractAddress: string;
|
647
|
-
|
648
|
-
constructor(client: CosmWasmClient, contractAddress: string) {
|
649
|
-
this.client = client;
|
650
|
-
this.contractAddress = contractAddress;
|
651
|
-
this.createEdge = this.createEdge.bind(this);
|
652
|
-
this.editEdge = this.editEdge.bind(this);
|
653
|
-
this.removeEdge = this.removeEdge.bind(this);
|
654
|
-
this.createGraph = this.createGraph.bind(this);
|
655
|
-
this.createGraphSimplified = this.createGraphSimplified.bind(this);
|
656
|
-
this.editGraphSimplified = this.editGraphSimplified.bind(this);
|
657
|
-
this.removeGraph = this.removeGraph.bind(this);
|
658
|
-
this.updateEdges = this.updateEdges.bind(this);
|
659
|
-
this.findSavings = this.findSavings.bind(this);
|
660
|
-
this.findSavingsInAGraph = this.findSavingsInAGraph.bind(this);
|
661
|
-
this.reset = this.reset.bind(this);
|
662
|
-
this.saveNetworkToFile = this.saveNetworkToFile.bind(this);
|
663
|
-
this.createGraphFromFile = this.createGraphFromFile.bind(this);
|
664
|
-
this.applySetOffFromFile = this.applySetOffFromFile.bind(this);
|
665
|
-
}
|
666
|
-
|
667
|
-
createEdge = async ({
|
668
|
-
amount,
|
669
|
-
creditor
|
670
|
-
}: {
|
671
|
-
amount: number;
|
672
|
-
creditor: Addr;
|
673
|
-
}): Promise<CreateEdgeResponse> => {
|
674
|
-
return this.client.queryContractSmart(this.contractAddress, {
|
675
|
-
create_edge: {
|
676
|
-
amount,
|
677
|
-
creditor
|
678
|
-
}
|
679
|
-
});
|
680
|
-
};
|
681
|
-
editEdge = async ({
|
682
|
-
amount,
|
683
|
-
creditor,
|
684
|
-
edgeId
|
685
|
-
}: {
|
686
|
-
amount: number;
|
687
|
-
creditor: Addr;
|
688
|
-
edgeId: number;
|
689
|
-
}): Promise<EditEdgeResponse> => {
|
690
|
-
return this.client.queryContractSmart(this.contractAddress, {
|
691
|
-
edit_edge: {
|
692
|
-
amount,
|
693
|
-
creditor,
|
694
|
-
edge_id: edgeId
|
695
|
-
}
|
696
|
-
});
|
697
|
-
};
|
698
|
-
removeEdge = async ({
|
699
|
-
edgeId
|
700
|
-
}: {
|
701
|
-
edgeId: number;
|
702
|
-
}): Promise<RemoveEdgeResponse> => {
|
703
|
-
return this.client.queryContractSmart(this.contractAddress, {
|
704
|
-
remove_edge: {
|
705
|
-
edge_id: edgeId
|
706
|
-
}
|
707
|
-
});
|
708
|
-
};
|
709
|
-
createGraph = async ({
|
710
|
-
graph
|
711
|
-
}: {
|
712
|
-
graph: Edge[];
|
713
|
-
}): Promise<CreateGraphResponse> => {
|
714
|
-
return this.client.queryContractSmart(this.contractAddress, {
|
715
|
-
create_graph: {
|
716
|
-
graph
|
717
|
-
}
|
718
|
-
});
|
719
|
-
};
|
720
|
-
createGraphSimplified = async ({
|
721
|
-
graph,
|
722
|
-
graphId
|
723
|
-
}: {
|
724
|
-
graph: Addr[][];
|
725
|
-
graphId: number;
|
726
|
-
}): Promise<CreateGraphSimplifiedResponse> => {
|
727
|
-
return this.client.queryContractSmart(this.contractAddress, {
|
728
|
-
create_graph_simplified: {
|
729
|
-
graph,
|
730
|
-
graph_id: graphId
|
731
|
-
}
|
732
|
-
});
|
733
|
-
};
|
734
|
-
editGraphSimplified = async ({
|
735
|
-
graph,
|
736
|
-
graphId
|
737
|
-
}: {
|
738
|
-
graph: Addr[][];
|
739
|
-
graphId: number;
|
740
|
-
}): Promise<EditGraphSimplifiedResponse> => {
|
741
|
-
return this.client.queryContractSmart(this.contractAddress, {
|
742
|
-
edit_graph_simplified: {
|
743
|
-
graph,
|
744
|
-
graph_id: graphId
|
745
|
-
}
|
746
|
-
});
|
747
|
-
};
|
748
|
-
removeGraph = async ({
|
749
|
-
graphId
|
750
|
-
}: {
|
751
|
-
graphId: number;
|
752
|
-
}): Promise<RemoveGraphResponse> => {
|
753
|
-
return this.client.queryContractSmart(this.contractAddress, {
|
754
|
-
remove_graph: {
|
755
|
-
graph_id: graphId
|
756
|
-
}
|
757
|
-
});
|
758
|
-
};
|
759
|
-
updateEdges = async ({
|
760
|
-
edges
|
761
|
-
}: {
|
762
|
-
edges: number[][];
|
763
|
-
}): Promise<UpdateEdgesResponse> => {
|
764
|
-
return this.client.queryContractSmart(this.contractAddress, {
|
765
|
-
update_edges: {
|
766
|
-
edges
|
767
|
-
}
|
768
|
-
});
|
769
|
-
};
|
770
|
-
findSavings = async (): Promise<FindSavingsResponse> => {
|
771
|
-
return this.client.queryContractSmart(this.contractAddress, {
|
772
|
-
find_savings: {}
|
773
|
-
});
|
774
|
-
};
|
775
|
-
findSavingsInAGraph = async ({
|
776
|
-
graphId
|
777
|
-
}: {
|
778
|
-
graphId: number;
|
779
|
-
}): Promise<FindSavingsInAGraphResponse> => {
|
780
|
-
return this.client.queryContractSmart(this.contractAddress, {
|
781
|
-
find_savings_in_a_graph: {
|
782
|
-
graph_id: graphId
|
783
|
-
}
|
784
|
-
});
|
785
|
-
};
|
786
|
-
reset = async (): Promise<ResetResponse> => {
|
787
|
-
return this.client.queryContractSmart(this.contractAddress, {
|
788
|
-
reset: {}
|
789
|
-
});
|
790
|
-
};
|
791
|
-
saveNetworkToFile = async ({
|
792
|
-
filepath
|
793
|
-
}: {
|
794
|
-
filepath: string;
|
795
|
-
}): Promise<SaveNetworkToFileResponse> => {
|
796
|
-
return this.client.queryContractSmart(this.contractAddress, {
|
797
|
-
save_network_to_file: {
|
798
|
-
filepath
|
799
|
-
}
|
800
|
-
});
|
801
|
-
};
|
802
|
-
createGraphFromFile = async ({
|
803
|
-
filepath
|
804
|
-
}: {
|
805
|
-
filepath: string;
|
806
|
-
}): Promise<CreateGraphFromFileResponse> => {
|
807
|
-
return this.client.queryContractSmart(this.contractAddress, {
|
808
|
-
create_graph_from_file: {
|
809
|
-
filepath
|
810
|
-
}
|
811
|
-
});
|
812
|
-
};
|
813
|
-
applySetOffFromFile = async ({
|
814
|
-
filepath
|
815
|
-
}: {
|
816
|
-
filepath: string;
|
817
|
-
}): Promise<ApplySetOffFromFileResponse> => {
|
818
|
-
return this.client.queryContractSmart(this.contractAddress, {
|
819
|
-
apply_set_off_from_file: {
|
820
|
-
filepath
|
821
|
-
}
|
822
|
-
});
|
823
|
-
};
|
824
|
-
}"
|
825
|
-
`;
|
826
|
-
|
827
|
-
exports[`query classes /issues/55/instantiate_msg.json 1`] = `
|
828
|
-
"export class SG721QueryClient implements SG721ReadOnlyInstance {
|
829
|
-
client: CosmWasmClient;
|
830
|
-
contractAddress: string;
|
831
|
-
|
832
|
-
constructor(client: CosmWasmClient, contractAddress: string) {
|
833
|
-
this.client = client;
|
834
|
-
this.contractAddress = contractAddress;
|
835
|
-
}
|
836
|
-
|
837
|
-
}"
|
838
|
-
`;
|
839
|
-
|
840
|
-
exports[`query classes /issues/55/network.json 1`] = `
|
841
|
-
"export class SG721QueryClient implements SG721ReadOnlyInstance {
|
842
|
-
client: CosmWasmClient;
|
843
|
-
contractAddress: string;
|
844
|
-
|
845
|
-
constructor(client: CosmWasmClient, contractAddress: string) {
|
846
|
-
this.client = client;
|
847
|
-
this.contractAddress = contractAddress;
|
848
|
-
}
|
849
|
-
|
850
|
-
}"
|
851
|
-
`;
|
852
|
-
|
853
|
-
exports[`query classes /issues/55/query_msg.json 1`] = `
|
854
|
-
"export class SG721QueryClient implements SG721ReadOnlyInstance {
|
855
|
-
client: CosmWasmClient;
|
856
|
-
contractAddress: string;
|
857
|
-
|
858
|
-
constructor(client: CosmWasmClient, contractAddress: string) {
|
859
|
-
this.client = client;
|
860
|
-
this.contractAddress = contractAddress;
|
861
|
-
this.getDenom = this.getDenom.bind(this);
|
862
|
-
this.getOwner = this.getOwner.bind(this);
|
863
|
-
this.allEdges = this.allEdges.bind(this);
|
864
|
-
this.oneEdge = this.oneEdge.bind(this);
|
865
|
-
this.oneBatch = this.oneBatch.bind(this);
|
866
|
-
this.oneGraph = this.oneGraph.bind(this);
|
867
|
-
this.getEdgesByAddress = this.getEdgesByAddress.bind(this);
|
868
|
-
this.getEdgesAsCounterparty = this.getEdgesAsCounterparty.bind(this);
|
869
|
-
this.getTotalDebtPerAddress = this.getTotalDebtPerAddress.bind(this);
|
870
|
-
this.getTotalCreditPerAddress = this.getTotalCreditPerAddress.bind(this);
|
871
|
-
this.getTotalDebtByGraph = this.getTotalDebtByGraph.bind(this);
|
872
|
-
this.getTotalDebt = this.getTotalDebt.bind(this);
|
873
|
-
}
|
874
|
-
|
875
|
-
getDenom = async (): Promise<GetDenomResponse> => {
|
876
|
-
return this.client.queryContractSmart(this.contractAddress, {
|
877
|
-
get_denom: {}
|
878
|
-
});
|
879
|
-
};
|
880
|
-
getOwner = async (): Promise<GetOwnerResponse> => {
|
881
|
-
return this.client.queryContractSmart(this.contractAddress, {
|
882
|
-
get_owner: {}
|
883
|
-
});
|
884
|
-
};
|
885
|
-
allEdges = async (): Promise<AllEdgesResponse> => {
|
886
|
-
return this.client.queryContractSmart(this.contractAddress, {
|
887
|
-
all_edges: {}
|
888
|
-
});
|
889
|
-
};
|
890
|
-
oneEdge = async ({
|
891
|
-
edgeId
|
892
|
-
}: {
|
893
|
-
edgeId: number;
|
894
|
-
}): Promise<OneEdgeResponse> => {
|
895
|
-
return this.client.queryContractSmart(this.contractAddress, {
|
896
|
-
one_edge: {
|
897
|
-
edge_id: edgeId
|
898
|
-
}
|
899
|
-
});
|
900
|
-
};
|
901
|
-
oneBatch = async ({
|
902
|
-
batchId
|
903
|
-
}: {
|
904
|
-
batchId: number;
|
905
|
-
}): Promise<OneBatchResponse> => {
|
906
|
-
return this.client.queryContractSmart(this.contractAddress, {
|
907
|
-
one_batch: {
|
908
|
-
batch_id: batchId
|
909
|
-
}
|
910
|
-
});
|
911
|
-
};
|
912
|
-
oneGraph = async ({
|
913
|
-
graphId
|
914
|
-
}: {
|
915
|
-
graphId: number;
|
916
|
-
}): Promise<OneGraphResponse> => {
|
917
|
-
return this.client.queryContractSmart(this.contractAddress, {
|
918
|
-
one_graph: {
|
919
|
-
graph_id: graphId
|
920
|
-
}
|
921
|
-
});
|
922
|
-
};
|
923
|
-
getEdgesByAddress = async ({
|
924
|
-
address
|
925
|
-
}: {
|
926
|
-
address: Addr;
|
927
|
-
}): Promise<GetEdgesByAddressResponse> => {
|
928
|
-
return this.client.queryContractSmart(this.contractAddress, {
|
929
|
-
get_edges_by_address: {
|
930
|
-
address
|
931
|
-
}
|
932
|
-
});
|
933
|
-
};
|
934
|
-
getEdgesAsCounterparty = async ({
|
935
|
-
address
|
936
|
-
}: {
|
937
|
-
address: Addr;
|
938
|
-
}): Promise<GetEdgesAsCounterpartyResponse> => {
|
939
|
-
return this.client.queryContractSmart(this.contractAddress, {
|
940
|
-
get_edges_as_counterparty: {
|
941
|
-
address
|
942
|
-
}
|
943
|
-
});
|
944
|
-
};
|
945
|
-
getTotalDebtPerAddress = async ({
|
946
|
-
address
|
947
|
-
}: {
|
948
|
-
address: Addr;
|
949
|
-
}): Promise<GetTotalDebtPerAddressResponse> => {
|
950
|
-
return this.client.queryContractSmart(this.contractAddress, {
|
951
|
-
get_total_debt_per_address: {
|
952
|
-
address
|
953
|
-
}
|
954
|
-
});
|
955
|
-
};
|
956
|
-
getTotalCreditPerAddress = async ({
|
957
|
-
address
|
958
|
-
}: {
|
959
|
-
address: Addr;
|
960
|
-
}): Promise<GetTotalCreditPerAddressResponse> => {
|
961
|
-
return this.client.queryContractSmart(this.contractAddress, {
|
962
|
-
get_total_credit_per_address: {
|
963
|
-
address
|
964
|
-
}
|
965
|
-
});
|
966
|
-
};
|
967
|
-
getTotalDebtByGraph = async ({
|
968
|
-
graphId
|
969
|
-
}: {
|
970
|
-
graphId: number;
|
971
|
-
}): Promise<GetTotalDebtByGraphResponse> => {
|
972
|
-
return this.client.queryContractSmart(this.contractAddress, {
|
973
|
-
get_total_debt_by_graph: {
|
974
|
-
graph_id: graphId
|
975
|
-
}
|
976
|
-
});
|
977
|
-
};
|
978
|
-
getTotalDebt = async (): Promise<GetTotalDebtResponse> => {
|
979
|
-
return this.client.queryContractSmart(this.contractAddress, {
|
980
|
-
get_total_debt: {}
|
981
|
-
});
|
982
|
-
};
|
983
|
-
}"
|
984
|
-
`;
|