@junobuild/functions 0.4.1 → 0.5.1
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/canisters/_canister.d.ts +17 -0
- package/canisters/_constants.d.ts +3 -0
- package/canisters/ckbtc/index.d.ts +1 -0
- package/canisters/ckbtc/index.js +2 -0
- package/canisters/cketh/index.d.ts +1 -0
- package/canisters/cketh/index.js +2 -0
- package/canisters/cketh/index.js.map +7 -0
- package/canisters/cmc/cmc.canister.d.ts +28 -0
- package/canisters/cmc/index.d.ts +2 -0
- package/canisters/cmc/index.js +2 -0
- package/canisters/cmc/index.js.map +7 -0
- package/canisters/declarations/_idl.d.ts +16 -0
- package/canisters/declarations/_types.d.ts +16 -0
- package/canisters/declarations/ckbtc/bitcoin.did.d.ts +134 -0
- package/canisters/declarations/ckbtc/bitcoin.did.idl.d.ts +40 -0
- package/canisters/declarations/ckbtc/minter.did.d.ts +831 -0
- package/canisters/declarations/ckbtc/minter.did.idl.d.ts +61 -0
- package/canisters/declarations/cketh/minter.did.d.ts +893 -0
- package/canisters/declarations/cketh/minter.did.idl.d.ts +58 -0
- package/canisters/declarations/cketh/orchestrator.did.d.ts +302 -0
- package/canisters/declarations/cketh/orchestrator.did.idl.d.ts +34 -0
- package/canisters/declarations/cmc/cmc.did.d.ts +344 -0
- package/canisters/declarations/cmc/cmc.did.idl.d.ts +53 -0
- package/canisters/declarations/ic-management/ic-management.did.d.ts +583 -0
- package/canisters/declarations/ic-management/ic-management.did.idl.d.ts +147 -0
- package/canisters/declarations/index.d.ts +2 -0
- package/canisters/declarations/ledger-icp/index.did.d.ts +119 -0
- package/canisters/declarations/ledger-icp/index.did.idl.d.ts +35 -0
- package/canisters/declarations/ledger-icp/ledger.did.d.ts +606 -0
- package/canisters/declarations/ledger-icp/ledger.did.idl.d.ts +106 -0
- package/canisters/declarations/ledger-icrc/icrc_index-ng.did.d.ts +148 -0
- package/canisters/declarations/ledger-icrc/icrc_index-ng.did.idl.d.ts +44 -0
- package/canisters/declarations/ledger-icrc/icrc_index.did.d.ts +102 -0
- package/canisters/declarations/ledger-icrc/icrc_index.did.idl.d.ts +28 -0
- package/canisters/declarations/ledger-icrc/icrc_ledger.did.d.ts +579 -0
- package/canisters/declarations/ledger-icrc/icrc_ledger.did.idl.d.ts +100 -0
- package/canisters/declarations/ledger-icrc/icrc_nft-ledger.did.d.ts +81 -0
- package/canisters/declarations/ledger-icrc/icrc_nft-ledger.did.idl.d.ts +39 -0
- package/canisters/declarations/nns/genesis_token.did.d.ts +49 -0
- package/canisters/declarations/nns/genesis_token.did.idl.d.ts +24 -0
- package/canisters/declarations/nns/governance.did.d.ts +1254 -0
- package/canisters/declarations/nns/governance.did.idl.d.ts +217 -0
- package/canisters/declarations/nns/governance_test.did.d.ts +1258 -0
- package/canisters/declarations/nns/governance_test.did.idl.d.ts +218 -0
- package/canisters/declarations/nns/sns_wasm.did.d.ts +286 -0
- package/canisters/declarations/nns/sns_wasm.did.idl.d.ts +80 -0
- package/canisters/declarations/sns/sns_governance.did.d.ts +834 -0
- package/canisters/declarations/sns/sns_governance.did.idl.d.ts +189 -0
- package/canisters/declarations/sns/sns_governance_test.did.d.ts +861 -0
- package/canisters/declarations/sns/sns_governance_test.did.idl.d.ts +199 -0
- package/canisters/declarations/sns/sns_root.did.d.ts +204 -0
- package/canisters/declarations/sns/sns_root.did.idl.d.ts +53 -0
- package/canisters/declarations/sns/sns_swap.did.d.ts +411 -0
- package/canisters/declarations/sns/sns_swap.did.idl.d.ts +108 -0
- package/canisters/ic-management/index.d.ts +1 -0
- package/canisters/ic-management/index.js +2 -0
- package/canisters/ic-management/index.js.map +7 -0
- package/canisters/index.d.ts +1 -0
- package/canisters/index.js +2 -0
- package/canisters/index.js.map +7 -0
- package/canisters/ledger/icp/index.d.ts +2 -0
- package/canisters/ledger/icp/index.js +2 -0
- package/canisters/ledger/icp/index.js.map +7 -0
- package/canisters/ledger/icp/ledger.canister.d.ts +24 -0
- package/canisters/ledger/icrc/index.d.ts +3 -0
- package/canisters/ledger/icrc/index.js +2 -0
- package/canisters/ledger/icrc/index.js.map +7 -0
- package/canisters/ledger/icrc/ledger.canister.d.ts +45 -0
- package/canisters/ledger/icrc/schemas.d.ts +11 -0
- package/canisters/nns/index.d.ts +1 -0
- package/canisters/nns/index.js +2 -0
- package/canisters/nns/index.js.map +7 -0
- package/canisters/schemas.d.ts +11 -0
- package/canisters/sns/index.d.ts +1 -0
- package/canisters/sns/index.js +2 -0
- package/canisters/sns/index.js.map +7 -0
- package/chunk-4C666HHU.js +2 -0
- package/chunk-4C666HHU.js.map +7 -0
- package/chunk-5NZMOUKF.js +2 -0
- package/chunk-5NZMOUKF.js.map +7 -0
- package/chunk-BXZ5PSUW.js +2 -0
- package/chunk-BXZ5PSUW.js.map +7 -0
- package/chunk-EMQQE34V.js +2 -0
- package/chunk-EMQQE34V.js.map +7 -0
- package/chunk-HANEPD6T.js +2 -0
- package/chunk-HANEPD6T.js.map +7 -0
- package/chunk-TZVF5LQY.js +2 -0
- package/chunk-TZVF5LQY.js.map +7 -0
- package/ic-cdk.js +1 -1
- package/ic-cdk.js.map +4 -4
- package/index.js +1 -1
- package/index.js.map +1 -1
- package/package.json +39 -2
- package/sdk.js +1 -1
- package/sdk.js.map +1 -1
- package/src/canisters/declarations/ckbtc/bitcoin.did.d.ts +134 -0
- package/src/canisters/declarations/ckbtc/bitcoin.did.idl.js +302 -0
- package/src/canisters/declarations/ckbtc/minter.did.d.ts +831 -0
- package/src/canisters/declarations/ckbtc/minter.did.idl.js +893 -0
- package/src/canisters/declarations/cketh/minter.did.d.ts +893 -0
- package/src/canisters/declarations/cketh/minter.did.idl.js +878 -0
- package/src/canisters/declarations/cketh/orchestrator.did.d.ts +302 -0
- package/src/canisters/declarations/cketh/orchestrator.did.idl.js +343 -0
- package/src/canisters/declarations/cmc/cmc.did.d.ts +344 -0
- package/src/canisters/declarations/cmc/cmc.did.idl.js +338 -0
- package/src/canisters/declarations/ic-management/ic-management.did.d.ts +583 -0
- package/src/canisters/declarations/ic-management/ic-management.did.idl.js +1150 -0
- package/src/canisters/declarations/ledger-icp/index.did.d.ts +119 -0
- package/src/canisters/declarations/ledger-icp/index.did.idl.js +225 -0
- package/src/canisters/declarations/ledger-icp/ledger.did.d.ts +606 -0
- package/src/canisters/declarations/ledger-icp/ledger.did.idl.js +813 -0
- package/src/canisters/declarations/ledger-icrc/icrc_index-ng.did.d.ts +148 -0
- package/src/canisters/declarations/ledger-icrc/icrc_index-ng.did.idl.js +274 -0
- package/src/canisters/declarations/ledger-icrc/icrc_index.did.d.ts +102 -0
- package/src/canisters/declarations/ledger-icrc/icrc_index.did.idl.js +171 -0
- package/src/canisters/declarations/ledger-icrc/icrc_ledger.did.d.ts +579 -0
- package/src/canisters/declarations/ledger-icrc/icrc_ledger.did.idl.js +923 -0
- package/src/canisters/declarations/ledger-icrc/icrc_nft-ledger.did.d.ts +81 -0
- package/src/canisters/declarations/ledger-icrc/icrc_nft-ledger.did.idl.js +163 -0
- package/src/canisters/declarations/nns/genesis_token.did.d.ts +49 -0
- package/src/canisters/declarations/nns/genesis_token.did.idl.js +84 -0
- package/src/canisters/declarations/nns/governance.did.d.ts +1254 -0
- package/src/canisters/declarations/nns/governance.did.idl.js +2756 -0
- package/src/canisters/declarations/nns/governance_test.did.d.ts +1258 -0
- package/src/canisters/declarations/nns/governance_test.did.idl.js +2758 -0
- package/src/canisters/declarations/nns/sns_wasm.did.d.ts +286 -0
- package/src/canisters/declarations/nns/sns_wasm.did.idl.js +589 -0
- package/src/canisters/declarations/sns/sns_governance.did.d.ts +834 -0
- package/src/canisters/declarations/sns/sns_governance.did.idl.js +2235 -0
- package/src/canisters/declarations/sns/sns_governance_test.did.d.ts +861 -0
- package/src/canisters/declarations/sns/sns_governance_test.did.idl.js +2283 -0
- package/src/canisters/declarations/sns/sns_root.did.d.ts +204 -0
- package/src/canisters/declarations/sns/sns_root.did.idl.js +433 -0
- package/src/canisters/declarations/sns/sns_swap.did.d.ts +411 -0
- package/src/canisters/declarations/sns/sns_swap.did.idl.js +858 -0
- package/global.d.js +0 -1
- /package/{global.d.js.map → canisters/ckbtc/index.js.map} +0 -0
|
@@ -0,0 +1,893 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
|
|
3
|
+
// @ts-nocheck
|
|
4
|
+
|
|
5
|
+
// This file was automatically generated by @icp-sdk/bindgen@0.2.0.
|
|
6
|
+
// You should NOT make any changes in this file as it will be overwritten.
|
|
7
|
+
// Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified.
|
|
8
|
+
|
|
9
|
+
import type { ActorMethod } from '@icp-sdk/core/agent';
|
|
10
|
+
import type { IDL } from '@icp-sdk/core/candid';
|
|
11
|
+
import type { Principal } from '@icp-sdk/core/principal';
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* ICRC-1 account type.
|
|
15
|
+
*/
|
|
16
|
+
export interface Account {
|
|
17
|
+
'owner' : Principal,
|
|
18
|
+
'subaccount' : [] | [Uint8Array],
|
|
19
|
+
}
|
|
20
|
+
export interface AddCkErc20Token {
|
|
21
|
+
/**
|
|
22
|
+
* The ledger ID for that ckERC20 token.
|
|
23
|
+
*/
|
|
24
|
+
'ckerc20_ledger_id' : Principal,
|
|
25
|
+
/**
|
|
26
|
+
* Ethereum chain ID.
|
|
27
|
+
*/
|
|
28
|
+
'chain_id' : bigint,
|
|
29
|
+
/**
|
|
30
|
+
* The Ethereum address of the ERC-20 smart contract.
|
|
31
|
+
*/
|
|
32
|
+
'address' : string,
|
|
33
|
+
/**
|
|
34
|
+
* The ckERC20 token symbol on the ledger.
|
|
35
|
+
*/
|
|
36
|
+
'ckerc20_token_symbol' : string,
|
|
37
|
+
}
|
|
38
|
+
export type BlockTag = {
|
|
39
|
+
/**
|
|
40
|
+
* / The latest safe head block.
|
|
41
|
+
*/
|
|
42
|
+
'Safe' : null
|
|
43
|
+
} |
|
|
44
|
+
{
|
|
45
|
+
/**
|
|
46
|
+
* / The latest finalized block.
|
|
47
|
+
*/
|
|
48
|
+
'Finalized' : null
|
|
49
|
+
} |
|
|
50
|
+
{
|
|
51
|
+
/**
|
|
52
|
+
* / The latest mined block.
|
|
53
|
+
*/
|
|
54
|
+
'Latest' : null
|
|
55
|
+
};
|
|
56
|
+
export interface CanisterStatusResponse {
|
|
57
|
+
'status' : CanisterStatusType,
|
|
58
|
+
'memory_size' : bigint,
|
|
59
|
+
'cycles' : bigint,
|
|
60
|
+
'settings' : DefiniteCanisterSettings,
|
|
61
|
+
'query_stats' : QueryStats,
|
|
62
|
+
'idle_cycles_burned_per_day' : bigint,
|
|
63
|
+
'module_hash' : [] | [Uint8Array],
|
|
64
|
+
'reserved_cycles' : bigint,
|
|
65
|
+
}
|
|
66
|
+
export type CanisterStatusType = { 'stopped' : null } |
|
|
67
|
+
{ 'stopping' : null } |
|
|
68
|
+
{ 'running' : null };
|
|
69
|
+
export interface CkErc20Token {
|
|
70
|
+
'erc20_contract_address' : string,
|
|
71
|
+
'ledger_canister_id' : Principal,
|
|
72
|
+
'ckerc20_token_symbol' : string,
|
|
73
|
+
}
|
|
74
|
+
export interface DefiniteCanisterSettings {
|
|
75
|
+
'freezing_threshold' : bigint,
|
|
76
|
+
'controllers' : Array<Principal>,
|
|
77
|
+
'reserved_cycles_limit' : bigint,
|
|
78
|
+
'log_visibility' : LogVisibility,
|
|
79
|
+
'wasm_memory_limit' : bigint,
|
|
80
|
+
'memory_allocation' : bigint,
|
|
81
|
+
'compute_allocation' : bigint,
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Estimate price of an EIP-1559 transaction
|
|
85
|
+
* when converting ckETH to ETH or ckERC20 to ERC20, see
|
|
86
|
+
* https://eips.ethereum.org/EIPS/eip-1559
|
|
87
|
+
*/
|
|
88
|
+
export interface Eip1559TransactionPrice {
|
|
89
|
+
/**
|
|
90
|
+
* Maximum amount of Wei per gas unit that the transaction gives to miners
|
|
91
|
+
* to incentivize them to include their transaction (priority fee).
|
|
92
|
+
*/
|
|
93
|
+
'max_priority_fee_per_gas' : bigint,
|
|
94
|
+
/**
|
|
95
|
+
* Maximum amount of Wei per gas unit that the transaction is willing to pay in total.
|
|
96
|
+
* This covers the base fee determined by the network and the `max_priority_fee_per_gas`.
|
|
97
|
+
*/
|
|
98
|
+
'max_fee_per_gas' : bigint,
|
|
99
|
+
/**
|
|
100
|
+
* Maximum amount of Wei that can be charged for the transaction,
|
|
101
|
+
* computed as `max_fee_per_gas * gas_limit`
|
|
102
|
+
*/
|
|
103
|
+
'max_transaction_fee' : bigint,
|
|
104
|
+
/**
|
|
105
|
+
* Timestamp of when the price was estimated.
|
|
106
|
+
* Nanoseconds since the UNIX epoch.
|
|
107
|
+
*/
|
|
108
|
+
'timestamp' : [] | [bigint],
|
|
109
|
+
/**
|
|
110
|
+
* Maximum amount of gas transaction is authorized to consume.
|
|
111
|
+
*/
|
|
112
|
+
'gas_limit' : bigint,
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Argument to Eip1559TransactionPrice.
|
|
116
|
+
* When specified, it is to lookup transaction price for a ckERC20 token withdrawal.
|
|
117
|
+
* When not specified (null), it is for ETH withdrawal.
|
|
118
|
+
*/
|
|
119
|
+
export interface Eip1559TransactionPriceArg {
|
|
120
|
+
/**
|
|
121
|
+
* The ledger ID for that ckERC20 token.
|
|
122
|
+
*/
|
|
123
|
+
'ckerc20_ledger_id' : Principal,
|
|
124
|
+
}
|
|
125
|
+
export interface EthTransaction { 'transaction_hash' : string }
|
|
126
|
+
export type EthereumNetwork = {
|
|
127
|
+
/**
|
|
128
|
+
* The public Ethereum mainnet.
|
|
129
|
+
*/
|
|
130
|
+
'Mainnet' : null
|
|
131
|
+
} |
|
|
132
|
+
{
|
|
133
|
+
/**
|
|
134
|
+
* The public Ethereum Sepolia testnet.
|
|
135
|
+
*/
|
|
136
|
+
'Sepolia' : null
|
|
137
|
+
};
|
|
138
|
+
export interface Event {
|
|
139
|
+
'timestamp' : bigint,
|
|
140
|
+
'payload' : {
|
|
141
|
+
'SkippedBlock' : {
|
|
142
|
+
'block_number' : bigint,
|
|
143
|
+
'contract_address' : [] | [string],
|
|
144
|
+
}
|
|
145
|
+
} |
|
|
146
|
+
{
|
|
147
|
+
'AcceptedErc20Deposit' : {
|
|
148
|
+
'principal' : Principal,
|
|
149
|
+
'transaction_hash' : string,
|
|
150
|
+
'value' : bigint,
|
|
151
|
+
'log_index' : bigint,
|
|
152
|
+
'subaccount' : [] | [Subaccount],
|
|
153
|
+
'block_number' : bigint,
|
|
154
|
+
'erc20_contract_address' : string,
|
|
155
|
+
'from_address' : string,
|
|
156
|
+
}
|
|
157
|
+
} |
|
|
158
|
+
{
|
|
159
|
+
'SignedTransaction' : {
|
|
160
|
+
'raw_transaction' : string,
|
|
161
|
+
'withdrawal_id' : bigint,
|
|
162
|
+
}
|
|
163
|
+
} |
|
|
164
|
+
{ 'Upgrade' : UpgradeArg } |
|
|
165
|
+
{ 'Init' : InitArg } |
|
|
166
|
+
{
|
|
167
|
+
'AddedCkErc20Token' : {
|
|
168
|
+
'ckerc20_ledger_id' : Principal,
|
|
169
|
+
'chain_id' : bigint,
|
|
170
|
+
'address' : string,
|
|
171
|
+
'ckerc20_token_symbol' : string,
|
|
172
|
+
}
|
|
173
|
+
} |
|
|
174
|
+
{ 'SyncedDepositWithSubaccountToBlock' : { 'block_number' : bigint } } |
|
|
175
|
+
{ 'QuarantinedDeposit' : { 'event_source' : EventSource } } |
|
|
176
|
+
{ 'SyncedToBlock' : { 'block_number' : bigint } } |
|
|
177
|
+
{
|
|
178
|
+
'AcceptedDeposit' : {
|
|
179
|
+
'principal' : Principal,
|
|
180
|
+
'transaction_hash' : string,
|
|
181
|
+
'value' : bigint,
|
|
182
|
+
'log_index' : bigint,
|
|
183
|
+
'subaccount' : [] | [Subaccount],
|
|
184
|
+
'block_number' : bigint,
|
|
185
|
+
'from_address' : string,
|
|
186
|
+
}
|
|
187
|
+
} |
|
|
188
|
+
{
|
|
189
|
+
'ReplacedTransaction' : {
|
|
190
|
+
'withdrawal_id' : bigint,
|
|
191
|
+
'transaction' : UnsignedTransaction,
|
|
192
|
+
}
|
|
193
|
+
} |
|
|
194
|
+
{ 'QuarantinedReimbursement' : { 'index' : ReimbursementIndex } } |
|
|
195
|
+
{
|
|
196
|
+
'MintedCkEth' : {
|
|
197
|
+
'event_source' : EventSource,
|
|
198
|
+
'mint_block_index' : bigint,
|
|
199
|
+
}
|
|
200
|
+
} |
|
|
201
|
+
{
|
|
202
|
+
'ReimbursedEthWithdrawal' : {
|
|
203
|
+
'transaction_hash' : [] | [string],
|
|
204
|
+
'withdrawal_id' : bigint,
|
|
205
|
+
'reimbursed_amount' : bigint,
|
|
206
|
+
'reimbursed_in_block' : bigint,
|
|
207
|
+
}
|
|
208
|
+
} |
|
|
209
|
+
{
|
|
210
|
+
'FailedErc20WithdrawalRequest' : {
|
|
211
|
+
'to' : Principal,
|
|
212
|
+
'withdrawal_id' : bigint,
|
|
213
|
+
'reimbursed_amount' : bigint,
|
|
214
|
+
'to_subaccount' : [] | [Uint8Array],
|
|
215
|
+
}
|
|
216
|
+
} |
|
|
217
|
+
{
|
|
218
|
+
'ReimbursedErc20Withdrawal' : {
|
|
219
|
+
'burn_in_block' : bigint,
|
|
220
|
+
'transaction_hash' : [] | [string],
|
|
221
|
+
'withdrawal_id' : bigint,
|
|
222
|
+
'reimbursed_amount' : bigint,
|
|
223
|
+
'ledger_id' : Principal,
|
|
224
|
+
'reimbursed_in_block' : bigint,
|
|
225
|
+
}
|
|
226
|
+
} |
|
|
227
|
+
{
|
|
228
|
+
'MintedCkErc20' : {
|
|
229
|
+
'event_source' : EventSource,
|
|
230
|
+
'erc20_contract_address' : string,
|
|
231
|
+
'mint_block_index' : bigint,
|
|
232
|
+
'ckerc20_token_symbol' : string,
|
|
233
|
+
}
|
|
234
|
+
} |
|
|
235
|
+
{
|
|
236
|
+
'CreatedTransaction' : {
|
|
237
|
+
'withdrawal_id' : bigint,
|
|
238
|
+
'transaction' : UnsignedTransaction,
|
|
239
|
+
}
|
|
240
|
+
} |
|
|
241
|
+
{ 'InvalidDeposit' : { 'event_source' : EventSource, 'reason' : string } } |
|
|
242
|
+
{ 'SyncedErc20ToBlock' : { 'block_number' : bigint } } |
|
|
243
|
+
{
|
|
244
|
+
'AcceptedErc20WithdrawalRequest' : {
|
|
245
|
+
'cketh_ledger_burn_index' : bigint,
|
|
246
|
+
'destination' : string,
|
|
247
|
+
'ckerc20_ledger_id' : Principal,
|
|
248
|
+
'withdrawal_amount' : bigint,
|
|
249
|
+
'from' : Principal,
|
|
250
|
+
'created_at' : bigint,
|
|
251
|
+
'from_subaccount' : [] | [Uint8Array],
|
|
252
|
+
'erc20_contract_address' : string,
|
|
253
|
+
'ckerc20_ledger_burn_index' : bigint,
|
|
254
|
+
'max_transaction_fee' : bigint,
|
|
255
|
+
}
|
|
256
|
+
} |
|
|
257
|
+
{
|
|
258
|
+
'AcceptedEthWithdrawalRequest' : {
|
|
259
|
+
'ledger_burn_index' : bigint,
|
|
260
|
+
'destination' : string,
|
|
261
|
+
'withdrawal_amount' : bigint,
|
|
262
|
+
'from' : Principal,
|
|
263
|
+
'created_at' : [] | [bigint],
|
|
264
|
+
'from_subaccount' : [] | [Uint8Array],
|
|
265
|
+
}
|
|
266
|
+
} |
|
|
267
|
+
{
|
|
268
|
+
'FinalizedTransaction' : {
|
|
269
|
+
'withdrawal_id' : bigint,
|
|
270
|
+
'transaction_receipt' : TransactionReceipt,
|
|
271
|
+
}
|
|
272
|
+
},
|
|
273
|
+
}
|
|
274
|
+
export interface EventSource {
|
|
275
|
+
'transaction_hash' : string,
|
|
276
|
+
'log_index' : bigint,
|
|
277
|
+
}
|
|
278
|
+
export interface GasFeeEstimate {
|
|
279
|
+
/**
|
|
280
|
+
* Maximum amount of Wei per gas unit that the transaction gives to miners
|
|
281
|
+
* to incentivize them to include their transaction (priority fee).
|
|
282
|
+
*/
|
|
283
|
+
'max_priority_fee_per_gas' : bigint,
|
|
284
|
+
/**
|
|
285
|
+
* Maximum amount of Wei per gas unit that the transaction is willing to pay in total.
|
|
286
|
+
* This covers the base fee determined by the network and the `max_priority_fee_per_gas`.
|
|
287
|
+
*/
|
|
288
|
+
'max_fee_per_gas' : bigint,
|
|
289
|
+
/**
|
|
290
|
+
* Timestamp of when the price was estimated.
|
|
291
|
+
* Nanoseconds since the UNIX epoch.
|
|
292
|
+
*/
|
|
293
|
+
'timestamp' : bigint,
|
|
294
|
+
}
|
|
295
|
+
/**
|
|
296
|
+
* The initialization parameters of the minter canister.
|
|
297
|
+
*/
|
|
298
|
+
export interface InitArg {
|
|
299
|
+
/**
|
|
300
|
+
* The minter will interact with this Ethereum network.
|
|
301
|
+
*/
|
|
302
|
+
'ethereum_network' : EthereumNetwork,
|
|
303
|
+
/**
|
|
304
|
+
* Block number to start scrapping from on the Ethereum network.
|
|
305
|
+
* Scrapping the logs will resume at `last_scraped_block_number + 1` (inclusive).
|
|
306
|
+
*/
|
|
307
|
+
'last_scraped_block_number' : bigint,
|
|
308
|
+
/**
|
|
309
|
+
* The name of the ECDSA key to use.
|
|
310
|
+
* E.g., "dfx_test_key" on the local replica.
|
|
311
|
+
*/
|
|
312
|
+
'ecdsa_key_name' : string,
|
|
313
|
+
/**
|
|
314
|
+
* Nonce of the next transaction to be sent to the Ethereum network.
|
|
315
|
+
*/
|
|
316
|
+
'next_transaction_nonce' : bigint,
|
|
317
|
+
/**
|
|
318
|
+
* The principal of the EVM RPC canister that handles the communication
|
|
319
|
+
* with the Ethereum blockchain. If not specified, uses the production or
|
|
320
|
+
* staging EVM RPC canister based on the ethereum_network field.
|
|
321
|
+
*/
|
|
322
|
+
'evm_rpc_id' : [] | [Principal],
|
|
323
|
+
/**
|
|
324
|
+
* The principal of the ledger that handles ckETH transfers.
|
|
325
|
+
* The default account of the ckETH minter must be configured as
|
|
326
|
+
* the minting account of the ledger.
|
|
327
|
+
*/
|
|
328
|
+
'ledger_id' : Principal,
|
|
329
|
+
/**
|
|
330
|
+
* Address of the helper smart contract.
|
|
331
|
+
*/
|
|
332
|
+
'ethereum_contract_address' : [] | [string],
|
|
333
|
+
/**
|
|
334
|
+
* Minimum amount in Wei that can be withdrawn.
|
|
335
|
+
*/
|
|
336
|
+
'minimum_withdrawal_amount' : bigint,
|
|
337
|
+
/**
|
|
338
|
+
* Determine ethereum block height observed by minter.
|
|
339
|
+
*/
|
|
340
|
+
'ethereum_block_height' : BlockTag,
|
|
341
|
+
}
|
|
342
|
+
export type LedgerError = {
|
|
343
|
+
/**
|
|
344
|
+
* The ledger is overloaded, retry the request.
|
|
345
|
+
* The payload contains a human-readable message explaining what caused the unavailability.
|
|
346
|
+
*/
|
|
347
|
+
'TemporarilyUnavailable' : string
|
|
348
|
+
} |
|
|
349
|
+
{
|
|
350
|
+
/**
|
|
351
|
+
* The allowance given to the minter is too low.
|
|
352
|
+
*/
|
|
353
|
+
'InsufficientAllowance' : {
|
|
354
|
+
'token_symbol' : string,
|
|
355
|
+
'ledger_id' : Principal,
|
|
356
|
+
'allowance' : bigint,
|
|
357
|
+
'failed_burn_amount' : bigint,
|
|
358
|
+
}
|
|
359
|
+
} |
|
|
360
|
+
{
|
|
361
|
+
/**
|
|
362
|
+
* The withdrawal amount is too low and doesn't cover the ledger transaction fee.
|
|
363
|
+
*/
|
|
364
|
+
'AmountTooLow' : {
|
|
365
|
+
'minimum_burn_amount' : bigint,
|
|
366
|
+
'token_symbol' : string,
|
|
367
|
+
'ledger_id' : Principal,
|
|
368
|
+
'failed_burn_amount' : bigint,
|
|
369
|
+
}
|
|
370
|
+
} |
|
|
371
|
+
{
|
|
372
|
+
/**
|
|
373
|
+
* The balance of the withdrawal account is too low.
|
|
374
|
+
*/
|
|
375
|
+
'InsufficientFunds' : {
|
|
376
|
+
'balance' : bigint,
|
|
377
|
+
'token_symbol' : string,
|
|
378
|
+
'ledger_id' : Principal,
|
|
379
|
+
'failed_burn_amount' : bigint,
|
|
380
|
+
}
|
|
381
|
+
};
|
|
382
|
+
export type LogVisibility = { 'controllers' : null } |
|
|
383
|
+
{ 'public' : null } |
|
|
384
|
+
{ 'allowed_viewers' : Array<Principal> };
|
|
385
|
+
export type MinterArg = { 'UpgradeArg' : UpgradeArg } |
|
|
386
|
+
{ 'InitArg' : InitArg };
|
|
387
|
+
export interface MinterInfo {
|
|
388
|
+
/**
|
|
389
|
+
* Address of the ETH or ERC20 deposit with subaccount helper smart contract.
|
|
390
|
+
*/
|
|
391
|
+
'deposit_with_subaccount_helper_contract_address' : [] | [string],
|
|
392
|
+
/**
|
|
393
|
+
* Amount of ETH in Wei controlled by the minter.
|
|
394
|
+
* This might be less that the actual amount available on the `minter_address()`.
|
|
395
|
+
*/
|
|
396
|
+
'eth_balance' : [] | [bigint],
|
|
397
|
+
/**
|
|
398
|
+
* Address of the ETH helper smart contract.
|
|
399
|
+
*/
|
|
400
|
+
'eth_helper_contract_address' : [] | [string],
|
|
401
|
+
/**
|
|
402
|
+
* Last Ethereum block number observed by the minter.
|
|
403
|
+
*/
|
|
404
|
+
'last_observed_block_number' : [] | [bigint],
|
|
405
|
+
/**
|
|
406
|
+
* Canister ID of the EVM RPC canister that handles the communication
|
|
407
|
+
* with the Ethereum blockchain.
|
|
408
|
+
*/
|
|
409
|
+
'evm_rpc_id' : [] | [Principal],
|
|
410
|
+
/**
|
|
411
|
+
* Address of the ERC20 helper smart contract
|
|
412
|
+
*/
|
|
413
|
+
'erc20_helper_contract_address' : [] | [string],
|
|
414
|
+
/**
|
|
415
|
+
* Last scraped block number for logs of the ERC20 helper contract.
|
|
416
|
+
*/
|
|
417
|
+
'last_erc20_scraped_block_number' : [] | [bigint],
|
|
418
|
+
/**
|
|
419
|
+
* Information of supported ERC20 tokens.
|
|
420
|
+
*/
|
|
421
|
+
'supported_ckerc20_tokens' : [] | [Array<CkErc20Token>],
|
|
422
|
+
/**
|
|
423
|
+
* Last gas fee estimate.
|
|
424
|
+
*/
|
|
425
|
+
'last_gas_fee_estimate' : [] | [GasFeeEstimate],
|
|
426
|
+
/**
|
|
427
|
+
* Canister ID of the ckETH ledger.
|
|
428
|
+
*/
|
|
429
|
+
'cketh_ledger_id' : [] | [Principal],
|
|
430
|
+
/**
|
|
431
|
+
* (Deprecated) Address of the ETH helper smart contract.
|
|
432
|
+
* Use `eth_helper_contract_address`.
|
|
433
|
+
*/
|
|
434
|
+
'smart_contract_address' : [] | [string],
|
|
435
|
+
/**
|
|
436
|
+
* Last scraped block number for logs of the ETH helper contract.
|
|
437
|
+
*/
|
|
438
|
+
'last_eth_scraped_block_number' : [] | [bigint],
|
|
439
|
+
/**
|
|
440
|
+
* Minimum amount in Wei that can be withdrawn when converting ckETH -> ETH.
|
|
441
|
+
*/
|
|
442
|
+
'minimum_withdrawal_amount' : [] | [bigint],
|
|
443
|
+
/**
|
|
444
|
+
* Amount of ETH in Wei controlled by the minter.
|
|
445
|
+
* This might be less that the actual amount available on the `minter_address()`.
|
|
446
|
+
*/
|
|
447
|
+
'erc20_balances' : [] | [
|
|
448
|
+
Array<{ 'balance' : bigint, 'erc20_contract_address' : string }>
|
|
449
|
+
],
|
|
450
|
+
/**
|
|
451
|
+
* Ethereum address controlled by the minter via threshold ECDSA.
|
|
452
|
+
*/
|
|
453
|
+
'minter_address' : [] | [string],
|
|
454
|
+
/**
|
|
455
|
+
* Last scraped block number for logs of the deposit with subaccount helper contract.
|
|
456
|
+
*/
|
|
457
|
+
'last_deposit_with_subaccount_scraped_block_number' : [] | [bigint],
|
|
458
|
+
/**
|
|
459
|
+
* Determine ethereum block height observed by minter.
|
|
460
|
+
*/
|
|
461
|
+
'ethereum_block_height' : [] | [BlockTag],
|
|
462
|
+
}
|
|
463
|
+
export interface QueryStats {
|
|
464
|
+
'response_payload_bytes_total' : bigint,
|
|
465
|
+
'num_instructions_total' : bigint,
|
|
466
|
+
'num_calls_total' : bigint,
|
|
467
|
+
'request_payload_bytes_total' : bigint,
|
|
468
|
+
}
|
|
469
|
+
export type ReimbursementIndex = {
|
|
470
|
+
'CkErc20' : {
|
|
471
|
+
'cketh_ledger_burn_index' : bigint,
|
|
472
|
+
'ledger_id' : Principal,
|
|
473
|
+
'ckerc20_ledger_burn_index' : bigint,
|
|
474
|
+
}
|
|
475
|
+
} |
|
|
476
|
+
{ 'CkEth' : { 'ledger_burn_index' : bigint } };
|
|
477
|
+
export interface RetrieveErc20Request {
|
|
478
|
+
/**
|
|
479
|
+
* Burn index on the ledger handling the withdrawn ckERC20 token.
|
|
480
|
+
*/
|
|
481
|
+
'ckerc20_block_index' : bigint,
|
|
482
|
+
/**
|
|
483
|
+
* Burn index on the ckETH ledger.
|
|
484
|
+
* ckETH is needed to pay for the transaction fees.
|
|
485
|
+
*/
|
|
486
|
+
'cketh_block_index' : bigint,
|
|
487
|
+
}
|
|
488
|
+
export interface RetrieveEthRequest { 'block_index' : bigint }
|
|
489
|
+
/**
|
|
490
|
+
* Retrieve the status of a withdrawal request.
|
|
491
|
+
*/
|
|
492
|
+
export type RetrieveEthStatus = {
|
|
493
|
+
/**
|
|
494
|
+
* Withdrawal request is not found.
|
|
495
|
+
*/
|
|
496
|
+
'NotFound' : null
|
|
497
|
+
} |
|
|
498
|
+
{
|
|
499
|
+
/**
|
|
500
|
+
* Ethereum transaction is finalized.
|
|
501
|
+
*/
|
|
502
|
+
'TxFinalized' : TxFinalizedStatus
|
|
503
|
+
} |
|
|
504
|
+
{
|
|
505
|
+
/**
|
|
506
|
+
* Ethereum transaction was signed and is sent to the network.
|
|
507
|
+
*/
|
|
508
|
+
'TxSent' : EthTransaction
|
|
509
|
+
} |
|
|
510
|
+
{
|
|
511
|
+
/**
|
|
512
|
+
* Transaction fees were estimated and an Ethereum transaction was created.
|
|
513
|
+
* Transaction is not signed yet.
|
|
514
|
+
*/
|
|
515
|
+
'TxCreated' : null
|
|
516
|
+
} |
|
|
517
|
+
{
|
|
518
|
+
/**
|
|
519
|
+
* Withdrawal request is waiting to be processed.
|
|
520
|
+
*/
|
|
521
|
+
'Pending' : null
|
|
522
|
+
};
|
|
523
|
+
export type Subaccount = Uint8Array;
|
|
524
|
+
export interface TransactionReceipt {
|
|
525
|
+
'effective_gas_price' : bigint,
|
|
526
|
+
'status' : { 'Success' : null } |
|
|
527
|
+
{ 'Failure' : null },
|
|
528
|
+
'transaction_hash' : string,
|
|
529
|
+
'block_hash' : string,
|
|
530
|
+
'block_number' : bigint,
|
|
531
|
+
'gas_used' : bigint,
|
|
532
|
+
}
|
|
533
|
+
/**
|
|
534
|
+
* Status of a finalized transaction.
|
|
535
|
+
*/
|
|
536
|
+
export type TxFinalizedStatus = {
|
|
537
|
+
/**
|
|
538
|
+
* Transaction was successful.
|
|
539
|
+
*/
|
|
540
|
+
'Success' : {
|
|
541
|
+
'transaction_hash' : string,
|
|
542
|
+
'effective_transaction_fee' : [] | [bigint],
|
|
543
|
+
}
|
|
544
|
+
} |
|
|
545
|
+
{
|
|
546
|
+
/**
|
|
547
|
+
* Transaction failed, user got reimbursed.
|
|
548
|
+
*/
|
|
549
|
+
'Reimbursed' : {
|
|
550
|
+
'transaction_hash' : string,
|
|
551
|
+
'reimbursed_amount' : bigint,
|
|
552
|
+
'reimbursed_in_block' : bigint,
|
|
553
|
+
}
|
|
554
|
+
} |
|
|
555
|
+
{
|
|
556
|
+
/**
|
|
557
|
+
* Transaction failed and will be reimbursed,
|
|
558
|
+
*/
|
|
559
|
+
'PendingReimbursement' : EthTransaction
|
|
560
|
+
};
|
|
561
|
+
export interface UnsignedTransaction {
|
|
562
|
+
'destination' : string,
|
|
563
|
+
'value' : bigint,
|
|
564
|
+
'max_priority_fee_per_gas' : bigint,
|
|
565
|
+
'data' : Uint8Array,
|
|
566
|
+
'max_fee_per_gas' : bigint,
|
|
567
|
+
'chain_id' : bigint,
|
|
568
|
+
'nonce' : bigint,
|
|
569
|
+
'gas_limit' : bigint,
|
|
570
|
+
'access_list' : Array<
|
|
571
|
+
{ 'storage_keys' : Array<Uint8Array>, 'address' : string }
|
|
572
|
+
>,
|
|
573
|
+
}
|
|
574
|
+
export interface UpgradeArg {
|
|
575
|
+
/**
|
|
576
|
+
* Change the deposit with subaccount helper smart contract address.
|
|
577
|
+
*/
|
|
578
|
+
'deposit_with_subaccount_helper_contract_address' : [] | [string],
|
|
579
|
+
/**
|
|
580
|
+
* Change the nonce of the next transaction to be sent to the Ethereum network.
|
|
581
|
+
*/
|
|
582
|
+
'next_transaction_nonce' : [] | [bigint],
|
|
583
|
+
/**
|
|
584
|
+
* The principal of the EVM RPC canister that handles the communication
|
|
585
|
+
* with the Ethereum blockchain.
|
|
586
|
+
*/
|
|
587
|
+
'evm_rpc_id' : [] | [Principal],
|
|
588
|
+
/**
|
|
589
|
+
* The principal of the ledger suite orchestrator that handles the ICRC1 ledger suites
|
|
590
|
+
* for all ckERC20 tokens.
|
|
591
|
+
*/
|
|
592
|
+
'ledger_suite_orchestrator_id' : [] | [Principal],
|
|
593
|
+
/**
|
|
594
|
+
* Change the ERC-20 helper smart contract address.
|
|
595
|
+
*/
|
|
596
|
+
'erc20_helper_contract_address' : [] | [string],
|
|
597
|
+
/**
|
|
598
|
+
* Change the last scraped block number of the ERC-20 helper smart contract.
|
|
599
|
+
*/
|
|
600
|
+
'last_erc20_scraped_block_number' : [] | [bigint],
|
|
601
|
+
/**
|
|
602
|
+
* Change the ETH helper smart contract address.
|
|
603
|
+
*/
|
|
604
|
+
'ethereum_contract_address' : [] | [string],
|
|
605
|
+
/**
|
|
606
|
+
* Change the minimum amount in Wei that can be withdrawn.
|
|
607
|
+
*/
|
|
608
|
+
'minimum_withdrawal_amount' : [] | [bigint],
|
|
609
|
+
/**
|
|
610
|
+
* Change the last scraped block number of the deposit with subaccount helper smart contract.
|
|
611
|
+
*/
|
|
612
|
+
'last_deposit_with_subaccount_scraped_block_number' : [] | [bigint],
|
|
613
|
+
/**
|
|
614
|
+
* Change the ethereum block height observed by the minter.
|
|
615
|
+
*/
|
|
616
|
+
'ethereum_block_height' : [] | [BlockTag],
|
|
617
|
+
}
|
|
618
|
+
export interface WithdrawErc20Arg {
|
|
619
|
+
/**
|
|
620
|
+
* The ledger ID for that ckERC20 token.
|
|
621
|
+
*/
|
|
622
|
+
'ckerc20_ledger_id' : Principal,
|
|
623
|
+
/**
|
|
624
|
+
* Ethereum address to withdraw to.
|
|
625
|
+
*/
|
|
626
|
+
'recipient' : string,
|
|
627
|
+
/**
|
|
628
|
+
* The subaccount to burn ckETH from to pay for the transaction fee.
|
|
629
|
+
*/
|
|
630
|
+
'from_cketh_subaccount' : [] | [Subaccount],
|
|
631
|
+
/**
|
|
632
|
+
* The subaccount to burn ckERC20 from.
|
|
633
|
+
*/
|
|
634
|
+
'from_ckerc20_subaccount' : [] | [Subaccount],
|
|
635
|
+
/**
|
|
636
|
+
* Amount of tokens to withdraw.
|
|
637
|
+
* The amount is in the smallest unit of the token, e.g.,
|
|
638
|
+
* ckUSDC uses 6 decimals and so to withdraw 1 ckUSDC, the amount should be 1_000_000.
|
|
639
|
+
*/
|
|
640
|
+
'amount' : bigint,
|
|
641
|
+
}
|
|
642
|
+
export type WithdrawErc20Error = {
|
|
643
|
+
/**
|
|
644
|
+
* The user provided ckERC20 token is not supported by the minter.
|
|
645
|
+
*/
|
|
646
|
+
'TokenNotSupported' : { 'supported_tokens' : Array<CkErc20Token> }
|
|
647
|
+
} |
|
|
648
|
+
{
|
|
649
|
+
/**
|
|
650
|
+
* The minter is temporarily unavailable, retry the request.
|
|
651
|
+
* The payload contains a human-readable message explaining what caused the unavailability.
|
|
652
|
+
*/
|
|
653
|
+
'TemporarilyUnavailable' : string
|
|
654
|
+
} |
|
|
655
|
+
{
|
|
656
|
+
/**
|
|
657
|
+
* The minter could not burn the requested amount of ckERC20 tokens.
|
|
658
|
+
* The `cketh_block_index` identifies the burn that occurred on the ckETH ledger and that will be reimbursed.
|
|
659
|
+
*/
|
|
660
|
+
'CkErc20LedgerError' : {
|
|
661
|
+
'error' : LedgerError,
|
|
662
|
+
'cketh_block_index' : bigint,
|
|
663
|
+
}
|
|
664
|
+
} |
|
|
665
|
+
{
|
|
666
|
+
/**
|
|
667
|
+
* The minter could not burn the required amount of ckETH to pay for the transaction fees.
|
|
668
|
+
*/
|
|
669
|
+
'CkEthLedgerError' : { 'error' : LedgerError }
|
|
670
|
+
} |
|
|
671
|
+
{
|
|
672
|
+
/**
|
|
673
|
+
* Recipient's address is blocked.
|
|
674
|
+
* No withdrawal can be made to that address.
|
|
675
|
+
*/
|
|
676
|
+
'RecipientAddressBlocked' : { 'address' : string }
|
|
677
|
+
};
|
|
678
|
+
export interface WithdrawalArg {
|
|
679
|
+
/**
|
|
680
|
+
* The address to which the minter should deposit ETH.
|
|
681
|
+
*/
|
|
682
|
+
'recipient' : string,
|
|
683
|
+
/**
|
|
684
|
+
* The subaccount to burn ckETH from.
|
|
685
|
+
*/
|
|
686
|
+
'from_subaccount' : [] | [Subaccount],
|
|
687
|
+
/**
|
|
688
|
+
* The amount of ckETH in Wei that the client wants to withdraw.
|
|
689
|
+
*/
|
|
690
|
+
'amount' : bigint,
|
|
691
|
+
}
|
|
692
|
+
/**
|
|
693
|
+
* Details of a withdrawal request and its status.
|
|
694
|
+
*/
|
|
695
|
+
export interface WithdrawalDetail {
|
|
696
|
+
/**
|
|
697
|
+
* Withdrawal status
|
|
698
|
+
*/
|
|
699
|
+
'status' : WithdrawalStatus,
|
|
700
|
+
/**
|
|
701
|
+
* Symbol of the withdrawal token (either ckETH or ckERC20 token symbol).
|
|
702
|
+
*/
|
|
703
|
+
'token_symbol' : string,
|
|
704
|
+
/**
|
|
705
|
+
* Amount of tokens in base unit that was withdrawn.
|
|
706
|
+
*/
|
|
707
|
+
'withdrawal_amount' : bigint,
|
|
708
|
+
/**
|
|
709
|
+
* Withdrawal id (i.e. burn index on the ckETH ledger).
|
|
710
|
+
*/
|
|
711
|
+
'withdrawal_id' : bigint,
|
|
712
|
+
/**
|
|
713
|
+
* Sender's principal.
|
|
714
|
+
*/
|
|
715
|
+
'from' : Principal,
|
|
716
|
+
/**
|
|
717
|
+
* Sender's subaccount (if given).
|
|
718
|
+
*/
|
|
719
|
+
'from_subaccount' : [] | [Uint8Array],
|
|
720
|
+
/**
|
|
721
|
+
* Max transaction fee in Wei (transaction fee paid by the sender).
|
|
722
|
+
*/
|
|
723
|
+
'max_transaction_fee' : [] | [bigint],
|
|
724
|
+
/**
|
|
725
|
+
* Address to send tokens to.
|
|
726
|
+
*/
|
|
727
|
+
'recipient_address' : string,
|
|
728
|
+
}
|
|
729
|
+
export type WithdrawalError = {
|
|
730
|
+
/**
|
|
731
|
+
* The minter or the ckETH ledger is temporarily unavailable, retry the request.
|
|
732
|
+
* The payload contains a human-readable message explaining what caused the unavailability.
|
|
733
|
+
*/
|
|
734
|
+
'TemporarilyUnavailable' : string
|
|
735
|
+
} |
|
|
736
|
+
{
|
|
737
|
+
/**
|
|
738
|
+
* The allowance given to the minter is too low.
|
|
739
|
+
*/
|
|
740
|
+
'InsufficientAllowance' : { 'allowance' : bigint }
|
|
741
|
+
} |
|
|
742
|
+
{
|
|
743
|
+
/**
|
|
744
|
+
* The withdrawal amount is too low.
|
|
745
|
+
* The payload contains the minimal withdrawal amount.
|
|
746
|
+
*/
|
|
747
|
+
'AmountTooLow' : { 'min_withdrawal_amount' : bigint }
|
|
748
|
+
} |
|
|
749
|
+
{
|
|
750
|
+
/**
|
|
751
|
+
* Recipient's address is blocked.
|
|
752
|
+
* No withdrawal can be made to that address.
|
|
753
|
+
*/
|
|
754
|
+
'RecipientAddressBlocked' : { 'address' : string }
|
|
755
|
+
} |
|
|
756
|
+
{
|
|
757
|
+
/**
|
|
758
|
+
* The ckETH balance of the withdrawal account is too low.
|
|
759
|
+
*/
|
|
760
|
+
'InsufficientFunds' : { 'balance' : bigint }
|
|
761
|
+
};
|
|
762
|
+
/**
|
|
763
|
+
* Search parameter for withdrawals.
|
|
764
|
+
*/
|
|
765
|
+
export type WithdrawalSearchParameter = {
|
|
766
|
+
/**
|
|
767
|
+
* Search by recipient's ETH address.
|
|
768
|
+
*/
|
|
769
|
+
'ByRecipient' : string
|
|
770
|
+
} |
|
|
771
|
+
{
|
|
772
|
+
/**
|
|
773
|
+
* Search by sender's token account.
|
|
774
|
+
*/
|
|
775
|
+
'BySenderAccount' : Account
|
|
776
|
+
} |
|
|
777
|
+
{
|
|
778
|
+
/**
|
|
779
|
+
* Search by ckETH burn index (which is also used to index ckERC20 withdrawals).
|
|
780
|
+
*/
|
|
781
|
+
'ByWithdrawalId' : bigint
|
|
782
|
+
};
|
|
783
|
+
/**
|
|
784
|
+
* Status of a withdrawal request.
|
|
785
|
+
*/
|
|
786
|
+
export type WithdrawalStatus = {
|
|
787
|
+
/**
|
|
788
|
+
* Transaction already finalized.
|
|
789
|
+
*/
|
|
790
|
+
'TxFinalized' : TxFinalizedStatus
|
|
791
|
+
} |
|
|
792
|
+
{
|
|
793
|
+
/**
|
|
794
|
+
* Transaction sent but not yet finalized.
|
|
795
|
+
*/
|
|
796
|
+
'TxSent' : EthTransaction
|
|
797
|
+
} |
|
|
798
|
+
{
|
|
799
|
+
/**
|
|
800
|
+
* Transaction created byt not yet sent.
|
|
801
|
+
*/
|
|
802
|
+
'TxCreated' : null
|
|
803
|
+
} |
|
|
804
|
+
{
|
|
805
|
+
/**
|
|
806
|
+
* Request is pending, i.e. transaction is not yet created.
|
|
807
|
+
*/
|
|
808
|
+
'Pending' : null
|
|
809
|
+
};
|
|
810
|
+
export interface _SERVICE {
|
|
811
|
+
/**
|
|
812
|
+
* Add a ckERC-20 token to be supported by the minter.
|
|
813
|
+
* This call is restricted to the orchestrator ID.
|
|
814
|
+
*/
|
|
815
|
+
'add_ckerc20_token' : ActorMethod<[AddCkErc20Token], undefined>,
|
|
816
|
+
/**
|
|
817
|
+
* Estimate the price of a transaction issued by the minter when converting ckETH to ETH.
|
|
818
|
+
*/
|
|
819
|
+
'eip_1559_transaction_price' : ActorMethod<
|
|
820
|
+
[[] | [Eip1559TransactionPriceArg]],
|
|
821
|
+
Eip1559TransactionPrice
|
|
822
|
+
>,
|
|
823
|
+
/**
|
|
824
|
+
* Retrieve the status of the minter canister.
|
|
825
|
+
*/
|
|
826
|
+
'get_canister_status' : ActorMethod<[], CanisterStatusResponse>,
|
|
827
|
+
/**
|
|
828
|
+
* Retrieve events from the minter's audit log.
|
|
829
|
+
* The endpoint can return fewer events than requested to bound the response size.
|
|
830
|
+
* IMPORTANT: this endpoint is meant as a debugging tool and is not guaranteed to be backwards-compatible.
|
|
831
|
+
*/
|
|
832
|
+
'get_events' : ActorMethod<
|
|
833
|
+
[{ 'start' : bigint, 'length' : bigint }],
|
|
834
|
+
{ 'total_event_count' : bigint, 'events' : Array<Event> }
|
|
835
|
+
>,
|
|
836
|
+
/**
|
|
837
|
+
* Returns internal minter parameters
|
|
838
|
+
*/
|
|
839
|
+
'get_minter_info' : ActorMethod<[], MinterInfo>,
|
|
840
|
+
/**
|
|
841
|
+
* Check if an address is blocked by the minter.
|
|
842
|
+
*/
|
|
843
|
+
'is_address_blocked' : ActorMethod<[string], boolean>,
|
|
844
|
+
/**
|
|
845
|
+
* Retrieve the Ethereum address controlled by the minter:
|
|
846
|
+
* * Deposits will be transferred from the helper smart contract to this address
|
|
847
|
+
* * Withdrawals will originate from this address
|
|
848
|
+
* IMPORTANT: Do NOT send ETH to this address directly. Use the helper smart contract instead so that the minter
|
|
849
|
+
* knows to which IC principal the funds should be deposited.
|
|
850
|
+
*/
|
|
851
|
+
'minter_address' : ActorMethod<[], string>,
|
|
852
|
+
/**
|
|
853
|
+
* Retrieve the status of a Eth withdrawal request.
|
|
854
|
+
*/
|
|
855
|
+
'retrieve_eth_status' : ActorMethod<[bigint], RetrieveEthStatus>,
|
|
856
|
+
/**
|
|
857
|
+
* Address of the helper smart contract.
|
|
858
|
+
* Returns "N/A" if the helper smart contract is not set.
|
|
859
|
+
* IMPORTANT:
|
|
860
|
+
* * Use this address to send ETH to the minter to convert it to ckETH.
|
|
861
|
+
* * In case the smart contract needs to be updated the returned address will change!
|
|
862
|
+
* Always check the address before making a transfer.
|
|
863
|
+
*/
|
|
864
|
+
'smart_contract_address' : ActorMethod<[], string>,
|
|
865
|
+
/**
|
|
866
|
+
* Withdraw the specified amount of ERC-20 tokens to the given Ethereum address.
|
|
867
|
+
*/
|
|
868
|
+
'withdraw_erc20' : ActorMethod<
|
|
869
|
+
[WithdrawErc20Arg],
|
|
870
|
+
{ 'Ok' : RetrieveErc20Request } |
|
|
871
|
+
{ 'Err' : WithdrawErc20Error }
|
|
872
|
+
>,
|
|
873
|
+
/**
|
|
874
|
+
* Withdraw the specified amount in Wei to the given Ethereum address.
|
|
875
|
+
* IMPORTANT: The current gas limit is set to 21,000 for a transaction so withdrawals to smart contract addresses will likely fail.
|
|
876
|
+
*/
|
|
877
|
+
'withdraw_eth' : ActorMethod<
|
|
878
|
+
[WithdrawalArg],
|
|
879
|
+
{ 'Ok' : RetrieveEthRequest } |
|
|
880
|
+
{ 'Err' : WithdrawalError }
|
|
881
|
+
>,
|
|
882
|
+
/**
|
|
883
|
+
* Return details of all withdrawals matching the given search parameter.
|
|
884
|
+
*/
|
|
885
|
+
'withdrawal_status' : ActorMethod<
|
|
886
|
+
[WithdrawalSearchParameter],
|
|
887
|
+
Array<WithdrawalDetail>
|
|
888
|
+
>,
|
|
889
|
+
}
|
|
890
|
+
export declare const idlService: IDL.ServiceClass;
|
|
891
|
+
export declare const idlInitArgs: IDL.Type[];
|
|
892
|
+
export declare const idlFactory: IDL.InterfaceFactory;
|
|
893
|
+
export declare const init: (args: { IDL: typeof IDL }) => IDL.Type[];
|