@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,1486 @@
1
+ import { buildPayload, decodePayload } from '@qubic.org/registry';
2
+ import { callContractFunction } from '../call-contract.js';
3
+ export const QBAY_CONTRACT_INDEX = 12;
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
+ };
24
+ export const QBAY_SETTING_CFB_AND_QUBIC_PRICE_INPUT_TYPE = 1;
25
+ const QBAY_SETTING_CFB_AND_QUBIC_PRICE_INPUT_FIELDS = [
26
+ {
27
+ name: 'CFBPrice',
28
+ type: 'uint64',
29
+ offset: 0,
30
+ byteLength: 8,
31
+ },
32
+ {
33
+ name: 'QubicPrice',
34
+ type: 'uint64',
35
+ offset: 8,
36
+ byteLength: 8,
37
+ },
38
+ ];
39
+ export function buildQbaySettingCFBAndQubicPriceInput(input, identityToPublicKey = (_identity) => new Uint8Array(32)) {
40
+ return buildPayload(QBAY_SETTING_CFB_AND_QUBIC_PRICE_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
41
+ }
42
+ const QBAY_SETTING_CFB_AND_QUBIC_PRICE_OUTPUT_FIELDS = [
43
+ {
44
+ name: 'returnCode',
45
+ type: 'uint32',
46
+ offset: 0,
47
+ byteLength: 4,
48
+ },
49
+ ];
50
+ export function decodeQbaySettingCFBAndQubicPriceOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
51
+ return decodePayload(data, QBAY_SETTING_CFB_AND_QUBIC_PRICE_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
52
+ }
53
+ export const QBAY_CREATE_COLLECTION_INPUT_TYPE = 2;
54
+ const QBAY_CREATE_COLLECTION_INPUT_FIELDS = [
55
+ {
56
+ name: 'priceForDropMint',
57
+ type: 'uint64',
58
+ offset: 0,
59
+ byteLength: 8,
60
+ },
61
+ {
62
+ name: 'volume',
63
+ type: 'uint32',
64
+ offset: 8,
65
+ byteLength: 4,
66
+ },
67
+ {
68
+ name: 'royalty',
69
+ type: 'uint32',
70
+ offset: 12,
71
+ byteLength: 4,
72
+ },
73
+ {
74
+ name: 'maxSizePerOneId',
75
+ type: 'uint32',
76
+ offset: 16,
77
+ byteLength: 4,
78
+ },
79
+ {
80
+ name: 'URI',
81
+ type: 'array',
82
+ offset: 20,
83
+ byteLength: 64,
84
+ arrayLength: 64,
85
+ arrayItemType: 'uint8',
86
+ arrayItemByteLength: 1,
87
+ },
88
+ {
89
+ name: 'typeOfCollection',
90
+ type: 'uint8',
91
+ offset: 84,
92
+ byteLength: 1,
93
+ },
94
+ ];
95
+ export function buildQbayCreateCollectionInput(input, identityToPublicKey = (_identity) => new Uint8Array(32)) {
96
+ return buildPayload(QBAY_CREATE_COLLECTION_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
97
+ }
98
+ const QBAY_CREATE_COLLECTION_OUTPUT_FIELDS = [
99
+ {
100
+ name: 'returnCode',
101
+ type: 'uint32',
102
+ offset: 0,
103
+ byteLength: 4,
104
+ },
105
+ ];
106
+ export function decodeQbayCreateCollectionOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
107
+ return decodePayload(data, QBAY_CREATE_COLLECTION_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
108
+ }
109
+ export const QBAY_MINT_INPUT_TYPE = 3;
110
+ const QBAY_MINT_INPUT_FIELDS = [
111
+ {
112
+ name: 'royalty',
113
+ type: 'uint32',
114
+ offset: 0,
115
+ byteLength: 4,
116
+ },
117
+ {
118
+ name: 'collectionId',
119
+ type: 'uint32',
120
+ offset: 4,
121
+ byteLength: 4,
122
+ },
123
+ {
124
+ name: 'URI',
125
+ type: 'array',
126
+ offset: 8,
127
+ byteLength: 64,
128
+ arrayLength: 64,
129
+ arrayItemType: 'uint8',
130
+ arrayItemByteLength: 1,
131
+ },
132
+ {
133
+ name: 'typeOfMint',
134
+ type: 'uint8',
135
+ offset: 72,
136
+ byteLength: 1,
137
+ },
138
+ ];
139
+ export function buildQbayMintInput(input, identityToPublicKey = (_identity) => new Uint8Array(32)) {
140
+ return buildPayload(QBAY_MINT_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
141
+ }
142
+ const QBAY_MINT_OUTPUT_FIELDS = [
143
+ {
144
+ name: 'returnCode',
145
+ type: 'uint32',
146
+ offset: 0,
147
+ byteLength: 4,
148
+ },
149
+ ];
150
+ export function decodeQbayMintOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
151
+ return decodePayload(data, QBAY_MINT_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
152
+ }
153
+ export const QBAY_MINT_OF_DROP_INPUT_TYPE = 4;
154
+ const QBAY_MINT_OF_DROP_INPUT_FIELDS = [
155
+ {
156
+ name: 'collectionId',
157
+ type: 'uint32',
158
+ offset: 0,
159
+ byteLength: 4,
160
+ },
161
+ {
162
+ name: 'URI',
163
+ type: 'array',
164
+ offset: 4,
165
+ byteLength: 64,
166
+ arrayLength: 64,
167
+ arrayItemType: 'uint8',
168
+ arrayItemByteLength: 1,
169
+ },
170
+ ];
171
+ export function buildQbayMintOfDropInput(input, identityToPublicKey = (_identity) => new Uint8Array(32)) {
172
+ return buildPayload(QBAY_MINT_OF_DROP_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
173
+ }
174
+ const QBAY_MINT_OF_DROP_OUTPUT_FIELDS = [
175
+ {
176
+ name: 'returnCode',
177
+ type: 'uint32',
178
+ offset: 0,
179
+ byteLength: 4,
180
+ },
181
+ ];
182
+ export function decodeQbayMintOfDropOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
183
+ return decodePayload(data, QBAY_MINT_OF_DROP_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
184
+ }
185
+ export const QBAY_TRANSFER_INPUT_TYPE = 5;
186
+ const QBAY_TRANSFER_INPUT_FIELDS = [
187
+ {
188
+ name: 'receiver',
189
+ type: 'id',
190
+ offset: 0,
191
+ byteLength: 32,
192
+ },
193
+ {
194
+ name: 'NFTid',
195
+ type: 'uint32',
196
+ offset: 32,
197
+ byteLength: 4,
198
+ },
199
+ ];
200
+ export function buildQbayTransferInput(input, identityToPublicKey = (_identity) => new Uint8Array(32)) {
201
+ return buildPayload(QBAY_TRANSFER_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
202
+ }
203
+ const QBAY_TRANSFER_OUTPUT_FIELDS = [
204
+ {
205
+ name: 'returnCode',
206
+ type: 'uint32',
207
+ offset: 0,
208
+ byteLength: 4,
209
+ },
210
+ ];
211
+ export function decodeQbayTransferOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
212
+ return decodePayload(data, QBAY_TRANSFER_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
213
+ }
214
+ export const QBAY_LIST_IN_MARKET_INPUT_TYPE = 6;
215
+ const QBAY_LIST_IN_MARKET_INPUT_FIELDS = [
216
+ {
217
+ name: 'price',
218
+ type: 'uint64',
219
+ offset: 0,
220
+ byteLength: 8,
221
+ },
222
+ {
223
+ name: 'NFTid',
224
+ type: 'uint32',
225
+ offset: 8,
226
+ byteLength: 4,
227
+ },
228
+ ];
229
+ export function buildQbayListInMarketInput(input, identityToPublicKey = (_identity) => new Uint8Array(32)) {
230
+ return buildPayload(QBAY_LIST_IN_MARKET_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
231
+ }
232
+ const QBAY_LIST_IN_MARKET_OUTPUT_FIELDS = [
233
+ {
234
+ name: 'returnCode',
235
+ type: 'uint32',
236
+ offset: 0,
237
+ byteLength: 4,
238
+ },
239
+ ];
240
+ export function decodeQbayListInMarketOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
241
+ return decodePayload(data, QBAY_LIST_IN_MARKET_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
242
+ }
243
+ export const QBAY_BUY_INPUT_TYPE = 7;
244
+ const QBAY_BUY_INPUT_FIELDS = [
245
+ {
246
+ name: 'NFTid',
247
+ type: 'uint32',
248
+ offset: 0,
249
+ byteLength: 4,
250
+ },
251
+ {
252
+ name: 'methodOfPayment',
253
+ type: 'uint8',
254
+ offset: 4,
255
+ byteLength: 1,
256
+ },
257
+ ];
258
+ export function buildQbayBuyInput(input, identityToPublicKey = (_identity) => new Uint8Array(32)) {
259
+ return buildPayload(QBAY_BUY_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
260
+ }
261
+ const QBAY_BUY_OUTPUT_FIELDS = [
262
+ {
263
+ name: 'returnCode',
264
+ type: 'uint32',
265
+ offset: 0,
266
+ byteLength: 4,
267
+ },
268
+ ];
269
+ export function decodeQbayBuyOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
270
+ return decodePayload(data, QBAY_BUY_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
271
+ }
272
+ export const QBAY_CANCEL_SALE_INPUT_TYPE = 8;
273
+ const QBAY_CANCEL_SALE_INPUT_FIELDS = [
274
+ {
275
+ name: 'NFTid',
276
+ type: 'uint32',
277
+ offset: 0,
278
+ byteLength: 4,
279
+ },
280
+ ];
281
+ export function buildQbayCancelSaleInput(input, identityToPublicKey = (_identity) => new Uint8Array(32)) {
282
+ return buildPayload(QBAY_CANCEL_SALE_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
283
+ }
284
+ const QBAY_CANCEL_SALE_OUTPUT_FIELDS = [
285
+ {
286
+ name: 'returnCode',
287
+ type: 'uint32',
288
+ offset: 0,
289
+ byteLength: 4,
290
+ },
291
+ ];
292
+ export function decodeQbayCancelSaleOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
293
+ return decodePayload(data, QBAY_CANCEL_SALE_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
294
+ }
295
+ export const QBAY_LIST_IN_EXCHANGE_INPUT_TYPE = 9;
296
+ const QBAY_LIST_IN_EXCHANGE_INPUT_FIELDS = [
297
+ {
298
+ name: 'possessedNFT',
299
+ type: 'uint32',
300
+ offset: 0,
301
+ byteLength: 4,
302
+ },
303
+ {
304
+ name: 'anotherNFT',
305
+ type: 'uint32',
306
+ offset: 4,
307
+ byteLength: 4,
308
+ },
309
+ ];
310
+ export function buildQbayListInExchangeInput(input, identityToPublicKey = (_identity) => new Uint8Array(32)) {
311
+ return buildPayload(QBAY_LIST_IN_EXCHANGE_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
312
+ }
313
+ const QBAY_LIST_IN_EXCHANGE_OUTPUT_FIELDS = [
314
+ {
315
+ name: 'returnCode',
316
+ type: 'uint32',
317
+ offset: 0,
318
+ byteLength: 4,
319
+ },
320
+ ];
321
+ export function decodeQbayListInExchangeOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
322
+ return decodePayload(data, QBAY_LIST_IN_EXCHANGE_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
323
+ }
324
+ export const QBAY_CANCEL_EXCHANGE_INPUT_TYPE = 10;
325
+ const QBAY_CANCEL_EXCHANGE_INPUT_FIELDS = [
326
+ {
327
+ name: 'possessedNFT',
328
+ type: 'uint32',
329
+ offset: 0,
330
+ byteLength: 4,
331
+ },
332
+ {
333
+ name: 'anotherNFT',
334
+ type: 'uint32',
335
+ offset: 4,
336
+ byteLength: 4,
337
+ },
338
+ ];
339
+ export function buildQbayCancelExchangeInput(input, identityToPublicKey = (_identity) => new Uint8Array(32)) {
340
+ return buildPayload(QBAY_CANCEL_EXCHANGE_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
341
+ }
342
+ const QBAY_CANCEL_EXCHANGE_OUTPUT_FIELDS = [
343
+ {
344
+ name: 'returnCode',
345
+ type: 'uint32',
346
+ offset: 0,
347
+ byteLength: 4,
348
+ },
349
+ ];
350
+ export function decodeQbayCancelExchangeOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
351
+ return decodePayload(data, QBAY_CANCEL_EXCHANGE_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
352
+ }
353
+ export const QBAY_MAKE_OFFER_INPUT_TYPE = 11;
354
+ const QBAY_MAKE_OFFER_INPUT_FIELDS = [
355
+ {
356
+ name: 'askPrice',
357
+ type: 'uint64',
358
+ offset: 0,
359
+ byteLength: 8,
360
+ },
361
+ {
362
+ name: 'NFTid',
363
+ type: 'uint32',
364
+ offset: 8,
365
+ byteLength: 4,
366
+ },
367
+ {
368
+ name: 'paymentMethod',
369
+ type: 'uint8',
370
+ offset: 12,
371
+ byteLength: 1,
372
+ },
373
+ ];
374
+ export function buildQbayMakeOfferInput(input, identityToPublicKey = (_identity) => new Uint8Array(32)) {
375
+ return buildPayload(QBAY_MAKE_OFFER_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
376
+ }
377
+ const QBAY_MAKE_OFFER_OUTPUT_FIELDS = [
378
+ {
379
+ name: 'returnCode',
380
+ type: 'uint32',
381
+ offset: 0,
382
+ byteLength: 4,
383
+ },
384
+ ];
385
+ export function decodeQbayMakeOfferOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
386
+ return decodePayload(data, QBAY_MAKE_OFFER_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
387
+ }
388
+ export const QBAY_ACCEPT_OFFER_INPUT_TYPE = 12;
389
+ const QBAY_ACCEPT_OFFER_INPUT_FIELDS = [
390
+ {
391
+ name: 'NFTid',
392
+ type: 'uint32',
393
+ offset: 0,
394
+ byteLength: 4,
395
+ },
396
+ ];
397
+ export function buildQbayAcceptOfferInput(input, identityToPublicKey = (_identity) => new Uint8Array(32)) {
398
+ return buildPayload(QBAY_ACCEPT_OFFER_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
399
+ }
400
+ const QBAY_ACCEPT_OFFER_OUTPUT_FIELDS = [
401
+ {
402
+ name: 'returnCode',
403
+ type: 'uint32',
404
+ offset: 0,
405
+ byteLength: 4,
406
+ },
407
+ ];
408
+ export function decodeQbayAcceptOfferOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
409
+ return decodePayload(data, QBAY_ACCEPT_OFFER_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
410
+ }
411
+ export const QBAY_CANCEL_OFFER_INPUT_TYPE = 13;
412
+ const QBAY_CANCEL_OFFER_INPUT_FIELDS = [
413
+ {
414
+ name: 'NFTid',
415
+ type: 'uint32',
416
+ offset: 0,
417
+ byteLength: 4,
418
+ },
419
+ ];
420
+ export function buildQbayCancelOfferInput(input, identityToPublicKey = (_identity) => new Uint8Array(32)) {
421
+ return buildPayload(QBAY_CANCEL_OFFER_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
422
+ }
423
+ const QBAY_CANCEL_OFFER_OUTPUT_FIELDS = [
424
+ {
425
+ name: 'returnCode',
426
+ type: 'uint32',
427
+ offset: 0,
428
+ byteLength: 4,
429
+ },
430
+ ];
431
+ export function decodeQbayCancelOfferOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
432
+ return decodePayload(data, QBAY_CANCEL_OFFER_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
433
+ }
434
+ export const QBAY_CREATE_TRADITIONAL_AUCTION_INPUT_TYPE = 14;
435
+ const QBAY_CREATE_TRADITIONAL_AUCTION_INPUT_FIELDS = [
436
+ {
437
+ name: 'minPrice',
438
+ type: 'uint64',
439
+ offset: 0,
440
+ byteLength: 8,
441
+ },
442
+ {
443
+ name: 'NFTId',
444
+ type: 'uint32',
445
+ offset: 8,
446
+ byteLength: 4,
447
+ },
448
+ {
449
+ name: 'startYear',
450
+ type: 'uint32',
451
+ offset: 12,
452
+ byteLength: 4,
453
+ },
454
+ {
455
+ name: 'startMonth',
456
+ type: 'uint32',
457
+ offset: 16,
458
+ byteLength: 4,
459
+ },
460
+ {
461
+ name: 'startDay',
462
+ type: 'uint32',
463
+ offset: 20,
464
+ byteLength: 4,
465
+ },
466
+ {
467
+ name: 'startHour',
468
+ type: 'uint32',
469
+ offset: 24,
470
+ byteLength: 4,
471
+ },
472
+ {
473
+ name: 'endYear',
474
+ type: 'uint32',
475
+ offset: 28,
476
+ byteLength: 4,
477
+ },
478
+ {
479
+ name: 'endMonth',
480
+ type: 'uint32',
481
+ offset: 32,
482
+ byteLength: 4,
483
+ },
484
+ {
485
+ name: 'endDay',
486
+ type: 'uint32',
487
+ offset: 36,
488
+ byteLength: 4,
489
+ },
490
+ {
491
+ name: 'endHour',
492
+ type: 'uint32',
493
+ offset: 40,
494
+ byteLength: 4,
495
+ },
496
+ {
497
+ name: 'paymentMethodOfAuction',
498
+ type: 'uint8',
499
+ offset: 44,
500
+ byteLength: 1,
501
+ },
502
+ ];
503
+ export function buildQbayCreateTraditionalAuctionInput(input, identityToPublicKey = (_identity) => new Uint8Array(32)) {
504
+ return buildPayload(QBAY_CREATE_TRADITIONAL_AUCTION_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
505
+ }
506
+ const QBAY_CREATE_TRADITIONAL_AUCTION_OUTPUT_FIELDS = [
507
+ {
508
+ name: 'returnCode',
509
+ type: 'uint32',
510
+ offset: 0,
511
+ byteLength: 4,
512
+ },
513
+ ];
514
+ export function decodeQbayCreateTraditionalAuctionOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
515
+ return decodePayload(data, QBAY_CREATE_TRADITIONAL_AUCTION_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
516
+ }
517
+ export const QBAY_BID_ON_TRADITIONAL_AUCTION_INPUT_TYPE = 15;
518
+ const QBAY_BID_ON_TRADITIONAL_AUCTION_INPUT_FIELDS = [
519
+ {
520
+ name: 'price',
521
+ type: 'uint64',
522
+ offset: 0,
523
+ byteLength: 8,
524
+ },
525
+ {
526
+ name: 'NFTId',
527
+ type: 'uint32',
528
+ offset: 8,
529
+ byteLength: 4,
530
+ },
531
+ {
532
+ name: 'paymentMethod',
533
+ type: 'uint8',
534
+ offset: 12,
535
+ byteLength: 1,
536
+ },
537
+ ];
538
+ export function buildQbayBidOnTraditionalAuctionInput(input, identityToPublicKey = (_identity) => new Uint8Array(32)) {
539
+ return buildPayload(QBAY_BID_ON_TRADITIONAL_AUCTION_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
540
+ }
541
+ const QBAY_BID_ON_TRADITIONAL_AUCTION_OUTPUT_FIELDS = [
542
+ {
543
+ name: 'returnCode',
544
+ type: 'uint32',
545
+ offset: 0,
546
+ byteLength: 4,
547
+ },
548
+ ];
549
+ export function decodeQbayBidOnTraditionalAuctionOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
550
+ return decodePayload(data, QBAY_BID_ON_TRADITIONAL_AUCTION_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
551
+ }
552
+ export const QBAY_TRANSFER_SHARE_MANAGEMENT_RIGHTS_INPUT_TYPE = 16;
553
+ const QBAY_TRANSFER_SHARE_MANAGEMENT_RIGHTS_INPUT_FIELDS = [
554
+ {
555
+ name: 'asset',
556
+ type: 'struct',
557
+ offset: 0,
558
+ byteLength: 40,
559
+ structRef: 'Asset',
560
+ },
561
+ {
562
+ name: 'numberOfShares',
563
+ type: 'sint64',
564
+ offset: 40,
565
+ byteLength: 8,
566
+ },
567
+ {
568
+ name: 'newManagingContractIndex',
569
+ type: 'uint32',
570
+ offset: 48,
571
+ byteLength: 4,
572
+ },
573
+ ];
574
+ export function buildQbayTransferShareManagementRightsInput(input, identityToPublicKey = (_identity) => new Uint8Array(32)) {
575
+ return buildPayload(QBAY_TRANSFER_SHARE_MANAGEMENT_RIGHTS_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
576
+ }
577
+ const QBAY_TRANSFER_SHARE_MANAGEMENT_RIGHTS_OUTPUT_FIELDS = [
578
+ {
579
+ name: 'transferredNumberOfShares',
580
+ type: 'sint64',
581
+ offset: 0,
582
+ byteLength: 8,
583
+ },
584
+ {
585
+ name: 'returnCode',
586
+ type: 'uint32',
587
+ offset: 8,
588
+ byteLength: 4,
589
+ },
590
+ ];
591
+ export function decodeQbayTransferShareManagementRightsOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
592
+ return decodePayload(data, QBAY_TRANSFER_SHARE_MANAGEMENT_RIGHTS_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
593
+ }
594
+ export const QBAY_CHANGE_STATUS_OF_MARKET_PLACE_INPUT_TYPE = 17;
595
+ const QBAY_CHANGE_STATUS_OF_MARKET_PLACE_INPUT_FIELDS = [
596
+ {
597
+ name: 'status',
598
+ type: 'uint8',
599
+ offset: 0,
600
+ byteLength: 1,
601
+ },
602
+ ];
603
+ export function buildQbayChangeStatusOfMarketPlaceInput(input, identityToPublicKey = (_identity) => new Uint8Array(32)) {
604
+ return buildPayload(QBAY_CHANGE_STATUS_OF_MARKET_PLACE_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
605
+ }
606
+ const QBAY_CHANGE_STATUS_OF_MARKET_PLACE_OUTPUT_FIELDS = [
607
+ {
608
+ name: 'returnCode',
609
+ type: 'uint32',
610
+ offset: 0,
611
+ byteLength: 4,
612
+ },
613
+ ];
614
+ export function decodeQbayChangeStatusOfMarketPlaceOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
615
+ return decodePayload(data, QBAY_CHANGE_STATUS_OF_MARKET_PLACE_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
616
+ }
617
+ export const QBAY_GET_NUMBER_OF_NFT_FOR_USER_INPUT_TYPE = 18;
618
+ export const QBAY_GET_NUMBER_OF_NFT_FOR_USER_INPUT_SIZE = 32;
619
+ const QBAY_GET_NUMBER_OF_NFT_FOR_USER_INPUT_FIELDS = [
620
+ {
621
+ name: 'user',
622
+ type: 'id',
623
+ offset: 0,
624
+ byteLength: 32,
625
+ },
626
+ ];
627
+ export function buildQbayGetNumberOfNFTForUserInput(input, identityToPublicKey = (_identity) => new Uint8Array(32)) {
628
+ return buildPayload(QBAY_GET_NUMBER_OF_NFT_FOR_USER_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
629
+ }
630
+ const QBAY_GET_NUMBER_OF_NFT_FOR_USER_OUTPUT_FIELDS = [
631
+ {
632
+ name: 'numberOfNFT',
633
+ type: 'uint32',
634
+ offset: 0,
635
+ byteLength: 4,
636
+ },
637
+ ];
638
+ export function decodeQbayGetNumberOfNFTForUserOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
639
+ return decodePayload(data, QBAY_GET_NUMBER_OF_NFT_FOR_USER_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
640
+ }
641
+ export async function qbayGetNumberOfNFTForUser(live, input, options) {
642
+ return callContractFunction({
643
+ live,
644
+ contractIndex: QBAY_CONTRACT_INDEX,
645
+ inputType: QBAY_GET_NUMBER_OF_NFT_FOR_USER_INPUT_TYPE,
646
+ inputSize: QBAY_GET_NUMBER_OF_NFT_FOR_USER_INPUT_SIZE,
647
+ inputFields: QBAY_GET_NUMBER_OF_NFT_FOR_USER_INPUT_FIELDS,
648
+ outputFields: QBAY_GET_NUMBER_OF_NFT_FOR_USER_OUTPUT_FIELDS,
649
+ structs: STRUCTS,
650
+ input: input,
651
+ ...options,
652
+ });
653
+ }
654
+ export const QBAY_GET_INFO_OF_NFT_USER_POSSESSED_INPUT_TYPE = 19;
655
+ export const QBAY_GET_INFO_OF_NFT_USER_POSSESSED_INPUT_SIZE = 36;
656
+ const QBAY_GET_INFO_OF_NFT_USER_POSSESSED_INPUT_FIELDS = [
657
+ {
658
+ name: 'user',
659
+ type: 'id',
660
+ offset: 0,
661
+ byteLength: 32,
662
+ },
663
+ {
664
+ name: 'NFTNumber',
665
+ type: 'uint32',
666
+ offset: 32,
667
+ byteLength: 4,
668
+ },
669
+ ];
670
+ export function buildQbayGetInfoOfNFTUserPossessedInput(input, identityToPublicKey = (_identity) => new Uint8Array(32)) {
671
+ return buildPayload(QBAY_GET_INFO_OF_NFT_USER_POSSESSED_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
672
+ }
673
+ const QBAY_GET_INFO_OF_NFT_USER_POSSESSED_OUTPUT_FIELDS = [
674
+ {
675
+ name: 'creator',
676
+ type: 'id',
677
+ offset: 0,
678
+ byteLength: 32,
679
+ },
680
+ {
681
+ name: 'possessor',
682
+ type: 'id',
683
+ offset: 32,
684
+ byteLength: 32,
685
+ },
686
+ {
687
+ name: 'askUser',
688
+ type: 'id',
689
+ offset: 64,
690
+ byteLength: 32,
691
+ },
692
+ {
693
+ name: 'creatorOfAuction',
694
+ type: 'id',
695
+ offset: 96,
696
+ byteLength: 32,
697
+ },
698
+ {
699
+ name: 'salePrice',
700
+ type: 'sint64',
701
+ offset: 128,
702
+ byteLength: 8,
703
+ },
704
+ {
705
+ name: 'askMaxPrice',
706
+ type: 'sint64',
707
+ offset: 136,
708
+ byteLength: 8,
709
+ },
710
+ {
711
+ name: 'currentPriceOfAuction',
712
+ type: 'uint64',
713
+ offset: 144,
714
+ byteLength: 8,
715
+ },
716
+ {
717
+ name: 'royalty',
718
+ type: 'uint32',
719
+ offset: 152,
720
+ byteLength: 4,
721
+ },
722
+ {
723
+ name: 'NFTidForExchange',
724
+ type: 'uint32',
725
+ offset: 156,
726
+ byteLength: 4,
727
+ },
728
+ {
729
+ name: 'URI',
730
+ type: 'array',
731
+ offset: 160,
732
+ byteLength: 64,
733
+ arrayLength: 64,
734
+ arrayItemType: 'uint8',
735
+ arrayItemByteLength: 1,
736
+ },
737
+ {
738
+ name: 'statusOfAuction',
739
+ type: 'uint8',
740
+ offset: 224,
741
+ byteLength: 1,
742
+ },
743
+ {
744
+ name: 'yearAuctionStarted',
745
+ type: 'uint8',
746
+ offset: 225,
747
+ byteLength: 1,
748
+ },
749
+ {
750
+ name: 'monthAuctionStarted',
751
+ type: 'uint8',
752
+ offset: 226,
753
+ byteLength: 1,
754
+ },
755
+ {
756
+ name: 'dayAuctionStarted',
757
+ type: 'uint8',
758
+ offset: 227,
759
+ byteLength: 1,
760
+ },
761
+ {
762
+ name: 'hourAuctionStarted',
763
+ type: 'uint8',
764
+ offset: 228,
765
+ byteLength: 1,
766
+ },
767
+ {
768
+ name: 'minuteAuctionStarted',
769
+ type: 'uint8',
770
+ offset: 229,
771
+ byteLength: 1,
772
+ },
773
+ {
774
+ name: 'secondAuctionStarted',
775
+ type: 'uint8',
776
+ offset: 230,
777
+ byteLength: 1,
778
+ },
779
+ {
780
+ name: 'yearAuctionEnded',
781
+ type: 'uint8',
782
+ offset: 231,
783
+ byteLength: 1,
784
+ },
785
+ {
786
+ name: 'monthAuctionEnded',
787
+ type: 'uint8',
788
+ offset: 232,
789
+ byteLength: 1,
790
+ },
791
+ {
792
+ name: 'dayAuctionEnded',
793
+ type: 'uint8',
794
+ offset: 233,
795
+ byteLength: 1,
796
+ },
797
+ {
798
+ name: 'hourAuctionEnded',
799
+ type: 'uint8',
800
+ offset: 234,
801
+ byteLength: 1,
802
+ },
803
+ {
804
+ name: 'minuteAuctionEnded',
805
+ type: 'uint8',
806
+ offset: 235,
807
+ byteLength: 1,
808
+ },
809
+ {
810
+ name: 'secondAuctionEnded',
811
+ type: 'uint8',
812
+ offset: 236,
813
+ byteLength: 1,
814
+ },
815
+ {
816
+ name: 'statusOfSale',
817
+ type: 'uint8',
818
+ offset: 237,
819
+ byteLength: 1,
820
+ },
821
+ {
822
+ name: 'statusOfAsk',
823
+ type: 'uint8',
824
+ offset: 238,
825
+ byteLength: 1,
826
+ },
827
+ {
828
+ name: 'paymentMethodOfAsk',
829
+ type: 'uint8',
830
+ offset: 239,
831
+ byteLength: 1,
832
+ },
833
+ {
834
+ name: 'statusOfExchange',
835
+ type: 'uint8',
836
+ offset: 240,
837
+ byteLength: 1,
838
+ },
839
+ {
840
+ name: 'paymentMethodOfAuction',
841
+ type: 'uint8',
842
+ offset: 241,
843
+ byteLength: 1,
844
+ },
845
+ ];
846
+ export function decodeQbayGetInfoOfNFTUserPossessedOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
847
+ return decodePayload(data, QBAY_GET_INFO_OF_NFT_USER_POSSESSED_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
848
+ }
849
+ export async function qbayGetInfoOfNFTUserPossessed(live, input, options) {
850
+ return callContractFunction({
851
+ live,
852
+ contractIndex: QBAY_CONTRACT_INDEX,
853
+ inputType: QBAY_GET_INFO_OF_NFT_USER_POSSESSED_INPUT_TYPE,
854
+ inputSize: QBAY_GET_INFO_OF_NFT_USER_POSSESSED_INPUT_SIZE,
855
+ inputFields: QBAY_GET_INFO_OF_NFT_USER_POSSESSED_INPUT_FIELDS,
856
+ outputFields: QBAY_GET_INFO_OF_NFT_USER_POSSESSED_OUTPUT_FIELDS,
857
+ structs: STRUCTS,
858
+ input: input,
859
+ ...options,
860
+ });
861
+ }
862
+ export const QBAY_GET_INFO_OF_MARKETPLACE_INPUT_TYPE = 20;
863
+ export const QBAY_GET_INFO_OF_MARKETPLACE_INPUT_SIZE = 0;
864
+ const QBAY_GET_INFO_OF_MARKETPLACE_OUTPUT_FIELDS = [
865
+ {
866
+ name: 'priceOfCFB',
867
+ type: 'uint64',
868
+ offset: 0,
869
+ byteLength: 8,
870
+ },
871
+ {
872
+ name: 'priceOfQubic',
873
+ type: 'uint64',
874
+ offset: 8,
875
+ byteLength: 8,
876
+ },
877
+ {
878
+ name: 'numberOfNFTIncoming',
879
+ type: 'uint64',
880
+ offset: 16,
881
+ byteLength: 8,
882
+ },
883
+ {
884
+ name: 'earnedQubic',
885
+ type: 'uint64',
886
+ offset: 24,
887
+ byteLength: 8,
888
+ },
889
+ {
890
+ name: 'earnedCFB',
891
+ type: 'uint64',
892
+ offset: 32,
893
+ byteLength: 8,
894
+ },
895
+ {
896
+ name: 'numberOfCollection',
897
+ type: 'uint32',
898
+ offset: 40,
899
+ byteLength: 4,
900
+ },
901
+ {
902
+ name: 'numberOfNFT',
903
+ type: 'uint32',
904
+ offset: 44,
905
+ byteLength: 4,
906
+ },
907
+ {
908
+ name: 'statusOfMarketPlace',
909
+ type: 'uint8',
910
+ offset: 48,
911
+ byteLength: 1,
912
+ },
913
+ ];
914
+ export function decodeQbayGetInfoOfMarketplaceOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
915
+ return decodePayload(data, QBAY_GET_INFO_OF_MARKETPLACE_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
916
+ }
917
+ export async function qbayGetInfoOfMarketplace(live, options) {
918
+ return callContractFunction({
919
+ live,
920
+ contractIndex: QBAY_CONTRACT_INDEX,
921
+ inputType: QBAY_GET_INFO_OF_MARKETPLACE_INPUT_TYPE,
922
+ inputSize: QBAY_GET_INFO_OF_MARKETPLACE_INPUT_SIZE,
923
+ inputFields: [],
924
+ outputFields: QBAY_GET_INFO_OF_MARKETPLACE_OUTPUT_FIELDS,
925
+ structs: STRUCTS,
926
+ input: {},
927
+ ...options,
928
+ });
929
+ }
930
+ export const QBAY_GET_INFO_OF_COLLECTION_BY_CREATOR_INPUT_TYPE = 21;
931
+ export const QBAY_GET_INFO_OF_COLLECTION_BY_CREATOR_INPUT_SIZE = 36;
932
+ const QBAY_GET_INFO_OF_COLLECTION_BY_CREATOR_INPUT_FIELDS = [
933
+ {
934
+ name: 'creator',
935
+ type: 'id',
936
+ offset: 0,
937
+ byteLength: 32,
938
+ },
939
+ {
940
+ name: 'orderOfCollection',
941
+ type: 'uint32',
942
+ offset: 32,
943
+ byteLength: 4,
944
+ },
945
+ ];
946
+ export function buildQbayGetInfoOfCollectionByCreatorInput(input, identityToPublicKey = (_identity) => new Uint8Array(32)) {
947
+ return buildPayload(QBAY_GET_INFO_OF_COLLECTION_BY_CREATOR_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
948
+ }
949
+ const QBAY_GET_INFO_OF_COLLECTION_BY_CREATOR_OUTPUT_FIELDS = [
950
+ {
951
+ name: 'priceForDropMint',
952
+ type: 'uint64',
953
+ offset: 0,
954
+ byteLength: 8,
955
+ },
956
+ {
957
+ name: 'idOfCollection',
958
+ type: 'uint32',
959
+ offset: 8,
960
+ byteLength: 4,
961
+ },
962
+ {
963
+ name: 'royalty',
964
+ type: 'uint32',
965
+ offset: 12,
966
+ byteLength: 4,
967
+ },
968
+ {
969
+ name: 'currentSize',
970
+ type: 'sint32',
971
+ offset: 16,
972
+ byteLength: 4,
973
+ },
974
+ {
975
+ name: 'maxSizeHoldingPerOneId',
976
+ type: 'uint32',
977
+ offset: 20,
978
+ byteLength: 4,
979
+ },
980
+ {
981
+ name: 'URI',
982
+ type: 'array',
983
+ offset: 24,
984
+ byteLength: 64,
985
+ arrayLength: 64,
986
+ arrayItemType: 'uint8',
987
+ arrayItemByteLength: 1,
988
+ },
989
+ {
990
+ name: 'typeOfCollection',
991
+ type: 'uint8',
992
+ offset: 88,
993
+ byteLength: 1,
994
+ },
995
+ ];
996
+ export function decodeQbayGetInfoOfCollectionByCreatorOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
997
+ return decodePayload(data, QBAY_GET_INFO_OF_COLLECTION_BY_CREATOR_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
998
+ }
999
+ export async function qbayGetInfoOfCollectionByCreator(live, input, options) {
1000
+ return callContractFunction({
1001
+ live,
1002
+ contractIndex: QBAY_CONTRACT_INDEX,
1003
+ inputType: QBAY_GET_INFO_OF_COLLECTION_BY_CREATOR_INPUT_TYPE,
1004
+ inputSize: QBAY_GET_INFO_OF_COLLECTION_BY_CREATOR_INPUT_SIZE,
1005
+ inputFields: QBAY_GET_INFO_OF_COLLECTION_BY_CREATOR_INPUT_FIELDS,
1006
+ outputFields: QBAY_GET_INFO_OF_COLLECTION_BY_CREATOR_OUTPUT_FIELDS,
1007
+ structs: STRUCTS,
1008
+ input: input,
1009
+ ...options,
1010
+ });
1011
+ }
1012
+ export const QBAY_GET_INFO_OF_COLLECTION_BY_ID_INPUT_TYPE = 22;
1013
+ export const QBAY_GET_INFO_OF_COLLECTION_BY_ID_INPUT_SIZE = 4;
1014
+ const QBAY_GET_INFO_OF_COLLECTION_BY_ID_INPUT_FIELDS = [
1015
+ {
1016
+ name: 'idOfCollection',
1017
+ type: 'uint32',
1018
+ offset: 0,
1019
+ byteLength: 4,
1020
+ },
1021
+ ];
1022
+ export function buildQbayGetInfoOfCollectionByIdInput(input, identityToPublicKey = (_identity) => new Uint8Array(32)) {
1023
+ return buildPayload(QBAY_GET_INFO_OF_COLLECTION_BY_ID_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
1024
+ }
1025
+ const QBAY_GET_INFO_OF_COLLECTION_BY_ID_OUTPUT_FIELDS = [
1026
+ {
1027
+ name: 'creator',
1028
+ type: 'id',
1029
+ offset: 0,
1030
+ byteLength: 32,
1031
+ },
1032
+ {
1033
+ name: 'priceForDropMint',
1034
+ type: 'uint64',
1035
+ offset: 32,
1036
+ byteLength: 8,
1037
+ },
1038
+ {
1039
+ name: 'royalty',
1040
+ type: 'uint32',
1041
+ offset: 40,
1042
+ byteLength: 4,
1043
+ },
1044
+ {
1045
+ name: 'currentSize',
1046
+ type: 'sint32',
1047
+ offset: 44,
1048
+ byteLength: 4,
1049
+ },
1050
+ {
1051
+ name: 'maxSizeHoldingPerOneId',
1052
+ type: 'uint32',
1053
+ offset: 48,
1054
+ byteLength: 4,
1055
+ },
1056
+ {
1057
+ name: 'URI',
1058
+ type: 'array',
1059
+ offset: 52,
1060
+ byteLength: 64,
1061
+ arrayLength: 64,
1062
+ arrayItemType: 'uint8',
1063
+ arrayItemByteLength: 1,
1064
+ },
1065
+ {
1066
+ name: 'typeOfCollection',
1067
+ type: 'uint8',
1068
+ offset: 116,
1069
+ byteLength: 1,
1070
+ },
1071
+ ];
1072
+ export function decodeQbayGetInfoOfCollectionByIdOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
1073
+ return decodePayload(data, QBAY_GET_INFO_OF_COLLECTION_BY_ID_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
1074
+ }
1075
+ export async function qbayGetInfoOfCollectionById(live, input, options) {
1076
+ return callContractFunction({
1077
+ live,
1078
+ contractIndex: QBAY_CONTRACT_INDEX,
1079
+ inputType: QBAY_GET_INFO_OF_COLLECTION_BY_ID_INPUT_TYPE,
1080
+ inputSize: QBAY_GET_INFO_OF_COLLECTION_BY_ID_INPUT_SIZE,
1081
+ inputFields: QBAY_GET_INFO_OF_COLLECTION_BY_ID_INPUT_FIELDS,
1082
+ outputFields: QBAY_GET_INFO_OF_COLLECTION_BY_ID_OUTPUT_FIELDS,
1083
+ structs: STRUCTS,
1084
+ input: input,
1085
+ ...options,
1086
+ });
1087
+ }
1088
+ export const QBAY_GET_INCOMING_AUCTIONS_INPUT_TYPE = 23;
1089
+ export const QBAY_GET_INCOMING_AUCTIONS_INPUT_SIZE = 8;
1090
+ const QBAY_GET_INCOMING_AUCTIONS_INPUT_FIELDS = [
1091
+ {
1092
+ name: 'offset',
1093
+ type: 'uint32',
1094
+ offset: 0,
1095
+ byteLength: 4,
1096
+ },
1097
+ {
1098
+ name: 'count',
1099
+ type: 'uint32',
1100
+ offset: 4,
1101
+ byteLength: 4,
1102
+ },
1103
+ ];
1104
+ export function buildQbayGetIncomingAuctionsInput(input, identityToPublicKey = (_identity) => new Uint8Array(32)) {
1105
+ return buildPayload(QBAY_GET_INCOMING_AUCTIONS_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
1106
+ }
1107
+ const QBAY_GET_INCOMING_AUCTIONS_OUTPUT_FIELDS = [
1108
+ {
1109
+ name: 'NFTId',
1110
+ type: 'array',
1111
+ offset: 0,
1112
+ byteLength: 4096,
1113
+ arrayLength: 1024,
1114
+ arrayItemType: 'uint32',
1115
+ arrayItemByteLength: 4,
1116
+ },
1117
+ ];
1118
+ export function decodeQbayGetIncomingAuctionsOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
1119
+ return decodePayload(data, QBAY_GET_INCOMING_AUCTIONS_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
1120
+ }
1121
+ export async function qbayGetIncomingAuctions(live, input, options) {
1122
+ return callContractFunction({
1123
+ live,
1124
+ contractIndex: QBAY_CONTRACT_INDEX,
1125
+ inputType: QBAY_GET_INCOMING_AUCTIONS_INPUT_TYPE,
1126
+ inputSize: QBAY_GET_INCOMING_AUCTIONS_INPUT_SIZE,
1127
+ inputFields: QBAY_GET_INCOMING_AUCTIONS_INPUT_FIELDS,
1128
+ outputFields: QBAY_GET_INCOMING_AUCTIONS_OUTPUT_FIELDS,
1129
+ structs: STRUCTS,
1130
+ input: input,
1131
+ ...options,
1132
+ });
1133
+ }
1134
+ export const QBAY_GET_INFO_OF_NFT_BY_ID_INPUT_TYPE = 24;
1135
+ export const QBAY_GET_INFO_OF_NFT_BY_ID_INPUT_SIZE = 4;
1136
+ const QBAY_GET_INFO_OF_NFT_BY_ID_INPUT_FIELDS = [
1137
+ {
1138
+ name: 'NFTId',
1139
+ type: 'uint32',
1140
+ offset: 0,
1141
+ byteLength: 4,
1142
+ },
1143
+ ];
1144
+ export function buildQbayGetInfoOfNFTByIdInput(input, identityToPublicKey = (_identity) => new Uint8Array(32)) {
1145
+ return buildPayload(QBAY_GET_INFO_OF_NFT_BY_ID_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
1146
+ }
1147
+ const QBAY_GET_INFO_OF_NFT_BY_ID_OUTPUT_FIELDS = [
1148
+ {
1149
+ name: 'creator',
1150
+ type: 'id',
1151
+ offset: 0,
1152
+ byteLength: 32,
1153
+ },
1154
+ {
1155
+ name: 'possessor',
1156
+ type: 'id',
1157
+ offset: 32,
1158
+ byteLength: 32,
1159
+ },
1160
+ {
1161
+ name: 'askUser',
1162
+ type: 'id',
1163
+ offset: 64,
1164
+ byteLength: 32,
1165
+ },
1166
+ {
1167
+ name: 'creatorOfAuction',
1168
+ type: 'id',
1169
+ offset: 96,
1170
+ byteLength: 32,
1171
+ },
1172
+ {
1173
+ name: 'salePrice',
1174
+ type: 'sint64',
1175
+ offset: 128,
1176
+ byteLength: 8,
1177
+ },
1178
+ {
1179
+ name: 'askMaxPrice',
1180
+ type: 'sint64',
1181
+ offset: 136,
1182
+ byteLength: 8,
1183
+ },
1184
+ {
1185
+ name: 'currentPriceOfAuction',
1186
+ type: 'uint64',
1187
+ offset: 144,
1188
+ byteLength: 8,
1189
+ },
1190
+ {
1191
+ name: 'royalty',
1192
+ type: 'uint32',
1193
+ offset: 152,
1194
+ byteLength: 4,
1195
+ },
1196
+ {
1197
+ name: 'NFTidForExchange',
1198
+ type: 'uint32',
1199
+ offset: 156,
1200
+ byteLength: 4,
1201
+ },
1202
+ {
1203
+ name: 'URI',
1204
+ type: 'array',
1205
+ offset: 160,
1206
+ byteLength: 64,
1207
+ arrayLength: 64,
1208
+ arrayItemType: 'uint8',
1209
+ arrayItemByteLength: 1,
1210
+ },
1211
+ {
1212
+ name: 'statusOfAuction',
1213
+ type: 'uint8',
1214
+ offset: 224,
1215
+ byteLength: 1,
1216
+ },
1217
+ {
1218
+ name: 'yearAuctionStarted',
1219
+ type: 'uint8',
1220
+ offset: 225,
1221
+ byteLength: 1,
1222
+ },
1223
+ {
1224
+ name: 'monthAuctionStarted',
1225
+ type: 'uint8',
1226
+ offset: 226,
1227
+ byteLength: 1,
1228
+ },
1229
+ {
1230
+ name: 'dayAuctionStarted',
1231
+ type: 'uint8',
1232
+ offset: 227,
1233
+ byteLength: 1,
1234
+ },
1235
+ {
1236
+ name: 'hourAuctionStarted',
1237
+ type: 'uint8',
1238
+ offset: 228,
1239
+ byteLength: 1,
1240
+ },
1241
+ {
1242
+ name: 'minuteAuctionStarted',
1243
+ type: 'uint8',
1244
+ offset: 229,
1245
+ byteLength: 1,
1246
+ },
1247
+ {
1248
+ name: 'secondAuctionStarted',
1249
+ type: 'uint8',
1250
+ offset: 230,
1251
+ byteLength: 1,
1252
+ },
1253
+ {
1254
+ name: 'yearAuctionEnded',
1255
+ type: 'uint8',
1256
+ offset: 231,
1257
+ byteLength: 1,
1258
+ },
1259
+ {
1260
+ name: 'monthAuctionEnded',
1261
+ type: 'uint8',
1262
+ offset: 232,
1263
+ byteLength: 1,
1264
+ },
1265
+ {
1266
+ name: 'dayAuctionEnded',
1267
+ type: 'uint8',
1268
+ offset: 233,
1269
+ byteLength: 1,
1270
+ },
1271
+ {
1272
+ name: 'hourAuctionEnded',
1273
+ type: 'uint8',
1274
+ offset: 234,
1275
+ byteLength: 1,
1276
+ },
1277
+ {
1278
+ name: 'minuteAuctionEnded',
1279
+ type: 'uint8',
1280
+ offset: 235,
1281
+ byteLength: 1,
1282
+ },
1283
+ {
1284
+ name: 'secondAuctionEnded',
1285
+ type: 'uint8',
1286
+ offset: 236,
1287
+ byteLength: 1,
1288
+ },
1289
+ {
1290
+ name: 'statusOfSale',
1291
+ type: 'uint8',
1292
+ offset: 237,
1293
+ byteLength: 1,
1294
+ },
1295
+ {
1296
+ name: 'statusOfAsk',
1297
+ type: 'uint8',
1298
+ offset: 238,
1299
+ byteLength: 1,
1300
+ },
1301
+ {
1302
+ name: 'paymentMethodOfAsk',
1303
+ type: 'uint8',
1304
+ offset: 239,
1305
+ byteLength: 1,
1306
+ },
1307
+ {
1308
+ name: 'statusOfExchange',
1309
+ type: 'uint8',
1310
+ offset: 240,
1311
+ byteLength: 1,
1312
+ },
1313
+ {
1314
+ name: 'paymentMethodOfAuction',
1315
+ type: 'uint8',
1316
+ offset: 241,
1317
+ byteLength: 1,
1318
+ },
1319
+ ];
1320
+ export function decodeQbayGetInfoOfNFTByIdOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
1321
+ return decodePayload(data, QBAY_GET_INFO_OF_NFT_BY_ID_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
1322
+ }
1323
+ export async function qbayGetInfoOfNFTById(live, input, options) {
1324
+ return callContractFunction({
1325
+ live,
1326
+ contractIndex: QBAY_CONTRACT_INDEX,
1327
+ inputType: QBAY_GET_INFO_OF_NFT_BY_ID_INPUT_TYPE,
1328
+ inputSize: QBAY_GET_INFO_OF_NFT_BY_ID_INPUT_SIZE,
1329
+ inputFields: QBAY_GET_INFO_OF_NFT_BY_ID_INPUT_FIELDS,
1330
+ outputFields: QBAY_GET_INFO_OF_NFT_BY_ID_OUTPUT_FIELDS,
1331
+ structs: STRUCTS,
1332
+ input: input,
1333
+ ...options,
1334
+ });
1335
+ }
1336
+ export const QBAY_GET_USER_CREATED_COLLECTION_INPUT_TYPE = 25;
1337
+ export const QBAY_GET_USER_CREATED_COLLECTION_INPUT_SIZE = 40;
1338
+ const QBAY_GET_USER_CREATED_COLLECTION_INPUT_FIELDS = [
1339
+ {
1340
+ name: 'user',
1341
+ type: 'id',
1342
+ offset: 0,
1343
+ byteLength: 32,
1344
+ },
1345
+ {
1346
+ name: 'offset',
1347
+ type: 'uint32',
1348
+ offset: 32,
1349
+ byteLength: 4,
1350
+ },
1351
+ {
1352
+ name: 'count',
1353
+ type: 'uint32',
1354
+ offset: 36,
1355
+ byteLength: 4,
1356
+ },
1357
+ ];
1358
+ export function buildQbayGetUserCreatedCollectionInput(input, identityToPublicKey = (_identity) => new Uint8Array(32)) {
1359
+ return buildPayload(QBAY_GET_USER_CREATED_COLLECTION_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
1360
+ }
1361
+ const QBAY_GET_USER_CREATED_COLLECTION_OUTPUT_FIELDS = [
1362
+ {
1363
+ name: 'collectionId',
1364
+ type: 'array',
1365
+ offset: 0,
1366
+ byteLength: 4096,
1367
+ arrayLength: 1024,
1368
+ arrayItemType: 'uint32',
1369
+ arrayItemByteLength: 4,
1370
+ },
1371
+ ];
1372
+ export function decodeQbayGetUserCreatedCollectionOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
1373
+ return decodePayload(data, QBAY_GET_USER_CREATED_COLLECTION_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
1374
+ }
1375
+ export async function qbayGetUserCreatedCollection(live, input, options) {
1376
+ return callContractFunction({
1377
+ live,
1378
+ contractIndex: QBAY_CONTRACT_INDEX,
1379
+ inputType: QBAY_GET_USER_CREATED_COLLECTION_INPUT_TYPE,
1380
+ inputSize: QBAY_GET_USER_CREATED_COLLECTION_INPUT_SIZE,
1381
+ inputFields: QBAY_GET_USER_CREATED_COLLECTION_INPUT_FIELDS,
1382
+ outputFields: QBAY_GET_USER_CREATED_COLLECTION_OUTPUT_FIELDS,
1383
+ structs: STRUCTS,
1384
+ input: input,
1385
+ ...options,
1386
+ });
1387
+ }
1388
+ export const QBAY_GET_USER_CREATED_NFT_INPUT_TYPE = 26;
1389
+ export const QBAY_GET_USER_CREATED_NFT_INPUT_SIZE = 40;
1390
+ const QBAY_GET_USER_CREATED_NFT_INPUT_FIELDS = [
1391
+ {
1392
+ name: 'user',
1393
+ type: 'id',
1394
+ offset: 0,
1395
+ byteLength: 32,
1396
+ },
1397
+ {
1398
+ name: 'offset',
1399
+ type: 'uint32',
1400
+ offset: 32,
1401
+ byteLength: 4,
1402
+ },
1403
+ {
1404
+ name: 'count',
1405
+ type: 'uint32',
1406
+ offset: 36,
1407
+ byteLength: 4,
1408
+ },
1409
+ ];
1410
+ export function buildQbayGetUserCreatedNFTInput(input, identityToPublicKey = (_identity) => new Uint8Array(32)) {
1411
+ return buildPayload(QBAY_GET_USER_CREATED_NFT_INPUT_FIELDS, STRUCTS, input, identityToPublicKey);
1412
+ }
1413
+ const QBAY_GET_USER_CREATED_NFT_OUTPUT_FIELDS = [
1414
+ {
1415
+ name: 'NFTId',
1416
+ type: 'array',
1417
+ offset: 0,
1418
+ byteLength: 4096,
1419
+ arrayLength: 1024,
1420
+ arrayItemType: 'uint32',
1421
+ arrayItemByteLength: 4,
1422
+ },
1423
+ ];
1424
+ export function decodeQbayGetUserCreatedNFTOutput(data, publicKeyToIdentity = (_pk) => 'A'.repeat(60)) {
1425
+ return decodePayload(data, QBAY_GET_USER_CREATED_NFT_OUTPUT_FIELDS, STRUCTS, publicKeyToIdentity);
1426
+ }
1427
+ export async function qbayGetUserCreatedNFT(live, input, options) {
1428
+ return callContractFunction({
1429
+ live,
1430
+ contractIndex: QBAY_CONTRACT_INDEX,
1431
+ inputType: QBAY_GET_USER_CREATED_NFT_INPUT_TYPE,
1432
+ inputSize: QBAY_GET_USER_CREATED_NFT_INPUT_SIZE,
1433
+ inputFields: QBAY_GET_USER_CREATED_NFT_INPUT_FIELDS,
1434
+ outputFields: QBAY_GET_USER_CREATED_NFT_OUTPUT_FIELDS,
1435
+ structs: STRUCTS,
1436
+ input: input,
1437
+ ...options,
1438
+ });
1439
+ }
1440
+ export const qbay = {
1441
+ contractIndex: QBAY_CONTRACT_INDEX,
1442
+ getNumberOfNFTForUser: qbayGetNumberOfNFTForUser,
1443
+ getInfoOfNFTUserPossessed: qbayGetInfoOfNFTUserPossessed,
1444
+ getInfoOfMarketplace: qbayGetInfoOfMarketplace,
1445
+ getInfoOfCollectionByCreator: qbayGetInfoOfCollectionByCreator,
1446
+ getInfoOfCollectionById: qbayGetInfoOfCollectionById,
1447
+ getIncomingAuctions: qbayGetIncomingAuctions,
1448
+ getInfoOfNFTById: qbayGetInfoOfNFTById,
1449
+ getUserCreatedCollection: qbayGetUserCreatedCollection,
1450
+ getUserCreatedNFT: qbayGetUserCreatedNFT,
1451
+ buildSettingCFBAndQubicPriceInput: buildQbaySettingCFBAndQubicPriceInput,
1452
+ decodeSettingCFBAndQubicPriceOutput: decodeQbaySettingCFBAndQubicPriceOutput,
1453
+ buildCreateCollectionInput: buildQbayCreateCollectionInput,
1454
+ decodeCreateCollectionOutput: decodeQbayCreateCollectionOutput,
1455
+ buildMintInput: buildQbayMintInput,
1456
+ decodeMintOutput: decodeQbayMintOutput,
1457
+ buildMintOfDropInput: buildQbayMintOfDropInput,
1458
+ decodeMintOfDropOutput: decodeQbayMintOfDropOutput,
1459
+ buildTransferInput: buildQbayTransferInput,
1460
+ decodeTransferOutput: decodeQbayTransferOutput,
1461
+ buildListInMarketInput: buildQbayListInMarketInput,
1462
+ decodeListInMarketOutput: decodeQbayListInMarketOutput,
1463
+ buildBuyInput: buildQbayBuyInput,
1464
+ decodeBuyOutput: decodeQbayBuyOutput,
1465
+ buildCancelSaleInput: buildQbayCancelSaleInput,
1466
+ decodeCancelSaleOutput: decodeQbayCancelSaleOutput,
1467
+ buildListInExchangeInput: buildQbayListInExchangeInput,
1468
+ decodeListInExchangeOutput: decodeQbayListInExchangeOutput,
1469
+ buildCancelExchangeInput: buildQbayCancelExchangeInput,
1470
+ decodeCancelExchangeOutput: decodeQbayCancelExchangeOutput,
1471
+ buildMakeOfferInput: buildQbayMakeOfferInput,
1472
+ decodeMakeOfferOutput: decodeQbayMakeOfferOutput,
1473
+ buildAcceptOfferInput: buildQbayAcceptOfferInput,
1474
+ decodeAcceptOfferOutput: decodeQbayAcceptOfferOutput,
1475
+ buildCancelOfferInput: buildQbayCancelOfferInput,
1476
+ decodeCancelOfferOutput: decodeQbayCancelOfferOutput,
1477
+ buildCreateTraditionalAuctionInput: buildQbayCreateTraditionalAuctionInput,
1478
+ decodeCreateTraditionalAuctionOutput: decodeQbayCreateTraditionalAuctionOutput,
1479
+ buildBidOnTraditionalAuctionInput: buildQbayBidOnTraditionalAuctionInput,
1480
+ decodeBidOnTraditionalAuctionOutput: decodeQbayBidOnTraditionalAuctionOutput,
1481
+ buildTransferShareManagementRightsInput: buildQbayTransferShareManagementRightsInput,
1482
+ decodeTransferShareManagementRightsOutput: decodeQbayTransferShareManagementRightsOutput,
1483
+ buildChangeStatusOfMarketPlaceInput: buildQbayChangeStatusOfMarketPlaceInput,
1484
+ decodeChangeStatusOfMarketPlaceOutput: decodeQbayChangeStatusOfMarketPlaceOutput,
1485
+ };
1486
+ //# sourceMappingURL=qbay.js.map