@qubic.org/contracts 0.2.0

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 (134) hide show
  1. package/README.md +285 -0
  2. package/dist/__generated__/computorcontrolledfund.d.ts +185 -0
  3. package/dist/__generated__/computorcontrolledfund.d.ts.map +1 -0
  4. package/dist/__generated__/computorcontrolledfund.js +805 -0
  5. package/dist/__generated__/computorcontrolledfund.js.map +1 -0
  6. package/dist/__generated__/escrow.d.ts +103 -0
  7. package/dist/__generated__/escrow.d.ts.map +1 -0
  8. package/dist/__generated__/escrow.js +383 -0
  9. package/dist/__generated__/escrow.js.map +1 -0
  10. package/dist/__generated__/generalquorumproposal.d.ts +130 -0
  11. package/dist/__generated__/generalquorumproposal.d.ts.map +1 -0
  12. package/dist/__generated__/generalquorumproposal.js +499 -0
  13. package/dist/__generated__/generalquorumproposal.js.map +1 -0
  14. package/dist/__generated__/index.d.ts +28 -0
  15. package/dist/__generated__/index.d.ts.map +1 -0
  16. package/dist/__generated__/index.js +28 -0
  17. package/dist/__generated__/index.js.map +1 -0
  18. package/dist/__generated__/msvault.d.ts +336 -0
  19. package/dist/__generated__/msvault.d.ts.map +1 -0
  20. package/dist/__generated__/msvault.js +1187 -0
  21. package/dist/__generated__/msvault.js.map +1 -0
  22. package/dist/__generated__/multisignvault.d.ts +348 -0
  23. package/dist/__generated__/multisignvault.d.ts.map +1 -0
  24. package/dist/__generated__/multisignvault.js +913 -0
  25. package/dist/__generated__/multisignvault.js.map +1 -0
  26. package/dist/__generated__/mylastmatch.d.ts +5 -0
  27. package/dist/__generated__/mylastmatch.d.ts.map +1 -0
  28. package/dist/__generated__/mylastmatch.js +7 -0
  29. package/dist/__generated__/mylastmatch.js.map +1 -0
  30. package/dist/__generated__/nostromo.d.ts +295 -0
  31. package/dist/__generated__/nostromo.d.ts.map +1 -0
  32. package/dist/__generated__/nostromo.js +1113 -0
  33. package/dist/__generated__/nostromo.js.map +1 -0
  34. package/dist/__generated__/pulse.d.ts +320 -0
  35. package/dist/__generated__/pulse.d.ts.map +1 -0
  36. package/dist/__generated__/pulse.js +1024 -0
  37. package/dist/__generated__/pulse.js.map +1 -0
  38. package/dist/__generated__/qbay.d.ts +415 -0
  39. package/dist/__generated__/qbay.d.ts.map +1 -0
  40. package/dist/__generated__/qbay.js +1486 -0
  41. package/dist/__generated__/qbay.js.map +1 -0
  42. package/dist/__generated__/qbond.d.ts +210 -0
  43. package/dist/__generated__/qbond.d.ts.map +1 -0
  44. package/dist/__generated__/qbond.js +694 -0
  45. package/dist/__generated__/qbond.js.map +1 -0
  46. package/dist/__generated__/qdraw.d.ts +39 -0
  47. package/dist/__generated__/qdraw.d.ts.map +1 -0
  48. package/dist/__generated__/qdraw.js +135 -0
  49. package/dist/__generated__/qdraw.js.map +1 -0
  50. package/dist/__generated__/qduel.d.ts +171 -0
  51. package/dist/__generated__/qduel.d.ts.map +1 -0
  52. package/dist/__generated__/qduel.js +573 -0
  53. package/dist/__generated__/qduel.js.map +1 -0
  54. package/dist/__generated__/qearn.d.ts +139 -0
  55. package/dist/__generated__/qearn.d.ts.map +1 -0
  56. package/dist/__generated__/qearn.js +471 -0
  57. package/dist/__generated__/qearn.js.map +1 -0
  58. package/dist/__generated__/qip.d.ts +84 -0
  59. package/dist/__generated__/qip.d.ts.map +1 -0
  60. package/dist/__generated__/qip.js +303 -0
  61. package/dist/__generated__/qip.js.map +1 -0
  62. package/dist/__generated__/qraffle.d.ts +235 -0
  63. package/dist/__generated__/qraffle.d.ts.map +1 -0
  64. package/dist/__generated__/qraffle.js +798 -0
  65. package/dist/__generated__/qraffle.js.map +1 -0
  66. package/dist/__generated__/qreservepool.d.ts +70 -0
  67. package/dist/__generated__/qreservepool.d.ts.map +1 -0
  68. package/dist/__generated__/qreservepool.js +177 -0
  69. package/dist/__generated__/qreservepool.js.map +1 -0
  70. package/dist/__generated__/qrwa.d.ts +285 -0
  71. package/dist/__generated__/qrwa.d.ts.map +1 -0
  72. package/dist/__generated__/qrwa.js +1063 -0
  73. package/dist/__generated__/qrwa.js.map +1 -0
  74. package/dist/__generated__/qswap.d.ts +273 -0
  75. package/dist/__generated__/qswap.d.ts.map +1 -0
  76. package/dist/__generated__/qswap.js +897 -0
  77. package/dist/__generated__/qswap.js.map +1 -0
  78. package/dist/__generated__/qthirtyfour.d.ts +231 -0
  79. package/dist/__generated__/qthirtyfour.d.ts.map +1 -0
  80. package/dist/__generated__/qthirtyfour.js +790 -0
  81. package/dist/__generated__/qthirtyfour.js.map +1 -0
  82. package/dist/__generated__/qubicicoportal.d.ts +81 -0
  83. package/dist/__generated__/qubicicoportal.d.ts.map +1 -0
  84. package/dist/__generated__/qubicicoportal.js +260 -0
  85. package/dist/__generated__/qubicicoportal.js.map +1 -0
  86. package/dist/__generated__/quottery.d.ts +308 -0
  87. package/dist/__generated__/quottery.d.ts.map +1 -0
  88. package/dist/__generated__/quottery.js +1062 -0
  89. package/dist/__generated__/quottery.js.map +1 -0
  90. package/dist/__generated__/qusino.d.ts +172 -0
  91. package/dist/__generated__/qusino.d.ts.map +1 -0
  92. package/dist/__generated__/qusino.js +533 -0
  93. package/dist/__generated__/qusino.js.map +1 -0
  94. package/dist/__generated__/qutil.d.ts +310 -0
  95. package/dist/__generated__/qutil.d.ts.map +1 -0
  96. package/dist/__generated__/qutil.js +1033 -0
  97. package/dist/__generated__/qutil.js.map +1 -0
  98. package/dist/__generated__/qvault.d.ts +535 -0
  99. package/dist/__generated__/qvault.d.ts.map +1 -0
  100. package/dist/__generated__/qvault.js +2047 -0
  101. package/dist/__generated__/qvault.js.map +1 -0
  102. package/dist/__generated__/qx.d.ts +178 -0
  103. package/dist/__generated__/qx.d.ts.map +1 -0
  104. package/dist/__generated__/qx.js +586 -0
  105. package/dist/__generated__/qx.js.map +1 -0
  106. package/dist/__generated__/random.d.ts +12 -0
  107. package/dist/__generated__/random.d.ts.map +1 -0
  108. package/dist/__generated__/random.js +26 -0
  109. package/dist/__generated__/random.js.map +1 -0
  110. package/dist/__generated__/randomlottery.d.ts +135 -0
  111. package/dist/__generated__/randomlottery.d.ts.map +1 -0
  112. package/dist/__generated__/randomlottery.js +451 -0
  113. package/dist/__generated__/randomlottery.js.map +1 -0
  114. package/dist/__generated__/supplywatcher.d.ts +5 -0
  115. package/dist/__generated__/supplywatcher.d.ts.map +1 -0
  116. package/dist/__generated__/supplywatcher.js +7 -0
  117. package/dist/__generated__/supplywatcher.js.map +1 -0
  118. package/dist/__generated__/vottunbridge.d.ts +226 -0
  119. package/dist/__generated__/vottunbridge.d.ts.map +1 -0
  120. package/dist/__generated__/vottunbridge.js +835 -0
  121. package/dist/__generated__/vottunbridge.js.map +1 -0
  122. package/dist/call-contract.d.ts +25 -0
  123. package/dist/call-contract.d.ts.map +1 -0
  124. package/dist/call-contract.js +41 -0
  125. package/dist/call-contract.js.map +1 -0
  126. package/dist/index.d.ts +6 -0
  127. package/dist/index.d.ts.map +1 -0
  128. package/dist/index.js +4 -0
  129. package/dist/index.js.map +1 -0
  130. package/dist/result.d.ts +12 -0
  131. package/dist/result.d.ts.map +1 -0
  132. package/dist/result.js +7 -0
  133. package/dist/result.js.map +1 -0
  134. package/package.json +32 -0
@@ -0,0 +1,1063 @@
1
+ import { buildPayload, decodePayload } from '@qubic.org/registry';
2
+ import { callContractFunction } from '../call-contract.js';
3
+ export const Q_RWA_CONTRACT_INDEX = 20;
4
+ const STRUCTS = {
5
+ 'QRWAGovParams': {
6
+ name: 'QRWAGovParams',
7
+ byteLength: 184,
8
+ fields: [
9
+ {
10
+ name: 'mAdminAddress',
11
+ type: 'id',
12
+ offset: 0,
13
+ byteLength: 32,
14
+ },
15
+ {
16
+ name: 'electricityAddress',
17
+ type: 'id',
18
+ offset: 32,
19
+ byteLength: 32,
20
+ },
21
+ {
22
+ name: 'maintenanceAddress',
23
+ type: 'id',
24
+ offset: 64,
25
+ byteLength: 32,
26
+ },
27
+ {
28
+ name: 'reinvestmentAddress',
29
+ type: 'id',
30
+ offset: 96,
31
+ byteLength: 32,
32
+ },
33
+ {
34
+ name: 'qmineDevAddress',
35
+ type: 'id',
36
+ offset: 128,
37
+ byteLength: 32,
38
+ },
39
+ {
40
+ name: 'electricityPercent',
41
+ type: 'uint64',
42
+ offset: 160,
43
+ byteLength: 8,
44
+ },
45
+ {
46
+ name: 'maintenancePercent',
47
+ type: 'uint64',
48
+ offset: 168,
49
+ byteLength: 8,
50
+ },
51
+ {
52
+ name: 'reinvestmentPercent',
53
+ type: 'uint64',
54
+ offset: 176,
55
+ byteLength: 8,
56
+ },
57
+ ],
58
+ },
59
+ 'Asset': {
60
+ name: 'Asset',
61
+ byteLength: 40,
62
+ fields: [
63
+ {
64
+ name: 'issuer',
65
+ type: 'id',
66
+ offset: 0,
67
+ byteLength: 32,
68
+ },
69
+ {
70
+ name: 'assetName',
71
+ type: 'uint64',
72
+ offset: 32,
73
+ byteLength: 8,
74
+ },
75
+ ],
76
+ },
77
+ 'QRWAGovProposal': {
78
+ name: 'QRWAGovProposal',
79
+ byteLength: 208,
80
+ fields: [
81
+ {
82
+ name: 'proposalId',
83
+ type: 'uint64',
84
+ offset: 0,
85
+ byteLength: 8,
86
+ },
87
+ {
88
+ name: 'status',
89
+ type: 'uint64',
90
+ offset: 8,
91
+ byteLength: 8,
92
+ },
93
+ {
94
+ name: 'score',
95
+ type: 'uint64',
96
+ offset: 16,
97
+ byteLength: 8,
98
+ },
99
+ {
100
+ name: 'params',
101
+ type: 'struct',
102
+ offset: 24,
103
+ byteLength: 184,
104
+ structRef: 'QRWAGovParams',
105
+ },
106
+ ],
107
+ },
108
+ 'QRWAPayoutEntry': {
109
+ name: 'QRWAPayoutEntry',
110
+ byteLength: 64,
111
+ fields: [
112
+ {
113
+ name: 'recipient',
114
+ type: 'id',
115
+ offset: 0,
116
+ byteLength: 32,
117
+ },
118
+ {
119
+ name: 'amount',
120
+ type: 'uint64',
121
+ offset: 32,
122
+ byteLength: 8,
123
+ },
124
+ {
125
+ name: 'qmineHolding',
126
+ type: 'uint64',
127
+ offset: 40,
128
+ byteLength: 8,
129
+ },
130
+ {
131
+ name: 'qrwaHolding',
132
+ type: 'uint64',
133
+ offset: 48,
134
+ byteLength: 8,
135
+ },
136
+ {
137
+ name: 'tick',
138
+ type: 'uint32',
139
+ offset: 56,
140
+ byteLength: 4,
141
+ },
142
+ {
143
+ name: 'epoch',
144
+ type: 'uint16',
145
+ offset: 60,
146
+ byteLength: 2,
147
+ },
148
+ {
149
+ name: 'payoutType',
150
+ type: 'uint8',
151
+ offset: 62,
152
+ byteLength: 1,
153
+ },
154
+ {
155
+ name: '_pad0',
156
+ type: 'uint8',
157
+ offset: 63,
158
+ byteLength: 1,
159
+ },
160
+ ],
161
+ },
162
+ };
163
+ export const Q_RWA_DONATE_TO_TREASURY_INPUT_TYPE = 1;
164
+ const Q_RWA_DONATE_TO_TREASURY_INPUT_FIELDS = [
165
+ {
166
+ name: 'amount',
167
+ type: 'uint64',
168
+ offset: 0,
169
+ byteLength: 8,
170
+ },
171
+ ];
172
+ export function buildQRWADonateToTreasuryInput(input, identityToPublicKey = (_identity) => new Uint8Array(32)) {
173
+ return buildPayload(Q_RWA_DONATE_TO_TREASURY_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
174
+ }
175
+ const Q_RWA_DONATE_TO_TREASURY_OUTPUT_FIELDS = [
176
+ {
177
+ name: 'status',
178
+ type: 'uint64',
179
+ offset: 0,
180
+ byteLength: 8,
181
+ },
182
+ ];
183
+ export function decodeQRWADonateToTreasuryOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
184
+ return decodePayload(data, Q_RWA_DONATE_TO_TREASURY_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
185
+ }
186
+ export const Q_RWA_VOTE_GOV_PARAMS_INPUT_TYPE = 2;
187
+ const Q_RWA_VOTE_GOV_PARAMS_INPUT_FIELDS = [
188
+ {
189
+ name: 'proposal',
190
+ type: 'struct',
191
+ offset: 0,
192
+ byteLength: 184,
193
+ structRef: 'QRWAGovParams',
194
+ },
195
+ ];
196
+ export function buildQRWAVoteGovParamsInput(input, identityToPublicKey = (_identity) => new Uint8Array(32)) {
197
+ return buildPayload(Q_RWA_VOTE_GOV_PARAMS_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
198
+ }
199
+ const Q_RWA_VOTE_GOV_PARAMS_OUTPUT_FIELDS = [
200
+ {
201
+ name: 'status',
202
+ type: 'uint64',
203
+ offset: 0,
204
+ byteLength: 8,
205
+ },
206
+ ];
207
+ export function decodeQRWAVoteGovParamsOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
208
+ return decodePayload(data, Q_RWA_VOTE_GOV_PARAMS_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
209
+ }
210
+ export const Q_RWA_DEPOSIT_GENERAL_ASSET_INPUT_TYPE = 3;
211
+ const Q_RWA_DEPOSIT_GENERAL_ASSET_INPUT_FIELDS = [
212
+ {
213
+ name: 'asset',
214
+ type: 'struct',
215
+ offset: 0,
216
+ byteLength: 40,
217
+ structRef: 'Asset',
218
+ },
219
+ {
220
+ name: 'amount',
221
+ type: 'uint64',
222
+ offset: 40,
223
+ byteLength: 8,
224
+ },
225
+ ];
226
+ export function buildQRWADepositGeneralAssetInput(input, identityToPublicKey = (_identity) => new Uint8Array(32)) {
227
+ return buildPayload(Q_RWA_DEPOSIT_GENERAL_ASSET_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
228
+ }
229
+ const Q_RWA_DEPOSIT_GENERAL_ASSET_OUTPUT_FIELDS = [
230
+ {
231
+ name: 'status',
232
+ type: 'uint64',
233
+ offset: 0,
234
+ byteLength: 8,
235
+ },
236
+ ];
237
+ export function decodeQRWADepositGeneralAssetOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
238
+ return decodePayload(data, Q_RWA_DEPOSIT_GENERAL_ASSET_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
239
+ }
240
+ export const Q_RWA_REVOKE_ASSET_MANAGEMENT_RIGHTS_INPUT_TYPE = 4;
241
+ const Q_RWA_REVOKE_ASSET_MANAGEMENT_RIGHTS_INPUT_FIELDS = [
242
+ {
243
+ name: 'asset',
244
+ type: 'struct',
245
+ offset: 0,
246
+ byteLength: 40,
247
+ structRef: 'Asset',
248
+ },
249
+ {
250
+ name: 'numberOfShares',
251
+ type: 'sint64',
252
+ offset: 40,
253
+ byteLength: 8,
254
+ },
255
+ ];
256
+ export function buildQRWARevokeAssetManagementRightsInput(input, identityToPublicKey = (_identity) => new Uint8Array(32)) {
257
+ return buildPayload(Q_RWA_REVOKE_ASSET_MANAGEMENT_RIGHTS_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
258
+ }
259
+ const Q_RWA_REVOKE_ASSET_MANAGEMENT_RIGHTS_OUTPUT_FIELDS = [
260
+ {
261
+ name: 'transferredNumberOfShares',
262
+ type: 'sint64',
263
+ offset: 0,
264
+ byteLength: 8,
265
+ },
266
+ {
267
+ name: 'status',
268
+ type: 'uint64',
269
+ offset: 8,
270
+ byteLength: 8,
271
+ },
272
+ ];
273
+ export function decodeQRWARevokeAssetManagementRightsOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
274
+ return decodePayload(data, Q_RWA_REVOKE_ASSET_MANAGEMENT_RIGHTS_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
275
+ }
276
+ export const Q_RWA_SET_POOL_A_REVENUE_ADDRESS_INPUT_TYPE = 5;
277
+ const Q_RWA_SET_POOL_A_REVENUE_ADDRESS_INPUT_FIELDS = [
278
+ {
279
+ name: 'newAddress',
280
+ type: 'id',
281
+ offset: 0,
282
+ byteLength: 32,
283
+ },
284
+ ];
285
+ export function buildQRWASetPoolARevenueAddressInput(input, identityToPublicKey = (_identity) => new Uint8Array(32)) {
286
+ return buildPayload(Q_RWA_SET_POOL_A_REVENUE_ADDRESS_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
287
+ }
288
+ const Q_RWA_SET_POOL_A_REVENUE_ADDRESS_OUTPUT_FIELDS = [
289
+ {
290
+ name: 'status',
291
+ type: 'uint64',
292
+ offset: 0,
293
+ byteLength: 8,
294
+ },
295
+ ];
296
+ export function decodeQRWASetPoolARevenueAddressOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
297
+ return decodePayload(data, Q_RWA_SET_POOL_A_REVENUE_ADDRESS_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
298
+ }
299
+ export const Q_RWA_SET_POOL_D_REVENUE_ADDRESS_INPUT_TYPE = 6;
300
+ const Q_RWA_SET_POOL_D_REVENUE_ADDRESS_INPUT_FIELDS = [
301
+ {
302
+ name: 'newAddress',
303
+ type: 'id',
304
+ offset: 0,
305
+ byteLength: 32,
306
+ },
307
+ ];
308
+ export function buildQRWASetPoolDRevenueAddressInput(input, identityToPublicKey = (_identity) => new Uint8Array(32)) {
309
+ return buildPayload(Q_RWA_SET_POOL_D_REVENUE_ADDRESS_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
310
+ }
311
+ const Q_RWA_SET_POOL_D_REVENUE_ADDRESS_OUTPUT_FIELDS = [
312
+ {
313
+ name: 'status',
314
+ type: 'uint64',
315
+ offset: 0,
316
+ byteLength: 8,
317
+ },
318
+ ];
319
+ export function decodeQRWASetPoolDRevenueAddressOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
320
+ return decodePayload(data, Q_RWA_SET_POOL_D_REVENUE_ADDRESS_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
321
+ }
322
+ export const Q_RWA_GET_GOV_PARAMS_INPUT_TYPE = 7;
323
+ export const Q_RWA_GET_GOV_PARAMS_INPUT_SIZE = 0;
324
+ const Q_RWA_GET_GOV_PARAMS_OUTPUT_FIELDS = [
325
+ {
326
+ name: 'params',
327
+ type: 'struct',
328
+ offset: 0,
329
+ byteLength: 184,
330
+ structRef: 'QRWAGovParams',
331
+ },
332
+ ];
333
+ export function decodeQRWAGetGovParamsOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
334
+ return decodePayload(data, Q_RWA_GET_GOV_PARAMS_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
335
+ }
336
+ export async function qRWAGetGovParams(live, options) {
337
+ return callContractFunction({
338
+ live,
339
+ contractIndex: Q_RWA_CONTRACT_INDEX,
340
+ inputType: Q_RWA_GET_GOV_PARAMS_INPUT_TYPE,
341
+ inputSize: Q_RWA_GET_GOV_PARAMS_INPUT_SIZE,
342
+ inputFields: [],
343
+ outputFields: Q_RWA_GET_GOV_PARAMS_OUTPUT_FIELDS,
344
+ structs: STRUCTS,
345
+ input: {},
346
+ ...options,
347
+ });
348
+ }
349
+ export const Q_RWA_GET_GOV_POLL_INPUT_TYPE = 8;
350
+ export const Q_RWA_GET_GOV_POLL_INPUT_SIZE = 8;
351
+ const Q_RWA_GET_GOV_POLL_INPUT_FIELDS = [
352
+ {
353
+ name: 'proposalId',
354
+ type: 'uint64',
355
+ offset: 0,
356
+ byteLength: 8,
357
+ },
358
+ ];
359
+ export function buildQRWAGetGovPollInput(input, identityToPublicKey = (_identity) => new Uint8Array(32)) {
360
+ return buildPayload(Q_RWA_GET_GOV_POLL_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
361
+ }
362
+ const Q_RWA_GET_GOV_POLL_OUTPUT_FIELDS = [
363
+ {
364
+ name: 'proposal',
365
+ type: 'struct',
366
+ offset: 0,
367
+ byteLength: 208,
368
+ structRef: 'QRWAGovProposal',
369
+ },
370
+ {
371
+ name: 'status',
372
+ type: 'uint64',
373
+ offset: 208,
374
+ byteLength: 8,
375
+ },
376
+ ];
377
+ export function decodeQRWAGetGovPollOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
378
+ return decodePayload(data, Q_RWA_GET_GOV_POLL_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
379
+ }
380
+ export async function qRWAGetGovPoll(live, input, options) {
381
+ return callContractFunction({
382
+ live,
383
+ contractIndex: Q_RWA_CONTRACT_INDEX,
384
+ inputType: Q_RWA_GET_GOV_POLL_INPUT_TYPE,
385
+ inputSize: Q_RWA_GET_GOV_POLL_INPUT_SIZE,
386
+ inputFields: Q_RWA_GET_GOV_POLL_INPUT_FIELDS,
387
+ outputFields: Q_RWA_GET_GOV_POLL_OUTPUT_FIELDS,
388
+ structs: STRUCTS,
389
+ input: input,
390
+ ...options,
391
+ });
392
+ }
393
+ export const Q_RWA_GET_TREASURY_BALANCE_INPUT_TYPE = 9;
394
+ export const Q_RWA_GET_TREASURY_BALANCE_INPUT_SIZE = 0;
395
+ const Q_RWA_GET_TREASURY_BALANCE_OUTPUT_FIELDS = [
396
+ {
397
+ name: 'balance',
398
+ type: 'uint64',
399
+ offset: 0,
400
+ byteLength: 8,
401
+ },
402
+ ];
403
+ export function decodeQRWAGetTreasuryBalanceOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
404
+ return decodePayload(data, Q_RWA_GET_TREASURY_BALANCE_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
405
+ }
406
+ export async function qRWAGetTreasuryBalance(live, options) {
407
+ return callContractFunction({
408
+ live,
409
+ contractIndex: Q_RWA_CONTRACT_INDEX,
410
+ inputType: Q_RWA_GET_TREASURY_BALANCE_INPUT_TYPE,
411
+ inputSize: Q_RWA_GET_TREASURY_BALANCE_INPUT_SIZE,
412
+ inputFields: [],
413
+ outputFields: Q_RWA_GET_TREASURY_BALANCE_OUTPUT_FIELDS,
414
+ structs: STRUCTS,
415
+ input: {},
416
+ ...options,
417
+ });
418
+ }
419
+ export const Q_RWA_GET_DIVIDEND_BALANCES_INPUT_TYPE = 10;
420
+ export const Q_RWA_GET_DIVIDEND_BALANCES_INPUT_SIZE = 0;
421
+ const Q_RWA_GET_DIVIDEND_BALANCES_OUTPUT_FIELDS = [
422
+ {
423
+ name: 'revenuePoolA',
424
+ type: 'uint64',
425
+ offset: 0,
426
+ byteLength: 8,
427
+ },
428
+ {
429
+ name: 'revenuePoolB',
430
+ type: 'uint64',
431
+ offset: 8,
432
+ byteLength: 8,
433
+ },
434
+ {
435
+ name: 'dedicatedRevenuePool',
436
+ type: 'uint64',
437
+ offset: 16,
438
+ byteLength: 8,
439
+ },
440
+ {
441
+ name: 'poolAQmineDividend',
442
+ type: 'uint64',
443
+ offset: 24,
444
+ byteLength: 8,
445
+ },
446
+ {
447
+ name: 'poolAQrwaDividend',
448
+ type: 'uint64',
449
+ offset: 32,
450
+ byteLength: 8,
451
+ },
452
+ {
453
+ name: 'poolBQmineDividend',
454
+ type: 'uint64',
455
+ offset: 40,
456
+ byteLength: 8,
457
+ },
458
+ {
459
+ name: 'poolBQrwaDividend',
460
+ type: 'uint64',
461
+ offset: 48,
462
+ byteLength: 8,
463
+ },
464
+ {
465
+ name: 'poolCQmineDividend',
466
+ type: 'uint64',
467
+ offset: 56,
468
+ byteLength: 8,
469
+ },
470
+ {
471
+ name: 'poolCQrwaDividend',
472
+ type: 'uint64',
473
+ offset: 64,
474
+ byteLength: 8,
475
+ },
476
+ {
477
+ name: 'poolDRevenuePool',
478
+ type: 'uint64',
479
+ offset: 72,
480
+ byteLength: 8,
481
+ },
482
+ {
483
+ name: 'poolDQmineDividend',
484
+ type: 'uint64',
485
+ offset: 80,
486
+ byteLength: 8,
487
+ },
488
+ {
489
+ name: 'poolDQrwaDividend',
490
+ type: 'uint64',
491
+ offset: 88,
492
+ byteLength: 8,
493
+ },
494
+ ];
495
+ export function decodeQRWAGetDividendBalancesOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
496
+ return decodePayload(data, Q_RWA_GET_DIVIDEND_BALANCES_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
497
+ }
498
+ export async function qRWAGetDividendBalances(live, options) {
499
+ return callContractFunction({
500
+ live,
501
+ contractIndex: Q_RWA_CONTRACT_INDEX,
502
+ inputType: Q_RWA_GET_DIVIDEND_BALANCES_INPUT_TYPE,
503
+ inputSize: Q_RWA_GET_DIVIDEND_BALANCES_INPUT_SIZE,
504
+ inputFields: [],
505
+ outputFields: Q_RWA_GET_DIVIDEND_BALANCES_OUTPUT_FIELDS,
506
+ structs: STRUCTS,
507
+ input: {},
508
+ ...options,
509
+ });
510
+ }
511
+ export const Q_RWA_GET_TOTAL_DISTRIBUTED_INPUT_TYPE = 11;
512
+ export const Q_RWA_GET_TOTAL_DISTRIBUTED_INPUT_SIZE = 0;
513
+ const Q_RWA_GET_TOTAL_DISTRIBUTED_OUTPUT_FIELDS = [
514
+ {
515
+ name: 'totalPoolADistributed',
516
+ type: 'uint64',
517
+ offset: 0,
518
+ byteLength: 8,
519
+ },
520
+ {
521
+ name: 'totalPoolBDistributed',
522
+ type: 'uint64',
523
+ offset: 8,
524
+ byteLength: 8,
525
+ },
526
+ {
527
+ name: 'totalPoolCDistributed',
528
+ type: 'uint64',
529
+ offset: 16,
530
+ byteLength: 8,
531
+ },
532
+ {
533
+ name: 'totalPoolDDistributed',
534
+ type: 'uint64',
535
+ offset: 24,
536
+ byteLength: 8,
537
+ },
538
+ {
539
+ name: 'payoutTotalQmineBegin',
540
+ type: 'uint64',
541
+ offset: 32,
542
+ byteLength: 8,
543
+ },
544
+ ];
545
+ export function decodeQRWAGetTotalDistributedOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
546
+ return decodePayload(data, Q_RWA_GET_TOTAL_DISTRIBUTED_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
547
+ }
548
+ export async function qRWAGetTotalDistributed(live, options) {
549
+ return callContractFunction({
550
+ live,
551
+ contractIndex: Q_RWA_CONTRACT_INDEX,
552
+ inputType: Q_RWA_GET_TOTAL_DISTRIBUTED_INPUT_TYPE,
553
+ inputSize: Q_RWA_GET_TOTAL_DISTRIBUTED_INPUT_SIZE,
554
+ inputFields: [],
555
+ outputFields: Q_RWA_GET_TOTAL_DISTRIBUTED_OUTPUT_FIELDS,
556
+ structs: STRUCTS,
557
+ input: {},
558
+ ...options,
559
+ });
560
+ }
561
+ export const Q_RWA_GET_CONTRACT_ADDRESSES_INPUT_TYPE = 12;
562
+ export const Q_RWA_GET_CONTRACT_ADDRESSES_INPUT_SIZE = 0;
563
+ const Q_RWA_GET_CONTRACT_ADDRESSES_OUTPUT_FIELDS = [
564
+ {
565
+ name: 'dedicatedRevenueAddress',
566
+ type: 'id',
567
+ offset: 0,
568
+ byteLength: 32,
569
+ },
570
+ {
571
+ name: 'poolARevenueAddress',
572
+ type: 'id',
573
+ offset: 32,
574
+ byteLength: 32,
575
+ },
576
+ {
577
+ name: 'poolDRevenueAddress',
578
+ type: 'id',
579
+ offset: 64,
580
+ byteLength: 32,
581
+ },
582
+ {
583
+ name: 'fundraisingAddress',
584
+ type: 'id',
585
+ offset: 96,
586
+ byteLength: 32,
587
+ },
588
+ {
589
+ name: 'exchangeAddress',
590
+ type: 'id',
591
+ offset: 128,
592
+ byteLength: 32,
593
+ },
594
+ ];
595
+ export function decodeQRWAGetContractAddressesOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
596
+ return decodePayload(data, Q_RWA_GET_CONTRACT_ADDRESSES_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
597
+ }
598
+ export async function qRWAGetContractAddresses(live, options) {
599
+ return callContractFunction({
600
+ live,
601
+ contractIndex: Q_RWA_CONTRACT_INDEX,
602
+ inputType: Q_RWA_GET_CONTRACT_ADDRESSES_INPUT_TYPE,
603
+ inputSize: Q_RWA_GET_CONTRACT_ADDRESSES_INPUT_SIZE,
604
+ inputFields: [],
605
+ outputFields: Q_RWA_GET_CONTRACT_ADDRESSES_OUTPUT_FIELDS,
606
+ structs: STRUCTS,
607
+ input: {},
608
+ ...options,
609
+ });
610
+ }
611
+ export const Q_RWA_GET_ACTIVE_GOV_POLL_IDS_INPUT_TYPE = 13;
612
+ export const Q_RWA_GET_ACTIVE_GOV_POLL_IDS_INPUT_SIZE = 0;
613
+ const Q_RWA_GET_ACTIVE_GOV_POLL_IDS_OUTPUT_FIELDS = [
614
+ {
615
+ name: 'count',
616
+ type: 'uint64',
617
+ offset: 0,
618
+ byteLength: 8,
619
+ },
620
+ {
621
+ name: 'ids',
622
+ type: 'array',
623
+ offset: 8,
624
+ byteLength: 512,
625
+ arrayLength: 64,
626
+ arrayItemType: 'uint64',
627
+ arrayItemByteLength: 8,
628
+ },
629
+ ];
630
+ export function decodeQRWAGetActiveGovPollIdsOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
631
+ return decodePayload(data, Q_RWA_GET_ACTIVE_GOV_POLL_IDS_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
632
+ }
633
+ export async function qRWAGetActiveGovPollIds(live, options) {
634
+ return callContractFunction({
635
+ live,
636
+ contractIndex: Q_RWA_CONTRACT_INDEX,
637
+ inputType: Q_RWA_GET_ACTIVE_GOV_POLL_IDS_INPUT_TYPE,
638
+ inputSize: Q_RWA_GET_ACTIVE_GOV_POLL_IDS_INPUT_SIZE,
639
+ inputFields: [],
640
+ outputFields: Q_RWA_GET_ACTIVE_GOV_POLL_IDS_OUTPUT_FIELDS,
641
+ structs: STRUCTS,
642
+ input: {},
643
+ ...options,
644
+ });
645
+ }
646
+ export const Q_RWA_GET_GENERAL_ASSET_BALANCE_INPUT_TYPE = 14;
647
+ export const Q_RWA_GET_GENERAL_ASSET_BALANCE_INPUT_SIZE = 40;
648
+ const Q_RWA_GET_GENERAL_ASSET_BALANCE_INPUT_FIELDS = [
649
+ {
650
+ name: 'asset',
651
+ type: 'struct',
652
+ offset: 0,
653
+ byteLength: 40,
654
+ structRef: 'Asset',
655
+ },
656
+ ];
657
+ export function buildQRWAGetGeneralAssetBalanceInput(input, identityToPublicKey = (_identity) => new Uint8Array(32)) {
658
+ return buildPayload(Q_RWA_GET_GENERAL_ASSET_BALANCE_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
659
+ }
660
+ const Q_RWA_GET_GENERAL_ASSET_BALANCE_OUTPUT_FIELDS = [
661
+ {
662
+ name: 'balance',
663
+ type: 'uint64',
664
+ offset: 0,
665
+ byteLength: 8,
666
+ },
667
+ {
668
+ name: 'status',
669
+ type: 'uint64',
670
+ offset: 8,
671
+ byteLength: 8,
672
+ },
673
+ ];
674
+ export function decodeQRWAGetGeneralAssetBalanceOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
675
+ return decodePayload(data, Q_RWA_GET_GENERAL_ASSET_BALANCE_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
676
+ }
677
+ export async function qRWAGetGeneralAssetBalance(live, input, options) {
678
+ return callContractFunction({
679
+ live,
680
+ contractIndex: Q_RWA_CONTRACT_INDEX,
681
+ inputType: Q_RWA_GET_GENERAL_ASSET_BALANCE_INPUT_TYPE,
682
+ inputSize: Q_RWA_GET_GENERAL_ASSET_BALANCE_INPUT_SIZE,
683
+ inputFields: Q_RWA_GET_GENERAL_ASSET_BALANCE_INPUT_FIELDS,
684
+ outputFields: Q_RWA_GET_GENERAL_ASSET_BALANCE_OUTPUT_FIELDS,
685
+ structs: STRUCTS,
686
+ input: input,
687
+ ...options,
688
+ });
689
+ }
690
+ export const Q_RWA_GET_GENERAL_ASSETS_INPUT_TYPE = 15;
691
+ export const Q_RWA_GET_GENERAL_ASSETS_INPUT_SIZE = 0;
692
+ const Q_RWA_GET_GENERAL_ASSETS_OUTPUT_FIELDS = [
693
+ {
694
+ name: 'count',
695
+ type: 'uint64',
696
+ offset: 0,
697
+ byteLength: 8,
698
+ },
699
+ {
700
+ name: 'assets',
701
+ type: 'array',
702
+ offset: 8,
703
+ byteLength: 40960,
704
+ arrayLength: 1024,
705
+ arrayItemByteLength: 40,
706
+ arrayItemStructRef: 'Asset',
707
+ },
708
+ {
709
+ name: 'balances',
710
+ type: 'array',
711
+ offset: 40968,
712
+ byteLength: 8192,
713
+ arrayLength: 1024,
714
+ arrayItemType: 'uint64',
715
+ arrayItemByteLength: 8,
716
+ },
717
+ ];
718
+ export function decodeQRWAGetGeneralAssetsOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
719
+ return decodePayload(data, Q_RWA_GET_GENERAL_ASSETS_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
720
+ }
721
+ export async function qRWAGetGeneralAssets(live, options) {
722
+ return callContractFunction({
723
+ live,
724
+ contractIndex: Q_RWA_CONTRACT_INDEX,
725
+ inputType: Q_RWA_GET_GENERAL_ASSETS_INPUT_TYPE,
726
+ inputSize: Q_RWA_GET_GENERAL_ASSETS_INPUT_SIZE,
727
+ inputFields: [],
728
+ outputFields: Q_RWA_GET_GENERAL_ASSETS_OUTPUT_FIELDS,
729
+ structs: STRUCTS,
730
+ input: {},
731
+ ...options,
732
+ });
733
+ }
734
+ export const Q_RWA_GET_SC_DIVIDEND_TRACKING_INPUT_TYPE = 16;
735
+ export const Q_RWA_GET_SC_DIVIDEND_TRACKING_INPUT_SIZE = 0;
736
+ const Q_RWA_GET_SC_DIVIDEND_TRACKING_OUTPUT_FIELDS = [
737
+ {
738
+ name: 'count',
739
+ type: 'uint64',
740
+ offset: 0,
741
+ byteLength: 8,
742
+ },
743
+ {
744
+ name: 'scContractIds',
745
+ type: 'array',
746
+ offset: 8,
747
+ byteLength: 32768,
748
+ arrayLength: 1024,
749
+ arrayItemType: 'id',
750
+ arrayItemByteLength: 32,
751
+ },
752
+ {
753
+ name: 'cumulativeDividends',
754
+ type: 'array',
755
+ offset: 32776,
756
+ byteLength: 8192,
757
+ arrayLength: 1024,
758
+ arrayItemType: 'uint64',
759
+ arrayItemByteLength: 8,
760
+ },
761
+ ];
762
+ export function decodeQRWAGetScDividendTrackingOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
763
+ return decodePayload(data, Q_RWA_GET_SC_DIVIDEND_TRACKING_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
764
+ }
765
+ export async function qRWAGetScDividendTracking(live, options) {
766
+ return callContractFunction({
767
+ live,
768
+ contractIndex: Q_RWA_CONTRACT_INDEX,
769
+ inputType: Q_RWA_GET_SC_DIVIDEND_TRACKING_INPUT_TYPE,
770
+ inputSize: Q_RWA_GET_SC_DIVIDEND_TRACKING_INPUT_SIZE,
771
+ inputFields: [],
772
+ outputFields: Q_RWA_GET_SC_DIVIDEND_TRACKING_OUTPUT_FIELDS,
773
+ structs: STRUCTS,
774
+ input: {},
775
+ ...options,
776
+ });
777
+ }
778
+ export const Q_RWA_GET_PAYOUTS_QMINE_INPUT_TYPE = 17;
779
+ export const Q_RWA_GET_PAYOUTS_QMINE_INPUT_SIZE = 2;
780
+ const Q_RWA_GET_PAYOUTS_QMINE_INPUT_FIELDS = [
781
+ {
782
+ name: 'page',
783
+ type: 'uint16',
784
+ offset: 0,
785
+ byteLength: 2,
786
+ },
787
+ ];
788
+ export function buildQRWAGetPayoutsQmineInput(input, identityToPublicKey = (_identity) => new Uint8Array(32)) {
789
+ return buildPayload(Q_RWA_GET_PAYOUTS_QMINE_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
790
+ }
791
+ const Q_RWA_GET_PAYOUTS_QMINE_OUTPUT_FIELDS = [
792
+ {
793
+ name: 'payouts',
794
+ type: 'array',
795
+ offset: 0,
796
+ byteLength: 32768,
797
+ arrayLength: 512,
798
+ arrayItemByteLength: 64,
799
+ arrayItemStructRef: 'QRWAPayoutEntry',
800
+ },
801
+ {
802
+ name: 'nextIdx',
803
+ type: 'uint16',
804
+ offset: 32768,
805
+ byteLength: 2,
806
+ },
807
+ {
808
+ name: 'returnedCount',
809
+ type: 'uint16',
810
+ offset: 32770,
811
+ byteLength: 2,
812
+ },
813
+ {
814
+ name: 'page',
815
+ type: 'uint16',
816
+ offset: 32772,
817
+ byteLength: 2,
818
+ },
819
+ {
820
+ name: 'totalPages',
821
+ type: 'uint16',
822
+ offset: 32774,
823
+ byteLength: 2,
824
+ },
825
+ ];
826
+ export function decodeQRWAGetPayoutsQmineOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
827
+ return decodePayload(data, Q_RWA_GET_PAYOUTS_QMINE_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
828
+ }
829
+ export async function qRWAGetPayoutsQmine(live, input, options) {
830
+ return callContractFunction({
831
+ live,
832
+ contractIndex: Q_RWA_CONTRACT_INDEX,
833
+ inputType: Q_RWA_GET_PAYOUTS_QMINE_INPUT_TYPE,
834
+ inputSize: Q_RWA_GET_PAYOUTS_QMINE_INPUT_SIZE,
835
+ inputFields: Q_RWA_GET_PAYOUTS_QMINE_INPUT_FIELDS,
836
+ outputFields: Q_RWA_GET_PAYOUTS_QMINE_OUTPUT_FIELDS,
837
+ structs: STRUCTS,
838
+ input: input,
839
+ ...options,
840
+ });
841
+ }
842
+ export const Q_RWA_GET_PAYOUTS_QRWA_INPUT_TYPE = 18;
843
+ export const Q_RWA_GET_PAYOUTS_QRWA_INPUT_SIZE = 2;
844
+ const Q_RWA_GET_PAYOUTS_QRWA_INPUT_FIELDS = [
845
+ {
846
+ name: 'page',
847
+ type: 'uint16',
848
+ offset: 0,
849
+ byteLength: 2,
850
+ },
851
+ ];
852
+ export function buildQRWAGetPayoutsQrwaInput(input, identityToPublicKey = (_identity) => new Uint8Array(32)) {
853
+ return buildPayload(Q_RWA_GET_PAYOUTS_QRWA_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
854
+ }
855
+ const Q_RWA_GET_PAYOUTS_QRWA_OUTPUT_FIELDS = [
856
+ {
857
+ name: 'payouts',
858
+ type: 'array',
859
+ offset: 0,
860
+ byteLength: 32768,
861
+ arrayLength: 512,
862
+ arrayItemByteLength: 64,
863
+ arrayItemStructRef: 'QRWAPayoutEntry',
864
+ },
865
+ {
866
+ name: 'nextIdx',
867
+ type: 'uint16',
868
+ offset: 32768,
869
+ byteLength: 2,
870
+ },
871
+ {
872
+ name: 'returnedCount',
873
+ type: 'uint16',
874
+ offset: 32770,
875
+ byteLength: 2,
876
+ },
877
+ {
878
+ name: 'page',
879
+ type: 'uint16',
880
+ offset: 32772,
881
+ byteLength: 2,
882
+ },
883
+ {
884
+ name: 'totalPages',
885
+ type: 'uint16',
886
+ offset: 32774,
887
+ byteLength: 2,
888
+ },
889
+ ];
890
+ export function decodeQRWAGetPayoutsQrwaOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
891
+ return decodePayload(data, Q_RWA_GET_PAYOUTS_QRWA_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
892
+ }
893
+ export async function qRWAGetPayoutsQrwa(live, input, options) {
894
+ return callContractFunction({
895
+ live,
896
+ contractIndex: Q_RWA_CONTRACT_INDEX,
897
+ inputType: Q_RWA_GET_PAYOUTS_QRWA_INPUT_TYPE,
898
+ inputSize: Q_RWA_GET_PAYOUTS_QRWA_INPUT_SIZE,
899
+ inputFields: Q_RWA_GET_PAYOUTS_QRWA_INPUT_FIELDS,
900
+ outputFields: Q_RWA_GET_PAYOUTS_QRWA_OUTPUT_FIELDS,
901
+ structs: STRUCTS,
902
+ input: input,
903
+ ...options,
904
+ });
905
+ }
906
+ export const Q_RWA_GET_PAYOUTS_DEDICATED_INPUT_TYPE = 19;
907
+ export const Q_RWA_GET_PAYOUTS_DEDICATED_INPUT_SIZE = 2;
908
+ const Q_RWA_GET_PAYOUTS_DEDICATED_INPUT_FIELDS = [
909
+ {
910
+ name: 'page',
911
+ type: 'uint16',
912
+ offset: 0,
913
+ byteLength: 2,
914
+ },
915
+ ];
916
+ export function buildQRWAGetPayoutsDedicatedInput(input, identityToPublicKey = (_identity) => new Uint8Array(32)) {
917
+ return buildPayload(Q_RWA_GET_PAYOUTS_DEDICATED_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
918
+ }
919
+ const Q_RWA_GET_PAYOUTS_DEDICATED_OUTPUT_FIELDS = [
920
+ {
921
+ name: 'payouts',
922
+ type: 'array',
923
+ offset: 0,
924
+ byteLength: 32768,
925
+ arrayLength: 512,
926
+ arrayItemByteLength: 64,
927
+ arrayItemStructRef: 'QRWAPayoutEntry',
928
+ },
929
+ {
930
+ name: 'nextIdx',
931
+ type: 'uint16',
932
+ offset: 32768,
933
+ byteLength: 2,
934
+ },
935
+ {
936
+ name: 'returnedCount',
937
+ type: 'uint16',
938
+ offset: 32770,
939
+ byteLength: 2,
940
+ },
941
+ {
942
+ name: 'page',
943
+ type: 'uint16',
944
+ offset: 32772,
945
+ byteLength: 2,
946
+ },
947
+ {
948
+ name: 'totalPages',
949
+ type: 'uint16',
950
+ offset: 32774,
951
+ byteLength: 2,
952
+ },
953
+ ];
954
+ export function decodeQRWAGetPayoutsDedicatedOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
955
+ return decodePayload(data, Q_RWA_GET_PAYOUTS_DEDICATED_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
956
+ }
957
+ export async function qRWAGetPayoutsDedicated(live, input, options) {
958
+ return callContractFunction({
959
+ live,
960
+ contractIndex: Q_RWA_CONTRACT_INDEX,
961
+ inputType: Q_RWA_GET_PAYOUTS_DEDICATED_INPUT_TYPE,
962
+ inputSize: Q_RWA_GET_PAYOUTS_DEDICATED_INPUT_SIZE,
963
+ inputFields: Q_RWA_GET_PAYOUTS_DEDICATED_INPUT_FIELDS,
964
+ outputFields: Q_RWA_GET_PAYOUTS_DEDICATED_OUTPUT_FIELDS,
965
+ structs: STRUCTS,
966
+ input: input,
967
+ ...options,
968
+ });
969
+ }
970
+ export const Q_RWA_GET_PAYOUTS_POOL_D_INPUT_TYPE = 20;
971
+ export const Q_RWA_GET_PAYOUTS_POOL_D_INPUT_SIZE = 2;
972
+ const Q_RWA_GET_PAYOUTS_POOL_D_INPUT_FIELDS = [
973
+ {
974
+ name: 'page',
975
+ type: 'uint16',
976
+ offset: 0,
977
+ byteLength: 2,
978
+ },
979
+ ];
980
+ export function buildQRWAGetPayoutsPoolDInput(input, identityToPublicKey = (_identity) => new Uint8Array(32)) {
981
+ return buildPayload(Q_RWA_GET_PAYOUTS_POOL_D_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
982
+ }
983
+ const Q_RWA_GET_PAYOUTS_POOL_D_OUTPUT_FIELDS = [
984
+ {
985
+ name: 'payouts',
986
+ type: 'array',
987
+ offset: 0,
988
+ byteLength: 32768,
989
+ arrayLength: 512,
990
+ arrayItemByteLength: 64,
991
+ arrayItemStructRef: 'QRWAPayoutEntry',
992
+ },
993
+ {
994
+ name: 'nextIdx',
995
+ type: 'uint16',
996
+ offset: 32768,
997
+ byteLength: 2,
998
+ },
999
+ {
1000
+ name: 'returnedCount',
1001
+ type: 'uint16',
1002
+ offset: 32770,
1003
+ byteLength: 2,
1004
+ },
1005
+ {
1006
+ name: 'page',
1007
+ type: 'uint16',
1008
+ offset: 32772,
1009
+ byteLength: 2,
1010
+ },
1011
+ {
1012
+ name: 'totalPages',
1013
+ type: 'uint16',
1014
+ offset: 32774,
1015
+ byteLength: 2,
1016
+ },
1017
+ ];
1018
+ export function decodeQRWAGetPayoutsPoolDOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
1019
+ return decodePayload(data, Q_RWA_GET_PAYOUTS_POOL_D_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
1020
+ }
1021
+ export async function qRWAGetPayoutsPoolD(live, input, options) {
1022
+ return callContractFunction({
1023
+ live,
1024
+ contractIndex: Q_RWA_CONTRACT_INDEX,
1025
+ inputType: Q_RWA_GET_PAYOUTS_POOL_D_INPUT_TYPE,
1026
+ inputSize: Q_RWA_GET_PAYOUTS_POOL_D_INPUT_SIZE,
1027
+ inputFields: Q_RWA_GET_PAYOUTS_POOL_D_INPUT_FIELDS,
1028
+ outputFields: Q_RWA_GET_PAYOUTS_POOL_D_OUTPUT_FIELDS,
1029
+ structs: STRUCTS,
1030
+ input: input,
1031
+ ...options,
1032
+ });
1033
+ }
1034
+ export const qRWA = {
1035
+ contractIndex: Q_RWA_CONTRACT_INDEX,
1036
+ GetGovParams: qRWAGetGovParams,
1037
+ GetGovPoll: qRWAGetGovPoll,
1038
+ GetTreasuryBalance: qRWAGetTreasuryBalance,
1039
+ GetDividendBalances: qRWAGetDividendBalances,
1040
+ GetTotalDistributed: qRWAGetTotalDistributed,
1041
+ GetContractAddresses: qRWAGetContractAddresses,
1042
+ GetActiveGovPollIds: qRWAGetActiveGovPollIds,
1043
+ GetGeneralAssetBalance: qRWAGetGeneralAssetBalance,
1044
+ GetGeneralAssets: qRWAGetGeneralAssets,
1045
+ GetScDividendTracking: qRWAGetScDividendTracking,
1046
+ GetPayoutsQmine: qRWAGetPayoutsQmine,
1047
+ GetPayoutsQrwa: qRWAGetPayoutsQrwa,
1048
+ GetPayoutsDedicated: qRWAGetPayoutsDedicated,
1049
+ GetPayoutsPoolD: qRWAGetPayoutsPoolD,
1050
+ buildDonateToTreasuryInput: buildQRWADonateToTreasuryInput,
1051
+ decodeDonateToTreasuryOutput: decodeQRWADonateToTreasuryOutput,
1052
+ buildVoteGovParamsInput: buildQRWAVoteGovParamsInput,
1053
+ decodeVoteGovParamsOutput: decodeQRWAVoteGovParamsOutput,
1054
+ buildDepositGeneralAssetInput: buildQRWADepositGeneralAssetInput,
1055
+ decodeDepositGeneralAssetOutput: decodeQRWADepositGeneralAssetOutput,
1056
+ buildRevokeAssetManagementRightsInput: buildQRWARevokeAssetManagementRightsInput,
1057
+ decodeRevokeAssetManagementRightsOutput: decodeQRWARevokeAssetManagementRightsOutput,
1058
+ buildSetPoolARevenueAddressInput: buildQRWASetPoolARevenueAddressInput,
1059
+ decodeSetPoolARevenueAddressOutput: decodeQRWASetPoolARevenueAddressOutput,
1060
+ buildSetPoolDRevenueAddressInput: buildQRWASetPoolDRevenueAddressInput,
1061
+ decodeSetPoolDRevenueAddressOutput: decodeQRWASetPoolDRevenueAddressOutput,
1062
+ };
1063
+ //# sourceMappingURL=qrwa.js.map