@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.
- package/lib/builtin/index.d.ts +0 -2
- package/lib/builtin/index.js +1 -3
- package/lib/builtin/index.js.map +1 -1
- package/lib/core/eth-plugin.js +12 -15
- package/lib/core/eth-plugin.js.map +1 -1
- package/lib/core/index.d.ts +0 -4
- package/lib/core/index.js +1 -9
- package/lib/core/index.js.map +1 -1
- package/lib/core/numberish.d.ts +1 -1
- package/lib/core/numberish.js +5 -13
- package/lib/core/numberish.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 +3 -14
- package/lib/index.js.map +1 -1
- package/lib/service.d.ts +0 -4
- package/lib/service.js +40 -71
- package/lib/service.js.map +1 -1
- package/package.json +5 -15
- package/src/builtin/index.ts +1 -4
- package/src/core/eth-plugin.ts +5 -8
- package/src/core/index.ts +0 -5
- package/src/core/numberish.ts +8 -15
- package/src/core/sui-plugin.ts +2 -2
- package/src/index.ts +3 -1
- package/src/service.ts +13 -71
- package/lib/aptos/api.d.ts +0 -2
- package/lib/aptos/api.js +0 -14
- package/lib/aptos/api.js.map +0 -1
- package/lib/aptos/aptos-plugin.d.ts +0 -14
- package/lib/aptos/aptos-plugin.js +0 -185
- package/lib/aptos/aptos-plugin.js.map +0 -1
- package/lib/aptos/aptos-processor.d.ts +0 -75
- package/lib/aptos/aptos-processor.js +0 -193
- package/lib/aptos/aptos-processor.js.map +0 -1
- package/lib/aptos/context.d.ts +0 -22
- package/lib/aptos/context.js +0 -65
- package/lib/aptos/context.js.map +0 -1
- package/lib/aptos/index.d.ts +0 -9
- package/lib/aptos/index.js +0 -34
- package/lib/aptos/index.js.map +0 -1
- package/lib/aptos/models.d.ts +0 -23
- package/lib/aptos/models.js +0 -3
- package/lib/aptos/models.js.map +0 -1
- package/lib/aptos/network.d.ts +0 -14
- package/lib/aptos/network.js +0 -46
- package/lib/aptos/network.js.map +0 -1
- package/lib/aptos/runtime.d.ts +0 -2
- package/lib/aptos/runtime.js +0 -16
- package/lib/aptos/runtime.js.map +0 -1
- package/lib/aptos/type-registry.d.ts +0 -21
- package/lib/aptos/type-registry.js +0 -156
- package/lib/aptos/type-registry.js.map +0 -1
- package/lib/aptos/types.d.ts +0 -9
- package/lib/aptos/types.js +0 -135
- package/lib/aptos/types.js.map +0 -1
- package/lib/aptos/types.test.d.ts +0 -1
- package/lib/aptos/types.test.js.map +0 -1
- package/lib/aptos/utils.d.ts +0 -7
- package/lib/aptos/utils.js +0 -27
- package/lib/aptos/utils.js.map +0 -1
- package/lib/aptos-codegen/codegen.d.ts +0 -23
- package/lib/aptos-codegen/codegen.js +0 -364
- package/lib/aptos-codegen/codegen.js.map +0 -1
- package/lib/aptos-codegen/typegen.d.ts +0 -17
- package/lib/aptos-codegen/typegen.js +0 -142
- package/lib/aptos-codegen/typegen.js.map +0 -1
- package/lib/builtin/aptos/0x1.d.ts +0 -1913
- package/lib/builtin/aptos/0x1.js +0 -2748
- package/lib/builtin/aptos/0x1.js.map +0 -1
- package/lib/builtin/aptos/0x3.d.ts +0 -482
- package/lib/builtin/aptos/0x3.js +0 -526
- package/lib/builtin/aptos/0x3.js.map +0 -1
- package/lib/builtin/aptos/index.d.ts +0 -2
- package/lib/builtin/aptos/index.js +0 -29
- package/lib/builtin/aptos/index.js.map +0 -1
- package/lib/builtin/solana/index.d.ts +0 -2
- package/lib/builtin/solana/index.js +0 -19
- package/lib/builtin/solana/index.js.map +0 -1
- package/lib/builtin/solana/spl-token-processor.d.ts +0 -39
- package/lib/builtin/solana/spl-token-processor.js +0 -258
- package/lib/builtin/solana/spl-token-processor.js.map +0 -1
- package/lib/builtin/solana/types.d.ts +0 -427
- package/lib/builtin/solana/types.js +0 -203
- package/lib/builtin/solana/types.js.map +0 -1
- package/lib/builtin/solana/wormhole-processor.d.ts +0 -16
- package/lib/builtin/solana/wormhole-processor.js +0 -195
- package/lib/builtin/solana/wormhole-processor.js.map +0 -1
- package/lib/core/solana-context.d.ts +0 -11
- package/lib/core/solana-context.js +0 -34
- package/lib/core/solana-context.js.map +0 -1
- package/lib/core/solana-options.d.ts +0 -8
- package/lib/core/solana-options.js +0 -13
- package/lib/core/solana-options.js.map +0 -1
- package/lib/core/solana-plugin.d.ts +0 -9
- package/lib/core/solana-plugin.js +0 -79
- package/lib/core/solana-plugin.js.map +0 -1
- package/lib/core/solana-processor.d.ts +0 -40
- package/lib/core/solana-processor.js +0 -80
- package/lib/core/solana-processor.js.map +0 -1
- package/lib/solana-codegen/codegen.d.ts +0 -1
- package/lib/solana-codegen/codegen.js +0 -113
- package/lib/solana-codegen/codegen.js.map +0 -1
- package/lib/test-abi-code-gen.d.ts +0 -2
- package/lib/test-abi-code-gen.js +0 -20
- package/lib/test-abi-code-gen.js.map +0 -1
- package/src/abis/aptos/0x1.json +0 -9205
- package/src/abis/aptos/0x3.json +0 -1515
- package/src/aptos/api.ts +0 -11
- package/src/aptos/aptos-plugin.ts +0 -216
- package/src/aptos/aptos-processor.ts +0 -305
- package/src/aptos/context.ts +0 -74
- package/src/aptos/index.ts +0 -10
- package/src/aptos/models.ts +0 -34
- package/src/aptos/network.ts +0 -42
- package/src/aptos/runtime.ts +0 -13
- package/src/aptos/type-registry.ts +0 -187
- package/src/aptos/types.ts +0 -149
- package/src/aptos/utils.ts +0 -26
- package/src/aptos-codegen/codegen.ts +0 -428
- package/src/aptos-codegen/tsconfig.json +0 -9
- package/src/aptos-codegen/typegen.ts +0 -153
- package/src/builtin/aptos/0x1.ts +0 -4210
- package/src/builtin/aptos/0x3.ts +0 -888
- package/src/builtin/aptos/index.ts +0 -2
- package/src/builtin/solana/index.ts +0 -2
- package/src/builtin/solana/spl-token-processor.ts +0 -298
- package/src/builtin/solana/types.ts +0 -279
- package/src/builtin/solana/wormhole-processor.ts +0 -178
- package/src/core/solana-context.ts +0 -34
- package/src/core/solana-options.ts +0 -8
- package/src/core/solana-plugin.ts +0 -97
- package/src/core/solana-processor.ts +0 -102
- package/src/solana-codegen/codegen.ts +0 -116
- package/src/test-abi-code-gen.ts +0 -16
package/lib/builtin/aptos/0x3.js
DELETED
|
@@ -1,526 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/* Autogenerated file. Do not edit manually. */
|
|
3
|
-
/* tslint:disable */
|
|
4
|
-
/* eslint-disable */
|
|
5
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
-
}
|
|
11
|
-
Object.defineProperty(o, k2, desc);
|
|
12
|
-
}) : (function(o, m, k, k2) {
|
|
13
|
-
if (k2 === undefined) k2 = k;
|
|
14
|
-
o[k2] = m[k];
|
|
15
|
-
}));
|
|
16
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
-
}) : function(o, v) {
|
|
19
|
-
o["default"] = v;
|
|
20
|
-
});
|
|
21
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
22
|
-
if (mod && mod.__esModule) return mod;
|
|
23
|
-
var result = {};
|
|
24
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
25
|
-
__setModuleDefault(result, mod);
|
|
26
|
-
return result;
|
|
27
|
-
};
|
|
28
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.loadAllTypes = exports.token_transfers = exports.token_coin_swap = exports.property_map = exports.token = void 0;
|
|
30
|
-
/* Generated modules for account 0x3 */
|
|
31
|
-
const sdk_1 = require("@sentio/sdk");
|
|
32
|
-
const _0x1 = __importStar(require("./0x1"));
|
|
33
|
-
class token extends sdk_1.aptos.AptosBaseProcessor {
|
|
34
|
-
constructor(options) {
|
|
35
|
-
super("token", options);
|
|
36
|
-
}
|
|
37
|
-
static DEFAULT_OPTIONS = {
|
|
38
|
-
address: "0x3",
|
|
39
|
-
network: sdk_1.aptos.AptosNetwork.MAIN_NET,
|
|
40
|
-
};
|
|
41
|
-
static bind(options = {}) {
|
|
42
|
-
return new token({ ...token.DEFAULT_OPTIONS, ...options });
|
|
43
|
-
}
|
|
44
|
-
onEntryBurn(func, filter) {
|
|
45
|
-
this.onEntryFunctionCall(func, {
|
|
46
|
-
...filter,
|
|
47
|
-
function: "token::burn",
|
|
48
|
-
});
|
|
49
|
-
return this;
|
|
50
|
-
}
|
|
51
|
-
onEntryBurnByCreator(func, filter) {
|
|
52
|
-
this.onEntryFunctionCall(func, {
|
|
53
|
-
...filter,
|
|
54
|
-
function: "token::burn_by_creator",
|
|
55
|
-
});
|
|
56
|
-
return this;
|
|
57
|
-
}
|
|
58
|
-
onEntryCreateCollectionScript(func, filter) {
|
|
59
|
-
this.onEntryFunctionCall(func, {
|
|
60
|
-
...filter,
|
|
61
|
-
function: "token::create_collection_script",
|
|
62
|
-
});
|
|
63
|
-
return this;
|
|
64
|
-
}
|
|
65
|
-
onEntryCreateTokenScript(func, filter) {
|
|
66
|
-
this.onEntryFunctionCall(func, {
|
|
67
|
-
...filter,
|
|
68
|
-
function: "token::create_token_script",
|
|
69
|
-
});
|
|
70
|
-
return this;
|
|
71
|
-
}
|
|
72
|
-
onEntryDirectTransferScript(func, filter) {
|
|
73
|
-
this.onEntryFunctionCall(func, {
|
|
74
|
-
...filter,
|
|
75
|
-
function: "token::direct_transfer_script",
|
|
76
|
-
});
|
|
77
|
-
return this;
|
|
78
|
-
}
|
|
79
|
-
onEntryInitializeTokenScript(func, filter) {
|
|
80
|
-
this.onEntryFunctionCall(func, {
|
|
81
|
-
...filter,
|
|
82
|
-
function: "token::initialize_token_script",
|
|
83
|
-
});
|
|
84
|
-
return this;
|
|
85
|
-
}
|
|
86
|
-
onEntryMintScript(func, filter) {
|
|
87
|
-
this.onEntryFunctionCall(func, {
|
|
88
|
-
...filter,
|
|
89
|
-
function: "token::mint_script",
|
|
90
|
-
});
|
|
91
|
-
return this;
|
|
92
|
-
}
|
|
93
|
-
onEntryMutateTokenProperties(func, filter) {
|
|
94
|
-
this.onEntryFunctionCall(func, {
|
|
95
|
-
...filter,
|
|
96
|
-
function: "token::mutate_token_properties",
|
|
97
|
-
});
|
|
98
|
-
return this;
|
|
99
|
-
}
|
|
100
|
-
onEntryOptInDirectTransfer(func, filter) {
|
|
101
|
-
this.onEntryFunctionCall(func, {
|
|
102
|
-
...filter,
|
|
103
|
-
function: "token::opt_in_direct_transfer",
|
|
104
|
-
});
|
|
105
|
-
return this;
|
|
106
|
-
}
|
|
107
|
-
onEventCreateCollectionEvent(func) {
|
|
108
|
-
this.onEvent(func, {
|
|
109
|
-
type: "token::CreateCollectionEvent",
|
|
110
|
-
});
|
|
111
|
-
return this;
|
|
112
|
-
}
|
|
113
|
-
onEventCreateTokenDataEvent(func) {
|
|
114
|
-
this.onEvent(func, {
|
|
115
|
-
type: "token::CreateTokenDataEvent",
|
|
116
|
-
});
|
|
117
|
-
return this;
|
|
118
|
-
}
|
|
119
|
-
onEventMintTokenEvent(func) {
|
|
120
|
-
this.onEvent(func, {
|
|
121
|
-
type: "token::MintTokenEvent",
|
|
122
|
-
});
|
|
123
|
-
return this;
|
|
124
|
-
}
|
|
125
|
-
onEventDepositEvent(func) {
|
|
126
|
-
this.onEvent(func, {
|
|
127
|
-
type: "token::DepositEvent",
|
|
128
|
-
});
|
|
129
|
-
return this;
|
|
130
|
-
}
|
|
131
|
-
onEventWithdrawEvent(func) {
|
|
132
|
-
this.onEvent(func, {
|
|
133
|
-
type: "token::WithdrawEvent",
|
|
134
|
-
});
|
|
135
|
-
return this;
|
|
136
|
-
}
|
|
137
|
-
onEventBurnTokenEvent(func) {
|
|
138
|
-
this.onEvent(func, {
|
|
139
|
-
type: "token::BurnTokenEvent",
|
|
140
|
-
});
|
|
141
|
-
return this;
|
|
142
|
-
}
|
|
143
|
-
onEventMutateTokenPropertyMapEvent(func) {
|
|
144
|
-
this.onEvent(func, {
|
|
145
|
-
type: "token::MutateTokenPropertyMapEvent",
|
|
146
|
-
});
|
|
147
|
-
return this;
|
|
148
|
-
}
|
|
149
|
-
loadTypesInternal(registry) {
|
|
150
|
-
loadAllTypes(registry);
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
exports.token = token;
|
|
154
|
-
(function (token) {
|
|
155
|
-
class BurnTokenEvent {
|
|
156
|
-
static TYPE_QNAME = "0x3::token::BurnTokenEvent";
|
|
157
|
-
id;
|
|
158
|
-
amount;
|
|
159
|
-
}
|
|
160
|
-
token.BurnTokenEvent = BurnTokenEvent;
|
|
161
|
-
class CollectionData {
|
|
162
|
-
static TYPE_QNAME = "0x3::token::CollectionData";
|
|
163
|
-
description;
|
|
164
|
-
name;
|
|
165
|
-
uri;
|
|
166
|
-
supply;
|
|
167
|
-
maximum;
|
|
168
|
-
mutability_config;
|
|
169
|
-
}
|
|
170
|
-
token.CollectionData = CollectionData;
|
|
171
|
-
class CollectionMutabilityConfig {
|
|
172
|
-
static TYPE_QNAME = "0x3::token::CollectionMutabilityConfig";
|
|
173
|
-
description;
|
|
174
|
-
uri;
|
|
175
|
-
maximum;
|
|
176
|
-
}
|
|
177
|
-
token.CollectionMutabilityConfig = CollectionMutabilityConfig;
|
|
178
|
-
class Collections {
|
|
179
|
-
static TYPE_QNAME = "0x3::token::Collections";
|
|
180
|
-
collection_data;
|
|
181
|
-
token_data;
|
|
182
|
-
create_collection_events;
|
|
183
|
-
create_token_data_events;
|
|
184
|
-
mint_token_events;
|
|
185
|
-
}
|
|
186
|
-
token.Collections = Collections;
|
|
187
|
-
class CreateCollectionEvent {
|
|
188
|
-
static TYPE_QNAME = "0x3::token::CreateCollectionEvent";
|
|
189
|
-
creator;
|
|
190
|
-
collection_name;
|
|
191
|
-
uri;
|
|
192
|
-
description;
|
|
193
|
-
maximum;
|
|
194
|
-
}
|
|
195
|
-
token.CreateCollectionEvent = CreateCollectionEvent;
|
|
196
|
-
class CreateTokenDataEvent {
|
|
197
|
-
static TYPE_QNAME = "0x3::token::CreateTokenDataEvent";
|
|
198
|
-
id;
|
|
199
|
-
description;
|
|
200
|
-
maximum;
|
|
201
|
-
uri;
|
|
202
|
-
royalty_payee_address;
|
|
203
|
-
royalty_points_denominator;
|
|
204
|
-
royalty_points_numerator;
|
|
205
|
-
name;
|
|
206
|
-
mutability_config;
|
|
207
|
-
property_keys;
|
|
208
|
-
property_values;
|
|
209
|
-
property_types;
|
|
210
|
-
}
|
|
211
|
-
token.CreateTokenDataEvent = CreateTokenDataEvent;
|
|
212
|
-
class DepositEvent {
|
|
213
|
-
static TYPE_QNAME = "0x3::token::DepositEvent";
|
|
214
|
-
id;
|
|
215
|
-
amount;
|
|
216
|
-
}
|
|
217
|
-
token.DepositEvent = DepositEvent;
|
|
218
|
-
class MintTokenEvent {
|
|
219
|
-
static TYPE_QNAME = "0x3::token::MintTokenEvent";
|
|
220
|
-
id;
|
|
221
|
-
amount;
|
|
222
|
-
}
|
|
223
|
-
token.MintTokenEvent = MintTokenEvent;
|
|
224
|
-
class MutateTokenPropertyMapEvent {
|
|
225
|
-
static TYPE_QNAME = "0x3::token::MutateTokenPropertyMapEvent";
|
|
226
|
-
old_id;
|
|
227
|
-
new_id;
|
|
228
|
-
keys;
|
|
229
|
-
values;
|
|
230
|
-
types;
|
|
231
|
-
}
|
|
232
|
-
token.MutateTokenPropertyMapEvent = MutateTokenPropertyMapEvent;
|
|
233
|
-
class Royalty {
|
|
234
|
-
static TYPE_QNAME = "0x3::token::Royalty";
|
|
235
|
-
royalty_points_numerator;
|
|
236
|
-
royalty_points_denominator;
|
|
237
|
-
payee_address;
|
|
238
|
-
}
|
|
239
|
-
token.Royalty = Royalty;
|
|
240
|
-
class Token {
|
|
241
|
-
static TYPE_QNAME = "0x3::token::Token";
|
|
242
|
-
id;
|
|
243
|
-
amount;
|
|
244
|
-
token_properties;
|
|
245
|
-
}
|
|
246
|
-
token.Token = Token;
|
|
247
|
-
class TokenData {
|
|
248
|
-
static TYPE_QNAME = "0x3::token::TokenData";
|
|
249
|
-
maximum;
|
|
250
|
-
largest_property_version;
|
|
251
|
-
supply;
|
|
252
|
-
uri;
|
|
253
|
-
royalty;
|
|
254
|
-
name;
|
|
255
|
-
description;
|
|
256
|
-
default_properties;
|
|
257
|
-
mutability_config;
|
|
258
|
-
}
|
|
259
|
-
token.TokenData = TokenData;
|
|
260
|
-
class TokenDataId {
|
|
261
|
-
static TYPE_QNAME = "0x3::token::TokenDataId";
|
|
262
|
-
creator;
|
|
263
|
-
collection;
|
|
264
|
-
name;
|
|
265
|
-
}
|
|
266
|
-
token.TokenDataId = TokenDataId;
|
|
267
|
-
class TokenId {
|
|
268
|
-
static TYPE_QNAME = "0x3::token::TokenId";
|
|
269
|
-
token_data_id;
|
|
270
|
-
property_version;
|
|
271
|
-
}
|
|
272
|
-
token.TokenId = TokenId;
|
|
273
|
-
class TokenMutabilityConfig {
|
|
274
|
-
static TYPE_QNAME = "0x3::token::TokenMutabilityConfig";
|
|
275
|
-
maximum;
|
|
276
|
-
uri;
|
|
277
|
-
royalty;
|
|
278
|
-
description;
|
|
279
|
-
properties;
|
|
280
|
-
}
|
|
281
|
-
token.TokenMutabilityConfig = TokenMutabilityConfig;
|
|
282
|
-
class TokenStore {
|
|
283
|
-
static TYPE_QNAME = "0x3::token::TokenStore";
|
|
284
|
-
tokens;
|
|
285
|
-
direct_transfer;
|
|
286
|
-
deposit_events;
|
|
287
|
-
withdraw_events;
|
|
288
|
-
burn_events;
|
|
289
|
-
mutate_token_property_events;
|
|
290
|
-
}
|
|
291
|
-
token.TokenStore = TokenStore;
|
|
292
|
-
class WithdrawCapability {
|
|
293
|
-
static TYPE_QNAME = "0x3::token::WithdrawCapability";
|
|
294
|
-
token_owner;
|
|
295
|
-
token_id;
|
|
296
|
-
amount;
|
|
297
|
-
expiration_sec;
|
|
298
|
-
}
|
|
299
|
-
token.WithdrawCapability = WithdrawCapability;
|
|
300
|
-
class WithdrawEvent {
|
|
301
|
-
static TYPE_QNAME = "0x3::token::WithdrawEvent";
|
|
302
|
-
id;
|
|
303
|
-
amount;
|
|
304
|
-
}
|
|
305
|
-
token.WithdrawEvent = WithdrawEvent;
|
|
306
|
-
function loadTypes(_r) {
|
|
307
|
-
loadAllTypes(_r);
|
|
308
|
-
}
|
|
309
|
-
token.loadTypes = loadTypes;
|
|
310
|
-
token.ABI = JSON.parse('{"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"}]}]}');
|
|
311
|
-
})(token = exports.token || (exports.token = {}));
|
|
312
|
-
var property_map;
|
|
313
|
-
(function (property_map) {
|
|
314
|
-
class PropertyMap {
|
|
315
|
-
static TYPE_QNAME = "0x3::property_map::PropertyMap";
|
|
316
|
-
map;
|
|
317
|
-
}
|
|
318
|
-
property_map.PropertyMap = PropertyMap;
|
|
319
|
-
class PropertyValue {
|
|
320
|
-
static TYPE_QNAME = "0x3::property_map::PropertyValue";
|
|
321
|
-
value;
|
|
322
|
-
type;
|
|
323
|
-
}
|
|
324
|
-
property_map.PropertyValue = PropertyValue;
|
|
325
|
-
function loadTypes(_r) {
|
|
326
|
-
loadAllTypes(_r);
|
|
327
|
-
}
|
|
328
|
-
property_map.loadTypes = loadTypes;
|
|
329
|
-
property_map.ABI = JSON.parse('{"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"}]}]}');
|
|
330
|
-
})(property_map = exports.property_map || (exports.property_map = {}));
|
|
331
|
-
class token_coin_swap extends sdk_1.aptos.AptosBaseProcessor {
|
|
332
|
-
constructor(options) {
|
|
333
|
-
super("token_coin_swap", options);
|
|
334
|
-
}
|
|
335
|
-
static DEFAULT_OPTIONS = {
|
|
336
|
-
address: "0x3",
|
|
337
|
-
network: sdk_1.aptos.AptosNetwork.MAIN_NET,
|
|
338
|
-
};
|
|
339
|
-
static bind(options = {}) {
|
|
340
|
-
return new token_coin_swap({
|
|
341
|
-
...token_coin_swap.DEFAULT_OPTIONS,
|
|
342
|
-
...options,
|
|
343
|
-
});
|
|
344
|
-
}
|
|
345
|
-
onEntryListTokenForSwap(func, filter) {
|
|
346
|
-
this.onEntryFunctionCall(func, {
|
|
347
|
-
...filter,
|
|
348
|
-
function: "token_coin_swap::list_token_for_swap",
|
|
349
|
-
});
|
|
350
|
-
return this;
|
|
351
|
-
}
|
|
352
|
-
onEventTokenListingEvent(func) {
|
|
353
|
-
this.onEvent(func, {
|
|
354
|
-
type: "token_coin_swap::TokenListingEvent",
|
|
355
|
-
});
|
|
356
|
-
return this;
|
|
357
|
-
}
|
|
358
|
-
onEventTokenSwapEvent(func) {
|
|
359
|
-
this.onEvent(func, {
|
|
360
|
-
type: "token_coin_swap::TokenSwapEvent",
|
|
361
|
-
});
|
|
362
|
-
return this;
|
|
363
|
-
}
|
|
364
|
-
loadTypesInternal(registry) {
|
|
365
|
-
loadAllTypes(registry);
|
|
366
|
-
}
|
|
367
|
-
}
|
|
368
|
-
exports.token_coin_swap = token_coin_swap;
|
|
369
|
-
(function (token_coin_swap) {
|
|
370
|
-
class TokenCoinSwap {
|
|
371
|
-
static TYPE_QNAME = "0x3::token_coin_swap::TokenCoinSwap";
|
|
372
|
-
token_amount;
|
|
373
|
-
min_price_per_token;
|
|
374
|
-
}
|
|
375
|
-
token_coin_swap.TokenCoinSwap = TokenCoinSwap;
|
|
376
|
-
class TokenEscrow {
|
|
377
|
-
static TYPE_QNAME = "0x3::token_coin_swap::TokenEscrow";
|
|
378
|
-
token;
|
|
379
|
-
locked_until_secs;
|
|
380
|
-
}
|
|
381
|
-
token_coin_swap.TokenEscrow = TokenEscrow;
|
|
382
|
-
class TokenListingEvent {
|
|
383
|
-
static TYPE_QNAME = "0x3::token_coin_swap::TokenListingEvent";
|
|
384
|
-
token_id;
|
|
385
|
-
amount;
|
|
386
|
-
min_price;
|
|
387
|
-
locked_until_secs;
|
|
388
|
-
coin_type_info;
|
|
389
|
-
}
|
|
390
|
-
token_coin_swap.TokenListingEvent = TokenListingEvent;
|
|
391
|
-
class TokenListings {
|
|
392
|
-
static TYPE_QNAME = "0x3::token_coin_swap::TokenListings";
|
|
393
|
-
listings;
|
|
394
|
-
listing_events;
|
|
395
|
-
swap_events;
|
|
396
|
-
}
|
|
397
|
-
token_coin_swap.TokenListings = TokenListings;
|
|
398
|
-
class TokenStoreEscrow {
|
|
399
|
-
static TYPE_QNAME = "0x3::token_coin_swap::TokenStoreEscrow";
|
|
400
|
-
token_escrows;
|
|
401
|
-
}
|
|
402
|
-
token_coin_swap.TokenStoreEscrow = TokenStoreEscrow;
|
|
403
|
-
class TokenSwapEvent {
|
|
404
|
-
static TYPE_QNAME = "0x3::token_coin_swap::TokenSwapEvent";
|
|
405
|
-
token_id;
|
|
406
|
-
token_buyer;
|
|
407
|
-
token_amount;
|
|
408
|
-
coin_amount;
|
|
409
|
-
coin_type_info;
|
|
410
|
-
}
|
|
411
|
-
token_coin_swap.TokenSwapEvent = TokenSwapEvent;
|
|
412
|
-
function loadTypes(_r) {
|
|
413
|
-
loadAllTypes(_r);
|
|
414
|
-
}
|
|
415
|
-
token_coin_swap.loadTypes = loadTypes;
|
|
416
|
-
token_coin_swap.ABI = JSON.parse('{"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"}]}]}');
|
|
417
|
-
})(token_coin_swap = exports.token_coin_swap || (exports.token_coin_swap = {}));
|
|
418
|
-
class token_transfers extends sdk_1.aptos.AptosBaseProcessor {
|
|
419
|
-
constructor(options) {
|
|
420
|
-
super("token_transfers", options);
|
|
421
|
-
}
|
|
422
|
-
static DEFAULT_OPTIONS = {
|
|
423
|
-
address: "0x3",
|
|
424
|
-
network: sdk_1.aptos.AptosNetwork.MAIN_NET,
|
|
425
|
-
};
|
|
426
|
-
static bind(options = {}) {
|
|
427
|
-
return new token_transfers({
|
|
428
|
-
...token_transfers.DEFAULT_OPTIONS,
|
|
429
|
-
...options,
|
|
430
|
-
});
|
|
431
|
-
}
|
|
432
|
-
onEntryCancelOfferScript(func, filter) {
|
|
433
|
-
this.onEntryFunctionCall(func, {
|
|
434
|
-
...filter,
|
|
435
|
-
function: "token_transfers::cancel_offer_script",
|
|
436
|
-
});
|
|
437
|
-
return this;
|
|
438
|
-
}
|
|
439
|
-
onEntryClaimScript(func, filter) {
|
|
440
|
-
this.onEntryFunctionCall(func, {
|
|
441
|
-
...filter,
|
|
442
|
-
function: "token_transfers::claim_script",
|
|
443
|
-
});
|
|
444
|
-
return this;
|
|
445
|
-
}
|
|
446
|
-
onEntryOfferScript(func, filter) {
|
|
447
|
-
this.onEntryFunctionCall(func, {
|
|
448
|
-
...filter,
|
|
449
|
-
function: "token_transfers::offer_script",
|
|
450
|
-
});
|
|
451
|
-
return this;
|
|
452
|
-
}
|
|
453
|
-
onEventTokenOfferEvent(func) {
|
|
454
|
-
this.onEvent(func, {
|
|
455
|
-
type: "token_transfers::TokenOfferEvent",
|
|
456
|
-
});
|
|
457
|
-
return this;
|
|
458
|
-
}
|
|
459
|
-
onEventTokenCancelOfferEvent(func) {
|
|
460
|
-
this.onEvent(func, {
|
|
461
|
-
type: "token_transfers::TokenCancelOfferEvent",
|
|
462
|
-
});
|
|
463
|
-
return this;
|
|
464
|
-
}
|
|
465
|
-
onEventTokenClaimEvent(func) {
|
|
466
|
-
this.onEvent(func, {
|
|
467
|
-
type: "token_transfers::TokenClaimEvent",
|
|
468
|
-
});
|
|
469
|
-
return this;
|
|
470
|
-
}
|
|
471
|
-
loadTypesInternal(registry) {
|
|
472
|
-
loadAllTypes(registry);
|
|
473
|
-
}
|
|
474
|
-
}
|
|
475
|
-
exports.token_transfers = token_transfers;
|
|
476
|
-
(function (token_transfers) {
|
|
477
|
-
class PendingClaims {
|
|
478
|
-
static TYPE_QNAME = "0x3::token_transfers::PendingClaims";
|
|
479
|
-
pending_claims;
|
|
480
|
-
offer_events;
|
|
481
|
-
cancel_offer_events;
|
|
482
|
-
claim_events;
|
|
483
|
-
}
|
|
484
|
-
token_transfers.PendingClaims = PendingClaims;
|
|
485
|
-
class TokenCancelOfferEvent {
|
|
486
|
-
static TYPE_QNAME = "0x3::token_transfers::TokenCancelOfferEvent";
|
|
487
|
-
to_address;
|
|
488
|
-
token_id;
|
|
489
|
-
amount;
|
|
490
|
-
}
|
|
491
|
-
token_transfers.TokenCancelOfferEvent = TokenCancelOfferEvent;
|
|
492
|
-
class TokenClaimEvent {
|
|
493
|
-
static TYPE_QNAME = "0x3::token_transfers::TokenClaimEvent";
|
|
494
|
-
to_address;
|
|
495
|
-
token_id;
|
|
496
|
-
amount;
|
|
497
|
-
}
|
|
498
|
-
token_transfers.TokenClaimEvent = TokenClaimEvent;
|
|
499
|
-
class TokenOfferEvent {
|
|
500
|
-
static TYPE_QNAME = "0x3::token_transfers::TokenOfferEvent";
|
|
501
|
-
to_address;
|
|
502
|
-
token_id;
|
|
503
|
-
amount;
|
|
504
|
-
}
|
|
505
|
-
token_transfers.TokenOfferEvent = TokenOfferEvent;
|
|
506
|
-
class TokenOfferId {
|
|
507
|
-
static TYPE_QNAME = "0x3::token_transfers::TokenOfferId";
|
|
508
|
-
to_addr;
|
|
509
|
-
token_id;
|
|
510
|
-
}
|
|
511
|
-
token_transfers.TokenOfferId = TokenOfferId;
|
|
512
|
-
function loadTypes(_r) {
|
|
513
|
-
loadAllTypes(_r);
|
|
514
|
-
}
|
|
515
|
-
token_transfers.loadTypes = loadTypes;
|
|
516
|
-
token_transfers.ABI = JSON.parse('{"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"}]}]}');
|
|
517
|
-
})(token_transfers = exports.token_transfers || (exports.token_transfers = {}));
|
|
518
|
-
function loadAllTypes(_r) {
|
|
519
|
-
_0x1.loadAllTypes(_r);
|
|
520
|
-
_r.load(token.ABI);
|
|
521
|
-
_r.load(property_map.ABI);
|
|
522
|
-
_r.load(token_coin_swap.ABI);
|
|
523
|
-
_r.load(token_transfers.ABI);
|
|
524
|
-
}
|
|
525
|
-
exports.loadAllTypes = loadAllTypes;
|
|
526
|
-
//# sourceMappingURL=0x3.js.map
|