@qubic.org/contracts 0.2.7 → 1.0.1

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 (163) hide show
  1. package/LICENSE +41 -0
  2. package/README.md +15 -18
  3. package/dist/__generated__/computorcontrolledfund.d.ts +1 -1
  4. package/dist/__generated__/computorcontrolledfund.d.ts.map +1 -1
  5. package/dist/__generated__/computorcontrolledfund.js +8 -8
  6. package/dist/__generated__/computorcontrolledfund.js.map +1 -1
  7. package/dist/__generated__/escrow.d.ts +1 -1
  8. package/dist/__generated__/escrow.d.ts.map +1 -1
  9. package/dist/__generated__/escrow.js +3 -3
  10. package/dist/__generated__/escrow.js.map +1 -1
  11. package/dist/__generated__/generalquorumproposal.d.ts +1 -1
  12. package/dist/__generated__/generalquorumproposal.d.ts.map +1 -1
  13. package/dist/__generated__/generalquorumproposal.js +6 -6
  14. package/dist/__generated__/generalquorumproposal.js.map +1 -1
  15. package/dist/__generated__/ggwp.d.ts +265 -0
  16. package/dist/__generated__/ggwp.d.ts.map +1 -0
  17. package/dist/__generated__/ggwp.js +825 -0
  18. package/dist/__generated__/ggwp.js.map +1 -0
  19. package/dist/__generated__/index.d.ts +1 -0
  20. package/dist/__generated__/index.d.ts.map +1 -1
  21. package/dist/__generated__/index.js +1 -0
  22. package/dist/__generated__/index.js.map +1 -1
  23. package/dist/__generated__/msvault.d.ts +1 -1
  24. package/dist/__generated__/msvault.d.ts.map +1 -1
  25. package/dist/__generated__/msvault.js +19 -19
  26. package/dist/__generated__/msvault.js.map +1 -1
  27. package/dist/__generated__/multisignvault.d.ts +25 -25
  28. package/dist/__generated__/multisignvault.d.ts.map +1 -1
  29. package/dist/__generated__/multisignvault.js +25 -25
  30. package/dist/__generated__/multisignvault.js.map +1 -1
  31. package/dist/__generated__/nostromo.d.ts +1 -1
  32. package/dist/__generated__/nostromo.d.ts.map +1 -1
  33. package/dist/__generated__/nostromo.js +15 -15
  34. package/dist/__generated__/nostromo.js.map +1 -1
  35. package/dist/__generated__/pulse.d.ts +1 -1
  36. package/dist/__generated__/pulse.d.ts.map +1 -1
  37. package/dist/__generated__/pulse.js +26 -26
  38. package/dist/__generated__/pulse.js.map +1 -1
  39. package/dist/__generated__/qbay.d.ts +1 -1
  40. package/dist/__generated__/qbay.d.ts.map +1 -1
  41. package/dist/__generated__/qbay.js +23 -23
  42. package/dist/__generated__/qbay.js.map +1 -1
  43. package/dist/__generated__/qbond.d.ts +1 -1
  44. package/dist/__generated__/qbond.d.ts.map +1 -1
  45. package/dist/__generated__/qbond.js +14 -14
  46. package/dist/__generated__/qbond.js.map +1 -1
  47. package/dist/__generated__/qdraw.d.ts +1 -1
  48. package/dist/__generated__/qdraw.d.ts.map +1 -1
  49. package/dist/__generated__/qdraw.js.map +1 -1
  50. package/dist/__generated__/qduel.d.ts +1 -1
  51. package/dist/__generated__/qduel.d.ts.map +1 -1
  52. package/dist/__generated__/qduel.js +11 -11
  53. package/dist/__generated__/qduel.js.map +1 -1
  54. package/dist/__generated__/qearn.d.ts +1 -1
  55. package/dist/__generated__/qearn.d.ts.map +1 -1
  56. package/dist/__generated__/qearn.js +10 -10
  57. package/dist/__generated__/qearn.js.map +1 -1
  58. package/dist/__generated__/qip.d.ts +18 -1
  59. package/dist/__generated__/qip.d.ts.map +1 -1
  60. package/dist/__generated__/qip.js +64 -3
  61. package/dist/__generated__/qip.js.map +1 -1
  62. package/dist/__generated__/qraffle.d.ts +1 -1
  63. package/dist/__generated__/qraffle.d.ts.map +1 -1
  64. package/dist/__generated__/qraffle.js +12 -12
  65. package/dist/__generated__/qraffle.js.map +1 -1
  66. package/dist/__generated__/qreservepool.d.ts +1 -1
  67. package/dist/__generated__/qreservepool.d.ts.map +1 -1
  68. package/dist/__generated__/qreservepool.js +5 -5
  69. package/dist/__generated__/qreservepool.js.map +1 -1
  70. package/dist/__generated__/qrwa.d.ts +1 -1
  71. package/dist/__generated__/qrwa.d.ts.map +1 -1
  72. package/dist/__generated__/qrwa.js +18 -18
  73. package/dist/__generated__/qrwa.js.map +1 -1
  74. package/dist/__generated__/qswap.d.ts +3 -1
  75. package/dist/__generated__/qswap.d.ts.map +1 -1
  76. package/dist/__generated__/qswap.js +30 -18
  77. package/dist/__generated__/qswap.js.map +1 -1
  78. package/dist/__generated__/qthirtyfour.d.ts +1 -1
  79. package/dist/__generated__/qthirtyfour.d.ts.map +1 -1
  80. package/dist/__generated__/qthirtyfour.js +19 -19
  81. package/dist/__generated__/qthirtyfour.js.map +1 -1
  82. package/dist/__generated__/qubicicoportal.d.ts +4 -4
  83. package/dist/__generated__/qubicicoportal.d.ts.map +1 -1
  84. package/dist/__generated__/qubicicoportal.js +4 -4
  85. package/dist/__generated__/qubicicoportal.js.map +1 -1
  86. package/dist/__generated__/quottery.d.ts +1 -1
  87. package/dist/__generated__/quottery.d.ts.map +1 -1
  88. package/dist/__generated__/quottery.js +14 -14
  89. package/dist/__generated__/quottery.js.map +1 -1
  90. package/dist/__generated__/qusino.d.ts +1 -1
  91. package/dist/__generated__/qusino.d.ts.map +1 -1
  92. package/dist/__generated__/qusino.js +13 -13
  93. package/dist/__generated__/qusino.js.map +1 -1
  94. package/dist/__generated__/qutil.d.ts +1 -1
  95. package/dist/__generated__/qutil.d.ts.map +1 -1
  96. package/dist/__generated__/qutil.js +22 -22
  97. package/dist/__generated__/qutil.js.map +1 -1
  98. package/dist/__generated__/qvault.d.ts +14 -2
  99. package/dist/__generated__/qvault.d.ts.map +1 -1
  100. package/dist/__generated__/qvault.js +70 -32
  101. package/dist/__generated__/qvault.js.map +1 -1
  102. package/dist/__generated__/qx.d.ts +1 -1
  103. package/dist/__generated__/qx.d.ts.map +1 -1
  104. package/dist/__generated__/qx.js +12 -12
  105. package/dist/__generated__/qx.js.map +1 -1
  106. package/dist/__generated__/random.d.ts +24 -1
  107. package/dist/__generated__/random.d.ts.map +1 -1
  108. package/dist/__generated__/random.js +68 -0
  109. package/dist/__generated__/random.js.map +1 -1
  110. package/dist/__generated__/randomlottery.d.ts +1 -1
  111. package/dist/__generated__/randomlottery.d.ts.map +1 -1
  112. package/dist/__generated__/randomlottery.js +12 -12
  113. package/dist/__generated__/randomlottery.js.map +1 -1
  114. package/dist/__generated__/vottunbridge.d.ts +1 -1
  115. package/dist/__generated__/vottunbridge.d.ts.map +1 -1
  116. package/dist/__generated__/vottunbridge.js +13 -13
  117. package/dist/__generated__/vottunbridge.js.map +1 -1
  118. package/dist/call-contract.d.ts.map +1 -1
  119. package/dist/call-contract.js +6 -1
  120. package/dist/call-contract.js.map +1 -1
  121. package/dist/index.d.ts +2 -2
  122. package/dist/index.d.ts.map +1 -1
  123. package/dist/index.js +1 -1
  124. package/dist/index.js.map +1 -1
  125. package/package.json +8 -7
  126. package/src/__generated__/computorcontrolledfund.ts +1066 -0
  127. package/src/__generated__/escrow.ts +529 -0
  128. package/src/__generated__/generalquorumproposal.ts +691 -0
  129. package/src/__generated__/ggwp.ts +1241 -0
  130. package/src/__generated__/index.ts +28 -0
  131. package/src/__generated__/msvault.ts +1716 -0
  132. package/src/__generated__/multisignvault.ts +1511 -0
  133. package/src/__generated__/mylastmatch.ts +12 -0
  134. package/src/__generated__/nostromo.ts +1551 -0
  135. package/src/__generated__/pulse.ts +1512 -0
  136. package/src/__generated__/qbay.ts +2097 -0
  137. package/src/__generated__/qbond.ts +1016 -0
  138. package/src/__generated__/qdraw.ts +188 -0
  139. package/src/__generated__/qduel.ts +827 -0
  140. package/src/__generated__/qearn.ts +696 -0
  141. package/src/__generated__/qip.ts +501 -0
  142. package/src/__generated__/qraffle.ts +1162 -0
  143. package/src/__generated__/qreservepool.ts +281 -0
  144. package/src/__generated__/qrwa.ts +1491 -0
  145. package/src/__generated__/qswap.ts +1336 -0
  146. package/src/__generated__/qthirtyfour.ts +1131 -0
  147. package/src/__generated__/qubicicoportal.ts +386 -0
  148. package/src/__generated__/quottery.ts +1519 -0
  149. package/src/__generated__/qusino.ts +799 -0
  150. package/src/__generated__/qutil.ts +1506 -0
  151. package/src/__generated__/qvault.ts +2911 -0
  152. package/src/__generated__/qx.ts +861 -0
  153. package/src/__generated__/random.ts +145 -0
  154. package/src/__generated__/randomlottery.ts +653 -0
  155. package/src/__generated__/supplywatcher.ts +12 -0
  156. package/src/__generated__/vottunbridge.ts +1162 -0
  157. package/src/__tests__/contracts.test.ts +933 -0
  158. package/src/call-contract.ts +87 -0
  159. package/src/index.ts +9 -0
  160. package/dist/result.d.ts +0 -12
  161. package/dist/result.d.ts.map +0 -1
  162. package/dist/result.js +0 -7
  163. package/dist/result.js.map +0 -1
@@ -0,0 +1,1066 @@
1
+ // @generated — do not edit by hand. Run `bun run generate` to regenerate.
2
+ import type { BinaryField, FieldValue, NamedStruct } from '@qubic.org/registry'
3
+ import { buildPayload, decodePayload } from '@qubic.org/registry'
4
+ import type { QubicRpcError } from '@qubic.org/rpc'
5
+ import type { Result } from '@qubic.org/types'
6
+ import { type ContractCall, type ContractCallOptions, type SmartContractCaller, callContractFunction } from '../call-contract.js'
7
+
8
+ export const COMPUTOR_CONTROLLED_FUND_CONTRACT_INDEX = 8
9
+
10
+ export interface ComputorControlledFundProposalDataTStruct {
11
+ url: Uint8Array
12
+ epoch: number
13
+ type: number
14
+ tick: number
15
+ data: Uint8Array
16
+ }
17
+
18
+ export interface ComputorControlledFundSubscriptionDataStruct {
19
+ destination: string
20
+ url: number[]
21
+ weeksPerPeriod: number
22
+ _padding1: number[]
23
+ _padding2: number[]
24
+ numberOfPeriods: number
25
+ amountPerPeriod: bigint
26
+ startEpoch: number
27
+ currentPeriod: number
28
+ }
29
+
30
+ export interface ComputorControlledFundSubscriptionProposalDataStruct {
31
+ proposerId: string
32
+ destination: string
33
+ url: number[]
34
+ weeksPerPeriod: number
35
+ _padding0: number[]
36
+ _padding1: number[]
37
+ numberOfPeriods: number
38
+ amountPerPeriod: bigint
39
+ startEpoch: number
40
+ }
41
+
42
+ export interface ComputorControlledFundProposalSingleVoteDataV1Struct {
43
+ proposalIndex: number
44
+ proposalType: number
45
+ proposalTick: number
46
+ voteValue: bigint
47
+ }
48
+
49
+ export interface ComputorControlledFundProposalSummarizedVotingDataV1Struct {
50
+ proposalIndex: number
51
+ optionCount: number
52
+ proposalTick: number
53
+ totalVotesAuthorized: number
54
+ totalVotesCasted: number
55
+ optionVoteCount: number[]
56
+ }
57
+
58
+ export interface ComputorControlledFundLatestTransfersEntryStruct {
59
+ destination: string
60
+ url: number[]
61
+ amount: bigint
62
+ tick: number
63
+ success: number
64
+ }
65
+
66
+ export interface ComputorControlledFundRegularPaymentEntryStruct {
67
+ destination: string
68
+ url: number[]
69
+ amount: bigint
70
+ tick: number
71
+ periodIndex: number
72
+ success: number
73
+ _padding0: number[]
74
+ _padding1: number[]
75
+ }
76
+
77
+ const STRUCTS: Record<string, NamedStruct> = {
78
+ 'ProposalDataT': {
79
+ name: 'ProposalDataT',
80
+ byteLength: 304,
81
+ fields: [
82
+ {
83
+ name: 'url',
84
+ type: 'bytes',
85
+ offset: 0,
86
+ byteLength: 256,
87
+ },
88
+ {
89
+ name: 'epoch',
90
+ type: 'uint16',
91
+ offset: 256,
92
+ byteLength: 2,
93
+ },
94
+ {
95
+ name: 'type',
96
+ type: 'uint16',
97
+ offset: 258,
98
+ byteLength: 2,
99
+ },
100
+ {
101
+ name: 'tick',
102
+ type: 'uint32',
103
+ offset: 260,
104
+ byteLength: 4,
105
+ },
106
+ {
107
+ name: 'data',
108
+ type: 'bytes',
109
+ offset: 264,
110
+ byteLength: 40,
111
+ },
112
+ ],
113
+ },
114
+ 'SubscriptionData': {
115
+ name: 'SubscriptionData',
116
+ byteLength: 312,
117
+ fields: [
118
+ {
119
+ name: 'destination',
120
+ type: 'id',
121
+ offset: 0,
122
+ byteLength: 32,
123
+ },
124
+ {
125
+ name: 'url',
126
+ type: 'array',
127
+ offset: 32,
128
+ byteLength: 256,
129
+ arrayLength: 256,
130
+ arrayItemType: 'uint8',
131
+ arrayItemByteLength: 1,
132
+ },
133
+ {
134
+ name: 'weeksPerPeriod',
135
+ type: 'uint8',
136
+ offset: 288,
137
+ byteLength: 1,
138
+ },
139
+ {
140
+ name: '_padding1',
141
+ type: 'array',
142
+ offset: 289,
143
+ byteLength: 1,
144
+ arrayLength: 1,
145
+ arrayItemType: 'uint8',
146
+ arrayItemByteLength: 1,
147
+ },
148
+ {
149
+ name: '_padding2',
150
+ type: 'array',
151
+ offset: 290,
152
+ byteLength: 2,
153
+ arrayLength: 2,
154
+ arrayItemType: 'uint8',
155
+ arrayItemByteLength: 1,
156
+ },
157
+ {
158
+ name: 'numberOfPeriods',
159
+ type: 'uint32',
160
+ offset: 292,
161
+ byteLength: 4,
162
+ },
163
+ {
164
+ name: 'amountPerPeriod',
165
+ type: 'uint64',
166
+ offset: 296,
167
+ byteLength: 8,
168
+ },
169
+ {
170
+ name: 'startEpoch',
171
+ type: 'uint32',
172
+ offset: 304,
173
+ byteLength: 4,
174
+ },
175
+ {
176
+ name: 'currentPeriod',
177
+ type: 'sint32',
178
+ offset: 308,
179
+ byteLength: 4,
180
+ },
181
+ ],
182
+ },
183
+ 'SubscriptionProposalData': {
184
+ name: 'SubscriptionProposalData',
185
+ byteLength: 340,
186
+ fields: [
187
+ {
188
+ name: 'proposerId',
189
+ type: 'id',
190
+ offset: 0,
191
+ byteLength: 32,
192
+ },
193
+ {
194
+ name: 'destination',
195
+ type: 'id',
196
+ offset: 32,
197
+ byteLength: 32,
198
+ },
199
+ {
200
+ name: 'url',
201
+ type: 'array',
202
+ offset: 64,
203
+ byteLength: 256,
204
+ arrayLength: 256,
205
+ arrayItemType: 'uint8',
206
+ arrayItemByteLength: 1,
207
+ },
208
+ {
209
+ name: 'weeksPerPeriod',
210
+ type: 'uint8',
211
+ offset: 320,
212
+ byteLength: 1,
213
+ },
214
+ {
215
+ name: '_padding0',
216
+ type: 'array',
217
+ offset: 321,
218
+ byteLength: 1,
219
+ arrayLength: 1,
220
+ arrayItemType: 'uint8',
221
+ arrayItemByteLength: 1,
222
+ },
223
+ {
224
+ name: '_padding1',
225
+ type: 'array',
226
+ offset: 322,
227
+ byteLength: 2,
228
+ arrayLength: 2,
229
+ arrayItemType: 'uint8',
230
+ arrayItemByteLength: 1,
231
+ },
232
+ {
233
+ name: 'numberOfPeriods',
234
+ type: 'uint32',
235
+ offset: 324,
236
+ byteLength: 4,
237
+ },
238
+ {
239
+ name: 'amountPerPeriod',
240
+ type: 'uint64',
241
+ offset: 328,
242
+ byteLength: 8,
243
+ },
244
+ {
245
+ name: 'startEpoch',
246
+ type: 'uint32',
247
+ offset: 336,
248
+ byteLength: 4,
249
+ },
250
+ ],
251
+ },
252
+ 'ProposalSingleVoteDataV1': {
253
+ name: 'ProposalSingleVoteDataV1',
254
+ byteLength: 16,
255
+ fields: [
256
+ {
257
+ name: 'proposalIndex',
258
+ type: 'uint16',
259
+ offset: 0,
260
+ byteLength: 2,
261
+ },
262
+ {
263
+ name: 'proposalType',
264
+ type: 'uint16',
265
+ offset: 2,
266
+ byteLength: 2,
267
+ },
268
+ {
269
+ name: 'proposalTick',
270
+ type: 'uint32',
271
+ offset: 4,
272
+ byteLength: 4,
273
+ },
274
+ {
275
+ name: 'voteValue',
276
+ type: 'sint64',
277
+ offset: 8,
278
+ byteLength: 8,
279
+ },
280
+ ],
281
+ },
282
+ 'ProposalSummarizedVotingDataV1': {
283
+ name: 'ProposalSummarizedVotingDataV1',
284
+ byteLength: 48,
285
+ fields: [
286
+ {
287
+ name: 'proposalIndex',
288
+ type: 'uint16',
289
+ offset: 0,
290
+ byteLength: 2,
291
+ },
292
+ {
293
+ name: 'optionCount',
294
+ type: 'uint16',
295
+ offset: 2,
296
+ byteLength: 2,
297
+ },
298
+ {
299
+ name: 'proposalTick',
300
+ type: 'uint32',
301
+ offset: 4,
302
+ byteLength: 4,
303
+ },
304
+ {
305
+ name: 'totalVotesAuthorized',
306
+ type: 'uint32',
307
+ offset: 8,
308
+ byteLength: 4,
309
+ },
310
+ {
311
+ name: 'totalVotesCasted',
312
+ type: 'uint32',
313
+ offset: 12,
314
+ byteLength: 4,
315
+ },
316
+ {
317
+ name: 'optionVoteCount',
318
+ type: 'array',
319
+ offset: 16,
320
+ byteLength: 32,
321
+ arrayLength: 8,
322
+ arrayItemType: 'uint32',
323
+ arrayItemByteLength: 4,
324
+ },
325
+ ],
326
+ },
327
+ 'LatestTransfersEntry': {
328
+ name: 'LatestTransfersEntry',
329
+ byteLength: 301,
330
+ fields: [
331
+ {
332
+ name: 'destination',
333
+ type: 'id',
334
+ offset: 0,
335
+ byteLength: 32,
336
+ },
337
+ {
338
+ name: 'url',
339
+ type: 'array',
340
+ offset: 32,
341
+ byteLength: 256,
342
+ arrayLength: 256,
343
+ arrayItemType: 'uint8',
344
+ arrayItemByteLength: 1,
345
+ },
346
+ {
347
+ name: 'amount',
348
+ type: 'sint64',
349
+ offset: 288,
350
+ byteLength: 8,
351
+ },
352
+ {
353
+ name: 'tick',
354
+ type: 'uint32',
355
+ offset: 296,
356
+ byteLength: 4,
357
+ },
358
+ {
359
+ name: 'success',
360
+ type: 'uint8',
361
+ offset: 300,
362
+ byteLength: 1,
363
+ },
364
+ ],
365
+ },
366
+ 'RegularPaymentEntry': {
367
+ name: 'RegularPaymentEntry',
368
+ byteLength: 308,
369
+ fields: [
370
+ {
371
+ name: 'destination',
372
+ type: 'id',
373
+ offset: 0,
374
+ byteLength: 32,
375
+ },
376
+ {
377
+ name: 'url',
378
+ type: 'array',
379
+ offset: 32,
380
+ byteLength: 256,
381
+ arrayLength: 256,
382
+ arrayItemType: 'uint8',
383
+ arrayItemByteLength: 1,
384
+ },
385
+ {
386
+ name: 'amount',
387
+ type: 'sint64',
388
+ offset: 288,
389
+ byteLength: 8,
390
+ },
391
+ {
392
+ name: 'tick',
393
+ type: 'uint32',
394
+ offset: 296,
395
+ byteLength: 4,
396
+ },
397
+ {
398
+ name: 'periodIndex',
399
+ type: 'sint32',
400
+ offset: 300,
401
+ byteLength: 4,
402
+ },
403
+ {
404
+ name: 'success',
405
+ type: 'uint8',
406
+ offset: 304,
407
+ byteLength: 1,
408
+ },
409
+ {
410
+ name: '_padding0',
411
+ type: 'array',
412
+ offset: 305,
413
+ byteLength: 1,
414
+ arrayLength: 1,
415
+ arrayItemType: 'uint8',
416
+ arrayItemByteLength: 1,
417
+ },
418
+ {
419
+ name: '_padding1',
420
+ type: 'array',
421
+ offset: 306,
422
+ byteLength: 2,
423
+ arrayLength: 2,
424
+ arrayItemType: 'uint8',
425
+ arrayItemByteLength: 1,
426
+ },
427
+ ],
428
+ },
429
+ }
430
+
431
+ export const COMPUTOR_CONTROLLED_FUND_SET_PROPOSAL_INPUT_TYPE = 1
432
+
433
+ export interface ComputorControlledFundSetProposalInput {
434
+ proposal: ComputorControlledFundProposalDataTStruct
435
+ isSubscription: number
436
+ weeksPerPeriod: number
437
+ _padding0: number[]
438
+ startEpoch: number
439
+ amountPerPeriod: bigint
440
+ numberOfPeriods: number
441
+ }
442
+
443
+ const COMPUTOR_CONTROLLED_FUND_SET_PROPOSAL_INPUT_FIELDS: BinaryField[] = [
444
+ {
445
+ name: 'proposal',
446
+ type: 'struct',
447
+ offset: 0,
448
+ byteLength: 304,
449
+ structRef: 'ProposalDataT',
450
+ },
451
+ {
452
+ name: 'isSubscription',
453
+ type: 'uint8',
454
+ offset: 304,
455
+ byteLength: 1,
456
+ },
457
+ {
458
+ name: 'weeksPerPeriod',
459
+ type: 'uint8',
460
+ offset: 305,
461
+ byteLength: 1,
462
+ },
463
+ {
464
+ name: '_padding0',
465
+ type: 'array',
466
+ offset: 306,
467
+ byteLength: 2,
468
+ arrayLength: 2,
469
+ arrayItemType: 'uint8',
470
+ arrayItemByteLength: 1,
471
+ },
472
+ {
473
+ name: 'startEpoch',
474
+ type: 'uint32',
475
+ offset: 308,
476
+ byteLength: 4,
477
+ },
478
+ {
479
+ name: 'amountPerPeriod',
480
+ type: 'uint64',
481
+ offset: 312,
482
+ byteLength: 8,
483
+ },
484
+ {
485
+ name: 'numberOfPeriods',
486
+ type: 'uint32',
487
+ offset: 320,
488
+ byteLength: 4,
489
+ },
490
+ ]
491
+
492
+ export function buildComputorControlledFundSetProposalInput(
493
+ input: ComputorControlledFundSetProposalInput,
494
+ ): ContractCall {
495
+ return { contractIndex: COMPUTOR_CONTROLLED_FUND_CONTRACT_INDEX, inputType: COMPUTOR_CONTROLLED_FUND_SET_PROPOSAL_INPUT_TYPE, payload: buildPayload(COMPUTOR_CONTROLLED_FUND_SET_PROPOSAL_INPUT_FIELDS, STRUCTS, input as unknown as Record<string, FieldValue | Uint8Array>, (_: string) => new Uint8Array(32)) }
496
+ }
497
+
498
+ export interface ComputorControlledFundSetProposalOutput {
499
+ proposalIndex: number
500
+ }
501
+
502
+ const COMPUTOR_CONTROLLED_FUND_SET_PROPOSAL_OUTPUT_FIELDS: BinaryField[] = [
503
+ {
504
+ name: 'proposalIndex',
505
+ type: 'uint16',
506
+ offset: 0,
507
+ byteLength: 2,
508
+ },
509
+ ]
510
+
511
+ export function decodeComputorControlledFundSetProposalOutput(
512
+ data: Uint8Array,
513
+ ): ComputorControlledFundSetProposalOutput {
514
+ return decodePayload(data, COMPUTOR_CONTROLLED_FUND_SET_PROPOSAL_OUTPUT_FIELDS, STRUCTS, (_: Uint8Array) => { throw new Error('unreachable') }) as unknown as ComputorControlledFundSetProposalOutput
515
+ }
516
+
517
+ export const COMPUTOR_CONTROLLED_FUND_VOTE_INPUT_TYPE = 2
518
+
519
+ export interface ComputorControlledFundVoteInput {
520
+ proposalIndex: number
521
+ proposalType: number
522
+ proposalTick: number
523
+ voteValue: bigint
524
+ }
525
+
526
+ const COMPUTOR_CONTROLLED_FUND_VOTE_INPUT_FIELDS: BinaryField[] = [
527
+ {
528
+ name: 'proposalIndex',
529
+ type: 'uint16',
530
+ offset: 0,
531
+ byteLength: 2,
532
+ },
533
+ {
534
+ name: 'proposalType',
535
+ type: 'uint16',
536
+ offset: 2,
537
+ byteLength: 2,
538
+ },
539
+ {
540
+ name: 'proposalTick',
541
+ type: 'uint32',
542
+ offset: 4,
543
+ byteLength: 4,
544
+ },
545
+ {
546
+ name: 'voteValue',
547
+ type: 'sint64',
548
+ offset: 8,
549
+ byteLength: 8,
550
+ },
551
+ ]
552
+
553
+ export function buildComputorControlledFundVoteInput(
554
+ input: ComputorControlledFundVoteInput,
555
+ ): ContractCall {
556
+ return { contractIndex: COMPUTOR_CONTROLLED_FUND_CONTRACT_INDEX, inputType: COMPUTOR_CONTROLLED_FUND_VOTE_INPUT_TYPE, payload: buildPayload(COMPUTOR_CONTROLLED_FUND_VOTE_INPUT_FIELDS, STRUCTS, input as unknown as Record<string, FieldValue | Uint8Array>, (_: string) => new Uint8Array(32)) }
557
+ }
558
+
559
+ export interface ComputorControlledFundVoteOutput {
560
+ okay: number
561
+ }
562
+
563
+ const COMPUTOR_CONTROLLED_FUND_VOTE_OUTPUT_FIELDS: BinaryField[] = [
564
+ {
565
+ name: 'okay',
566
+ type: 'uint8',
567
+ offset: 0,
568
+ byteLength: 1,
569
+ },
570
+ ]
571
+
572
+ export function decodeComputorControlledFundVoteOutput(
573
+ data: Uint8Array,
574
+ ): ComputorControlledFundVoteOutput {
575
+ return decodePayload(data, COMPUTOR_CONTROLLED_FUND_VOTE_OUTPUT_FIELDS, STRUCTS, (_: Uint8Array) => { throw new Error('unreachable') }) as unknown as ComputorControlledFundVoteOutput
576
+ }
577
+
578
+ export const COMPUTOR_CONTROLLED_FUND_GET_PROPOSAL_INDICES_INPUT_TYPE = 1
579
+ export const COMPUTOR_CONTROLLED_FUND_GET_PROPOSAL_INDICES_INPUT_SIZE = 5
580
+
581
+ export interface ComputorControlledFundGetProposalIndicesInput {
582
+ activeProposals: number
583
+ prevProposalIndex: number
584
+ }
585
+
586
+ const COMPUTOR_CONTROLLED_FUND_GET_PROPOSAL_INDICES_INPUT_FIELDS: BinaryField[] = [
587
+ {
588
+ name: 'activeProposals',
589
+ type: 'uint8',
590
+ offset: 0,
591
+ byteLength: 1,
592
+ },
593
+ {
594
+ name: 'prevProposalIndex',
595
+ type: 'sint32',
596
+ offset: 1,
597
+ byteLength: 4,
598
+ },
599
+ ]
600
+
601
+ export function buildComputorControlledFundGetProposalIndicesInput(
602
+ input: ComputorControlledFundGetProposalIndicesInput,
603
+ ): Uint8Array {
604
+ return buildPayload(COMPUTOR_CONTROLLED_FUND_GET_PROPOSAL_INDICES_INPUT_FIELDS, STRUCTS, input as unknown as Record<string, FieldValue | Uint8Array>, (_: string) => new Uint8Array(32))
605
+ }
606
+
607
+ export interface ComputorControlledFundGetProposalIndicesOutput {
608
+ numOfIndices: number
609
+ indices: number[]
610
+ }
611
+
612
+ const COMPUTOR_CONTROLLED_FUND_GET_PROPOSAL_INDICES_OUTPUT_FIELDS: BinaryField[] = [
613
+ {
614
+ name: 'numOfIndices',
615
+ type: 'uint16',
616
+ offset: 0,
617
+ byteLength: 2,
618
+ },
619
+ {
620
+ name: 'indices',
621
+ type: 'array',
622
+ offset: 2,
623
+ byteLength: 128,
624
+ arrayLength: 64,
625
+ arrayItemType: 'uint16',
626
+ arrayItemByteLength: 2,
627
+ },
628
+ ]
629
+
630
+ export function decodeComputorControlledFundGetProposalIndicesOutput(
631
+ data: Uint8Array,
632
+ ): ComputorControlledFundGetProposalIndicesOutput {
633
+ return decodePayload(data, COMPUTOR_CONTROLLED_FUND_GET_PROPOSAL_INDICES_OUTPUT_FIELDS, STRUCTS, (_: Uint8Array) => { throw new Error('unreachable') }) as unknown as ComputorControlledFundGetProposalIndicesOutput
634
+ }
635
+
636
+ export async function computorControlledFundGetProposalIndices(
637
+ live: SmartContractCaller,
638
+ input: ComputorControlledFundGetProposalIndicesInput,
639
+ options?: ContractCallOptions,
640
+ ): Promise<Result<ComputorControlledFundGetProposalIndicesOutput, QubicRpcError>> {
641
+ return callContractFunction({
642
+ live,
643
+ contractIndex: COMPUTOR_CONTROLLED_FUND_CONTRACT_INDEX,
644
+ inputType: COMPUTOR_CONTROLLED_FUND_GET_PROPOSAL_INDICES_INPUT_TYPE,
645
+ inputSize: COMPUTOR_CONTROLLED_FUND_GET_PROPOSAL_INDICES_INPUT_SIZE,
646
+ inputFields: COMPUTOR_CONTROLLED_FUND_GET_PROPOSAL_INDICES_INPUT_FIELDS,
647
+ outputFields: COMPUTOR_CONTROLLED_FUND_GET_PROPOSAL_INDICES_OUTPUT_FIELDS,
648
+ structs: STRUCTS,
649
+ input: (input as unknown as Record<string, unknown>),
650
+ ...options,
651
+ })
652
+ }
653
+
654
+ export const COMPUTOR_CONTROLLED_FUND_GET_PROPOSAL_INPUT_TYPE = 2
655
+ export const COMPUTOR_CONTROLLED_FUND_GET_PROPOSAL_INPUT_SIZE = 34
656
+
657
+ export interface ComputorControlledFundGetProposalInput {
658
+ subscriptionDestination: string
659
+ proposalIndex: number
660
+ }
661
+
662
+ const COMPUTOR_CONTROLLED_FUND_GET_PROPOSAL_INPUT_FIELDS: BinaryField[] = [
663
+ {
664
+ name: 'subscriptionDestination',
665
+ type: 'id',
666
+ offset: 0,
667
+ byteLength: 32,
668
+ },
669
+ {
670
+ name: 'proposalIndex',
671
+ type: 'uint16',
672
+ offset: 32,
673
+ byteLength: 2,
674
+ },
675
+ ]
676
+
677
+ export function buildComputorControlledFundGetProposalInput(
678
+ input: ComputorControlledFundGetProposalInput,
679
+ identityToPublicKey: (identity: string) => Uint8Array,
680
+ ): Uint8Array {
681
+ return buildPayload(COMPUTOR_CONTROLLED_FUND_GET_PROPOSAL_INPUT_FIELDS, STRUCTS, input as unknown as Record<string, FieldValue | Uint8Array>, identityToPublicKey)
682
+ }
683
+
684
+ export interface ComputorControlledFundGetProposalOutput {
685
+ okay: number
686
+ hasSubscriptionProposal: number
687
+ hasActiveSubscription: number
688
+ _padding0: number[]
689
+ _padding1: number[]
690
+ proposerPublicKey: string
691
+ proposal: ComputorControlledFundProposalDataTStruct
692
+ subscription: ComputorControlledFundSubscriptionDataStruct
693
+ subscriptionProposal: ComputorControlledFundSubscriptionProposalDataStruct
694
+ }
695
+
696
+ const COMPUTOR_CONTROLLED_FUND_GET_PROPOSAL_OUTPUT_FIELDS: BinaryField[] = [
697
+ {
698
+ name: 'okay',
699
+ type: 'uint8',
700
+ offset: 0,
701
+ byteLength: 1,
702
+ },
703
+ {
704
+ name: 'hasSubscriptionProposal',
705
+ type: 'uint8',
706
+ offset: 1,
707
+ byteLength: 1,
708
+ },
709
+ {
710
+ name: 'hasActiveSubscription',
711
+ type: 'uint8',
712
+ offset: 2,
713
+ byteLength: 1,
714
+ },
715
+ {
716
+ name: '_padding0',
717
+ type: 'array',
718
+ offset: 3,
719
+ byteLength: 1,
720
+ arrayLength: 1,
721
+ arrayItemType: 'uint8',
722
+ arrayItemByteLength: 1,
723
+ },
724
+ {
725
+ name: '_padding1',
726
+ type: 'array',
727
+ offset: 4,
728
+ byteLength: 4,
729
+ arrayLength: 4,
730
+ arrayItemType: 'uint8',
731
+ arrayItemByteLength: 1,
732
+ },
733
+ {
734
+ name: 'proposerPublicKey',
735
+ type: 'id',
736
+ offset: 8,
737
+ byteLength: 32,
738
+ },
739
+ {
740
+ name: 'proposal',
741
+ type: 'struct',
742
+ offset: 40,
743
+ byteLength: 304,
744
+ structRef: 'ProposalDataT',
745
+ },
746
+ {
747
+ name: 'subscription',
748
+ type: 'struct',
749
+ offset: 344,
750
+ byteLength: 312,
751
+ structRef: 'SubscriptionData',
752
+ },
753
+ {
754
+ name: 'subscriptionProposal',
755
+ type: 'struct',
756
+ offset: 656,
757
+ byteLength: 340,
758
+ structRef: 'SubscriptionProposalData',
759
+ },
760
+ ]
761
+
762
+ export function decodeComputorControlledFundGetProposalOutput(
763
+ data: Uint8Array,
764
+ publicKeyToIdentity: (pk: Uint8Array) => string,
765
+ ): ComputorControlledFundGetProposalOutput {
766
+ return decodePayload(data, COMPUTOR_CONTROLLED_FUND_GET_PROPOSAL_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity) as unknown as ComputorControlledFundGetProposalOutput
767
+ }
768
+
769
+ export async function computorControlledFundGetProposal(
770
+ live: SmartContractCaller,
771
+ input: ComputorControlledFundGetProposalInput,
772
+ options?: ContractCallOptions,
773
+ ): Promise<Result<ComputorControlledFundGetProposalOutput, QubicRpcError>> {
774
+ return callContractFunction({
775
+ live,
776
+ contractIndex: COMPUTOR_CONTROLLED_FUND_CONTRACT_INDEX,
777
+ inputType: COMPUTOR_CONTROLLED_FUND_GET_PROPOSAL_INPUT_TYPE,
778
+ inputSize: COMPUTOR_CONTROLLED_FUND_GET_PROPOSAL_INPUT_SIZE,
779
+ inputFields: COMPUTOR_CONTROLLED_FUND_GET_PROPOSAL_INPUT_FIELDS,
780
+ outputFields: COMPUTOR_CONTROLLED_FUND_GET_PROPOSAL_OUTPUT_FIELDS,
781
+ structs: STRUCTS,
782
+ input: (input as unknown as Record<string, unknown>),
783
+ ...options,
784
+ })
785
+ }
786
+
787
+ export const COMPUTOR_CONTROLLED_FUND_GET_VOTE_INPUT_TYPE = 3
788
+ export const COMPUTOR_CONTROLLED_FUND_GET_VOTE_INPUT_SIZE = 34
789
+
790
+ export interface ComputorControlledFundGetVoteInput {
791
+ voter: string
792
+ proposalIndex: number
793
+ }
794
+
795
+ const COMPUTOR_CONTROLLED_FUND_GET_VOTE_INPUT_FIELDS: BinaryField[] = [
796
+ {
797
+ name: 'voter',
798
+ type: 'id',
799
+ offset: 0,
800
+ byteLength: 32,
801
+ },
802
+ {
803
+ name: 'proposalIndex',
804
+ type: 'uint16',
805
+ offset: 32,
806
+ byteLength: 2,
807
+ },
808
+ ]
809
+
810
+ export function buildComputorControlledFundGetVoteInput(
811
+ input: ComputorControlledFundGetVoteInput,
812
+ identityToPublicKey: (identity: string) => Uint8Array,
813
+ ): Uint8Array {
814
+ return buildPayload(COMPUTOR_CONTROLLED_FUND_GET_VOTE_INPUT_FIELDS, STRUCTS, input as unknown as Record<string, FieldValue | Uint8Array>, identityToPublicKey)
815
+ }
816
+
817
+ export interface ComputorControlledFundGetVoteOutput {
818
+ okay: number
819
+ vote: ComputorControlledFundProposalSingleVoteDataV1Struct
820
+ }
821
+
822
+ const COMPUTOR_CONTROLLED_FUND_GET_VOTE_OUTPUT_FIELDS: BinaryField[] = [
823
+ {
824
+ name: 'okay',
825
+ type: 'uint8',
826
+ offset: 0,
827
+ byteLength: 1,
828
+ },
829
+ {
830
+ name: 'vote',
831
+ type: 'struct',
832
+ offset: 1,
833
+ byteLength: 16,
834
+ structRef: 'ProposalSingleVoteDataV1',
835
+ },
836
+ ]
837
+
838
+ export function decodeComputorControlledFundGetVoteOutput(
839
+ data: Uint8Array,
840
+ ): ComputorControlledFundGetVoteOutput {
841
+ return decodePayload(data, COMPUTOR_CONTROLLED_FUND_GET_VOTE_OUTPUT_FIELDS, STRUCTS, (_: Uint8Array) => { throw new Error('unreachable') }) as unknown as ComputorControlledFundGetVoteOutput
842
+ }
843
+
844
+ export async function computorControlledFundGetVote(
845
+ live: SmartContractCaller,
846
+ input: ComputorControlledFundGetVoteInput,
847
+ options?: ContractCallOptions,
848
+ ): Promise<Result<ComputorControlledFundGetVoteOutput, QubicRpcError>> {
849
+ return callContractFunction({
850
+ live,
851
+ contractIndex: COMPUTOR_CONTROLLED_FUND_CONTRACT_INDEX,
852
+ inputType: COMPUTOR_CONTROLLED_FUND_GET_VOTE_INPUT_TYPE,
853
+ inputSize: COMPUTOR_CONTROLLED_FUND_GET_VOTE_INPUT_SIZE,
854
+ inputFields: COMPUTOR_CONTROLLED_FUND_GET_VOTE_INPUT_FIELDS,
855
+ outputFields: COMPUTOR_CONTROLLED_FUND_GET_VOTE_OUTPUT_FIELDS,
856
+ structs: STRUCTS,
857
+ input: (input as unknown as Record<string, unknown>),
858
+ ...options,
859
+ })
860
+ }
861
+
862
+ export const COMPUTOR_CONTROLLED_FUND_GET_VOTING_RESULTS_INPUT_TYPE = 4
863
+ export const COMPUTOR_CONTROLLED_FUND_GET_VOTING_RESULTS_INPUT_SIZE = 2
864
+
865
+ export interface ComputorControlledFundGetVotingResultsInput {
866
+ proposalIndex: number
867
+ }
868
+
869
+ const COMPUTOR_CONTROLLED_FUND_GET_VOTING_RESULTS_INPUT_FIELDS: BinaryField[] = [
870
+ {
871
+ name: 'proposalIndex',
872
+ type: 'uint16',
873
+ offset: 0,
874
+ byteLength: 2,
875
+ },
876
+ ]
877
+
878
+ export function buildComputorControlledFundGetVotingResultsInput(
879
+ input: ComputorControlledFundGetVotingResultsInput,
880
+ ): Uint8Array {
881
+ return buildPayload(COMPUTOR_CONTROLLED_FUND_GET_VOTING_RESULTS_INPUT_FIELDS, STRUCTS, input as unknown as Record<string, FieldValue | Uint8Array>, (_: string) => new Uint8Array(32))
882
+ }
883
+
884
+ export interface ComputorControlledFundGetVotingResultsOutput {
885
+ okay: number
886
+ results: ComputorControlledFundProposalSummarizedVotingDataV1Struct
887
+ }
888
+
889
+ const COMPUTOR_CONTROLLED_FUND_GET_VOTING_RESULTS_OUTPUT_FIELDS: BinaryField[] = [
890
+ {
891
+ name: 'okay',
892
+ type: 'uint8',
893
+ offset: 0,
894
+ byteLength: 1,
895
+ },
896
+ {
897
+ name: 'results',
898
+ type: 'struct',
899
+ offset: 1,
900
+ byteLength: 48,
901
+ structRef: 'ProposalSummarizedVotingDataV1',
902
+ },
903
+ ]
904
+
905
+ export function decodeComputorControlledFundGetVotingResultsOutput(
906
+ data: Uint8Array,
907
+ ): ComputorControlledFundGetVotingResultsOutput {
908
+ return decodePayload(data, COMPUTOR_CONTROLLED_FUND_GET_VOTING_RESULTS_OUTPUT_FIELDS, STRUCTS, (_: Uint8Array) => { throw new Error('unreachable') }) as unknown as ComputorControlledFundGetVotingResultsOutput
909
+ }
910
+
911
+ export async function computorControlledFundGetVotingResults(
912
+ live: SmartContractCaller,
913
+ input: ComputorControlledFundGetVotingResultsInput,
914
+ options?: ContractCallOptions,
915
+ ): Promise<Result<ComputorControlledFundGetVotingResultsOutput, QubicRpcError>> {
916
+ return callContractFunction({
917
+ live,
918
+ contractIndex: COMPUTOR_CONTROLLED_FUND_CONTRACT_INDEX,
919
+ inputType: COMPUTOR_CONTROLLED_FUND_GET_VOTING_RESULTS_INPUT_TYPE,
920
+ inputSize: COMPUTOR_CONTROLLED_FUND_GET_VOTING_RESULTS_INPUT_SIZE,
921
+ inputFields: COMPUTOR_CONTROLLED_FUND_GET_VOTING_RESULTS_INPUT_FIELDS,
922
+ outputFields: COMPUTOR_CONTROLLED_FUND_GET_VOTING_RESULTS_OUTPUT_FIELDS,
923
+ structs: STRUCTS,
924
+ input: (input as unknown as Record<string, unknown>),
925
+ ...options,
926
+ })
927
+ }
928
+
929
+ export const COMPUTOR_CONTROLLED_FUND_GET_LATEST_TRANSFERS_INPUT_TYPE = 5
930
+ export const COMPUTOR_CONTROLLED_FUND_GET_LATEST_TRANSFERS_INPUT_SIZE = 0
931
+
932
+ export interface ComputorControlledFundGetLatestTransfersOutput {
933
+ data: number[]
934
+ }
935
+
936
+ const COMPUTOR_CONTROLLED_FUND_GET_LATEST_TRANSFERS_OUTPUT_FIELDS: BinaryField[] = [
937
+ {
938
+ name: 'data',
939
+ type: 'array',
940
+ offset: 0,
941
+ byteLength: 38528,
942
+ arrayLength: 128,
943
+ arrayItemByteLength: 301,
944
+ arrayItemStructRef: 'LatestTransfersEntry',
945
+ },
946
+ ]
947
+
948
+ export function decodeComputorControlledFundGetLatestTransfersOutput(
949
+ data: Uint8Array,
950
+ ): ComputorControlledFundGetLatestTransfersOutput {
951
+ return decodePayload(data, COMPUTOR_CONTROLLED_FUND_GET_LATEST_TRANSFERS_OUTPUT_FIELDS, STRUCTS, (_: Uint8Array) => { throw new Error('unreachable') }) as unknown as ComputorControlledFundGetLatestTransfersOutput
952
+ }
953
+
954
+ export async function computorControlledFundGetLatestTransfers(
955
+ live: SmartContractCaller,
956
+ options?: ContractCallOptions,
957
+ ): Promise<Result<ComputorControlledFundGetLatestTransfersOutput, QubicRpcError>> {
958
+ return callContractFunction({
959
+ live,
960
+ contractIndex: COMPUTOR_CONTROLLED_FUND_CONTRACT_INDEX,
961
+ inputType: COMPUTOR_CONTROLLED_FUND_GET_LATEST_TRANSFERS_INPUT_TYPE,
962
+ inputSize: COMPUTOR_CONTROLLED_FUND_GET_LATEST_TRANSFERS_INPUT_SIZE,
963
+ inputFields: [],
964
+ outputFields: COMPUTOR_CONTROLLED_FUND_GET_LATEST_TRANSFERS_OUTPUT_FIELDS,
965
+ structs: STRUCTS,
966
+ input: {},
967
+ ...options,
968
+ })
969
+ }
970
+
971
+ export const COMPUTOR_CONTROLLED_FUND_GET_PROPOSAL_FEE_INPUT_TYPE = 6
972
+ export const COMPUTOR_CONTROLLED_FUND_GET_PROPOSAL_FEE_INPUT_SIZE = 0
973
+
974
+ export interface ComputorControlledFundGetProposalFeeOutput {
975
+ proposalFee: number
976
+ }
977
+
978
+ const COMPUTOR_CONTROLLED_FUND_GET_PROPOSAL_FEE_OUTPUT_FIELDS: BinaryField[] = [
979
+ {
980
+ name: 'proposalFee',
981
+ type: 'uint32',
982
+ offset: 0,
983
+ byteLength: 4,
984
+ },
985
+ ]
986
+
987
+ export function decodeComputorControlledFundGetProposalFeeOutput(
988
+ data: Uint8Array,
989
+ ): ComputorControlledFundGetProposalFeeOutput {
990
+ return decodePayload(data, COMPUTOR_CONTROLLED_FUND_GET_PROPOSAL_FEE_OUTPUT_FIELDS, STRUCTS, (_: Uint8Array) => { throw new Error('unreachable') }) as unknown as ComputorControlledFundGetProposalFeeOutput
991
+ }
992
+
993
+ export async function computorControlledFundGetProposalFee(
994
+ live: SmartContractCaller,
995
+ options?: ContractCallOptions,
996
+ ): Promise<Result<ComputorControlledFundGetProposalFeeOutput, QubicRpcError>> {
997
+ return callContractFunction({
998
+ live,
999
+ contractIndex: COMPUTOR_CONTROLLED_FUND_CONTRACT_INDEX,
1000
+ inputType: COMPUTOR_CONTROLLED_FUND_GET_PROPOSAL_FEE_INPUT_TYPE,
1001
+ inputSize: COMPUTOR_CONTROLLED_FUND_GET_PROPOSAL_FEE_INPUT_SIZE,
1002
+ inputFields: [],
1003
+ outputFields: COMPUTOR_CONTROLLED_FUND_GET_PROPOSAL_FEE_OUTPUT_FIELDS,
1004
+ structs: STRUCTS,
1005
+ input: {},
1006
+ ...options,
1007
+ })
1008
+ }
1009
+
1010
+ export const COMPUTOR_CONTROLLED_FUND_GET_REGULAR_PAYMENTS_INPUT_TYPE = 7
1011
+ export const COMPUTOR_CONTROLLED_FUND_GET_REGULAR_PAYMENTS_INPUT_SIZE = 0
1012
+
1013
+ export interface ComputorControlledFundGetRegularPaymentsOutput {
1014
+ data: number[]
1015
+ }
1016
+
1017
+ const COMPUTOR_CONTROLLED_FUND_GET_REGULAR_PAYMENTS_OUTPUT_FIELDS: BinaryField[] = [
1018
+ {
1019
+ name: 'data',
1020
+ type: 'array',
1021
+ offset: 0,
1022
+ byteLength: 39424,
1023
+ arrayLength: 128,
1024
+ arrayItemByteLength: 308,
1025
+ arrayItemStructRef: 'RegularPaymentEntry',
1026
+ },
1027
+ ]
1028
+
1029
+ export function decodeComputorControlledFundGetRegularPaymentsOutput(
1030
+ data: Uint8Array,
1031
+ ): ComputorControlledFundGetRegularPaymentsOutput {
1032
+ return decodePayload(data, COMPUTOR_CONTROLLED_FUND_GET_REGULAR_PAYMENTS_OUTPUT_FIELDS, STRUCTS, (_: Uint8Array) => { throw new Error('unreachable') }) as unknown as ComputorControlledFundGetRegularPaymentsOutput
1033
+ }
1034
+
1035
+ export async function computorControlledFundGetRegularPayments(
1036
+ live: SmartContractCaller,
1037
+ options?: ContractCallOptions,
1038
+ ): Promise<Result<ComputorControlledFundGetRegularPaymentsOutput, QubicRpcError>> {
1039
+ return callContractFunction({
1040
+ live,
1041
+ contractIndex: COMPUTOR_CONTROLLED_FUND_CONTRACT_INDEX,
1042
+ inputType: COMPUTOR_CONTROLLED_FUND_GET_REGULAR_PAYMENTS_INPUT_TYPE,
1043
+ inputSize: COMPUTOR_CONTROLLED_FUND_GET_REGULAR_PAYMENTS_INPUT_SIZE,
1044
+ inputFields: [],
1045
+ outputFields: COMPUTOR_CONTROLLED_FUND_GET_REGULAR_PAYMENTS_OUTPUT_FIELDS,
1046
+ structs: STRUCTS,
1047
+ input: {},
1048
+ ...options,
1049
+ })
1050
+ }
1051
+
1052
+ export const computorControlledFund = {
1053
+ contractIndex: COMPUTOR_CONTROLLED_FUND_CONTRACT_INDEX,
1054
+ GetProposalIndices: computorControlledFundGetProposalIndices,
1055
+ GetProposal: computorControlledFundGetProposal,
1056
+ GetVote: computorControlledFundGetVote,
1057
+ GetVotingResults: computorControlledFundGetVotingResults,
1058
+ GetLatestTransfers: computorControlledFundGetLatestTransfers,
1059
+ GetProposalFee: computorControlledFundGetProposalFee,
1060
+ GetRegularPayments: computorControlledFundGetRegularPayments,
1061
+ buildSetProposalInput: buildComputorControlledFundSetProposalInput,
1062
+ decodeSetProposalOutput: decodeComputorControlledFundSetProposalOutput,
1063
+ buildVoteInput: buildComputorControlledFundVoteInput,
1064
+ decodeVoteOutput: decodeComputorControlledFundVoteOutput,
1065
+ }
1066
+