@sentio/sdk 2.0.0-rc.14 → 2.0.0-rc.16
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.
- package/lib/aptos/api.d.ts +5 -0
- package/lib/aptos/api.js +21 -0
- package/lib/aptos/api.js.map +1 -0
- package/lib/aptos/aptos-plugin.d.ts +14 -0
- package/lib/aptos/aptos-plugin.js +146 -0
- package/lib/aptos/aptos-plugin.js.map +1 -0
- package/lib/aptos/aptos-processor.d.ts +72 -0
- package/lib/aptos/aptos-processor.js +201 -0
- package/lib/aptos/aptos-processor.js.map +1 -0
- package/lib/aptos/builtin/0x1.d.ts +2140 -0
- package/lib/aptos/builtin/0x1.js +2727 -0
- package/lib/aptos/builtin/0x1.js.map +1 -0
- package/lib/aptos/builtin/0x3.d.ts +573 -0
- package/lib/aptos/builtin/0x3.js +496 -0
- package/lib/aptos/builtin/0x3.js.map +1 -0
- package/lib/aptos/builtin/index.d.ts +2 -0
- package/lib/aptos/builtin/index.js +6 -0
- package/lib/aptos/builtin/index.js.map +1 -0
- package/lib/aptos/codegen/codegen.d.ts +23 -0
- package/lib/aptos/codegen/codegen.js +388 -0
- package/lib/aptos/codegen/codegen.js.map +1 -0
- package/lib/aptos/codegen/index.d.ts +1 -0
- package/lib/aptos/codegen/index.js +2 -0
- package/lib/aptos/codegen/index.js.map +1 -0
- package/lib/aptos/codegen/typegen.d.ts +18 -0
- package/lib/aptos/codegen/typegen.js +145 -0
- package/lib/aptos/codegen/typegen.js.map +1 -0
- package/lib/aptos/codegen/typegen.test.d.ts +1 -0
- package/lib/aptos/codegen/typegen.test.js.map +1 -0
- package/lib/aptos/context.d.ts +21 -0
- package/lib/aptos/context.js +59 -0
- package/lib/aptos/context.js.map +1 -0
- package/lib/aptos/index.d.ts +9 -0
- package/lib/aptos/index.js +8 -0
- package/lib/aptos/index.js.map +1 -0
- package/lib/aptos/models.d.ts +37 -0
- package/lib/aptos/models.js +2 -0
- package/lib/aptos/models.js.map +1 -0
- package/lib/aptos/move-coder.d.ts +22 -0
- package/lib/aptos/move-coder.js +164 -0
- package/lib/aptos/move-coder.js.map +1 -0
- package/lib/aptos/move-types.d.ts +10 -0
- package/lib/aptos/move-types.js +2 -0
- package/lib/aptos/move-types.js.map +1 -0
- package/lib/aptos/network.d.ts +11 -0
- package/lib/aptos/network.js +27 -0
- package/lib/aptos/network.js.map +1 -0
- package/lib/aptos/run-codegen.d.ts +1 -0
- package/lib/aptos/run-codegen.js +12 -0
- package/lib/aptos/run-codegen.js.map +1 -0
- package/lib/aptos/tests/aptos.test.d.ts +1 -0
- package/lib/aptos/tests/aptos.test.js.map +1 -0
- package/lib/aptos/tests/souffl3.d.ts +1 -0
- package/lib/aptos/tests/souffl3.js +44 -0
- package/lib/aptos/tests/souffl3.js.map +1 -0
- package/lib/aptos/tests/types/index.d.ts +3 -0
- package/lib/aptos/tests/types/index.js +7 -0
- package/lib/aptos/tests/types/index.js.map +1 -0
- package/lib/aptos/tests/types/reserved.d.ts +445 -0
- package/lib/aptos/tests/types/reserved.js +301 -0
- package/lib/aptos/tests/types/reserved.js.map +1 -0
- package/lib/aptos/tests/types/soffl3.d.ts +1065 -0
- package/lib/aptos/tests/types/soffl3.js +548 -0
- package/lib/aptos/tests/types/soffl3.js.map +1 -0
- package/lib/aptos/tests/types/souffle.d.ts +440 -0
- package/lib/aptos/tests/types/souffle.js +295 -0
- package/lib/aptos/tests/types/souffle.js.map +1 -0
- package/lib/aptos/types.d.ts +9 -0
- package/lib/aptos/types.js +130 -0
- package/lib/aptos/types.js.map +1 -0
- package/lib/aptos/types.test.d.ts +1 -0
- package/lib/aptos/types.test.js.map +1 -0
- package/lib/aptos/utils.d.ts +7 -0
- package/lib/aptos/utils.js +20 -0
- package/lib/aptos/utils.js.map +1 -0
- package/lib/{utils/chain.d.ts → chain.d.ts} +0 -0
- package/lib/{utils/chain.js → chain.js} +0 -0
- package/lib/chain.js.map +1 -0
- package/lib/core/context.js +1 -1
- package/lib/core/context.js.map +1 -1
- package/lib/core/sui-plugin.js +1 -1
- package/lib/core/sui-plugin.js.map +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/lib/solana/builtin/index.d.ts +1 -0
- package/lib/solana/builtin/index.js +2 -0
- package/lib/solana/builtin/index.js.map +1 -0
- package/lib/solana/builtin/spl-token-processor.d.ts +39 -0
- package/lib/solana/builtin/spl-token-processor.js +254 -0
- package/lib/solana/builtin/spl-token-processor.js.map +1 -0
- package/lib/solana/builtin/types.d.ts +427 -0
- package/lib/solana/builtin/types.js +200 -0
- package/lib/solana/builtin/types.js.map +1 -0
- package/lib/solana/codegen/codegen.d.ts +1 -0
- package/lib/solana/codegen/codegen.js +122 -0
- package/lib/solana/codegen/codegen.js.map +1 -0
- package/lib/solana/codegen/index.d.ts +1 -0
- package/lib/solana/codegen/index.js +2 -0
- package/lib/solana/codegen/index.js.map +1 -0
- package/lib/solana/index.d.ts +4 -0
- package/lib/solana/index.js +5 -0
- package/lib/solana/index.js.map +1 -0
- package/lib/solana/run-codegen.d.ts +2 -0
- package/lib/solana/run-codegen.js +12 -0
- package/lib/solana/run-codegen.js.map +1 -0
- package/lib/solana/solana-context.d.ts +9 -0
- package/lib/solana/solana-context.js +28 -0
- package/lib/solana/solana-context.js.map +1 -0
- package/lib/solana/solana-options.d.ts +10 -0
- package/lib/solana/solana-options.js +10 -0
- package/lib/solana/solana-options.js.map +1 -0
- package/lib/solana/solana-plugin.d.ts +9 -0
- package/lib/solana/solana-plugin.js +87 -0
- package/lib/solana/solana-plugin.js.map +1 -0
- package/lib/solana/solana-processor.d.ts +43 -0
- package/lib/solana/solana-processor.js +72 -0
- package/lib/solana/solana-processor.js.map +1 -0
- package/lib/solana/tests/solana.test.d.ts +1 -0
- package/lib/solana/tests/solana.test.js.map +1 -0
- package/lib/solana/tests/types/basic_1.d.ts +26 -0
- package/lib/solana/tests/types/basic_1.js +63 -0
- package/lib/solana/tests/types/basic_1.js.map +1 -0
- package/lib/solana/tests/types/basic_1_processor.d.ts +21 -0
- package/lib/solana/tests/types/basic_1_processor.js +35 -0
- package/lib/solana/tests/types/basic_1_processor.js.map +1 -0
- package/lib/solana/tests/types/token_bridge.d.ts +29 -0
- package/lib/solana/tests/types/token_bridge.js +938 -0
- package/lib/solana/tests/types/token_bridge.js.map +1 -0
- package/lib/solana/tests/types/token_bridge_processor.d.ts +212 -0
- package/lib/solana/tests/types/token_bridge_processor.js +134 -0
- package/lib/solana/tests/types/token_bridge_processor.js.map +1 -0
- package/lib/solana/tests/wormhole-token-bridge.d.ts +15 -0
- package/lib/solana/tests/wormhole-token-bridge.js +79 -0
- package/lib/solana/tests/wormhole-token-bridge.js.map +1 -0
- package/lib/testing/test-processor-server.js +1 -1
- package/lib/testing/test-processor-server.js.map +1 -1
- package/lib/testing/test-provider.js +1 -1
- package/lib/testing/test-provider.js.map +1 -1
- package/lib/utils/index.d.ts +0 -1
- package/lib/utils/index.js +0 -1
- package/lib/utils/index.js.map +1 -1
- package/package.json +33 -11
- package/src/aptos/abis/0x1.json +9205 -0
- package/src/aptos/abis/0x3.json +1515 -0
- package/src/aptos/api.ts +23 -0
- package/src/aptos/aptos-plugin.ts +183 -0
- package/src/aptos/aptos-processor.ts +331 -0
- package/src/aptos/builtin/0x1.ts +4911 -0
- package/src/aptos/builtin/0x3.ts +1092 -0
- package/src/aptos/builtin/index.ts +5 -0
- package/src/aptos/codegen/codegen.ts +470 -0
- package/src/aptos/codegen/index.ts +1 -0
- package/src/aptos/codegen/tsconfig.json +8 -0
- package/src/aptos/codegen/typegen.ts +165 -0
- package/src/aptos/context.ts +72 -0
- package/src/aptos/index.ts +10 -0
- package/src/aptos/models.ts +47 -0
- package/src/aptos/move-coder.ts +201 -0
- package/src/aptos/move-types.ts +11 -0
- package/src/aptos/network.ts +29 -0
- package/src/aptos/run-codegen.ts +13 -0
- package/src/aptos/tests/abis/reserved.json +402 -0
- package/src/aptos/tests/abis/soffl3.json +1411 -0
- package/src/aptos/tests/abis/souffle.json +389 -0
- package/src/aptos/tests/souffl3.ts +57 -0
- package/src/aptos/tests/types/index.ts +6 -0
- package/src/aptos/tests/types/reserved.ts +881 -0
- package/src/aptos/tests/types/soffl3.ts +1820 -0
- package/src/aptos/tests/types/souffle.ts +880 -0
- package/src/aptos/types.ts +149 -0
- package/src/aptos/utils.ts +26 -0
- package/src/{utils/chain.ts → chain.ts} +0 -0
- package/src/core/context.ts +1 -1
- package/src/core/sui-plugin.ts +1 -1
- package/src/index.ts +1 -1
- package/src/solana/builtin/index.ts +1 -0
- package/src/solana/builtin/spl-token-processor.ts +298 -0
- package/src/solana/builtin/types.ts +279 -0
- package/src/solana/codegen/codegen.ts +140 -0
- package/src/solana/codegen/index.ts +1 -0
- package/src/solana/codegen/tsconfig.json +8 -0
- package/src/solana/index.ts +4 -0
- package/src/solana/run-codegen.ts +13 -0
- package/src/solana/solana-context.ts +30 -0
- package/src/solana/solana-options.ts +11 -0
- package/src/solana/solana-plugin.ts +103 -0
- package/src/solana/solana-processor.ts +102 -0
- package/src/solana/tests/abis/basic_1.json +62 -0
- package/src/solana/tests/abis/token_bridge.json +937 -0
- package/src/solana/tests/types/basic_1.ts +62 -0
- package/src/solana/tests/types/basic_1_processor.ts +42 -0
- package/src/solana/tests/types/token_bridge.ts +937 -0
- package/src/solana/tests/types/token_bridge_processor.ts +150 -0
- package/src/solana/tests/wormhole-token-bridge.ts +96 -0
- package/src/testing/test-processor-server.ts +1 -1
- package/src/testing/test-provider.ts +1 -1
- package/src/utils/index.ts +0 -1
- package/lib/utils/chain.js.map +0 -1
|
@@ -0,0 +1,1092 @@
|
|
|
1
|
+
/* Autogenerated file. Do not edit manually. */
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
|
|
5
|
+
/* Generated modules for account 0x3 */
|
|
6
|
+
|
|
7
|
+
import {
|
|
8
|
+
MoveCoder,
|
|
9
|
+
AptosBindOptions,
|
|
10
|
+
AptosBaseProcessor,
|
|
11
|
+
TypedEventInstance,
|
|
12
|
+
AptosNetwork,
|
|
13
|
+
TypedEntryFunctionPayload,
|
|
14
|
+
AptosContext,
|
|
15
|
+
CallFilter,
|
|
16
|
+
} from "@sentio/sdk/aptos";
|
|
17
|
+
import { AptosFetchConfig } from "@sentio/protos";
|
|
18
|
+
import { Address, MoveModule } from "@sentio/sdk/aptos";
|
|
19
|
+
|
|
20
|
+
import * as _0x1 from "./0x1.js";
|
|
21
|
+
|
|
22
|
+
export class token extends AptosBaseProcessor {
|
|
23
|
+
constructor(options: AptosBindOptions) {
|
|
24
|
+
super("token", options);
|
|
25
|
+
}
|
|
26
|
+
static DEFAULT_OPTIONS: AptosBindOptions = {
|
|
27
|
+
address: "0x3",
|
|
28
|
+
network: AptosNetwork.MAIN_NET,
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
static bind(options: Partial<AptosBindOptions> = {}): token {
|
|
32
|
+
return new token({ ...token.DEFAULT_OPTIONS, ...options });
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
onEntryBurn(
|
|
36
|
+
func: (call: token.BurnPayload, ctx: AptosContext) => void,
|
|
37
|
+
filter?: CallFilter,
|
|
38
|
+
fetchConfig?: AptosFetchConfig
|
|
39
|
+
): token {
|
|
40
|
+
this.onEntryFunctionCall(
|
|
41
|
+
func,
|
|
42
|
+
{
|
|
43
|
+
...filter,
|
|
44
|
+
function: "token::burn",
|
|
45
|
+
},
|
|
46
|
+
fetchConfig
|
|
47
|
+
);
|
|
48
|
+
return this;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
onEntryBurnByCreator(
|
|
52
|
+
func: (call: token.BurnByCreatorPayload, ctx: AptosContext) => void,
|
|
53
|
+
filter?: CallFilter,
|
|
54
|
+
fetchConfig?: AptosFetchConfig
|
|
55
|
+
): token {
|
|
56
|
+
this.onEntryFunctionCall(
|
|
57
|
+
func,
|
|
58
|
+
{
|
|
59
|
+
...filter,
|
|
60
|
+
function: "token::burn_by_creator",
|
|
61
|
+
},
|
|
62
|
+
fetchConfig
|
|
63
|
+
);
|
|
64
|
+
return this;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
onEntryCreateCollectionScript(
|
|
68
|
+
func: (
|
|
69
|
+
call: token.CreateCollectionScriptPayload,
|
|
70
|
+
ctx: AptosContext
|
|
71
|
+
) => void,
|
|
72
|
+
filter?: CallFilter,
|
|
73
|
+
fetchConfig?: AptosFetchConfig
|
|
74
|
+
): token {
|
|
75
|
+
this.onEntryFunctionCall(
|
|
76
|
+
func,
|
|
77
|
+
{
|
|
78
|
+
...filter,
|
|
79
|
+
function: "token::create_collection_script",
|
|
80
|
+
},
|
|
81
|
+
fetchConfig
|
|
82
|
+
);
|
|
83
|
+
return this;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
onEntryCreateTokenScript(
|
|
87
|
+
func: (call: token.CreateTokenScriptPayload, ctx: AptosContext) => void,
|
|
88
|
+
filter?: CallFilter,
|
|
89
|
+
fetchConfig?: AptosFetchConfig
|
|
90
|
+
): token {
|
|
91
|
+
this.onEntryFunctionCall(
|
|
92
|
+
func,
|
|
93
|
+
{
|
|
94
|
+
...filter,
|
|
95
|
+
function: "token::create_token_script",
|
|
96
|
+
},
|
|
97
|
+
fetchConfig
|
|
98
|
+
);
|
|
99
|
+
return this;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
onEntryDirectTransferScript(
|
|
103
|
+
func: (call: token.DirectTransferScriptPayload, ctx: AptosContext) => void,
|
|
104
|
+
filter?: CallFilter,
|
|
105
|
+
fetchConfig?: AptosFetchConfig
|
|
106
|
+
): token {
|
|
107
|
+
this.onEntryFunctionCall(
|
|
108
|
+
func,
|
|
109
|
+
{
|
|
110
|
+
...filter,
|
|
111
|
+
function: "token::direct_transfer_script",
|
|
112
|
+
},
|
|
113
|
+
fetchConfig
|
|
114
|
+
);
|
|
115
|
+
return this;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
onEntryInitializeTokenScript(
|
|
119
|
+
func: (call: token.InitializeTokenScriptPayload, ctx: AptosContext) => void,
|
|
120
|
+
filter?: CallFilter,
|
|
121
|
+
fetchConfig?: AptosFetchConfig
|
|
122
|
+
): token {
|
|
123
|
+
this.onEntryFunctionCall(
|
|
124
|
+
func,
|
|
125
|
+
{
|
|
126
|
+
...filter,
|
|
127
|
+
function: "token::initialize_token_script",
|
|
128
|
+
},
|
|
129
|
+
fetchConfig
|
|
130
|
+
);
|
|
131
|
+
return this;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
onEntryMintScript(
|
|
135
|
+
func: (call: token.MintScriptPayload, ctx: AptosContext) => void,
|
|
136
|
+
filter?: CallFilter,
|
|
137
|
+
fetchConfig?: AptosFetchConfig
|
|
138
|
+
): token {
|
|
139
|
+
this.onEntryFunctionCall(
|
|
140
|
+
func,
|
|
141
|
+
{
|
|
142
|
+
...filter,
|
|
143
|
+
function: "token::mint_script",
|
|
144
|
+
},
|
|
145
|
+
fetchConfig
|
|
146
|
+
);
|
|
147
|
+
return this;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
onEntryMutateTokenProperties(
|
|
151
|
+
func: (call: token.MutateTokenPropertiesPayload, ctx: AptosContext) => void,
|
|
152
|
+
filter?: CallFilter,
|
|
153
|
+
fetchConfig?: AptosFetchConfig
|
|
154
|
+
): token {
|
|
155
|
+
this.onEntryFunctionCall(
|
|
156
|
+
func,
|
|
157
|
+
{
|
|
158
|
+
...filter,
|
|
159
|
+
function: "token::mutate_token_properties",
|
|
160
|
+
},
|
|
161
|
+
fetchConfig
|
|
162
|
+
);
|
|
163
|
+
return this;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
onEntryOptInDirectTransfer(
|
|
167
|
+
func: (call: token.OptInDirectTransferPayload, ctx: AptosContext) => void,
|
|
168
|
+
filter?: CallFilter,
|
|
169
|
+
fetchConfig?: AptosFetchConfig
|
|
170
|
+
): token {
|
|
171
|
+
this.onEntryFunctionCall(
|
|
172
|
+
func,
|
|
173
|
+
{
|
|
174
|
+
...filter,
|
|
175
|
+
function: "token::opt_in_direct_transfer",
|
|
176
|
+
},
|
|
177
|
+
fetchConfig
|
|
178
|
+
);
|
|
179
|
+
return this;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
onEventCreateCollectionEvent(
|
|
183
|
+
func: (
|
|
184
|
+
event: token.CreateCollectionEventInstance,
|
|
185
|
+
ctx: AptosContext
|
|
186
|
+
) => void,
|
|
187
|
+
fetchConfig?: AptosFetchConfig
|
|
188
|
+
): token {
|
|
189
|
+
this.onEvent(
|
|
190
|
+
func,
|
|
191
|
+
{
|
|
192
|
+
type: "token::CreateCollectionEvent",
|
|
193
|
+
},
|
|
194
|
+
fetchConfig
|
|
195
|
+
);
|
|
196
|
+
return this;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
onEventCreateTokenDataEvent(
|
|
200
|
+
func: (
|
|
201
|
+
event: token.CreateTokenDataEventInstance,
|
|
202
|
+
ctx: AptosContext
|
|
203
|
+
) => void,
|
|
204
|
+
fetchConfig?: AptosFetchConfig
|
|
205
|
+
): token {
|
|
206
|
+
this.onEvent(
|
|
207
|
+
func,
|
|
208
|
+
{
|
|
209
|
+
type: "token::CreateTokenDataEvent",
|
|
210
|
+
},
|
|
211
|
+
fetchConfig
|
|
212
|
+
);
|
|
213
|
+
return this;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
onEventMintTokenEvent(
|
|
217
|
+
func: (event: token.MintTokenEventInstance, ctx: AptosContext) => void,
|
|
218
|
+
fetchConfig?: AptosFetchConfig
|
|
219
|
+
): token {
|
|
220
|
+
this.onEvent(
|
|
221
|
+
func,
|
|
222
|
+
{
|
|
223
|
+
type: "token::MintTokenEvent",
|
|
224
|
+
},
|
|
225
|
+
fetchConfig
|
|
226
|
+
);
|
|
227
|
+
return this;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
onEventDepositEvent(
|
|
231
|
+
func: (event: token.DepositEventInstance, ctx: AptosContext) => void,
|
|
232
|
+
fetchConfig?: AptosFetchConfig
|
|
233
|
+
): token {
|
|
234
|
+
this.onEvent(
|
|
235
|
+
func,
|
|
236
|
+
{
|
|
237
|
+
type: "token::DepositEvent",
|
|
238
|
+
},
|
|
239
|
+
fetchConfig
|
|
240
|
+
);
|
|
241
|
+
return this;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
onEventWithdrawEvent(
|
|
245
|
+
func: (event: token.WithdrawEventInstance, ctx: AptosContext) => void,
|
|
246
|
+
fetchConfig?: AptosFetchConfig
|
|
247
|
+
): token {
|
|
248
|
+
this.onEvent(
|
|
249
|
+
func,
|
|
250
|
+
{
|
|
251
|
+
type: "token::WithdrawEvent",
|
|
252
|
+
},
|
|
253
|
+
fetchConfig
|
|
254
|
+
);
|
|
255
|
+
return this;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
onEventBurnTokenEvent(
|
|
259
|
+
func: (event: token.BurnTokenEventInstance, ctx: AptosContext) => void,
|
|
260
|
+
fetchConfig?: AptosFetchConfig
|
|
261
|
+
): token {
|
|
262
|
+
this.onEvent(
|
|
263
|
+
func,
|
|
264
|
+
{
|
|
265
|
+
type: "token::BurnTokenEvent",
|
|
266
|
+
},
|
|
267
|
+
fetchConfig
|
|
268
|
+
);
|
|
269
|
+
return this;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
onEventMutateTokenPropertyMapEvent(
|
|
273
|
+
func: (
|
|
274
|
+
event: token.MutateTokenPropertyMapEventInstance,
|
|
275
|
+
ctx: AptosContext
|
|
276
|
+
) => void,
|
|
277
|
+
fetchConfig?: AptosFetchConfig
|
|
278
|
+
): token {
|
|
279
|
+
this.onEvent(
|
|
280
|
+
func,
|
|
281
|
+
{
|
|
282
|
+
type: "token::MutateTokenPropertyMapEvent",
|
|
283
|
+
},
|
|
284
|
+
fetchConfig
|
|
285
|
+
);
|
|
286
|
+
return this;
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
loadTypesInternal(registry: MoveCoder) {
|
|
290
|
+
loadAllTypes(registry);
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
export namespace token {
|
|
295
|
+
export class BurnTokenEvent {
|
|
296
|
+
static TYPE_QNAME = "0x3::token::BurnTokenEvent";
|
|
297
|
+
id: token.TokenId;
|
|
298
|
+
amount: bigint;
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
export interface BurnTokenEventInstance
|
|
302
|
+
extends TypedEventInstance<BurnTokenEvent> {
|
|
303
|
+
/** @deprecated use {@link data_decoded} instead */
|
|
304
|
+
data_typed: BurnTokenEvent;
|
|
305
|
+
data_decoded: BurnTokenEvent;
|
|
306
|
+
type_arguments: [];
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
export class CollectionData {
|
|
310
|
+
static TYPE_QNAME = "0x3::token::CollectionData";
|
|
311
|
+
description: string;
|
|
312
|
+
name: string;
|
|
313
|
+
uri: string;
|
|
314
|
+
supply: bigint;
|
|
315
|
+
maximum: bigint;
|
|
316
|
+
mutability_config: token.CollectionMutabilityConfig;
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
export class CollectionMutabilityConfig {
|
|
320
|
+
static TYPE_QNAME = "0x3::token::CollectionMutabilityConfig";
|
|
321
|
+
description: Boolean;
|
|
322
|
+
uri: Boolean;
|
|
323
|
+
maximum: Boolean;
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
export class Collections {
|
|
327
|
+
static TYPE_QNAME = "0x3::token::Collections";
|
|
328
|
+
collection_data: _0x1.table.Table<string, token.CollectionData>;
|
|
329
|
+
token_data: _0x1.table.Table<token.TokenDataId, token.TokenData>;
|
|
330
|
+
create_collection_events: _0x1.event.EventHandle<token.CreateCollectionEvent>;
|
|
331
|
+
create_token_data_events: _0x1.event.EventHandle<token.CreateTokenDataEvent>;
|
|
332
|
+
mint_token_events: _0x1.event.EventHandle<token.MintTokenEvent>;
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
export class CreateCollectionEvent {
|
|
336
|
+
static TYPE_QNAME = "0x3::token::CreateCollectionEvent";
|
|
337
|
+
creator: Address;
|
|
338
|
+
collection_name: string;
|
|
339
|
+
uri: string;
|
|
340
|
+
description: string;
|
|
341
|
+
maximum: bigint;
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
export interface CreateCollectionEventInstance
|
|
345
|
+
extends TypedEventInstance<CreateCollectionEvent> {
|
|
346
|
+
/** @deprecated use {@link data_decoded} instead */
|
|
347
|
+
data_typed: CreateCollectionEvent;
|
|
348
|
+
data_decoded: CreateCollectionEvent;
|
|
349
|
+
type_arguments: [];
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
export class CreateTokenDataEvent {
|
|
353
|
+
static TYPE_QNAME = "0x3::token::CreateTokenDataEvent";
|
|
354
|
+
id: token.TokenDataId;
|
|
355
|
+
description: string;
|
|
356
|
+
maximum: bigint;
|
|
357
|
+
uri: string;
|
|
358
|
+
royalty_payee_address: Address;
|
|
359
|
+
royalty_points_denominator: bigint;
|
|
360
|
+
royalty_points_numerator: bigint;
|
|
361
|
+
name: string;
|
|
362
|
+
mutability_config: token.TokenMutabilityConfig;
|
|
363
|
+
property_keys: string[];
|
|
364
|
+
property_values: string[];
|
|
365
|
+
property_types: string[];
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
export interface CreateTokenDataEventInstance
|
|
369
|
+
extends TypedEventInstance<CreateTokenDataEvent> {
|
|
370
|
+
/** @deprecated use {@link data_decoded} instead */
|
|
371
|
+
data_typed: CreateTokenDataEvent;
|
|
372
|
+
data_decoded: CreateTokenDataEvent;
|
|
373
|
+
type_arguments: [];
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
export class DepositEvent {
|
|
377
|
+
static TYPE_QNAME = "0x3::token::DepositEvent";
|
|
378
|
+
id: token.TokenId;
|
|
379
|
+
amount: bigint;
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
export interface DepositEventInstance
|
|
383
|
+
extends TypedEventInstance<DepositEvent> {
|
|
384
|
+
/** @deprecated use {@link data_decoded} instead */
|
|
385
|
+
data_typed: DepositEvent;
|
|
386
|
+
data_decoded: DepositEvent;
|
|
387
|
+
type_arguments: [];
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
export class MintTokenEvent {
|
|
391
|
+
static TYPE_QNAME = "0x3::token::MintTokenEvent";
|
|
392
|
+
id: token.TokenDataId;
|
|
393
|
+
amount: bigint;
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
export interface MintTokenEventInstance
|
|
397
|
+
extends TypedEventInstance<MintTokenEvent> {
|
|
398
|
+
/** @deprecated use {@link data_decoded} instead */
|
|
399
|
+
data_typed: MintTokenEvent;
|
|
400
|
+
data_decoded: MintTokenEvent;
|
|
401
|
+
type_arguments: [];
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
export class MutateTokenPropertyMapEvent {
|
|
405
|
+
static TYPE_QNAME = "0x3::token::MutateTokenPropertyMapEvent";
|
|
406
|
+
old_id: token.TokenId;
|
|
407
|
+
new_id: token.TokenId;
|
|
408
|
+
keys: string[];
|
|
409
|
+
values: string[];
|
|
410
|
+
types: string[];
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
export interface MutateTokenPropertyMapEventInstance
|
|
414
|
+
extends TypedEventInstance<MutateTokenPropertyMapEvent> {
|
|
415
|
+
/** @deprecated use {@link data_decoded} instead */
|
|
416
|
+
data_typed: MutateTokenPropertyMapEvent;
|
|
417
|
+
data_decoded: MutateTokenPropertyMapEvent;
|
|
418
|
+
type_arguments: [];
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
export class Royalty {
|
|
422
|
+
static TYPE_QNAME = "0x3::token::Royalty";
|
|
423
|
+
royalty_points_numerator: bigint;
|
|
424
|
+
royalty_points_denominator: bigint;
|
|
425
|
+
payee_address: Address;
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
export class Token {
|
|
429
|
+
static TYPE_QNAME = "0x3::token::Token";
|
|
430
|
+
id: token.TokenId;
|
|
431
|
+
amount: bigint;
|
|
432
|
+
token_properties: property_map.PropertyMap;
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
export class TokenData {
|
|
436
|
+
static TYPE_QNAME = "0x3::token::TokenData";
|
|
437
|
+
maximum: bigint;
|
|
438
|
+
largest_property_version: bigint;
|
|
439
|
+
supply: bigint;
|
|
440
|
+
uri: string;
|
|
441
|
+
royalty: token.Royalty;
|
|
442
|
+
name: string;
|
|
443
|
+
description: string;
|
|
444
|
+
default_properties: property_map.PropertyMap;
|
|
445
|
+
mutability_config: token.TokenMutabilityConfig;
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
export class TokenDataId {
|
|
449
|
+
static TYPE_QNAME = "0x3::token::TokenDataId";
|
|
450
|
+
creator: Address;
|
|
451
|
+
collection: string;
|
|
452
|
+
name: string;
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
export class TokenId {
|
|
456
|
+
static TYPE_QNAME = "0x3::token::TokenId";
|
|
457
|
+
token_data_id: token.TokenDataId;
|
|
458
|
+
property_version: bigint;
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
export class TokenMutabilityConfig {
|
|
462
|
+
static TYPE_QNAME = "0x3::token::TokenMutabilityConfig";
|
|
463
|
+
maximum: Boolean;
|
|
464
|
+
uri: Boolean;
|
|
465
|
+
royalty: Boolean;
|
|
466
|
+
description: Boolean;
|
|
467
|
+
properties: Boolean;
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
export class TokenStore {
|
|
471
|
+
static TYPE_QNAME = "0x3::token::TokenStore";
|
|
472
|
+
tokens: _0x1.table.Table<token.TokenId, token.Token>;
|
|
473
|
+
direct_transfer: Boolean;
|
|
474
|
+
deposit_events: _0x1.event.EventHandle<token.DepositEvent>;
|
|
475
|
+
withdraw_events: _0x1.event.EventHandle<token.WithdrawEvent>;
|
|
476
|
+
burn_events: _0x1.event.EventHandle<token.BurnTokenEvent>;
|
|
477
|
+
mutate_token_property_events: _0x1.event.EventHandle<token.MutateTokenPropertyMapEvent>;
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
export class WithdrawCapability {
|
|
481
|
+
static TYPE_QNAME = "0x3::token::WithdrawCapability";
|
|
482
|
+
token_owner: Address;
|
|
483
|
+
token_id: token.TokenId;
|
|
484
|
+
amount: bigint;
|
|
485
|
+
expiration_sec: bigint;
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
export class WithdrawEvent {
|
|
489
|
+
static TYPE_QNAME = "0x3::token::WithdrawEvent";
|
|
490
|
+
id: token.TokenId;
|
|
491
|
+
amount: bigint;
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
export interface WithdrawEventInstance
|
|
495
|
+
extends TypedEventInstance<WithdrawEvent> {
|
|
496
|
+
/** @deprecated use {@link data_decoded} instead */
|
|
497
|
+
data_typed: WithdrawEvent;
|
|
498
|
+
data_decoded: WithdrawEvent;
|
|
499
|
+
type_arguments: [];
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
export interface BurnPayload
|
|
503
|
+
extends TypedEntryFunctionPayload<
|
|
504
|
+
[Address, string, string, bigint, bigint]
|
|
505
|
+
> {
|
|
506
|
+
/** @deprecated use {@link arguments_decoded} instead */
|
|
507
|
+
arguments_typed: [Address, string, string, bigint, bigint];
|
|
508
|
+
arguments_decoded: [Address, string, string, bigint, bigint];
|
|
509
|
+
type_arguments: [];
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
export interface BurnByCreatorPayload
|
|
513
|
+
extends TypedEntryFunctionPayload<
|
|
514
|
+
[Address, string, string, bigint, bigint]
|
|
515
|
+
> {
|
|
516
|
+
/** @deprecated use {@link arguments_decoded} instead */
|
|
517
|
+
arguments_typed: [Address, string, string, bigint, bigint];
|
|
518
|
+
arguments_decoded: [Address, string, string, bigint, bigint];
|
|
519
|
+
type_arguments: [];
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
export interface CreateCollectionScriptPayload
|
|
523
|
+
extends TypedEntryFunctionPayload<
|
|
524
|
+
[string, string, string, bigint, Boolean[]]
|
|
525
|
+
> {
|
|
526
|
+
/** @deprecated use {@link arguments_decoded} instead */
|
|
527
|
+
arguments_typed: [string, string, string, bigint, Boolean[]];
|
|
528
|
+
arguments_decoded: [string, string, string, bigint, Boolean[]];
|
|
529
|
+
type_arguments: [];
|
|
530
|
+
}
|
|
531
|
+
|
|
532
|
+
export interface CreateTokenScriptPayload
|
|
533
|
+
extends TypedEntryFunctionPayload<
|
|
534
|
+
[
|
|
535
|
+
string,
|
|
536
|
+
string,
|
|
537
|
+
string,
|
|
538
|
+
bigint,
|
|
539
|
+
bigint,
|
|
540
|
+
string,
|
|
541
|
+
Address,
|
|
542
|
+
bigint,
|
|
543
|
+
bigint,
|
|
544
|
+
Boolean[],
|
|
545
|
+
string[],
|
|
546
|
+
string[],
|
|
547
|
+
string[]
|
|
548
|
+
]
|
|
549
|
+
> {
|
|
550
|
+
/** @deprecated use {@link arguments_decoded} instead */
|
|
551
|
+
arguments_typed: [
|
|
552
|
+
string,
|
|
553
|
+
string,
|
|
554
|
+
string,
|
|
555
|
+
bigint,
|
|
556
|
+
bigint,
|
|
557
|
+
string,
|
|
558
|
+
Address,
|
|
559
|
+
bigint,
|
|
560
|
+
bigint,
|
|
561
|
+
Boolean[],
|
|
562
|
+
string[],
|
|
563
|
+
string[],
|
|
564
|
+
string[]
|
|
565
|
+
];
|
|
566
|
+
arguments_decoded: [
|
|
567
|
+
string,
|
|
568
|
+
string,
|
|
569
|
+
string,
|
|
570
|
+
bigint,
|
|
571
|
+
bigint,
|
|
572
|
+
string,
|
|
573
|
+
Address,
|
|
574
|
+
bigint,
|
|
575
|
+
bigint,
|
|
576
|
+
Boolean[],
|
|
577
|
+
string[],
|
|
578
|
+
string[],
|
|
579
|
+
string[]
|
|
580
|
+
];
|
|
581
|
+
type_arguments: [];
|
|
582
|
+
}
|
|
583
|
+
|
|
584
|
+
export interface DirectTransferScriptPayload
|
|
585
|
+
extends TypedEntryFunctionPayload<
|
|
586
|
+
[Address, Address, string, string, bigint, bigint]
|
|
587
|
+
> {
|
|
588
|
+
/** @deprecated use {@link arguments_decoded} instead */
|
|
589
|
+
arguments_typed: [Address, Address, string, string, bigint, bigint];
|
|
590
|
+
arguments_decoded: [Address, Address, string, string, bigint, bigint];
|
|
591
|
+
type_arguments: [];
|
|
592
|
+
}
|
|
593
|
+
|
|
594
|
+
export interface InitializeTokenScriptPayload
|
|
595
|
+
extends TypedEntryFunctionPayload<[]> {
|
|
596
|
+
/** @deprecated use {@link arguments_decoded} instead */
|
|
597
|
+
arguments_typed: [];
|
|
598
|
+
arguments_decoded: [];
|
|
599
|
+
type_arguments: [];
|
|
600
|
+
}
|
|
601
|
+
|
|
602
|
+
export interface MintScriptPayload
|
|
603
|
+
extends TypedEntryFunctionPayload<[Address, string, string, bigint]> {
|
|
604
|
+
/** @deprecated use {@link arguments_decoded} instead */
|
|
605
|
+
arguments_typed: [Address, string, string, bigint];
|
|
606
|
+
arguments_decoded: [Address, string, string, bigint];
|
|
607
|
+
type_arguments: [];
|
|
608
|
+
}
|
|
609
|
+
|
|
610
|
+
export interface MutateTokenPropertiesPayload
|
|
611
|
+
extends TypedEntryFunctionPayload<
|
|
612
|
+
[
|
|
613
|
+
Address,
|
|
614
|
+
Address,
|
|
615
|
+
string,
|
|
616
|
+
string,
|
|
617
|
+
bigint,
|
|
618
|
+
bigint,
|
|
619
|
+
string[],
|
|
620
|
+
string[],
|
|
621
|
+
string[]
|
|
622
|
+
]
|
|
623
|
+
> {
|
|
624
|
+
/** @deprecated use {@link arguments_decoded} instead */
|
|
625
|
+
arguments_typed: [
|
|
626
|
+
Address,
|
|
627
|
+
Address,
|
|
628
|
+
string,
|
|
629
|
+
string,
|
|
630
|
+
bigint,
|
|
631
|
+
bigint,
|
|
632
|
+
string[],
|
|
633
|
+
string[],
|
|
634
|
+
string[]
|
|
635
|
+
];
|
|
636
|
+
arguments_decoded: [
|
|
637
|
+
Address,
|
|
638
|
+
Address,
|
|
639
|
+
string,
|
|
640
|
+
string,
|
|
641
|
+
bigint,
|
|
642
|
+
bigint,
|
|
643
|
+
string[],
|
|
644
|
+
string[],
|
|
645
|
+
string[]
|
|
646
|
+
];
|
|
647
|
+
type_arguments: [];
|
|
648
|
+
}
|
|
649
|
+
|
|
650
|
+
export interface OptInDirectTransferPayload
|
|
651
|
+
extends TypedEntryFunctionPayload<[Boolean]> {
|
|
652
|
+
/** @deprecated use {@link arguments_decoded} instead */
|
|
653
|
+
arguments_typed: [Boolean];
|
|
654
|
+
arguments_decoded: [Boolean];
|
|
655
|
+
type_arguments: [];
|
|
656
|
+
}
|
|
657
|
+
|
|
658
|
+
export function loadTypes(_r: MoveCoder) {
|
|
659
|
+
loadAllTypes(_r);
|
|
660
|
+
}
|
|
661
|
+
export const ABI: MoveModule = JSON.parse(
|
|
662
|
+
'{"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"}]}]}'
|
|
663
|
+
);
|
|
664
|
+
}
|
|
665
|
+
|
|
666
|
+
export namespace property_map {
|
|
667
|
+
export class PropertyMap {
|
|
668
|
+
static TYPE_QNAME = "0x3::property_map::PropertyMap";
|
|
669
|
+
map: _0x1.simple_map.SimpleMap<string, property_map.PropertyValue>;
|
|
670
|
+
}
|
|
671
|
+
|
|
672
|
+
export class PropertyValue {
|
|
673
|
+
static TYPE_QNAME = "0x3::property_map::PropertyValue";
|
|
674
|
+
value: string;
|
|
675
|
+
type: string;
|
|
676
|
+
}
|
|
677
|
+
|
|
678
|
+
export function loadTypes(_r: MoveCoder) {
|
|
679
|
+
loadAllTypes(_r);
|
|
680
|
+
}
|
|
681
|
+
export const ABI: MoveModule = JSON.parse(
|
|
682
|
+
'{"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"}]}]}'
|
|
683
|
+
);
|
|
684
|
+
}
|
|
685
|
+
|
|
686
|
+
export class token_coin_swap extends AptosBaseProcessor {
|
|
687
|
+
constructor(options: AptosBindOptions) {
|
|
688
|
+
super("token_coin_swap", options);
|
|
689
|
+
}
|
|
690
|
+
static DEFAULT_OPTIONS: AptosBindOptions = {
|
|
691
|
+
address: "0x3",
|
|
692
|
+
network: AptosNetwork.MAIN_NET,
|
|
693
|
+
};
|
|
694
|
+
|
|
695
|
+
static bind(options: Partial<AptosBindOptions> = {}): token_coin_swap {
|
|
696
|
+
return new token_coin_swap({
|
|
697
|
+
...token_coin_swap.DEFAULT_OPTIONS,
|
|
698
|
+
...options,
|
|
699
|
+
});
|
|
700
|
+
}
|
|
701
|
+
|
|
702
|
+
onEntryListTokenForSwap(
|
|
703
|
+
func: (
|
|
704
|
+
call: token_coin_swap.ListTokenForSwapPayload,
|
|
705
|
+
ctx: AptosContext
|
|
706
|
+
) => void,
|
|
707
|
+
filter?: CallFilter,
|
|
708
|
+
fetchConfig?: AptosFetchConfig
|
|
709
|
+
): token_coin_swap {
|
|
710
|
+
this.onEntryFunctionCall(
|
|
711
|
+
func,
|
|
712
|
+
{
|
|
713
|
+
...filter,
|
|
714
|
+
function: "token_coin_swap::list_token_for_swap",
|
|
715
|
+
},
|
|
716
|
+
fetchConfig
|
|
717
|
+
);
|
|
718
|
+
return this;
|
|
719
|
+
}
|
|
720
|
+
|
|
721
|
+
onEventTokenListingEvent(
|
|
722
|
+
func: (
|
|
723
|
+
event: token_coin_swap.TokenListingEventInstance,
|
|
724
|
+
ctx: AptosContext
|
|
725
|
+
) => void,
|
|
726
|
+
fetchConfig?: AptosFetchConfig
|
|
727
|
+
): token_coin_swap {
|
|
728
|
+
this.onEvent(
|
|
729
|
+
func,
|
|
730
|
+
{
|
|
731
|
+
type: "token_coin_swap::TokenListingEvent",
|
|
732
|
+
},
|
|
733
|
+
fetchConfig
|
|
734
|
+
);
|
|
735
|
+
return this;
|
|
736
|
+
}
|
|
737
|
+
|
|
738
|
+
onEventTokenSwapEvent(
|
|
739
|
+
func: (
|
|
740
|
+
event: token_coin_swap.TokenSwapEventInstance,
|
|
741
|
+
ctx: AptosContext
|
|
742
|
+
) => void,
|
|
743
|
+
fetchConfig?: AptosFetchConfig
|
|
744
|
+
): token_coin_swap {
|
|
745
|
+
this.onEvent(
|
|
746
|
+
func,
|
|
747
|
+
{
|
|
748
|
+
type: "token_coin_swap::TokenSwapEvent",
|
|
749
|
+
},
|
|
750
|
+
fetchConfig
|
|
751
|
+
);
|
|
752
|
+
return this;
|
|
753
|
+
}
|
|
754
|
+
|
|
755
|
+
loadTypesInternal(registry: MoveCoder) {
|
|
756
|
+
loadAllTypes(registry);
|
|
757
|
+
}
|
|
758
|
+
}
|
|
759
|
+
|
|
760
|
+
export namespace token_coin_swap {
|
|
761
|
+
export class TokenCoinSwap<T0> {
|
|
762
|
+
static TYPE_QNAME = "0x3::token_coin_swap::TokenCoinSwap";
|
|
763
|
+
token_amount: bigint;
|
|
764
|
+
min_price_per_token: bigint;
|
|
765
|
+
}
|
|
766
|
+
|
|
767
|
+
export class TokenEscrow {
|
|
768
|
+
static TYPE_QNAME = "0x3::token_coin_swap::TokenEscrow";
|
|
769
|
+
token: token.Token;
|
|
770
|
+
locked_until_secs: bigint;
|
|
771
|
+
}
|
|
772
|
+
|
|
773
|
+
export class TokenListingEvent {
|
|
774
|
+
static TYPE_QNAME = "0x3::token_coin_swap::TokenListingEvent";
|
|
775
|
+
token_id: token.TokenId;
|
|
776
|
+
amount: bigint;
|
|
777
|
+
min_price: bigint;
|
|
778
|
+
locked_until_secs: bigint;
|
|
779
|
+
coin_type_info: _0x1.type_info.TypeInfo;
|
|
780
|
+
}
|
|
781
|
+
|
|
782
|
+
export interface TokenListingEventInstance
|
|
783
|
+
extends TypedEventInstance<TokenListingEvent> {
|
|
784
|
+
/** @deprecated use {@link data_decoded} instead */
|
|
785
|
+
data_typed: TokenListingEvent;
|
|
786
|
+
data_decoded: TokenListingEvent;
|
|
787
|
+
type_arguments: [];
|
|
788
|
+
}
|
|
789
|
+
|
|
790
|
+
export class TokenListings<T0> {
|
|
791
|
+
static TYPE_QNAME = "0x3::token_coin_swap::TokenListings";
|
|
792
|
+
listings: _0x1.table.Table<
|
|
793
|
+
token.TokenId,
|
|
794
|
+
token_coin_swap.TokenCoinSwap<T0>
|
|
795
|
+
>;
|
|
796
|
+
listing_events: _0x1.event.EventHandle<token_coin_swap.TokenListingEvent>;
|
|
797
|
+
swap_events: _0x1.event.EventHandle<token_coin_swap.TokenSwapEvent>;
|
|
798
|
+
}
|
|
799
|
+
|
|
800
|
+
export class TokenStoreEscrow {
|
|
801
|
+
static TYPE_QNAME = "0x3::token_coin_swap::TokenStoreEscrow";
|
|
802
|
+
token_escrows: _0x1.table.Table<token.TokenId, token_coin_swap.TokenEscrow>;
|
|
803
|
+
}
|
|
804
|
+
|
|
805
|
+
export class TokenSwapEvent {
|
|
806
|
+
static TYPE_QNAME = "0x3::token_coin_swap::TokenSwapEvent";
|
|
807
|
+
token_id: token.TokenId;
|
|
808
|
+
token_buyer: Address;
|
|
809
|
+
token_amount: bigint;
|
|
810
|
+
coin_amount: bigint;
|
|
811
|
+
coin_type_info: _0x1.type_info.TypeInfo;
|
|
812
|
+
}
|
|
813
|
+
|
|
814
|
+
export interface TokenSwapEventInstance
|
|
815
|
+
extends TypedEventInstance<TokenSwapEvent> {
|
|
816
|
+
/** @deprecated use {@link data_decoded} instead */
|
|
817
|
+
data_typed: TokenSwapEvent;
|
|
818
|
+
data_decoded: TokenSwapEvent;
|
|
819
|
+
type_arguments: [];
|
|
820
|
+
}
|
|
821
|
+
|
|
822
|
+
export interface ListTokenForSwapPayload<T0 = any>
|
|
823
|
+
extends TypedEntryFunctionPayload<
|
|
824
|
+
[Address, string, string, bigint, bigint, bigint, bigint]
|
|
825
|
+
> {
|
|
826
|
+
/** @deprecated use {@link arguments_decoded} instead */
|
|
827
|
+
arguments_typed: [Address, string, string, bigint, bigint, bigint, bigint];
|
|
828
|
+
arguments_decoded: [
|
|
829
|
+
Address,
|
|
830
|
+
string,
|
|
831
|
+
string,
|
|
832
|
+
bigint,
|
|
833
|
+
bigint,
|
|
834
|
+
bigint,
|
|
835
|
+
bigint
|
|
836
|
+
];
|
|
837
|
+
type_arguments: [string];
|
|
838
|
+
}
|
|
839
|
+
|
|
840
|
+
export function loadTypes(_r: MoveCoder) {
|
|
841
|
+
loadAllTypes(_r);
|
|
842
|
+
}
|
|
843
|
+
export const ABI: MoveModule = JSON.parse(
|
|
844
|
+
'{"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"}]}]}'
|
|
845
|
+
);
|
|
846
|
+
}
|
|
847
|
+
|
|
848
|
+
export class token_transfers extends AptosBaseProcessor {
|
|
849
|
+
constructor(options: AptosBindOptions) {
|
|
850
|
+
super("token_transfers", options);
|
|
851
|
+
}
|
|
852
|
+
static DEFAULT_OPTIONS: AptosBindOptions = {
|
|
853
|
+
address: "0x3",
|
|
854
|
+
network: AptosNetwork.MAIN_NET,
|
|
855
|
+
};
|
|
856
|
+
|
|
857
|
+
static bind(options: Partial<AptosBindOptions> = {}): token_transfers {
|
|
858
|
+
return new token_transfers({
|
|
859
|
+
...token_transfers.DEFAULT_OPTIONS,
|
|
860
|
+
...options,
|
|
861
|
+
});
|
|
862
|
+
}
|
|
863
|
+
|
|
864
|
+
onEntryCancelOfferScript(
|
|
865
|
+
func: (
|
|
866
|
+
call: token_transfers.CancelOfferScriptPayload,
|
|
867
|
+
ctx: AptosContext
|
|
868
|
+
) => void,
|
|
869
|
+
filter?: CallFilter,
|
|
870
|
+
fetchConfig?: AptosFetchConfig
|
|
871
|
+
): token_transfers {
|
|
872
|
+
this.onEntryFunctionCall(
|
|
873
|
+
func,
|
|
874
|
+
{
|
|
875
|
+
...filter,
|
|
876
|
+
function: "token_transfers::cancel_offer_script",
|
|
877
|
+
},
|
|
878
|
+
fetchConfig
|
|
879
|
+
);
|
|
880
|
+
return this;
|
|
881
|
+
}
|
|
882
|
+
|
|
883
|
+
onEntryClaimScript(
|
|
884
|
+
func: (call: token_transfers.ClaimScriptPayload, ctx: AptosContext) => void,
|
|
885
|
+
filter?: CallFilter,
|
|
886
|
+
fetchConfig?: AptosFetchConfig
|
|
887
|
+
): token_transfers {
|
|
888
|
+
this.onEntryFunctionCall(
|
|
889
|
+
func,
|
|
890
|
+
{
|
|
891
|
+
...filter,
|
|
892
|
+
function: "token_transfers::claim_script",
|
|
893
|
+
},
|
|
894
|
+
fetchConfig
|
|
895
|
+
);
|
|
896
|
+
return this;
|
|
897
|
+
}
|
|
898
|
+
|
|
899
|
+
onEntryOfferScript(
|
|
900
|
+
func: (call: token_transfers.OfferScriptPayload, ctx: AptosContext) => void,
|
|
901
|
+
filter?: CallFilter,
|
|
902
|
+
fetchConfig?: AptosFetchConfig
|
|
903
|
+
): token_transfers {
|
|
904
|
+
this.onEntryFunctionCall(
|
|
905
|
+
func,
|
|
906
|
+
{
|
|
907
|
+
...filter,
|
|
908
|
+
function: "token_transfers::offer_script",
|
|
909
|
+
},
|
|
910
|
+
fetchConfig
|
|
911
|
+
);
|
|
912
|
+
return this;
|
|
913
|
+
}
|
|
914
|
+
|
|
915
|
+
onEventTokenOfferEvent(
|
|
916
|
+
func: (
|
|
917
|
+
event: token_transfers.TokenOfferEventInstance,
|
|
918
|
+
ctx: AptosContext
|
|
919
|
+
) => void,
|
|
920
|
+
fetchConfig?: AptosFetchConfig
|
|
921
|
+
): token_transfers {
|
|
922
|
+
this.onEvent(
|
|
923
|
+
func,
|
|
924
|
+
{
|
|
925
|
+
type: "token_transfers::TokenOfferEvent",
|
|
926
|
+
},
|
|
927
|
+
fetchConfig
|
|
928
|
+
);
|
|
929
|
+
return this;
|
|
930
|
+
}
|
|
931
|
+
|
|
932
|
+
onEventTokenCancelOfferEvent(
|
|
933
|
+
func: (
|
|
934
|
+
event: token_transfers.TokenCancelOfferEventInstance,
|
|
935
|
+
ctx: AptosContext
|
|
936
|
+
) => void,
|
|
937
|
+
fetchConfig?: AptosFetchConfig
|
|
938
|
+
): token_transfers {
|
|
939
|
+
this.onEvent(
|
|
940
|
+
func,
|
|
941
|
+
{
|
|
942
|
+
type: "token_transfers::TokenCancelOfferEvent",
|
|
943
|
+
},
|
|
944
|
+
fetchConfig
|
|
945
|
+
);
|
|
946
|
+
return this;
|
|
947
|
+
}
|
|
948
|
+
|
|
949
|
+
onEventTokenClaimEvent(
|
|
950
|
+
func: (
|
|
951
|
+
event: token_transfers.TokenClaimEventInstance,
|
|
952
|
+
ctx: AptosContext
|
|
953
|
+
) => void,
|
|
954
|
+
fetchConfig?: AptosFetchConfig
|
|
955
|
+
): token_transfers {
|
|
956
|
+
this.onEvent(
|
|
957
|
+
func,
|
|
958
|
+
{
|
|
959
|
+
type: "token_transfers::TokenClaimEvent",
|
|
960
|
+
},
|
|
961
|
+
fetchConfig
|
|
962
|
+
);
|
|
963
|
+
return this;
|
|
964
|
+
}
|
|
965
|
+
|
|
966
|
+
loadTypesInternal(registry: MoveCoder) {
|
|
967
|
+
loadAllTypes(registry);
|
|
968
|
+
}
|
|
969
|
+
}
|
|
970
|
+
|
|
971
|
+
export namespace token_transfers {
|
|
972
|
+
export class PendingClaims {
|
|
973
|
+
static TYPE_QNAME = "0x3::token_transfers::PendingClaims";
|
|
974
|
+
pending_claims: _0x1.table.Table<token_transfers.TokenOfferId, token.Token>;
|
|
975
|
+
offer_events: _0x1.event.EventHandle<token_transfers.TokenOfferEvent>;
|
|
976
|
+
cancel_offer_events: _0x1.event.EventHandle<token_transfers.TokenCancelOfferEvent>;
|
|
977
|
+
claim_events: _0x1.event.EventHandle<token_transfers.TokenClaimEvent>;
|
|
978
|
+
}
|
|
979
|
+
|
|
980
|
+
export class TokenCancelOfferEvent {
|
|
981
|
+
static TYPE_QNAME = "0x3::token_transfers::TokenCancelOfferEvent";
|
|
982
|
+
to_address: Address;
|
|
983
|
+
token_id: token.TokenId;
|
|
984
|
+
amount: bigint;
|
|
985
|
+
}
|
|
986
|
+
|
|
987
|
+
export interface TokenCancelOfferEventInstance
|
|
988
|
+
extends TypedEventInstance<TokenCancelOfferEvent> {
|
|
989
|
+
/** @deprecated use {@link data_decoded} instead */
|
|
990
|
+
data_typed: TokenCancelOfferEvent;
|
|
991
|
+
data_decoded: TokenCancelOfferEvent;
|
|
992
|
+
type_arguments: [];
|
|
993
|
+
}
|
|
994
|
+
|
|
995
|
+
export class TokenClaimEvent {
|
|
996
|
+
static TYPE_QNAME = "0x3::token_transfers::TokenClaimEvent";
|
|
997
|
+
to_address: Address;
|
|
998
|
+
token_id: token.TokenId;
|
|
999
|
+
amount: bigint;
|
|
1000
|
+
}
|
|
1001
|
+
|
|
1002
|
+
export interface TokenClaimEventInstance
|
|
1003
|
+
extends TypedEventInstance<TokenClaimEvent> {
|
|
1004
|
+
/** @deprecated use {@link data_decoded} instead */
|
|
1005
|
+
data_typed: TokenClaimEvent;
|
|
1006
|
+
data_decoded: TokenClaimEvent;
|
|
1007
|
+
type_arguments: [];
|
|
1008
|
+
}
|
|
1009
|
+
|
|
1010
|
+
export class TokenOfferEvent {
|
|
1011
|
+
static TYPE_QNAME = "0x3::token_transfers::TokenOfferEvent";
|
|
1012
|
+
to_address: Address;
|
|
1013
|
+
token_id: token.TokenId;
|
|
1014
|
+
amount: bigint;
|
|
1015
|
+
}
|
|
1016
|
+
|
|
1017
|
+
export interface TokenOfferEventInstance
|
|
1018
|
+
extends TypedEventInstance<TokenOfferEvent> {
|
|
1019
|
+
/** @deprecated use {@link data_decoded} instead */
|
|
1020
|
+
data_typed: TokenOfferEvent;
|
|
1021
|
+
data_decoded: TokenOfferEvent;
|
|
1022
|
+
type_arguments: [];
|
|
1023
|
+
}
|
|
1024
|
+
|
|
1025
|
+
export class TokenOfferId {
|
|
1026
|
+
static TYPE_QNAME = "0x3::token_transfers::TokenOfferId";
|
|
1027
|
+
to_addr: Address;
|
|
1028
|
+
token_id: token.TokenId;
|
|
1029
|
+
}
|
|
1030
|
+
|
|
1031
|
+
export interface CancelOfferScriptPayload
|
|
1032
|
+
extends TypedEntryFunctionPayload<
|
|
1033
|
+
[Address, Address, Address, string, string, bigint]
|
|
1034
|
+
> {
|
|
1035
|
+
/** @deprecated use {@link arguments_decoded} instead */
|
|
1036
|
+
arguments_typed: [Address, Address, Address, string, string, bigint];
|
|
1037
|
+
arguments_decoded: [Address, Address, Address, string, string, bigint];
|
|
1038
|
+
type_arguments: [];
|
|
1039
|
+
}
|
|
1040
|
+
|
|
1041
|
+
export interface ClaimScriptPayload
|
|
1042
|
+
extends TypedEntryFunctionPayload<
|
|
1043
|
+
[Address, Address, Address, string, string, bigint]
|
|
1044
|
+
> {
|
|
1045
|
+
/** @deprecated use {@link arguments_decoded} instead */
|
|
1046
|
+
arguments_typed: [Address, Address, Address, string, string, bigint];
|
|
1047
|
+
arguments_decoded: [Address, Address, Address, string, string, bigint];
|
|
1048
|
+
type_arguments: [];
|
|
1049
|
+
}
|
|
1050
|
+
|
|
1051
|
+
export interface OfferScriptPayload
|
|
1052
|
+
extends TypedEntryFunctionPayload<
|
|
1053
|
+
[Address, Address, Address, string, string, bigint, bigint]
|
|
1054
|
+
> {
|
|
1055
|
+
/** @deprecated use {@link arguments_decoded} instead */
|
|
1056
|
+
arguments_typed: [
|
|
1057
|
+
Address,
|
|
1058
|
+
Address,
|
|
1059
|
+
Address,
|
|
1060
|
+
string,
|
|
1061
|
+
string,
|
|
1062
|
+
bigint,
|
|
1063
|
+
bigint
|
|
1064
|
+
];
|
|
1065
|
+
arguments_decoded: [
|
|
1066
|
+
Address,
|
|
1067
|
+
Address,
|
|
1068
|
+
Address,
|
|
1069
|
+
string,
|
|
1070
|
+
string,
|
|
1071
|
+
bigint,
|
|
1072
|
+
bigint
|
|
1073
|
+
];
|
|
1074
|
+
type_arguments: [];
|
|
1075
|
+
}
|
|
1076
|
+
|
|
1077
|
+
export function loadTypes(_r: MoveCoder) {
|
|
1078
|
+
loadAllTypes(_r);
|
|
1079
|
+
}
|
|
1080
|
+
export const ABI: MoveModule = JSON.parse(
|
|
1081
|
+
'{"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"}]}]}'
|
|
1082
|
+
);
|
|
1083
|
+
}
|
|
1084
|
+
|
|
1085
|
+
export function loadAllTypes(_r: MoveCoder) {
|
|
1086
|
+
_0x1.loadAllTypes(_r);
|
|
1087
|
+
|
|
1088
|
+
_r.load(token.ABI);
|
|
1089
|
+
_r.load(property_map.ABI);
|
|
1090
|
+
_r.load(token_coin_swap.ABI);
|
|
1091
|
+
_r.load(token_transfers.ABI);
|
|
1092
|
+
}
|