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