@allbridge/bridge-core-sdk 3.33.0-alpha.2 → 3.33.0
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/dist/browser/index.js +2 -2
- package/dist/browser/index.js.map +4 -4
- package/dist/cjs/index.js +2 -2
- package/dist/cjs/index.js.map +4 -4
- package/dist/esm/index.js +2 -2
- package/dist/esm/index.js.map +4 -4
- package/dist/src/services/bridge/cctp-utils.d.ts +1 -0
- package/dist/src/services/bridge/cctp-utils.js +13 -0
- package/dist/src/services/bridge/cctp-utils.js.map +1 -0
- package/dist/src/services/bridge/evm/abr-payer.d.ts +3 -0
- package/dist/src/services/bridge/evm/abr-payer.js +11 -0
- package/dist/src/services/bridge/evm/abr-payer.js.map +1 -0
- package/dist/src/services/bridge/evm/index.js +35 -10
- package/dist/src/services/bridge/evm/index.js.map +1 -1
- package/dist/src/services/bridge/sol/bridge-tx-service.d.ts +1 -0
- package/dist/src/services/bridge/sol/bridge-tx-service.js +25 -12
- package/dist/src/services/bridge/sol/bridge-tx-service.js.map +1 -1
- package/dist/src/services/bridge/sol/index.js.map +1 -1
- package/dist/src/services/bridge/sol/payer-with-token-service.js +14 -1
- package/dist/src/services/bridge/sol/payer-with-token-service.js.map +1 -1
- package/dist/src/services/bridge/srb/index.d.ts +1 -1
- package/dist/src/services/bridge/srb/index.js +33 -3
- package/dist/src/services/bridge/srb/index.js.map +1 -1
- package/dist/src/services/models/abi/CctpBridge.d.ts +40 -0
- package/dist/src/services/models/abi/CctpBridge.js +52 -0
- package/dist/src/services/models/abi/CctpBridge.js.map +1 -1
- package/dist/src/services/models/sol/types/cctp_v2_bridge.d.ts +254 -0
- package/dist/src/services/models/sol/types/cctp_v2_bridge.js.map +1 -1
- package/dist/src/services/models/sol/types/cctp_v2_bridge.json +254 -0
- package/dist/src/services/models/sol/types/payer_with_token.d.ts +6 -0
- package/dist/src/services/models/sol/types/payer_with_token.js.map +1 -1
- package/dist/src/services/models/sol/types/payer_with_token.json +6 -0
- package/dist/src/services/models/srb/cctp-bridge-contract.d.ts +451 -0
- package/dist/src/services/models/srb/cctp-bridge-contract.js +150 -0
- package/dist/src/services/models/srb/cctp-bridge-contract.js.map +1 -0
- package/dist/src/services/utils/srb/index.d.ts +1 -0
- package/dist/src/services/utils/srb/index.js +9 -0
- package/dist/src/services/utils/srb/index.js.map +1 -0
- package/dist/src/version.d.ts +1 -1
- package/dist/src/version.js +1 -1
- package/dist/src/version.js.map +1 -1
- package/package.json +3 -2
|
@@ -0,0 +1,451 @@
|
|
|
1
|
+
import { Buffer } from "buffer";
|
|
2
|
+
import { AssembledTransaction, Client as ContractClient, ClientOptions as ContractClientOptions, MethodOptions, Result } from "@stellar/stellar-sdk/contract";
|
|
3
|
+
import type { u32, u64, u128, i128, Option } from "@stellar/stellar-sdk/contract";
|
|
4
|
+
export * from "@stellar/stellar-sdk";
|
|
5
|
+
export * as contract from "@stellar/stellar-sdk/contract";
|
|
6
|
+
export * as rpc from "@stellar/stellar-sdk/rpc";
|
|
7
|
+
export declare const networks: {
|
|
8
|
+
readonly testnet: {
|
|
9
|
+
readonly networkPassphrase: "Test SDF Network ; September 2015";
|
|
10
|
+
readonly contractId: "CAYUCAP2ORC5PSASKC63MQGMB6X62YXDADCSPDBZNHHHG33GKNZUYROB";
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
export interface ReceiveFee {
|
|
14
|
+
bridge_transaction_cost: u128;
|
|
15
|
+
extra_gas: u128;
|
|
16
|
+
message_transaction_cost: u128;
|
|
17
|
+
}
|
|
18
|
+
export interface TokensSent {
|
|
19
|
+
admin_fee: u128;
|
|
20
|
+
amount: u128;
|
|
21
|
+
destination_chain_id: u32;
|
|
22
|
+
recipient: Buffer;
|
|
23
|
+
sender: string;
|
|
24
|
+
}
|
|
25
|
+
export interface TokensReceived {
|
|
26
|
+
amount: i128;
|
|
27
|
+
extra_gas_value: u128;
|
|
28
|
+
message_id: Buffer;
|
|
29
|
+
recipient: string;
|
|
30
|
+
recipient_muxed_id: Option<u64>;
|
|
31
|
+
source_chain_id: u32;
|
|
32
|
+
}
|
|
33
|
+
export interface BridgingFeeFromTokens {
|
|
34
|
+
fee_token_amount: u128;
|
|
35
|
+
gas: u128;
|
|
36
|
+
}
|
|
37
|
+
export interface ChainBridge {
|
|
38
|
+
chain_id: u32;
|
|
39
|
+
domain: u32;
|
|
40
|
+
gas_usage: u128;
|
|
41
|
+
other_bridge: Buffer;
|
|
42
|
+
}
|
|
43
|
+
export interface Config {
|
|
44
|
+
admin: string;
|
|
45
|
+
admin_fee_share_bp: u64;
|
|
46
|
+
bridging_fee_conversion_factor: u128;
|
|
47
|
+
gas_oracle: string;
|
|
48
|
+
max_fee_share: i128;
|
|
49
|
+
message_transmitter: string;
|
|
50
|
+
min_finality_threshold: u32;
|
|
51
|
+
native_token: string;
|
|
52
|
+
outbound_nonce: u128;
|
|
53
|
+
token_messenger_minter: string;
|
|
54
|
+
usdc_token: string;
|
|
55
|
+
}
|
|
56
|
+
export type DataKey = {
|
|
57
|
+
tag: "Config";
|
|
58
|
+
values: void;
|
|
59
|
+
} | {
|
|
60
|
+
tag: "ChainBridge";
|
|
61
|
+
values: readonly [u32];
|
|
62
|
+
} | {
|
|
63
|
+
tag: "Domain";
|
|
64
|
+
values: readonly [u32];
|
|
65
|
+
};
|
|
66
|
+
export type NativeToken = readonly [string];
|
|
67
|
+
export type StopAuthority = readonly [string];
|
|
68
|
+
export type GasOracleAddress = readonly [string];
|
|
69
|
+
export type Admin = readonly [string];
|
|
70
|
+
export type GasUsage = readonly [Map<u32, u128>];
|
|
71
|
+
export declare const Errors: {
|
|
72
|
+
0: {
|
|
73
|
+
message: string;
|
|
74
|
+
};
|
|
75
|
+
1: {
|
|
76
|
+
message: string;
|
|
77
|
+
};
|
|
78
|
+
2: {
|
|
79
|
+
message: string;
|
|
80
|
+
};
|
|
81
|
+
3: {
|
|
82
|
+
message: string;
|
|
83
|
+
};
|
|
84
|
+
4: {
|
|
85
|
+
message: string;
|
|
86
|
+
};
|
|
87
|
+
5: {
|
|
88
|
+
message: string;
|
|
89
|
+
};
|
|
90
|
+
6: {
|
|
91
|
+
message: string;
|
|
92
|
+
};
|
|
93
|
+
7: {
|
|
94
|
+
message: string;
|
|
95
|
+
};
|
|
96
|
+
8: {
|
|
97
|
+
message: string;
|
|
98
|
+
};
|
|
99
|
+
9: {
|
|
100
|
+
message: string;
|
|
101
|
+
};
|
|
102
|
+
10: {
|
|
103
|
+
message: string;
|
|
104
|
+
};
|
|
105
|
+
11: {
|
|
106
|
+
message: string;
|
|
107
|
+
};
|
|
108
|
+
12: {
|
|
109
|
+
message: string;
|
|
110
|
+
};
|
|
111
|
+
103: {
|
|
112
|
+
message: string;
|
|
113
|
+
};
|
|
114
|
+
104: {
|
|
115
|
+
message: string;
|
|
116
|
+
};
|
|
117
|
+
105: {
|
|
118
|
+
message: string;
|
|
119
|
+
};
|
|
120
|
+
106: {
|
|
121
|
+
message: string;
|
|
122
|
+
};
|
|
123
|
+
107: {
|
|
124
|
+
message: string;
|
|
125
|
+
};
|
|
126
|
+
108: {
|
|
127
|
+
message: string;
|
|
128
|
+
};
|
|
129
|
+
109: {
|
|
130
|
+
message: string;
|
|
131
|
+
};
|
|
132
|
+
203: {
|
|
133
|
+
message: string;
|
|
134
|
+
};
|
|
135
|
+
204: {
|
|
136
|
+
message: string;
|
|
137
|
+
};
|
|
138
|
+
205: {
|
|
139
|
+
message: string;
|
|
140
|
+
};
|
|
141
|
+
206: {
|
|
142
|
+
message: string;
|
|
143
|
+
};
|
|
144
|
+
207: {
|
|
145
|
+
message: string;
|
|
146
|
+
};
|
|
147
|
+
208: {
|
|
148
|
+
message: string;
|
|
149
|
+
};
|
|
150
|
+
209: {
|
|
151
|
+
message: string;
|
|
152
|
+
};
|
|
153
|
+
210: {
|
|
154
|
+
message: string;
|
|
155
|
+
};
|
|
156
|
+
211: {
|
|
157
|
+
message: string;
|
|
158
|
+
};
|
|
159
|
+
212: {
|
|
160
|
+
message: string;
|
|
161
|
+
};
|
|
162
|
+
214: {
|
|
163
|
+
message: string;
|
|
164
|
+
};
|
|
165
|
+
215: {
|
|
166
|
+
message: string;
|
|
167
|
+
};
|
|
168
|
+
216: {
|
|
169
|
+
message: string;
|
|
170
|
+
};
|
|
171
|
+
217: {
|
|
172
|
+
message: string;
|
|
173
|
+
};
|
|
174
|
+
218: {
|
|
175
|
+
message: string;
|
|
176
|
+
};
|
|
177
|
+
300: {
|
|
178
|
+
message: string;
|
|
179
|
+
};
|
|
180
|
+
301: {
|
|
181
|
+
message: string;
|
|
182
|
+
};
|
|
183
|
+
302: {
|
|
184
|
+
message: string;
|
|
185
|
+
};
|
|
186
|
+
303: {
|
|
187
|
+
message: string;
|
|
188
|
+
};
|
|
189
|
+
400: {
|
|
190
|
+
message: string;
|
|
191
|
+
};
|
|
192
|
+
};
|
|
193
|
+
export interface Client {
|
|
194
|
+
/**
|
|
195
|
+
* Construct and simulate a admin transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
|
|
196
|
+
*/
|
|
197
|
+
admin: (options?: MethodOptions) => Promise<AssembledTransaction<Result<string>>>;
|
|
198
|
+
/**
|
|
199
|
+
* Construct and simulate a bridge transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
|
|
200
|
+
*/
|
|
201
|
+
bridge: ({ sender, amount, recipient, destination_chain_id, gas_amount, fee_token_amount }: {
|
|
202
|
+
sender: string;
|
|
203
|
+
amount: u128;
|
|
204
|
+
recipient: Buffer;
|
|
205
|
+
destination_chain_id: u32;
|
|
206
|
+
gas_amount: u128;
|
|
207
|
+
fee_token_amount: u128;
|
|
208
|
+
}, options?: MethodOptions) => Promise<AssembledTransaction<Result<void>>>;
|
|
209
|
+
/**
|
|
210
|
+
* Construct and simulate a upgrade transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
|
|
211
|
+
*/
|
|
212
|
+
upgrade: ({ new_wasm_hash }: {
|
|
213
|
+
new_wasm_hash: Buffer;
|
|
214
|
+
}, options?: MethodOptions) => Promise<AssembledTransaction<Result<void>>>;
|
|
215
|
+
/**
|
|
216
|
+
* Construct and simulate a set_admin transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
|
|
217
|
+
*/
|
|
218
|
+
set_admin: ({ new_admin }: {
|
|
219
|
+
new_admin: string;
|
|
220
|
+
}, options?: MethodOptions) => Promise<AssembledTransaction<Result<void>>>;
|
|
221
|
+
/**
|
|
222
|
+
* Construct and simulate a gas_oracle transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
|
|
223
|
+
*/
|
|
224
|
+
gas_oracle: (options?: MethodOptions) => Promise<AssembledTransaction<Result<string>>>;
|
|
225
|
+
/**
|
|
226
|
+
* Construct and simulate a initialize transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
|
|
227
|
+
*/
|
|
228
|
+
initialize: ({ admin, usdc_token, token_messenger_minter, message_transmitter, gas_oracle, native_token, min_finality_threshold, max_fee_share, admin_fee_share_bp, bridging_fee_conversion_factor }: {
|
|
229
|
+
admin: string;
|
|
230
|
+
usdc_token: string;
|
|
231
|
+
token_messenger_minter: string;
|
|
232
|
+
message_transmitter: string;
|
|
233
|
+
gas_oracle: string;
|
|
234
|
+
native_token: string;
|
|
235
|
+
min_finality_threshold: u32;
|
|
236
|
+
max_fee_share: i128;
|
|
237
|
+
admin_fee_share_bp: u64;
|
|
238
|
+
bridging_fee_conversion_factor: u128;
|
|
239
|
+
}, options?: MethodOptions) => Promise<AssembledTransaction<Result<void>>>;
|
|
240
|
+
/**
|
|
241
|
+
* Construct and simulate a usdc_token transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
|
|
242
|
+
*/
|
|
243
|
+
usdc_token: (options?: MethodOptions) => Promise<AssembledTransaction<Result<string>>>;
|
|
244
|
+
/**
|
|
245
|
+
* Construct and simulate a native_token transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
|
|
246
|
+
*/
|
|
247
|
+
native_token: (options?: MethodOptions) => Promise<AssembledTransaction<Result<string>>>;
|
|
248
|
+
/**
|
|
249
|
+
* Construct and simulate a max_fee_share transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
|
|
250
|
+
*/
|
|
251
|
+
max_fee_share: (options?: MethodOptions) => Promise<AssembledTransaction<Result<i128>>>;
|
|
252
|
+
/**
|
|
253
|
+
* Construct and simulate a receive_tokens transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
|
|
254
|
+
*/
|
|
255
|
+
receive_tokens: ({ sender, message_id, message, attestation, extra_gas_amount }: {
|
|
256
|
+
sender: string;
|
|
257
|
+
message_id: Buffer;
|
|
258
|
+
message: Buffer;
|
|
259
|
+
attestation: Buffer;
|
|
260
|
+
extra_gas_amount: u128;
|
|
261
|
+
}, options?: MethodOptions) => Promise<AssembledTransaction<Result<void>>>;
|
|
262
|
+
/**
|
|
263
|
+
* Construct and simulate a set_gas_oracle transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
|
|
264
|
+
*/
|
|
265
|
+
set_gas_oracle: ({ gas_oracle }: {
|
|
266
|
+
gas_oracle: string;
|
|
267
|
+
}, options?: MethodOptions) => Promise<AssembledTransaction<Result<void>>>;
|
|
268
|
+
/**
|
|
269
|
+
* Construct and simulate a bridge_with_hook transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
|
|
270
|
+
*/
|
|
271
|
+
bridge_with_hook: ({ sender, amount, recipient, destination_chain_id, gas_amount, fee_token_amount, hook_data }: {
|
|
272
|
+
sender: string;
|
|
273
|
+
amount: u128;
|
|
274
|
+
recipient: Buffer;
|
|
275
|
+
destination_chain_id: u32;
|
|
276
|
+
gas_amount: u128;
|
|
277
|
+
fee_token_amount: u128;
|
|
278
|
+
hook_data: Buffer;
|
|
279
|
+
}, options?: MethodOptions) => Promise<AssembledTransaction<Result<void>>>;
|
|
280
|
+
/**
|
|
281
|
+
* Construct and simulate a get_chain_bridge transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
|
|
282
|
+
*/
|
|
283
|
+
get_chain_bridge: ({ chain_id }: {
|
|
284
|
+
chain_id: u32;
|
|
285
|
+
}, options?: MethodOptions) => Promise<AssembledTransaction<Result<ChainBridge>>>;
|
|
286
|
+
/**
|
|
287
|
+
* Construct and simulate a set_max_fee_share transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
|
|
288
|
+
*/
|
|
289
|
+
set_max_fee_share: ({ value }: {
|
|
290
|
+
value: i128;
|
|
291
|
+
}, options?: MethodOptions) => Promise<AssembledTransaction<Result<void>>>;
|
|
292
|
+
/**
|
|
293
|
+
* Construct and simulate a admin_fee_share_bp transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
|
|
294
|
+
*/
|
|
295
|
+
admin_fee_share_bp: (options?: MethodOptions) => Promise<AssembledTransaction<Result<u64>>>;
|
|
296
|
+
/**
|
|
297
|
+
* Construct and simulate a native_fee_balance transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
|
|
298
|
+
*/
|
|
299
|
+
native_fee_balance: (options?: MethodOptions) => Promise<AssembledTransaction<Result<i128>>>;
|
|
300
|
+
/**
|
|
301
|
+
* Construct and simulate a message_transmitter transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
|
|
302
|
+
*/
|
|
303
|
+
message_transmitter: (options?: MethodOptions) => Promise<AssembledTransaction<Result<string>>>;
|
|
304
|
+
/**
|
|
305
|
+
* Construct and simulate a set_admin_fee_share transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
|
|
306
|
+
*/
|
|
307
|
+
set_admin_fee_share: ({ admin_fee_share_bp }: {
|
|
308
|
+
admin_fee_share_bp: u64;
|
|
309
|
+
}, options?: MethodOptions) => Promise<AssembledTransaction<Result<void>>>;
|
|
310
|
+
/**
|
|
311
|
+
* Construct and simulate a update_chain_bridge transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
|
|
312
|
+
*/
|
|
313
|
+
update_chain_bridge: ({ chain_id, gas_usage, domain, other_bridge }: {
|
|
314
|
+
chain_id: u32;
|
|
315
|
+
gas_usage: u128;
|
|
316
|
+
domain: u32;
|
|
317
|
+
other_bridge: Buffer;
|
|
318
|
+
}, options?: MethodOptions) => Promise<AssembledTransaction<Result<void>>>;
|
|
319
|
+
/**
|
|
320
|
+
* Construct and simulate a withdraw_gas_tokens transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
|
|
321
|
+
*/
|
|
322
|
+
withdraw_gas_tokens: ({ sender, amount }: {
|
|
323
|
+
sender: string;
|
|
324
|
+
amount: u128;
|
|
325
|
+
}, options?: MethodOptions) => Promise<AssembledTransaction<Result<void>>>;
|
|
326
|
+
/**
|
|
327
|
+
* Construct and simulate a get_transaction_cost transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
|
|
328
|
+
*/
|
|
329
|
+
get_transaction_cost: ({ chain_id }: {
|
|
330
|
+
chain_id: u32;
|
|
331
|
+
}, options?: MethodOptions) => Promise<AssembledTransaction<Result<u128>>>;
|
|
332
|
+
/**
|
|
333
|
+
* Construct and simulate a register_chain_bridge transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
|
|
334
|
+
*/
|
|
335
|
+
register_chain_bridge: ({ chain_id, gas_usage, domain, other_bridge }: {
|
|
336
|
+
chain_id: u32;
|
|
337
|
+
gas_usage: u128;
|
|
338
|
+
domain: u32;
|
|
339
|
+
other_bridge: Buffer;
|
|
340
|
+
}, options?: MethodOptions) => Promise<AssembledTransaction<Result<void>>>;
|
|
341
|
+
/**
|
|
342
|
+
* Construct and simulate a bridging_fee_in_tokens transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
|
|
343
|
+
*/
|
|
344
|
+
bridging_fee_in_tokens: ({ token_address }: {
|
|
345
|
+
token_address: string;
|
|
346
|
+
}, options?: MethodOptions) => Promise<AssembledTransaction<i128>>;
|
|
347
|
+
/**
|
|
348
|
+
* Construct and simulate a get_domain_by_chain_id transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
|
|
349
|
+
*/
|
|
350
|
+
get_domain_by_chain_id: ({ chain_id }: {
|
|
351
|
+
chain_id: u32;
|
|
352
|
+
}, options?: MethodOptions) => Promise<AssembledTransaction<Result<u32>>>;
|
|
353
|
+
/**
|
|
354
|
+
* Construct and simulate a min_finality_threshold transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
|
|
355
|
+
*/
|
|
356
|
+
min_finality_threshold: (options?: MethodOptions) => Promise<AssembledTransaction<Result<u32>>>;
|
|
357
|
+
/**
|
|
358
|
+
* Construct and simulate a token_messenger_minter transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
|
|
359
|
+
*/
|
|
360
|
+
token_messenger_minter: (options?: MethodOptions) => Promise<AssembledTransaction<Result<string>>>;
|
|
361
|
+
/**
|
|
362
|
+
* Construct and simulate a set_message_transmitter transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
|
|
363
|
+
*/
|
|
364
|
+
set_message_transmitter: ({ message_transmitter }: {
|
|
365
|
+
message_transmitter: string;
|
|
366
|
+
}, options?: MethodOptions) => Promise<AssembledTransaction<Result<void>>>;
|
|
367
|
+
/**
|
|
368
|
+
* Construct and simulate a set_fee_conversion_factor transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
|
|
369
|
+
*/
|
|
370
|
+
set_fee_conversion_factor: ({ value }: {
|
|
371
|
+
value: u128;
|
|
372
|
+
}, options?: MethodOptions) => Promise<AssembledTransaction<Result<void>>>;
|
|
373
|
+
/**
|
|
374
|
+
* Construct and simulate a set_min_finality_threshold transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
|
|
375
|
+
*/
|
|
376
|
+
set_min_finality_threshold: ({ value }: {
|
|
377
|
+
value: u32;
|
|
378
|
+
}, options?: MethodOptions) => Promise<AssembledTransaction<Result<void>>>;
|
|
379
|
+
/**
|
|
380
|
+
* Construct and simulate a set_token_messenger_minter transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
|
|
381
|
+
*/
|
|
382
|
+
set_token_messenger_minter: ({ token_messenger_minter }: {
|
|
383
|
+
token_messenger_minter: string;
|
|
384
|
+
}, options?: MethodOptions) => Promise<AssembledTransaction<Result<void>>>;
|
|
385
|
+
/**
|
|
386
|
+
* Construct and simulate a get_bridging_cost_in_tokens transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
|
|
387
|
+
*/
|
|
388
|
+
get_bridging_cost_in_tokens: ({ chain_id }: {
|
|
389
|
+
chain_id: u32;
|
|
390
|
+
}, options?: MethodOptions) => Promise<AssembledTransaction<Result<u128>>>;
|
|
391
|
+
/**
|
|
392
|
+
* Construct and simulate a bridging_fee_conversion_factor transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
|
|
393
|
+
*/
|
|
394
|
+
bridging_fee_conversion_factor: (options?: MethodOptions) => Promise<AssembledTransaction<Result<u128>>>;
|
|
395
|
+
/**
|
|
396
|
+
* Construct and simulate a withdraw_bridging_fee_in_tokens transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
|
|
397
|
+
*/
|
|
398
|
+
withdraw_bridging_fee_in_tokens: ({ sender, token_address }: {
|
|
399
|
+
sender: string;
|
|
400
|
+
token_address: string;
|
|
401
|
+
}, options?: MethodOptions) => Promise<AssembledTransaction<Result<void>>>;
|
|
402
|
+
}
|
|
403
|
+
export declare class Client extends ContractClient {
|
|
404
|
+
readonly options: ContractClientOptions;
|
|
405
|
+
static deploy<T = Client>(
|
|
406
|
+
/** Options for initializing a Client as well as for calling a method, with extras specific to deploying. */
|
|
407
|
+
options: MethodOptions & Omit<ContractClientOptions, "contractId"> & {
|
|
408
|
+
/** The hash of the Wasm blob, which must already be installed on-chain. */
|
|
409
|
+
wasmHash: Buffer | string;
|
|
410
|
+
/** Salt used to generate the contract's ID. Passed through to {@link Operation.createCustomContract}. Default: random. */
|
|
411
|
+
salt?: Buffer | Uint8Array;
|
|
412
|
+
/** The format used to decode `wasmHash`, if it's provided as a string. */
|
|
413
|
+
format?: "hex" | "base64";
|
|
414
|
+
}): Promise<AssembledTransaction<T>>;
|
|
415
|
+
constructor(options: ContractClientOptions);
|
|
416
|
+
readonly fromJSON: {
|
|
417
|
+
admin: (json: string) => AssembledTransaction<Result<string, import("@stellar/stellar-sdk/contract").ErrorMessage>>;
|
|
418
|
+
bridge: (json: string) => AssembledTransaction<Result<void, import("@stellar/stellar-sdk/contract").ErrorMessage>>;
|
|
419
|
+
upgrade: (json: string) => AssembledTransaction<Result<void, import("@stellar/stellar-sdk/contract").ErrorMessage>>;
|
|
420
|
+
set_admin: (json: string) => AssembledTransaction<Result<void, import("@stellar/stellar-sdk/contract").ErrorMessage>>;
|
|
421
|
+
gas_oracle: (json: string) => AssembledTransaction<Result<string, import("@stellar/stellar-sdk/contract").ErrorMessage>>;
|
|
422
|
+
initialize: (json: string) => AssembledTransaction<Result<void, import("@stellar/stellar-sdk/contract").ErrorMessage>>;
|
|
423
|
+
usdc_token: (json: string) => AssembledTransaction<Result<string, import("@stellar/stellar-sdk/contract").ErrorMessage>>;
|
|
424
|
+
native_token: (json: string) => AssembledTransaction<Result<string, import("@stellar/stellar-sdk/contract").ErrorMessage>>;
|
|
425
|
+
max_fee_share: (json: string) => AssembledTransaction<Result<bigint, import("@stellar/stellar-sdk/contract").ErrorMessage>>;
|
|
426
|
+
receive_tokens: (json: string) => AssembledTransaction<Result<void, import("@stellar/stellar-sdk/contract").ErrorMessage>>;
|
|
427
|
+
set_gas_oracle: (json: string) => AssembledTransaction<Result<void, import("@stellar/stellar-sdk/contract").ErrorMessage>>;
|
|
428
|
+
bridge_with_hook: (json: string) => AssembledTransaction<Result<void, import("@stellar/stellar-sdk/contract").ErrorMessage>>;
|
|
429
|
+
get_chain_bridge: (json: string) => AssembledTransaction<Result<ChainBridge, import("@stellar/stellar-sdk/contract").ErrorMessage>>;
|
|
430
|
+
set_max_fee_share: (json: string) => AssembledTransaction<Result<void, import("@stellar/stellar-sdk/contract").ErrorMessage>>;
|
|
431
|
+
admin_fee_share_bp: (json: string) => AssembledTransaction<Result<bigint, import("@stellar/stellar-sdk/contract").ErrorMessage>>;
|
|
432
|
+
native_fee_balance: (json: string) => AssembledTransaction<Result<bigint, import("@stellar/stellar-sdk/contract").ErrorMessage>>;
|
|
433
|
+
message_transmitter: (json: string) => AssembledTransaction<Result<string, import("@stellar/stellar-sdk/contract").ErrorMessage>>;
|
|
434
|
+
set_admin_fee_share: (json: string) => AssembledTransaction<Result<void, import("@stellar/stellar-sdk/contract").ErrorMessage>>;
|
|
435
|
+
update_chain_bridge: (json: string) => AssembledTransaction<Result<void, import("@stellar/stellar-sdk/contract").ErrorMessage>>;
|
|
436
|
+
withdraw_gas_tokens: (json: string) => AssembledTransaction<Result<void, import("@stellar/stellar-sdk/contract").ErrorMessage>>;
|
|
437
|
+
get_transaction_cost: (json: string) => AssembledTransaction<Result<bigint, import("@stellar/stellar-sdk/contract").ErrorMessage>>;
|
|
438
|
+
register_chain_bridge: (json: string) => AssembledTransaction<Result<void, import("@stellar/stellar-sdk/contract").ErrorMessage>>;
|
|
439
|
+
bridging_fee_in_tokens: (json: string) => AssembledTransaction<bigint>;
|
|
440
|
+
get_domain_by_chain_id: (json: string) => AssembledTransaction<Result<number, import("@stellar/stellar-sdk/contract").ErrorMessage>>;
|
|
441
|
+
min_finality_threshold: (json: string) => AssembledTransaction<Result<number, import("@stellar/stellar-sdk/contract").ErrorMessage>>;
|
|
442
|
+
token_messenger_minter: (json: string) => AssembledTransaction<Result<string, import("@stellar/stellar-sdk/contract").ErrorMessage>>;
|
|
443
|
+
set_message_transmitter: (json: string) => AssembledTransaction<Result<void, import("@stellar/stellar-sdk/contract").ErrorMessage>>;
|
|
444
|
+
set_fee_conversion_factor: (json: string) => AssembledTransaction<Result<void, import("@stellar/stellar-sdk/contract").ErrorMessage>>;
|
|
445
|
+
set_min_finality_threshold: (json: string) => AssembledTransaction<Result<void, import("@stellar/stellar-sdk/contract").ErrorMessage>>;
|
|
446
|
+
set_token_messenger_minter: (json: string) => AssembledTransaction<Result<void, import("@stellar/stellar-sdk/contract").ErrorMessage>>;
|
|
447
|
+
get_bridging_cost_in_tokens: (json: string) => AssembledTransaction<Result<bigint, import("@stellar/stellar-sdk/contract").ErrorMessage>>;
|
|
448
|
+
bridging_fee_conversion_factor: (json: string) => AssembledTransaction<Result<bigint, import("@stellar/stellar-sdk/contract").ErrorMessage>>;
|
|
449
|
+
withdraw_bridging_fee_in_tokens: (json: string) => AssembledTransaction<Result<void, import("@stellar/stellar-sdk/contract").ErrorMessage>>;
|
|
450
|
+
};
|
|
451
|
+
}
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import { Buffer } from "buffer";
|
|
2
|
+
import { Client as ContractClient, Spec as ContractSpec, } from "@stellar/stellar-sdk/contract";
|
|
3
|
+
export * from "@stellar/stellar-sdk";
|
|
4
|
+
export * as contract from "@stellar/stellar-sdk/contract";
|
|
5
|
+
export * as rpc from "@stellar/stellar-sdk/rpc";
|
|
6
|
+
if (typeof window !== "undefined") {
|
|
7
|
+
//@ts-ignore Buffer exists
|
|
8
|
+
window.Buffer = window.Buffer || Buffer;
|
|
9
|
+
}
|
|
10
|
+
export const networks = {
|
|
11
|
+
testnet: {
|
|
12
|
+
networkPassphrase: "Test SDF Network ; September 2015",
|
|
13
|
+
contractId: "CAYUCAP2ORC5PSASKC63MQGMB6X62YXDADCSPDBZNHHHG33GKNZUYROB",
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
export const Errors = {
|
|
17
|
+
0: { message: "Unimplemented" },
|
|
18
|
+
1: { message: "Initialized" },
|
|
19
|
+
2: { message: "Uninitialized" },
|
|
20
|
+
3: { message: "Unauthorized" },
|
|
21
|
+
4: { message: "InvalidArg" },
|
|
22
|
+
5: { message: "InvalidChainId" },
|
|
23
|
+
6: { message: "InvalidOtherChainId" },
|
|
24
|
+
7: { message: "GasUsageNotSet" },
|
|
25
|
+
8: { message: "BrokenAddress" },
|
|
26
|
+
9: { message: "NotFound" },
|
|
27
|
+
10: { message: "TokenInsufficientBalance" },
|
|
28
|
+
11: { message: "CastFailed" },
|
|
29
|
+
12: { message: "U256Overflow" },
|
|
30
|
+
103: { message: "ZeroAmount" },
|
|
31
|
+
104: { message: "PoolOverflow" },
|
|
32
|
+
105: { message: "ZeroChanges" },
|
|
33
|
+
106: { message: "ReservesExhausted" },
|
|
34
|
+
107: { message: "InsufficientReceivedAmount" },
|
|
35
|
+
108: { message: "BalanceRatioExceeded" },
|
|
36
|
+
109: { message: "Forbidden" },
|
|
37
|
+
203: { message: "UnauthorizedStopAuthority" },
|
|
38
|
+
204: { message: "SwapProhibited" },
|
|
39
|
+
205: { message: "AmountTooLowForFee" },
|
|
40
|
+
206: { message: "BridgeToTheZeroAddress" },
|
|
41
|
+
207: { message: "EmptyRecipient" },
|
|
42
|
+
208: { message: "SourceNotRegistered" },
|
|
43
|
+
209: { message: "WrongDestinationChain" },
|
|
44
|
+
210: { message: "UnknownAnotherChain" },
|
|
45
|
+
211: { message: "TokensAlreadySent" },
|
|
46
|
+
212: { message: "MessageProcessed" },
|
|
47
|
+
214: { message: "NotEnoughFee" },
|
|
48
|
+
215: { message: "NoMessage" },
|
|
49
|
+
216: { message: "NoReceivePool" },
|
|
50
|
+
217: { message: "NoPool" },
|
|
51
|
+
218: { message: "UnknownAnotherToken" },
|
|
52
|
+
300: { message: "WrongByteLength" },
|
|
53
|
+
301: { message: "HasMessage" },
|
|
54
|
+
302: { message: "InvalidPrimarySignature" },
|
|
55
|
+
303: { message: "InvalidSecondarySignature" },
|
|
56
|
+
400: { message: "NoGasDataForChain" }
|
|
57
|
+
};
|
|
58
|
+
export class Client extends ContractClient {
|
|
59
|
+
options;
|
|
60
|
+
static async deploy(
|
|
61
|
+
/** Options for initializing a Client as well as for calling a method, with extras specific to deploying. */
|
|
62
|
+
options) {
|
|
63
|
+
return ContractClient.deploy(null, options);
|
|
64
|
+
}
|
|
65
|
+
constructor(options) {
|
|
66
|
+
super(new ContractSpec(["AAAAAQAAAAAAAAAAAAAAClJlY2VpdmVGZWUAAAAAAAMAAAAAAAAAF2JyaWRnZV90cmFuc2FjdGlvbl9jb3N0AAAAAAoAAAAAAAAACWV4dHJhX2dhcwAAAAAAAAoAAAAAAAAAGG1lc3NhZ2VfdHJhbnNhY3Rpb25fY29zdAAAAAo=",
|
|
67
|
+
"AAAAAQAAAAAAAAAAAAAAClRva2Vuc1NlbnQAAAAAAAUAAAAAAAAACWFkbWluX2ZlZQAAAAAAAAoAAAAAAAAABmFtb3VudAAAAAAACgAAAAAAAAAUZGVzdGluYXRpb25fY2hhaW5faWQAAAAEAAAAAAAAAAlyZWNpcGllbnQAAAAAAAPuAAAAIAAAAAAAAAAGc2VuZGVyAAAAAAAT",
|
|
68
|
+
"AAAAAQAAAAAAAAAAAAAADlRva2Vuc1JlY2VpdmVkAAAAAAAGAAAAAAAAAAZhbW91bnQAAAAAAAsAAAAAAAAAD2V4dHJhX2dhc192YWx1ZQAAAAAKAAAAAAAAAAptZXNzYWdlX2lkAAAAAAPuAAAAIAAAAAAAAAAJcmVjaXBpZW50AAAAAAAAEwAAAAAAAAAScmVjaXBpZW50X211eGVkX2lkAAAAAAPoAAAABgAAAAAAAAAPc291cmNlX2NoYWluX2lkAAAAAAQ=",
|
|
69
|
+
"AAAAAQAAAAAAAAAAAAAAFUJyaWRnaW5nRmVlRnJvbVRva2VucwAAAAAAAAIAAAAAAAAAEGZlZV90b2tlbl9hbW91bnQAAAAKAAAAAAAAAANnYXMAAAAACg==",
|
|
70
|
+
"AAAAAQAAAAAAAAAAAAAAC0NoYWluQnJpZGdlAAAAAAQAAAAAAAAACGNoYWluX2lkAAAABAAAAAAAAAAGZG9tYWluAAAAAAAEAAAAAAAAAAlnYXNfdXNhZ2UAAAAAAAAKAAAAAAAAAAxvdGh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tb3VudAAAAAAAawAAAAAAAAAUQmFsYW5jZVJhdGlvRXhjZWVkZWQAAABsAAAAAAAAAAlGb3JiaWRkZW4AAAAAAABtAAAAAAAAABlVbmF1dGhvcml6ZWRTdG9wQXV0aG9yaXR5AAAAAAAAywAAAAAAAAAOU3dhcFByb2hpYml0ZWQAAAAAAMwAAAAAAAAAEkFtb3VudFRvb0xvd0ZvckZlZQAAAAAAzQAAAAAAAAAWQnJpZGdlVG9UaGVaZXJvQWRkcmVzcwAAAAAAzgAAAAAAAAAORW1wdHlSZWNpcGllbnQAAAAAAM8AAAAAAAAAE1NvdXJjZU5vdFJlZ2lzdGVyZWQAAAAA0AAAAAAAAAAVV3JvbmdEZXN0aW5hdGlvbkNoYWluAAAAAAAA0QAAAAAAAAATVW5rbm93bkFub3RoZXJDaGFpbgAAAADSAAAAAAAAABFUb2tlbnNBbHJlYWR5U2VudAAAAAAAANMAAAAAAAAAEE1lc3NhZ2VQcm9jZXNzZWQAAADUAAAAAAAAAAxOb3RFbm91Z2hGZWUAAADWAAAAAAAAAAlOb01lc3NhZ2UAAAAAAADXAAAAAAAAAA1Ob1JlY2VpdmVQb29sAAAAAAAA2AAAAAAAAAAGTm9Qb29sAAAAAADZAAAAAAAAABNVbmtub3duQW5vdGhlclRva2VuAAAAANoAAAAAAAAAD1dyb25nQnl0ZUxlbmd0aAAAAAEsAAAAAAAAAApIYXNNZXNzYWdlAAAAAAEtAAAAAAAAABdJbnZhbGlkUHJpbWFyeVNpZ25hdHVyZQAAAAEuAAAAAAAAABlJbnZhbGlkU2Vjb25kYXJ5U2lnbmF0dXJlAAAAAAABLwAAAAAAAAARTm9HYXNEYXRhRm9yQ2hhaW4AAAAAAAGQ"]), options);
|
|
112
|
+
this.options = options;
|
|
113
|
+
}
|
|
114
|
+
fromJSON = {
|
|
115
|
+
admin: (this.txFromJSON),
|
|
116
|
+
bridge: (this.txFromJSON),
|
|
117
|
+
upgrade: (this.txFromJSON),
|
|
118
|
+
set_admin: (this.txFromJSON),
|
|
119
|
+
gas_oracle: (this.txFromJSON),
|
|
120
|
+
initialize: (this.txFromJSON),
|
|
121
|
+
usdc_token: (this.txFromJSON),
|
|
122
|
+
native_token: (this.txFromJSON),
|
|
123
|
+
max_fee_share: (this.txFromJSON),
|
|
124
|
+
receive_tokens: (this.txFromJSON),
|
|
125
|
+
set_gas_oracle: (this.txFromJSON),
|
|
126
|
+
bridge_with_hook: (this.txFromJSON),
|
|
127
|
+
get_chain_bridge: (this.txFromJSON),
|
|
128
|
+
set_max_fee_share: (this.txFromJSON),
|
|
129
|
+
admin_fee_share_bp: (this.txFromJSON),
|
|
130
|
+
native_fee_balance: (this.txFromJSON),
|
|
131
|
+
message_transmitter: (this.txFromJSON),
|
|
132
|
+
set_admin_fee_share: (this.txFromJSON),
|
|
133
|
+
update_chain_bridge: (this.txFromJSON),
|
|
134
|
+
withdraw_gas_tokens: (this.txFromJSON),
|
|
135
|
+
get_transaction_cost: (this.txFromJSON),
|
|
136
|
+
register_chain_bridge: (this.txFromJSON),
|
|
137
|
+
bridging_fee_in_tokens: (this.txFromJSON),
|
|
138
|
+
get_domain_by_chain_id: (this.txFromJSON),
|
|
139
|
+
min_finality_threshold: (this.txFromJSON),
|
|
140
|
+
token_messenger_minter: (this.txFromJSON),
|
|
141
|
+
set_message_transmitter: (this.txFromJSON),
|
|
142
|
+
set_fee_conversion_factor: (this.txFromJSON),
|
|
143
|
+
set_min_finality_threshold: (this.txFromJSON),
|
|
144
|
+
set_token_messenger_minter: (this.txFromJSON),
|
|
145
|
+
get_bridging_cost_in_tokens: (this.txFromJSON),
|
|
146
|
+
bridging_fee_conversion_factor: (this.txFromJSON),
|
|
147
|
+
withdraw_bridging_fee_in_tokens: (this.txFromJSON)
|
|
148
|
+
};
|
|
149
|
+
}
|
|
150
|
+
//# sourceMappingURL=cctp-bridge-contract.js.map
|