@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,414 @@
|
|
1
|
+
import { aptos } from "@sentio/sdk";
|
2
|
+
import { Address, MoveModule } from "aptos/src/generated";
|
3
|
+
import { table, event, simple_map, type_info } from "./0x1";
|
4
|
+
export declare class token extends aptos.AptosBaseProcessor {
|
5
|
+
constructor(options: aptos.AptosBindOptions);
|
6
|
+
static DEFAULT_OPTIONS: aptos.AptosBindOptions;
|
7
|
+
static bind(options?: Partial<aptos.AptosBindOptions>): token;
|
8
|
+
onEntryBurn(func: (call: token.BurnPayload, ctx: aptos.AptosContext) => void): token;
|
9
|
+
onEntryBurnByCreator(func: (call: token.BurnByCreatorPayload, ctx: aptos.AptosContext) => void): token;
|
10
|
+
onEntryCreateCollectionScript(func: (call: token.CreateCollectionScriptPayload, ctx: aptos.AptosContext) => void): token;
|
11
|
+
onEntryCreateTokenScript(func: (call: token.CreateTokenScriptPayload, ctx: aptos.AptosContext) => void): token;
|
12
|
+
onEntryDirectTransferScript(func: (call: token.DirectTransferScriptPayload, ctx: aptos.AptosContext) => void): token;
|
13
|
+
onEntryInitializeTokenScript(func: (call: token.InitializeTokenScriptPayload, ctx: aptos.AptosContext) => void): token;
|
14
|
+
onEntryMintScript(func: (call: token.MintScriptPayload, ctx: aptos.AptosContext) => void): token;
|
15
|
+
onEntryMutateTokenProperties(func: (call: token.MutateTokenPropertiesPayload, ctx: aptos.AptosContext) => void): token;
|
16
|
+
onEntryOptInDirectTransfer(func: (call: token.OptInDirectTransferPayload, ctx: aptos.AptosContext) => void): token;
|
17
|
+
onEventBurnTokenEvent(func: (event: token.BurnTokenEventInstance, ctx: aptos.AptosContext) => void): token;
|
18
|
+
onEventCreateCollectionEvent(func: (event: token.CreateCollectionEventInstance, ctx: aptos.AptosContext) => void): token;
|
19
|
+
onEventCreateTokenDataEvent(func: (event: token.CreateTokenDataEventInstance, ctx: aptos.AptosContext) => void): token;
|
20
|
+
onEventDepositEvent(func: (event: token.DepositEventInstance, ctx: aptos.AptosContext) => void): token;
|
21
|
+
onEventMintTokenEvent(func: (event: token.MintTokenEventInstance, ctx: aptos.AptosContext) => void): token;
|
22
|
+
onEventMutateTokenPropertyMapEvent(func: (event: token.MutateTokenPropertyMapEventInstance, ctx: aptos.AptosContext) => void): token;
|
23
|
+
onEventWithdrawEvent(func: (event: token.WithdrawEventInstance, ctx: aptos.AptosContext) => void): token;
|
24
|
+
loadTypesInternal(registry: aptos.TypeRegistry): void;
|
25
|
+
}
|
26
|
+
export declare namespace token {
|
27
|
+
class BurnTokenEvent {
|
28
|
+
id: token.TokenId;
|
29
|
+
amount: bigint;
|
30
|
+
}
|
31
|
+
interface BurnTokenEventInstance extends aptos.TypedEventInstance<BurnTokenEvent> {
|
32
|
+
data_typed: BurnTokenEvent;
|
33
|
+
}
|
34
|
+
class CollectionData {
|
35
|
+
description: string;
|
36
|
+
name: string;
|
37
|
+
uri: string;
|
38
|
+
supply: bigint;
|
39
|
+
maximum: bigint;
|
40
|
+
mutability_config: token.CollectionMutabilityConfig;
|
41
|
+
}
|
42
|
+
class CollectionMutabilityConfig {
|
43
|
+
description: Boolean;
|
44
|
+
uri: Boolean;
|
45
|
+
maximum: Boolean;
|
46
|
+
}
|
47
|
+
class Collections {
|
48
|
+
collection_data: table.Table<string, token.CollectionData>;
|
49
|
+
token_data: table.Table<token.TokenDataId, token.TokenData>;
|
50
|
+
create_collection_events: event.EventHandle<token.CreateCollectionEvent>;
|
51
|
+
create_token_data_events: event.EventHandle<token.CreateTokenDataEvent>;
|
52
|
+
mint_token_events: event.EventHandle<token.MintTokenEvent>;
|
53
|
+
}
|
54
|
+
class CreateCollectionEvent {
|
55
|
+
creator: Address;
|
56
|
+
collection_name: string;
|
57
|
+
uri: string;
|
58
|
+
description: string;
|
59
|
+
maximum: bigint;
|
60
|
+
}
|
61
|
+
interface CreateCollectionEventInstance extends aptos.TypedEventInstance<CreateCollectionEvent> {
|
62
|
+
data_typed: CreateCollectionEvent;
|
63
|
+
}
|
64
|
+
class CreateTokenDataEvent {
|
65
|
+
id: token.TokenDataId;
|
66
|
+
description: string;
|
67
|
+
maximum: bigint;
|
68
|
+
uri: string;
|
69
|
+
royalty_payee_address: Address;
|
70
|
+
royalty_points_denominator: bigint;
|
71
|
+
royalty_points_numerator: bigint;
|
72
|
+
name: string;
|
73
|
+
mutability_config: token.TokenMutabilityConfig;
|
74
|
+
property_keys: string[];
|
75
|
+
property_values: string[];
|
76
|
+
property_types: string[];
|
77
|
+
}
|
78
|
+
interface CreateTokenDataEventInstance extends aptos.TypedEventInstance<CreateTokenDataEvent> {
|
79
|
+
data_typed: CreateTokenDataEvent;
|
80
|
+
}
|
81
|
+
class DepositEvent {
|
82
|
+
id: token.TokenId;
|
83
|
+
amount: bigint;
|
84
|
+
}
|
85
|
+
interface DepositEventInstance extends aptos.TypedEventInstance<DepositEvent> {
|
86
|
+
data_typed: DepositEvent;
|
87
|
+
}
|
88
|
+
class MintTokenEvent {
|
89
|
+
id: token.TokenDataId;
|
90
|
+
amount: bigint;
|
91
|
+
}
|
92
|
+
interface MintTokenEventInstance extends aptos.TypedEventInstance<MintTokenEvent> {
|
93
|
+
data_typed: MintTokenEvent;
|
94
|
+
}
|
95
|
+
class MutateTokenPropertyMapEvent {
|
96
|
+
old_id: token.TokenId;
|
97
|
+
new_id: token.TokenId;
|
98
|
+
keys: string[];
|
99
|
+
values: string[];
|
100
|
+
types: string[];
|
101
|
+
}
|
102
|
+
interface MutateTokenPropertyMapEventInstance extends aptos.TypedEventInstance<MutateTokenPropertyMapEvent> {
|
103
|
+
data_typed: MutateTokenPropertyMapEvent;
|
104
|
+
}
|
105
|
+
class Royalty {
|
106
|
+
royalty_points_numerator: bigint;
|
107
|
+
royalty_points_denominator: bigint;
|
108
|
+
payee_address: Address;
|
109
|
+
}
|
110
|
+
class Token {
|
111
|
+
id: token.TokenId;
|
112
|
+
amount: bigint;
|
113
|
+
token_properties: property_map.PropertyMap;
|
114
|
+
}
|
115
|
+
class TokenData {
|
116
|
+
maximum: bigint;
|
117
|
+
largest_property_version: bigint;
|
118
|
+
supply: bigint;
|
119
|
+
uri: string;
|
120
|
+
royalty: token.Royalty;
|
121
|
+
name: string;
|
122
|
+
description: string;
|
123
|
+
default_properties: property_map.PropertyMap;
|
124
|
+
mutability_config: token.TokenMutabilityConfig;
|
125
|
+
}
|
126
|
+
class TokenDataId {
|
127
|
+
creator: Address;
|
128
|
+
collection: string;
|
129
|
+
name: string;
|
130
|
+
}
|
131
|
+
class TokenId {
|
132
|
+
token_data_id: token.TokenDataId;
|
133
|
+
property_version: bigint;
|
134
|
+
}
|
135
|
+
class TokenMutabilityConfig {
|
136
|
+
maximum: Boolean;
|
137
|
+
uri: Boolean;
|
138
|
+
royalty: Boolean;
|
139
|
+
description: Boolean;
|
140
|
+
properties: Boolean;
|
141
|
+
}
|
142
|
+
class TokenStore {
|
143
|
+
tokens: table.Table<token.TokenId, token.Token>;
|
144
|
+
direct_transfer: Boolean;
|
145
|
+
deposit_events: event.EventHandle<token.DepositEvent>;
|
146
|
+
withdraw_events: event.EventHandle<token.WithdrawEvent>;
|
147
|
+
burn_events: event.EventHandle<token.BurnTokenEvent>;
|
148
|
+
mutate_token_property_events: event.EventHandle<token.MutateTokenPropertyMapEvent>;
|
149
|
+
}
|
150
|
+
class WithdrawCapability {
|
151
|
+
token_owner: Address;
|
152
|
+
token_id: token.TokenId;
|
153
|
+
amount: bigint;
|
154
|
+
expiration_sec: bigint;
|
155
|
+
}
|
156
|
+
class WithdrawEvent {
|
157
|
+
id: token.TokenId;
|
158
|
+
amount: bigint;
|
159
|
+
}
|
160
|
+
interface WithdrawEventInstance extends aptos.TypedEventInstance<WithdrawEvent> {
|
161
|
+
data_typed: WithdrawEvent;
|
162
|
+
}
|
163
|
+
interface BurnPayload extends aptos.TypedEntryFunctionPayload<[
|
164
|
+
Address,
|
165
|
+
string,
|
166
|
+
string,
|
167
|
+
bigint,
|
168
|
+
bigint
|
169
|
+
]> {
|
170
|
+
arguments_typed: [Address, string, string, bigint, bigint];
|
171
|
+
}
|
172
|
+
interface BurnByCreatorPayload extends aptos.TypedEntryFunctionPayload<[
|
173
|
+
Address,
|
174
|
+
string,
|
175
|
+
string,
|
176
|
+
bigint,
|
177
|
+
bigint
|
178
|
+
]> {
|
179
|
+
arguments_typed: [Address, string, string, bigint, bigint];
|
180
|
+
}
|
181
|
+
interface CreateCollectionScriptPayload extends aptos.TypedEntryFunctionPayload<[
|
182
|
+
string,
|
183
|
+
string,
|
184
|
+
string,
|
185
|
+
bigint,
|
186
|
+
Boolean[]
|
187
|
+
]> {
|
188
|
+
arguments_typed: [string, string, string, bigint, Boolean[]];
|
189
|
+
}
|
190
|
+
interface CreateTokenScriptPayload extends aptos.TypedEntryFunctionPayload<[
|
191
|
+
string,
|
192
|
+
string,
|
193
|
+
string,
|
194
|
+
bigint,
|
195
|
+
bigint,
|
196
|
+
string,
|
197
|
+
Address,
|
198
|
+
bigint,
|
199
|
+
bigint,
|
200
|
+
Boolean[],
|
201
|
+
string[],
|
202
|
+
string[],
|
203
|
+
string[]
|
204
|
+
]> {
|
205
|
+
arguments_typed: [
|
206
|
+
string,
|
207
|
+
string,
|
208
|
+
string,
|
209
|
+
bigint,
|
210
|
+
bigint,
|
211
|
+
string,
|
212
|
+
Address,
|
213
|
+
bigint,
|
214
|
+
bigint,
|
215
|
+
Boolean[],
|
216
|
+
string[],
|
217
|
+
string[],
|
218
|
+
string[]
|
219
|
+
];
|
220
|
+
}
|
221
|
+
interface DirectTransferScriptPayload extends aptos.TypedEntryFunctionPayload<[
|
222
|
+
Address,
|
223
|
+
Address,
|
224
|
+
string,
|
225
|
+
string,
|
226
|
+
bigint,
|
227
|
+
bigint
|
228
|
+
]> {
|
229
|
+
arguments_typed: [Address, Address, string, string, bigint, bigint];
|
230
|
+
}
|
231
|
+
interface InitializeTokenScriptPayload extends aptos.TypedEntryFunctionPayload<[]> {
|
232
|
+
arguments_typed: [];
|
233
|
+
}
|
234
|
+
interface MintScriptPayload extends aptos.TypedEntryFunctionPayload<[Address, string, string, bigint]> {
|
235
|
+
arguments_typed: [Address, string, string, bigint];
|
236
|
+
}
|
237
|
+
interface MutateTokenPropertiesPayload extends aptos.TypedEntryFunctionPayload<[
|
238
|
+
Address,
|
239
|
+
Address,
|
240
|
+
string,
|
241
|
+
string,
|
242
|
+
bigint,
|
243
|
+
bigint,
|
244
|
+
string[],
|
245
|
+
string[],
|
246
|
+
string[]
|
247
|
+
]> {
|
248
|
+
arguments_typed: [
|
249
|
+
Address,
|
250
|
+
Address,
|
251
|
+
string,
|
252
|
+
string,
|
253
|
+
bigint,
|
254
|
+
bigint,
|
255
|
+
string[],
|
256
|
+
string[],
|
257
|
+
string[]
|
258
|
+
];
|
259
|
+
}
|
260
|
+
interface OptInDirectTransferPayload extends aptos.TypedEntryFunctionPayload<[Boolean]> {
|
261
|
+
arguments_typed: [Boolean];
|
262
|
+
}
|
263
|
+
function loadTypes(registry: aptos.TypeRegistry): void;
|
264
|
+
const ABI: MoveModule;
|
265
|
+
}
|
266
|
+
export declare namespace property_map {
|
267
|
+
class PropertyMap {
|
268
|
+
map: simple_map.SimpleMap<string, property_map.PropertyValue>;
|
269
|
+
}
|
270
|
+
class PropertyValue {
|
271
|
+
value: string;
|
272
|
+
type: string;
|
273
|
+
}
|
274
|
+
function loadTypes(registry: aptos.TypeRegistry): void;
|
275
|
+
const ABI: MoveModule;
|
276
|
+
}
|
277
|
+
export declare class token_coin_swap extends aptos.AptosBaseProcessor {
|
278
|
+
constructor(options: aptos.AptosBindOptions);
|
279
|
+
static DEFAULT_OPTIONS: aptos.AptosBindOptions;
|
280
|
+
static bind(options?: Partial<aptos.AptosBindOptions>): token_coin_swap;
|
281
|
+
onEntryListTokenForSwap<T0>(func: (call: token_coin_swap.ListTokenForSwapPayload<T0>, ctx: aptos.AptosContext) => void): token_coin_swap;
|
282
|
+
onEventTokenListingEvent(func: (event: token_coin_swap.TokenListingEventInstance, ctx: aptos.AptosContext) => void): token_coin_swap;
|
283
|
+
onEventTokenSwapEvent(func: (event: token_coin_swap.TokenSwapEventInstance, ctx: aptos.AptosContext) => void): token_coin_swap;
|
284
|
+
loadTypesInternal(registry: aptos.TypeRegistry): void;
|
285
|
+
}
|
286
|
+
export declare namespace token_coin_swap {
|
287
|
+
class TokenCoinSwap<T0> {
|
288
|
+
token_amount: bigint;
|
289
|
+
min_price_per_token: bigint;
|
290
|
+
}
|
291
|
+
class TokenEscrow {
|
292
|
+
token: token.Token;
|
293
|
+
locked_until_secs: bigint;
|
294
|
+
}
|
295
|
+
class TokenListingEvent {
|
296
|
+
token_id: token.TokenId;
|
297
|
+
amount: bigint;
|
298
|
+
min_price: bigint;
|
299
|
+
locked_until_secs: bigint;
|
300
|
+
coin_type_info: type_info.TypeInfo;
|
301
|
+
}
|
302
|
+
interface TokenListingEventInstance extends aptos.TypedEventInstance<TokenListingEvent> {
|
303
|
+
data_typed: TokenListingEvent;
|
304
|
+
}
|
305
|
+
class TokenListings<T0> {
|
306
|
+
listings: table.Table<token.TokenId, token_coin_swap.TokenCoinSwap<T0>>;
|
307
|
+
listing_events: event.EventHandle<token_coin_swap.TokenListingEvent>;
|
308
|
+
swap_events: event.EventHandle<token_coin_swap.TokenSwapEvent>;
|
309
|
+
}
|
310
|
+
class TokenStoreEscrow {
|
311
|
+
token_escrows: table.Table<token.TokenId, token_coin_swap.TokenEscrow>;
|
312
|
+
}
|
313
|
+
class TokenSwapEvent {
|
314
|
+
token_id: token.TokenId;
|
315
|
+
token_buyer: Address;
|
316
|
+
token_amount: bigint;
|
317
|
+
coin_amount: bigint;
|
318
|
+
coin_type_info: type_info.TypeInfo;
|
319
|
+
}
|
320
|
+
interface TokenSwapEventInstance extends aptos.TypedEventInstance<TokenSwapEvent> {
|
321
|
+
data_typed: TokenSwapEvent;
|
322
|
+
}
|
323
|
+
interface ListTokenForSwapPayload<T0> extends aptos.TypedEntryFunctionPayload<[
|
324
|
+
Address,
|
325
|
+
string,
|
326
|
+
string,
|
327
|
+
bigint,
|
328
|
+
bigint,
|
329
|
+
bigint,
|
330
|
+
bigint
|
331
|
+
]> {
|
332
|
+
arguments_typed: [Address, string, string, bigint, bigint, bigint, bigint];
|
333
|
+
}
|
334
|
+
function loadTypes(registry: aptos.TypeRegistry): void;
|
335
|
+
const ABI: MoveModule;
|
336
|
+
}
|
337
|
+
export declare class token_transfers extends aptos.AptosBaseProcessor {
|
338
|
+
constructor(options: aptos.AptosBindOptions);
|
339
|
+
static DEFAULT_OPTIONS: aptos.AptosBindOptions;
|
340
|
+
static bind(options?: Partial<aptos.AptosBindOptions>): token_transfers;
|
341
|
+
onEntryCancelOfferScript(func: (call: token_transfers.CancelOfferScriptPayload, ctx: aptos.AptosContext) => void): token_transfers;
|
342
|
+
onEntryClaimScript(func: (call: token_transfers.ClaimScriptPayload, ctx: aptos.AptosContext) => void): token_transfers;
|
343
|
+
onEntryOfferScript(func: (call: token_transfers.OfferScriptPayload, ctx: aptos.AptosContext) => void): token_transfers;
|
344
|
+
onEventTokenCancelOfferEvent(func: (event: token_transfers.TokenCancelOfferEventInstance, ctx: aptos.AptosContext) => void): token_transfers;
|
345
|
+
onEventTokenClaimEvent(func: (event: token_transfers.TokenClaimEventInstance, ctx: aptos.AptosContext) => void): token_transfers;
|
346
|
+
onEventTokenOfferEvent(func: (event: token_transfers.TokenOfferEventInstance, ctx: aptos.AptosContext) => void): token_transfers;
|
347
|
+
loadTypesInternal(registry: aptos.TypeRegistry): void;
|
348
|
+
}
|
349
|
+
export declare namespace token_transfers {
|
350
|
+
class PendingClaims {
|
351
|
+
pending_claims: table.Table<token_transfers.TokenOfferId, token.Token>;
|
352
|
+
offer_events: event.EventHandle<token_transfers.TokenOfferEvent>;
|
353
|
+
cancel_offer_events: event.EventHandle<token_transfers.TokenCancelOfferEvent>;
|
354
|
+
claim_events: event.EventHandle<token_transfers.TokenClaimEvent>;
|
355
|
+
}
|
356
|
+
class TokenCancelOfferEvent {
|
357
|
+
to_address: Address;
|
358
|
+
token_id: token.TokenId;
|
359
|
+
amount: bigint;
|
360
|
+
}
|
361
|
+
interface TokenCancelOfferEventInstance extends aptos.TypedEventInstance<TokenCancelOfferEvent> {
|
362
|
+
data_typed: TokenCancelOfferEvent;
|
363
|
+
}
|
364
|
+
class TokenClaimEvent {
|
365
|
+
to_address: Address;
|
366
|
+
token_id: token.TokenId;
|
367
|
+
amount: bigint;
|
368
|
+
}
|
369
|
+
interface TokenClaimEventInstance extends aptos.TypedEventInstance<TokenClaimEvent> {
|
370
|
+
data_typed: TokenClaimEvent;
|
371
|
+
}
|
372
|
+
class TokenOfferEvent {
|
373
|
+
to_address: Address;
|
374
|
+
token_id: token.TokenId;
|
375
|
+
amount: bigint;
|
376
|
+
}
|
377
|
+
interface TokenOfferEventInstance extends aptos.TypedEventInstance<TokenOfferEvent> {
|
378
|
+
data_typed: TokenOfferEvent;
|
379
|
+
}
|
380
|
+
class TokenOfferId {
|
381
|
+
to_addr: Address;
|
382
|
+
token_id: token.TokenId;
|
383
|
+
}
|
384
|
+
interface CancelOfferScriptPayload extends aptos.TypedEntryFunctionPayload<[
|
385
|
+
Address,
|
386
|
+
Address,
|
387
|
+
string,
|
388
|
+
string,
|
389
|
+
bigint
|
390
|
+
]> {
|
391
|
+
arguments_typed: [Address, Address, string, string, bigint];
|
392
|
+
}
|
393
|
+
interface ClaimScriptPayload extends aptos.TypedEntryFunctionPayload<[
|
394
|
+
Address,
|
395
|
+
Address,
|
396
|
+
string,
|
397
|
+
string,
|
398
|
+
bigint
|
399
|
+
]> {
|
400
|
+
arguments_typed: [Address, Address, string, string, bigint];
|
401
|
+
}
|
402
|
+
interface OfferScriptPayload extends aptos.TypedEntryFunctionPayload<[
|
403
|
+
Address,
|
404
|
+
Address,
|
405
|
+
string,
|
406
|
+
string,
|
407
|
+
bigint,
|
408
|
+
bigint
|
409
|
+
]> {
|
410
|
+
arguments_typed: [Address, Address, string, string, bigint, bigint];
|
411
|
+
}
|
412
|
+
function loadTypes(registry: aptos.TypeRegistry): void;
|
413
|
+
const ABI: MoveModule;
|
414
|
+
}
|