@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.
Files changed (108) hide show
  1. package/dist/__generated__/computorcontrolledfund.d.ts +30 -30
  2. package/dist/__generated__/computorcontrolledfund.d.ts.map +1 -1
  3. package/dist/__generated__/computorcontrolledfund.js +57 -57
  4. package/dist/__generated__/computorcontrolledfund.js.map +1 -1
  5. package/dist/__generated__/escrow.d.ts +13 -13
  6. package/dist/__generated__/escrow.d.ts.map +1 -1
  7. package/dist/__generated__/escrow.js +20 -20
  8. package/dist/__generated__/escrow.js.map +1 -1
  9. package/dist/__generated__/generalquorumproposal.d.ts +21 -21
  10. package/dist/__generated__/generalquorumproposal.d.ts.map +1 -1
  11. package/dist/__generated__/generalquorumproposal.js +31 -31
  12. package/dist/__generated__/generalquorumproposal.js.map +1 -1
  13. package/dist/__generated__/msvault.d.ts +104 -104
  14. package/dist/__generated__/msvault.d.ts.map +1 -1
  15. package/dist/__generated__/msvault.js +220 -220
  16. package/dist/__generated__/msvault.js.map +1 -1
  17. package/dist/__generated__/nostromo.d.ts +43 -43
  18. package/dist/__generated__/nostromo.d.ts.map +1 -1
  19. package/dist/__generated__/nostromo.js +68 -68
  20. package/dist/__generated__/nostromo.js.map +1 -1
  21. package/dist/__generated__/pulse.d.ts +171 -171
  22. package/dist/__generated__/pulse.d.ts.map +1 -1
  23. package/dist/__generated__/pulse.js +409 -409
  24. package/dist/__generated__/pulse.js.map +1 -1
  25. package/dist/__generated__/qbay.d.ts +61 -61
  26. package/dist/__generated__/qbay.d.ts.map +1 -1
  27. package/dist/__generated__/qbay.js +103 -103
  28. package/dist/__generated__/qbay.js.map +1 -1
  29. package/dist/__generated__/qbond.d.ts +44 -44
  30. package/dist/__generated__/qbond.d.ts.map +1 -1
  31. package/dist/__generated__/qbond.js +67 -67
  32. package/dist/__generated__/qbond.js.map +1 -1
  33. package/dist/__generated__/qdraw.d.ts +4 -4
  34. package/dist/__generated__/qdraw.d.ts.map +1 -1
  35. package/dist/__generated__/qdraw.js +4 -4
  36. package/dist/__generated__/qdraw.js.map +1 -1
  37. package/dist/__generated__/qduel.d.ts +49 -49
  38. package/dist/__generated__/qduel.d.ts.map +1 -1
  39. package/dist/__generated__/qduel.js +106 -106
  40. package/dist/__generated__/qduel.js.map +1 -1
  41. package/dist/__generated__/qearn.d.ts +24 -24
  42. package/dist/__generated__/qearn.d.ts.map +1 -1
  43. package/dist/__generated__/qearn.js +38 -38
  44. package/dist/__generated__/qearn.js.map +1 -1
  45. package/dist/__generated__/qip.d.ts +10 -10
  46. package/dist/__generated__/qip.d.ts.map +1 -1
  47. package/dist/__generated__/qip.js +16 -16
  48. package/dist/__generated__/qip.js.map +1 -1
  49. package/dist/__generated__/qraffle.d.ts +51 -51
  50. package/dist/__generated__/qraffle.d.ts.map +1 -1
  51. package/dist/__generated__/qraffle.js +108 -108
  52. package/dist/__generated__/qraffle.js.map +1 -1
  53. package/dist/__generated__/qreservepool.d.ts +14 -14
  54. package/dist/__generated__/qreservepool.d.ts.map +1 -1
  55. package/dist/__generated__/qreservepool.js +22 -22
  56. package/dist/__generated__/qreservepool.js.map +1 -1
  57. package/dist/__generated__/qrwa.d.ts +71 -71
  58. package/dist/__generated__/qrwa.d.ts.map +1 -1
  59. package/dist/__generated__/qrwa.js +174 -174
  60. package/dist/__generated__/qrwa.js.map +1 -1
  61. package/dist/__generated__/qswap.d.ts +79 -79
  62. package/dist/__generated__/qswap.d.ts.map +1 -1
  63. package/dist/__generated__/qswap.js +158 -158
  64. package/dist/__generated__/qswap.js.map +1 -1
  65. package/dist/__generated__/qthirtyfour.d.ts +78 -78
  66. package/dist/__generated__/qthirtyfour.d.ts.map +1 -1
  67. package/dist/__generated__/qthirtyfour.js +161 -161
  68. package/dist/__generated__/qthirtyfour.js.map +1 -1
  69. package/dist/__generated__/quottery.d.ts +124 -124
  70. package/dist/__generated__/quottery.d.ts.map +1 -1
  71. package/dist/__generated__/quottery.js +266 -266
  72. package/dist/__generated__/quottery.js.map +1 -1
  73. package/dist/__generated__/qusino.d.ts +44 -44
  74. package/dist/__generated__/qusino.d.ts.map +1 -1
  75. package/dist/__generated__/qusino.js +88 -88
  76. package/dist/__generated__/qusino.js.map +1 -1
  77. package/dist/__generated__/qutil.d.ts +108 -108
  78. package/dist/__generated__/qutil.d.ts.map +1 -1
  79. package/dist/__generated__/qutil.js +231 -231
  80. package/dist/__generated__/qutil.js.map +1 -1
  81. package/dist/__generated__/qvault.d.ts +90 -90
  82. package/dist/__generated__/qvault.d.ts.map +1 -1
  83. package/dist/__generated__/qvault.js +146 -146
  84. package/dist/__generated__/qvault.js.map +1 -1
  85. package/dist/__generated__/qx.d.ts +36 -36
  86. package/dist/__generated__/qx.d.ts.map +1 -1
  87. package/dist/__generated__/qx.js +54 -54
  88. package/dist/__generated__/qx.js.map +1 -1
  89. package/dist/__generated__/random.d.ts +2 -1
  90. package/dist/__generated__/random.d.ts.map +1 -1
  91. package/dist/__generated__/random.js +2 -2
  92. package/dist/__generated__/random.js.map +1 -1
  93. package/dist/__generated__/randomlottery.d.ts +28 -28
  94. package/dist/__generated__/randomlottery.d.ts.map +1 -1
  95. package/dist/__generated__/randomlottery.js +41 -41
  96. package/dist/__generated__/randomlottery.js.map +1 -1
  97. package/dist/__generated__/vottunbridge.d.ts +77 -77
  98. package/dist/__generated__/vottunbridge.d.ts.map +1 -1
  99. package/dist/__generated__/vottunbridge.js +181 -181
  100. package/dist/__generated__/vottunbridge.js.map +1 -1
  101. package/dist/call-contract.d.ts +9 -3
  102. package/dist/call-contract.d.ts.map +1 -1
  103. package/dist/call-contract.js +21 -22
  104. package/dist/call-contract.js.map +1 -1
  105. package/dist/index.d.ts +1 -1
  106. package/dist/index.d.ts.map +1 -1
  107. package/dist/index.js.map +1 -1
  108. package/package.json +7 -10
@@ -220,7 +220,20 @@ const STRUCTS = {
220
220
  ],
221
221
  },
222
222
  };
223
- export const QUOTTERY_ADD_TO_ASK_ORDER_INPUT_TYPE = 9;
223
+ export const QUOTTERY_CREATE_EVENT_INPUT_TYPE = 1;
224
+ const QUOTTERY_CREATE_EVENT_INPUT_FIELDS = [
225
+ {
226
+ name: 'qei',
227
+ type: 'struct',
228
+ offset: 0,
229
+ byteLength: 280,
230
+ structRef: 'QtryEventInfo',
231
+ },
232
+ ];
233
+ export function buildQuotteryCreateEventInput(input) {
234
+ return { contractIndex: QUOTTERY_CONTRACT_INDEX, inputType: QUOTTERY_CREATE_EVENT_INPUT_TYPE, payload: buildPayload(QUOTTERY_CREATE_EVENT_INPUT_FIELDS, STRUCTS, input, (_) => new Uint8Array(32)) };
235
+ }
236
+ export const QUOTTERY_ADD_TO_ASK_ORDER_INPUT_TYPE = 2;
224
237
  const QUOTTERY_ADD_TO_ASK_ORDER_INPUT_FIELDS = [
225
238
  {
226
239
  name: 'eventId',
@@ -247,8 +260,8 @@ const QUOTTERY_ADD_TO_ASK_ORDER_INPUT_FIELDS = [
247
260
  byteLength: 8,
248
261
  },
249
262
  ];
250
- export function buildQuotteryAddToAskOrderInput(input, identityToPublicKey = (_identity) => new Uint8Array(32)) {
251
- return buildPayload(QUOTTERY_ADD_TO_ASK_ORDER_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
263
+ export function buildQuotteryAddToAskOrderInput(input) {
264
+ return { contractIndex: QUOTTERY_CONTRACT_INDEX, inputType: QUOTTERY_ADD_TO_ASK_ORDER_INPUT_TYPE, payload: buildPayload(QUOTTERY_ADD_TO_ASK_ORDER_INPUT_FIELDS, STRUCTS, input, (_) => new Uint8Array(32)) };
252
265
  }
253
266
  const QUOTTERY_ADD_TO_ASK_ORDER_OUTPUT_FIELDS = [
254
267
  {
@@ -258,10 +271,10 @@ const QUOTTERY_ADD_TO_ASK_ORDER_OUTPUT_FIELDS = [
258
271
  byteLength: 8,
259
272
  },
260
273
  ];
261
- export function decodeQuotteryAddToAskOrderOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
262
- return decodePayload(data, QUOTTERY_ADD_TO_ASK_ORDER_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
274
+ export function decodeQuotteryAddToAskOrderOutput(data) {
275
+ return decodePayload(data, QUOTTERY_ADD_TO_ASK_ORDER_OUTPUT_FIELDS, STRUCTS, (_pk) => 'A'.repeat(60));
263
276
  }
264
- export const QUOTTERY_REMOVE_ASK_ORDER_INPUT_TYPE = 10;
277
+ export const QUOTTERY_REMOVE_ASK_ORDER_INPUT_TYPE = 3;
265
278
  const QUOTTERY_REMOVE_ASK_ORDER_INPUT_FIELDS = [
266
279
  {
267
280
  name: 'eventId',
@@ -288,8 +301,8 @@ const QUOTTERY_REMOVE_ASK_ORDER_INPUT_FIELDS = [
288
301
  byteLength: 8,
289
302
  },
290
303
  ];
291
- export function buildQuotteryRemoveAskOrderInput(input, identityToPublicKey = (_identity) => new Uint8Array(32)) {
292
- return buildPayload(QUOTTERY_REMOVE_ASK_ORDER_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
304
+ export function buildQuotteryRemoveAskOrderInput(input) {
305
+ return { contractIndex: QUOTTERY_CONTRACT_INDEX, inputType: QUOTTERY_REMOVE_ASK_ORDER_INPUT_TYPE, payload: buildPayload(QUOTTERY_REMOVE_ASK_ORDER_INPUT_FIELDS, STRUCTS, input, (_) => new Uint8Array(32)) };
293
306
  }
294
307
  const QUOTTERY_REMOVE_ASK_ORDER_OUTPUT_FIELDS = [
295
308
  {
@@ -299,11 +312,11 @@ const QUOTTERY_REMOVE_ASK_ORDER_OUTPUT_FIELDS = [
299
312
  byteLength: 8,
300
313
  },
301
314
  ];
302
- export function decodeQuotteryRemoveAskOrderOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
303
- return decodePayload(data, QUOTTERY_REMOVE_ASK_ORDER_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
315
+ export function decodeQuotteryRemoveAskOrderOutput(data) {
316
+ return decodePayload(data, QUOTTERY_REMOVE_ASK_ORDER_OUTPUT_FIELDS, STRUCTS, (_pk) => 'A'.repeat(60));
304
317
  }
305
- export const QUOTTERY_REMOVE_BID_ORDER_INPUT_TYPE = 11;
306
- const QUOTTERY_REMOVE_BID_ORDER_INPUT_FIELDS = [
318
+ export const QUOTTERY_ADD_TO_BID_ORDER_INPUT_TYPE = 4;
319
+ const QUOTTERY_ADD_TO_BID_ORDER_INPUT_FIELDS = [
307
320
  {
308
321
  name: 'eventId',
309
322
  type: 'uint64',
@@ -318,7 +331,7 @@ const QUOTTERY_REMOVE_BID_ORDER_INPUT_FIELDS = [
318
331
  },
319
332
  {
320
333
  name: 'amount',
321
- type: 'uint64',
334
+ type: 'sint64',
322
335
  offset: 16,
323
336
  byteLength: 8,
324
337
  },
@@ -329,10 +342,10 @@ const QUOTTERY_REMOVE_BID_ORDER_INPUT_FIELDS = [
329
342
  byteLength: 8,
330
343
  },
331
344
  ];
332
- export function buildQuotteryRemoveBidOrderInput(input, identityToPublicKey = (_identity) => new Uint8Array(32)) {
333
- return buildPayload(QUOTTERY_REMOVE_BID_ORDER_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
345
+ export function buildQuotteryAddToBidOrderInput(input) {
346
+ return { contractIndex: QUOTTERY_CONTRACT_INDEX, inputType: QUOTTERY_ADD_TO_BID_ORDER_INPUT_TYPE, payload: buildPayload(QUOTTERY_ADD_TO_BID_ORDER_INPUT_FIELDS, STRUCTS, input, (_) => new Uint8Array(32)) };
334
347
  }
335
- const QUOTTERY_REMOVE_BID_ORDER_OUTPUT_FIELDS = [
348
+ const QUOTTERY_ADD_TO_BID_ORDER_OUTPUT_FIELDS = [
336
349
  {
337
350
  name: 'status',
338
351
  type: 'sint64',
@@ -340,11 +353,11 @@ const QUOTTERY_REMOVE_BID_ORDER_OUTPUT_FIELDS = [
340
353
  byteLength: 8,
341
354
  },
342
355
  ];
343
- export function decodeQuotteryRemoveBidOrderOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
344
- return decodePayload(data, QUOTTERY_REMOVE_BID_ORDER_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
356
+ export function decodeQuotteryAddToBidOrderOutput(data) {
357
+ return decodePayload(data, QUOTTERY_ADD_TO_BID_ORDER_OUTPUT_FIELDS, STRUCTS, (_pk) => 'A'.repeat(60));
345
358
  }
346
- export const QUOTTERY_ADD_TO_BID_ORDER_INPUT_TYPE = 12;
347
- const QUOTTERY_ADD_TO_BID_ORDER_INPUT_FIELDS = [
359
+ export const QUOTTERY_REMOVE_BID_ORDER_INPUT_TYPE = 5;
360
+ const QUOTTERY_REMOVE_BID_ORDER_INPUT_FIELDS = [
348
361
  {
349
362
  name: 'eventId',
350
363
  type: 'uint64',
@@ -359,7 +372,7 @@ const QUOTTERY_ADD_TO_BID_ORDER_INPUT_FIELDS = [
359
372
  },
360
373
  {
361
374
  name: 'amount',
362
- type: 'sint64',
375
+ type: 'uint64',
363
376
  offset: 16,
364
377
  byteLength: 8,
365
378
  },
@@ -370,10 +383,10 @@ const QUOTTERY_ADD_TO_BID_ORDER_INPUT_FIELDS = [
370
383
  byteLength: 8,
371
384
  },
372
385
  ];
373
- export function buildQuotteryAddToBidOrderInput(input, identityToPublicKey = (_identity) => new Uint8Array(32)) {
374
- return buildPayload(QUOTTERY_ADD_TO_BID_ORDER_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
386
+ export function buildQuotteryRemoveBidOrderInput(input) {
387
+ return { contractIndex: QUOTTERY_CONTRACT_INDEX, inputType: QUOTTERY_REMOVE_BID_ORDER_INPUT_TYPE, payload: buildPayload(QUOTTERY_REMOVE_BID_ORDER_INPUT_FIELDS, STRUCTS, input, (_) => new Uint8Array(32)) };
375
388
  }
376
- const QUOTTERY_ADD_TO_BID_ORDER_OUTPUT_FIELDS = [
389
+ const QUOTTERY_REMOVE_BID_ORDER_OUTPUT_FIELDS = [
377
390
  {
378
391
  name: 'status',
379
392
  type: 'sint64',
@@ -381,23 +394,29 @@ const QUOTTERY_ADD_TO_BID_ORDER_OUTPUT_FIELDS = [
381
394
  byteLength: 8,
382
395
  },
383
396
  ];
384
- export function decodeQuotteryAddToBidOrderOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
385
- return decodePayload(data, QUOTTERY_ADD_TO_BID_ORDER_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
397
+ export function decodeQuotteryRemoveBidOrderOutput(data) {
398
+ return decodePayload(data, QUOTTERY_REMOVE_BID_ORDER_OUTPUT_FIELDS, STRUCTS, (_pk) => 'A'.repeat(60));
386
399
  }
387
- export const QUOTTERY_DISPUTE_INPUT_TYPE = 13;
388
- const QUOTTERY_DISPUTE_INPUT_FIELDS = [
400
+ export const QUOTTERY_PUBLISH_RESULT_INPUT_TYPE = 6;
401
+ const QUOTTERY_PUBLISH_RESULT_INPUT_FIELDS = [
389
402
  {
390
403
  name: 'eventId',
391
404
  type: 'uint64',
392
405
  offset: 0,
393
406
  byteLength: 8,
394
407
  },
408
+ {
409
+ name: 'option',
410
+ type: 'uint64',
411
+ offset: 8,
412
+ byteLength: 8,
413
+ },
395
414
  ];
396
- export function buildQuotteryDisputeInput(input, identityToPublicKey = (_identity) => new Uint8Array(32)) {
397
- return buildPayload(QUOTTERY_DISPUTE_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
415
+ export function buildQuotteryPublishResultInput(input) {
416
+ return { contractIndex: QUOTTERY_CONTRACT_INDEX, inputType: QUOTTERY_PUBLISH_RESULT_INPUT_TYPE, payload: buildPayload(QUOTTERY_PUBLISH_RESULT_INPUT_FIELDS, STRUCTS, input, (_) => new Uint8Array(32)) };
398
417
  }
399
- export const QUOTTERY_USER_CLAIM_REWARD_INPUT_TYPE = 14;
400
- const QUOTTERY_USER_CLAIM_REWARD_INPUT_FIELDS = [
418
+ export const QUOTTERY_TRY_FINALIZE_EVENT_INPUT_TYPE = 7;
419
+ const QUOTTERY_TRY_FINALIZE_EVENT_INPUT_FIELDS = [
401
420
  {
402
421
  name: 'eventId',
403
422
  type: 'uint64',
@@ -405,31 +424,22 @@ const QUOTTERY_USER_CLAIM_REWARD_INPUT_FIELDS = [
405
424
  byteLength: 8,
406
425
  },
407
426
  ];
408
- export function buildQuotteryUserClaimRewardInput(input, identityToPublicKey = (_identity) => new Uint8Array(32)) {
409
- return buildPayload(QUOTTERY_USER_CLAIM_REWARD_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
427
+ export function buildQuotteryTryFinalizeEventInput(input) {
428
+ return { contractIndex: QUOTTERY_CONTRACT_INDEX, inputType: QUOTTERY_TRY_FINALIZE_EVENT_INPUT_TYPE, payload: buildPayload(QUOTTERY_TRY_FINALIZE_EVENT_INPUT_FIELDS, STRUCTS, input, (_) => new Uint8Array(32)) };
410
429
  }
411
- export const QUOTTERY_GO_FORCE_CLAIM_REWARD_INPUT_TYPE = 15;
412
- const QUOTTERY_GO_FORCE_CLAIM_REWARD_INPUT_FIELDS = [
430
+ export const QUOTTERY_DISPUTE_INPUT_TYPE = 8;
431
+ const QUOTTERY_DISPUTE_INPUT_FIELDS = [
413
432
  {
414
433
  name: 'eventId',
415
434
  type: 'uint64',
416
435
  offset: 0,
417
436
  byteLength: 8,
418
437
  },
419
- {
420
- name: 'pubkeys',
421
- type: 'array',
422
- offset: 8,
423
- byteLength: 512,
424
- arrayLength: 16,
425
- arrayItemType: 'id',
426
- arrayItemByteLength: 32,
427
- },
428
438
  ];
429
- export function buildQuotteryGOForceClaimRewardInput(input, identityToPublicKey = (_identity) => new Uint8Array(32)) {
430
- return buildPayload(QUOTTERY_GO_FORCE_CLAIM_REWARD_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
439
+ export function buildQuotteryDisputeInput(input) {
440
+ return { contractIndex: QUOTTERY_CONTRACT_INDEX, inputType: QUOTTERY_DISPUTE_INPUT_TYPE, payload: buildPayload(QUOTTERY_DISPUTE_INPUT_FIELDS, STRUCTS, input, (_) => new Uint8Array(32)) };
431
441
  }
432
- export const QUOTTERY_RESOLVE_DISPUTE_INPUT_TYPE = 17;
442
+ export const QUOTTERY_RESOLVE_DISPUTE_INPUT_TYPE = 9;
433
443
  const QUOTTERY_RESOLVE_DISPUTE_INPUT_FIELDS = [
434
444
  {
435
445
  name: 'eventId',
@@ -444,11 +454,11 @@ const QUOTTERY_RESOLVE_DISPUTE_INPUT_FIELDS = [
444
454
  byteLength: 8,
445
455
  },
446
456
  ];
447
- export function buildQuotteryResolveDisputeInput(input, identityToPublicKey = (_identity) => new Uint8Array(32)) {
448
- return buildPayload(QUOTTERY_RESOLVE_DISPUTE_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
457
+ export function buildQuotteryResolveDisputeInput(input) {
458
+ return { contractIndex: QUOTTERY_CONTRACT_INDEX, inputType: QUOTTERY_RESOLVE_DISPUTE_INPUT_TYPE, payload: buildPayload(QUOTTERY_RESOLVE_DISPUTE_INPUT_FIELDS, STRUCTS, input, (_) => new Uint8Array(32)) };
449
459
  }
450
- export const QUOTTERY_TRY_FINALIZE_EVENT_INPUT_TYPE = 18;
451
- const QUOTTERY_TRY_FINALIZE_EVENT_INPUT_FIELDS = [
460
+ export const QUOTTERY_USER_CLAIM_REWARD_INPUT_TYPE = 10;
461
+ const QUOTTERY_USER_CLAIM_REWARD_INPUT_FIELDS = [
452
462
  {
453
463
  name: 'eventId',
454
464
  type: 'uint64',
@@ -456,24 +466,11 @@ const QUOTTERY_TRY_FINALIZE_EVENT_INPUT_FIELDS = [
456
466
  byteLength: 8,
457
467
  },
458
468
  ];
459
- export function buildQuotteryTryFinalizeEventInput(input, identityToPublicKey = (_identity) => new Uint8Array(32)) {
460
- return buildPayload(QUOTTERY_TRY_FINALIZE_EVENT_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
461
- }
462
- export const QUOTTERY_CREATE_EVENT_INPUT_TYPE = 21;
463
- const QUOTTERY_CREATE_EVENT_INPUT_FIELDS = [
464
- {
465
- name: 'qei',
466
- type: 'struct',
467
- offset: 0,
468
- byteLength: 280,
469
- structRef: 'QtryEventInfo',
470
- },
471
- ];
472
- export function buildQuotteryCreateEventInput(input, identityToPublicKey = (_identity) => new Uint8Array(32)) {
473
- return buildPayload(QUOTTERY_CREATE_EVENT_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
469
+ export function buildQuotteryUserClaimRewardInput(input) {
470
+ return { contractIndex: QUOTTERY_CONTRACT_INDEX, inputType: QUOTTERY_USER_CLAIM_REWARD_INPUT_TYPE, payload: buildPayload(QUOTTERY_USER_CLAIM_REWARD_INPUT_FIELDS, STRUCTS, input, (_) => new Uint8Array(32)) };
474
471
  }
475
- export const QUOTTERY_PUBLISH_RESULT_INPUT_TYPE = 22;
476
- const QUOTTERY_PUBLISH_RESULT_INPUT_FIELDS = [
472
+ export const QUOTTERY_GO_FORCE_CLAIM_REWARD_INPUT_TYPE = 11;
473
+ const QUOTTERY_GO_FORCE_CLAIM_REWARD_INPUT_FIELDS = [
477
474
  {
478
475
  name: 'eventId',
479
476
  type: 'uint64',
@@ -481,83 +478,85 @@ const QUOTTERY_PUBLISH_RESULT_INPUT_FIELDS = [
481
478
  byteLength: 8,
482
479
  },
483
480
  {
484
- name: 'option',
485
- type: 'uint64',
481
+ name: 'pubkeys',
482
+ type: 'array',
486
483
  offset: 8,
487
- byteLength: 8,
484
+ byteLength: 512,
485
+ arrayLength: 16,
486
+ arrayItemType: 'id',
487
+ arrayItemByteLength: 32,
488
488
  },
489
489
  ];
490
- export function buildQuotteryPublishResultInput(input, identityToPublicKey = (_identity) => new Uint8Array(32)) {
491
- return buildPayload(QUOTTERY_PUBLISH_RESULT_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
490
+ export function buildQuotteryGOForceClaimRewardInput(input, identityToPublicKey) {
491
+ return { contractIndex: QUOTTERY_CONTRACT_INDEX, inputType: QUOTTERY_GO_FORCE_CLAIM_REWARD_INPUT_TYPE, payload: buildPayload(QUOTTERY_GO_FORCE_CLAIM_REWARD_INPUT_FIELDS, STRUCTS, input, identityToPublicKey) };
492
492
  }
493
- export const QUOTTERY_UPDATE_FEE_DISCOUNT_LIST_INPUT_TYPE = 24;
494
- const QUOTTERY_UPDATE_FEE_DISCOUNT_LIST_INPUT_FIELDS = [
493
+ export const QUOTTERY_TRANSFER_QUSD_INPUT_TYPE = 12;
494
+ const QUOTTERY_TRANSFER_QUSD_INPUT_FIELDS = [
495
495
  {
496
- name: 'userId',
496
+ name: 'receiver',
497
497
  type: 'id',
498
498
  offset: 0,
499
499
  byteLength: 32,
500
500
  },
501
501
  {
502
- name: 'newFeeRate',
503
- type: 'uint64',
502
+ name: 'amount',
503
+ type: 'sint64',
504
504
  offset: 32,
505
505
  byteLength: 8,
506
506
  },
507
- {
508
- name: 'ops',
509
- type: 'uint64',
510
- offset: 40,
511
- byteLength: 8,
512
- },
513
507
  ];
514
- export function buildQuotteryUpdateFeeDiscountListInput(input, identityToPublicKey = (_identity) => new Uint8Array(32)) {
515
- return buildPayload(QUOTTERY_UPDATE_FEE_DISCOUNT_LIST_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
508
+ export function buildQuotteryTransferQUSDInput(input, identityToPublicKey) {
509
+ return { contractIndex: QUOTTERY_CONTRACT_INDEX, inputType: QUOTTERY_TRANSFER_QUSD_INPUT_TYPE, payload: buildPayload(QUOTTERY_TRANSFER_QUSD_INPUT_FIELDS, STRUCTS, input, identityToPublicKey) };
516
510
  }
517
- export const QUOTTERY_CLEAN_MEMORY_INPUT_TYPE = 26;
518
- export const QUOTTERY_PROPOSAL_VOTE_INPUT_TYPE = 27;
519
- const QUOTTERY_PROPOSAL_VOTE_INPUT_FIELDS = [
511
+ const QUOTTERY_TRANSFER_QUSD_OUTPUT_FIELDS = [
520
512
  {
521
- name: 'proposed',
522
- type: 'struct',
513
+ name: 'amount',
514
+ type: 'uint64',
523
515
  offset: 0,
524
- byteLength: 72,
525
- structRef: 'QtryGOV',
516
+ byteLength: 8,
526
517
  },
527
518
  ];
528
- export function buildQuotteryProposalVoteInput(input, identityToPublicKey = (_identity) => new Uint8Array(32)) {
529
- return buildPayload(QUOTTERY_PROPOSAL_VOTE_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
519
+ export function decodeQuotteryTransferQUSDOutput(data) {
520
+ return decodePayload(data, QUOTTERY_TRANSFER_QUSD_OUTPUT_FIELDS, STRUCTS, (_pk) => 'A'.repeat(60));
530
521
  }
531
- export const QUOTTERY_TRANSFER_QUSD_INPUT_TYPE = 31;
532
- const QUOTTERY_TRANSFER_QUSD_INPUT_FIELDS = [
522
+ export const QUOTTERY_TRANSFER_SHARE_MANAGEMENT_RIGHTS_INPUT_TYPE = 13;
523
+ const QUOTTERY_TRANSFER_SHARE_MANAGEMENT_RIGHTS_INPUT_FIELDS = [
533
524
  {
534
- name: 'receiver',
535
- type: 'id',
525
+ name: 'asset',
526
+ type: 'struct',
536
527
  offset: 0,
537
- byteLength: 32,
528
+ byteLength: 40,
529
+ structRef: 'Asset',
538
530
  },
539
531
  {
540
- name: 'amount',
532
+ name: 'numberOfShares',
541
533
  type: 'sint64',
542
- offset: 32,
534
+ offset: 40,
543
535
  byteLength: 8,
544
536
  },
537
+ {
538
+ name: 'newManagingContractIndex',
539
+ type: 'uint32',
540
+ offset: 48,
541
+ byteLength: 4,
542
+ },
545
543
  ];
546
- export function buildQuotteryTransferQUSDInput(input, identityToPublicKey = (_identity) => new Uint8Array(32)) {
547
- return buildPayload(QUOTTERY_TRANSFER_QUSD_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
544
+ export function buildQuotteryTransferShareManagementRightsInput(input) {
545
+ return { contractIndex: QUOTTERY_CONTRACT_INDEX, inputType: QUOTTERY_TRANSFER_SHARE_MANAGEMENT_RIGHTS_INPUT_TYPE, payload: buildPayload(QUOTTERY_TRANSFER_SHARE_MANAGEMENT_RIGHTS_INPUT_FIELDS, STRUCTS, input, (_) => new Uint8Array(32)) };
548
546
  }
549
- const QUOTTERY_TRANSFER_QUSD_OUTPUT_FIELDS = [
547
+ const QUOTTERY_TRANSFER_SHARE_MANAGEMENT_RIGHTS_OUTPUT_FIELDS = [
550
548
  {
551
- name: 'amount',
552
- type: 'uint64',
549
+ name: 'transferredNumberOfShares',
550
+ type: 'sint64',
553
551
  offset: 0,
554
552
  byteLength: 8,
555
553
  },
556
554
  ];
557
- export function decodeQuotteryTransferQUSDOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
558
- return decodePayload(data, QUOTTERY_TRANSFER_QUSD_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
555
+ export function decodeQuotteryTransferShareManagementRightsOutput(data) {
556
+ return decodePayload(data, QUOTTERY_TRANSFER_SHARE_MANAGEMENT_RIGHTS_OUTPUT_FIELDS, STRUCTS, (_pk) => 'A'.repeat(60));
559
557
  }
560
- export const QUOTTERY_TRANSFER_QTRYGOV_INPUT_TYPE = 32;
558
+ export const QUOTTERY_CLEAN_MEMORY_INPUT_TYPE = 14;
559
+ export const QUOTTERY_TRANSFER_QTRYGOV_INPUT_TYPE = 15;
561
560
  const QUOTTERY_TRANSFER_QTRYGOV_INPUT_FIELDS = [
562
561
  {
563
562
  name: 'receiver',
@@ -572,8 +571,8 @@ const QUOTTERY_TRANSFER_QTRYGOV_INPUT_FIELDS = [
572
571
  byteLength: 8,
573
572
  },
574
573
  ];
575
- export function buildQuotteryTransferQTRYGOVInput(input, identityToPublicKey = (_identity) => new Uint8Array(32)) {
576
- return buildPayload(QUOTTERY_TRANSFER_QTRYGOV_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
574
+ export function buildQuotteryTransferQTRYGOVInput(input, identityToPublicKey) {
575
+ return { contractIndex: QUOTTERY_CONTRACT_INDEX, inputType: QUOTTERY_TRANSFER_QTRYGOV_INPUT_TYPE, payload: buildPayload(QUOTTERY_TRANSFER_QTRYGOV_INPUT_FIELDS, STRUCTS, input, identityToPublicKey) };
577
576
  }
578
577
  const QUOTTERY_TRANSFER_QTRYGOV_OUTPUT_FIELDS = [
579
578
  {
@@ -583,44 +582,45 @@ const QUOTTERY_TRANSFER_QTRYGOV_OUTPUT_FIELDS = [
583
582
  byteLength: 8,
584
583
  },
585
584
  ];
586
- export function decodeQuotteryTransferQTRYGOVOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
587
- return decodePayload(data, QUOTTERY_TRANSFER_QTRYGOV_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
585
+ export function decodeQuotteryTransferQTRYGOVOutput(data) {
586
+ return decodePayload(data, QUOTTERY_TRANSFER_QTRYGOV_OUTPUT_FIELDS, STRUCTS, (_pk) => 'A'.repeat(60));
588
587
  }
589
- export const QUOTTERY_TRANSFER_SHARE_MANAGEMENT_RIGHTS_INPUT_TYPE = 33;
590
- const QUOTTERY_TRANSFER_SHARE_MANAGEMENT_RIGHTS_INPUT_FIELDS = [
588
+ export const QUOTTERY_UPDATE_FEE_DISCOUNT_LIST_INPUT_TYPE = 20;
589
+ const QUOTTERY_UPDATE_FEE_DISCOUNT_LIST_INPUT_FIELDS = [
591
590
  {
592
- name: 'asset',
593
- type: 'struct',
591
+ name: 'userId',
592
+ type: 'id',
594
593
  offset: 0,
595
- byteLength: 40,
596
- structRef: 'Asset',
594
+ byteLength: 32,
597
595
  },
598
596
  {
599
- name: 'numberOfShares',
600
- type: 'sint64',
601
- offset: 40,
597
+ name: 'newFeeRate',
598
+ type: 'uint64',
599
+ offset: 32,
602
600
  byteLength: 8,
603
601
  },
604
602
  {
605
- name: 'newManagingContractIndex',
606
- type: 'uint32',
607
- offset: 48,
608
- byteLength: 4,
603
+ name: 'ops',
604
+ type: 'uint64',
605
+ offset: 40,
606
+ byteLength: 8,
609
607
  },
610
608
  ];
611
- export function buildQuotteryTransferShareManagementRightsInput(input, identityToPublicKey = (_identity) => new Uint8Array(32)) {
612
- return buildPayload(QUOTTERY_TRANSFER_SHARE_MANAGEMENT_RIGHTS_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
609
+ export function buildQuotteryUpdateFeeDiscountListInput(input, identityToPublicKey) {
610
+ return { contractIndex: QUOTTERY_CONTRACT_INDEX, inputType: QUOTTERY_UPDATE_FEE_DISCOUNT_LIST_INPUT_TYPE, payload: buildPayload(QUOTTERY_UPDATE_FEE_DISCOUNT_LIST_INPUT_FIELDS, STRUCTS, input, identityToPublicKey) };
613
611
  }
614
- const QUOTTERY_TRANSFER_SHARE_MANAGEMENT_RIGHTS_OUTPUT_FIELDS = [
612
+ export const QUOTTERY_PROPOSAL_VOTE_INPUT_TYPE = 100;
613
+ const QUOTTERY_PROPOSAL_VOTE_INPUT_FIELDS = [
615
614
  {
616
- name: 'transferredNumberOfShares',
617
- type: 'sint64',
615
+ name: 'proposed',
616
+ type: 'struct',
618
617
  offset: 0,
619
- byteLength: 8,
618
+ byteLength: 72,
619
+ structRef: 'QtryGOV',
620
620
  },
621
621
  ];
622
- export function decodeQuotteryTransferShareManagementRightsOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
623
- return decodePayload(data, QUOTTERY_TRANSFER_SHARE_MANAGEMENT_RIGHTS_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
622
+ export function buildQuotteryProposalVoteInput(input) {
623
+ return { contractIndex: QUOTTERY_CONTRACT_INDEX, inputType: QUOTTERY_PROPOSAL_VOTE_INPUT_TYPE, payload: buildPayload(QUOTTERY_PROPOSAL_VOTE_INPUT_FIELDS, STRUCTS, input, (_) => new Uint8Array(32)) };
624
624
  }
625
625
  export const QUOTTERY_BASIC_INFO_INPUT_TYPE = 1;
626
626
  export const QUOTTERY_BASIC_INFO_INPUT_SIZE = 0;
@@ -692,7 +692,7 @@ const QUOTTERY_BASIC_INFO_OUTPUT_FIELDS = [
692
692
  byteLength: 32,
693
693
  },
694
694
  ];
695
- export function decodeQuotteryBasicInfoOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
695
+ export function decodeQuotteryBasicInfoOutput(data, publicKeyToIdentity) {
696
696
  return decodePayload(data, QUOTTERY_BASIC_INFO_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
697
697
  }
698
698
  export async function quotteryBasicInfo(live, options) {
@@ -708,7 +708,7 @@ export async function quotteryBasicInfo(live, options) {
708
708
  ...options,
709
709
  });
710
710
  }
711
- export const QUOTTERY_GET_EVENT_INFO_INPUT_TYPE = 7;
711
+ export const QUOTTERY_GET_EVENT_INFO_INPUT_TYPE = 2;
712
712
  export const QUOTTERY_GET_EVENT_INFO_INPUT_SIZE = 8;
713
713
  const QUOTTERY_GET_EVENT_INFO_INPUT_FIELDS = [
714
714
  {
@@ -718,8 +718,8 @@ const QUOTTERY_GET_EVENT_INFO_INPUT_FIELDS = [
718
718
  byteLength: 8,
719
719
  },
720
720
  ];
721
- export function buildQuotteryGetEventInfoInput(input, identityToPublicKey = (_identity) => new Uint8Array(32)) {
722
- return buildPayload(QUOTTERY_GET_EVENT_INFO_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
721
+ export function buildQuotteryGetEventInfoInput(input) {
722
+ return buildPayload(QUOTTERY_GET_EVENT_INFO_INPUT_FIELDS, STRUCTS, input, (_) => new Uint8Array(32));
723
723
  }
724
724
  const QUOTTERY_GET_EVENT_INFO_OUTPUT_FIELDS = [
725
725
  {
@@ -761,8 +761,8 @@ const QUOTTERY_GET_EVENT_INFO_OUTPUT_FIELDS = [
761
761
  byteLength: 4,
762
762
  },
763
763
  ];
764
- export function decodeQuotteryGetEventInfoOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
765
- return decodePayload(data, QUOTTERY_GET_EVENT_INFO_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
764
+ export function decodeQuotteryGetEventInfoOutput(data) {
765
+ return decodePayload(data, QUOTTERY_GET_EVENT_INFO_OUTPUT_FIELDS, STRUCTS, (_pk) => 'A'.repeat(60));
766
766
  }
767
767
  export async function quotteryGetEventInfo(live, input, options) {
768
768
  return callContractFunction({
@@ -777,50 +777,65 @@ export async function quotteryGetEventInfo(live, input, options) {
777
777
  ...options,
778
778
  });
779
779
  }
780
- export const QUOTTERY_GET_EVENT_INFO_BATCH_INPUT_TYPE = 8;
781
- export const QUOTTERY_GET_EVENT_INFO_BATCH_INPUT_SIZE = 512;
782
- const QUOTTERY_GET_EVENT_INFO_BATCH_INPUT_FIELDS = [
780
+ export const QUOTTERY_GET_ORDERS_INPUT_TYPE = 3;
781
+ export const QUOTTERY_GET_ORDERS_INPUT_SIZE = 32;
782
+ const QUOTTERY_GET_ORDERS_INPUT_FIELDS = [
783
783
  {
784
- name: 'eventIds',
785
- type: 'array',
784
+ name: 'eventId',
785
+ type: 'uint64',
786
786
  offset: 0,
787
- byteLength: 512,
788
- arrayLength: 64,
789
- arrayItemType: 'uint64',
790
- arrayItemByteLength: 8,
787
+ byteLength: 8,
788
+ },
789
+ {
790
+ name: 'option',
791
+ type: 'uint64',
792
+ offset: 8,
793
+ byteLength: 8,
794
+ },
795
+ {
796
+ name: 'isBid',
797
+ type: 'uint64',
798
+ offset: 16,
799
+ byteLength: 8,
800
+ },
801
+ {
802
+ name: 'offset',
803
+ type: 'uint64',
804
+ offset: 24,
805
+ byteLength: 8,
791
806
  },
792
807
  ];
793
- export function buildQuotteryGetEventInfoBatchInput(input, identityToPublicKey = (_identity) => new Uint8Array(32)) {
794
- return buildPayload(QUOTTERY_GET_EVENT_INFO_BATCH_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
808
+ export function buildQuotteryGetOrdersInput(input) {
809
+ return buildPayload(QUOTTERY_GET_ORDERS_INPUT_FIELDS, STRUCTS, input, (_) => new Uint8Array(32));
795
810
  }
796
- const QUOTTERY_GET_EVENT_INFO_BATCH_OUTPUT_FIELDS = [
811
+ const QUOTTERY_GET_ORDERS_OUTPUT_FIELDS = [
797
812
  {
798
- name: 'aqei',
813
+ name: 'orders',
799
814
  type: 'array',
800
815
  offset: 0,
801
- byteLength: 17920,
802
- arrayLength: 64,
803
- arrayItemByteLength: 280,
804
- arrayItemStructRef: 'QtryEventInfo',
816
+ byteLength: 12288,
817
+ arrayLength: 256,
818
+ arrayItemByteLength: 48,
819
+ arrayItemStructRef: 'QtryOrderWithPrice',
805
820
  },
806
821
  ];
807
- export function decodeQuotteryGetEventInfoBatchOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
808
- return decodePayload(data, QUOTTERY_GET_EVENT_INFO_BATCH_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
822
+ export function decodeQuotteryGetOrdersOutput(data) {
823
+ return decodePayload(data, QUOTTERY_GET_ORDERS_OUTPUT_FIELDS, STRUCTS, (_pk) => 'A'.repeat(60));
809
824
  }
810
- export async function quotteryGetEventInfoBatch(live, input, options) {
825
+ export async function quotteryGetOrders(live, input, options) {
811
826
  return callContractFunction({
812
827
  live,
813
828
  contractIndex: QUOTTERY_CONTRACT_INDEX,
814
- inputType: QUOTTERY_GET_EVENT_INFO_BATCH_INPUT_TYPE,
815
- inputSize: QUOTTERY_GET_EVENT_INFO_BATCH_INPUT_SIZE,
816
- inputFields: QUOTTERY_GET_EVENT_INFO_BATCH_INPUT_FIELDS,
817
- outputFields: QUOTTERY_GET_EVENT_INFO_BATCH_OUTPUT_FIELDS,
829
+ inputType: QUOTTERY_GET_ORDERS_INPUT_TYPE,
830
+ inputSize: QUOTTERY_GET_ORDERS_INPUT_SIZE,
831
+ inputFields: QUOTTERY_GET_ORDERS_INPUT_FIELDS,
832
+ outputFields: QUOTTERY_GET_ORDERS_OUTPUT_FIELDS,
818
833
  structs: STRUCTS,
819
834
  input: input,
820
835
  ...options,
821
836
  });
822
837
  }
823
- export const QUOTTERY_GET_ACTIVE_EVENT_INPUT_TYPE = 19;
838
+ export const QUOTTERY_GET_ACTIVE_EVENT_INPUT_TYPE = 4;
824
839
  export const QUOTTERY_GET_ACTIVE_EVENT_INPUT_SIZE = 0;
825
840
  const QUOTTERY_GET_ACTIVE_EVENT_OUTPUT_FIELDS = [
826
841
  {
@@ -833,8 +848,8 @@ const QUOTTERY_GET_ACTIVE_EVENT_OUTPUT_FIELDS = [
833
848
  arrayItemByteLength: 8,
834
849
  },
835
850
  ];
836
- export function decodeQuotteryGetActiveEventOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
837
- return decodePayload(data, QUOTTERY_GET_ACTIVE_EVENT_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
851
+ export function decodeQuotteryGetActiveEventOutput(data) {
852
+ return decodePayload(data, QUOTTERY_GET_ACTIVE_EVENT_OUTPUT_FIELDS, STRUCTS, (_pk) => 'A'.repeat(60));
838
853
  }
839
854
  export async function quotteryGetActiveEvent(live, options) {
840
855
  return callContractFunction({
@@ -849,7 +864,50 @@ export async function quotteryGetActiveEvent(live, options) {
849
864
  ...options,
850
865
  });
851
866
  }
852
- export const QUOTTERY_GET_USER_POSITION_INPUT_TYPE = 20;
867
+ export const QUOTTERY_GET_EVENT_INFO_BATCH_INPUT_TYPE = 5;
868
+ export const QUOTTERY_GET_EVENT_INFO_BATCH_INPUT_SIZE = 512;
869
+ const QUOTTERY_GET_EVENT_INFO_BATCH_INPUT_FIELDS = [
870
+ {
871
+ name: 'eventIds',
872
+ type: 'array',
873
+ offset: 0,
874
+ byteLength: 512,
875
+ arrayLength: 64,
876
+ arrayItemType: 'uint64',
877
+ arrayItemByteLength: 8,
878
+ },
879
+ ];
880
+ export function buildQuotteryGetEventInfoBatchInput(input) {
881
+ return buildPayload(QUOTTERY_GET_EVENT_INFO_BATCH_INPUT_FIELDS, STRUCTS, input, (_) => new Uint8Array(32));
882
+ }
883
+ const QUOTTERY_GET_EVENT_INFO_BATCH_OUTPUT_FIELDS = [
884
+ {
885
+ name: 'aqei',
886
+ type: 'array',
887
+ offset: 0,
888
+ byteLength: 17920,
889
+ arrayLength: 64,
890
+ arrayItemByteLength: 280,
891
+ arrayItemStructRef: 'QtryEventInfo',
892
+ },
893
+ ];
894
+ export function decodeQuotteryGetEventInfoBatchOutput(data) {
895
+ return decodePayload(data, QUOTTERY_GET_EVENT_INFO_BATCH_OUTPUT_FIELDS, STRUCTS, (_pk) => 'A'.repeat(60));
896
+ }
897
+ export async function quotteryGetEventInfoBatch(live, input, options) {
898
+ return callContractFunction({
899
+ live,
900
+ contractIndex: QUOTTERY_CONTRACT_INDEX,
901
+ inputType: QUOTTERY_GET_EVENT_INFO_BATCH_INPUT_TYPE,
902
+ inputSize: QUOTTERY_GET_EVENT_INFO_BATCH_INPUT_SIZE,
903
+ inputFields: QUOTTERY_GET_EVENT_INFO_BATCH_INPUT_FIELDS,
904
+ outputFields: QUOTTERY_GET_EVENT_INFO_BATCH_OUTPUT_FIELDS,
905
+ structs: STRUCTS,
906
+ input: input,
907
+ ...options,
908
+ });
909
+ }
910
+ export const QUOTTERY_GET_USER_POSITION_INPUT_TYPE = 6;
853
911
  export const QUOTTERY_GET_USER_POSITION_INPUT_SIZE = 32;
854
912
  const QUOTTERY_GET_USER_POSITION_INPUT_FIELDS = [
855
913
  {
@@ -859,7 +917,7 @@ const QUOTTERY_GET_USER_POSITION_INPUT_FIELDS = [
859
917
  byteLength: 32,
860
918
  },
861
919
  ];
862
- export function buildQuotteryGetUserPositionInput(input, identityToPublicKey = (_identity) => new Uint8Array(32)) {
920
+ export function buildQuotteryGetUserPositionInput(input, identityToPublicKey) {
863
921
  return buildPayload(QUOTTERY_GET_USER_POSITION_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
864
922
  }
865
923
  const QUOTTERY_GET_USER_POSITION_OUTPUT_FIELDS = [
@@ -879,8 +937,8 @@ const QUOTTERY_GET_USER_POSITION_OUTPUT_FIELDS = [
879
937
  arrayItemStructRef: 'PositionInfo',
880
938
  },
881
939
  ];
882
- export function decodeQuotteryGetUserPositionOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
883
- return decodePayload(data, QUOTTERY_GET_USER_POSITION_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
940
+ export function decodeQuotteryGetUserPositionOutput(data) {
941
+ return decodePayload(data, QUOTTERY_GET_USER_POSITION_OUTPUT_FIELDS, STRUCTS, (_pk) => 'A'.repeat(60));
884
942
  }
885
943
  export async function quotteryGetUserPosition(live, input, options) {
886
944
  return callContractFunction({
@@ -895,65 +953,44 @@ export async function quotteryGetUserPosition(live, input, options) {
895
953
  ...options,
896
954
  });
897
955
  }
898
- export const QUOTTERY_GET_ORDERS_INPUT_TYPE = 23;
899
- export const QUOTTERY_GET_ORDERS_INPUT_SIZE = 32;
900
- const QUOTTERY_GET_ORDERS_INPUT_FIELDS = [
956
+ export const QUOTTERY_GET_APPROVED_AMOUNT_INPUT_TYPE = 7;
957
+ export const QUOTTERY_GET_APPROVED_AMOUNT_INPUT_SIZE = 32;
958
+ const QUOTTERY_GET_APPROVED_AMOUNT_INPUT_FIELDS = [
901
959
  {
902
- name: 'eventId',
903
- type: 'uint64',
960
+ name: 'pk',
961
+ type: 'id',
904
962
  offset: 0,
905
- byteLength: 8,
906
- },
907
- {
908
- name: 'option',
909
- type: 'uint64',
910
- offset: 8,
911
- byteLength: 8,
912
- },
913
- {
914
- name: 'isBid',
915
- type: 'uint64',
916
- offset: 16,
917
- byteLength: 8,
918
- },
919
- {
920
- name: 'offset',
921
- type: 'uint64',
922
- offset: 24,
923
- byteLength: 8,
963
+ byteLength: 32,
924
964
  },
925
965
  ];
926
- export function buildQuotteryGetOrdersInput(input, identityToPublicKey = (_identity) => new Uint8Array(32)) {
927
- return buildPayload(QUOTTERY_GET_ORDERS_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
966
+ export function buildQuotteryGetApprovedAmountInput(input, identityToPublicKey) {
967
+ return buildPayload(QUOTTERY_GET_APPROVED_AMOUNT_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
928
968
  }
929
- const QUOTTERY_GET_ORDERS_OUTPUT_FIELDS = [
969
+ const QUOTTERY_GET_APPROVED_AMOUNT_OUTPUT_FIELDS = [
930
970
  {
931
- name: 'orders',
932
- type: 'array',
971
+ name: 'amount',
972
+ type: 'uint64',
933
973
  offset: 0,
934
- byteLength: 12288,
935
- arrayLength: 256,
936
- arrayItemByteLength: 48,
937
- arrayItemStructRef: 'QtryOrderWithPrice',
974
+ byteLength: 8,
938
975
  },
939
976
  ];
940
- export function decodeQuotteryGetOrdersOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
941
- return decodePayload(data, QUOTTERY_GET_ORDERS_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
977
+ export function decodeQuotteryGetApprovedAmountOutput(data) {
978
+ return decodePayload(data, QUOTTERY_GET_APPROVED_AMOUNT_OUTPUT_FIELDS, STRUCTS, (_pk) => 'A'.repeat(60));
942
979
  }
943
- export async function quotteryGetOrders(live, input, options) {
980
+ export async function quotteryGetApprovedAmount(live, input, options) {
944
981
  return callContractFunction({
945
982
  live,
946
983
  contractIndex: QUOTTERY_CONTRACT_INDEX,
947
- inputType: QUOTTERY_GET_ORDERS_INPUT_TYPE,
948
- inputSize: QUOTTERY_GET_ORDERS_INPUT_SIZE,
949
- inputFields: QUOTTERY_GET_ORDERS_INPUT_FIELDS,
950
- outputFields: QUOTTERY_GET_ORDERS_OUTPUT_FIELDS,
984
+ inputType: QUOTTERY_GET_APPROVED_AMOUNT_INPUT_TYPE,
985
+ inputSize: QUOTTERY_GET_APPROVED_AMOUNT_INPUT_SIZE,
986
+ inputFields: QUOTTERY_GET_APPROVED_AMOUNT_INPUT_FIELDS,
987
+ outputFields: QUOTTERY_GET_APPROVED_AMOUNT_OUTPUT_FIELDS,
951
988
  structs: STRUCTS,
952
989
  input: input,
953
990
  ...options,
954
991
  });
955
992
  }
956
- export const QUOTTERY_GET_TOP_PROPOSALS_INPUT_TYPE = 29;
993
+ export const QUOTTERY_GET_TOP_PROPOSALS_INPUT_TYPE = 8;
957
994
  export const QUOTTERY_GET_TOP_PROPOSALS_INPUT_SIZE = 0;
958
995
  const QUOTTERY_GET_TOP_PROPOSALS_OUTPUT_FIELDS = [
959
996
  {
@@ -972,8 +1009,8 @@ const QUOTTERY_GET_TOP_PROPOSALS_OUTPUT_FIELDS = [
972
1009
  byteLength: 4,
973
1010
  },
974
1011
  ];
975
- export function decodeQuotteryGetTopProposalsOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
976
- return decodePayload(data, QUOTTERY_GET_TOP_PROPOSALS_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
1012
+ export function decodeQuotteryGetTopProposalsOutput(data) {
1013
+ return decodePayload(data, QUOTTERY_GET_TOP_PROPOSALS_OUTPUT_FIELDS, STRUCTS, (_pk) => 'A'.repeat(60));
977
1014
  }
978
1015
  export async function quotteryGetTopProposals(live, options) {
979
1016
  return callContractFunction({
@@ -988,75 +1025,38 @@ export async function quotteryGetTopProposals(live, options) {
988
1025
  ...options,
989
1026
  });
990
1027
  }
991
- export const QUOTTERY_GET_APPROVED_AMOUNT_INPUT_TYPE = 30;
992
- export const QUOTTERY_GET_APPROVED_AMOUNT_INPUT_SIZE = 32;
993
- const QUOTTERY_GET_APPROVED_AMOUNT_INPUT_FIELDS = [
994
- {
995
- name: 'pk',
996
- type: 'id',
997
- offset: 0,
998
- byteLength: 32,
999
- },
1000
- ];
1001
- export function buildQuotteryGetApprovedAmountInput(input, identityToPublicKey = (_identity) => new Uint8Array(32)) {
1002
- return buildPayload(QUOTTERY_GET_APPROVED_AMOUNT_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
1003
- }
1004
- const QUOTTERY_GET_APPROVED_AMOUNT_OUTPUT_FIELDS = [
1005
- {
1006
- name: 'amount',
1007
- type: 'uint64',
1008
- offset: 0,
1009
- byteLength: 8,
1010
- },
1011
- ];
1012
- export function decodeQuotteryGetApprovedAmountOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
1013
- return decodePayload(data, QUOTTERY_GET_APPROVED_AMOUNT_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
1014
- }
1015
- export async function quotteryGetApprovedAmount(live, input, options) {
1016
- return callContractFunction({
1017
- live,
1018
- contractIndex: QUOTTERY_CONTRACT_INDEX,
1019
- inputType: QUOTTERY_GET_APPROVED_AMOUNT_INPUT_TYPE,
1020
- inputSize: QUOTTERY_GET_APPROVED_AMOUNT_INPUT_SIZE,
1021
- inputFields: QUOTTERY_GET_APPROVED_AMOUNT_INPUT_FIELDS,
1022
- outputFields: QUOTTERY_GET_APPROVED_AMOUNT_OUTPUT_FIELDS,
1023
- structs: STRUCTS,
1024
- input: input,
1025
- ...options,
1026
- });
1027
- }
1028
1028
  export const quottery = {
1029
1029
  contractIndex: QUOTTERY_CONTRACT_INDEX,
1030
1030
  BasicInfo: quotteryBasicInfo,
1031
1031
  GetEventInfo: quotteryGetEventInfo,
1032
- GetEventInfoBatch: quotteryGetEventInfoBatch,
1032
+ GetOrders: quotteryGetOrders,
1033
1033
  GetActiveEvent: quotteryGetActiveEvent,
1034
+ GetEventInfoBatch: quotteryGetEventInfoBatch,
1034
1035
  GetUserPosition: quotteryGetUserPosition,
1035
- GetOrders: quotteryGetOrders,
1036
- GetTopProposals: quotteryGetTopProposals,
1037
1036
  GetApprovedAmount: quotteryGetApprovedAmount,
1037
+ GetTopProposals: quotteryGetTopProposals,
1038
+ buildCreateEventInput: buildQuotteryCreateEventInput,
1038
1039
  buildAddToAskOrderInput: buildQuotteryAddToAskOrderInput,
1039
1040
  decodeAddToAskOrderOutput: decodeQuotteryAddToAskOrderOutput,
1040
1041
  buildRemoveAskOrderInput: buildQuotteryRemoveAskOrderInput,
1041
1042
  decodeRemoveAskOrderOutput: decodeQuotteryRemoveAskOrderOutput,
1042
- buildRemoveBidOrderInput: buildQuotteryRemoveBidOrderInput,
1043
- decodeRemoveBidOrderOutput: decodeQuotteryRemoveBidOrderOutput,
1044
1043
  buildAddToBidOrderInput: buildQuotteryAddToBidOrderInput,
1045
1044
  decodeAddToBidOrderOutput: decodeQuotteryAddToBidOrderOutput,
1045
+ buildRemoveBidOrderInput: buildQuotteryRemoveBidOrderInput,
1046
+ decodeRemoveBidOrderOutput: decodeQuotteryRemoveBidOrderOutput,
1047
+ buildPublishResultInput: buildQuotteryPublishResultInput,
1048
+ buildTryFinalizeEventInput: buildQuotteryTryFinalizeEventInput,
1046
1049
  buildDisputeInput: buildQuotteryDisputeInput,
1050
+ buildResolveDisputeInput: buildQuotteryResolveDisputeInput,
1047
1051
  buildUserClaimRewardInput: buildQuotteryUserClaimRewardInput,
1048
1052
  buildGOForceClaimRewardInput: buildQuotteryGOForceClaimRewardInput,
1049
- buildResolveDisputeInput: buildQuotteryResolveDisputeInput,
1050
- buildTryFinalizeEventInput: buildQuotteryTryFinalizeEventInput,
1051
- buildCreateEventInput: buildQuotteryCreateEventInput,
1052
- buildPublishResultInput: buildQuotteryPublishResultInput,
1053
- buildUpdateFeeDiscountListInput: buildQuotteryUpdateFeeDiscountListInput,
1054
- buildProposalVoteInput: buildQuotteryProposalVoteInput,
1055
1053
  buildTransferQUSDInput: buildQuotteryTransferQUSDInput,
1056
1054
  decodeTransferQUSDOutput: decodeQuotteryTransferQUSDOutput,
1057
- buildTransferQTRYGOVInput: buildQuotteryTransferQTRYGOVInput,
1058
- decodeTransferQTRYGOVOutput: decodeQuotteryTransferQTRYGOVOutput,
1059
1055
  buildTransferShareManagementRightsInput: buildQuotteryTransferShareManagementRightsInput,
1060
1056
  decodeTransferShareManagementRightsOutput: decodeQuotteryTransferShareManagementRightsOutput,
1057
+ buildTransferQTRYGOVInput: buildQuotteryTransferQTRYGOVInput,
1058
+ decodeTransferQTRYGOVOutput: decodeQuotteryTransferQTRYGOVOutput,
1059
+ buildUpdateFeeDiscountListInput: buildQuotteryUpdateFeeDiscountListInput,
1060
+ buildProposalVoteInput: buildQuotteryProposalVoteInput,
1061
1061
  };
1062
1062
  //# sourceMappingURL=quottery.js.map