@sentio/sdk 1.37.0-rc.1 → 1.37.0-rc.3

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 (136) hide show
  1. package/lib/builtin/index.d.ts +0 -2
  2. package/lib/builtin/index.js +1 -3
  3. package/lib/builtin/index.js.map +1 -1
  4. package/lib/core/eth-plugin.js +12 -15
  5. package/lib/core/eth-plugin.js.map +1 -1
  6. package/lib/core/index.d.ts +0 -4
  7. package/lib/core/index.js +1 -9
  8. package/lib/core/index.js.map +1 -1
  9. package/lib/core/numberish.d.ts +1 -1
  10. package/lib/core/numberish.js +5 -13
  11. package/lib/core/numberish.js.map +1 -1
  12. package/lib/core/sui-plugin.js +1 -1
  13. package/lib/core/sui-plugin.js.map +1 -1
  14. package/lib/index.d.ts +1 -1
  15. package/lib/index.js +3 -14
  16. package/lib/index.js.map +1 -1
  17. package/lib/service.d.ts +0 -4
  18. package/lib/service.js +40 -71
  19. package/lib/service.js.map +1 -1
  20. package/package.json +5 -15
  21. package/src/builtin/index.ts +1 -4
  22. package/src/core/eth-plugin.ts +5 -8
  23. package/src/core/index.ts +0 -5
  24. package/src/core/numberish.ts +8 -15
  25. package/src/core/sui-plugin.ts +2 -2
  26. package/src/index.ts +3 -1
  27. package/src/service.ts +13 -71
  28. package/lib/aptos/api.d.ts +0 -2
  29. package/lib/aptos/api.js +0 -14
  30. package/lib/aptos/api.js.map +0 -1
  31. package/lib/aptos/aptos-plugin.d.ts +0 -14
  32. package/lib/aptos/aptos-plugin.js +0 -185
  33. package/lib/aptos/aptos-plugin.js.map +0 -1
  34. package/lib/aptos/aptos-processor.d.ts +0 -75
  35. package/lib/aptos/aptos-processor.js +0 -193
  36. package/lib/aptos/aptos-processor.js.map +0 -1
  37. package/lib/aptos/context.d.ts +0 -22
  38. package/lib/aptos/context.js +0 -65
  39. package/lib/aptos/context.js.map +0 -1
  40. package/lib/aptos/index.d.ts +0 -9
  41. package/lib/aptos/index.js +0 -34
  42. package/lib/aptos/index.js.map +0 -1
  43. package/lib/aptos/models.d.ts +0 -23
  44. package/lib/aptos/models.js +0 -3
  45. package/lib/aptos/models.js.map +0 -1
  46. package/lib/aptos/network.d.ts +0 -14
  47. package/lib/aptos/network.js +0 -46
  48. package/lib/aptos/network.js.map +0 -1
  49. package/lib/aptos/runtime.d.ts +0 -2
  50. package/lib/aptos/runtime.js +0 -16
  51. package/lib/aptos/runtime.js.map +0 -1
  52. package/lib/aptos/type-registry.d.ts +0 -21
  53. package/lib/aptos/type-registry.js +0 -156
  54. package/lib/aptos/type-registry.js.map +0 -1
  55. package/lib/aptos/types.d.ts +0 -9
  56. package/lib/aptos/types.js +0 -135
  57. package/lib/aptos/types.js.map +0 -1
  58. package/lib/aptos/types.test.d.ts +0 -1
  59. package/lib/aptos/types.test.js.map +0 -1
  60. package/lib/aptos/utils.d.ts +0 -7
  61. package/lib/aptos/utils.js +0 -27
  62. package/lib/aptos/utils.js.map +0 -1
  63. package/lib/aptos-codegen/codegen.d.ts +0 -23
  64. package/lib/aptos-codegen/codegen.js +0 -364
  65. package/lib/aptos-codegen/codegen.js.map +0 -1
  66. package/lib/aptos-codegen/typegen.d.ts +0 -17
  67. package/lib/aptos-codegen/typegen.js +0 -142
  68. package/lib/aptos-codegen/typegen.js.map +0 -1
  69. package/lib/builtin/aptos/0x1.d.ts +0 -1913
  70. package/lib/builtin/aptos/0x1.js +0 -2748
  71. package/lib/builtin/aptos/0x1.js.map +0 -1
  72. package/lib/builtin/aptos/0x3.d.ts +0 -482
  73. package/lib/builtin/aptos/0x3.js +0 -526
  74. package/lib/builtin/aptos/0x3.js.map +0 -1
  75. package/lib/builtin/aptos/index.d.ts +0 -2
  76. package/lib/builtin/aptos/index.js +0 -29
  77. package/lib/builtin/aptos/index.js.map +0 -1
  78. package/lib/builtin/solana/index.d.ts +0 -2
  79. package/lib/builtin/solana/index.js +0 -19
  80. package/lib/builtin/solana/index.js.map +0 -1
  81. package/lib/builtin/solana/spl-token-processor.d.ts +0 -39
  82. package/lib/builtin/solana/spl-token-processor.js +0 -258
  83. package/lib/builtin/solana/spl-token-processor.js.map +0 -1
  84. package/lib/builtin/solana/types.d.ts +0 -427
  85. package/lib/builtin/solana/types.js +0 -203
  86. package/lib/builtin/solana/types.js.map +0 -1
  87. package/lib/builtin/solana/wormhole-processor.d.ts +0 -16
  88. package/lib/builtin/solana/wormhole-processor.js +0 -195
  89. package/lib/builtin/solana/wormhole-processor.js.map +0 -1
  90. package/lib/core/solana-context.d.ts +0 -11
  91. package/lib/core/solana-context.js +0 -34
  92. package/lib/core/solana-context.js.map +0 -1
  93. package/lib/core/solana-options.d.ts +0 -8
  94. package/lib/core/solana-options.js +0 -13
  95. package/lib/core/solana-options.js.map +0 -1
  96. package/lib/core/solana-plugin.d.ts +0 -9
  97. package/lib/core/solana-plugin.js +0 -79
  98. package/lib/core/solana-plugin.js.map +0 -1
  99. package/lib/core/solana-processor.d.ts +0 -40
  100. package/lib/core/solana-processor.js +0 -80
  101. package/lib/core/solana-processor.js.map +0 -1
  102. package/lib/solana-codegen/codegen.d.ts +0 -1
  103. package/lib/solana-codegen/codegen.js +0 -113
  104. package/lib/solana-codegen/codegen.js.map +0 -1
  105. package/lib/test-abi-code-gen.d.ts +0 -2
  106. package/lib/test-abi-code-gen.js +0 -20
  107. package/lib/test-abi-code-gen.js.map +0 -1
  108. package/src/abis/aptos/0x1.json +0 -9205
  109. package/src/abis/aptos/0x3.json +0 -1515
  110. package/src/aptos/api.ts +0 -11
  111. package/src/aptos/aptos-plugin.ts +0 -216
  112. package/src/aptos/aptos-processor.ts +0 -305
  113. package/src/aptos/context.ts +0 -74
  114. package/src/aptos/index.ts +0 -10
  115. package/src/aptos/models.ts +0 -34
  116. package/src/aptos/network.ts +0 -42
  117. package/src/aptos/runtime.ts +0 -13
  118. package/src/aptos/type-registry.ts +0 -187
  119. package/src/aptos/types.ts +0 -149
  120. package/src/aptos/utils.ts +0 -26
  121. package/src/aptos-codegen/codegen.ts +0 -428
  122. package/src/aptos-codegen/tsconfig.json +0 -9
  123. package/src/aptos-codegen/typegen.ts +0 -153
  124. package/src/builtin/aptos/0x1.ts +0 -4210
  125. package/src/builtin/aptos/0x3.ts +0 -888
  126. package/src/builtin/aptos/index.ts +0 -2
  127. package/src/builtin/solana/index.ts +0 -2
  128. package/src/builtin/solana/spl-token-processor.ts +0 -298
  129. package/src/builtin/solana/types.ts +0 -279
  130. package/src/builtin/solana/wormhole-processor.ts +0 -178
  131. package/src/core/solana-context.ts +0 -34
  132. package/src/core/solana-options.ts +0 -8
  133. package/src/core/solana-plugin.ts +0 -97
  134. package/src/core/solana-processor.ts +0 -102
  135. package/src/solana-codegen/codegen.ts +0 -116
  136. package/src/test-abi-code-gen.ts +0 -16
@@ -1,888 +0,0 @@
1
- /* Autogenerated file. Do not edit manually. */
2
- /* tslint:disable */
3
- /* eslint-disable */
4
-
5
- /* Generated modules for account 0x3 */
6
-
7
- import { aptos } from "@sentio/sdk";
8
- import { Address, MoveModule } from "aptos-sdk/src/generated";
9
-
10
- import * as _0x1 from "./0x1";
11
-
12
- export class token extends aptos.AptosBaseProcessor {
13
- constructor(options: aptos.AptosBindOptions) {
14
- super("token", options);
15
- }
16
- static DEFAULT_OPTIONS: aptos.AptosBindOptions = {
17
- address: "0x3",
18
- network: aptos.AptosNetwork.MAIN_NET,
19
- };
20
-
21
- static bind(options: Partial<aptos.AptosBindOptions> = {}): token {
22
- return new token({ ...token.DEFAULT_OPTIONS, ...options });
23
- }
24
-
25
- onEntryBurn(
26
- func: (call: token.BurnPayload, ctx: aptos.AptosContext) => void,
27
- filter?: aptos.CallFilter
28
- ): token {
29
- this.onEntryFunctionCall(func, {
30
- ...filter,
31
- function: "token::burn",
32
- });
33
- return this;
34
- }
35
-
36
- onEntryBurnByCreator(
37
- func: (call: token.BurnByCreatorPayload, ctx: aptos.AptosContext) => void,
38
- filter?: aptos.CallFilter
39
- ): token {
40
- this.onEntryFunctionCall(func, {
41
- ...filter,
42
- function: "token::burn_by_creator",
43
- });
44
- return this;
45
- }
46
-
47
- onEntryCreateCollectionScript(
48
- func: (
49
- call: token.CreateCollectionScriptPayload,
50
- ctx: aptos.AptosContext
51
- ) => void,
52
- filter?: aptos.CallFilter
53
- ): token {
54
- this.onEntryFunctionCall(func, {
55
- ...filter,
56
- function: "token::create_collection_script",
57
- });
58
- return this;
59
- }
60
-
61
- onEntryCreateTokenScript(
62
- func: (
63
- call: token.CreateTokenScriptPayload,
64
- ctx: aptos.AptosContext
65
- ) => void,
66
- filter?: aptos.CallFilter
67
- ): token {
68
- this.onEntryFunctionCall(func, {
69
- ...filter,
70
- function: "token::create_token_script",
71
- });
72
- return this;
73
- }
74
-
75
- onEntryDirectTransferScript(
76
- func: (
77
- call: token.DirectTransferScriptPayload,
78
- ctx: aptos.AptosContext
79
- ) => void,
80
- filter?: aptos.CallFilter
81
- ): token {
82
- this.onEntryFunctionCall(func, {
83
- ...filter,
84
- function: "token::direct_transfer_script",
85
- });
86
- return this;
87
- }
88
-
89
- onEntryInitializeTokenScript(
90
- func: (
91
- call: token.InitializeTokenScriptPayload,
92
- ctx: aptos.AptosContext
93
- ) => void,
94
- filter?: aptos.CallFilter
95
- ): token {
96
- this.onEntryFunctionCall(func, {
97
- ...filter,
98
- function: "token::initialize_token_script",
99
- });
100
- return this;
101
- }
102
-
103
- onEntryMintScript(
104
- func: (call: token.MintScriptPayload, ctx: aptos.AptosContext) => void,
105
- filter?: aptos.CallFilter
106
- ): token {
107
- this.onEntryFunctionCall(func, {
108
- ...filter,
109
- function: "token::mint_script",
110
- });
111
- return this;
112
- }
113
-
114
- onEntryMutateTokenProperties(
115
- func: (
116
- call: token.MutateTokenPropertiesPayload,
117
- ctx: aptos.AptosContext
118
- ) => void,
119
- filter?: aptos.CallFilter
120
- ): token {
121
- this.onEntryFunctionCall(func, {
122
- ...filter,
123
- function: "token::mutate_token_properties",
124
- });
125
- return this;
126
- }
127
-
128
- onEntryOptInDirectTransfer(
129
- func: (
130
- call: token.OptInDirectTransferPayload,
131
- ctx: aptos.AptosContext
132
- ) => void,
133
- filter?: aptos.CallFilter
134
- ): token {
135
- this.onEntryFunctionCall(func, {
136
- ...filter,
137
- function: "token::opt_in_direct_transfer",
138
- });
139
- return this;
140
- }
141
-
142
- onEventCreateCollectionEvent(
143
- func: (
144
- event: token.CreateCollectionEventInstance,
145
- ctx: aptos.AptosContext
146
- ) => void
147
- ): token {
148
- this.onEvent(func, {
149
- type: "token::CreateCollectionEvent",
150
- });
151
- return this;
152
- }
153
-
154
- onEventCreateTokenDataEvent(
155
- func: (
156
- event: token.CreateTokenDataEventInstance,
157
- ctx: aptos.AptosContext
158
- ) => void
159
- ): token {
160
- this.onEvent(func, {
161
- type: "token::CreateTokenDataEvent",
162
- });
163
- return this;
164
- }
165
-
166
- onEventMintTokenEvent(
167
- func: (event: token.MintTokenEventInstance, ctx: aptos.AptosContext) => void
168
- ): token {
169
- this.onEvent(func, {
170
- type: "token::MintTokenEvent",
171
- });
172
- return this;
173
- }
174
-
175
- onEventDepositEvent(
176
- func: (event: token.DepositEventInstance, ctx: aptos.AptosContext) => void
177
- ): token {
178
- this.onEvent(func, {
179
- type: "token::DepositEvent",
180
- });
181
- return this;
182
- }
183
-
184
- onEventWithdrawEvent(
185
- func: (event: token.WithdrawEventInstance, ctx: aptos.AptosContext) => void
186
- ): token {
187
- this.onEvent(func, {
188
- type: "token::WithdrawEvent",
189
- });
190
- return this;
191
- }
192
-
193
- onEventBurnTokenEvent(
194
- func: (event: token.BurnTokenEventInstance, ctx: aptos.AptosContext) => void
195
- ): token {
196
- this.onEvent(func, {
197
- type: "token::BurnTokenEvent",
198
- });
199
- return this;
200
- }
201
-
202
- onEventMutateTokenPropertyMapEvent(
203
- func: (
204
- event: token.MutateTokenPropertyMapEventInstance,
205
- ctx: aptos.AptosContext
206
- ) => void
207
- ): token {
208
- this.onEvent(func, {
209
- type: "token::MutateTokenPropertyMapEvent",
210
- });
211
- return this;
212
- }
213
-
214
- loadTypesInternal(registry: aptos.TypeRegistry) {
215
- loadAllTypes(registry);
216
- }
217
- }
218
-
219
- export namespace token {
220
- export class BurnTokenEvent {
221
- static TYPE_QNAME = "0x3::token::BurnTokenEvent";
222
- id: token.TokenId;
223
- amount: bigint;
224
- }
225
-
226
- export interface BurnTokenEventInstance
227
- extends aptos.TypedEventInstance<BurnTokenEvent> {
228
- data_typed: BurnTokenEvent;
229
- type_arguments: [];
230
- }
231
-
232
- export class CollectionData {
233
- static TYPE_QNAME = "0x3::token::CollectionData";
234
- description: string;
235
- name: string;
236
- uri: string;
237
- supply: bigint;
238
- maximum: bigint;
239
- mutability_config: token.CollectionMutabilityConfig;
240
- }
241
-
242
- export class CollectionMutabilityConfig {
243
- static TYPE_QNAME = "0x3::token::CollectionMutabilityConfig";
244
- description: Boolean;
245
- uri: Boolean;
246
- maximum: Boolean;
247
- }
248
-
249
- export class Collections {
250
- static TYPE_QNAME = "0x3::token::Collections";
251
- collection_data: _0x1.table.Table<string, token.CollectionData>;
252
- token_data: _0x1.table.Table<token.TokenDataId, token.TokenData>;
253
- create_collection_events: _0x1.event.EventHandle<token.CreateCollectionEvent>;
254
- create_token_data_events: _0x1.event.EventHandle<token.CreateTokenDataEvent>;
255
- mint_token_events: _0x1.event.EventHandle<token.MintTokenEvent>;
256
- }
257
-
258
- export class CreateCollectionEvent {
259
- static TYPE_QNAME = "0x3::token::CreateCollectionEvent";
260
- creator: Address;
261
- collection_name: string;
262
- uri: string;
263
- description: string;
264
- maximum: bigint;
265
- }
266
-
267
- export interface CreateCollectionEventInstance
268
- extends aptos.TypedEventInstance<CreateCollectionEvent> {
269
- data_typed: CreateCollectionEvent;
270
- type_arguments: [];
271
- }
272
-
273
- export class CreateTokenDataEvent {
274
- static TYPE_QNAME = "0x3::token::CreateTokenDataEvent";
275
- id: token.TokenDataId;
276
- description: string;
277
- maximum: bigint;
278
- uri: string;
279
- royalty_payee_address: Address;
280
- royalty_points_denominator: bigint;
281
- royalty_points_numerator: bigint;
282
- name: string;
283
- mutability_config: token.TokenMutabilityConfig;
284
- property_keys: string[];
285
- property_values: string[];
286
- property_types: string[];
287
- }
288
-
289
- export interface CreateTokenDataEventInstance
290
- extends aptos.TypedEventInstance<CreateTokenDataEvent> {
291
- data_typed: CreateTokenDataEvent;
292
- type_arguments: [];
293
- }
294
-
295
- export class DepositEvent {
296
- static TYPE_QNAME = "0x3::token::DepositEvent";
297
- id: token.TokenId;
298
- amount: bigint;
299
- }
300
-
301
- export interface DepositEventInstance
302
- extends aptos.TypedEventInstance<DepositEvent> {
303
- data_typed: DepositEvent;
304
- type_arguments: [];
305
- }
306
-
307
- export class MintTokenEvent {
308
- static TYPE_QNAME = "0x3::token::MintTokenEvent";
309
- id: token.TokenDataId;
310
- amount: bigint;
311
- }
312
-
313
- export interface MintTokenEventInstance
314
- extends aptos.TypedEventInstance<MintTokenEvent> {
315
- data_typed: MintTokenEvent;
316
- type_arguments: [];
317
- }
318
-
319
- export class MutateTokenPropertyMapEvent {
320
- static TYPE_QNAME = "0x3::token::MutateTokenPropertyMapEvent";
321
- old_id: token.TokenId;
322
- new_id: token.TokenId;
323
- keys: string[];
324
- values: string[];
325
- types: string[];
326
- }
327
-
328
- export interface MutateTokenPropertyMapEventInstance
329
- extends aptos.TypedEventInstance<MutateTokenPropertyMapEvent> {
330
- data_typed: MutateTokenPropertyMapEvent;
331
- type_arguments: [];
332
- }
333
-
334
- export class Royalty {
335
- static TYPE_QNAME = "0x3::token::Royalty";
336
- royalty_points_numerator: bigint;
337
- royalty_points_denominator: bigint;
338
- payee_address: Address;
339
- }
340
-
341
- export class Token {
342
- static TYPE_QNAME = "0x3::token::Token";
343
- id: token.TokenId;
344
- amount: bigint;
345
- token_properties: property_map.PropertyMap;
346
- }
347
-
348
- export class TokenData {
349
- static TYPE_QNAME = "0x3::token::TokenData";
350
- maximum: bigint;
351
- largest_property_version: bigint;
352
- supply: bigint;
353
- uri: string;
354
- royalty: token.Royalty;
355
- name: string;
356
- description: string;
357
- default_properties: property_map.PropertyMap;
358
- mutability_config: token.TokenMutabilityConfig;
359
- }
360
-
361
- export class TokenDataId {
362
- static TYPE_QNAME = "0x3::token::TokenDataId";
363
- creator: Address;
364
- collection: string;
365
- name: string;
366
- }
367
-
368
- export class TokenId {
369
- static TYPE_QNAME = "0x3::token::TokenId";
370
- token_data_id: token.TokenDataId;
371
- property_version: bigint;
372
- }
373
-
374
- export class TokenMutabilityConfig {
375
- static TYPE_QNAME = "0x3::token::TokenMutabilityConfig";
376
- maximum: Boolean;
377
- uri: Boolean;
378
- royalty: Boolean;
379
- description: Boolean;
380
- properties: Boolean;
381
- }
382
-
383
- export class TokenStore {
384
- static TYPE_QNAME = "0x3::token::TokenStore";
385
- tokens: _0x1.table.Table<token.TokenId, token.Token>;
386
- direct_transfer: Boolean;
387
- deposit_events: _0x1.event.EventHandle<token.DepositEvent>;
388
- withdraw_events: _0x1.event.EventHandle<token.WithdrawEvent>;
389
- burn_events: _0x1.event.EventHandle<token.BurnTokenEvent>;
390
- mutate_token_property_events: _0x1.event.EventHandle<token.MutateTokenPropertyMapEvent>;
391
- }
392
-
393
- export class WithdrawCapability {
394
- static TYPE_QNAME = "0x3::token::WithdrawCapability";
395
- token_owner: Address;
396
- token_id: token.TokenId;
397
- amount: bigint;
398
- expiration_sec: bigint;
399
- }
400
-
401
- export class WithdrawEvent {
402
- static TYPE_QNAME = "0x3::token::WithdrawEvent";
403
- id: token.TokenId;
404
- amount: bigint;
405
- }
406
-
407
- export interface WithdrawEventInstance
408
- extends aptos.TypedEventInstance<WithdrawEvent> {
409
- data_typed: WithdrawEvent;
410
- type_arguments: [];
411
- }
412
-
413
- export interface BurnPayload
414
- extends aptos.TypedEntryFunctionPayload<
415
- [Address, string, string, bigint, bigint]
416
- > {
417
- arguments_typed: [Address, string, string, bigint, bigint];
418
- type_arguments: [];
419
- }
420
-
421
- export interface BurnByCreatorPayload
422
- extends aptos.TypedEntryFunctionPayload<
423
- [Address, string, string, bigint, bigint]
424
- > {
425
- arguments_typed: [Address, string, string, bigint, bigint];
426
- type_arguments: [];
427
- }
428
-
429
- export interface CreateCollectionScriptPayload
430
- extends aptos.TypedEntryFunctionPayload<
431
- [string, string, string, bigint, Boolean[]]
432
- > {
433
- arguments_typed: [string, string, string, bigint, Boolean[]];
434
- type_arguments: [];
435
- }
436
-
437
- export interface CreateTokenScriptPayload
438
- extends aptos.TypedEntryFunctionPayload<
439
- [
440
- string,
441
- string,
442
- string,
443
- bigint,
444
- bigint,
445
- string,
446
- Address,
447
- bigint,
448
- bigint,
449
- Boolean[],
450
- string[],
451
- string[],
452
- string[]
453
- ]
454
- > {
455
- arguments_typed: [
456
- string,
457
- string,
458
- string,
459
- bigint,
460
- bigint,
461
- string,
462
- Address,
463
- bigint,
464
- bigint,
465
- Boolean[],
466
- string[],
467
- string[],
468
- string[]
469
- ];
470
- type_arguments: [];
471
- }
472
-
473
- export interface DirectTransferScriptPayload
474
- extends aptos.TypedEntryFunctionPayload<
475
- [Address, Address, string, string, bigint, bigint]
476
- > {
477
- arguments_typed: [Address, Address, string, string, bigint, bigint];
478
- type_arguments: [];
479
- }
480
-
481
- export interface InitializeTokenScriptPayload
482
- extends aptos.TypedEntryFunctionPayload<[]> {
483
- arguments_typed: [];
484
- type_arguments: [];
485
- }
486
-
487
- export interface MintScriptPayload
488
- extends aptos.TypedEntryFunctionPayload<[Address, string, string, bigint]> {
489
- arguments_typed: [Address, string, string, bigint];
490
- type_arguments: [];
491
- }
492
-
493
- export interface MutateTokenPropertiesPayload
494
- extends aptos.TypedEntryFunctionPayload<
495
- [
496
- Address,
497
- Address,
498
- string,
499
- string,
500
- bigint,
501
- bigint,
502
- string[],
503
- string[],
504
- string[]
505
- ]
506
- > {
507
- arguments_typed: [
508
- Address,
509
- Address,
510
- string,
511
- string,
512
- bigint,
513
- bigint,
514
- string[],
515
- string[],
516
- string[]
517
- ];
518
- type_arguments: [];
519
- }
520
-
521
- export interface OptInDirectTransferPayload
522
- extends aptos.TypedEntryFunctionPayload<[Boolean]> {
523
- arguments_typed: [Boolean];
524
- type_arguments: [];
525
- }
526
-
527
- export function loadTypes(_r: aptos.TypeRegistry) {
528
- loadAllTypes(_r);
529
- }
530
- export const ABI: MoveModule = JSON.parse(
531
- '{"address":"0x3","name":"token","friends":[],"exposed_functions":[{"name":"balance_of","visibility":"public","is_entry":false,"generic_type_params":[],"params":["address","0x3::token::TokenId"],"return":["u64"]},{"name":"burn","visibility":"public","is_entry":true,"generic_type_params":[],"params":["&signer","address","0x1::string::String","0x1::string::String","u64","u64"],"return":[]},{"name":"burn_by_creator","visibility":"public","is_entry":true,"generic_type_params":[],"params":["&signer","address","0x1::string::String","0x1::string::String","u64","u64"],"return":[]},{"name":"check_collection_exists","visibility":"public","is_entry":false,"generic_type_params":[],"params":["address","0x1::string::String"],"return":["bool"]},{"name":"check_tokendata_exists","visibility":"public","is_entry":false,"generic_type_params":[],"params":["address","0x1::string::String","0x1::string::String"],"return":["bool"]},{"name":"create_collection","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&signer","0x1::string::String","0x1::string::String","0x1::string::String","u64","vector<bool>"],"return":[]},{"name":"create_collection_mutability_config","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&vector<bool>"],"return":["0x3::token::CollectionMutabilityConfig"]},{"name":"create_collection_script","visibility":"public","is_entry":true,"generic_type_params":[],"params":["&signer","0x1::string::String","0x1::string::String","0x1::string::String","u64","vector<bool>"],"return":[]},{"name":"create_token_data_id","visibility":"public","is_entry":false,"generic_type_params":[],"params":["address","0x1::string::String","0x1::string::String"],"return":["0x3::token::TokenDataId"]},{"name":"create_token_id","visibility":"public","is_entry":false,"generic_type_params":[],"params":["0x3::token::TokenDataId","u64"],"return":["0x3::token::TokenId"]},{"name":"create_token_id_raw","visibility":"public","is_entry":false,"generic_type_params":[],"params":["address","0x1::string::String","0x1::string::String","u64"],"return":["0x3::token::TokenId"]},{"name":"create_token_mutability_config","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&vector<bool>"],"return":["0x3::token::TokenMutabilityConfig"]},{"name":"create_token_script","visibility":"public","is_entry":true,"generic_type_params":[],"params":["&signer","0x1::string::String","0x1::string::String","0x1::string::String","u64","u64","0x1::string::String","address","u64","u64","vector<bool>","vector<0x1::string::String>","vector<vector<u8>>","vector<0x1::string::String>"],"return":[]},{"name":"create_tokendata","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&signer","0x1::string::String","0x1::string::String","0x1::string::String","u64","0x1::string::String","address","u64","u64","0x3::token::TokenMutabilityConfig","vector<0x1::string::String>","vector<vector<u8>>","vector<0x1::string::String>"],"return":["0x3::token::TokenDataId"]},{"name":"create_withdraw_capability","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&signer","0x3::token::TokenId","u64","u64"],"return":["0x3::token::WithdrawCapability"]},{"name":"deposit_token","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&signer","0x3::token::Token"],"return":[]},{"name":"direct_deposit_with_opt_in","visibility":"public","is_entry":false,"generic_type_params":[],"params":["address","0x3::token::Token"],"return":[]},{"name":"direct_transfer","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&signer","&signer","0x3::token::TokenId","u64"],"return":[]},{"name":"direct_transfer_script","visibility":"public","is_entry":true,"generic_type_params":[],"params":["&signer","&signer","address","0x1::string::String","0x1::string::String","u64","u64"],"return":[]},{"name":"get_collection_supply","visibility":"public","is_entry":false,"generic_type_params":[],"params":["address","0x1::string::String"],"return":["0x1::option::Option<u64>"]},{"name":"get_property_map","visibility":"public","is_entry":false,"generic_type_params":[],"params":["address","0x3::token::TokenId"],"return":["0x3::property_map::PropertyMap"]},{"name":"get_royalty","visibility":"public","is_entry":false,"generic_type_params":[],"params":["0x3::token::TokenId"],"return":["0x3::token::Royalty"]},{"name":"get_royalty_denominator","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&0x3::token::Royalty"],"return":["u64"]},{"name":"get_royalty_numerator","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&0x3::token::Royalty"],"return":["u64"]},{"name":"get_royalty_payee","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&0x3::token::Royalty"],"return":["address"]},{"name":"get_token_amount","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&0x3::token::Token"],"return":["u64"]},{"name":"get_token_data_id_fields","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&0x3::token::TokenDataId"],"return":["address","0x1::string::String","0x1::string::String"]},{"name":"get_token_id","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&0x3::token::Token"],"return":["0x3::token::TokenId"]},{"name":"get_token_id_fields","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&0x3::token::TokenId"],"return":["address","0x1::string::String","0x1::string::String","u64"]},{"name":"get_token_supply","visibility":"public","is_entry":false,"generic_type_params":[],"params":["address","0x3::token::TokenDataId"],"return":["0x1::option::Option<u64>"]},{"name":"get_tokendata_largest_property_version","visibility":"public","is_entry":false,"generic_type_params":[],"params":["address","0x3::token::TokenDataId"],"return":["u64"]},{"name":"get_tokendata_uri","visibility":"public","is_entry":false,"generic_type_params":[],"params":["address","0x3::token::TokenDataId"],"return":["0x1::string::String"]},{"name":"has_token_store","visibility":"public","is_entry":false,"generic_type_params":[],"params":["address"],"return":["bool"]},{"name":"initialize_token","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&signer","0x3::token::TokenId"],"return":[]},{"name":"initialize_token_script","visibility":"public","is_entry":true,"generic_type_params":[],"params":["&signer"],"return":[]},{"name":"initialize_token_store","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&signer"],"return":[]},{"name":"merge","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&mut 0x3::token::Token","0x3::token::Token"],"return":[]},{"name":"mint_script","visibility":"public","is_entry":true,"generic_type_params":[],"params":["&signer","address","0x1::string::String","0x1::string::String","u64"],"return":[]},{"name":"mint_token","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&signer","0x3::token::TokenDataId","u64"],"return":["0x3::token::TokenId"]},{"name":"mint_token_to","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&signer","address","0x3::token::TokenDataId","u64"],"return":[]},{"name":"mutate_one_token","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&signer","address","0x3::token::TokenId","vector<0x1::string::String>","vector<vector<u8>>","vector<0x1::string::String>"],"return":["0x3::token::TokenId"]},{"name":"mutate_token_properties","visibility":"public","is_entry":true,"generic_type_params":[],"params":["&signer","address","address","0x1::string::String","0x1::string::String","u64","u64","vector<0x1::string::String>","vector<vector<u8>>","vector<0x1::string::String>"],"return":[]},{"name":"mutate_tokendata_property","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&signer","0x3::token::TokenDataId","vector<0x1::string::String>","vector<vector<u8>>","vector<0x1::string::String>"],"return":[]},{"name":"mutate_tokendata_uri","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&signer","0x3::token::TokenDataId","0x1::string::String"],"return":[]},{"name":"opt_in_direct_transfer","visibility":"public","is_entry":true,"generic_type_params":[],"params":["&signer","bool"],"return":[]},{"name":"split","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&mut 0x3::token::Token","u64"],"return":["0x3::token::Token"]},{"name":"token_id","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&0x3::token::Token"],"return":["&0x3::token::TokenId"]},{"name":"transfer","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&signer","0x3::token::TokenId","address","u64"],"return":[]},{"name":"withdraw_token","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&signer","0x3::token::TokenId","u64"],"return":["0x3::token::Token"]},{"name":"withdraw_with_capability","visibility":"public","is_entry":false,"generic_type_params":[],"params":["0x3::token::WithdrawCapability"],"return":["0x3::token::Token"]}],"structs":[{"name":"BurnTokenEvent","is_native":false,"abilities":["drop","store"],"generic_type_params":[],"fields":[{"name":"id","type":"0x3::token::TokenId"},{"name":"amount","type":"u64"}]},{"name":"CollectionData","is_native":false,"abilities":["store"],"generic_type_params":[],"fields":[{"name":"description","type":"0x1::string::String"},{"name":"name","type":"0x1::string::String"},{"name":"uri","type":"0x1::string::String"},{"name":"supply","type":"u64"},{"name":"maximum","type":"u64"},{"name":"mutability_config","type":"0x3::token::CollectionMutabilityConfig"}]},{"name":"CollectionMutabilityConfig","is_native":false,"abilities":["copy","drop","store"],"generic_type_params":[],"fields":[{"name":"description","type":"bool"},{"name":"uri","type":"bool"},{"name":"maximum","type":"bool"}]},{"name":"Collections","is_native":false,"abilities":["key"],"generic_type_params":[],"fields":[{"name":"collection_data","type":"0x1::table::Table<0x1::string::String, 0x3::token::CollectionData>"},{"name":"token_data","type":"0x1::table::Table<0x3::token::TokenDataId, 0x3::token::TokenData>"},{"name":"create_collection_events","type":"0x1::event::EventHandle<0x3::token::CreateCollectionEvent>"},{"name":"create_token_data_events","type":"0x1::event::EventHandle<0x3::token::CreateTokenDataEvent>"},{"name":"mint_token_events","type":"0x1::event::EventHandle<0x3::token::MintTokenEvent>"}]},{"name":"CreateCollectionEvent","is_native":false,"abilities":["drop","store"],"generic_type_params":[],"fields":[{"name":"creator","type":"address"},{"name":"collection_name","type":"0x1::string::String"},{"name":"uri","type":"0x1::string::String"},{"name":"description","type":"0x1::string::String"},{"name":"maximum","type":"u64"}]},{"name":"CreateTokenDataEvent","is_native":false,"abilities":["drop","store"],"generic_type_params":[],"fields":[{"name":"id","type":"0x3::token::TokenDataId"},{"name":"description","type":"0x1::string::String"},{"name":"maximum","type":"u64"},{"name":"uri","type":"0x1::string::String"},{"name":"royalty_payee_address","type":"address"},{"name":"royalty_points_denominator","type":"u64"},{"name":"royalty_points_numerator","type":"u64"},{"name":"name","type":"0x1::string::String"},{"name":"mutability_config","type":"0x3::token::TokenMutabilityConfig"},{"name":"property_keys","type":"vector<0x1::string::String>"},{"name":"property_values","type":"vector<vector<u8>>"},{"name":"property_types","type":"vector<0x1::string::String>"}]},{"name":"DepositEvent","is_native":false,"abilities":["drop","store"],"generic_type_params":[],"fields":[{"name":"id","type":"0x3::token::TokenId"},{"name":"amount","type":"u64"}]},{"name":"MintTokenEvent","is_native":false,"abilities":["drop","store"],"generic_type_params":[],"fields":[{"name":"id","type":"0x3::token::TokenDataId"},{"name":"amount","type":"u64"}]},{"name":"MutateTokenPropertyMapEvent","is_native":false,"abilities":["drop","store"],"generic_type_params":[],"fields":[{"name":"old_id","type":"0x3::token::TokenId"},{"name":"new_id","type":"0x3::token::TokenId"},{"name":"keys","type":"vector<0x1::string::String>"},{"name":"values","type":"vector<vector<u8>>"},{"name":"types","type":"vector<0x1::string::String>"}]},{"name":"Royalty","is_native":false,"abilities":["copy","drop","store"],"generic_type_params":[],"fields":[{"name":"royalty_points_numerator","type":"u64"},{"name":"royalty_points_denominator","type":"u64"},{"name":"payee_address","type":"address"}]},{"name":"Token","is_native":false,"abilities":["store"],"generic_type_params":[],"fields":[{"name":"id","type":"0x3::token::TokenId"},{"name":"amount","type":"u64"},{"name":"token_properties","type":"0x3::property_map::PropertyMap"}]},{"name":"TokenData","is_native":false,"abilities":["store"],"generic_type_params":[],"fields":[{"name":"maximum","type":"u64"},{"name":"largest_property_version","type":"u64"},{"name":"supply","type":"u64"},{"name":"uri","type":"0x1::string::String"},{"name":"royalty","type":"0x3::token::Royalty"},{"name":"name","type":"0x1::string::String"},{"name":"description","type":"0x1::string::String"},{"name":"default_properties","type":"0x3::property_map::PropertyMap"},{"name":"mutability_config","type":"0x3::token::TokenMutabilityConfig"}]},{"name":"TokenDataId","is_native":false,"abilities":["copy","drop","store"],"generic_type_params":[],"fields":[{"name":"creator","type":"address"},{"name":"collection","type":"0x1::string::String"},{"name":"name","type":"0x1::string::String"}]},{"name":"TokenId","is_native":false,"abilities":["copy","drop","store"],"generic_type_params":[],"fields":[{"name":"token_data_id","type":"0x3::token::TokenDataId"},{"name":"property_version","type":"u64"}]},{"name":"TokenMutabilityConfig","is_native":false,"abilities":["copy","drop","store"],"generic_type_params":[],"fields":[{"name":"maximum","type":"bool"},{"name":"uri","type":"bool"},{"name":"royalty","type":"bool"},{"name":"description","type":"bool"},{"name":"properties","type":"bool"}]},{"name":"TokenStore","is_native":false,"abilities":["key"],"generic_type_params":[],"fields":[{"name":"tokens","type":"0x1::table::Table<0x3::token::TokenId, 0x3::token::Token>"},{"name":"direct_transfer","type":"bool"},{"name":"deposit_events","type":"0x1::event::EventHandle<0x3::token::DepositEvent>"},{"name":"withdraw_events","type":"0x1::event::EventHandle<0x3::token::WithdrawEvent>"},{"name":"burn_events","type":"0x1::event::EventHandle<0x3::token::BurnTokenEvent>"},{"name":"mutate_token_property_events","type":"0x1::event::EventHandle<0x3::token::MutateTokenPropertyMapEvent>"}]},{"name":"WithdrawCapability","is_native":false,"abilities":["drop","store"],"generic_type_params":[],"fields":[{"name":"token_owner","type":"address"},{"name":"token_id","type":"0x3::token::TokenId"},{"name":"amount","type":"u64"},{"name":"expiration_sec","type":"u64"}]},{"name":"WithdrawEvent","is_native":false,"abilities":["drop","store"],"generic_type_params":[],"fields":[{"name":"id","type":"0x3::token::TokenId"},{"name":"amount","type":"u64"}]}]}'
532
- );
533
- }
534
-
535
- export namespace property_map {
536
- export class PropertyMap {
537
- static TYPE_QNAME = "0x3::property_map::PropertyMap";
538
- map: _0x1.simple_map.SimpleMap<string, property_map.PropertyValue>;
539
- }
540
-
541
- export class PropertyValue {
542
- static TYPE_QNAME = "0x3::property_map::PropertyValue";
543
- value: string;
544
- type: string;
545
- }
546
-
547
- export function loadTypes(_r: aptos.TypeRegistry) {
548
- loadAllTypes(_r);
549
- }
550
- export const ABI: MoveModule = JSON.parse(
551
- '{"address":"0x3","name":"property_map","friends":[],"exposed_functions":[{"name":"add","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&mut 0x3::property_map::PropertyMap","0x1::string::String","0x3::property_map::PropertyValue"],"return":[]},{"name":"borrow","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&0x3::property_map::PropertyMap","&0x1::string::String"],"return":["&0x3::property_map::PropertyValue"]},{"name":"borrow_type","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&0x3::property_map::PropertyValue"],"return":["0x1::string::String"]},{"name":"borrow_value","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&0x3::property_map::PropertyValue"],"return":["vector<u8>"]},{"name":"contains_key","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&0x3::property_map::PropertyMap","&0x1::string::String"],"return":["bool"]},{"name":"create_property_value","visibility":"public","is_entry":false,"generic_type_params":[{"constraints":["copy"]}],"params":["&T0"],"return":["0x3::property_map::PropertyValue"]},{"name":"create_property_value_raw","visibility":"public","is_entry":false,"generic_type_params":[],"params":["vector<u8>","0x1::string::String"],"return":["0x3::property_map::PropertyValue"]},{"name":"empty","visibility":"public","is_entry":false,"generic_type_params":[],"params":[],"return":["0x3::property_map::PropertyMap"]},{"name":"length","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&0x3::property_map::PropertyMap"],"return":["u64"]},{"name":"new","visibility":"public","is_entry":false,"generic_type_params":[],"params":["vector<0x1::string::String>","vector<vector<u8>>","vector<0x1::string::String>"],"return":["0x3::property_map::PropertyMap"]},{"name":"read_address","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&0x3::property_map::PropertyMap","&0x1::string::String"],"return":["address"]},{"name":"read_bool","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&0x3::property_map::PropertyMap","&0x1::string::String"],"return":["bool"]},{"name":"read_string","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&0x3::property_map::PropertyMap","&0x1::string::String"],"return":["0x1::string::String"]},{"name":"read_u128","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&0x3::property_map::PropertyMap","&0x1::string::String"],"return":["u128"]},{"name":"read_u64","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&0x3::property_map::PropertyMap","&0x1::string::String"],"return":["u64"]},{"name":"read_u8","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&0x3::property_map::PropertyMap","&0x1::string::String"],"return":["u8"]},{"name":"remove","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&mut 0x3::property_map::PropertyMap","&0x1::string::String"],"return":["0x1::string::String","0x3::property_map::PropertyValue"]},{"name":"update_property_map","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&mut 0x3::property_map::PropertyMap","vector<0x1::string::String>","vector<vector<u8>>","vector<0x1::string::String>"],"return":[]},{"name":"update_property_value","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&mut 0x3::property_map::PropertyMap","&0x1::string::String","0x3::property_map::PropertyValue"],"return":[]}],"structs":[{"name":"PropertyMap","is_native":false,"abilities":["copy","drop","store"],"generic_type_params":[],"fields":[{"name":"map","type":"0x1::simple_map::SimpleMap<0x1::string::String, 0x3::property_map::PropertyValue>"}]},{"name":"PropertyValue","is_native":false,"abilities":["copy","drop","store"],"generic_type_params":[],"fields":[{"name":"value","type":"vector<u8>"},{"name":"type","type":"0x1::string::String"}]}]}'
552
- );
553
- }
554
-
555
- export class token_coin_swap extends aptos.AptosBaseProcessor {
556
- constructor(options: aptos.AptosBindOptions) {
557
- super("token_coin_swap", options);
558
- }
559
- static DEFAULT_OPTIONS: aptos.AptosBindOptions = {
560
- address: "0x3",
561
- network: aptos.AptosNetwork.MAIN_NET,
562
- };
563
-
564
- static bind(options: Partial<aptos.AptosBindOptions> = {}): token_coin_swap {
565
- return new token_coin_swap({
566
- ...token_coin_swap.DEFAULT_OPTIONS,
567
- ...options,
568
- });
569
- }
570
-
571
- onEntryListTokenForSwap(
572
- func: (
573
- call: token_coin_swap.ListTokenForSwapPayload,
574
- ctx: aptos.AptosContext
575
- ) => void,
576
- filter?: aptos.CallFilter
577
- ): token_coin_swap {
578
- this.onEntryFunctionCall(func, {
579
- ...filter,
580
- function: "token_coin_swap::list_token_for_swap",
581
- });
582
- return this;
583
- }
584
-
585
- onEventTokenListingEvent(
586
- func: (
587
- event: token_coin_swap.TokenListingEventInstance,
588
- ctx: aptos.AptosContext
589
- ) => void
590
- ): token_coin_swap {
591
- this.onEvent(func, {
592
- type: "token_coin_swap::TokenListingEvent",
593
- });
594
- return this;
595
- }
596
-
597
- onEventTokenSwapEvent(
598
- func: (
599
- event: token_coin_swap.TokenSwapEventInstance,
600
- ctx: aptos.AptosContext
601
- ) => void
602
- ): token_coin_swap {
603
- this.onEvent(func, {
604
- type: "token_coin_swap::TokenSwapEvent",
605
- });
606
- return this;
607
- }
608
-
609
- loadTypesInternal(registry: aptos.TypeRegistry) {
610
- loadAllTypes(registry);
611
- }
612
- }
613
-
614
- export namespace token_coin_swap {
615
- export class TokenCoinSwap<T0> {
616
- static TYPE_QNAME = "0x3::token_coin_swap::TokenCoinSwap";
617
- token_amount: bigint;
618
- min_price_per_token: bigint;
619
- }
620
-
621
- export class TokenEscrow {
622
- static TYPE_QNAME = "0x3::token_coin_swap::TokenEscrow";
623
- token: token.Token;
624
- locked_until_secs: bigint;
625
- }
626
-
627
- export class TokenListingEvent {
628
- static TYPE_QNAME = "0x3::token_coin_swap::TokenListingEvent";
629
- token_id: token.TokenId;
630
- amount: bigint;
631
- min_price: bigint;
632
- locked_until_secs: bigint;
633
- coin_type_info: _0x1.type_info.TypeInfo;
634
- }
635
-
636
- export interface TokenListingEventInstance
637
- extends aptos.TypedEventInstance<TokenListingEvent> {
638
- data_typed: TokenListingEvent;
639
- type_arguments: [];
640
- }
641
-
642
- export class TokenListings<T0> {
643
- static TYPE_QNAME = "0x3::token_coin_swap::TokenListings";
644
- listings: _0x1.table.Table<
645
- token.TokenId,
646
- token_coin_swap.TokenCoinSwap<T0>
647
- >;
648
- listing_events: _0x1.event.EventHandle<token_coin_swap.TokenListingEvent>;
649
- swap_events: _0x1.event.EventHandle<token_coin_swap.TokenSwapEvent>;
650
- }
651
-
652
- export class TokenStoreEscrow {
653
- static TYPE_QNAME = "0x3::token_coin_swap::TokenStoreEscrow";
654
- token_escrows: _0x1.table.Table<token.TokenId, token_coin_swap.TokenEscrow>;
655
- }
656
-
657
- export class TokenSwapEvent {
658
- static TYPE_QNAME = "0x3::token_coin_swap::TokenSwapEvent";
659
- token_id: token.TokenId;
660
- token_buyer: Address;
661
- token_amount: bigint;
662
- coin_amount: bigint;
663
- coin_type_info: _0x1.type_info.TypeInfo;
664
- }
665
-
666
- export interface TokenSwapEventInstance
667
- extends aptos.TypedEventInstance<TokenSwapEvent> {
668
- data_typed: TokenSwapEvent;
669
- type_arguments: [];
670
- }
671
-
672
- export interface ListTokenForSwapPayload<T0 = any>
673
- extends aptos.TypedEntryFunctionPayload<
674
- [Address, string, string, bigint, bigint, bigint, bigint]
675
- > {
676
- arguments_typed: [Address, string, string, bigint, bigint, bigint, bigint];
677
- type_arguments: [string];
678
- }
679
-
680
- export function loadTypes(_r: aptos.TypeRegistry) {
681
- loadAllTypes(_r);
682
- }
683
- export const ABI: MoveModule = JSON.parse(
684
- '{"address":"0x3","name":"token_coin_swap","friends":[],"exposed_functions":[{"name":"cancel_token_listing","visibility":"public","is_entry":false,"generic_type_params":[{"constraints":[]}],"params":["&signer","0x3::token::TokenId","u64"],"return":[]},{"name":"deposit_token_to_escrow","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&signer","0x3::token::TokenId","0x3::token::Token","u64"],"return":[]},{"name":"does_listing_exist","visibility":"public","is_entry":false,"generic_type_params":[{"constraints":[]}],"params":["address","0x3::token::TokenId"],"return":["bool"]},{"name":"exchange_coin_for_token","visibility":"public","is_entry":false,"generic_type_params":[{"constraints":[]}],"params":["&signer","u64","address","address","0x1::string::String","0x1::string::String","u64","u64"],"return":[]},{"name":"list_token_for_swap","visibility":"public","is_entry":true,"generic_type_params":[{"constraints":[]}],"params":["&signer","address","0x1::string::String","0x1::string::String","u64","u64","u64","u64"],"return":[]},{"name":"withdraw_token_from_escrow","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&signer","0x3::token::TokenId","u64"],"return":["0x3::token::Token"]}],"structs":[{"name":"TokenCoinSwap","is_native":false,"abilities":["drop","store"],"generic_type_params":[{"constraints":[]}],"fields":[{"name":"token_amount","type":"u64"},{"name":"min_price_per_token","type":"u64"}]},{"name":"TokenEscrow","is_native":false,"abilities":["store"],"generic_type_params":[],"fields":[{"name":"token","type":"0x3::token::Token"},{"name":"locked_until_secs","type":"u64"}]},{"name":"TokenListingEvent","is_native":false,"abilities":["drop","store"],"generic_type_params":[],"fields":[{"name":"token_id","type":"0x3::token::TokenId"},{"name":"amount","type":"u64"},{"name":"min_price","type":"u64"},{"name":"locked_until_secs","type":"u64"},{"name":"coin_type_info","type":"0x1::type_info::TypeInfo"}]},{"name":"TokenListings","is_native":false,"abilities":["key"],"generic_type_params":[{"constraints":[]}],"fields":[{"name":"listings","type":"0x1::table::Table<0x3::token::TokenId, 0x3::token_coin_swap::TokenCoinSwap<T0>>"},{"name":"listing_events","type":"0x1::event::EventHandle<0x3::token_coin_swap::TokenListingEvent>"},{"name":"swap_events","type":"0x1::event::EventHandle<0x3::token_coin_swap::TokenSwapEvent>"}]},{"name":"TokenStoreEscrow","is_native":false,"abilities":["key"],"generic_type_params":[],"fields":[{"name":"token_escrows","type":"0x1::table::Table<0x3::token::TokenId, 0x3::token_coin_swap::TokenEscrow>"}]},{"name":"TokenSwapEvent","is_native":false,"abilities":["drop","store"],"generic_type_params":[],"fields":[{"name":"token_id","type":"0x3::token::TokenId"},{"name":"token_buyer","type":"address"},{"name":"token_amount","type":"u64"},{"name":"coin_amount","type":"u64"},{"name":"coin_type_info","type":"0x1::type_info::TypeInfo"}]}]}'
685
- );
686
- }
687
-
688
- export class token_transfers extends aptos.AptosBaseProcessor {
689
- constructor(options: aptos.AptosBindOptions) {
690
- super("token_transfers", options);
691
- }
692
- static DEFAULT_OPTIONS: aptos.AptosBindOptions = {
693
- address: "0x3",
694
- network: aptos.AptosNetwork.MAIN_NET,
695
- };
696
-
697
- static bind(options: Partial<aptos.AptosBindOptions> = {}): token_transfers {
698
- return new token_transfers({
699
- ...token_transfers.DEFAULT_OPTIONS,
700
- ...options,
701
- });
702
- }
703
-
704
- onEntryCancelOfferScript(
705
- func: (
706
- call: token_transfers.CancelOfferScriptPayload,
707
- ctx: aptos.AptosContext
708
- ) => void,
709
- filter?: aptos.CallFilter
710
- ): token_transfers {
711
- this.onEntryFunctionCall(func, {
712
- ...filter,
713
- function: "token_transfers::cancel_offer_script",
714
- });
715
- return this;
716
- }
717
-
718
- onEntryClaimScript(
719
- func: (
720
- call: token_transfers.ClaimScriptPayload,
721
- ctx: aptos.AptosContext
722
- ) => void,
723
- filter?: aptos.CallFilter
724
- ): token_transfers {
725
- this.onEntryFunctionCall(func, {
726
- ...filter,
727
- function: "token_transfers::claim_script",
728
- });
729
- return this;
730
- }
731
-
732
- onEntryOfferScript(
733
- func: (
734
- call: token_transfers.OfferScriptPayload,
735
- ctx: aptos.AptosContext
736
- ) => void,
737
- filter?: aptos.CallFilter
738
- ): token_transfers {
739
- this.onEntryFunctionCall(func, {
740
- ...filter,
741
- function: "token_transfers::offer_script",
742
- });
743
- return this;
744
- }
745
-
746
- onEventTokenOfferEvent(
747
- func: (
748
- event: token_transfers.TokenOfferEventInstance,
749
- ctx: aptos.AptosContext
750
- ) => void
751
- ): token_transfers {
752
- this.onEvent(func, {
753
- type: "token_transfers::TokenOfferEvent",
754
- });
755
- return this;
756
- }
757
-
758
- onEventTokenCancelOfferEvent(
759
- func: (
760
- event: token_transfers.TokenCancelOfferEventInstance,
761
- ctx: aptos.AptosContext
762
- ) => void
763
- ): token_transfers {
764
- this.onEvent(func, {
765
- type: "token_transfers::TokenCancelOfferEvent",
766
- });
767
- return this;
768
- }
769
-
770
- onEventTokenClaimEvent(
771
- func: (
772
- event: token_transfers.TokenClaimEventInstance,
773
- ctx: aptos.AptosContext
774
- ) => void
775
- ): token_transfers {
776
- this.onEvent(func, {
777
- type: "token_transfers::TokenClaimEvent",
778
- });
779
- return this;
780
- }
781
-
782
- loadTypesInternal(registry: aptos.TypeRegistry) {
783
- loadAllTypes(registry);
784
- }
785
- }
786
-
787
- export namespace token_transfers {
788
- export class PendingClaims {
789
- static TYPE_QNAME = "0x3::token_transfers::PendingClaims";
790
- pending_claims: _0x1.table.Table<token_transfers.TokenOfferId, token.Token>;
791
- offer_events: _0x1.event.EventHandle<token_transfers.TokenOfferEvent>;
792
- cancel_offer_events: _0x1.event.EventHandle<token_transfers.TokenCancelOfferEvent>;
793
- claim_events: _0x1.event.EventHandle<token_transfers.TokenClaimEvent>;
794
- }
795
-
796
- export class TokenCancelOfferEvent {
797
- static TYPE_QNAME = "0x3::token_transfers::TokenCancelOfferEvent";
798
- to_address: Address;
799
- token_id: token.TokenId;
800
- amount: bigint;
801
- }
802
-
803
- export interface TokenCancelOfferEventInstance
804
- extends aptos.TypedEventInstance<TokenCancelOfferEvent> {
805
- data_typed: TokenCancelOfferEvent;
806
- type_arguments: [];
807
- }
808
-
809
- export class TokenClaimEvent {
810
- static TYPE_QNAME = "0x3::token_transfers::TokenClaimEvent";
811
- to_address: Address;
812
- token_id: token.TokenId;
813
- amount: bigint;
814
- }
815
-
816
- export interface TokenClaimEventInstance
817
- extends aptos.TypedEventInstance<TokenClaimEvent> {
818
- data_typed: TokenClaimEvent;
819
- type_arguments: [];
820
- }
821
-
822
- export class TokenOfferEvent {
823
- static TYPE_QNAME = "0x3::token_transfers::TokenOfferEvent";
824
- to_address: Address;
825
- token_id: token.TokenId;
826
- amount: bigint;
827
- }
828
-
829
- export interface TokenOfferEventInstance
830
- extends aptos.TypedEventInstance<TokenOfferEvent> {
831
- data_typed: TokenOfferEvent;
832
- type_arguments: [];
833
- }
834
-
835
- export class TokenOfferId {
836
- static TYPE_QNAME = "0x3::token_transfers::TokenOfferId";
837
- to_addr: Address;
838
- token_id: token.TokenId;
839
- }
840
-
841
- export interface CancelOfferScriptPayload
842
- extends aptos.TypedEntryFunctionPayload<
843
- [Address, Address, Address, string, string, bigint]
844
- > {
845
- arguments_typed: [Address, Address, Address, string, string, bigint];
846
- type_arguments: [];
847
- }
848
-
849
- export interface ClaimScriptPayload
850
- extends aptos.TypedEntryFunctionPayload<
851
- [Address, Address, Address, string, string, bigint]
852
- > {
853
- arguments_typed: [Address, Address, Address, string, string, bigint];
854
- type_arguments: [];
855
- }
856
-
857
- export interface OfferScriptPayload
858
- extends aptos.TypedEntryFunctionPayload<
859
- [Address, Address, Address, string, string, bigint, bigint]
860
- > {
861
- arguments_typed: [
862
- Address,
863
- Address,
864
- Address,
865
- string,
866
- string,
867
- bigint,
868
- bigint
869
- ];
870
- type_arguments: [];
871
- }
872
-
873
- export function loadTypes(_r: aptos.TypeRegistry) {
874
- loadAllTypes(_r);
875
- }
876
- export const ABI: MoveModule = JSON.parse(
877
- '{"address":"0x3","name":"token_transfers","friends":[],"exposed_functions":[{"name":"cancel_offer","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&signer","address","0x3::token::TokenId"],"return":[]},{"name":"cancel_offer_script","visibility":"public","is_entry":true,"generic_type_params":[],"params":["signer","address","address","0x1::string::String","0x1::string::String","u64"],"return":[]},{"name":"claim","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&signer","address","0x3::token::TokenId"],"return":[]},{"name":"claim_script","visibility":"public","is_entry":true,"generic_type_params":[],"params":["signer","address","address","0x1::string::String","0x1::string::String","u64"],"return":[]},{"name":"offer","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&signer","address","0x3::token::TokenId","u64"],"return":[]},{"name":"offer_script","visibility":"public","is_entry":true,"generic_type_params":[],"params":["signer","address","address","0x1::string::String","0x1::string::String","u64","u64"],"return":[]}],"structs":[{"name":"PendingClaims","is_native":false,"abilities":["key"],"generic_type_params":[],"fields":[{"name":"pending_claims","type":"0x1::table::Table<0x3::token_transfers::TokenOfferId, 0x3::token::Token>"},{"name":"offer_events","type":"0x1::event::EventHandle<0x3::token_transfers::TokenOfferEvent>"},{"name":"cancel_offer_events","type":"0x1::event::EventHandle<0x3::token_transfers::TokenCancelOfferEvent>"},{"name":"claim_events","type":"0x1::event::EventHandle<0x3::token_transfers::TokenClaimEvent>"}]},{"name":"TokenCancelOfferEvent","is_native":false,"abilities":["drop","store"],"generic_type_params":[],"fields":[{"name":"to_address","type":"address"},{"name":"token_id","type":"0x3::token::TokenId"},{"name":"amount","type":"u64"}]},{"name":"TokenClaimEvent","is_native":false,"abilities":["drop","store"],"generic_type_params":[],"fields":[{"name":"to_address","type":"address"},{"name":"token_id","type":"0x3::token::TokenId"},{"name":"amount","type":"u64"}]},{"name":"TokenOfferEvent","is_native":false,"abilities":["drop","store"],"generic_type_params":[],"fields":[{"name":"to_address","type":"address"},{"name":"token_id","type":"0x3::token::TokenId"},{"name":"amount","type":"u64"}]},{"name":"TokenOfferId","is_native":false,"abilities":["copy","drop","store"],"generic_type_params":[],"fields":[{"name":"to_addr","type":"address"},{"name":"token_id","type":"0x3::token::TokenId"}]}]}'
878
- );
879
- }
880
-
881
- export function loadAllTypes(_r: aptos.TypeRegistry) {
882
- _0x1.loadAllTypes(_r);
883
-
884
- _r.load(token.ABI);
885
- _r.load(property_map.ABI);
886
- _r.load(token_coin_swap.ABI);
887
- _r.load(token_transfers.ABI);
888
- }