@qubic.org/contracts 0.2.0 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/__generated__/computorcontrolledfund.d.ts +30 -30
- package/dist/__generated__/computorcontrolledfund.d.ts.map +1 -1
- package/dist/__generated__/computorcontrolledfund.js +57 -57
- package/dist/__generated__/computorcontrolledfund.js.map +1 -1
- package/dist/__generated__/escrow.d.ts +13 -13
- package/dist/__generated__/escrow.d.ts.map +1 -1
- package/dist/__generated__/escrow.js +20 -20
- package/dist/__generated__/escrow.js.map +1 -1
- package/dist/__generated__/generalquorumproposal.d.ts +21 -21
- package/dist/__generated__/generalquorumproposal.d.ts.map +1 -1
- package/dist/__generated__/generalquorumproposal.js +31 -31
- package/dist/__generated__/generalquorumproposal.js.map +1 -1
- package/dist/__generated__/msvault.d.ts +104 -104
- package/dist/__generated__/msvault.d.ts.map +1 -1
- package/dist/__generated__/msvault.js +220 -220
- package/dist/__generated__/msvault.js.map +1 -1
- package/dist/__generated__/nostromo.d.ts +43 -43
- package/dist/__generated__/nostromo.d.ts.map +1 -1
- package/dist/__generated__/nostromo.js +68 -68
- package/dist/__generated__/nostromo.js.map +1 -1
- package/dist/__generated__/pulse.d.ts +171 -171
- package/dist/__generated__/pulse.d.ts.map +1 -1
- package/dist/__generated__/pulse.js +409 -409
- package/dist/__generated__/pulse.js.map +1 -1
- package/dist/__generated__/qbay.d.ts +61 -61
- package/dist/__generated__/qbay.d.ts.map +1 -1
- package/dist/__generated__/qbay.js +103 -103
- package/dist/__generated__/qbay.js.map +1 -1
- package/dist/__generated__/qbond.d.ts +44 -44
- package/dist/__generated__/qbond.d.ts.map +1 -1
- package/dist/__generated__/qbond.js +67 -67
- package/dist/__generated__/qbond.js.map +1 -1
- package/dist/__generated__/qdraw.d.ts +4 -4
- package/dist/__generated__/qdraw.d.ts.map +1 -1
- package/dist/__generated__/qdraw.js +4 -4
- package/dist/__generated__/qdraw.js.map +1 -1
- package/dist/__generated__/qduel.d.ts +49 -49
- package/dist/__generated__/qduel.d.ts.map +1 -1
- package/dist/__generated__/qduel.js +106 -106
- package/dist/__generated__/qduel.js.map +1 -1
- package/dist/__generated__/qearn.d.ts +24 -24
- package/dist/__generated__/qearn.d.ts.map +1 -1
- package/dist/__generated__/qearn.js +38 -38
- package/dist/__generated__/qearn.js.map +1 -1
- package/dist/__generated__/qip.d.ts +10 -10
- package/dist/__generated__/qip.d.ts.map +1 -1
- package/dist/__generated__/qip.js +16 -16
- package/dist/__generated__/qip.js.map +1 -1
- package/dist/__generated__/qraffle.d.ts +51 -51
- package/dist/__generated__/qraffle.d.ts.map +1 -1
- package/dist/__generated__/qraffle.js +108 -108
- package/dist/__generated__/qraffle.js.map +1 -1
- package/dist/__generated__/qreservepool.d.ts +14 -14
- package/dist/__generated__/qreservepool.d.ts.map +1 -1
- package/dist/__generated__/qreservepool.js +22 -22
- package/dist/__generated__/qreservepool.js.map +1 -1
- package/dist/__generated__/qrwa.d.ts +71 -71
- package/dist/__generated__/qrwa.d.ts.map +1 -1
- package/dist/__generated__/qrwa.js +174 -174
- package/dist/__generated__/qrwa.js.map +1 -1
- package/dist/__generated__/qswap.d.ts +79 -79
- package/dist/__generated__/qswap.d.ts.map +1 -1
- package/dist/__generated__/qswap.js +158 -158
- package/dist/__generated__/qswap.js.map +1 -1
- package/dist/__generated__/qthirtyfour.d.ts +78 -78
- package/dist/__generated__/qthirtyfour.d.ts.map +1 -1
- package/dist/__generated__/qthirtyfour.js +161 -161
- package/dist/__generated__/qthirtyfour.js.map +1 -1
- package/dist/__generated__/quottery.d.ts +124 -124
- package/dist/__generated__/quottery.d.ts.map +1 -1
- package/dist/__generated__/quottery.js +266 -266
- package/dist/__generated__/quottery.js.map +1 -1
- package/dist/__generated__/qusino.d.ts +44 -44
- package/dist/__generated__/qusino.d.ts.map +1 -1
- package/dist/__generated__/qusino.js +88 -88
- package/dist/__generated__/qusino.js.map +1 -1
- package/dist/__generated__/qutil.d.ts +108 -108
- package/dist/__generated__/qutil.d.ts.map +1 -1
- package/dist/__generated__/qutil.js +231 -231
- package/dist/__generated__/qutil.js.map +1 -1
- package/dist/__generated__/qvault.d.ts +90 -90
- package/dist/__generated__/qvault.d.ts.map +1 -1
- package/dist/__generated__/qvault.js +146 -146
- package/dist/__generated__/qvault.js.map +1 -1
- package/dist/__generated__/qx.d.ts +36 -36
- package/dist/__generated__/qx.d.ts.map +1 -1
- package/dist/__generated__/qx.js +54 -54
- package/dist/__generated__/qx.js.map +1 -1
- package/dist/__generated__/random.d.ts +2 -1
- package/dist/__generated__/random.d.ts.map +1 -1
- package/dist/__generated__/random.js +2 -2
- package/dist/__generated__/random.js.map +1 -1
- package/dist/__generated__/randomlottery.d.ts +28 -28
- package/dist/__generated__/randomlottery.d.ts.map +1 -1
- package/dist/__generated__/randomlottery.js +41 -41
- package/dist/__generated__/randomlottery.js.map +1 -1
- package/dist/__generated__/vottunbridge.d.ts +77 -77
- package/dist/__generated__/vottunbridge.d.ts.map +1 -1
- package/dist/__generated__/vottunbridge.js +181 -181
- package/dist/__generated__/vottunbridge.js.map +1 -1
- package/dist/call-contract.d.ts +9 -3
- package/dist/call-contract.d.ts.map +1 -1
- package/dist/call-contract.js +21 -22
- package/dist/call-contract.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +7 -10
|
@@ -115,7 +115,7 @@ const STRUCTS = {
|
|
|
115
115
|
],
|
|
116
116
|
},
|
|
117
117
|
};
|
|
118
|
-
export const Q_UTIL_SEND_TO_MANY_V1_INPUT_TYPE =
|
|
118
|
+
export const Q_UTIL_SEND_TO_MANY_V1_INPUT_TYPE = 1;
|
|
119
119
|
const Q_UTIL_SEND_TO_MANY_V1_INPUT_FIELDS = [
|
|
120
120
|
{
|
|
121
121
|
name: 'dst0',
|
|
@@ -130,8 +130,8 @@ const Q_UTIL_SEND_TO_MANY_V1_INPUT_FIELDS = [
|
|
|
130
130
|
byteLength: 8,
|
|
131
131
|
},
|
|
132
132
|
];
|
|
133
|
-
export function buildQUtilSendToManyV1Input(input, identityToPublicKey
|
|
134
|
-
return buildPayload(Q_UTIL_SEND_TO_MANY_V1_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
|
|
133
|
+
export function buildQUtilSendToManyV1Input(input, identityToPublicKey) {
|
|
134
|
+
return { contractIndex: Q_UTIL_CONTRACT_INDEX, inputType: Q_UTIL_SEND_TO_MANY_V1_INPUT_TYPE, payload: buildPayload(Q_UTIL_SEND_TO_MANY_V1_INPUT_FIELDS, STRUCTS, input, identityToPublicKey) };
|
|
135
135
|
}
|
|
136
136
|
const Q_UTIL_SEND_TO_MANY_V1_OUTPUT_FIELDS = [
|
|
137
137
|
{
|
|
@@ -141,87 +141,33 @@ const Q_UTIL_SEND_TO_MANY_V1_OUTPUT_FIELDS = [
|
|
|
141
141
|
byteLength: 4,
|
|
142
142
|
},
|
|
143
143
|
];
|
|
144
|
-
export function decodeQUtilSendToManyV1Output(data
|
|
145
|
-
return decodePayload(data, Q_UTIL_SEND_TO_MANY_V1_OUTPUT_FIELDS, STRUCTS,
|
|
144
|
+
export function decodeQUtilSendToManyV1Output(data) {
|
|
145
|
+
return decodePayload(data, Q_UTIL_SEND_TO_MANY_V1_OUTPUT_FIELDS, STRUCTS, (_pk) => 'A'.repeat(60));
|
|
146
146
|
}
|
|
147
|
-
export const
|
|
148
|
-
const
|
|
149
|
-
{
|
|
150
|
-
name: 'issuer',
|
|
151
|
-
type: 'id',
|
|
152
|
-
offset: 0,
|
|
153
|
-
byteLength: 32,
|
|
154
|
-
},
|
|
155
|
-
{
|
|
156
|
-
name: 'assetName',
|
|
157
|
-
type: 'uint64',
|
|
158
|
-
offset: 32,
|
|
159
|
-
byteLength: 8,
|
|
160
|
-
},
|
|
161
|
-
{
|
|
162
|
-
name: 'dst0',
|
|
163
|
-
type: 'id',
|
|
164
|
-
offset: 40,
|
|
165
|
-
byteLength: 32,
|
|
166
|
-
},
|
|
147
|
+
export const Q_UTIL_BURN_QUBIC_INPUT_TYPE = 2;
|
|
148
|
+
const Q_UTIL_BURN_QUBIC_INPUT_FIELDS = [
|
|
167
149
|
{
|
|
168
|
-
name: '
|
|
150
|
+
name: 'amount',
|
|
169
151
|
type: 'sint64',
|
|
170
|
-
offset: 72,
|
|
171
|
-
byteLength: 8,
|
|
172
|
-
},
|
|
173
|
-
];
|
|
174
|
-
export function buildQUtilTransferSharesToManyV1Input(input, identityToPublicKey = (_identity) => new Uint8Array(32)) {
|
|
175
|
-
return buildPayload(Q_UTIL_TRANSFER_SHARES_TO_MANY_V1_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
|
|
176
|
-
}
|
|
177
|
-
const Q_UTIL_TRANSFER_SHARES_TO_MANY_V1_OUTPUT_FIELDS = [
|
|
178
|
-
{
|
|
179
|
-
name: 'returnCode',
|
|
180
|
-
type: 'sint32',
|
|
181
152
|
offset: 0,
|
|
182
|
-
byteLength: 4,
|
|
183
|
-
},
|
|
184
|
-
];
|
|
185
|
-
export function decodeQUtilTransferSharesToManyV1Output(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
|
|
186
|
-
return decodePayload(data, Q_UTIL_TRANSFER_SHARES_TO_MANY_V1_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
|
|
187
|
-
}
|
|
188
|
-
export const Q_UTIL_TRANSFER_SHARES_MANAGEMENT_RIGHTS_INPUT_TYPE = 8;
|
|
189
|
-
const Q_UTIL_TRANSFER_SHARES_MANAGEMENT_RIGHTS_INPUT_FIELDS = [
|
|
190
|
-
{
|
|
191
|
-
name: 'asset',
|
|
192
|
-
type: 'struct',
|
|
193
|
-
offset: 0,
|
|
194
|
-
byteLength: 40,
|
|
195
|
-
structRef: 'Asset',
|
|
196
|
-
},
|
|
197
|
-
{
|
|
198
|
-
name: 'numberOfShares',
|
|
199
|
-
type: 'sint64',
|
|
200
|
-
offset: 40,
|
|
201
153
|
byteLength: 8,
|
|
202
154
|
},
|
|
203
|
-
{
|
|
204
|
-
name: 'newManagingContractIndex',
|
|
205
|
-
type: 'uint32',
|
|
206
|
-
offset: 48,
|
|
207
|
-
byteLength: 4,
|
|
208
|
-
},
|
|
209
155
|
];
|
|
210
|
-
export function
|
|
211
|
-
return buildPayload(
|
|
156
|
+
export function buildQUtilBurnQubicInput(input) {
|
|
157
|
+
return { contractIndex: Q_UTIL_CONTRACT_INDEX, inputType: Q_UTIL_BURN_QUBIC_INPUT_TYPE, payload: buildPayload(Q_UTIL_BURN_QUBIC_INPUT_FIELDS, STRUCTS, input, (_) => new Uint8Array(32)) };
|
|
212
158
|
}
|
|
213
|
-
const
|
|
159
|
+
const Q_UTIL_BURN_QUBIC_OUTPUT_FIELDS = [
|
|
214
160
|
{
|
|
215
|
-
name: '
|
|
161
|
+
name: 'amount',
|
|
216
162
|
type: 'sint64',
|
|
217
163
|
offset: 0,
|
|
218
164
|
byteLength: 8,
|
|
219
165
|
},
|
|
220
166
|
];
|
|
221
|
-
export function
|
|
222
|
-
return decodePayload(data,
|
|
167
|
+
export function decodeQUtilBurnQubicOutput(data) {
|
|
168
|
+
return decodePayload(data, Q_UTIL_BURN_QUBIC_OUTPUT_FIELDS, STRUCTS, (_pk) => 'A'.repeat(60));
|
|
223
169
|
}
|
|
224
|
-
export const Q_UTIL_SEND_TO_MANY_BENCHMARK_INPUT_TYPE =
|
|
170
|
+
export const Q_UTIL_SEND_TO_MANY_BENCHMARK_INPUT_TYPE = 3;
|
|
225
171
|
const Q_UTIL_SEND_TO_MANY_BENCHMARK_INPUT_FIELDS = [
|
|
226
172
|
{
|
|
227
173
|
name: 'dstCount',
|
|
@@ -236,8 +182,8 @@ const Q_UTIL_SEND_TO_MANY_BENCHMARK_INPUT_FIELDS = [
|
|
|
236
182
|
byteLength: 8,
|
|
237
183
|
},
|
|
238
184
|
];
|
|
239
|
-
export function buildQUtilSendToManyBenchmarkInput(input
|
|
240
|
-
return buildPayload(Q_UTIL_SEND_TO_MANY_BENCHMARK_INPUT_FIELDS, STRUCTS, input,
|
|
185
|
+
export function buildQUtilSendToManyBenchmarkInput(input) {
|
|
186
|
+
return { contractIndex: Q_UTIL_CONTRACT_INDEX, inputType: Q_UTIL_SEND_TO_MANY_BENCHMARK_INPUT_TYPE, payload: buildPayload(Q_UTIL_SEND_TO_MANY_BENCHMARK_INPUT_FIELDS, STRUCTS, input, (_) => new Uint8Array(32)) };
|
|
241
187
|
}
|
|
242
188
|
const Q_UTIL_SEND_TO_MANY_BENCHMARK_OUTPUT_FIELDS = [
|
|
243
189
|
{
|
|
@@ -259,56 +205,10 @@ const Q_UTIL_SEND_TO_MANY_BENCHMARK_OUTPUT_FIELDS = [
|
|
|
259
205
|
byteLength: 8,
|
|
260
206
|
},
|
|
261
207
|
];
|
|
262
|
-
export function decodeQUtilSendToManyBenchmarkOutput(data
|
|
263
|
-
return decodePayload(data, Q_UTIL_SEND_TO_MANY_BENCHMARK_OUTPUT_FIELDS, STRUCTS,
|
|
264
|
-
}
|
|
265
|
-
export const Q_UTIL_BURN_QUBIC_INPUT_TYPE = 10;
|
|
266
|
-
const Q_UTIL_BURN_QUBIC_INPUT_FIELDS = [
|
|
267
|
-
{
|
|
268
|
-
name: 'amount',
|
|
269
|
-
type: 'sint64',
|
|
270
|
-
offset: 0,
|
|
271
|
-
byteLength: 8,
|
|
272
|
-
},
|
|
273
|
-
];
|
|
274
|
-
export function buildQUtilBurnQubicInput(input, identityToPublicKey = (_identity) => new Uint8Array(32)) {
|
|
275
|
-
return buildPayload(Q_UTIL_BURN_QUBIC_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
|
|
208
|
+
export function decodeQUtilSendToManyBenchmarkOutput(data) {
|
|
209
|
+
return decodePayload(data, Q_UTIL_SEND_TO_MANY_BENCHMARK_OUTPUT_FIELDS, STRUCTS, (_pk) => 'A'.repeat(60));
|
|
276
210
|
}
|
|
277
|
-
const
|
|
278
|
-
{
|
|
279
|
-
name: 'amount',
|
|
280
|
-
type: 'sint64',
|
|
281
|
-
offset: 0,
|
|
282
|
-
byteLength: 8,
|
|
283
|
-
},
|
|
284
|
-
];
|
|
285
|
-
export function decodeQUtilBurnQubicOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
|
|
286
|
-
return decodePayload(data, Q_UTIL_BURN_QUBIC_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
|
|
287
|
-
}
|
|
288
|
-
export const Q_UTIL_BURN_QUBIC_FOR_CONTRACT_INPUT_TYPE = 11;
|
|
289
|
-
const Q_UTIL_BURN_QUBIC_FOR_CONTRACT_INPUT_FIELDS = [
|
|
290
|
-
{
|
|
291
|
-
name: 'contractIndexBurnedFor',
|
|
292
|
-
type: 'uint32',
|
|
293
|
-
offset: 0,
|
|
294
|
-
byteLength: 4,
|
|
295
|
-
},
|
|
296
|
-
];
|
|
297
|
-
export function buildQUtilBurnQubicForContractInput(input, identityToPublicKey = (_identity) => new Uint8Array(32)) {
|
|
298
|
-
return buildPayload(Q_UTIL_BURN_QUBIC_FOR_CONTRACT_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
|
|
299
|
-
}
|
|
300
|
-
const Q_UTIL_BURN_QUBIC_FOR_CONTRACT_OUTPUT_FIELDS = [
|
|
301
|
-
{
|
|
302
|
-
name: 'amount',
|
|
303
|
-
type: 'sint64',
|
|
304
|
-
offset: 0,
|
|
305
|
-
byteLength: 8,
|
|
306
|
-
},
|
|
307
|
-
];
|
|
308
|
-
export function decodeQUtilBurnQubicForContractOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
|
|
309
|
-
return decodePayload(data, Q_UTIL_BURN_QUBIC_FOR_CONTRACT_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
|
|
310
|
-
}
|
|
311
|
-
export const Q_UTIL_CREATE_POLL_INPUT_TYPE = 14;
|
|
211
|
+
export const Q_UTIL_CREATE_POLL_INPUT_TYPE = 4;
|
|
312
212
|
const Q_UTIL_CREATE_POLL_INPUT_FIELDS = [
|
|
313
213
|
{
|
|
314
214
|
name: 'poll_name',
|
|
@@ -353,8 +253,8 @@ const Q_UTIL_CREATE_POLL_INPUT_FIELDS = [
|
|
|
353
253
|
byteLength: 8,
|
|
354
254
|
},
|
|
355
255
|
];
|
|
356
|
-
export function buildQUtilCreatePollInput(input, identityToPublicKey
|
|
357
|
-
return buildPayload(Q_UTIL_CREATE_POLL_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
|
|
256
|
+
export function buildQUtilCreatePollInput(input, identityToPublicKey) {
|
|
257
|
+
return { contractIndex: Q_UTIL_CONTRACT_INDEX, inputType: Q_UTIL_CREATE_POLL_INPUT_TYPE, payload: buildPayload(Q_UTIL_CREATE_POLL_INPUT_FIELDS, STRUCTS, input, identityToPublicKey) };
|
|
358
258
|
}
|
|
359
259
|
const Q_UTIL_CREATE_POLL_OUTPUT_FIELDS = [
|
|
360
260
|
{
|
|
@@ -364,10 +264,10 @@ const Q_UTIL_CREATE_POLL_OUTPUT_FIELDS = [
|
|
|
364
264
|
byteLength: 8,
|
|
365
265
|
},
|
|
366
266
|
];
|
|
367
|
-
export function decodeQUtilCreatePollOutput(data
|
|
368
|
-
return decodePayload(data, Q_UTIL_CREATE_POLL_OUTPUT_FIELDS, STRUCTS,
|
|
267
|
+
export function decodeQUtilCreatePollOutput(data) {
|
|
268
|
+
return decodePayload(data, Q_UTIL_CREATE_POLL_OUTPUT_FIELDS, STRUCTS, (_pk) => 'A'.repeat(60));
|
|
369
269
|
}
|
|
370
|
-
export const Q_UTIL_VOTE_INPUT_TYPE =
|
|
270
|
+
export const Q_UTIL_VOTE_INPUT_TYPE = 5;
|
|
371
271
|
const Q_UTIL_VOTE_INPUT_FIELDS = [
|
|
372
272
|
{
|
|
373
273
|
name: 'poll_id',
|
|
@@ -394,8 +294,8 @@ const Q_UTIL_VOTE_INPUT_FIELDS = [
|
|
|
394
294
|
byteLength: 8,
|
|
395
295
|
},
|
|
396
296
|
];
|
|
397
|
-
export function buildQUtilVoteInput(input, identityToPublicKey
|
|
398
|
-
return buildPayload(Q_UTIL_VOTE_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
|
|
297
|
+
export function buildQUtilVoteInput(input, identityToPublicKey) {
|
|
298
|
+
return { contractIndex: Q_UTIL_CONTRACT_INDEX, inputType: Q_UTIL_VOTE_INPUT_TYPE, payload: buildPayload(Q_UTIL_VOTE_INPUT_FIELDS, STRUCTS, input, identityToPublicKey) };
|
|
399
299
|
}
|
|
400
300
|
const Q_UTIL_VOTE_OUTPUT_FIELDS = [
|
|
401
301
|
{
|
|
@@ -405,10 +305,10 @@ const Q_UTIL_VOTE_OUTPUT_FIELDS = [
|
|
|
405
305
|
byteLength: 1,
|
|
406
306
|
},
|
|
407
307
|
];
|
|
408
|
-
export function decodeQUtilVoteOutput(data
|
|
409
|
-
return decodePayload(data, Q_UTIL_VOTE_OUTPUT_FIELDS, STRUCTS,
|
|
308
|
+
export function decodeQUtilVoteOutput(data) {
|
|
309
|
+
return decodePayload(data, Q_UTIL_VOTE_OUTPUT_FIELDS, STRUCTS, (_pk) => 'A'.repeat(60));
|
|
410
310
|
}
|
|
411
|
-
export const Q_UTIL_CANCEL_POLL_INPUT_TYPE =
|
|
311
|
+
export const Q_UTIL_CANCEL_POLL_INPUT_TYPE = 6;
|
|
412
312
|
const Q_UTIL_CANCEL_POLL_INPUT_FIELDS = [
|
|
413
313
|
{
|
|
414
314
|
name: 'poll_id',
|
|
@@ -417,8 +317,8 @@ const Q_UTIL_CANCEL_POLL_INPUT_FIELDS = [
|
|
|
417
317
|
byteLength: 8,
|
|
418
318
|
},
|
|
419
319
|
];
|
|
420
|
-
export function buildQUtilCancelPollInput(input
|
|
421
|
-
return buildPayload(Q_UTIL_CANCEL_POLL_INPUT_FIELDS, STRUCTS, input,
|
|
320
|
+
export function buildQUtilCancelPollInput(input) {
|
|
321
|
+
return { contractIndex: Q_UTIL_CONTRACT_INDEX, inputType: Q_UTIL_CANCEL_POLL_INPUT_TYPE, payload: buildPayload(Q_UTIL_CANCEL_POLL_INPUT_FIELDS, STRUCTS, input, (_) => new Uint8Array(32)) };
|
|
422
322
|
}
|
|
423
323
|
const Q_UTIL_CANCEL_POLL_OUTPUT_FIELDS = [
|
|
424
324
|
{
|
|
@@ -428,10 +328,10 @@ const Q_UTIL_CANCEL_POLL_OUTPUT_FIELDS = [
|
|
|
428
328
|
byteLength: 1,
|
|
429
329
|
},
|
|
430
330
|
];
|
|
431
|
-
export function decodeQUtilCancelPollOutput(data
|
|
432
|
-
return decodePayload(data, Q_UTIL_CANCEL_POLL_OUTPUT_FIELDS, STRUCTS,
|
|
331
|
+
export function decodeQUtilCancelPollOutput(data) {
|
|
332
|
+
return decodePayload(data, Q_UTIL_CANCEL_POLL_OUTPUT_FIELDS, STRUCTS, (_pk) => 'A'.repeat(60));
|
|
433
333
|
}
|
|
434
|
-
export const Q_UTIL_DISTRIBUTE_QU_TO_SHAREHOLDERS_INPUT_TYPE =
|
|
334
|
+
export const Q_UTIL_DISTRIBUTE_QU_TO_SHAREHOLDERS_INPUT_TYPE = 7;
|
|
435
335
|
const Q_UTIL_DISTRIBUTE_QU_TO_SHAREHOLDERS_INPUT_FIELDS = [
|
|
436
336
|
{
|
|
437
337
|
name: 'asset',
|
|
@@ -441,8 +341,8 @@ const Q_UTIL_DISTRIBUTE_QU_TO_SHAREHOLDERS_INPUT_FIELDS = [
|
|
|
441
341
|
structRef: 'Asset',
|
|
442
342
|
},
|
|
443
343
|
];
|
|
444
|
-
export function buildQUtilDistributeQuToShareholdersInput(input
|
|
445
|
-
return buildPayload(Q_UTIL_DISTRIBUTE_QU_TO_SHAREHOLDERS_INPUT_FIELDS, STRUCTS, input,
|
|
344
|
+
export function buildQUtilDistributeQuToShareholdersInput(input) {
|
|
345
|
+
return { contractIndex: Q_UTIL_CONTRACT_INDEX, inputType: Q_UTIL_DISTRIBUTE_QU_TO_SHAREHOLDERS_INPUT_TYPE, payload: buildPayload(Q_UTIL_DISTRIBUTE_QU_TO_SHAREHOLDERS_INPUT_FIELDS, STRUCTS, input, (_) => new Uint8Array(32)) };
|
|
446
346
|
}
|
|
447
347
|
const Q_UTIL_DISTRIBUTE_QU_TO_SHAREHOLDERS_OUTPUT_FIELDS = [
|
|
448
348
|
{
|
|
@@ -470,10 +370,110 @@ const Q_UTIL_DISTRIBUTE_QU_TO_SHAREHOLDERS_OUTPUT_FIELDS = [
|
|
|
470
370
|
byteLength: 8,
|
|
471
371
|
},
|
|
472
372
|
];
|
|
473
|
-
export function decodeQUtilDistributeQuToShareholdersOutput(data
|
|
474
|
-
return decodePayload(data, Q_UTIL_DISTRIBUTE_QU_TO_SHAREHOLDERS_OUTPUT_FIELDS, STRUCTS,
|
|
373
|
+
export function decodeQUtilDistributeQuToShareholdersOutput(data) {
|
|
374
|
+
return decodePayload(data, Q_UTIL_DISTRIBUTE_QU_TO_SHAREHOLDERS_OUTPUT_FIELDS, STRUCTS, (_pk) => 'A'.repeat(60));
|
|
375
|
+
}
|
|
376
|
+
export const Q_UTIL_BURN_QUBIC_FOR_CONTRACT_INPUT_TYPE = 8;
|
|
377
|
+
const Q_UTIL_BURN_QUBIC_FOR_CONTRACT_INPUT_FIELDS = [
|
|
378
|
+
{
|
|
379
|
+
name: 'contractIndexBurnedFor',
|
|
380
|
+
type: 'uint32',
|
|
381
|
+
offset: 0,
|
|
382
|
+
byteLength: 4,
|
|
383
|
+
},
|
|
384
|
+
];
|
|
385
|
+
export function buildQUtilBurnQubicForContractInput(input) {
|
|
386
|
+
return { contractIndex: Q_UTIL_CONTRACT_INDEX, inputType: Q_UTIL_BURN_QUBIC_FOR_CONTRACT_INPUT_TYPE, payload: buildPayload(Q_UTIL_BURN_QUBIC_FOR_CONTRACT_INPUT_FIELDS, STRUCTS, input, (_) => new Uint8Array(32)) };
|
|
387
|
+
}
|
|
388
|
+
const Q_UTIL_BURN_QUBIC_FOR_CONTRACT_OUTPUT_FIELDS = [
|
|
389
|
+
{
|
|
390
|
+
name: 'amount',
|
|
391
|
+
type: 'sint64',
|
|
392
|
+
offset: 0,
|
|
393
|
+
byteLength: 8,
|
|
394
|
+
},
|
|
395
|
+
];
|
|
396
|
+
export function decodeQUtilBurnQubicForContractOutput(data) {
|
|
397
|
+
return decodePayload(data, Q_UTIL_BURN_QUBIC_FOR_CONTRACT_OUTPUT_FIELDS, STRUCTS, (_pk) => 'A'.repeat(60));
|
|
398
|
+
}
|
|
399
|
+
export const Q_UTIL_TRANSFER_SHARES_TO_MANY_V1_INPUT_TYPE = 9;
|
|
400
|
+
const Q_UTIL_TRANSFER_SHARES_TO_MANY_V1_INPUT_FIELDS = [
|
|
401
|
+
{
|
|
402
|
+
name: 'issuer',
|
|
403
|
+
type: 'id',
|
|
404
|
+
offset: 0,
|
|
405
|
+
byteLength: 32,
|
|
406
|
+
},
|
|
407
|
+
{
|
|
408
|
+
name: 'assetName',
|
|
409
|
+
type: 'uint64',
|
|
410
|
+
offset: 32,
|
|
411
|
+
byteLength: 8,
|
|
412
|
+
},
|
|
413
|
+
{
|
|
414
|
+
name: 'dst0',
|
|
415
|
+
type: 'id',
|
|
416
|
+
offset: 40,
|
|
417
|
+
byteLength: 32,
|
|
418
|
+
},
|
|
419
|
+
{
|
|
420
|
+
name: 'amt0',
|
|
421
|
+
type: 'sint64',
|
|
422
|
+
offset: 72,
|
|
423
|
+
byteLength: 8,
|
|
424
|
+
},
|
|
425
|
+
];
|
|
426
|
+
export function buildQUtilTransferSharesToManyV1Input(input, identityToPublicKey) {
|
|
427
|
+
return { contractIndex: Q_UTIL_CONTRACT_INDEX, inputType: Q_UTIL_TRANSFER_SHARES_TO_MANY_V1_INPUT_TYPE, payload: buildPayload(Q_UTIL_TRANSFER_SHARES_TO_MANY_V1_INPUT_FIELDS, STRUCTS, input, identityToPublicKey) };
|
|
428
|
+
}
|
|
429
|
+
const Q_UTIL_TRANSFER_SHARES_TO_MANY_V1_OUTPUT_FIELDS = [
|
|
430
|
+
{
|
|
431
|
+
name: 'returnCode',
|
|
432
|
+
type: 'sint32',
|
|
433
|
+
offset: 0,
|
|
434
|
+
byteLength: 4,
|
|
435
|
+
},
|
|
436
|
+
];
|
|
437
|
+
export function decodeQUtilTransferSharesToManyV1Output(data) {
|
|
438
|
+
return decodePayload(data, Q_UTIL_TRANSFER_SHARES_TO_MANY_V1_OUTPUT_FIELDS, STRUCTS, (_pk) => 'A'.repeat(60));
|
|
475
439
|
}
|
|
476
|
-
export const
|
|
440
|
+
export const Q_UTIL_TRANSFER_SHARES_MANAGEMENT_RIGHTS_INPUT_TYPE = 10;
|
|
441
|
+
const Q_UTIL_TRANSFER_SHARES_MANAGEMENT_RIGHTS_INPUT_FIELDS = [
|
|
442
|
+
{
|
|
443
|
+
name: 'asset',
|
|
444
|
+
type: 'struct',
|
|
445
|
+
offset: 0,
|
|
446
|
+
byteLength: 40,
|
|
447
|
+
structRef: 'Asset',
|
|
448
|
+
},
|
|
449
|
+
{
|
|
450
|
+
name: 'numberOfShares',
|
|
451
|
+
type: 'sint64',
|
|
452
|
+
offset: 40,
|
|
453
|
+
byteLength: 8,
|
|
454
|
+
},
|
|
455
|
+
{
|
|
456
|
+
name: 'newManagingContractIndex',
|
|
457
|
+
type: 'uint32',
|
|
458
|
+
offset: 48,
|
|
459
|
+
byteLength: 4,
|
|
460
|
+
},
|
|
461
|
+
];
|
|
462
|
+
export function buildQUtilTransferSharesManagementRightsInput(input) {
|
|
463
|
+
return { contractIndex: Q_UTIL_CONTRACT_INDEX, inputType: Q_UTIL_TRANSFER_SHARES_MANAGEMENT_RIGHTS_INPUT_TYPE, payload: buildPayload(Q_UTIL_TRANSFER_SHARES_MANAGEMENT_RIGHTS_INPUT_FIELDS, STRUCTS, input, (_) => new Uint8Array(32)) };
|
|
464
|
+
}
|
|
465
|
+
const Q_UTIL_TRANSFER_SHARES_MANAGEMENT_RIGHTS_OUTPUT_FIELDS = [
|
|
466
|
+
{
|
|
467
|
+
name: 'transferredNumberOfShares',
|
|
468
|
+
type: 'sint64',
|
|
469
|
+
offset: 0,
|
|
470
|
+
byteLength: 8,
|
|
471
|
+
},
|
|
472
|
+
];
|
|
473
|
+
export function decodeQUtilTransferSharesManagementRightsOutput(data) {
|
|
474
|
+
return decodePayload(data, Q_UTIL_TRANSFER_SHARES_MANAGEMENT_RIGHTS_OUTPUT_FIELDS, STRUCTS, (_pk) => 'A'.repeat(60));
|
|
475
|
+
}
|
|
476
|
+
export const Q_UTIL_QUERY_PRICE_ORACLE_INPUT_TYPE = 100;
|
|
477
477
|
const Q_UTIL_QUERY_PRICE_ORACLE_INPUT_FIELDS = [
|
|
478
478
|
{
|
|
479
479
|
name: 'priceOracleQuery',
|
|
@@ -489,8 +489,8 @@ const Q_UTIL_QUERY_PRICE_ORACLE_INPUT_FIELDS = [
|
|
|
489
489
|
byteLength: 4,
|
|
490
490
|
},
|
|
491
491
|
];
|
|
492
|
-
export function buildQUtilQueryPriceOracleInput(input
|
|
493
|
-
return buildPayload(Q_UTIL_QUERY_PRICE_ORACLE_INPUT_FIELDS, STRUCTS, input,
|
|
492
|
+
export function buildQUtilQueryPriceOracleInput(input) {
|
|
493
|
+
return { contractIndex: Q_UTIL_CONTRACT_INDEX, inputType: Q_UTIL_QUERY_PRICE_ORACLE_INPUT_TYPE, payload: buildPayload(Q_UTIL_QUERY_PRICE_ORACLE_INPUT_FIELDS, STRUCTS, input, (_) => new Uint8Array(32)) };
|
|
494
494
|
}
|
|
495
495
|
const Q_UTIL_QUERY_PRICE_ORACLE_OUTPUT_FIELDS = [
|
|
496
496
|
{
|
|
@@ -500,10 +500,10 @@ const Q_UTIL_QUERY_PRICE_ORACLE_OUTPUT_FIELDS = [
|
|
|
500
500
|
byteLength: 8,
|
|
501
501
|
},
|
|
502
502
|
];
|
|
503
|
-
export function decodeQUtilQueryPriceOracleOutput(data
|
|
504
|
-
return decodePayload(data, Q_UTIL_QUERY_PRICE_ORACLE_OUTPUT_FIELDS, STRUCTS,
|
|
503
|
+
export function decodeQUtilQueryPriceOracleOutput(data) {
|
|
504
|
+
return decodePayload(data, Q_UTIL_QUERY_PRICE_ORACLE_OUTPUT_FIELDS, STRUCTS, (_pk) => 'A'.repeat(60));
|
|
505
505
|
}
|
|
506
|
-
export const Q_UTIL_SUBSCRIBE_PRICE_ORACLE_INPUT_TYPE =
|
|
506
|
+
export const Q_UTIL_SUBSCRIBE_PRICE_ORACLE_INPUT_TYPE = 101;
|
|
507
507
|
const Q_UTIL_SUBSCRIBE_PRICE_ORACLE_INPUT_FIELDS = [
|
|
508
508
|
{
|
|
509
509
|
name: 'priceOracleQuery',
|
|
@@ -525,8 +525,8 @@ const Q_UTIL_SUBSCRIBE_PRICE_ORACLE_INPUT_FIELDS = [
|
|
|
525
525
|
byteLength: 1,
|
|
526
526
|
},
|
|
527
527
|
];
|
|
528
|
-
export function buildQUtilSubscribePriceOracleInput(input
|
|
529
|
-
return buildPayload(Q_UTIL_SUBSCRIBE_PRICE_ORACLE_INPUT_FIELDS, STRUCTS, input,
|
|
528
|
+
export function buildQUtilSubscribePriceOracleInput(input) {
|
|
529
|
+
return { contractIndex: Q_UTIL_CONTRACT_INDEX, inputType: Q_UTIL_SUBSCRIBE_PRICE_ORACLE_INPUT_TYPE, payload: buildPayload(Q_UTIL_SUBSCRIBE_PRICE_ORACLE_INPUT_FIELDS, STRUCTS, input, (_) => new Uint8Array(32)) };
|
|
530
530
|
}
|
|
531
531
|
const Q_UTIL_SUBSCRIBE_PRICE_ORACLE_OUTPUT_FIELDS = [
|
|
532
532
|
{
|
|
@@ -536,10 +536,10 @@ const Q_UTIL_SUBSCRIBE_PRICE_ORACLE_OUTPUT_FIELDS = [
|
|
|
536
536
|
byteLength: 4,
|
|
537
537
|
},
|
|
538
538
|
];
|
|
539
|
-
export function decodeQUtilSubscribePriceOracleOutput(data
|
|
540
|
-
return decodePayload(data, Q_UTIL_SUBSCRIBE_PRICE_ORACLE_OUTPUT_FIELDS, STRUCTS,
|
|
539
|
+
export function decodeQUtilSubscribePriceOracleOutput(data) {
|
|
540
|
+
return decodePayload(data, Q_UTIL_SUBSCRIBE_PRICE_ORACLE_OUTPUT_FIELDS, STRUCTS, (_pk) => 'A'.repeat(60));
|
|
541
541
|
}
|
|
542
|
-
export const Q_UTIL_UNSUBSCRIBE_ORACLE_INPUT_TYPE =
|
|
542
|
+
export const Q_UTIL_UNSUBSCRIBE_ORACLE_INPUT_TYPE = 102;
|
|
543
543
|
const Q_UTIL_UNSUBSCRIBE_ORACLE_INPUT_FIELDS = [
|
|
544
544
|
{
|
|
545
545
|
name: 'subscriptionId',
|
|
@@ -548,8 +548,8 @@ const Q_UTIL_UNSUBSCRIBE_ORACLE_INPUT_FIELDS = [
|
|
|
548
548
|
byteLength: 4,
|
|
549
549
|
},
|
|
550
550
|
];
|
|
551
|
-
export function buildQUtilUnsubscribeOracleInput(input
|
|
552
|
-
return buildPayload(Q_UTIL_UNSUBSCRIBE_ORACLE_INPUT_FIELDS, STRUCTS, input,
|
|
551
|
+
export function buildQUtilUnsubscribeOracleInput(input) {
|
|
552
|
+
return { contractIndex: Q_UTIL_CONTRACT_INDEX, inputType: Q_UTIL_UNSUBSCRIBE_ORACLE_INPUT_TYPE, payload: buildPayload(Q_UTIL_UNSUBSCRIBE_ORACLE_INPUT_FIELDS, STRUCTS, input, (_) => new Uint8Array(32)) };
|
|
553
553
|
}
|
|
554
554
|
const Q_UTIL_UNSUBSCRIBE_ORACLE_OUTPUT_FIELDS = [
|
|
555
555
|
{
|
|
@@ -559,10 +559,10 @@ const Q_UTIL_UNSUBSCRIBE_ORACLE_OUTPUT_FIELDS = [
|
|
|
559
559
|
byteLength: 1,
|
|
560
560
|
},
|
|
561
561
|
];
|
|
562
|
-
export function decodeQUtilUnsubscribeOracleOutput(data
|
|
563
|
-
return decodePayload(data, Q_UTIL_UNSUBSCRIBE_ORACLE_OUTPUT_FIELDS, STRUCTS,
|
|
562
|
+
export function decodeQUtilUnsubscribeOracleOutput(data) {
|
|
563
|
+
return decodePayload(data, Q_UTIL_UNSUBSCRIBE_ORACLE_OUTPUT_FIELDS, STRUCTS, (_pk) => 'A'.repeat(60));
|
|
564
564
|
}
|
|
565
|
-
export const Q_UTIL_GET_SEND_TO_MANY_V1FEE_INPUT_TYPE =
|
|
565
|
+
export const Q_UTIL_GET_SEND_TO_MANY_V1FEE_INPUT_TYPE = 1;
|
|
566
566
|
export const Q_UTIL_GET_SEND_TO_MANY_V1FEE_INPUT_SIZE = 0;
|
|
567
567
|
const Q_UTIL_GET_SEND_TO_MANY_V1FEE_OUTPUT_FIELDS = [
|
|
568
568
|
{
|
|
@@ -572,8 +572,8 @@ const Q_UTIL_GET_SEND_TO_MANY_V1FEE_OUTPUT_FIELDS = [
|
|
|
572
572
|
byteLength: 8,
|
|
573
573
|
},
|
|
574
574
|
];
|
|
575
|
-
export function decodeQUtilGetSendToManyV1FeeOutput(data
|
|
576
|
-
return decodePayload(data, Q_UTIL_GET_SEND_TO_MANY_V1FEE_OUTPUT_FIELDS, STRUCTS,
|
|
575
|
+
export function decodeQUtilGetSendToManyV1FeeOutput(data) {
|
|
576
|
+
return decodePayload(data, Q_UTIL_GET_SEND_TO_MANY_V1FEE_OUTPUT_FIELDS, STRUCTS, (_pk) => 'A'.repeat(60));
|
|
577
577
|
}
|
|
578
578
|
export async function qUtilGetSendToManyV1Fee(live, options) {
|
|
579
579
|
return callContractFunction({
|
|
@@ -588,44 +588,7 @@ export async function qUtilGetSendToManyV1Fee(live, options) {
|
|
|
588
588
|
...options,
|
|
589
589
|
});
|
|
590
590
|
}
|
|
591
|
-
export const
|
|
592
|
-
export const Q_UTIL_QUERY_FEE_RESERVE_INPUT_SIZE = 4;
|
|
593
|
-
const Q_UTIL_QUERY_FEE_RESERVE_INPUT_FIELDS = [
|
|
594
|
-
{
|
|
595
|
-
name: 'contractIndex',
|
|
596
|
-
type: 'uint32',
|
|
597
|
-
offset: 0,
|
|
598
|
-
byteLength: 4,
|
|
599
|
-
},
|
|
600
|
-
];
|
|
601
|
-
export function buildQUtilQueryFeeReserveInput(input, identityToPublicKey = (_identity) => new Uint8Array(32)) {
|
|
602
|
-
return buildPayload(Q_UTIL_QUERY_FEE_RESERVE_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
|
|
603
|
-
}
|
|
604
|
-
const Q_UTIL_QUERY_FEE_RESERVE_OUTPUT_FIELDS = [
|
|
605
|
-
{
|
|
606
|
-
name: 'reserveAmount',
|
|
607
|
-
type: 'sint64',
|
|
608
|
-
offset: 0,
|
|
609
|
-
byteLength: 8,
|
|
610
|
-
},
|
|
611
|
-
];
|
|
612
|
-
export function decodeQUtilQueryFeeReserveOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
|
|
613
|
-
return decodePayload(data, Q_UTIL_QUERY_FEE_RESERVE_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
|
|
614
|
-
}
|
|
615
|
-
export async function qUtilQueryFeeReserve(live, input, options) {
|
|
616
|
-
return callContractFunction({
|
|
617
|
-
live,
|
|
618
|
-
contractIndex: Q_UTIL_CONTRACT_INDEX,
|
|
619
|
-
inputType: Q_UTIL_QUERY_FEE_RESERVE_INPUT_TYPE,
|
|
620
|
-
inputSize: Q_UTIL_QUERY_FEE_RESERVE_INPUT_SIZE,
|
|
621
|
-
inputFields: Q_UTIL_QUERY_FEE_RESERVE_INPUT_FIELDS,
|
|
622
|
-
outputFields: Q_UTIL_QUERY_FEE_RESERVE_OUTPUT_FIELDS,
|
|
623
|
-
structs: STRUCTS,
|
|
624
|
-
input: input,
|
|
625
|
-
...options,
|
|
626
|
-
});
|
|
627
|
-
}
|
|
628
|
-
export const Q_UTIL_GET_TOTAL_NUMBER_OF_ASSET_SHARES_INPUT_TYPE = 13;
|
|
591
|
+
export const Q_UTIL_GET_TOTAL_NUMBER_OF_ASSET_SHARES_INPUT_TYPE = 2;
|
|
629
592
|
export const Q_UTIL_GET_TOTAL_NUMBER_OF_ASSET_SHARES_INPUT_SIZE = 40;
|
|
630
593
|
const Q_UTIL_GET_TOTAL_NUMBER_OF_ASSET_SHARES_INPUT_FIELDS = [
|
|
631
594
|
{
|
|
@@ -641,7 +604,7 @@ const Q_UTIL_GET_TOTAL_NUMBER_OF_ASSET_SHARES_INPUT_FIELDS = [
|
|
|
641
604
|
byteLength: 8,
|
|
642
605
|
},
|
|
643
606
|
];
|
|
644
|
-
export function buildQUtilGetTotalNumberOfAssetSharesInput(input, identityToPublicKey
|
|
607
|
+
export function buildQUtilGetTotalNumberOfAssetSharesInput(input, identityToPublicKey) {
|
|
645
608
|
return buildPayload(Q_UTIL_GET_TOTAL_NUMBER_OF_ASSET_SHARES_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
|
|
646
609
|
}
|
|
647
610
|
const Q_UTIL_GET_TOTAL_NUMBER_OF_ASSET_SHARES_OUTPUT_FIELDS = [
|
|
@@ -652,8 +615,8 @@ const Q_UTIL_GET_TOTAL_NUMBER_OF_ASSET_SHARES_OUTPUT_FIELDS = [
|
|
|
652
615
|
byteLength: 8,
|
|
653
616
|
},
|
|
654
617
|
];
|
|
655
|
-
export function decodeQUtilGetTotalNumberOfAssetSharesOutput(data
|
|
656
|
-
return decodePayload(data, Q_UTIL_GET_TOTAL_NUMBER_OF_ASSET_SHARES_OUTPUT_FIELDS, STRUCTS,
|
|
618
|
+
export function decodeQUtilGetTotalNumberOfAssetSharesOutput(data) {
|
|
619
|
+
return decodePayload(data, Q_UTIL_GET_TOTAL_NUMBER_OF_ASSET_SHARES_OUTPUT_FIELDS, STRUCTS, (_pk) => 'A'.repeat(60));
|
|
657
620
|
}
|
|
658
621
|
export async function qUtilGetTotalNumberOfAssetShares(live, input, options) {
|
|
659
622
|
return callContractFunction({
|
|
@@ -668,7 +631,7 @@ export async function qUtilGetTotalNumberOfAssetShares(live, input, options) {
|
|
|
668
631
|
...options,
|
|
669
632
|
});
|
|
670
633
|
}
|
|
671
|
-
export const Q_UTIL_GET_CURRENT_RESULT_INPUT_TYPE =
|
|
634
|
+
export const Q_UTIL_GET_CURRENT_RESULT_INPUT_TYPE = 3;
|
|
672
635
|
export const Q_UTIL_GET_CURRENT_RESULT_INPUT_SIZE = 8;
|
|
673
636
|
const Q_UTIL_GET_CURRENT_RESULT_INPUT_FIELDS = [
|
|
674
637
|
{
|
|
@@ -678,8 +641,8 @@ const Q_UTIL_GET_CURRENT_RESULT_INPUT_FIELDS = [
|
|
|
678
641
|
byteLength: 8,
|
|
679
642
|
},
|
|
680
643
|
];
|
|
681
|
-
export function buildQUtilGetCurrentResultInput(input
|
|
682
|
-
return buildPayload(Q_UTIL_GET_CURRENT_RESULT_INPUT_FIELDS, STRUCTS, input,
|
|
644
|
+
export function buildQUtilGetCurrentResultInput(input) {
|
|
645
|
+
return buildPayload(Q_UTIL_GET_CURRENT_RESULT_INPUT_FIELDS, STRUCTS, input, (_) => new Uint8Array(32));
|
|
683
646
|
}
|
|
684
647
|
const Q_UTIL_GET_CURRENT_RESULT_OUTPUT_FIELDS = [
|
|
685
648
|
{
|
|
@@ -707,8 +670,8 @@ const Q_UTIL_GET_CURRENT_RESULT_OUTPUT_FIELDS = [
|
|
|
707
670
|
byteLength: 8,
|
|
708
671
|
},
|
|
709
672
|
];
|
|
710
|
-
export function decodeQUtilGetCurrentResultOutput(data
|
|
711
|
-
return decodePayload(data, Q_UTIL_GET_CURRENT_RESULT_OUTPUT_FIELDS, STRUCTS,
|
|
673
|
+
export function decodeQUtilGetCurrentResultOutput(data) {
|
|
674
|
+
return decodePayload(data, Q_UTIL_GET_CURRENT_RESULT_OUTPUT_FIELDS, STRUCTS, (_pk) => 'A'.repeat(60));
|
|
712
675
|
}
|
|
713
676
|
export async function qUtilGetCurrentResult(live, input, options) {
|
|
714
677
|
return callContractFunction({
|
|
@@ -723,7 +686,7 @@ export async function qUtilGetCurrentResult(live, input, options) {
|
|
|
723
686
|
...options,
|
|
724
687
|
});
|
|
725
688
|
}
|
|
726
|
-
export const Q_UTIL_GET_POLLS_BY_CREATOR_INPUT_TYPE =
|
|
689
|
+
export const Q_UTIL_GET_POLLS_BY_CREATOR_INPUT_TYPE = 4;
|
|
727
690
|
export const Q_UTIL_GET_POLLS_BY_CREATOR_INPUT_SIZE = 32;
|
|
728
691
|
const Q_UTIL_GET_POLLS_BY_CREATOR_INPUT_FIELDS = [
|
|
729
692
|
{
|
|
@@ -733,7 +696,7 @@ const Q_UTIL_GET_POLLS_BY_CREATOR_INPUT_FIELDS = [
|
|
|
733
696
|
byteLength: 32,
|
|
734
697
|
},
|
|
735
698
|
];
|
|
736
|
-
export function buildQUtilGetPollsByCreatorInput(input, identityToPublicKey
|
|
699
|
+
export function buildQUtilGetPollsByCreatorInput(input, identityToPublicKey) {
|
|
737
700
|
return buildPayload(Q_UTIL_GET_POLLS_BY_CREATOR_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
|
|
738
701
|
}
|
|
739
702
|
const Q_UTIL_GET_POLLS_BY_CREATOR_OUTPUT_FIELDS = [
|
|
@@ -753,8 +716,8 @@ const Q_UTIL_GET_POLLS_BY_CREATOR_OUTPUT_FIELDS = [
|
|
|
753
716
|
byteLength: 8,
|
|
754
717
|
},
|
|
755
718
|
];
|
|
756
|
-
export function decodeQUtilGetPollsByCreatorOutput(data
|
|
757
|
-
return decodePayload(data, Q_UTIL_GET_POLLS_BY_CREATOR_OUTPUT_FIELDS, STRUCTS,
|
|
719
|
+
export function decodeQUtilGetPollsByCreatorOutput(data) {
|
|
720
|
+
return decodePayload(data, Q_UTIL_GET_POLLS_BY_CREATOR_OUTPUT_FIELDS, STRUCTS, (_pk) => 'A'.repeat(60));
|
|
758
721
|
}
|
|
759
722
|
export async function qUtilGetPollsByCreator(live, input, options) {
|
|
760
723
|
return callContractFunction({
|
|
@@ -769,7 +732,7 @@ export async function qUtilGetPollsByCreator(live, input, options) {
|
|
|
769
732
|
...options,
|
|
770
733
|
});
|
|
771
734
|
}
|
|
772
|
-
export const Q_UTIL_GET_CURRENT_POLL_ID_INPUT_TYPE =
|
|
735
|
+
export const Q_UTIL_GET_CURRENT_POLL_ID_INPUT_TYPE = 5;
|
|
773
736
|
export const Q_UTIL_GET_CURRENT_POLL_ID_INPUT_SIZE = 0;
|
|
774
737
|
const Q_UTIL_GET_CURRENT_POLL_ID_OUTPUT_FIELDS = [
|
|
775
738
|
{
|
|
@@ -794,8 +757,8 @@ const Q_UTIL_GET_CURRENT_POLL_ID_OUTPUT_FIELDS = [
|
|
|
794
757
|
byteLength: 8,
|
|
795
758
|
},
|
|
796
759
|
];
|
|
797
|
-
export function decodeQUtilGetCurrentPollIdOutput(data
|
|
798
|
-
return decodePayload(data, Q_UTIL_GET_CURRENT_POLL_ID_OUTPUT_FIELDS, STRUCTS,
|
|
760
|
+
export function decodeQUtilGetCurrentPollIdOutput(data) {
|
|
761
|
+
return decodePayload(data, Q_UTIL_GET_CURRENT_POLL_ID_OUTPUT_FIELDS, STRUCTS, (_pk) => 'A'.repeat(60));
|
|
799
762
|
}
|
|
800
763
|
export async function qUtilGetCurrentPollId(live, options) {
|
|
801
764
|
return callContractFunction({
|
|
@@ -810,7 +773,7 @@ export async function qUtilGetCurrentPollId(live, options) {
|
|
|
810
773
|
...options,
|
|
811
774
|
});
|
|
812
775
|
}
|
|
813
|
-
export const Q_UTIL_GET_POLL_INFO_INPUT_TYPE =
|
|
776
|
+
export const Q_UTIL_GET_POLL_INFO_INPUT_TYPE = 6;
|
|
814
777
|
export const Q_UTIL_GET_POLL_INFO_INPUT_SIZE = 8;
|
|
815
778
|
const Q_UTIL_GET_POLL_INFO_INPUT_FIELDS = [
|
|
816
779
|
{
|
|
@@ -820,8 +783,8 @@ const Q_UTIL_GET_POLL_INFO_INPUT_FIELDS = [
|
|
|
820
783
|
byteLength: 8,
|
|
821
784
|
},
|
|
822
785
|
];
|
|
823
|
-
export function buildQUtilGetPollInfoInput(input
|
|
824
|
-
return buildPayload(Q_UTIL_GET_POLL_INFO_INPUT_FIELDS, STRUCTS, input,
|
|
786
|
+
export function buildQUtilGetPollInfoInput(input) {
|
|
787
|
+
return buildPayload(Q_UTIL_GET_POLL_INFO_INPUT_FIELDS, STRUCTS, input, (_) => new Uint8Array(32));
|
|
825
788
|
}
|
|
826
789
|
const Q_UTIL_GET_POLL_INFO_OUTPUT_FIELDS = [
|
|
827
790
|
{
|
|
@@ -847,8 +810,8 @@ const Q_UTIL_GET_POLL_INFO_OUTPUT_FIELDS = [
|
|
|
847
810
|
arrayItemByteLength: 1,
|
|
848
811
|
},
|
|
849
812
|
];
|
|
850
|
-
export function decodeQUtilGetPollInfoOutput(data
|
|
851
|
-
return decodePayload(data, Q_UTIL_GET_POLL_INFO_OUTPUT_FIELDS, STRUCTS,
|
|
813
|
+
export function decodeQUtilGetPollInfoOutput(data) {
|
|
814
|
+
return decodePayload(data, Q_UTIL_GET_POLL_INFO_OUTPUT_FIELDS, STRUCTS, (_pk) => 'A'.repeat(60));
|
|
852
815
|
}
|
|
853
816
|
export async function qUtilGetPollInfo(live, input, options) {
|
|
854
817
|
return callContractFunction({
|
|
@@ -863,7 +826,7 @@ export async function qUtilGetPollInfo(live, input, options) {
|
|
|
863
826
|
...options,
|
|
864
827
|
});
|
|
865
828
|
}
|
|
866
|
-
export const Q_UTIL_GET_FEES_INPUT_TYPE =
|
|
829
|
+
export const Q_UTIL_GET_FEES_INPUT_TYPE = 7;
|
|
867
830
|
export const Q_UTIL_GET_FEES_INPUT_SIZE = 0;
|
|
868
831
|
const Q_UTIL_GET_FEES_OUTPUT_FIELDS = [
|
|
869
832
|
{
|
|
@@ -933,8 +896,8 @@ const Q_UTIL_GET_FEES_OUTPUT_FIELDS = [
|
|
|
933
896
|
byteLength: 8,
|
|
934
897
|
},
|
|
935
898
|
];
|
|
936
|
-
export function decodeQUtilGetFeesOutput(data
|
|
937
|
-
return decodePayload(data, Q_UTIL_GET_FEES_OUTPUT_FIELDS, STRUCTS,
|
|
899
|
+
export function decodeQUtilGetFeesOutput(data) {
|
|
900
|
+
return decodePayload(data, Q_UTIL_GET_FEES_OUTPUT_FIELDS, STRUCTS, (_pk) => 'A'.repeat(60));
|
|
938
901
|
}
|
|
939
902
|
export async function qUtilGetFees(live, options) {
|
|
940
903
|
return callContractFunction({
|
|
@@ -949,7 +912,44 @@ export async function qUtilGetFees(live, options) {
|
|
|
949
912
|
...options,
|
|
950
913
|
});
|
|
951
914
|
}
|
|
952
|
-
export const
|
|
915
|
+
export const Q_UTIL_QUERY_FEE_RESERVE_INPUT_TYPE = 8;
|
|
916
|
+
export const Q_UTIL_QUERY_FEE_RESERVE_INPUT_SIZE = 4;
|
|
917
|
+
const Q_UTIL_QUERY_FEE_RESERVE_INPUT_FIELDS = [
|
|
918
|
+
{
|
|
919
|
+
name: 'contractIndex',
|
|
920
|
+
type: 'uint32',
|
|
921
|
+
offset: 0,
|
|
922
|
+
byteLength: 4,
|
|
923
|
+
},
|
|
924
|
+
];
|
|
925
|
+
export function buildQUtilQueryFeeReserveInput(input) {
|
|
926
|
+
return buildPayload(Q_UTIL_QUERY_FEE_RESERVE_INPUT_FIELDS, STRUCTS, input, (_) => new Uint8Array(32));
|
|
927
|
+
}
|
|
928
|
+
const Q_UTIL_QUERY_FEE_RESERVE_OUTPUT_FIELDS = [
|
|
929
|
+
{
|
|
930
|
+
name: 'reserveAmount',
|
|
931
|
+
type: 'sint64',
|
|
932
|
+
offset: 0,
|
|
933
|
+
byteLength: 8,
|
|
934
|
+
},
|
|
935
|
+
];
|
|
936
|
+
export function decodeQUtilQueryFeeReserveOutput(data) {
|
|
937
|
+
return decodePayload(data, Q_UTIL_QUERY_FEE_RESERVE_OUTPUT_FIELDS, STRUCTS, (_pk) => 'A'.repeat(60));
|
|
938
|
+
}
|
|
939
|
+
export async function qUtilQueryFeeReserve(live, input, options) {
|
|
940
|
+
return callContractFunction({
|
|
941
|
+
live,
|
|
942
|
+
contractIndex: Q_UTIL_CONTRACT_INDEX,
|
|
943
|
+
inputType: Q_UTIL_QUERY_FEE_RESERVE_INPUT_TYPE,
|
|
944
|
+
inputSize: Q_UTIL_QUERY_FEE_RESERVE_INPUT_SIZE,
|
|
945
|
+
inputFields: Q_UTIL_QUERY_FEE_RESERVE_INPUT_FIELDS,
|
|
946
|
+
outputFields: Q_UTIL_QUERY_FEE_RESERVE_OUTPUT_FIELDS,
|
|
947
|
+
structs: STRUCTS,
|
|
948
|
+
input: input,
|
|
949
|
+
...options,
|
|
950
|
+
});
|
|
951
|
+
}
|
|
952
|
+
export const Q_UTIL_GET_BALANCES16_INPUT_TYPE = 9;
|
|
953
953
|
export const Q_UTIL_GET_BALANCES16_INPUT_SIZE = 512;
|
|
954
954
|
const Q_UTIL_GET_BALANCES16_INPUT_FIELDS = [
|
|
955
955
|
{
|
|
@@ -962,7 +962,7 @@ const Q_UTIL_GET_BALANCES16_INPUT_FIELDS = [
|
|
|
962
962
|
arrayItemByteLength: 32,
|
|
963
963
|
},
|
|
964
964
|
];
|
|
965
|
-
export function buildQUtilGetBalances16Input(input, identityToPublicKey
|
|
965
|
+
export function buildQUtilGetBalances16Input(input, identityToPublicKey) {
|
|
966
966
|
return buildPayload(Q_UTIL_GET_BALANCES16_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
|
|
967
967
|
}
|
|
968
968
|
const Q_UTIL_GET_BALANCES16_OUTPUT_FIELDS = [
|
|
@@ -976,8 +976,8 @@ const Q_UTIL_GET_BALANCES16_OUTPUT_FIELDS = [
|
|
|
976
976
|
arrayItemByteLength: 8,
|
|
977
977
|
},
|
|
978
978
|
];
|
|
979
|
-
export function decodeQUtilGetBalances16Output(data
|
|
980
|
-
return decodePayload(data, Q_UTIL_GET_BALANCES16_OUTPUT_FIELDS, STRUCTS,
|
|
979
|
+
export function decodeQUtilGetBalances16Output(data) {
|
|
980
|
+
return decodePayload(data, Q_UTIL_GET_BALANCES16_OUTPUT_FIELDS, STRUCTS, (_pk) => 'A'.repeat(60));
|
|
981
981
|
}
|
|
982
982
|
export async function qUtilGetBalances16(live, input, options) {
|
|
983
983
|
return callContractFunction({
|
|
@@ -995,26 +995,20 @@ export async function qUtilGetBalances16(live, input, options) {
|
|
|
995
995
|
export const qUtil = {
|
|
996
996
|
contractIndex: Q_UTIL_CONTRACT_INDEX,
|
|
997
997
|
GetSendToManyV1Fee: qUtilGetSendToManyV1Fee,
|
|
998
|
-
QueryFeeReserve: qUtilQueryFeeReserve,
|
|
999
998
|
GetTotalNumberOfAssetShares: qUtilGetTotalNumberOfAssetShares,
|
|
1000
999
|
GetCurrentResult: qUtilGetCurrentResult,
|
|
1001
1000
|
GetPollsByCreator: qUtilGetPollsByCreator,
|
|
1002
1001
|
GetCurrentPollId: qUtilGetCurrentPollId,
|
|
1003
1002
|
GetPollInfo: qUtilGetPollInfo,
|
|
1004
1003
|
GetFees: qUtilGetFees,
|
|
1004
|
+
QueryFeeReserve: qUtilQueryFeeReserve,
|
|
1005
1005
|
GetBalances16: qUtilGetBalances16,
|
|
1006
1006
|
buildSendToManyV1Input: buildQUtilSendToManyV1Input,
|
|
1007
1007
|
decodeSendToManyV1Output: decodeQUtilSendToManyV1Output,
|
|
1008
|
-
buildTransferSharesToManyV1Input: buildQUtilTransferSharesToManyV1Input,
|
|
1009
|
-
decodeTransferSharesToManyV1Output: decodeQUtilTransferSharesToManyV1Output,
|
|
1010
|
-
buildTransferSharesManagementRightsInput: buildQUtilTransferSharesManagementRightsInput,
|
|
1011
|
-
decodeTransferSharesManagementRightsOutput: decodeQUtilTransferSharesManagementRightsOutput,
|
|
1012
|
-
buildSendToManyBenchmarkInput: buildQUtilSendToManyBenchmarkInput,
|
|
1013
|
-
decodeSendToManyBenchmarkOutput: decodeQUtilSendToManyBenchmarkOutput,
|
|
1014
1008
|
buildBurnQubicInput: buildQUtilBurnQubicInput,
|
|
1015
1009
|
decodeBurnQubicOutput: decodeQUtilBurnQubicOutput,
|
|
1016
|
-
|
|
1017
|
-
|
|
1010
|
+
buildSendToManyBenchmarkInput: buildQUtilSendToManyBenchmarkInput,
|
|
1011
|
+
decodeSendToManyBenchmarkOutput: decodeQUtilSendToManyBenchmarkOutput,
|
|
1018
1012
|
buildCreatePollInput: buildQUtilCreatePollInput,
|
|
1019
1013
|
decodeCreatePollOutput: decodeQUtilCreatePollOutput,
|
|
1020
1014
|
buildVoteInput: buildQUtilVoteInput,
|
|
@@ -1023,6 +1017,12 @@ export const qUtil = {
|
|
|
1023
1017
|
decodeCancelPollOutput: decodeQUtilCancelPollOutput,
|
|
1024
1018
|
buildDistributeQuToShareholdersInput: buildQUtilDistributeQuToShareholdersInput,
|
|
1025
1019
|
decodeDistributeQuToShareholdersOutput: decodeQUtilDistributeQuToShareholdersOutput,
|
|
1020
|
+
buildBurnQubicForContractInput: buildQUtilBurnQubicForContractInput,
|
|
1021
|
+
decodeBurnQubicForContractOutput: decodeQUtilBurnQubicForContractOutput,
|
|
1022
|
+
buildTransferSharesToManyV1Input: buildQUtilTransferSharesToManyV1Input,
|
|
1023
|
+
decodeTransferSharesToManyV1Output: decodeQUtilTransferSharesToManyV1Output,
|
|
1024
|
+
buildTransferSharesManagementRightsInput: buildQUtilTransferSharesManagementRightsInput,
|
|
1025
|
+
decodeTransferSharesManagementRightsOutput: decodeQUtilTransferSharesManagementRightsOutput,
|
|
1026
1026
|
buildQueryPriceOracleInput: buildQUtilQueryPriceOracleInput,
|
|
1027
1027
|
decodeQueryPriceOracleOutput: decodeQUtilQueryPriceOracleOutput,
|
|
1028
1028
|
buildSubscribePriceOracleInput: buildQUtilSubscribePriceOracleInput,
|