@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
@@ -225,8 +225,8 @@ const VOTTUN_BRIDGE_CREATE_ORDER_INPUT_FIELDS = [
225
225
  byteLength: 1,
226
226
  },
227
227
  ];
228
- export function buildVottunBridgeCreateOrderInput(input, identityToPublicKey = (_identity) => new Uint8Array(32)) {
229
- return buildPayload(VOTTUN_BRIDGE_CREATE_ORDER_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
228
+ export function buildVottunBridgeCreateOrderInput(input, identityToPublicKey) {
229
+ return { contractIndex: VOTTUN_BRIDGE_CONTRACT_INDEX, inputType: VOTTUN_BRIDGE_CREATE_ORDER_INPUT_TYPE, payload: buildPayload(VOTTUN_BRIDGE_CREATE_ORDER_INPUT_FIELDS, STRUCTS, input, identityToPublicKey) };
230
230
  }
231
231
  const VOTTUN_BRIDGE_CREATE_ORDER_OUTPUT_FIELDS = [
232
232
  {
@@ -242,10 +242,10 @@ const VOTTUN_BRIDGE_CREATE_ORDER_OUTPUT_FIELDS = [
242
242
  byteLength: 8,
243
243
  },
244
244
  ];
245
- export function decodeVottunBridgeCreateOrderOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
246
- return decodePayload(data, VOTTUN_BRIDGE_CREATE_ORDER_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
245
+ export function decodeVottunBridgeCreateOrderOutput(data) {
246
+ return decodePayload(data, VOTTUN_BRIDGE_CREATE_ORDER_OUTPUT_FIELDS, STRUCTS, (_pk) => 'A'.repeat(60));
247
247
  }
248
- export const VOTTUN_BRIDGE_COMPLETE_ORDER_INPUT_TYPE = 3;
248
+ export const VOTTUN_BRIDGE_COMPLETE_ORDER_INPUT_TYPE = 2;
249
249
  const VOTTUN_BRIDGE_COMPLETE_ORDER_INPUT_FIELDS = [
250
250
  {
251
251
  name: 'orderId',
@@ -254,8 +254,8 @@ const VOTTUN_BRIDGE_COMPLETE_ORDER_INPUT_FIELDS = [
254
254
  byteLength: 8,
255
255
  },
256
256
  ];
257
- export function buildVottunBridgeCompleteOrderInput(input, identityToPublicKey = (_identity) => new Uint8Array(32)) {
258
- return buildPayload(VOTTUN_BRIDGE_COMPLETE_ORDER_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
257
+ export function buildVottunBridgeCompleteOrderInput(input) {
258
+ return { contractIndex: VOTTUN_BRIDGE_CONTRACT_INDEX, inputType: VOTTUN_BRIDGE_COMPLETE_ORDER_INPUT_TYPE, payload: buildPayload(VOTTUN_BRIDGE_COMPLETE_ORDER_INPUT_FIELDS, STRUCTS, input, (_) => new Uint8Array(32)) };
259
259
  }
260
260
  const VOTTUN_BRIDGE_COMPLETE_ORDER_OUTPUT_FIELDS = [
261
261
  {
@@ -265,10 +265,10 @@ const VOTTUN_BRIDGE_COMPLETE_ORDER_OUTPUT_FIELDS = [
265
265
  byteLength: 1,
266
266
  },
267
267
  ];
268
- export function decodeVottunBridgeCompleteOrderOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
269
- return decodePayload(data, VOTTUN_BRIDGE_COMPLETE_ORDER_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
268
+ export function decodeVottunBridgeCompleteOrderOutput(data) {
269
+ return decodePayload(data, VOTTUN_BRIDGE_COMPLETE_ORDER_OUTPUT_FIELDS, STRUCTS, (_pk) => 'A'.repeat(60));
270
270
  }
271
- export const VOTTUN_BRIDGE_REFUND_ORDER_INPUT_TYPE = 4;
271
+ export const VOTTUN_BRIDGE_REFUND_ORDER_INPUT_TYPE = 3;
272
272
  const VOTTUN_BRIDGE_REFUND_ORDER_INPUT_FIELDS = [
273
273
  {
274
274
  name: 'orderId',
@@ -277,8 +277,8 @@ const VOTTUN_BRIDGE_REFUND_ORDER_INPUT_FIELDS = [
277
277
  byteLength: 8,
278
278
  },
279
279
  ];
280
- export function buildVottunBridgeRefundOrderInput(input, identityToPublicKey = (_identity) => new Uint8Array(32)) {
281
- return buildPayload(VOTTUN_BRIDGE_REFUND_ORDER_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
280
+ export function buildVottunBridgeRefundOrderInput(input) {
281
+ return { contractIndex: VOTTUN_BRIDGE_CONTRACT_INDEX, inputType: VOTTUN_BRIDGE_REFUND_ORDER_INPUT_TYPE, payload: buildPayload(VOTTUN_BRIDGE_REFUND_ORDER_INPUT_FIELDS, STRUCTS, input, (_) => new Uint8Array(32)) };
282
282
  }
283
283
  const VOTTUN_BRIDGE_REFUND_ORDER_OUTPUT_FIELDS = [
284
284
  {
@@ -288,10 +288,10 @@ const VOTTUN_BRIDGE_REFUND_ORDER_OUTPUT_FIELDS = [
288
288
  byteLength: 1,
289
289
  },
290
290
  ];
291
- export function decodeVottunBridgeRefundOrderOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
292
- return decodePayload(data, VOTTUN_BRIDGE_REFUND_ORDER_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
291
+ export function decodeVottunBridgeRefundOrderOutput(data) {
292
+ return decodePayload(data, VOTTUN_BRIDGE_REFUND_ORDER_OUTPUT_FIELDS, STRUCTS, (_pk) => 'A'.repeat(60));
293
293
  }
294
- export const VOTTUN_BRIDGE_TRANSFER_TO_CONTRACT_INPUT_TYPE = 5;
294
+ export const VOTTUN_BRIDGE_TRANSFER_TO_CONTRACT_INPUT_TYPE = 4;
295
295
  const VOTTUN_BRIDGE_TRANSFER_TO_CONTRACT_INPUT_FIELDS = [
296
296
  {
297
297
  name: 'amount',
@@ -306,8 +306,8 @@ const VOTTUN_BRIDGE_TRANSFER_TO_CONTRACT_INPUT_FIELDS = [
306
306
  byteLength: 8,
307
307
  },
308
308
  ];
309
- export function buildVottunBridgeTransferToContractInput(input, identityToPublicKey = (_identity) => new Uint8Array(32)) {
310
- return buildPayload(VOTTUN_BRIDGE_TRANSFER_TO_CONTRACT_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
309
+ export function buildVottunBridgeTransferToContractInput(input) {
310
+ return { contractIndex: VOTTUN_BRIDGE_CONTRACT_INDEX, inputType: VOTTUN_BRIDGE_TRANSFER_TO_CONTRACT_INPUT_TYPE, payload: buildPayload(VOTTUN_BRIDGE_TRANSFER_TO_CONTRACT_INPUT_FIELDS, STRUCTS, input, (_) => new Uint8Array(32)) };
311
311
  }
312
312
  const VOTTUN_BRIDGE_TRANSFER_TO_CONTRACT_OUTPUT_FIELDS = [
313
313
  {
@@ -317,10 +317,34 @@ const VOTTUN_BRIDGE_TRANSFER_TO_CONTRACT_OUTPUT_FIELDS = [
317
317
  byteLength: 1,
318
318
  },
319
319
  ];
320
- export function decodeVottunBridgeTransferToContractOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
321
- return decodePayload(data, VOTTUN_BRIDGE_TRANSFER_TO_CONTRACT_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
320
+ export function decodeVottunBridgeTransferToContractOutput(data) {
321
+ return decodePayload(data, VOTTUN_BRIDGE_TRANSFER_TO_CONTRACT_OUTPUT_FIELDS, STRUCTS, (_pk) => 'A'.repeat(60));
322
322
  }
323
- export const VOTTUN_BRIDGE_CREATE_PROPOSAL_INPUT_TYPE = 12;
323
+ export const VOTTUN_BRIDGE_ADD_LIQUIDITY_INPUT_TYPE = 5;
324
+ const VOTTUN_BRIDGE_ADD_LIQUIDITY_OUTPUT_FIELDS = [
325
+ {
326
+ name: 'status',
327
+ type: 'uint8',
328
+ offset: 0,
329
+ byteLength: 1,
330
+ },
331
+ {
332
+ name: 'addedAmount',
333
+ type: 'uint64',
334
+ offset: 1,
335
+ byteLength: 8,
336
+ },
337
+ {
338
+ name: 'totalLocked',
339
+ type: 'uint64',
340
+ offset: 9,
341
+ byteLength: 8,
342
+ },
343
+ ];
344
+ export function decodeVottunBridgeAddLiquidityOutput(data) {
345
+ return decodePayload(data, VOTTUN_BRIDGE_ADD_LIQUIDITY_OUTPUT_FIELDS, STRUCTS, (_pk) => 'A'.repeat(60));
346
+ }
347
+ export const VOTTUN_BRIDGE_CREATE_PROPOSAL_INPUT_TYPE = 6;
324
348
  const VOTTUN_BRIDGE_CREATE_PROPOSAL_INPUT_FIELDS = [
325
349
  {
326
350
  name: 'proposalType',
@@ -347,8 +371,8 @@ const VOTTUN_BRIDGE_CREATE_PROPOSAL_INPUT_FIELDS = [
347
371
  byteLength: 8,
348
372
  },
349
373
  ];
350
- export function buildVottunBridgeCreateProposalInput(input, identityToPublicKey = (_identity) => new Uint8Array(32)) {
351
- return buildPayload(VOTTUN_BRIDGE_CREATE_PROPOSAL_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
374
+ export function buildVottunBridgeCreateProposalInput(input, identityToPublicKey) {
375
+ return { contractIndex: VOTTUN_BRIDGE_CONTRACT_INDEX, inputType: VOTTUN_BRIDGE_CREATE_PROPOSAL_INPUT_TYPE, payload: buildPayload(VOTTUN_BRIDGE_CREATE_PROPOSAL_INPUT_FIELDS, STRUCTS, input, identityToPublicKey) };
352
376
  }
353
377
  const VOTTUN_BRIDGE_CREATE_PROPOSAL_OUTPUT_FIELDS = [
354
378
  {
@@ -364,10 +388,10 @@ const VOTTUN_BRIDGE_CREATE_PROPOSAL_OUTPUT_FIELDS = [
364
388
  byteLength: 8,
365
389
  },
366
390
  ];
367
- export function decodeVottunBridgeCreateProposalOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
368
- return decodePayload(data, VOTTUN_BRIDGE_CREATE_PROPOSAL_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
391
+ export function decodeVottunBridgeCreateProposalOutput(data) {
392
+ return decodePayload(data, VOTTUN_BRIDGE_CREATE_PROPOSAL_OUTPUT_FIELDS, STRUCTS, (_pk) => 'A'.repeat(60));
369
393
  }
370
- export const VOTTUN_BRIDGE_APPROVE_PROPOSAL_INPUT_TYPE = 13;
394
+ export const VOTTUN_BRIDGE_APPROVE_PROPOSAL_INPUT_TYPE = 7;
371
395
  const VOTTUN_BRIDGE_APPROVE_PROPOSAL_INPUT_FIELDS = [
372
396
  {
373
397
  name: 'proposalId',
@@ -376,8 +400,8 @@ const VOTTUN_BRIDGE_APPROVE_PROPOSAL_INPUT_FIELDS = [
376
400
  byteLength: 8,
377
401
  },
378
402
  ];
379
- export function buildVottunBridgeApproveProposalInput(input, identityToPublicKey = (_identity) => new Uint8Array(32)) {
380
- return buildPayload(VOTTUN_BRIDGE_APPROVE_PROPOSAL_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
403
+ export function buildVottunBridgeApproveProposalInput(input) {
404
+ return { contractIndex: VOTTUN_BRIDGE_CONTRACT_INDEX, inputType: VOTTUN_BRIDGE_APPROVE_PROPOSAL_INPUT_TYPE, payload: buildPayload(VOTTUN_BRIDGE_APPROVE_PROPOSAL_INPUT_FIELDS, STRUCTS, input, (_) => new Uint8Array(32)) };
381
405
  }
382
406
  const VOTTUN_BRIDGE_APPROVE_PROPOSAL_OUTPUT_FIELDS = [
383
407
  {
@@ -393,10 +417,10 @@ const VOTTUN_BRIDGE_APPROVE_PROPOSAL_OUTPUT_FIELDS = [
393
417
  byteLength: 1,
394
418
  },
395
419
  ];
396
- export function decodeVottunBridgeApproveProposalOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
397
- return decodePayload(data, VOTTUN_BRIDGE_APPROVE_PROPOSAL_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
420
+ export function decodeVottunBridgeApproveProposalOutput(data) {
421
+ return decodePayload(data, VOTTUN_BRIDGE_APPROVE_PROPOSAL_OUTPUT_FIELDS, STRUCTS, (_pk) => 'A'.repeat(60));
398
422
  }
399
- export const VOTTUN_BRIDGE_CANCEL_PROPOSAL_INPUT_TYPE = 15;
423
+ export const VOTTUN_BRIDGE_CANCEL_PROPOSAL_INPUT_TYPE = 8;
400
424
  const VOTTUN_BRIDGE_CANCEL_PROPOSAL_INPUT_FIELDS = [
401
425
  {
402
426
  name: 'proposalId',
@@ -405,8 +429,8 @@ const VOTTUN_BRIDGE_CANCEL_PROPOSAL_INPUT_FIELDS = [
405
429
  byteLength: 8,
406
430
  },
407
431
  ];
408
- export function buildVottunBridgeCancelProposalInput(input, identityToPublicKey = (_identity) => new Uint8Array(32)) {
409
- return buildPayload(VOTTUN_BRIDGE_CANCEL_PROPOSAL_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
432
+ export function buildVottunBridgeCancelProposalInput(input) {
433
+ return { contractIndex: VOTTUN_BRIDGE_CONTRACT_INDEX, inputType: VOTTUN_BRIDGE_CANCEL_PROPOSAL_INPUT_TYPE, payload: buildPayload(VOTTUN_BRIDGE_CANCEL_PROPOSAL_INPUT_FIELDS, STRUCTS, input, (_) => new Uint8Array(32)) };
410
434
  }
411
435
  const VOTTUN_BRIDGE_CANCEL_PROPOSAL_OUTPUT_FIELDS = [
412
436
  {
@@ -416,11 +440,23 @@ const VOTTUN_BRIDGE_CANCEL_PROPOSAL_OUTPUT_FIELDS = [
416
440
  byteLength: 1,
417
441
  },
418
442
  ];
419
- export function decodeVottunBridgeCancelProposalOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
420
- return decodePayload(data, VOTTUN_BRIDGE_CANCEL_PROPOSAL_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
443
+ export function decodeVottunBridgeCancelProposalOutput(data) {
444
+ return decodePayload(data, VOTTUN_BRIDGE_CANCEL_PROPOSAL_OUTPUT_FIELDS, STRUCTS, (_pk) => 'A'.repeat(60));
421
445
  }
422
- export const VOTTUN_BRIDGE_ADD_LIQUIDITY_INPUT_TYPE = 17;
423
- const VOTTUN_BRIDGE_ADD_LIQUIDITY_OUTPUT_FIELDS = [
446
+ export const VOTTUN_BRIDGE_GET_ORDER_INPUT_TYPE = 1;
447
+ export const VOTTUN_BRIDGE_GET_ORDER_INPUT_SIZE = 8;
448
+ const VOTTUN_BRIDGE_GET_ORDER_INPUT_FIELDS = [
449
+ {
450
+ name: 'orderId',
451
+ type: 'uint64',
452
+ offset: 0,
453
+ byteLength: 8,
454
+ },
455
+ ];
456
+ export function buildVottunBridgeGetOrderInput(input) {
457
+ return buildPayload(VOTTUN_BRIDGE_GET_ORDER_INPUT_FIELDS, STRUCTS, input, (_) => new Uint8Array(32));
458
+ }
459
+ const VOTTUN_BRIDGE_GET_ORDER_OUTPUT_FIELDS = [
424
460
  {
425
461
  name: 'status',
426
462
  type: 'uint8',
@@ -428,22 +464,39 @@ const VOTTUN_BRIDGE_ADD_LIQUIDITY_OUTPUT_FIELDS = [
428
464
  byteLength: 1,
429
465
  },
430
466
  {
431
- name: 'addedAmount',
432
- type: 'uint64',
467
+ name: 'order',
468
+ type: 'struct',
433
469
  offset: 1,
434
- byteLength: 8,
470
+ byteLength: 213,
471
+ structRef: 'OrderResponse',
435
472
  },
436
473
  {
437
- name: 'totalLocked',
438
- type: 'uint64',
439
- offset: 9,
440
- byteLength: 8,
474
+ name: 'message',
475
+ type: 'array',
476
+ offset: 214,
477
+ byteLength: 32,
478
+ arrayLength: 32,
479
+ arrayItemType: 'uint8',
480
+ arrayItemByteLength: 1,
441
481
  },
442
482
  ];
443
- export function decodeVottunBridgeAddLiquidityOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
444
- return decodePayload(data, VOTTUN_BRIDGE_ADD_LIQUIDITY_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
483
+ export function decodeVottunBridgeGetOrderOutput(data) {
484
+ return decodePayload(data, VOTTUN_BRIDGE_GET_ORDER_OUTPUT_FIELDS, STRUCTS, (_pk) => 'A'.repeat(60));
445
485
  }
446
- export const VOTTUN_BRIDGE_GET_TOTAL_RECEIVED_TOKENS_INPUT_TYPE = 2;
486
+ export async function vottunBridgeGetOrder(live, input, options) {
487
+ return callContractFunction({
488
+ live,
489
+ contractIndex: VOTTUN_BRIDGE_CONTRACT_INDEX,
490
+ inputType: VOTTUN_BRIDGE_GET_ORDER_INPUT_TYPE,
491
+ inputSize: VOTTUN_BRIDGE_GET_ORDER_INPUT_SIZE,
492
+ inputFields: VOTTUN_BRIDGE_GET_ORDER_INPUT_FIELDS,
493
+ outputFields: VOTTUN_BRIDGE_GET_ORDER_OUTPUT_FIELDS,
494
+ structs: STRUCTS,
495
+ input: input,
496
+ ...options,
497
+ });
498
+ }
499
+ export const VOTTUN_BRIDGE_GET_TOTAL_RECEIVED_TOKENS_INPUT_TYPE = 3;
447
500
  export const VOTTUN_BRIDGE_GET_TOTAL_RECEIVED_TOKENS_INPUT_SIZE = 0;
448
501
  const VOTTUN_BRIDGE_GET_TOTAL_RECEIVED_TOKENS_OUTPUT_FIELDS = [
449
502
  {
@@ -453,8 +506,8 @@ const VOTTUN_BRIDGE_GET_TOTAL_RECEIVED_TOKENS_OUTPUT_FIELDS = [
453
506
  byteLength: 8,
454
507
  },
455
508
  ];
456
- export function decodeVottunBridgeGetTotalReceivedTokensOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
457
- return decodePayload(data, VOTTUN_BRIDGE_GET_TOTAL_RECEIVED_TOKENS_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
509
+ export function decodeVottunBridgeGetTotalReceivedTokensOutput(data) {
510
+ return decodePayload(data, VOTTUN_BRIDGE_GET_TOTAL_RECEIVED_TOKENS_OUTPUT_FIELDS, STRUCTS, (_pk) => 'A'.repeat(60));
458
511
  }
459
512
  export async function vottunBridgeGetTotalReceivedTokens(live, options) {
460
513
  return callContractFunction({
@@ -469,58 +522,61 @@ export async function vottunBridgeGetTotalReceivedTokens(live, options) {
469
522
  ...options,
470
523
  });
471
524
  }
472
- export const VOTTUN_BRIDGE_GET_AVAILABLE_FEES_INPUT_TYPE = 6;
473
- export const VOTTUN_BRIDGE_GET_AVAILABLE_FEES_INPUT_SIZE = 0;
474
- const VOTTUN_BRIDGE_GET_AVAILABLE_FEES_OUTPUT_FIELDS = [
525
+ export const VOTTUN_BRIDGE_GET_TOTAL_LOCKED_TOKENS_INPUT_TYPE = 4;
526
+ export const VOTTUN_BRIDGE_GET_TOTAL_LOCKED_TOKENS_INPUT_SIZE = 0;
527
+ const VOTTUN_BRIDGE_GET_TOTAL_LOCKED_TOKENS_OUTPUT_FIELDS = [
475
528
  {
476
- name: 'availableFees',
529
+ name: 'totalLockedTokens',
477
530
  type: 'uint64',
478
531
  offset: 0,
479
532
  byteLength: 8,
480
533
  },
481
- {
482
- name: 'totalEarnedFees',
483
- type: 'uint64',
484
- offset: 8,
485
- byteLength: 8,
486
- },
487
- {
488
- name: 'totalDistributedFees',
489
- type: 'uint64',
490
- offset: 16,
491
- byteLength: 8,
492
- },
493
534
  ];
494
- export function decodeVottunBridgeGetAvailableFeesOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
495
- return decodePayload(data, VOTTUN_BRIDGE_GET_AVAILABLE_FEES_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
535
+ export function decodeVottunBridgeGetTotalLockedTokensOutput(data) {
536
+ return decodePayload(data, VOTTUN_BRIDGE_GET_TOTAL_LOCKED_TOKENS_OUTPUT_FIELDS, STRUCTS, (_pk) => 'A'.repeat(60));
496
537
  }
497
- export async function vottunBridgeGetAvailableFees(live, options) {
538
+ export async function vottunBridgeGetTotalLockedTokens(live, options) {
498
539
  return callContractFunction({
499
540
  live,
500
541
  contractIndex: VOTTUN_BRIDGE_CONTRACT_INDEX,
501
- inputType: VOTTUN_BRIDGE_GET_AVAILABLE_FEES_INPUT_TYPE,
502
- inputSize: VOTTUN_BRIDGE_GET_AVAILABLE_FEES_INPUT_SIZE,
542
+ inputType: VOTTUN_BRIDGE_GET_TOTAL_LOCKED_TOKENS_INPUT_TYPE,
543
+ inputSize: VOTTUN_BRIDGE_GET_TOTAL_LOCKED_TOKENS_INPUT_SIZE,
503
544
  inputFields: [],
504
- outputFields: VOTTUN_BRIDGE_GET_AVAILABLE_FEES_OUTPUT_FIELDS,
545
+ outputFields: VOTTUN_BRIDGE_GET_TOTAL_LOCKED_TOKENS_OUTPUT_FIELDS,
505
546
  structs: STRUCTS,
506
547
  input: {},
507
548
  ...options,
508
549
  });
509
550
  }
510
- export const VOTTUN_BRIDGE_GET_ORDER_INPUT_TYPE = 7;
511
- export const VOTTUN_BRIDGE_GET_ORDER_INPUT_SIZE = 8;
512
- const VOTTUN_BRIDGE_GET_ORDER_INPUT_FIELDS = [
551
+ export const VOTTUN_BRIDGE_GET_ORDER_BY_DETAILS_INPUT_TYPE = 5;
552
+ export const VOTTUN_BRIDGE_GET_ORDER_BY_DETAILS_INPUT_SIZE = 73;
553
+ const VOTTUN_BRIDGE_GET_ORDER_BY_DETAILS_INPUT_FIELDS = [
513
554
  {
514
- name: 'orderId',
515
- type: 'uint64',
555
+ name: 'ethAddress',
556
+ type: 'array',
516
557
  offset: 0,
558
+ byteLength: 64,
559
+ arrayLength: 64,
560
+ arrayItemType: 'uint8',
561
+ arrayItemByteLength: 1,
562
+ },
563
+ {
564
+ name: 'amount',
565
+ type: 'uint64',
566
+ offset: 64,
517
567
  byteLength: 8,
518
568
  },
569
+ {
570
+ name: 'status',
571
+ type: 'uint8',
572
+ offset: 72,
573
+ byteLength: 1,
574
+ },
519
575
  ];
520
- export function buildVottunBridgeGetOrderInput(input, identityToPublicKey = (_identity) => new Uint8Array(32)) {
521
- return buildPayload(VOTTUN_BRIDGE_GET_ORDER_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
576
+ export function buildVottunBridgeGetOrderByDetailsInput(input) {
577
+ return buildPayload(VOTTUN_BRIDGE_GET_ORDER_BY_DETAILS_INPUT_FIELDS, STRUCTS, input, (_) => new Uint8Array(32));
522
578
  }
523
- const VOTTUN_BRIDGE_GET_ORDER_OUTPUT_FIELDS = [
579
+ const VOTTUN_BRIDGE_GET_ORDER_BY_DETAILS_OUTPUT_FIELDS = [
524
580
  {
525
581
  name: 'status',
526
582
  type: 'uint8',
@@ -528,39 +584,35 @@ const VOTTUN_BRIDGE_GET_ORDER_OUTPUT_FIELDS = [
528
584
  byteLength: 1,
529
585
  },
530
586
  {
531
- name: 'order',
532
- type: 'struct',
587
+ name: 'orderId',
588
+ type: 'uint64',
533
589
  offset: 1,
534
- byteLength: 213,
535
- structRef: 'OrderResponse',
590
+ byteLength: 8,
536
591
  },
537
592
  {
538
- name: 'message',
539
- type: 'array',
540
- offset: 214,
593
+ name: 'qubicDestination',
594
+ type: 'id',
595
+ offset: 9,
541
596
  byteLength: 32,
542
- arrayLength: 32,
543
- arrayItemType: 'uint8',
544
- arrayItemByteLength: 1,
545
597
  },
546
598
  ];
547
- export function decodeVottunBridgeGetOrderOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
548
- return decodePayload(data, VOTTUN_BRIDGE_GET_ORDER_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
599
+ export function decodeVottunBridgeGetOrderByDetailsOutput(data, publicKeyToIdentity) {
600
+ return decodePayload(data, VOTTUN_BRIDGE_GET_ORDER_BY_DETAILS_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
549
601
  }
550
- export async function vottunBridgeGetOrder(live, input, options) {
602
+ export async function vottunBridgeGetOrderByDetails(live, input, options) {
551
603
  return callContractFunction({
552
604
  live,
553
605
  contractIndex: VOTTUN_BRIDGE_CONTRACT_INDEX,
554
- inputType: VOTTUN_BRIDGE_GET_ORDER_INPUT_TYPE,
555
- inputSize: VOTTUN_BRIDGE_GET_ORDER_INPUT_SIZE,
556
- inputFields: VOTTUN_BRIDGE_GET_ORDER_INPUT_FIELDS,
557
- outputFields: VOTTUN_BRIDGE_GET_ORDER_OUTPUT_FIELDS,
606
+ inputType: VOTTUN_BRIDGE_GET_ORDER_BY_DETAILS_INPUT_TYPE,
607
+ inputSize: VOTTUN_BRIDGE_GET_ORDER_BY_DETAILS_INPUT_SIZE,
608
+ inputFields: VOTTUN_BRIDGE_GET_ORDER_BY_DETAILS_INPUT_FIELDS,
609
+ outputFields: VOTTUN_BRIDGE_GET_ORDER_BY_DETAILS_OUTPUT_FIELDS,
558
610
  structs: STRUCTS,
559
611
  input: input,
560
612
  ...options,
561
613
  });
562
614
  }
563
- export const VOTTUN_BRIDGE_GET_CONTRACT_INFO_INPUT_TYPE = 8;
615
+ export const VOTTUN_BRIDGE_GET_CONTRACT_INFO_INPUT_TYPE = 6;
564
616
  export const VOTTUN_BRIDGE_GET_CONTRACT_INFO_INPUT_SIZE = 0;
565
617
  const VOTTUN_BRIDGE_GET_CONTRACT_INFO_OUTPUT_FIELDS = [
566
618
  {
@@ -657,7 +709,7 @@ const VOTTUN_BRIDGE_GET_CONTRACT_INFO_OUTPUT_FIELDS = [
657
709
  byteLength: 8,
658
710
  },
659
711
  ];
660
- export function decodeVottunBridgeGetContractInfoOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
712
+ export function decodeVottunBridgeGetContractInfoOutput(data, publicKeyToIdentity) {
661
713
  return decodePayload(data, VOTTUN_BRIDGE_GET_CONTRACT_INFO_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
662
714
  }
663
715
  export async function vottunBridgeGetContractInfo(live, options) {
@@ -673,33 +725,45 @@ export async function vottunBridgeGetContractInfo(live, options) {
673
725
  ...options,
674
726
  });
675
727
  }
676
- export const VOTTUN_BRIDGE_GET_TOTAL_LOCKED_TOKENS_INPUT_TYPE = 9;
677
- export const VOTTUN_BRIDGE_GET_TOTAL_LOCKED_TOKENS_INPUT_SIZE = 0;
678
- const VOTTUN_BRIDGE_GET_TOTAL_LOCKED_TOKENS_OUTPUT_FIELDS = [
728
+ export const VOTTUN_BRIDGE_GET_AVAILABLE_FEES_INPUT_TYPE = 7;
729
+ export const VOTTUN_BRIDGE_GET_AVAILABLE_FEES_INPUT_SIZE = 0;
730
+ const VOTTUN_BRIDGE_GET_AVAILABLE_FEES_OUTPUT_FIELDS = [
679
731
  {
680
- name: 'totalLockedTokens',
732
+ name: 'availableFees',
681
733
  type: 'uint64',
682
734
  offset: 0,
683
735
  byteLength: 8,
684
736
  },
737
+ {
738
+ name: 'totalEarnedFees',
739
+ type: 'uint64',
740
+ offset: 8,
741
+ byteLength: 8,
742
+ },
743
+ {
744
+ name: 'totalDistributedFees',
745
+ type: 'uint64',
746
+ offset: 16,
747
+ byteLength: 8,
748
+ },
685
749
  ];
686
- export function decodeVottunBridgeGetTotalLockedTokensOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
687
- return decodePayload(data, VOTTUN_BRIDGE_GET_TOTAL_LOCKED_TOKENS_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
750
+ export function decodeVottunBridgeGetAvailableFeesOutput(data) {
751
+ return decodePayload(data, VOTTUN_BRIDGE_GET_AVAILABLE_FEES_OUTPUT_FIELDS, STRUCTS, (_pk) => 'A'.repeat(60));
688
752
  }
689
- export async function vottunBridgeGetTotalLockedTokens(live, options) {
753
+ export async function vottunBridgeGetAvailableFees(live, options) {
690
754
  return callContractFunction({
691
755
  live,
692
756
  contractIndex: VOTTUN_BRIDGE_CONTRACT_INDEX,
693
- inputType: VOTTUN_BRIDGE_GET_TOTAL_LOCKED_TOKENS_INPUT_TYPE,
694
- inputSize: VOTTUN_BRIDGE_GET_TOTAL_LOCKED_TOKENS_INPUT_SIZE,
757
+ inputType: VOTTUN_BRIDGE_GET_AVAILABLE_FEES_INPUT_TYPE,
758
+ inputSize: VOTTUN_BRIDGE_GET_AVAILABLE_FEES_INPUT_SIZE,
695
759
  inputFields: [],
696
- outputFields: VOTTUN_BRIDGE_GET_TOTAL_LOCKED_TOKENS_OUTPUT_FIELDS,
760
+ outputFields: VOTTUN_BRIDGE_GET_AVAILABLE_FEES_OUTPUT_FIELDS,
697
761
  structs: STRUCTS,
698
762
  input: {},
699
763
  ...options,
700
764
  });
701
765
  }
702
- export const VOTTUN_BRIDGE_GET_PROPOSAL_INPUT_TYPE = 14;
766
+ export const VOTTUN_BRIDGE_GET_PROPOSAL_INPUT_TYPE = 8;
703
767
  export const VOTTUN_BRIDGE_GET_PROPOSAL_INPUT_SIZE = 8;
704
768
  const VOTTUN_BRIDGE_GET_PROPOSAL_INPUT_FIELDS = [
705
769
  {
@@ -709,8 +773,8 @@ const VOTTUN_BRIDGE_GET_PROPOSAL_INPUT_FIELDS = [
709
773
  byteLength: 8,
710
774
  },
711
775
  ];
712
- export function buildVottunBridgeGetProposalInput(input, identityToPublicKey = (_identity) => new Uint8Array(32)) {
713
- return buildPayload(VOTTUN_BRIDGE_GET_PROPOSAL_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
776
+ export function buildVottunBridgeGetProposalInput(input) {
777
+ return buildPayload(VOTTUN_BRIDGE_GET_PROPOSAL_INPUT_FIELDS, STRUCTS, input, (_) => new Uint8Array(32));
714
778
  }
715
779
  const VOTTUN_BRIDGE_GET_PROPOSAL_OUTPUT_FIELDS = [
716
780
  {
@@ -727,8 +791,8 @@ const VOTTUN_BRIDGE_GET_PROPOSAL_OUTPUT_FIELDS = [
727
791
  structRef: 'AdminProposal',
728
792
  },
729
793
  ];
730
- export function decodeVottunBridgeGetProposalOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
731
- return decodePayload(data, VOTTUN_BRIDGE_GET_PROPOSAL_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
794
+ export function decodeVottunBridgeGetProposalOutput(data) {
795
+ return decodePayload(data, VOTTUN_BRIDGE_GET_PROPOSAL_OUTPUT_FIELDS, STRUCTS, (_pk) => 'A'.repeat(60));
732
796
  }
733
797
  export async function vottunBridgeGetProposal(live, input, options) {
734
798
  return callContractFunction({
@@ -743,79 +807,15 @@ export async function vottunBridgeGetProposal(live, input, options) {
743
807
  ...options,
744
808
  });
745
809
  }
746
- export const VOTTUN_BRIDGE_GET_ORDER_BY_DETAILS_INPUT_TYPE = 16;
747
- export const VOTTUN_BRIDGE_GET_ORDER_BY_DETAILS_INPUT_SIZE = 73;
748
- const VOTTUN_BRIDGE_GET_ORDER_BY_DETAILS_INPUT_FIELDS = [
749
- {
750
- name: 'ethAddress',
751
- type: 'array',
752
- offset: 0,
753
- byteLength: 64,
754
- arrayLength: 64,
755
- arrayItemType: 'uint8',
756
- arrayItemByteLength: 1,
757
- },
758
- {
759
- name: 'amount',
760
- type: 'uint64',
761
- offset: 64,
762
- byteLength: 8,
763
- },
764
- {
765
- name: 'status',
766
- type: 'uint8',
767
- offset: 72,
768
- byteLength: 1,
769
- },
770
- ];
771
- export function buildVottunBridgeGetOrderByDetailsInput(input, identityToPublicKey = (_identity) => new Uint8Array(32)) {
772
- return buildPayload(VOTTUN_BRIDGE_GET_ORDER_BY_DETAILS_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
773
- }
774
- const VOTTUN_BRIDGE_GET_ORDER_BY_DETAILS_OUTPUT_FIELDS = [
775
- {
776
- name: 'status',
777
- type: 'uint8',
778
- offset: 0,
779
- byteLength: 1,
780
- },
781
- {
782
- name: 'orderId',
783
- type: 'uint64',
784
- offset: 1,
785
- byteLength: 8,
786
- },
787
- {
788
- name: 'qubicDestination',
789
- type: 'id',
790
- offset: 9,
791
- byteLength: 32,
792
- },
793
- ];
794
- export function decodeVottunBridgeGetOrderByDetailsOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
795
- return decodePayload(data, VOTTUN_BRIDGE_GET_ORDER_BY_DETAILS_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
796
- }
797
- export async function vottunBridgeGetOrderByDetails(live, input, options) {
798
- return callContractFunction({
799
- live,
800
- contractIndex: VOTTUN_BRIDGE_CONTRACT_INDEX,
801
- inputType: VOTTUN_BRIDGE_GET_ORDER_BY_DETAILS_INPUT_TYPE,
802
- inputSize: VOTTUN_BRIDGE_GET_ORDER_BY_DETAILS_INPUT_SIZE,
803
- inputFields: VOTTUN_BRIDGE_GET_ORDER_BY_DETAILS_INPUT_FIELDS,
804
- outputFields: VOTTUN_BRIDGE_GET_ORDER_BY_DETAILS_OUTPUT_FIELDS,
805
- structs: STRUCTS,
806
- input: input,
807
- ...options,
808
- });
809
- }
810
810
  export const vottunBridge = {
811
811
  contractIndex: VOTTUN_BRIDGE_CONTRACT_INDEX,
812
- getTotalReceivedTokens: vottunBridgeGetTotalReceivedTokens,
813
- getAvailableFees: vottunBridgeGetAvailableFees,
814
812
  getOrder: vottunBridgeGetOrder,
815
- getContractInfo: vottunBridgeGetContractInfo,
813
+ getTotalReceivedTokens: vottunBridgeGetTotalReceivedTokens,
816
814
  getTotalLockedTokens: vottunBridgeGetTotalLockedTokens,
817
- getProposal: vottunBridgeGetProposal,
818
815
  getOrderByDetails: vottunBridgeGetOrderByDetails,
816
+ getContractInfo: vottunBridgeGetContractInfo,
817
+ getAvailableFees: vottunBridgeGetAvailableFees,
818
+ getProposal: vottunBridgeGetProposal,
819
819
  buildCreateOrderInput: buildVottunBridgeCreateOrderInput,
820
820
  decodeCreateOrderOutput: decodeVottunBridgeCreateOrderOutput,
821
821
  buildCompleteOrderInput: buildVottunBridgeCompleteOrderInput,
@@ -824,12 +824,12 @@ export const vottunBridge = {
824
824
  decodeRefundOrderOutput: decodeVottunBridgeRefundOrderOutput,
825
825
  buildTransferToContractInput: buildVottunBridgeTransferToContractInput,
826
826
  decodeTransferToContractOutput: decodeVottunBridgeTransferToContractOutput,
827
+ decodeAddLiquidityOutput: decodeVottunBridgeAddLiquidityOutput,
827
828
  buildCreateProposalInput: buildVottunBridgeCreateProposalInput,
828
829
  decodeCreateProposalOutput: decodeVottunBridgeCreateProposalOutput,
829
830
  buildApproveProposalInput: buildVottunBridgeApproveProposalInput,
830
831
  decodeApproveProposalOutput: decodeVottunBridgeApproveProposalOutput,
831
832
  buildCancelProposalInput: buildVottunBridgeCancelProposalInput,
832
833
  decodeCancelProposalOutput: decodeVottunBridgeCancelProposalOutput,
833
- decodeAddLiquidityOutput: decodeVottunBridgeAddLiquidityOutput,
834
834
  };
835
835
  //# sourceMappingURL=vottunbridge.js.map