@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
@@ -21,30 +21,7 @@ const STRUCTS = {
21
21
  ],
22
22
  },
23
23
  };
24
- export const QSWAP_SET_INVEST_REWARDS_INFO_INPUT_TYPE = 3;
25
- const QSWAP_SET_INVEST_REWARDS_INFO_INPUT_FIELDS = [
26
- {
27
- name: 'newInvestRewardsId',
28
- type: 'id',
29
- offset: 0,
30
- byteLength: 32,
31
- },
32
- ];
33
- export function buildQswapSetInvestRewardsInfoInput(input, identityToPublicKey = (_identity) => new Uint8Array(32)) {
34
- return buildPayload(QSWAP_SET_INVEST_REWARDS_INFO_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
35
- }
36
- const QSWAP_SET_INVEST_REWARDS_INFO_OUTPUT_FIELDS = [
37
- {
38
- name: 'success',
39
- type: 'uint8',
40
- offset: 0,
41
- byteLength: 1,
42
- },
43
- ];
44
- export function decodeQswapSetInvestRewardsInfoOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
45
- return decodePayload(data, QSWAP_SET_INVEST_REWARDS_INFO_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
46
- }
47
- export const QSWAP_ISSUE_ASSET_INPUT_TYPE = 10;
24
+ export const QSWAP_ISSUE_ASSET_INPUT_TYPE = 1;
48
25
  const QSWAP_ISSUE_ASSET_INPUT_FIELDS = [
49
26
  {
50
27
  name: 'assetName',
@@ -71,8 +48,8 @@ const QSWAP_ISSUE_ASSET_INPUT_FIELDS = [
71
48
  byteLength: 1,
72
49
  },
73
50
  ];
74
- export function buildQswapIssueAssetInput(input, identityToPublicKey = (_identity) => new Uint8Array(32)) {
75
- return buildPayload(QSWAP_ISSUE_ASSET_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
51
+ export function buildQswapIssueAssetInput(input) {
52
+ return { contractIndex: QSWAP_CONTRACT_INDEX, inputType: QSWAP_ISSUE_ASSET_INPUT_TYPE, payload: buildPayload(QSWAP_ISSUE_ASSET_INPUT_FIELDS, STRUCTS, input, (_) => new Uint8Array(32)) };
76
53
  }
77
54
  const QSWAP_ISSUE_ASSET_OUTPUT_FIELDS = [
78
55
  {
@@ -82,11 +59,11 @@ const QSWAP_ISSUE_ASSET_OUTPUT_FIELDS = [
82
59
  byteLength: 8,
83
60
  },
84
61
  ];
85
- export function decodeQswapIssueAssetOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
86
- return decodePayload(data, QSWAP_ISSUE_ASSET_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
62
+ export function decodeQswapIssueAssetOutput(data) {
63
+ return decodePayload(data, QSWAP_ISSUE_ASSET_OUTPUT_FIELDS, STRUCTS, (_pk) => 'A'.repeat(60));
87
64
  }
88
- export const QSWAP_CREATE_POOL_INPUT_TYPE = 11;
89
- const QSWAP_CREATE_POOL_INPUT_FIELDS = [
65
+ export const QSWAP_TRANSFER_SHARE_OWNERSHIP_AND_POSSESSION_INPUT_TYPE = 2;
66
+ const QSWAP_TRANSFER_SHARE_OWNERSHIP_AND_POSSESSION_INPUT_FIELDS = [
90
67
  {
91
68
  name: 'assetIssuer',
92
69
  type: 'id',
@@ -99,23 +76,35 @@ const QSWAP_CREATE_POOL_INPUT_FIELDS = [
99
76
  offset: 32,
100
77
  byteLength: 8,
101
78
  },
79
+ {
80
+ name: 'newOwnerAndPossessor',
81
+ type: 'id',
82
+ offset: 40,
83
+ byteLength: 32,
84
+ },
85
+ {
86
+ name: 'amount',
87
+ type: 'sint64',
88
+ offset: 72,
89
+ byteLength: 8,
90
+ },
102
91
  ];
103
- export function buildQswapCreatePoolInput(input, identityToPublicKey = (_identity) => new Uint8Array(32)) {
104
- return buildPayload(QSWAP_CREATE_POOL_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
92
+ export function buildQswapTransferShareOwnershipAndPossessionInput(input, identityToPublicKey) {
93
+ return { contractIndex: QSWAP_CONTRACT_INDEX, inputType: QSWAP_TRANSFER_SHARE_OWNERSHIP_AND_POSSESSION_INPUT_TYPE, payload: buildPayload(QSWAP_TRANSFER_SHARE_OWNERSHIP_AND_POSSESSION_INPUT_FIELDS, STRUCTS, input, identityToPublicKey) };
105
94
  }
106
- const QSWAP_CREATE_POOL_OUTPUT_FIELDS = [
95
+ const QSWAP_TRANSFER_SHARE_OWNERSHIP_AND_POSSESSION_OUTPUT_FIELDS = [
107
96
  {
108
- name: 'success',
109
- type: 'uint8',
97
+ name: 'transferredAmount',
98
+ type: 'sint64',
110
99
  offset: 0,
111
- byteLength: 1,
100
+ byteLength: 8,
112
101
  },
113
102
  ];
114
- export function decodeQswapCreatePoolOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
115
- return decodePayload(data, QSWAP_CREATE_POOL_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
103
+ export function decodeQswapTransferShareOwnershipAndPossessionOutput(data) {
104
+ return decodePayload(data, QSWAP_TRANSFER_SHARE_OWNERSHIP_AND_POSSESSION_OUTPUT_FIELDS, STRUCTS, (_pk) => 'A'.repeat(60));
116
105
  }
117
- export const QSWAP_TRANSFER_SHARE_OWNERSHIP_AND_POSSESSION_INPUT_TYPE = 12;
118
- const QSWAP_TRANSFER_SHARE_OWNERSHIP_AND_POSSESSION_INPUT_FIELDS = [
106
+ export const QSWAP_CREATE_POOL_INPUT_TYPE = 3;
107
+ const QSWAP_CREATE_POOL_INPUT_FIELDS = [
119
108
  {
120
109
  name: 'assetIssuer',
121
110
  type: 'id',
@@ -128,34 +117,22 @@ const QSWAP_TRANSFER_SHARE_OWNERSHIP_AND_POSSESSION_INPUT_FIELDS = [
128
117
  offset: 32,
129
118
  byteLength: 8,
130
119
  },
131
- {
132
- name: 'newOwnerAndPossessor',
133
- type: 'id',
134
- offset: 40,
135
- byteLength: 32,
136
- },
137
- {
138
- name: 'amount',
139
- type: 'sint64',
140
- offset: 72,
141
- byteLength: 8,
142
- },
143
120
  ];
144
- export function buildQswapTransferShareOwnershipAndPossessionInput(input, identityToPublicKey = (_identity) => new Uint8Array(32)) {
145
- return buildPayload(QSWAP_TRANSFER_SHARE_OWNERSHIP_AND_POSSESSION_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
121
+ export function buildQswapCreatePoolInput(input, identityToPublicKey) {
122
+ return { contractIndex: QSWAP_CONTRACT_INDEX, inputType: QSWAP_CREATE_POOL_INPUT_TYPE, payload: buildPayload(QSWAP_CREATE_POOL_INPUT_FIELDS, STRUCTS, input, identityToPublicKey) };
146
123
  }
147
- const QSWAP_TRANSFER_SHARE_OWNERSHIP_AND_POSSESSION_OUTPUT_FIELDS = [
124
+ const QSWAP_CREATE_POOL_OUTPUT_FIELDS = [
148
125
  {
149
- name: 'transferredAmount',
150
- type: 'sint64',
126
+ name: 'success',
127
+ type: 'uint8',
151
128
  offset: 0,
152
- byteLength: 8,
129
+ byteLength: 1,
153
130
  },
154
131
  ];
155
- export function decodeQswapTransferShareOwnershipAndPossessionOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
156
- return decodePayload(data, QSWAP_TRANSFER_SHARE_OWNERSHIP_AND_POSSESSION_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
132
+ export function decodeQswapCreatePoolOutput(data) {
133
+ return decodePayload(data, QSWAP_CREATE_POOL_OUTPUT_FIELDS, STRUCTS, (_pk) => 'A'.repeat(60));
157
134
  }
158
- export const QSWAP_ADD_LIQUIDITY_INPUT_TYPE = 13;
135
+ export const QSWAP_ADD_LIQUIDITY_INPUT_TYPE = 4;
159
136
  const QSWAP_ADD_LIQUIDITY_INPUT_FIELDS = [
160
137
  {
161
138
  name: 'assetIssuer',
@@ -188,8 +165,8 @@ const QSWAP_ADD_LIQUIDITY_INPUT_FIELDS = [
188
165
  byteLength: 8,
189
166
  },
190
167
  ];
191
- export function buildQswapAddLiquidityInput(input, identityToPublicKey = (_identity) => new Uint8Array(32)) {
192
- return buildPayload(QSWAP_ADD_LIQUIDITY_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
168
+ export function buildQswapAddLiquidityInput(input, identityToPublicKey) {
169
+ return { contractIndex: QSWAP_CONTRACT_INDEX, inputType: QSWAP_ADD_LIQUIDITY_INPUT_TYPE, payload: buildPayload(QSWAP_ADD_LIQUIDITY_INPUT_FIELDS, STRUCTS, input, identityToPublicKey) };
193
170
  }
194
171
  const QSWAP_ADD_LIQUIDITY_OUTPUT_FIELDS = [
195
172
  {
@@ -211,10 +188,10 @@ const QSWAP_ADD_LIQUIDITY_OUTPUT_FIELDS = [
211
188
  byteLength: 8,
212
189
  },
213
190
  ];
214
- export function decodeQswapAddLiquidityOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
215
- return decodePayload(data, QSWAP_ADD_LIQUIDITY_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
191
+ export function decodeQswapAddLiquidityOutput(data) {
192
+ return decodePayload(data, QSWAP_ADD_LIQUIDITY_OUTPUT_FIELDS, STRUCTS, (_pk) => 'A'.repeat(60));
216
193
  }
217
- export const QSWAP_REMOVE_LIQUIDITY_INPUT_TYPE = 14;
194
+ export const QSWAP_REMOVE_LIQUIDITY_INPUT_TYPE = 5;
218
195
  const QSWAP_REMOVE_LIQUIDITY_INPUT_FIELDS = [
219
196
  {
220
197
  name: 'assetIssuer',
@@ -247,8 +224,8 @@ const QSWAP_REMOVE_LIQUIDITY_INPUT_FIELDS = [
247
224
  byteLength: 8,
248
225
  },
249
226
  ];
250
- export function buildQswapRemoveLiquidityInput(input, identityToPublicKey = (_identity) => new Uint8Array(32)) {
251
- return buildPayload(QSWAP_REMOVE_LIQUIDITY_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
227
+ export function buildQswapRemoveLiquidityInput(input, identityToPublicKey) {
228
+ return { contractIndex: QSWAP_CONTRACT_INDEX, inputType: QSWAP_REMOVE_LIQUIDITY_INPUT_TYPE, payload: buildPayload(QSWAP_REMOVE_LIQUIDITY_INPUT_FIELDS, STRUCTS, input, identityToPublicKey) };
252
229
  }
253
230
  const QSWAP_REMOVE_LIQUIDITY_OUTPUT_FIELDS = [
254
231
  {
@@ -264,10 +241,10 @@ const QSWAP_REMOVE_LIQUIDITY_OUTPUT_FIELDS = [
264
241
  byteLength: 8,
265
242
  },
266
243
  ];
267
- export function decodeQswapRemoveLiquidityOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
268
- return decodePayload(data, QSWAP_REMOVE_LIQUIDITY_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
244
+ export function decodeQswapRemoveLiquidityOutput(data) {
245
+ return decodePayload(data, QSWAP_REMOVE_LIQUIDITY_OUTPUT_FIELDS, STRUCTS, (_pk) => 'A'.repeat(60));
269
246
  }
270
- export const QSWAP_SWAP_EXACT_QU_FOR_ASSET_INPUT_TYPE = 15;
247
+ export const QSWAP_SWAP_EXACT_QU_FOR_ASSET_INPUT_TYPE = 6;
271
248
  const QSWAP_SWAP_EXACT_QU_FOR_ASSET_INPUT_FIELDS = [
272
249
  {
273
250
  name: 'assetIssuer',
@@ -288,8 +265,8 @@ const QSWAP_SWAP_EXACT_QU_FOR_ASSET_INPUT_FIELDS = [
288
265
  byteLength: 8,
289
266
  },
290
267
  ];
291
- export function buildQswapSwapExactQuForAssetInput(input, identityToPublicKey = (_identity) => new Uint8Array(32)) {
292
- return buildPayload(QSWAP_SWAP_EXACT_QU_FOR_ASSET_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
268
+ export function buildQswapSwapExactQuForAssetInput(input, identityToPublicKey) {
269
+ return { contractIndex: QSWAP_CONTRACT_INDEX, inputType: QSWAP_SWAP_EXACT_QU_FOR_ASSET_INPUT_TYPE, payload: buildPayload(QSWAP_SWAP_EXACT_QU_FOR_ASSET_INPUT_FIELDS, STRUCTS, input, identityToPublicKey) };
293
270
  }
294
271
  const QSWAP_SWAP_EXACT_QU_FOR_ASSET_OUTPUT_FIELDS = [
295
272
  {
@@ -299,10 +276,10 @@ const QSWAP_SWAP_EXACT_QU_FOR_ASSET_OUTPUT_FIELDS = [
299
276
  byteLength: 8,
300
277
  },
301
278
  ];
302
- export function decodeQswapSwapExactQuForAssetOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
303
- return decodePayload(data, QSWAP_SWAP_EXACT_QU_FOR_ASSET_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
279
+ export function decodeQswapSwapExactQuForAssetOutput(data) {
280
+ return decodePayload(data, QSWAP_SWAP_EXACT_QU_FOR_ASSET_OUTPUT_FIELDS, STRUCTS, (_pk) => 'A'.repeat(60));
304
281
  }
305
- export const QSWAP_SWAP_QU_FOR_EXACT_ASSET_INPUT_TYPE = 16;
282
+ export const QSWAP_SWAP_QU_FOR_EXACT_ASSET_INPUT_TYPE = 7;
306
283
  const QSWAP_SWAP_QU_FOR_EXACT_ASSET_INPUT_FIELDS = [
307
284
  {
308
285
  name: 'assetIssuer',
@@ -323,8 +300,8 @@ const QSWAP_SWAP_QU_FOR_EXACT_ASSET_INPUT_FIELDS = [
323
300
  byteLength: 8,
324
301
  },
325
302
  ];
326
- export function buildQswapSwapQuForExactAssetInput(input, identityToPublicKey = (_identity) => new Uint8Array(32)) {
327
- return buildPayload(QSWAP_SWAP_QU_FOR_EXACT_ASSET_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
303
+ export function buildQswapSwapQuForExactAssetInput(input, identityToPublicKey) {
304
+ return { contractIndex: QSWAP_CONTRACT_INDEX, inputType: QSWAP_SWAP_QU_FOR_EXACT_ASSET_INPUT_TYPE, payload: buildPayload(QSWAP_SWAP_QU_FOR_EXACT_ASSET_INPUT_FIELDS, STRUCTS, input, identityToPublicKey) };
328
305
  }
329
306
  const QSWAP_SWAP_QU_FOR_EXACT_ASSET_OUTPUT_FIELDS = [
330
307
  {
@@ -334,10 +311,10 @@ const QSWAP_SWAP_QU_FOR_EXACT_ASSET_OUTPUT_FIELDS = [
334
311
  byteLength: 8,
335
312
  },
336
313
  ];
337
- export function decodeQswapSwapQuForExactAssetOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
338
- return decodePayload(data, QSWAP_SWAP_QU_FOR_EXACT_ASSET_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
314
+ export function decodeQswapSwapQuForExactAssetOutput(data) {
315
+ return decodePayload(data, QSWAP_SWAP_QU_FOR_EXACT_ASSET_OUTPUT_FIELDS, STRUCTS, (_pk) => 'A'.repeat(60));
339
316
  }
340
- export const QSWAP_SWAP_EXACT_ASSET_FOR_QU_INPUT_TYPE = 17;
317
+ export const QSWAP_SWAP_EXACT_ASSET_FOR_QU_INPUT_TYPE = 8;
341
318
  const QSWAP_SWAP_EXACT_ASSET_FOR_QU_INPUT_FIELDS = [
342
319
  {
343
320
  name: 'assetIssuer',
@@ -364,8 +341,8 @@ const QSWAP_SWAP_EXACT_ASSET_FOR_QU_INPUT_FIELDS = [
364
341
  byteLength: 8,
365
342
  },
366
343
  ];
367
- export function buildQswapSwapExactAssetForQuInput(input, identityToPublicKey = (_identity) => new Uint8Array(32)) {
368
- return buildPayload(QSWAP_SWAP_EXACT_ASSET_FOR_QU_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
344
+ export function buildQswapSwapExactAssetForQuInput(input, identityToPublicKey) {
345
+ return { contractIndex: QSWAP_CONTRACT_INDEX, inputType: QSWAP_SWAP_EXACT_ASSET_FOR_QU_INPUT_TYPE, payload: buildPayload(QSWAP_SWAP_EXACT_ASSET_FOR_QU_INPUT_FIELDS, STRUCTS, input, identityToPublicKey) };
369
346
  }
370
347
  const QSWAP_SWAP_EXACT_ASSET_FOR_QU_OUTPUT_FIELDS = [
371
348
  {
@@ -375,10 +352,10 @@ const QSWAP_SWAP_EXACT_ASSET_FOR_QU_OUTPUT_FIELDS = [
375
352
  byteLength: 8,
376
353
  },
377
354
  ];
378
- export function decodeQswapSwapExactAssetForQuOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
379
- return decodePayload(data, QSWAP_SWAP_EXACT_ASSET_FOR_QU_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
355
+ export function decodeQswapSwapExactAssetForQuOutput(data) {
356
+ return decodePayload(data, QSWAP_SWAP_EXACT_ASSET_FOR_QU_OUTPUT_FIELDS, STRUCTS, (_pk) => 'A'.repeat(60));
380
357
  }
381
- export const QSWAP_SWAP_ASSET_FOR_EXACT_QU_INPUT_TYPE = 18;
358
+ export const QSWAP_SWAP_ASSET_FOR_EXACT_QU_INPUT_TYPE = 9;
382
359
  const QSWAP_SWAP_ASSET_FOR_EXACT_QU_INPUT_FIELDS = [
383
360
  {
384
361
  name: 'assetIssuer',
@@ -405,8 +382,8 @@ const QSWAP_SWAP_ASSET_FOR_EXACT_QU_INPUT_FIELDS = [
405
382
  byteLength: 8,
406
383
  },
407
384
  ];
408
- export function buildQswapSwapAssetForExactQuInput(input, identityToPublicKey = (_identity) => new Uint8Array(32)) {
409
- return buildPayload(QSWAP_SWAP_ASSET_FOR_EXACT_QU_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
385
+ export function buildQswapSwapAssetForExactQuInput(input, identityToPublicKey) {
386
+ return { contractIndex: QSWAP_CONTRACT_INDEX, inputType: QSWAP_SWAP_ASSET_FOR_EXACT_QU_INPUT_TYPE, payload: buildPayload(QSWAP_SWAP_ASSET_FOR_EXACT_QU_INPUT_FIELDS, STRUCTS, input, identityToPublicKey) };
410
387
  }
411
388
  const QSWAP_SWAP_ASSET_FOR_EXACT_QU_OUTPUT_FIELDS = [
412
389
  {
@@ -416,10 +393,33 @@ const QSWAP_SWAP_ASSET_FOR_EXACT_QU_OUTPUT_FIELDS = [
416
393
  byteLength: 8,
417
394
  },
418
395
  ];
419
- export function decodeQswapSwapAssetForExactQuOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
420
- return decodePayload(data, QSWAP_SWAP_ASSET_FOR_EXACT_QU_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
396
+ export function decodeQswapSwapAssetForExactQuOutput(data) {
397
+ return decodePayload(data, QSWAP_SWAP_ASSET_FOR_EXACT_QU_OUTPUT_FIELDS, STRUCTS, (_pk) => 'A'.repeat(60));
398
+ }
399
+ export const QSWAP_SET_INVEST_REWARDS_INFO_INPUT_TYPE = 10;
400
+ const QSWAP_SET_INVEST_REWARDS_INFO_INPUT_FIELDS = [
401
+ {
402
+ name: 'newInvestRewardsId',
403
+ type: 'id',
404
+ offset: 0,
405
+ byteLength: 32,
406
+ },
407
+ ];
408
+ export function buildQswapSetInvestRewardsInfoInput(input, identityToPublicKey) {
409
+ return { contractIndex: QSWAP_CONTRACT_INDEX, inputType: QSWAP_SET_INVEST_REWARDS_INFO_INPUT_TYPE, payload: buildPayload(QSWAP_SET_INVEST_REWARDS_INFO_INPUT_FIELDS, STRUCTS, input, identityToPublicKey) };
410
+ }
411
+ const QSWAP_SET_INVEST_REWARDS_INFO_OUTPUT_FIELDS = [
412
+ {
413
+ name: 'success',
414
+ type: 'uint8',
415
+ offset: 0,
416
+ byteLength: 1,
417
+ },
418
+ ];
419
+ export function decodeQswapSetInvestRewardsInfoOutput(data) {
420
+ return decodePayload(data, QSWAP_SET_INVEST_REWARDS_INFO_OUTPUT_FIELDS, STRUCTS, (_pk) => 'A'.repeat(60));
421
421
  }
422
- export const QSWAP_TRANSFER_SHARE_MANAGEMENT_RIGHTS_INPUT_TYPE = 19;
422
+ export const QSWAP_TRANSFER_SHARE_MANAGEMENT_RIGHTS_INPUT_TYPE = 11;
423
423
  const QSWAP_TRANSFER_SHARE_MANAGEMENT_RIGHTS_INPUT_FIELDS = [
424
424
  {
425
425
  name: 'asset',
@@ -441,8 +441,8 @@ const QSWAP_TRANSFER_SHARE_MANAGEMENT_RIGHTS_INPUT_FIELDS = [
441
441
  byteLength: 4,
442
442
  },
443
443
  ];
444
- export function buildQswapTransferShareManagementRightsInput(input, identityToPublicKey = (_identity) => new Uint8Array(32)) {
445
- return buildPayload(QSWAP_TRANSFER_SHARE_MANAGEMENT_RIGHTS_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
444
+ export function buildQswapTransferShareManagementRightsInput(input) {
445
+ return { contractIndex: QSWAP_CONTRACT_INDEX, inputType: QSWAP_TRANSFER_SHARE_MANAGEMENT_RIGHTS_INPUT_TYPE, payload: buildPayload(QSWAP_TRANSFER_SHARE_MANAGEMENT_RIGHTS_INPUT_FIELDS, STRUCTS, input, (_) => new Uint8Array(32)) };
446
446
  }
447
447
  const QSWAP_TRANSFER_SHARE_MANAGEMENT_RIGHTS_OUTPUT_FIELDS = [
448
448
  {
@@ -452,8 +452,8 @@ const QSWAP_TRANSFER_SHARE_MANAGEMENT_RIGHTS_OUTPUT_FIELDS = [
452
452
  byteLength: 8,
453
453
  },
454
454
  ];
455
- export function decodeQswapTransferShareManagementRightsOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
456
- return decodePayload(data, QSWAP_TRANSFER_SHARE_MANAGEMENT_RIGHTS_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
455
+ export function decodeQswapTransferShareManagementRightsOutput(data) {
456
+ return decodePayload(data, QSWAP_TRANSFER_SHARE_MANAGEMENT_RIGHTS_OUTPUT_FIELDS, STRUCTS, (_pk) => 'A'.repeat(60));
457
457
  }
458
458
  export const QSWAP_FEES_INPUT_TYPE = 1;
459
459
  export const QSWAP_FEES_INPUT_SIZE = 0;
@@ -507,8 +507,8 @@ const QSWAP_FEES_OUTPUT_FIELDS = [
507
507
  byteLength: 4,
508
508
  },
509
509
  ];
510
- export function decodeQswapFeesOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
511
- return decodePayload(data, QSWAP_FEES_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
510
+ export function decodeQswapFeesOutput(data) {
511
+ return decodePayload(data, QSWAP_FEES_OUTPUT_FIELDS, STRUCTS, (_pk) => 'A'.repeat(60));
512
512
  }
513
513
  export async function qswapFees(live, options) {
514
514
  return callContractFunction({
@@ -523,39 +523,7 @@ export async function qswapFees(live, options) {
523
523
  ...options,
524
524
  });
525
525
  }
526
- export const QSWAP_INVEST_REWARDS_INFO_INPUT_TYPE = 2;
527
- export const QSWAP_INVEST_REWARDS_INFO_INPUT_SIZE = 0;
528
- const QSWAP_INVEST_REWARDS_INFO_OUTPUT_FIELDS = [
529
- {
530
- name: 'investRewardsFee',
531
- type: 'uint32',
532
- offset: 0,
533
- byteLength: 4,
534
- },
535
- {
536
- name: 'investRewardsId',
537
- type: 'id',
538
- offset: 4,
539
- byteLength: 32,
540
- },
541
- ];
542
- export function decodeQswapInvestRewardsInfoOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
543
- return decodePayload(data, QSWAP_INVEST_REWARDS_INFO_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
544
- }
545
- export async function qswapInvestRewardsInfo(live, options) {
546
- return callContractFunction({
547
- live,
548
- contractIndex: QSWAP_CONTRACT_INDEX,
549
- inputType: QSWAP_INVEST_REWARDS_INFO_INPUT_TYPE,
550
- inputSize: QSWAP_INVEST_REWARDS_INFO_INPUT_SIZE,
551
- inputFields: [],
552
- outputFields: QSWAP_INVEST_REWARDS_INFO_OUTPUT_FIELDS,
553
- structs: STRUCTS,
554
- input: {},
555
- ...options,
556
- });
557
- }
558
- export const QSWAP_GET_POOL_BASIC_STATE_INPUT_TYPE = 4;
526
+ export const QSWAP_GET_POOL_BASIC_STATE_INPUT_TYPE = 2;
559
527
  export const QSWAP_GET_POOL_BASIC_STATE_INPUT_SIZE = 40;
560
528
  const QSWAP_GET_POOL_BASIC_STATE_INPUT_FIELDS = [
561
529
  {
@@ -571,7 +539,7 @@ const QSWAP_GET_POOL_BASIC_STATE_INPUT_FIELDS = [
571
539
  byteLength: 8,
572
540
  },
573
541
  ];
574
- export function buildQswapGetPoolBasicStateInput(input, identityToPublicKey = (_identity) => new Uint8Array(32)) {
542
+ export function buildQswapGetPoolBasicStateInput(input, identityToPublicKey) {
575
543
  return buildPayload(QSWAP_GET_POOL_BASIC_STATE_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
576
544
  }
577
545
  const QSWAP_GET_POOL_BASIC_STATE_OUTPUT_FIELDS = [
@@ -600,8 +568,8 @@ const QSWAP_GET_POOL_BASIC_STATE_OUTPUT_FIELDS = [
600
568
  byteLength: 8,
601
569
  },
602
570
  ];
603
- export function decodeQswapGetPoolBasicStateOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
604
- return decodePayload(data, QSWAP_GET_POOL_BASIC_STATE_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
571
+ export function decodeQswapGetPoolBasicStateOutput(data) {
572
+ return decodePayload(data, QSWAP_GET_POOL_BASIC_STATE_OUTPUT_FIELDS, STRUCTS, (_pk) => 'A'.repeat(60));
605
573
  }
606
574
  export async function qswapGetPoolBasicState(live, input, options) {
607
575
  return callContractFunction({
@@ -616,7 +584,7 @@ export async function qswapGetPoolBasicState(live, input, options) {
616
584
  ...options,
617
585
  });
618
586
  }
619
- export const QSWAP_GET_LIQUIDITY_OF_INPUT_TYPE = 5;
587
+ export const QSWAP_GET_LIQUIDITY_OF_INPUT_TYPE = 3;
620
588
  export const QSWAP_GET_LIQUIDITY_OF_INPUT_SIZE = 72;
621
589
  const QSWAP_GET_LIQUIDITY_OF_INPUT_FIELDS = [
622
590
  {
@@ -638,7 +606,7 @@ const QSWAP_GET_LIQUIDITY_OF_INPUT_FIELDS = [
638
606
  byteLength: 32,
639
607
  },
640
608
  ];
641
- export function buildQswapGetLiquidityOfInput(input, identityToPublicKey = (_identity) => new Uint8Array(32)) {
609
+ export function buildQswapGetLiquidityOfInput(input, identityToPublicKey) {
642
610
  return buildPayload(QSWAP_GET_LIQUIDITY_OF_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
643
611
  }
644
612
  const QSWAP_GET_LIQUIDITY_OF_OUTPUT_FIELDS = [
@@ -649,8 +617,8 @@ const QSWAP_GET_LIQUIDITY_OF_OUTPUT_FIELDS = [
649
617
  byteLength: 8,
650
618
  },
651
619
  ];
652
- export function decodeQswapGetLiquidityOfOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
653
- return decodePayload(data, QSWAP_GET_LIQUIDITY_OF_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
620
+ export function decodeQswapGetLiquidityOfOutput(data) {
621
+ return decodePayload(data, QSWAP_GET_LIQUIDITY_OF_OUTPUT_FIELDS, STRUCTS, (_pk) => 'A'.repeat(60));
654
622
  }
655
623
  export async function qswapGetLiquidityOf(live, input, options) {
656
624
  return callContractFunction({
@@ -665,7 +633,7 @@ export async function qswapGetLiquidityOf(live, input, options) {
665
633
  ...options,
666
634
  });
667
635
  }
668
- export const QSWAP_QUOTE_EXACT_QU_INPUT_INPUT_TYPE = 6;
636
+ export const QSWAP_QUOTE_EXACT_QU_INPUT_INPUT_TYPE = 4;
669
637
  export const QSWAP_QUOTE_EXACT_QU_INPUT_INPUT_SIZE = 48;
670
638
  const QSWAP_QUOTE_EXACT_QU_INPUT_INPUT_FIELDS = [
671
639
  {
@@ -687,7 +655,7 @@ const QSWAP_QUOTE_EXACT_QU_INPUT_INPUT_FIELDS = [
687
655
  byteLength: 8,
688
656
  },
689
657
  ];
690
- export function buildQswapQuoteExactQuInputInput(input, identityToPublicKey = (_identity) => new Uint8Array(32)) {
658
+ export function buildQswapQuoteExactQuInputInput(input, identityToPublicKey) {
691
659
  return buildPayload(QSWAP_QUOTE_EXACT_QU_INPUT_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
692
660
  }
693
661
  const QSWAP_QUOTE_EXACT_QU_INPUT_OUTPUT_FIELDS = [
@@ -698,8 +666,8 @@ const QSWAP_QUOTE_EXACT_QU_INPUT_OUTPUT_FIELDS = [
698
666
  byteLength: 8,
699
667
  },
700
668
  ];
701
- export function decodeQswapQuoteExactQuInputOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
702
- return decodePayload(data, QSWAP_QUOTE_EXACT_QU_INPUT_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
669
+ export function decodeQswapQuoteExactQuInputOutput(data) {
670
+ return decodePayload(data, QSWAP_QUOTE_EXACT_QU_INPUT_OUTPUT_FIELDS, STRUCTS, (_pk) => 'A'.repeat(60));
703
671
  }
704
672
  export async function qswapQuoteExactQuInput(live, input, options) {
705
673
  return callContractFunction({
@@ -714,7 +682,7 @@ export async function qswapQuoteExactQuInput(live, input, options) {
714
682
  ...options,
715
683
  });
716
684
  }
717
- export const QSWAP_QUOTE_EXACT_QU_OUTPUT_INPUT_TYPE = 7;
685
+ export const QSWAP_QUOTE_EXACT_QU_OUTPUT_INPUT_TYPE = 5;
718
686
  export const QSWAP_QUOTE_EXACT_QU_OUTPUT_INPUT_SIZE = 48;
719
687
  const QSWAP_QUOTE_EXACT_QU_OUTPUT_INPUT_FIELDS = [
720
688
  {
@@ -736,7 +704,7 @@ const QSWAP_QUOTE_EXACT_QU_OUTPUT_INPUT_FIELDS = [
736
704
  byteLength: 8,
737
705
  },
738
706
  ];
739
- export function buildQswapQuoteExactQuOutputInput(input, identityToPublicKey = (_identity) => new Uint8Array(32)) {
707
+ export function buildQswapQuoteExactQuOutputInput(input, identityToPublicKey) {
740
708
  return buildPayload(QSWAP_QUOTE_EXACT_QU_OUTPUT_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
741
709
  }
742
710
  const QSWAP_QUOTE_EXACT_QU_OUTPUT_OUTPUT_FIELDS = [
@@ -747,8 +715,8 @@ const QSWAP_QUOTE_EXACT_QU_OUTPUT_OUTPUT_FIELDS = [
747
715
  byteLength: 8,
748
716
  },
749
717
  ];
750
- export function decodeQswapQuoteExactQuOutputOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
751
- return decodePayload(data, QSWAP_QUOTE_EXACT_QU_OUTPUT_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
718
+ export function decodeQswapQuoteExactQuOutputOutput(data) {
719
+ return decodePayload(data, QSWAP_QUOTE_EXACT_QU_OUTPUT_OUTPUT_FIELDS, STRUCTS, (_pk) => 'A'.repeat(60));
752
720
  }
753
721
  export async function qswapQuoteExactQuOutput(live, input, options) {
754
722
  return callContractFunction({
@@ -763,7 +731,7 @@ export async function qswapQuoteExactQuOutput(live, input, options) {
763
731
  ...options,
764
732
  });
765
733
  }
766
- export const QSWAP_QUOTE_EXACT_ASSET_INPUT_INPUT_TYPE = 8;
734
+ export const QSWAP_QUOTE_EXACT_ASSET_INPUT_INPUT_TYPE = 6;
767
735
  export const QSWAP_QUOTE_EXACT_ASSET_INPUT_INPUT_SIZE = 48;
768
736
  const QSWAP_QUOTE_EXACT_ASSET_INPUT_INPUT_FIELDS = [
769
737
  {
@@ -785,7 +753,7 @@ const QSWAP_QUOTE_EXACT_ASSET_INPUT_INPUT_FIELDS = [
785
753
  byteLength: 8,
786
754
  },
787
755
  ];
788
- export function buildQswapQuoteExactAssetInputInput(input, identityToPublicKey = (_identity) => new Uint8Array(32)) {
756
+ export function buildQswapQuoteExactAssetInputInput(input, identityToPublicKey) {
789
757
  return buildPayload(QSWAP_QUOTE_EXACT_ASSET_INPUT_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
790
758
  }
791
759
  const QSWAP_QUOTE_EXACT_ASSET_INPUT_OUTPUT_FIELDS = [
@@ -796,8 +764,8 @@ const QSWAP_QUOTE_EXACT_ASSET_INPUT_OUTPUT_FIELDS = [
796
764
  byteLength: 8,
797
765
  },
798
766
  ];
799
- export function decodeQswapQuoteExactAssetInputOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
800
- return decodePayload(data, QSWAP_QUOTE_EXACT_ASSET_INPUT_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
767
+ export function decodeQswapQuoteExactAssetInputOutput(data) {
768
+ return decodePayload(data, QSWAP_QUOTE_EXACT_ASSET_INPUT_OUTPUT_FIELDS, STRUCTS, (_pk) => 'A'.repeat(60));
801
769
  }
802
770
  export async function qswapQuoteExactAssetInput(live, input, options) {
803
771
  return callContractFunction({
@@ -812,7 +780,7 @@ export async function qswapQuoteExactAssetInput(live, input, options) {
812
780
  ...options,
813
781
  });
814
782
  }
815
- export const QSWAP_QUOTE_EXACT_ASSET_OUTPUT_INPUT_TYPE = 9;
783
+ export const QSWAP_QUOTE_EXACT_ASSET_OUTPUT_INPUT_TYPE = 7;
816
784
  export const QSWAP_QUOTE_EXACT_ASSET_OUTPUT_INPUT_SIZE = 48;
817
785
  const QSWAP_QUOTE_EXACT_ASSET_OUTPUT_INPUT_FIELDS = [
818
786
  {
@@ -834,7 +802,7 @@ const QSWAP_QUOTE_EXACT_ASSET_OUTPUT_INPUT_FIELDS = [
834
802
  byteLength: 8,
835
803
  },
836
804
  ];
837
- export function buildQswapQuoteExactAssetOutputInput(input, identityToPublicKey = (_identity) => new Uint8Array(32)) {
805
+ export function buildQswapQuoteExactAssetOutputInput(input, identityToPublicKey) {
838
806
  return buildPayload(QSWAP_QUOTE_EXACT_ASSET_OUTPUT_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
839
807
  }
840
808
  const QSWAP_QUOTE_EXACT_ASSET_OUTPUT_OUTPUT_FIELDS = [
@@ -845,8 +813,8 @@ const QSWAP_QUOTE_EXACT_ASSET_OUTPUT_OUTPUT_FIELDS = [
845
813
  byteLength: 8,
846
814
  },
847
815
  ];
848
- export function decodeQswapQuoteExactAssetOutputOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
849
- return decodePayload(data, QSWAP_QUOTE_EXACT_ASSET_OUTPUT_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
816
+ export function decodeQswapQuoteExactAssetOutputOutput(data) {
817
+ return decodePayload(data, QSWAP_QUOTE_EXACT_ASSET_OUTPUT_OUTPUT_FIELDS, STRUCTS, (_pk) => 'A'.repeat(60));
850
818
  }
851
819
  export async function qswapQuoteExactAssetOutput(live, input, options) {
852
820
  return callContractFunction({
@@ -861,24 +829,54 @@ export async function qswapQuoteExactAssetOutput(live, input, options) {
861
829
  ...options,
862
830
  });
863
831
  }
832
+ export const QSWAP_INVEST_REWARDS_INFO_INPUT_TYPE = 8;
833
+ export const QSWAP_INVEST_REWARDS_INFO_INPUT_SIZE = 0;
834
+ const QSWAP_INVEST_REWARDS_INFO_OUTPUT_FIELDS = [
835
+ {
836
+ name: 'investRewardsFee',
837
+ type: 'uint32',
838
+ offset: 0,
839
+ byteLength: 4,
840
+ },
841
+ {
842
+ name: 'investRewardsId',
843
+ type: 'id',
844
+ offset: 4,
845
+ byteLength: 32,
846
+ },
847
+ ];
848
+ export function decodeQswapInvestRewardsInfoOutput(data, publicKeyToIdentity) {
849
+ return decodePayload(data, QSWAP_INVEST_REWARDS_INFO_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
850
+ }
851
+ export async function qswapInvestRewardsInfo(live, options) {
852
+ return callContractFunction({
853
+ live,
854
+ contractIndex: QSWAP_CONTRACT_INDEX,
855
+ inputType: QSWAP_INVEST_REWARDS_INFO_INPUT_TYPE,
856
+ inputSize: QSWAP_INVEST_REWARDS_INFO_INPUT_SIZE,
857
+ inputFields: [],
858
+ outputFields: QSWAP_INVEST_REWARDS_INFO_OUTPUT_FIELDS,
859
+ structs: STRUCTS,
860
+ input: {},
861
+ ...options,
862
+ });
863
+ }
864
864
  export const qswap = {
865
865
  contractIndex: QSWAP_CONTRACT_INDEX,
866
866
  Fees: qswapFees,
867
- InvestRewardsInfo: qswapInvestRewardsInfo,
868
867
  GetPoolBasicState: qswapGetPoolBasicState,
869
868
  GetLiquidityOf: qswapGetLiquidityOf,
870
869
  QuoteExactQuInput: qswapQuoteExactQuInput,
871
870
  QuoteExactQuOutput: qswapQuoteExactQuOutput,
872
871
  QuoteExactAssetInput: qswapQuoteExactAssetInput,
873
872
  QuoteExactAssetOutput: qswapQuoteExactAssetOutput,
874
- buildSetInvestRewardsInfoInput: buildQswapSetInvestRewardsInfoInput,
875
- decodeSetInvestRewardsInfoOutput: decodeQswapSetInvestRewardsInfoOutput,
873
+ InvestRewardsInfo: qswapInvestRewardsInfo,
876
874
  buildIssueAssetInput: buildQswapIssueAssetInput,
877
875
  decodeIssueAssetOutput: decodeQswapIssueAssetOutput,
878
- buildCreatePoolInput: buildQswapCreatePoolInput,
879
- decodeCreatePoolOutput: decodeQswapCreatePoolOutput,
880
876
  buildTransferShareOwnershipAndPossessionInput: buildQswapTransferShareOwnershipAndPossessionInput,
881
877
  decodeTransferShareOwnershipAndPossessionOutput: decodeQswapTransferShareOwnershipAndPossessionOutput,
878
+ buildCreatePoolInput: buildQswapCreatePoolInput,
879
+ decodeCreatePoolOutput: decodeQswapCreatePoolOutput,
882
880
  buildAddLiquidityInput: buildQswapAddLiquidityInput,
883
881
  decodeAddLiquidityOutput: decodeQswapAddLiquidityOutput,
884
882
  buildRemoveLiquidityInput: buildQswapRemoveLiquidityInput,
@@ -891,6 +889,8 @@ export const qswap = {
891
889
  decodeSwapExactAssetForQuOutput: decodeQswapSwapExactAssetForQuOutput,
892
890
  buildSwapAssetForExactQuInput: buildQswapSwapAssetForExactQuInput,
893
891
  decodeSwapAssetForExactQuOutput: decodeQswapSwapAssetForExactQuOutput,
892
+ buildSetInvestRewardsInfoInput: buildQswapSetInvestRewardsInfoInput,
893
+ decodeSetInvestRewardsInfoOutput: decodeQswapSetInvestRewardsInfoOutput,
894
894
  buildTransferShareManagementRightsInput: buildQswapTransferShareManagementRightsInput,
895
895
  decodeTransferShareManagementRightsOutput: decodeQswapTransferShareManagementRightsOutput,
896
896
  };