@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,1113 @@
1
+ import { buildPayload, decodePayload } from '@qubic.org/registry';
2
+ import { callContractFunction } from '../call-contract.js';
3
+ export const NOSTROMO_CONTRACT_INDEX = 14;
4
+ const STRUCTS = {
5
+ 'Asset': {
6
+ name: 'Asset',
7
+ byteLength: 40,
8
+ fields: [
9
+ {
10
+ name: 'issuer',
11
+ type: 'id',
12
+ offset: 0,
13
+ byteLength: 32,
14
+ },
15
+ {
16
+ name: 'assetName',
17
+ type: 'uint64',
18
+ offset: 32,
19
+ byteLength: 8,
20
+ },
21
+ ],
22
+ },
23
+ 'projectInfo': {
24
+ name: 'projectInfo',
25
+ byteLength: 65,
26
+ fields: [
27
+ {
28
+ name: 'creator',
29
+ type: 'id',
30
+ offset: 0,
31
+ byteLength: 32,
32
+ },
33
+ {
34
+ name: 'tokenName',
35
+ type: 'uint64',
36
+ offset: 32,
37
+ byteLength: 8,
38
+ },
39
+ {
40
+ name: 'supplyOfToken',
41
+ type: 'uint64',
42
+ offset: 40,
43
+ byteLength: 8,
44
+ },
45
+ {
46
+ name: 'startDate',
47
+ type: 'uint32',
48
+ offset: 48,
49
+ byteLength: 4,
50
+ },
51
+ {
52
+ name: 'endDate',
53
+ type: 'uint32',
54
+ offset: 52,
55
+ byteLength: 4,
56
+ },
57
+ {
58
+ name: 'numberOfYes',
59
+ type: 'uint32',
60
+ offset: 56,
61
+ byteLength: 4,
62
+ },
63
+ {
64
+ name: 'numberOfNo',
65
+ type: 'uint32',
66
+ offset: 60,
67
+ byteLength: 4,
68
+ },
69
+ {
70
+ name: 'isCreatedFundarasing',
71
+ type: 'uint8',
72
+ offset: 64,
73
+ byteLength: 1,
74
+ },
75
+ ],
76
+ },
77
+ 'fundaraisingInfo': {
78
+ name: 'fundaraisingInfo',
79
+ byteLength: 76,
80
+ fields: [
81
+ {
82
+ name: 'tokenPrice',
83
+ type: 'uint64',
84
+ offset: 0,
85
+ byteLength: 8,
86
+ },
87
+ {
88
+ name: 'soldAmount',
89
+ type: 'uint64',
90
+ offset: 8,
91
+ byteLength: 8,
92
+ },
93
+ {
94
+ name: 'requiredFunds',
95
+ type: 'uint64',
96
+ offset: 16,
97
+ byteLength: 8,
98
+ },
99
+ {
100
+ name: 'raisedFunds',
101
+ type: 'uint64',
102
+ offset: 24,
103
+ byteLength: 8,
104
+ },
105
+ {
106
+ name: 'indexOfProject',
107
+ type: 'uint32',
108
+ offset: 32,
109
+ byteLength: 4,
110
+ },
111
+ {
112
+ name: 'firstPhaseStartDate',
113
+ type: 'uint32',
114
+ offset: 36,
115
+ byteLength: 4,
116
+ },
117
+ {
118
+ name: 'firstPhaseEndDate',
119
+ type: 'uint32',
120
+ offset: 40,
121
+ byteLength: 4,
122
+ },
123
+ {
124
+ name: 'secondPhaseStartDate',
125
+ type: 'uint32',
126
+ offset: 44,
127
+ byteLength: 4,
128
+ },
129
+ {
130
+ name: 'secondPhaseEndDate',
131
+ type: 'uint32',
132
+ offset: 48,
133
+ byteLength: 4,
134
+ },
135
+ {
136
+ name: 'thirdPhaseStartDate',
137
+ type: 'uint32',
138
+ offset: 52,
139
+ byteLength: 4,
140
+ },
141
+ {
142
+ name: 'thirdPhaseEndDate',
143
+ type: 'uint32',
144
+ offset: 56,
145
+ byteLength: 4,
146
+ },
147
+ {
148
+ name: 'listingStartDate',
149
+ type: 'uint32',
150
+ offset: 60,
151
+ byteLength: 4,
152
+ },
153
+ {
154
+ name: 'cliffEndDate',
155
+ type: 'uint32',
156
+ offset: 64,
157
+ byteLength: 4,
158
+ },
159
+ {
160
+ name: 'vestingEndDate',
161
+ type: 'uint32',
162
+ offset: 68,
163
+ byteLength: 4,
164
+ },
165
+ {
166
+ name: 'threshold',
167
+ type: 'uint8',
168
+ offset: 72,
169
+ byteLength: 1,
170
+ },
171
+ {
172
+ name: 'TGE',
173
+ type: 'uint8',
174
+ offset: 73,
175
+ byteLength: 1,
176
+ },
177
+ {
178
+ name: 'stepOfVesting',
179
+ type: 'uint8',
180
+ offset: 74,
181
+ byteLength: 1,
182
+ },
183
+ {
184
+ name: 'isCreatedToken',
185
+ type: 'uint8',
186
+ offset: 75,
187
+ byteLength: 1,
188
+ },
189
+ ],
190
+ },
191
+ 'investInfo': {
192
+ name: 'investInfo',
193
+ byteLength: 20,
194
+ fields: [
195
+ {
196
+ name: 'investedAmount',
197
+ type: 'uint64',
198
+ offset: 0,
199
+ byteLength: 8,
200
+ },
201
+ {
202
+ name: 'claimedAmount',
203
+ type: 'uint64',
204
+ offset: 8,
205
+ byteLength: 8,
206
+ },
207
+ {
208
+ name: 'indexOfFundraising',
209
+ type: 'uint32',
210
+ offset: 16,
211
+ byteLength: 4,
212
+ },
213
+ ],
214
+ },
215
+ };
216
+ export const NOSTROMO_REGISTER_IN_TIER_INPUT_TYPE = 1;
217
+ const NOSTROMO_REGISTER_IN_TIER_INPUT_FIELDS = [
218
+ {
219
+ name: 'tierLevel',
220
+ type: 'uint32',
221
+ offset: 0,
222
+ byteLength: 4,
223
+ },
224
+ ];
225
+ export function buildNostromoRegisterInTierInput(input, identityToPublicKey = (_identity) => new Uint8Array(32)) {
226
+ return buildPayload(NOSTROMO_REGISTER_IN_TIER_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
227
+ }
228
+ const NOSTROMO_REGISTER_IN_TIER_OUTPUT_FIELDS = [
229
+ {
230
+ name: 'tierLevel',
231
+ type: 'uint32',
232
+ offset: 0,
233
+ byteLength: 4,
234
+ },
235
+ ];
236
+ export function decodeNostromoRegisterInTierOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
237
+ return decodePayload(data, NOSTROMO_REGISTER_IN_TIER_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
238
+ }
239
+ export const NOSTROMO_LOGOUT_FROM_TIER_INPUT_TYPE = 2;
240
+ const NOSTROMO_LOGOUT_FROM_TIER_OUTPUT_FIELDS = [
241
+ {
242
+ name: 'result',
243
+ type: 'uint8',
244
+ offset: 0,
245
+ byteLength: 1,
246
+ },
247
+ ];
248
+ export function decodeNostromoLogoutFromTierOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
249
+ return decodePayload(data, NOSTROMO_LOGOUT_FROM_TIER_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
250
+ }
251
+ export const NOSTROMO_CREATE_PROJECT_INPUT_TYPE = 3;
252
+ const NOSTROMO_CREATE_PROJECT_INPUT_FIELDS = [
253
+ {
254
+ name: 'tokenName',
255
+ type: 'uint64',
256
+ offset: 0,
257
+ byteLength: 8,
258
+ },
259
+ {
260
+ name: 'supply',
261
+ type: 'uint64',
262
+ offset: 8,
263
+ byteLength: 8,
264
+ },
265
+ {
266
+ name: 'startYear',
267
+ type: 'uint32',
268
+ offset: 16,
269
+ byteLength: 4,
270
+ },
271
+ {
272
+ name: 'startMonth',
273
+ type: 'uint32',
274
+ offset: 20,
275
+ byteLength: 4,
276
+ },
277
+ {
278
+ name: 'startDay',
279
+ type: 'uint32',
280
+ offset: 24,
281
+ byteLength: 4,
282
+ },
283
+ {
284
+ name: 'startHour',
285
+ type: 'uint32',
286
+ offset: 28,
287
+ byteLength: 4,
288
+ },
289
+ {
290
+ name: 'endYear',
291
+ type: 'uint32',
292
+ offset: 32,
293
+ byteLength: 4,
294
+ },
295
+ {
296
+ name: 'endMonth',
297
+ type: 'uint32',
298
+ offset: 36,
299
+ byteLength: 4,
300
+ },
301
+ {
302
+ name: 'endDay',
303
+ type: 'uint32',
304
+ offset: 40,
305
+ byteLength: 4,
306
+ },
307
+ {
308
+ name: 'endHour',
309
+ type: 'uint32',
310
+ offset: 44,
311
+ byteLength: 4,
312
+ },
313
+ ];
314
+ export function buildNostromoCreateProjectInput(input, identityToPublicKey = (_identity) => new Uint8Array(32)) {
315
+ return buildPayload(NOSTROMO_CREATE_PROJECT_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
316
+ }
317
+ const NOSTROMO_CREATE_PROJECT_OUTPUT_FIELDS = [
318
+ {
319
+ name: 'indexOfProject',
320
+ type: 'uint32',
321
+ offset: 0,
322
+ byteLength: 4,
323
+ },
324
+ ];
325
+ export function decodeNostromoCreateProjectOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
326
+ return decodePayload(data, NOSTROMO_CREATE_PROJECT_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
327
+ }
328
+ export const NOSTROMO_VOTE_IN_PROJECT_INPUT_TYPE = 4;
329
+ const NOSTROMO_VOTE_IN_PROJECT_INPUT_FIELDS = [
330
+ {
331
+ name: 'indexOfProject',
332
+ type: 'uint32',
333
+ offset: 0,
334
+ byteLength: 4,
335
+ },
336
+ {
337
+ name: 'decision',
338
+ type: 'uint8',
339
+ offset: 4,
340
+ byteLength: 1,
341
+ },
342
+ ];
343
+ export function buildNostromoVoteInProjectInput(input, identityToPublicKey = (_identity) => new Uint8Array(32)) {
344
+ return buildPayload(NOSTROMO_VOTE_IN_PROJECT_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
345
+ }
346
+ export const NOSTROMO_CREATE_FUNDRAISING_INPUT_TYPE = 5;
347
+ const NOSTROMO_CREATE_FUNDRAISING_INPUT_FIELDS = [
348
+ {
349
+ name: 'tokenPrice',
350
+ type: 'uint64',
351
+ offset: 0,
352
+ byteLength: 8,
353
+ },
354
+ {
355
+ name: 'soldAmount',
356
+ type: 'uint64',
357
+ offset: 8,
358
+ byteLength: 8,
359
+ },
360
+ {
361
+ name: 'requiredFunds',
362
+ type: 'uint64',
363
+ offset: 16,
364
+ byteLength: 8,
365
+ },
366
+ {
367
+ name: 'indexOfProject',
368
+ type: 'uint32',
369
+ offset: 24,
370
+ byteLength: 4,
371
+ },
372
+ {
373
+ name: 'firstPhaseStartYear',
374
+ type: 'uint32',
375
+ offset: 28,
376
+ byteLength: 4,
377
+ },
378
+ {
379
+ name: 'firstPhaseStartMonth',
380
+ type: 'uint32',
381
+ offset: 32,
382
+ byteLength: 4,
383
+ },
384
+ {
385
+ name: 'firstPhaseStartDay',
386
+ type: 'uint32',
387
+ offset: 36,
388
+ byteLength: 4,
389
+ },
390
+ {
391
+ name: 'firstPhaseStartHour',
392
+ type: 'uint32',
393
+ offset: 40,
394
+ byteLength: 4,
395
+ },
396
+ {
397
+ name: 'firstPhaseEndYear',
398
+ type: 'uint32',
399
+ offset: 44,
400
+ byteLength: 4,
401
+ },
402
+ {
403
+ name: 'firstPhaseEndMonth',
404
+ type: 'uint32',
405
+ offset: 48,
406
+ byteLength: 4,
407
+ },
408
+ {
409
+ name: 'firstPhaseEndDay',
410
+ type: 'uint32',
411
+ offset: 52,
412
+ byteLength: 4,
413
+ },
414
+ {
415
+ name: 'firstPhaseEndHour',
416
+ type: 'uint32',
417
+ offset: 56,
418
+ byteLength: 4,
419
+ },
420
+ {
421
+ name: 'secondPhaseStartYear',
422
+ type: 'uint32',
423
+ offset: 60,
424
+ byteLength: 4,
425
+ },
426
+ {
427
+ name: 'secondPhaseStartMonth',
428
+ type: 'uint32',
429
+ offset: 64,
430
+ byteLength: 4,
431
+ },
432
+ {
433
+ name: 'secondPhaseStartDay',
434
+ type: 'uint32',
435
+ offset: 68,
436
+ byteLength: 4,
437
+ },
438
+ {
439
+ name: 'secondPhaseStartHour',
440
+ type: 'uint32',
441
+ offset: 72,
442
+ byteLength: 4,
443
+ },
444
+ {
445
+ name: 'secondPhaseEndYear',
446
+ type: 'uint32',
447
+ offset: 76,
448
+ byteLength: 4,
449
+ },
450
+ {
451
+ name: 'secondPhaseEndMonth',
452
+ type: 'uint32',
453
+ offset: 80,
454
+ byteLength: 4,
455
+ },
456
+ {
457
+ name: 'secondPhaseEndDay',
458
+ type: 'uint32',
459
+ offset: 84,
460
+ byteLength: 4,
461
+ },
462
+ {
463
+ name: 'secondPhaseEndHour',
464
+ type: 'uint32',
465
+ offset: 88,
466
+ byteLength: 4,
467
+ },
468
+ {
469
+ name: 'thirdPhaseStartYear',
470
+ type: 'uint32',
471
+ offset: 92,
472
+ byteLength: 4,
473
+ },
474
+ {
475
+ name: 'thirdPhaseStartMonth',
476
+ type: 'uint32',
477
+ offset: 96,
478
+ byteLength: 4,
479
+ },
480
+ {
481
+ name: 'thirdPhaseStartDay',
482
+ type: 'uint32',
483
+ offset: 100,
484
+ byteLength: 4,
485
+ },
486
+ {
487
+ name: 'thirdPhaseStartHour',
488
+ type: 'uint32',
489
+ offset: 104,
490
+ byteLength: 4,
491
+ },
492
+ {
493
+ name: 'thirdPhaseEndYear',
494
+ type: 'uint32',
495
+ offset: 108,
496
+ byteLength: 4,
497
+ },
498
+ {
499
+ name: 'thirdPhaseEndMonth',
500
+ type: 'uint32',
501
+ offset: 112,
502
+ byteLength: 4,
503
+ },
504
+ {
505
+ name: 'thirdPhaseEndDay',
506
+ type: 'uint32',
507
+ offset: 116,
508
+ byteLength: 4,
509
+ },
510
+ {
511
+ name: 'thirdPhaseEndHour',
512
+ type: 'uint32',
513
+ offset: 120,
514
+ byteLength: 4,
515
+ },
516
+ {
517
+ name: 'listingStartYear',
518
+ type: 'uint32',
519
+ offset: 124,
520
+ byteLength: 4,
521
+ },
522
+ {
523
+ name: 'listingStartMonth',
524
+ type: 'uint32',
525
+ offset: 128,
526
+ byteLength: 4,
527
+ },
528
+ {
529
+ name: 'listingStartDay',
530
+ type: 'uint32',
531
+ offset: 132,
532
+ byteLength: 4,
533
+ },
534
+ {
535
+ name: 'listingStartHour',
536
+ type: 'uint32',
537
+ offset: 136,
538
+ byteLength: 4,
539
+ },
540
+ {
541
+ name: 'cliffEndYear',
542
+ type: 'uint32',
543
+ offset: 140,
544
+ byteLength: 4,
545
+ },
546
+ {
547
+ name: 'cliffEndMonth',
548
+ type: 'uint32',
549
+ offset: 144,
550
+ byteLength: 4,
551
+ },
552
+ {
553
+ name: 'cliffEndDay',
554
+ type: 'uint32',
555
+ offset: 148,
556
+ byteLength: 4,
557
+ },
558
+ {
559
+ name: 'cliffEndHour',
560
+ type: 'uint32',
561
+ offset: 152,
562
+ byteLength: 4,
563
+ },
564
+ {
565
+ name: 'vestingEndYear',
566
+ type: 'uint32',
567
+ offset: 156,
568
+ byteLength: 4,
569
+ },
570
+ {
571
+ name: 'vestingEndMonth',
572
+ type: 'uint32',
573
+ offset: 160,
574
+ byteLength: 4,
575
+ },
576
+ {
577
+ name: 'vestingEndDay',
578
+ type: 'uint32',
579
+ offset: 164,
580
+ byteLength: 4,
581
+ },
582
+ {
583
+ name: 'vestingEndHour',
584
+ type: 'uint32',
585
+ offset: 168,
586
+ byteLength: 4,
587
+ },
588
+ {
589
+ name: 'threshold',
590
+ type: 'uint8',
591
+ offset: 172,
592
+ byteLength: 1,
593
+ },
594
+ {
595
+ name: 'TGE',
596
+ type: 'uint8',
597
+ offset: 173,
598
+ byteLength: 1,
599
+ },
600
+ {
601
+ name: 'stepOfVesting',
602
+ type: 'uint8',
603
+ offset: 174,
604
+ byteLength: 1,
605
+ },
606
+ ];
607
+ export function buildNostromoCreateFundraisingInput(input, identityToPublicKey = (_identity) => new Uint8Array(32)) {
608
+ return buildPayload(NOSTROMO_CREATE_FUNDRAISING_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
609
+ }
610
+ export const NOSTROMO_INVEST_IN_PROJECT_INPUT_TYPE = 6;
611
+ const NOSTROMO_INVEST_IN_PROJECT_INPUT_FIELDS = [
612
+ {
613
+ name: 'indexOfFundraising',
614
+ type: 'uint32',
615
+ offset: 0,
616
+ byteLength: 4,
617
+ },
618
+ ];
619
+ export function buildNostromoInvestInProjectInput(input, identityToPublicKey = (_identity) => new Uint8Array(32)) {
620
+ return buildPayload(NOSTROMO_INVEST_IN_PROJECT_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
621
+ }
622
+ export const NOSTROMO_CLAIM_TOKEN_INPUT_TYPE = 7;
623
+ const NOSTROMO_CLAIM_TOKEN_INPUT_FIELDS = [
624
+ {
625
+ name: 'amount',
626
+ type: 'uint64',
627
+ offset: 0,
628
+ byteLength: 8,
629
+ },
630
+ {
631
+ name: 'indexOfFundraising',
632
+ type: 'uint32',
633
+ offset: 8,
634
+ byteLength: 4,
635
+ },
636
+ ];
637
+ export function buildNostromoClaimTokenInput(input, identityToPublicKey = (_identity) => new Uint8Array(32)) {
638
+ return buildPayload(NOSTROMO_CLAIM_TOKEN_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
639
+ }
640
+ const NOSTROMO_CLAIM_TOKEN_OUTPUT_FIELDS = [
641
+ {
642
+ name: 'claimedAmount',
643
+ type: 'uint64',
644
+ offset: 0,
645
+ byteLength: 8,
646
+ },
647
+ ];
648
+ export function decodeNostromoClaimTokenOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
649
+ return decodePayload(data, NOSTROMO_CLAIM_TOKEN_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
650
+ }
651
+ export const NOSTROMO_UPGRADE_TIER_INPUT_TYPE = 8;
652
+ const NOSTROMO_UPGRADE_TIER_INPUT_FIELDS = [
653
+ {
654
+ name: 'newTierLevel',
655
+ type: 'uint32',
656
+ offset: 0,
657
+ byteLength: 4,
658
+ },
659
+ ];
660
+ export function buildNostromoUpgradeTierInput(input, identityToPublicKey = (_identity) => new Uint8Array(32)) {
661
+ return buildPayload(NOSTROMO_UPGRADE_TIER_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
662
+ }
663
+ export const NOSTROMO_TRANSFER_SHARE_MANAGEMENT_RIGHTS_INPUT_TYPE = 9;
664
+ const NOSTROMO_TRANSFER_SHARE_MANAGEMENT_RIGHTS_INPUT_FIELDS = [
665
+ {
666
+ name: 'asset',
667
+ type: 'struct',
668
+ offset: 0,
669
+ byteLength: 40,
670
+ structRef: 'Asset',
671
+ },
672
+ {
673
+ name: 'numberOfShares',
674
+ type: 'sint64',
675
+ offset: 40,
676
+ byteLength: 8,
677
+ },
678
+ {
679
+ name: 'newManagingContractIndex',
680
+ type: 'uint32',
681
+ offset: 48,
682
+ byteLength: 4,
683
+ },
684
+ ];
685
+ export function buildNostromoTransferShareManagementRightsInput(input, identityToPublicKey = (_identity) => new Uint8Array(32)) {
686
+ return buildPayload(NOSTROMO_TRANSFER_SHARE_MANAGEMENT_RIGHTS_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
687
+ }
688
+ const NOSTROMO_TRANSFER_SHARE_MANAGEMENT_RIGHTS_OUTPUT_FIELDS = [
689
+ {
690
+ name: 'transferredNumberOfShares',
691
+ type: 'sint64',
692
+ offset: 0,
693
+ byteLength: 8,
694
+ },
695
+ ];
696
+ export function decodeNostromoTransferShareManagementRightsOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
697
+ return decodePayload(data, NOSTROMO_TRANSFER_SHARE_MANAGEMENT_RIGHTS_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
698
+ }
699
+ export const NOSTROMO_GET_STATS_INPUT_TYPE = 10;
700
+ export const NOSTROMO_GET_STATS_INPUT_SIZE = 0;
701
+ const NOSTROMO_GET_STATS_OUTPUT_FIELDS = [
702
+ {
703
+ name: 'epochRevenue',
704
+ type: 'uint64',
705
+ offset: 0,
706
+ byteLength: 8,
707
+ },
708
+ {
709
+ name: 'numberOfRegister',
710
+ type: 'uint32',
711
+ offset: 8,
712
+ byteLength: 4,
713
+ },
714
+ ];
715
+ export function decodeNostromoGetStatsOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
716
+ return decodePayload(data, NOSTROMO_GET_STATS_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
717
+ }
718
+ export async function nostromoGetStats(live, options) {
719
+ return callContractFunction({
720
+ live,
721
+ contractIndex: NOSTROMO_CONTRACT_INDEX,
722
+ inputType: NOSTROMO_GET_STATS_INPUT_TYPE,
723
+ inputSize: NOSTROMO_GET_STATS_INPUT_SIZE,
724
+ inputFields: [],
725
+ outputFields: NOSTROMO_GET_STATS_OUTPUT_FIELDS,
726
+ structs: STRUCTS,
727
+ input: {},
728
+ ...options,
729
+ });
730
+ }
731
+ export const NOSTROMO_GET_TIER_LEVEL_BY_USER_INPUT_TYPE = 11;
732
+ export const NOSTROMO_GET_TIER_LEVEL_BY_USER_INPUT_SIZE = 32;
733
+ const NOSTROMO_GET_TIER_LEVEL_BY_USER_INPUT_FIELDS = [
734
+ {
735
+ name: 'userId',
736
+ type: 'id',
737
+ offset: 0,
738
+ byteLength: 32,
739
+ },
740
+ ];
741
+ export function buildNostromoGetTierLevelByUserInput(input, identityToPublicKey = (_identity) => new Uint8Array(32)) {
742
+ return buildPayload(NOSTROMO_GET_TIER_LEVEL_BY_USER_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
743
+ }
744
+ const NOSTROMO_GET_TIER_LEVEL_BY_USER_OUTPUT_FIELDS = [
745
+ {
746
+ name: 'tierLevel',
747
+ type: 'uint8',
748
+ offset: 0,
749
+ byteLength: 1,
750
+ },
751
+ ];
752
+ export function decodeNostromoGetTierLevelByUserOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
753
+ return decodePayload(data, NOSTROMO_GET_TIER_LEVEL_BY_USER_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
754
+ }
755
+ export async function nostromoGetTierLevelByUser(live, input, options) {
756
+ return callContractFunction({
757
+ live,
758
+ contractIndex: NOSTROMO_CONTRACT_INDEX,
759
+ inputType: NOSTROMO_GET_TIER_LEVEL_BY_USER_INPUT_TYPE,
760
+ inputSize: NOSTROMO_GET_TIER_LEVEL_BY_USER_INPUT_SIZE,
761
+ inputFields: NOSTROMO_GET_TIER_LEVEL_BY_USER_INPUT_FIELDS,
762
+ outputFields: NOSTROMO_GET_TIER_LEVEL_BY_USER_OUTPUT_FIELDS,
763
+ structs: STRUCTS,
764
+ input: input,
765
+ ...options,
766
+ });
767
+ }
768
+ export const NOSTROMO_GET_USER_VOTE_STATUS_INPUT_TYPE = 12;
769
+ export const NOSTROMO_GET_USER_VOTE_STATUS_INPUT_SIZE = 32;
770
+ const NOSTROMO_GET_USER_VOTE_STATUS_INPUT_FIELDS = [
771
+ {
772
+ name: 'userId',
773
+ type: 'id',
774
+ offset: 0,
775
+ byteLength: 32,
776
+ },
777
+ ];
778
+ export function buildNostromoGetUserVoteStatusInput(input, identityToPublicKey = (_identity) => new Uint8Array(32)) {
779
+ return buildPayload(NOSTROMO_GET_USER_VOTE_STATUS_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
780
+ }
781
+ const NOSTROMO_GET_USER_VOTE_STATUS_OUTPUT_FIELDS = [
782
+ {
783
+ name: 'numberOfVotedProjects',
784
+ type: 'uint32',
785
+ offset: 0,
786
+ byteLength: 4,
787
+ },
788
+ {
789
+ name: 'projectIndexList',
790
+ type: 'array',
791
+ offset: 4,
792
+ byteLength: 512,
793
+ arrayLength: 128,
794
+ arrayItemType: 'uint32',
795
+ arrayItemByteLength: 4,
796
+ },
797
+ ];
798
+ export function decodeNostromoGetUserVoteStatusOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
799
+ return decodePayload(data, NOSTROMO_GET_USER_VOTE_STATUS_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
800
+ }
801
+ export async function nostromoGetUserVoteStatus(live, input, options) {
802
+ return callContractFunction({
803
+ live,
804
+ contractIndex: NOSTROMO_CONTRACT_INDEX,
805
+ inputType: NOSTROMO_GET_USER_VOTE_STATUS_INPUT_TYPE,
806
+ inputSize: NOSTROMO_GET_USER_VOTE_STATUS_INPUT_SIZE,
807
+ inputFields: NOSTROMO_GET_USER_VOTE_STATUS_INPUT_FIELDS,
808
+ outputFields: NOSTROMO_GET_USER_VOTE_STATUS_OUTPUT_FIELDS,
809
+ structs: STRUCTS,
810
+ input: input,
811
+ ...options,
812
+ });
813
+ }
814
+ export const NOSTROMO_CHECK_TOKEN_CREATABILITY_INPUT_TYPE = 13;
815
+ export const NOSTROMO_CHECK_TOKEN_CREATABILITY_INPUT_SIZE = 8;
816
+ const NOSTROMO_CHECK_TOKEN_CREATABILITY_INPUT_FIELDS = [
817
+ {
818
+ name: 'tokenName',
819
+ type: 'uint64',
820
+ offset: 0,
821
+ byteLength: 8,
822
+ },
823
+ ];
824
+ export function buildNostromoCheckTokenCreatabilityInput(input, identityToPublicKey = (_identity) => new Uint8Array(32)) {
825
+ return buildPayload(NOSTROMO_CHECK_TOKEN_CREATABILITY_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
826
+ }
827
+ const NOSTROMO_CHECK_TOKEN_CREATABILITY_OUTPUT_FIELDS = [
828
+ {
829
+ name: 'result',
830
+ type: 'uint8',
831
+ offset: 0,
832
+ byteLength: 1,
833
+ },
834
+ ];
835
+ export function decodeNostromoCheckTokenCreatabilityOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
836
+ return decodePayload(data, NOSTROMO_CHECK_TOKEN_CREATABILITY_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
837
+ }
838
+ export async function nostromoCheckTokenCreatability(live, input, options) {
839
+ return callContractFunction({
840
+ live,
841
+ contractIndex: NOSTROMO_CONTRACT_INDEX,
842
+ inputType: NOSTROMO_CHECK_TOKEN_CREATABILITY_INPUT_TYPE,
843
+ inputSize: NOSTROMO_CHECK_TOKEN_CREATABILITY_INPUT_SIZE,
844
+ inputFields: NOSTROMO_CHECK_TOKEN_CREATABILITY_INPUT_FIELDS,
845
+ outputFields: NOSTROMO_CHECK_TOKEN_CREATABILITY_OUTPUT_FIELDS,
846
+ structs: STRUCTS,
847
+ input: input,
848
+ ...options,
849
+ });
850
+ }
851
+ export const NOSTROMO_GET_NUMBER_OF_INVESTED_PROJECTS_INPUT_TYPE = 14;
852
+ export const NOSTROMO_GET_NUMBER_OF_INVESTED_PROJECTS_INPUT_SIZE = 32;
853
+ const NOSTROMO_GET_NUMBER_OF_INVESTED_PROJECTS_INPUT_FIELDS = [
854
+ {
855
+ name: 'userId',
856
+ type: 'id',
857
+ offset: 0,
858
+ byteLength: 32,
859
+ },
860
+ ];
861
+ export function buildNostromoGetNumberOfInvestedProjectsInput(input, identityToPublicKey = (_identity) => new Uint8Array(32)) {
862
+ return buildPayload(NOSTROMO_GET_NUMBER_OF_INVESTED_PROJECTS_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
863
+ }
864
+ const NOSTROMO_GET_NUMBER_OF_INVESTED_PROJECTS_OUTPUT_FIELDS = [
865
+ {
866
+ name: 'numberOfInvestedProjects',
867
+ type: 'uint32',
868
+ offset: 0,
869
+ byteLength: 4,
870
+ },
871
+ ];
872
+ export function decodeNostromoGetNumberOfInvestedProjectsOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
873
+ return decodePayload(data, NOSTROMO_GET_NUMBER_OF_INVESTED_PROJECTS_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
874
+ }
875
+ export async function nostromoGetNumberOfInvestedProjects(live, input, options) {
876
+ return callContractFunction({
877
+ live,
878
+ contractIndex: NOSTROMO_CONTRACT_INDEX,
879
+ inputType: NOSTROMO_GET_NUMBER_OF_INVESTED_PROJECTS_INPUT_TYPE,
880
+ inputSize: NOSTROMO_GET_NUMBER_OF_INVESTED_PROJECTS_INPUT_SIZE,
881
+ inputFields: NOSTROMO_GET_NUMBER_OF_INVESTED_PROJECTS_INPUT_FIELDS,
882
+ outputFields: NOSTROMO_GET_NUMBER_OF_INVESTED_PROJECTS_OUTPUT_FIELDS,
883
+ structs: STRUCTS,
884
+ input: input,
885
+ ...options,
886
+ });
887
+ }
888
+ export const NOSTROMO_GET_PROJECT_BY_INDEX_INPUT_TYPE = 15;
889
+ export const NOSTROMO_GET_PROJECT_BY_INDEX_INPUT_SIZE = 4;
890
+ const NOSTROMO_GET_PROJECT_BY_INDEX_INPUT_FIELDS = [
891
+ {
892
+ name: 'indexOfProject',
893
+ type: 'uint32',
894
+ offset: 0,
895
+ byteLength: 4,
896
+ },
897
+ ];
898
+ export function buildNostromoGetProjectByIndexInput(input, identityToPublicKey = (_identity) => new Uint8Array(32)) {
899
+ return buildPayload(NOSTROMO_GET_PROJECT_BY_INDEX_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
900
+ }
901
+ const NOSTROMO_GET_PROJECT_BY_INDEX_OUTPUT_FIELDS = [
902
+ {
903
+ name: 'project',
904
+ type: 'struct',
905
+ offset: 0,
906
+ byteLength: 65,
907
+ structRef: 'projectInfo',
908
+ },
909
+ ];
910
+ export function decodeNostromoGetProjectByIndexOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
911
+ return decodePayload(data, NOSTROMO_GET_PROJECT_BY_INDEX_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
912
+ }
913
+ export async function nostromoGetProjectByIndex(live, input, options) {
914
+ return callContractFunction({
915
+ live,
916
+ contractIndex: NOSTROMO_CONTRACT_INDEX,
917
+ inputType: NOSTROMO_GET_PROJECT_BY_INDEX_INPUT_TYPE,
918
+ inputSize: NOSTROMO_GET_PROJECT_BY_INDEX_INPUT_SIZE,
919
+ inputFields: NOSTROMO_GET_PROJECT_BY_INDEX_INPUT_FIELDS,
920
+ outputFields: NOSTROMO_GET_PROJECT_BY_INDEX_OUTPUT_FIELDS,
921
+ structs: STRUCTS,
922
+ input: input,
923
+ ...options,
924
+ });
925
+ }
926
+ export const NOSTROMO_GET_FUNDARASING_BY_INDEX_INPUT_TYPE = 16;
927
+ export const NOSTROMO_GET_FUNDARASING_BY_INDEX_INPUT_SIZE = 4;
928
+ const NOSTROMO_GET_FUNDARASING_BY_INDEX_INPUT_FIELDS = [
929
+ {
930
+ name: 'indexOfFundarasing',
931
+ type: 'uint32',
932
+ offset: 0,
933
+ byteLength: 4,
934
+ },
935
+ ];
936
+ export function buildNostromoGetFundarasingByIndexInput(input, identityToPublicKey = (_identity) => new Uint8Array(32)) {
937
+ return buildPayload(NOSTROMO_GET_FUNDARASING_BY_INDEX_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
938
+ }
939
+ const NOSTROMO_GET_FUNDARASING_BY_INDEX_OUTPUT_FIELDS = [
940
+ {
941
+ name: 'fundarasing',
942
+ type: 'struct',
943
+ offset: 0,
944
+ byteLength: 76,
945
+ structRef: 'fundaraisingInfo',
946
+ },
947
+ ];
948
+ export function decodeNostromoGetFundarasingByIndexOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
949
+ return decodePayload(data, NOSTROMO_GET_FUNDARASING_BY_INDEX_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
950
+ }
951
+ export async function nostromoGetFundarasingByIndex(live, input, options) {
952
+ return callContractFunction({
953
+ live,
954
+ contractIndex: NOSTROMO_CONTRACT_INDEX,
955
+ inputType: NOSTROMO_GET_FUNDARASING_BY_INDEX_INPUT_TYPE,
956
+ inputSize: NOSTROMO_GET_FUNDARASING_BY_INDEX_INPUT_SIZE,
957
+ inputFields: NOSTROMO_GET_FUNDARASING_BY_INDEX_INPUT_FIELDS,
958
+ outputFields: NOSTROMO_GET_FUNDARASING_BY_INDEX_OUTPUT_FIELDS,
959
+ structs: STRUCTS,
960
+ input: input,
961
+ ...options,
962
+ });
963
+ }
964
+ export const NOSTROMO_GET_PROJECT_INDEX_LIST_BY_CREATOR_INPUT_TYPE = 17;
965
+ export const NOSTROMO_GET_PROJECT_INDEX_LIST_BY_CREATOR_INPUT_SIZE = 32;
966
+ const NOSTROMO_GET_PROJECT_INDEX_LIST_BY_CREATOR_INPUT_FIELDS = [
967
+ {
968
+ name: 'creator',
969
+ type: 'id',
970
+ offset: 0,
971
+ byteLength: 32,
972
+ },
973
+ ];
974
+ export function buildNostromoGetProjectIndexListByCreatorInput(input, identityToPublicKey = (_identity) => new Uint8Array(32)) {
975
+ return buildPayload(NOSTROMO_GET_PROJECT_INDEX_LIST_BY_CREATOR_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
976
+ }
977
+ const NOSTROMO_GET_PROJECT_INDEX_LIST_BY_CREATOR_OUTPUT_FIELDS = [
978
+ {
979
+ name: 'indexListForProjects',
980
+ type: 'array',
981
+ offset: 0,
982
+ byteLength: 512,
983
+ arrayLength: 128,
984
+ arrayItemType: 'uint32',
985
+ arrayItemByteLength: 4,
986
+ },
987
+ ];
988
+ export function decodeNostromoGetProjectIndexListByCreatorOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
989
+ return decodePayload(data, NOSTROMO_GET_PROJECT_INDEX_LIST_BY_CREATOR_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
990
+ }
991
+ export async function nostromoGetProjectIndexListByCreator(live, input, options) {
992
+ return callContractFunction({
993
+ live,
994
+ contractIndex: NOSTROMO_CONTRACT_INDEX,
995
+ inputType: NOSTROMO_GET_PROJECT_INDEX_LIST_BY_CREATOR_INPUT_TYPE,
996
+ inputSize: NOSTROMO_GET_PROJECT_INDEX_LIST_BY_CREATOR_INPUT_SIZE,
997
+ inputFields: NOSTROMO_GET_PROJECT_INDEX_LIST_BY_CREATOR_INPUT_FIELDS,
998
+ outputFields: NOSTROMO_GET_PROJECT_INDEX_LIST_BY_CREATOR_OUTPUT_FIELDS,
999
+ structs: STRUCTS,
1000
+ input: input,
1001
+ ...options,
1002
+ });
1003
+ }
1004
+ export const NOSTROMO_GET_INFO_USER_INVESTED_INPUT_TYPE = 18;
1005
+ export const NOSTROMO_GET_INFO_USER_INVESTED_INPUT_SIZE = 32;
1006
+ const NOSTROMO_GET_INFO_USER_INVESTED_INPUT_FIELDS = [
1007
+ {
1008
+ name: 'investorId',
1009
+ type: 'id',
1010
+ offset: 0,
1011
+ byteLength: 32,
1012
+ },
1013
+ ];
1014
+ export function buildNostromoGetInfoUserInvestedInput(input, identityToPublicKey = (_identity) => new Uint8Array(32)) {
1015
+ return buildPayload(NOSTROMO_GET_INFO_USER_INVESTED_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
1016
+ }
1017
+ const NOSTROMO_GET_INFO_USER_INVESTED_OUTPUT_FIELDS = [
1018
+ {
1019
+ name: 'listUserInvested',
1020
+ type: 'array',
1021
+ offset: 0,
1022
+ byteLength: 2560,
1023
+ arrayLength: 128,
1024
+ arrayItemByteLength: 20,
1025
+ arrayItemStructRef: 'investInfo',
1026
+ },
1027
+ ];
1028
+ export function decodeNostromoGetInfoUserInvestedOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
1029
+ return decodePayload(data, NOSTROMO_GET_INFO_USER_INVESTED_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
1030
+ }
1031
+ export async function nostromoGetInfoUserInvested(live, input, options) {
1032
+ return callContractFunction({
1033
+ live,
1034
+ contractIndex: NOSTROMO_CONTRACT_INDEX,
1035
+ inputType: NOSTROMO_GET_INFO_USER_INVESTED_INPUT_TYPE,
1036
+ inputSize: NOSTROMO_GET_INFO_USER_INVESTED_INPUT_SIZE,
1037
+ inputFields: NOSTROMO_GET_INFO_USER_INVESTED_INPUT_FIELDS,
1038
+ outputFields: NOSTROMO_GET_INFO_USER_INVESTED_OUTPUT_FIELDS,
1039
+ structs: STRUCTS,
1040
+ input: input,
1041
+ ...options,
1042
+ });
1043
+ }
1044
+ export const NOSTROMO_GET_MAX_CLAIM_AMOUNT_INPUT_TYPE = 19;
1045
+ export const NOSTROMO_GET_MAX_CLAIM_AMOUNT_INPUT_SIZE = 36;
1046
+ const NOSTROMO_GET_MAX_CLAIM_AMOUNT_INPUT_FIELDS = [
1047
+ {
1048
+ name: 'investorId',
1049
+ type: 'id',
1050
+ offset: 0,
1051
+ byteLength: 32,
1052
+ },
1053
+ {
1054
+ name: 'indexOfFundraising',
1055
+ type: 'uint32',
1056
+ offset: 32,
1057
+ byteLength: 4,
1058
+ },
1059
+ ];
1060
+ export function buildNostromoGetMaxClaimAmountInput(input, identityToPublicKey = (_identity) => new Uint8Array(32)) {
1061
+ return buildPayload(NOSTROMO_GET_MAX_CLAIM_AMOUNT_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
1062
+ }
1063
+ const NOSTROMO_GET_MAX_CLAIM_AMOUNT_OUTPUT_FIELDS = [
1064
+ {
1065
+ name: 'amount',
1066
+ type: 'uint64',
1067
+ offset: 0,
1068
+ byteLength: 8,
1069
+ },
1070
+ ];
1071
+ export function decodeNostromoGetMaxClaimAmountOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
1072
+ return decodePayload(data, NOSTROMO_GET_MAX_CLAIM_AMOUNT_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
1073
+ }
1074
+ export async function nostromoGetMaxClaimAmount(live, input, options) {
1075
+ return callContractFunction({
1076
+ live,
1077
+ contractIndex: NOSTROMO_CONTRACT_INDEX,
1078
+ inputType: NOSTROMO_GET_MAX_CLAIM_AMOUNT_INPUT_TYPE,
1079
+ inputSize: NOSTROMO_GET_MAX_CLAIM_AMOUNT_INPUT_SIZE,
1080
+ inputFields: NOSTROMO_GET_MAX_CLAIM_AMOUNT_INPUT_FIELDS,
1081
+ outputFields: NOSTROMO_GET_MAX_CLAIM_AMOUNT_OUTPUT_FIELDS,
1082
+ structs: STRUCTS,
1083
+ input: input,
1084
+ ...options,
1085
+ });
1086
+ }
1087
+ export const nostromo = {
1088
+ contractIndex: NOSTROMO_CONTRACT_INDEX,
1089
+ getStats: nostromoGetStats,
1090
+ getTierLevelByUser: nostromoGetTierLevelByUser,
1091
+ getUserVoteStatus: nostromoGetUserVoteStatus,
1092
+ checkTokenCreatability: nostromoCheckTokenCreatability,
1093
+ getNumberOfInvestedProjects: nostromoGetNumberOfInvestedProjects,
1094
+ getProjectByIndex: nostromoGetProjectByIndex,
1095
+ getFundarasingByIndex: nostromoGetFundarasingByIndex,
1096
+ getProjectIndexListByCreator: nostromoGetProjectIndexListByCreator,
1097
+ getInfoUserInvested: nostromoGetInfoUserInvested,
1098
+ getMaxClaimAmount: nostromoGetMaxClaimAmount,
1099
+ buildRegisterInTierInput: buildNostromoRegisterInTierInput,
1100
+ decodeRegisterInTierOutput: decodeNostromoRegisterInTierOutput,
1101
+ decodeLogoutFromTierOutput: decodeNostromoLogoutFromTierOutput,
1102
+ buildCreateProjectInput: buildNostromoCreateProjectInput,
1103
+ decodeCreateProjectOutput: decodeNostromoCreateProjectOutput,
1104
+ buildVoteInProjectInput: buildNostromoVoteInProjectInput,
1105
+ buildCreateFundraisingInput: buildNostromoCreateFundraisingInput,
1106
+ buildInvestInProjectInput: buildNostromoInvestInProjectInput,
1107
+ buildClaimTokenInput: buildNostromoClaimTokenInput,
1108
+ decodeClaimTokenOutput: decodeNostromoClaimTokenOutput,
1109
+ buildUpgradeTierInput: buildNostromoUpgradeTierInput,
1110
+ buildTransferShareManagementRightsInput: buildNostromoTransferShareManagementRightsInput,
1111
+ decodeTransferShareManagementRightsOutput: decodeNostromoTransferShareManagementRightsOutput,
1112
+ };
1113
+ //# sourceMappingURL=nostromo.js.map