@tcswap/helpers 4.5.15
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/api/index.cjs +4 -0
- package/dist/api/index.cjs.map +16 -0
- package/dist/api/index.js +4 -0
- package/dist/api/index.js.map +16 -0
- package/dist/chunk-pfmeq01a.js +5 -0
- package/dist/chunk-pfmeq01a.js.map +9 -0
- package/dist/chunk-vb4wtm2w.js +4 -0
- package/dist/chunk-vb4wtm2w.js.map +9 -0
- package/dist/contracts.cjs +4 -0
- package/dist/contracts.cjs.map +10 -0
- package/dist/contracts.js +4 -0
- package/dist/contracts.js.map +10 -0
- package/dist/index.cjs +7 -0
- package/dist/index.cjs.map +30 -0
- package/dist/index.js +7 -0
- package/dist/index.js.map +30 -0
- package/dist/tokens.cjs +4 -0
- package/dist/tokens.cjs.map +10 -0
- package/dist/tokens.js +4 -0
- package/dist/tokens.js.map +10 -0
- package/dist/types/api/index.d.ts +502 -0
- package/dist/types/api/index.d.ts.map +1 -0
- package/dist/types/api/memoless/endpoints.d.ts +56 -0
- package/dist/types/api/memoless/endpoints.d.ts.map +1 -0
- package/dist/types/api/memoless/types.d.ts +85 -0
- package/dist/types/api/memoless/types.d.ts.map +1 -0
- package/dist/types/api/midgard/endpoints.d.ts +80 -0
- package/dist/types/api/midgard/endpoints.d.ts.map +1 -0
- package/dist/types/api/midgard/types.d.ts +543 -0
- package/dist/types/api/midgard/types.d.ts.map +1 -0
- package/dist/types/api/thornode/endpoints.d.ts +34 -0
- package/dist/types/api/thornode/endpoints.d.ts.map +1 -0
- package/dist/types/api/thornode/types.d.ts +264 -0
- package/dist/types/api/thornode/types.d.ts.map +1 -0
- package/dist/types/api/uswap/endpoints.d.ts +372 -0
- package/dist/types/api/uswap/endpoints.d.ts.map +1 -0
- package/dist/types/api/uswap/types.d.ts +1487 -0
- package/dist/types/api/uswap/types.d.ts.map +1 -0
- package/dist/types/contracts.d.ts +2 -0
- package/dist/types/contracts.d.ts.map +1 -0
- package/dist/types/index.d.ts +32 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/modules/assetValue.d.ts +82 -0
- package/dist/types/modules/assetValue.d.ts.map +1 -0
- package/dist/types/modules/bigIntArithmetics.d.ts +60 -0
- package/dist/types/modules/bigIntArithmetics.d.ts.map +1 -0
- package/dist/types/modules/feeMultiplier.d.ts +48 -0
- package/dist/types/modules/feeMultiplier.d.ts.map +1 -0
- package/dist/types/modules/requestClient.d.ts +33 -0
- package/dist/types/modules/requestClient.d.ts.map +1 -0
- package/dist/types/modules/uSwapConfig.d.ts +249 -0
- package/dist/types/modules/uSwapConfig.d.ts.map +1 -0
- package/dist/types/modules/uSwapError.d.ts +879 -0
- package/dist/types/modules/uSwapError.d.ts.map +1 -0
- package/dist/types/modules/uSwapNumber.d.ts +10 -0
- package/dist/types/modules/uSwapNumber.d.ts.map +1 -0
- package/dist/types/tokens.d.ts +2 -0
- package/dist/types/tokens.d.ts.map +1 -0
- package/dist/types/types/commonTypes.d.ts +16 -0
- package/dist/types/types/commonTypes.d.ts.map +1 -0
- package/dist/types/types/derivationPath.d.ts +4 -0
- package/dist/types/types/derivationPath.d.ts.map +1 -0
- package/dist/types/types/errors/apiV1.d.ts +2 -0
- package/dist/types/types/errors/apiV1.d.ts.map +1 -0
- package/dist/types/types/index.d.ts +6 -0
- package/dist/types/types/index.d.ts.map +1 -0
- package/dist/types/types/quotes.d.ts +180 -0
- package/dist/types/types/quotes.d.ts.map +1 -0
- package/dist/types/types/sdk.d.ts +35 -0
- package/dist/types/types/sdk.d.ts.map +1 -0
- package/dist/types/types/wallet.d.ts +130 -0
- package/dist/types/types/wallet.d.ts.map +1 -0
- package/dist/types/utils/asset.d.ts +37 -0
- package/dist/types/utils/asset.d.ts.map +1 -0
- package/dist/types/utils/chains.d.ts +13 -0
- package/dist/types/utils/chains.d.ts.map +1 -0
- package/dist/types/utils/derivationPath.d.ts +21 -0
- package/dist/types/utils/derivationPath.d.ts.map +1 -0
- package/dist/types/utils/explorerUrls.d.ts +10 -0
- package/dist/types/utils/explorerUrls.d.ts.map +1 -0
- package/dist/types/utils/liquidity.d.ts +62 -0
- package/dist/types/utils/liquidity.d.ts.map +1 -0
- package/dist/types/utils/memo.d.ts +65 -0
- package/dist/types/utils/memo.d.ts.map +1 -0
- package/dist/types/utils/others.d.ts +15 -0
- package/dist/types/utils/others.d.ts.map +1 -0
- package/dist/types/utils/validators.d.ts +6 -0
- package/dist/types/utils/validators.d.ts.map +1 -0
- package/dist/types/utils/wallets.d.ts +36 -0
- package/dist/types/utils/wallets.d.ts.map +1 -0
- package/package.json +67 -0
- package/src/api/index.ts +15 -0
- package/src/api/memoless/endpoints.ts +62 -0
- package/src/api/memoless/types.ts +83 -0
- package/src/api/midgard/endpoints.ts +352 -0
- package/src/api/midgard/types.ts +515 -0
- package/src/api/thornode/endpoints.ts +109 -0
- package/src/api/thornode/types.ts +247 -0
- package/src/api/uswap/endpoints.ts +252 -0
- package/src/api/uswap/types.ts +626 -0
- package/src/contracts.ts +1 -0
- package/src/index.ts +32 -0
- package/src/modules/__tests__/assetValue.test.ts +2452 -0
- package/src/modules/__tests__/bigIntArithmetics.test.ts +410 -0
- package/src/modules/__tests__/feeMultiplier.test.ts +131 -0
- package/src/modules/__tests__/uSwapConfig.test.ts +429 -0
- package/src/modules/__tests__/uSwapNumber.test.ts +439 -0
- package/src/modules/assetValue.ts +536 -0
- package/src/modules/bigIntArithmetics.ts +366 -0
- package/src/modules/feeMultiplier.ts +84 -0
- package/src/modules/requestClient.ts +116 -0
- package/src/modules/uSwapConfig.ts +189 -0
- package/src/modules/uSwapError.ts +474 -0
- package/src/modules/uSwapNumber.ts +17 -0
- package/src/tokens.ts +1 -0
- package/src/types/commonTypes.ts +10 -0
- package/src/types/derivationPath.ts +11 -0
- package/src/types/errors/apiV1.ts +0 -0
- package/src/types/index.ts +5 -0
- package/src/types/quotes.ts +182 -0
- package/src/types/sdk.ts +38 -0
- package/src/types/wallet.ts +124 -0
- package/src/utils/__tests__/asset.test.ts +186 -0
- package/src/utils/__tests__/derivationPath.test.ts +142 -0
- package/src/utils/__tests__/explorerUrls.test.ts +59 -0
- package/src/utils/__tests__/liquidity.test.ts +302 -0
- package/src/utils/__tests__/memo.test.ts +99 -0
- package/src/utils/__tests__/others.test.ts +169 -0
- package/src/utils/__tests__/validators.test.ts +84 -0
- package/src/utils/__tests__/wallets.test.ts +625 -0
- package/src/utils/asset.ts +399 -0
- package/src/utils/chains.ts +104 -0
- package/src/utils/derivationPath.ts +101 -0
- package/src/utils/explorerUrls.ts +32 -0
- package/src/utils/liquidity.ts +154 -0
- package/src/utils/memo.ts +102 -0
- package/src/utils/others.ts +64 -0
- package/src/utils/validators.ts +36 -0
- package/src/utils/wallets.ts +238 -0
|
@@ -0,0 +1,879 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Modifications © 2025 Horizontal Systems.
|
|
3
|
+
*/
|
|
4
|
+
/** biome-ignore-all assist/source/useSortedKeys: its sorted by type */
|
|
5
|
+
declare const errorCodes: {
|
|
6
|
+
/**
|
|
7
|
+
* Core
|
|
8
|
+
*/
|
|
9
|
+
readonly core_estimated_max_spendable_chain_not_supported: 10001;
|
|
10
|
+
readonly core_extend_error: 10002;
|
|
11
|
+
readonly core_inbound_data_not_found: 10003;
|
|
12
|
+
readonly core_approve_asset_address_or_from_not_found: 10004;
|
|
13
|
+
readonly core_plugin_not_found: 10005;
|
|
14
|
+
readonly core_plugin_swap_not_found: 10006;
|
|
15
|
+
readonly core_approve_asset_target_invalid: 10007;
|
|
16
|
+
readonly core_explorer_unsupported_chain: 10008;
|
|
17
|
+
readonly core_verify_message_not_supported: 10009;
|
|
18
|
+
readonly core_chain_halted: 10010;
|
|
19
|
+
/**
|
|
20
|
+
* Core - Wallet
|
|
21
|
+
*/
|
|
22
|
+
readonly core_wallet_connection_not_found: 10101;
|
|
23
|
+
readonly core_wallet_ctrl_not_installed: 10102;
|
|
24
|
+
readonly core_wallet_evmwallet_not_installed: 10103;
|
|
25
|
+
readonly core_wallet_walletconnect_not_installed: 10104;
|
|
26
|
+
readonly core_wallet_keystore_not_installed: 10105;
|
|
27
|
+
readonly core_wallet_ledger_not_installed: 10106;
|
|
28
|
+
readonly core_wallet_trezor_not_installed: 10107;
|
|
29
|
+
readonly core_wallet_keplr_not_installed: 10108;
|
|
30
|
+
readonly core_wallet_okx_not_installed: 10109;
|
|
31
|
+
readonly core_wallet_keepkey_not_installed: 10110;
|
|
32
|
+
readonly core_wallet_talisman_not_installed: 10111;
|
|
33
|
+
readonly core_wallet_not_keypair_wallet: 10112;
|
|
34
|
+
readonly core_wallet_sign_message_not_supported: 10113;
|
|
35
|
+
readonly core_wallet_connection_failed: 10114;
|
|
36
|
+
readonly core_wallet_create_not_supported: 10115;
|
|
37
|
+
/**
|
|
38
|
+
* Core - Swap
|
|
39
|
+
*/
|
|
40
|
+
readonly core_swap_invalid_params: 10201;
|
|
41
|
+
readonly core_swap_route_not_complete: 10202;
|
|
42
|
+
readonly core_swap_asset_not_recognized: 10203;
|
|
43
|
+
readonly core_swap_contract_not_found: 10204;
|
|
44
|
+
readonly core_swap_route_transaction_not_found: 10205;
|
|
45
|
+
readonly core_swap_contract_not_supported: 10206;
|
|
46
|
+
readonly core_swap_transaction_error: 10207;
|
|
47
|
+
readonly core_swap_quote_mode_not_supported: 10208;
|
|
48
|
+
/**
|
|
49
|
+
* Core - Transaction
|
|
50
|
+
*/
|
|
51
|
+
readonly core_transaction_deposit_error: 10301;
|
|
52
|
+
readonly core_transaction_create_liquidity_base_error: 10302;
|
|
53
|
+
readonly core_transaction_create_liquidity_asset_error: 10303;
|
|
54
|
+
readonly core_transaction_create_liquidity_invalid_params: 10304;
|
|
55
|
+
readonly core_transaction_add_liquidity_invalid_params: 10305;
|
|
56
|
+
readonly core_transaction_add_liquidity_base_address: 10306;
|
|
57
|
+
readonly core_transaction_add_liquidity_base_error: 10307;
|
|
58
|
+
readonly core_transaction_add_liquidity_asset_error: 10308;
|
|
59
|
+
readonly core_transaction_withdraw_error: 10309;
|
|
60
|
+
readonly core_transaction_deposit_to_pool_error: 10310;
|
|
61
|
+
readonly core_transaction_deposit_insufficient_funds_error: 10311;
|
|
62
|
+
readonly core_transaction_deposit_gas_error: 10312;
|
|
63
|
+
readonly core_transaction_invalid_sender_address: 10313;
|
|
64
|
+
readonly core_transaction_deposit_server_error: 10314;
|
|
65
|
+
readonly core_transaction_user_rejected: 10315;
|
|
66
|
+
readonly core_transaction_failed: 10316;
|
|
67
|
+
readonly core_transaction_invalid_recipient_address: 10317;
|
|
68
|
+
/**
|
|
69
|
+
* Wallets - General
|
|
70
|
+
*/
|
|
71
|
+
readonly wallet_connection_rejected_by_user: 20001;
|
|
72
|
+
readonly wallet_missing_api_key: 20002;
|
|
73
|
+
readonly wallet_chain_not_supported: 20003;
|
|
74
|
+
readonly wallet_missing_params: 20004;
|
|
75
|
+
readonly wallet_provider_not_found: 20005;
|
|
76
|
+
readonly wallet_failed_to_add_or_switch_network: 20006;
|
|
77
|
+
/**
|
|
78
|
+
* Wallets - Ledger
|
|
79
|
+
*/
|
|
80
|
+
readonly wallet_ledger_connection_error: 20101;
|
|
81
|
+
readonly wallet_ledger_connection_claimed: 20102;
|
|
82
|
+
readonly wallet_ledger_get_address_error: 20103;
|
|
83
|
+
readonly wallet_ledger_device_not_found: 20104;
|
|
84
|
+
readonly wallet_ledger_device_locked: 20105;
|
|
85
|
+
readonly wallet_ledger_transport_error: 20106;
|
|
86
|
+
readonly wallet_ledger_public_key_error: 20107;
|
|
87
|
+
readonly wallet_ledger_derivation_path_error: 20108;
|
|
88
|
+
readonly wallet_ledger_signing_error: 20109;
|
|
89
|
+
readonly wallet_ledger_app_not_open: 20110;
|
|
90
|
+
readonly wallet_ledger_invalid_response: 20111;
|
|
91
|
+
readonly wallet_ledger_method_not_supported: 20112;
|
|
92
|
+
readonly wallet_ledger_invalid_params: 20113;
|
|
93
|
+
readonly wallet_ledger_invalid_signature: 20114;
|
|
94
|
+
readonly wallet_ledger_no_provider: 20115;
|
|
95
|
+
readonly wallet_ledger_pubkey_not_found: 20116;
|
|
96
|
+
readonly wallet_ledger_transport_not_defined: 20117;
|
|
97
|
+
readonly wallet_ledger_webusb_not_supported: 20118;
|
|
98
|
+
readonly wallet_ledger_chain_not_supported: 20119;
|
|
99
|
+
readonly wallet_ledger_invalid_asset: 20120;
|
|
100
|
+
readonly wallet_ledger_invalid_account: 20121;
|
|
101
|
+
readonly wallet_ledger_address_not_found: 20122;
|
|
102
|
+
readonly wallet_ledger_failed_to_get_address: 20123;
|
|
103
|
+
readonly wallet_ledger_webhid_not_supported: 20124;
|
|
104
|
+
/**
|
|
105
|
+
* Wallets - Phantom
|
|
106
|
+
*/
|
|
107
|
+
readonly wallet_phantom_not_found: 20201;
|
|
108
|
+
/**
|
|
109
|
+
* Wallets - Ctrl
|
|
110
|
+
*/
|
|
111
|
+
readonly wallet_ctrl_not_found: 20301;
|
|
112
|
+
readonly wallet_ctrl_send_transaction_no_address: 20302;
|
|
113
|
+
readonly wallet_ctrl_contract_address_not_provided: 20303;
|
|
114
|
+
readonly wallet_ctrl_asset_not_defined: 20304;
|
|
115
|
+
/**
|
|
116
|
+
* Wallets - WalletConnect
|
|
117
|
+
*/
|
|
118
|
+
readonly wallet_walletconnect_project_id_not_specified: 20401;
|
|
119
|
+
readonly wallet_walletconnect_connection_not_established: 20402;
|
|
120
|
+
readonly wallet_walletconnect_namespace_not_supported: 20403;
|
|
121
|
+
readonly wallet_walletconnect_chain_not_supported: 20404;
|
|
122
|
+
readonly wallet_walletconnect_invalid_method: 20405;
|
|
123
|
+
readonly wallet_walletconnect_method_not_supported: 20406;
|
|
124
|
+
/**
|
|
125
|
+
* Wallets - Trezor
|
|
126
|
+
*/
|
|
127
|
+
readonly wallet_trezor_failed_to_sign_transaction: 20501;
|
|
128
|
+
readonly wallet_trezor_derivation_path_not_supported: 20502;
|
|
129
|
+
readonly wallet_trezor_failed_to_get_address: 20503;
|
|
130
|
+
readonly wallet_trezor_transport_error: 20504;
|
|
131
|
+
readonly wallet_trezor_method_not_supported: 20505;
|
|
132
|
+
/**
|
|
133
|
+
* Wallets - Talisman
|
|
134
|
+
*/
|
|
135
|
+
readonly wallet_talisman_not_enabled: 20601;
|
|
136
|
+
readonly wallet_talisman_not_found: 20602;
|
|
137
|
+
/**
|
|
138
|
+
* Wallets - Polkadot
|
|
139
|
+
*/
|
|
140
|
+
readonly wallet_polkadot_not_found: 20701;
|
|
141
|
+
/**
|
|
142
|
+
* Wallets - Radix
|
|
143
|
+
*/
|
|
144
|
+
readonly wallet_radix_not_found: 20801;
|
|
145
|
+
readonly wallet_radix_transaction_failed: 20802;
|
|
146
|
+
readonly wallet_radix_invalid_manifest: 20803;
|
|
147
|
+
readonly wallet_radix_method_not_supported: 20804;
|
|
148
|
+
readonly wallet_radix_no_account: 20805;
|
|
149
|
+
/**
|
|
150
|
+
* Wallets - KeepKey
|
|
151
|
+
*/
|
|
152
|
+
readonly wallet_keepkey_not_found: 20901;
|
|
153
|
+
readonly wallet_keepkey_asset_not_defined: 20902;
|
|
154
|
+
readonly wallet_keepkey_contract_address_not_provided: 20903;
|
|
155
|
+
readonly wallet_keepkey_send_transaction_no_address: 20904;
|
|
156
|
+
readonly wallet_keepkey_derivation_path_error: 20905;
|
|
157
|
+
readonly wallet_keepkey_signing_error: 20906;
|
|
158
|
+
readonly wallet_keepkey_transport_error: 20907;
|
|
159
|
+
readonly wallet_keepkey_unsupported_chain: 20908;
|
|
160
|
+
readonly wallet_keepkey_invalid_response: 20909;
|
|
161
|
+
readonly wallet_keepkey_chain_not_supported: 20910;
|
|
162
|
+
readonly wallet_keepkey_signer_not_found: 20911;
|
|
163
|
+
readonly wallet_keepkey_no_accounts: 20912;
|
|
164
|
+
readonly wallet_keepkey_method_not_supported: 20913;
|
|
165
|
+
readonly wallet_keepkey_invalid_params: 20914;
|
|
166
|
+
readonly wallet_keepkey_config_not_found: 20915;
|
|
167
|
+
readonly wallet_keepkey_no_provider: 20916;
|
|
168
|
+
readonly wallet_keepkey_account_not_found: 20917;
|
|
169
|
+
/**
|
|
170
|
+
* Wallets - BitKeep/BitGet
|
|
171
|
+
*/
|
|
172
|
+
readonly wallet_bitkeep_not_found: 21001;
|
|
173
|
+
readonly wallet_bitkeep_failed_to_switch_network: 21002;
|
|
174
|
+
readonly wallet_bitkeep_no_accounts: 21003;
|
|
175
|
+
/**
|
|
176
|
+
* Wallets - Passkeys
|
|
177
|
+
*/
|
|
178
|
+
readonly wallet_passkeys_sign_transaction_error: 21101;
|
|
179
|
+
readonly wallet_passkeys_not_found: 21102;
|
|
180
|
+
readonly wallet_passkeys_no_address: 21103;
|
|
181
|
+
readonly wallet_passkeys_request_canceled: 21104;
|
|
182
|
+
readonly wallet_passkeys_signature_canceled: 21105;
|
|
183
|
+
readonly wallet_passkeys_failed_to_switch_network: 21106;
|
|
184
|
+
readonly wallet_passkeys_chain_not_supported: 21107;
|
|
185
|
+
readonly wallet_passkeys_instance_missing: 21108;
|
|
186
|
+
/**
|
|
187
|
+
* Wallets - OneKey
|
|
188
|
+
*/
|
|
189
|
+
readonly wallet_onekey_not_found: 21201;
|
|
190
|
+
readonly wallet_onekey_sign_transaction_error: 21202;
|
|
191
|
+
/**
|
|
192
|
+
* Wallets - OKX
|
|
193
|
+
*/
|
|
194
|
+
readonly wallet_okx_not_found: 21301;
|
|
195
|
+
readonly wallet_okx_chain_not_supported: 21302;
|
|
196
|
+
readonly wallet_okx_failed_to_switch_network: 21303;
|
|
197
|
+
readonly wallet_okx_no_accounts: 21304;
|
|
198
|
+
/**
|
|
199
|
+
* Wallets - Keplr
|
|
200
|
+
*/
|
|
201
|
+
readonly wallet_keplr_not_found: 21401;
|
|
202
|
+
readonly wallet_keplr_chain_not_supported: 21402;
|
|
203
|
+
readonly wallet_keplr_signer_not_found: 21403;
|
|
204
|
+
readonly wallet_keplr_no_accounts: 21404;
|
|
205
|
+
/**
|
|
206
|
+
* Wallets - Cosmostation
|
|
207
|
+
*/
|
|
208
|
+
readonly wallet_cosmostation_not_found: 21501;
|
|
209
|
+
readonly wallet_cosmostation_chain_not_supported: 21502;
|
|
210
|
+
readonly wallet_cosmostation_evm_provider_not_found: 21503;
|
|
211
|
+
readonly wallet_cosmostation_keplr_provider_not_found: 21504;
|
|
212
|
+
readonly wallet_cosmostation_no_accounts: 21505;
|
|
213
|
+
readonly wallet_cosmostation_no_evm_accounts: 21506;
|
|
214
|
+
readonly wallet_cosmostation_no_evm_address: 21507;
|
|
215
|
+
readonly wallet_cosmostation_signer_not_found: 21508;
|
|
216
|
+
/**
|
|
217
|
+
* Wallets - ###EMPTY### 21601
|
|
218
|
+
*/
|
|
219
|
+
/**
|
|
220
|
+
* Wallets - Coinbase
|
|
221
|
+
*/
|
|
222
|
+
readonly wallet_coinbase_not_found: 21701;
|
|
223
|
+
readonly wallet_coinbase_chain_not_supported: 21702;
|
|
224
|
+
readonly wallet_coinbase_method_not_supported: 21703;
|
|
225
|
+
readonly wallet_coinbase_no_accounts: 21704;
|
|
226
|
+
/**
|
|
227
|
+
* Wallets - EVM Extensions
|
|
228
|
+
*/
|
|
229
|
+
readonly wallet_evm_extensions_failed_to_switch_network: 21801;
|
|
230
|
+
readonly wallet_evm_extensions_no_provider: 21802;
|
|
231
|
+
readonly wallet_evm_extensions_not_found: 21803;
|
|
232
|
+
/**
|
|
233
|
+
* Wallets - Keystore
|
|
234
|
+
*/
|
|
235
|
+
readonly wallet_keystore_invalid_password: 21901;
|
|
236
|
+
readonly wallet_keystore_unsupported_version: 21902;
|
|
237
|
+
/**
|
|
238
|
+
* Wallets - Near Extensions
|
|
239
|
+
*/
|
|
240
|
+
readonly wallet_near_extensions_failed_to_switch_network: 22001;
|
|
241
|
+
readonly wallet_near_extensions_no_provider: 22002;
|
|
242
|
+
readonly wallet_near_extensions_not_found: 22003;
|
|
243
|
+
readonly wallet_near_method_not_supported: 22003;
|
|
244
|
+
/**
|
|
245
|
+
* Wallets - Vultisig
|
|
246
|
+
*/
|
|
247
|
+
readonly wallet_vultisig_not_found: 22101;
|
|
248
|
+
readonly wallet_vultisig_contract_address_not_provided: 22102;
|
|
249
|
+
readonly wallet_vultisig_asset_not_defined: 22103;
|
|
250
|
+
readonly wallet_vultisig_send_transaction_no_address: 22104;
|
|
251
|
+
/**
|
|
252
|
+
* Wallets - Xaman
|
|
253
|
+
*/
|
|
254
|
+
readonly wallet_xaman_not_configured: 23001;
|
|
255
|
+
readonly wallet_xaman_not_connected: 23002;
|
|
256
|
+
readonly wallet_xaman_auth_failed: 23003;
|
|
257
|
+
readonly wallet_xaman_connection_failed: 23004;
|
|
258
|
+
readonly wallet_xaman_transaction_failed: 23005;
|
|
259
|
+
readonly wallet_xaman_monitoring_failed: 23006;
|
|
260
|
+
/**
|
|
261
|
+
* Wallets - TronLink
|
|
262
|
+
*/
|
|
263
|
+
readonly wallet_tronlink_request_accounts_failed: 24001;
|
|
264
|
+
readonly wallet_tronlink_locked: 24002;
|
|
265
|
+
/**
|
|
266
|
+
* Chainflip
|
|
267
|
+
*/
|
|
268
|
+
readonly chainflip_channel_error: 30001;
|
|
269
|
+
readonly chainflip_unknown_asset: 30002;
|
|
270
|
+
/**
|
|
271
|
+
* Chainflip - Broker
|
|
272
|
+
*/
|
|
273
|
+
readonly chainflip_broker_invalid_params: 30101;
|
|
274
|
+
readonly chainflip_broker_recipient_error: 30102;
|
|
275
|
+
readonly chainflip_broker_register: 30103;
|
|
276
|
+
readonly chainflip_broker_tx_error: 30104;
|
|
277
|
+
readonly chainflip_broker_withdraw: 30105;
|
|
278
|
+
readonly chainflip_broker_fund_only_flip_supported: 30106;
|
|
279
|
+
readonly chainflip_broker_fund_invalid_address: 30107;
|
|
280
|
+
/**
|
|
281
|
+
* THORChain
|
|
282
|
+
*/
|
|
283
|
+
readonly thorchain_chain_halted: 40001;
|
|
284
|
+
readonly thorchain_trading_halted: 40002;
|
|
285
|
+
readonly thorchain_asset_is_not_tcy: 40003;
|
|
286
|
+
/**
|
|
287
|
+
* THORChain - Swap
|
|
288
|
+
*/
|
|
289
|
+
readonly thorchain_swapin_router_required: 40101;
|
|
290
|
+
readonly thorchain_swapin_vault_required: 40102;
|
|
291
|
+
readonly thorchain_swapin_memo_required: 40103;
|
|
292
|
+
readonly thorchain_swapin_token_required: 40104;
|
|
293
|
+
readonly thorchain_preferred_asset_payout_required: 40105;
|
|
294
|
+
/**
|
|
295
|
+
* Toolboxes - Cosmos
|
|
296
|
+
*/
|
|
297
|
+
readonly toolbox_cosmos_account_not_found: 50101;
|
|
298
|
+
readonly toolbox_cosmos_invalid_fee: 50102;
|
|
299
|
+
readonly toolbox_cosmos_invalid_params: 50103;
|
|
300
|
+
readonly toolbox_cosmos_no_signer: 50104;
|
|
301
|
+
readonly toolbox_cosmos_not_supported: 50105;
|
|
302
|
+
readonly toolbox_cosmos_signer_not_defined: 50106;
|
|
303
|
+
readonly toolbox_cosmos_validate_address_prefix_not_found: 50107;
|
|
304
|
+
readonly toolbox_cosmos_verify_signature_no_pubkey: 50108;
|
|
305
|
+
/**
|
|
306
|
+
* Toolboxes - EVM
|
|
307
|
+
*/
|
|
308
|
+
readonly toolbox_evm_error_estimating_gas_limit: 50201;
|
|
309
|
+
readonly toolbox_evm_error_sending_transaction: 50202;
|
|
310
|
+
readonly toolbox_evm_gas_estimation_error: 50203;
|
|
311
|
+
readonly toolbox_evm_invalid_gas_asset_address: 50204;
|
|
312
|
+
readonly toolbox_evm_invalid_params: 50205;
|
|
313
|
+
readonly toolbox_evm_invalid_transaction: 50206;
|
|
314
|
+
readonly toolbox_evm_no_abi_fragment: 50207;
|
|
315
|
+
readonly toolbox_evm_no_contract_address: 50208;
|
|
316
|
+
readonly toolbox_evm_no_fee_data: 50209;
|
|
317
|
+
readonly toolbox_evm_no_from_address: 50210;
|
|
318
|
+
readonly toolbox_evm_no_gas_price: 50211;
|
|
319
|
+
readonly toolbox_evm_no_signer_address: 50212;
|
|
320
|
+
readonly toolbox_evm_no_signer: 50213;
|
|
321
|
+
readonly toolbox_evm_no_to_address: 50214;
|
|
322
|
+
readonly toolbox_evm_not_supported: 50215;
|
|
323
|
+
readonly toolbox_evm_provider_not_eip1193_compatible: 50216;
|
|
324
|
+
/**
|
|
325
|
+
* Toolboxes - UTXO
|
|
326
|
+
*/
|
|
327
|
+
readonly toolbox_utxo_api_error: 50301;
|
|
328
|
+
readonly toolbox_utxo_broadcast_failed: 50302;
|
|
329
|
+
readonly toolbox_utxo_insufficient_balance: 50303;
|
|
330
|
+
readonly toolbox_utxo_invalid_address: 50304;
|
|
331
|
+
readonly toolbox_utxo_invalid_params: 50305;
|
|
332
|
+
readonly toolbox_utxo_invalid_transaction: 50306;
|
|
333
|
+
readonly toolbox_utxo_no_signer: 50307;
|
|
334
|
+
readonly toolbox_utxo_not_supported: 50308;
|
|
335
|
+
/**
|
|
336
|
+
* Toolboxes - Solana
|
|
337
|
+
*/
|
|
338
|
+
readonly toolbox_solana_no_signer: 50401;
|
|
339
|
+
readonly toolbox_solana_fee_estimation_failed: 50402;
|
|
340
|
+
/**
|
|
341
|
+
* Toolboxes - Substrate
|
|
342
|
+
*/
|
|
343
|
+
readonly toolbox_substrate_not_supported: 50501;
|
|
344
|
+
readonly toolbox_substrate_transfer_error: 50502;
|
|
345
|
+
/**
|
|
346
|
+
* Toolboxes - Radix
|
|
347
|
+
*/
|
|
348
|
+
readonly toolbox_radix_method_not_supported: 50601;
|
|
349
|
+
/**
|
|
350
|
+
* Toolboxes - Ripple
|
|
351
|
+
*/
|
|
352
|
+
readonly toolbox_ripple_get_balance_error: 50701;
|
|
353
|
+
readonly toolbox_ripple_rpc_not_configured: 50702;
|
|
354
|
+
readonly toolbox_ripple_signer_not_found: 50703;
|
|
355
|
+
readonly toolbox_ripple_asset_not_supported: 50704;
|
|
356
|
+
readonly toolbox_ripple_broadcast_error: 50705;
|
|
357
|
+
/**
|
|
358
|
+
* Toolboxes - Tron
|
|
359
|
+
*/
|
|
360
|
+
readonly toolbox_tron_no_signer: 50801;
|
|
361
|
+
readonly toolbox_tron_invalid_token_identifier: 50802;
|
|
362
|
+
readonly toolbox_tron_token_transfer_failed: 50803;
|
|
363
|
+
readonly toolbox_tron_transaction_creation_failed: 50804;
|
|
364
|
+
readonly toolbox_tron_fee_estimation_failed: 50805;
|
|
365
|
+
readonly toolbox_tron_trongrid_api_error: 50806;
|
|
366
|
+
readonly toolbox_tron_approve_failed: 50807;
|
|
367
|
+
readonly toolbox_tron_invalid_token_contract: 50808;
|
|
368
|
+
readonly toolbox_tron_allowance_check_failed: 50809;
|
|
369
|
+
/**
|
|
370
|
+
* Toolboxes - Near
|
|
371
|
+
*/
|
|
372
|
+
readonly toolbox_near_no_signer: 90601;
|
|
373
|
+
readonly toolbox_near_invalid_address: 90602;
|
|
374
|
+
readonly toolbox_near_invalid_amount: 90603;
|
|
375
|
+
readonly toolbox_near_transfer_failed: 90604;
|
|
376
|
+
readonly toolbox_near_access_key_error: 90605;
|
|
377
|
+
readonly toolbox_near_no_rpc_url: 90606;
|
|
378
|
+
readonly toolbox_near_empty_batch: 90607;
|
|
379
|
+
readonly toolbox_near_balance_failed: 90608;
|
|
380
|
+
readonly toolbox_near_invalid_name: 90609;
|
|
381
|
+
readonly toolbox_near_missing_contract_address: 90610;
|
|
382
|
+
readonly toolbox_near_no_account: 90611;
|
|
383
|
+
readonly toolbox_near_invalid_gas_params: 90612;
|
|
384
|
+
readonly toolbox_near_no_public_key_found: 90613;
|
|
385
|
+
/**
|
|
386
|
+
* Toolboxes - SUI
|
|
387
|
+
*/
|
|
388
|
+
readonly toolbox_sui_address_required: 90701;
|
|
389
|
+
readonly toolbox_sui_keypair_required: 90702;
|
|
390
|
+
readonly toolbox_sui_balance_error: 90703;
|
|
391
|
+
readonly toolbox_sui_transaction_creation_error: 90704;
|
|
392
|
+
readonly toolbox_sui_signing_error: 90705;
|
|
393
|
+
readonly toolbox_sui_broadcast_error: 90706;
|
|
394
|
+
readonly toolbox_sui_no_signer: 90707;
|
|
395
|
+
readonly toolbox_sui_no_sender: 90708;
|
|
396
|
+
/**
|
|
397
|
+
* Toolboxes - General
|
|
398
|
+
*/
|
|
399
|
+
readonly toolbox_not_supported: 59901;
|
|
400
|
+
/**
|
|
401
|
+
* NEAR Plugin
|
|
402
|
+
*/
|
|
403
|
+
readonly plugin_near_invalid_name: 41001;
|
|
404
|
+
readonly plugin_near_no_connection: 41002;
|
|
405
|
+
readonly plugin_near_name_unavailable: 41003;
|
|
406
|
+
readonly plugin_near_registration_failed: 41004;
|
|
407
|
+
readonly plugin_near_transfer_failed: 41005;
|
|
408
|
+
/**
|
|
409
|
+
* Garden Plugin
|
|
410
|
+
*/
|
|
411
|
+
readonly plugin_garden_missing_data: 42001;
|
|
412
|
+
/**
|
|
413
|
+
* SwapKit API
|
|
414
|
+
*/
|
|
415
|
+
readonly api_v2_invalid_response: 60001;
|
|
416
|
+
readonly api_v2_server_error: 60002;
|
|
417
|
+
readonly api_v2_invalid_method_key_hash: 60003;
|
|
418
|
+
/**
|
|
419
|
+
* Helpers
|
|
420
|
+
*/
|
|
421
|
+
readonly helpers_invalid_number_different_decimals: 70001;
|
|
422
|
+
readonly helpers_invalid_number_of_years: 70002;
|
|
423
|
+
readonly helpers_invalid_identifier: 70003;
|
|
424
|
+
readonly helpers_invalid_asset_url: 70004;
|
|
425
|
+
readonly helpers_invalid_asset_identifier: 70005;
|
|
426
|
+
readonly helpers_invalid_memo_type: 70006;
|
|
427
|
+
readonly helpers_failed_to_switch_network: 70007;
|
|
428
|
+
readonly helpers_not_found_provider: 70008;
|
|
429
|
+
readonly helpers_chain_not_supported: 70009;
|
|
430
|
+
readonly helpers_invalid_params: 70010;
|
|
431
|
+
readonly helpers_invalid_response: 70011;
|
|
432
|
+
readonly helpers_chain_no_public_or_set_rpc_url: 70012;
|
|
433
|
+
/**
|
|
434
|
+
* Anything else
|
|
435
|
+
*/
|
|
436
|
+
readonly not_implemented: 99999;
|
|
437
|
+
};
|
|
438
|
+
export type ErrorKeys = keyof typeof errorCodes;
|
|
439
|
+
export declare class USwapError extends Error {
|
|
440
|
+
static ErrorCode: {
|
|
441
|
+
/**
|
|
442
|
+
* Core
|
|
443
|
+
*/
|
|
444
|
+
readonly core_estimated_max_spendable_chain_not_supported: 10001;
|
|
445
|
+
readonly core_extend_error: 10002;
|
|
446
|
+
readonly core_inbound_data_not_found: 10003;
|
|
447
|
+
readonly core_approve_asset_address_or_from_not_found: 10004;
|
|
448
|
+
readonly core_plugin_not_found: 10005;
|
|
449
|
+
readonly core_plugin_swap_not_found: 10006;
|
|
450
|
+
readonly core_approve_asset_target_invalid: 10007;
|
|
451
|
+
readonly core_explorer_unsupported_chain: 10008;
|
|
452
|
+
readonly core_verify_message_not_supported: 10009;
|
|
453
|
+
readonly core_chain_halted: 10010;
|
|
454
|
+
/**
|
|
455
|
+
* Core - Wallet
|
|
456
|
+
*/
|
|
457
|
+
readonly core_wallet_connection_not_found: 10101;
|
|
458
|
+
readonly core_wallet_ctrl_not_installed: 10102;
|
|
459
|
+
readonly core_wallet_evmwallet_not_installed: 10103;
|
|
460
|
+
readonly core_wallet_walletconnect_not_installed: 10104;
|
|
461
|
+
readonly core_wallet_keystore_not_installed: 10105;
|
|
462
|
+
readonly core_wallet_ledger_not_installed: 10106;
|
|
463
|
+
readonly core_wallet_trezor_not_installed: 10107;
|
|
464
|
+
readonly core_wallet_keplr_not_installed: 10108;
|
|
465
|
+
readonly core_wallet_okx_not_installed: 10109;
|
|
466
|
+
readonly core_wallet_keepkey_not_installed: 10110;
|
|
467
|
+
readonly core_wallet_talisman_not_installed: 10111;
|
|
468
|
+
readonly core_wallet_not_keypair_wallet: 10112;
|
|
469
|
+
readonly core_wallet_sign_message_not_supported: 10113;
|
|
470
|
+
readonly core_wallet_connection_failed: 10114;
|
|
471
|
+
readonly core_wallet_create_not_supported: 10115;
|
|
472
|
+
/**
|
|
473
|
+
* Core - Swap
|
|
474
|
+
*/
|
|
475
|
+
readonly core_swap_invalid_params: 10201;
|
|
476
|
+
readonly core_swap_route_not_complete: 10202;
|
|
477
|
+
readonly core_swap_asset_not_recognized: 10203;
|
|
478
|
+
readonly core_swap_contract_not_found: 10204;
|
|
479
|
+
readonly core_swap_route_transaction_not_found: 10205;
|
|
480
|
+
readonly core_swap_contract_not_supported: 10206;
|
|
481
|
+
readonly core_swap_transaction_error: 10207;
|
|
482
|
+
readonly core_swap_quote_mode_not_supported: 10208;
|
|
483
|
+
/**
|
|
484
|
+
* Core - Transaction
|
|
485
|
+
*/
|
|
486
|
+
readonly core_transaction_deposit_error: 10301;
|
|
487
|
+
readonly core_transaction_create_liquidity_base_error: 10302;
|
|
488
|
+
readonly core_transaction_create_liquidity_asset_error: 10303;
|
|
489
|
+
readonly core_transaction_create_liquidity_invalid_params: 10304;
|
|
490
|
+
readonly core_transaction_add_liquidity_invalid_params: 10305;
|
|
491
|
+
readonly core_transaction_add_liquidity_base_address: 10306;
|
|
492
|
+
readonly core_transaction_add_liquidity_base_error: 10307;
|
|
493
|
+
readonly core_transaction_add_liquidity_asset_error: 10308;
|
|
494
|
+
readonly core_transaction_withdraw_error: 10309;
|
|
495
|
+
readonly core_transaction_deposit_to_pool_error: 10310;
|
|
496
|
+
readonly core_transaction_deposit_insufficient_funds_error: 10311;
|
|
497
|
+
readonly core_transaction_deposit_gas_error: 10312;
|
|
498
|
+
readonly core_transaction_invalid_sender_address: 10313;
|
|
499
|
+
readonly core_transaction_deposit_server_error: 10314;
|
|
500
|
+
readonly core_transaction_user_rejected: 10315;
|
|
501
|
+
readonly core_transaction_failed: 10316;
|
|
502
|
+
readonly core_transaction_invalid_recipient_address: 10317;
|
|
503
|
+
/**
|
|
504
|
+
* Wallets - General
|
|
505
|
+
*/
|
|
506
|
+
readonly wallet_connection_rejected_by_user: 20001;
|
|
507
|
+
readonly wallet_missing_api_key: 20002;
|
|
508
|
+
readonly wallet_chain_not_supported: 20003;
|
|
509
|
+
readonly wallet_missing_params: 20004;
|
|
510
|
+
readonly wallet_provider_not_found: 20005;
|
|
511
|
+
readonly wallet_failed_to_add_or_switch_network: 20006;
|
|
512
|
+
/**
|
|
513
|
+
* Wallets - Ledger
|
|
514
|
+
*/
|
|
515
|
+
readonly wallet_ledger_connection_error: 20101;
|
|
516
|
+
readonly wallet_ledger_connection_claimed: 20102;
|
|
517
|
+
readonly wallet_ledger_get_address_error: 20103;
|
|
518
|
+
readonly wallet_ledger_device_not_found: 20104;
|
|
519
|
+
readonly wallet_ledger_device_locked: 20105;
|
|
520
|
+
readonly wallet_ledger_transport_error: 20106;
|
|
521
|
+
readonly wallet_ledger_public_key_error: 20107;
|
|
522
|
+
readonly wallet_ledger_derivation_path_error: 20108;
|
|
523
|
+
readonly wallet_ledger_signing_error: 20109;
|
|
524
|
+
readonly wallet_ledger_app_not_open: 20110;
|
|
525
|
+
readonly wallet_ledger_invalid_response: 20111;
|
|
526
|
+
readonly wallet_ledger_method_not_supported: 20112;
|
|
527
|
+
readonly wallet_ledger_invalid_params: 20113;
|
|
528
|
+
readonly wallet_ledger_invalid_signature: 20114;
|
|
529
|
+
readonly wallet_ledger_no_provider: 20115;
|
|
530
|
+
readonly wallet_ledger_pubkey_not_found: 20116;
|
|
531
|
+
readonly wallet_ledger_transport_not_defined: 20117;
|
|
532
|
+
readonly wallet_ledger_webusb_not_supported: 20118;
|
|
533
|
+
readonly wallet_ledger_chain_not_supported: 20119;
|
|
534
|
+
readonly wallet_ledger_invalid_asset: 20120;
|
|
535
|
+
readonly wallet_ledger_invalid_account: 20121;
|
|
536
|
+
readonly wallet_ledger_address_not_found: 20122;
|
|
537
|
+
readonly wallet_ledger_failed_to_get_address: 20123;
|
|
538
|
+
readonly wallet_ledger_webhid_not_supported: 20124;
|
|
539
|
+
/**
|
|
540
|
+
* Wallets - Phantom
|
|
541
|
+
*/
|
|
542
|
+
readonly wallet_phantom_not_found: 20201;
|
|
543
|
+
/**
|
|
544
|
+
* Wallets - Ctrl
|
|
545
|
+
*/
|
|
546
|
+
readonly wallet_ctrl_not_found: 20301;
|
|
547
|
+
readonly wallet_ctrl_send_transaction_no_address: 20302;
|
|
548
|
+
readonly wallet_ctrl_contract_address_not_provided: 20303;
|
|
549
|
+
readonly wallet_ctrl_asset_not_defined: 20304;
|
|
550
|
+
/**
|
|
551
|
+
* Wallets - WalletConnect
|
|
552
|
+
*/
|
|
553
|
+
readonly wallet_walletconnect_project_id_not_specified: 20401;
|
|
554
|
+
readonly wallet_walletconnect_connection_not_established: 20402;
|
|
555
|
+
readonly wallet_walletconnect_namespace_not_supported: 20403;
|
|
556
|
+
readonly wallet_walletconnect_chain_not_supported: 20404;
|
|
557
|
+
readonly wallet_walletconnect_invalid_method: 20405;
|
|
558
|
+
readonly wallet_walletconnect_method_not_supported: 20406;
|
|
559
|
+
/**
|
|
560
|
+
* Wallets - Trezor
|
|
561
|
+
*/
|
|
562
|
+
readonly wallet_trezor_failed_to_sign_transaction: 20501;
|
|
563
|
+
readonly wallet_trezor_derivation_path_not_supported: 20502;
|
|
564
|
+
readonly wallet_trezor_failed_to_get_address: 20503;
|
|
565
|
+
readonly wallet_trezor_transport_error: 20504;
|
|
566
|
+
readonly wallet_trezor_method_not_supported: 20505;
|
|
567
|
+
/**
|
|
568
|
+
* Wallets - Talisman
|
|
569
|
+
*/
|
|
570
|
+
readonly wallet_talisman_not_enabled: 20601;
|
|
571
|
+
readonly wallet_talisman_not_found: 20602;
|
|
572
|
+
/**
|
|
573
|
+
* Wallets - Polkadot
|
|
574
|
+
*/
|
|
575
|
+
readonly wallet_polkadot_not_found: 20701;
|
|
576
|
+
/**
|
|
577
|
+
* Wallets - Radix
|
|
578
|
+
*/
|
|
579
|
+
readonly wallet_radix_not_found: 20801;
|
|
580
|
+
readonly wallet_radix_transaction_failed: 20802;
|
|
581
|
+
readonly wallet_radix_invalid_manifest: 20803;
|
|
582
|
+
readonly wallet_radix_method_not_supported: 20804;
|
|
583
|
+
readonly wallet_radix_no_account: 20805;
|
|
584
|
+
/**
|
|
585
|
+
* Wallets - KeepKey
|
|
586
|
+
*/
|
|
587
|
+
readonly wallet_keepkey_not_found: 20901;
|
|
588
|
+
readonly wallet_keepkey_asset_not_defined: 20902;
|
|
589
|
+
readonly wallet_keepkey_contract_address_not_provided: 20903;
|
|
590
|
+
readonly wallet_keepkey_send_transaction_no_address: 20904;
|
|
591
|
+
readonly wallet_keepkey_derivation_path_error: 20905;
|
|
592
|
+
readonly wallet_keepkey_signing_error: 20906;
|
|
593
|
+
readonly wallet_keepkey_transport_error: 20907;
|
|
594
|
+
readonly wallet_keepkey_unsupported_chain: 20908;
|
|
595
|
+
readonly wallet_keepkey_invalid_response: 20909;
|
|
596
|
+
readonly wallet_keepkey_chain_not_supported: 20910;
|
|
597
|
+
readonly wallet_keepkey_signer_not_found: 20911;
|
|
598
|
+
readonly wallet_keepkey_no_accounts: 20912;
|
|
599
|
+
readonly wallet_keepkey_method_not_supported: 20913;
|
|
600
|
+
readonly wallet_keepkey_invalid_params: 20914;
|
|
601
|
+
readonly wallet_keepkey_config_not_found: 20915;
|
|
602
|
+
readonly wallet_keepkey_no_provider: 20916;
|
|
603
|
+
readonly wallet_keepkey_account_not_found: 20917;
|
|
604
|
+
/**
|
|
605
|
+
* Wallets - BitKeep/BitGet
|
|
606
|
+
*/
|
|
607
|
+
readonly wallet_bitkeep_not_found: 21001;
|
|
608
|
+
readonly wallet_bitkeep_failed_to_switch_network: 21002;
|
|
609
|
+
readonly wallet_bitkeep_no_accounts: 21003;
|
|
610
|
+
/**
|
|
611
|
+
* Wallets - Passkeys
|
|
612
|
+
*/
|
|
613
|
+
readonly wallet_passkeys_sign_transaction_error: 21101;
|
|
614
|
+
readonly wallet_passkeys_not_found: 21102;
|
|
615
|
+
readonly wallet_passkeys_no_address: 21103;
|
|
616
|
+
readonly wallet_passkeys_request_canceled: 21104;
|
|
617
|
+
readonly wallet_passkeys_signature_canceled: 21105;
|
|
618
|
+
readonly wallet_passkeys_failed_to_switch_network: 21106;
|
|
619
|
+
readonly wallet_passkeys_chain_not_supported: 21107;
|
|
620
|
+
readonly wallet_passkeys_instance_missing: 21108;
|
|
621
|
+
/**
|
|
622
|
+
* Wallets - OneKey
|
|
623
|
+
*/
|
|
624
|
+
readonly wallet_onekey_not_found: 21201;
|
|
625
|
+
readonly wallet_onekey_sign_transaction_error: 21202;
|
|
626
|
+
/**
|
|
627
|
+
* Wallets - OKX
|
|
628
|
+
*/
|
|
629
|
+
readonly wallet_okx_not_found: 21301;
|
|
630
|
+
readonly wallet_okx_chain_not_supported: 21302;
|
|
631
|
+
readonly wallet_okx_failed_to_switch_network: 21303;
|
|
632
|
+
readonly wallet_okx_no_accounts: 21304;
|
|
633
|
+
/**
|
|
634
|
+
* Wallets - Keplr
|
|
635
|
+
*/
|
|
636
|
+
readonly wallet_keplr_not_found: 21401;
|
|
637
|
+
readonly wallet_keplr_chain_not_supported: 21402;
|
|
638
|
+
readonly wallet_keplr_signer_not_found: 21403;
|
|
639
|
+
readonly wallet_keplr_no_accounts: 21404;
|
|
640
|
+
/**
|
|
641
|
+
* Wallets - Cosmostation
|
|
642
|
+
*/
|
|
643
|
+
readonly wallet_cosmostation_not_found: 21501;
|
|
644
|
+
readonly wallet_cosmostation_chain_not_supported: 21502;
|
|
645
|
+
readonly wallet_cosmostation_evm_provider_not_found: 21503;
|
|
646
|
+
readonly wallet_cosmostation_keplr_provider_not_found: 21504;
|
|
647
|
+
readonly wallet_cosmostation_no_accounts: 21505;
|
|
648
|
+
readonly wallet_cosmostation_no_evm_accounts: 21506;
|
|
649
|
+
readonly wallet_cosmostation_no_evm_address: 21507;
|
|
650
|
+
readonly wallet_cosmostation_signer_not_found: 21508;
|
|
651
|
+
/**
|
|
652
|
+
* Wallets - ###EMPTY### 21601
|
|
653
|
+
*/
|
|
654
|
+
/**
|
|
655
|
+
* Wallets - Coinbase
|
|
656
|
+
*/
|
|
657
|
+
readonly wallet_coinbase_not_found: 21701;
|
|
658
|
+
readonly wallet_coinbase_chain_not_supported: 21702;
|
|
659
|
+
readonly wallet_coinbase_method_not_supported: 21703;
|
|
660
|
+
readonly wallet_coinbase_no_accounts: 21704;
|
|
661
|
+
/**
|
|
662
|
+
* Wallets - EVM Extensions
|
|
663
|
+
*/
|
|
664
|
+
readonly wallet_evm_extensions_failed_to_switch_network: 21801;
|
|
665
|
+
readonly wallet_evm_extensions_no_provider: 21802;
|
|
666
|
+
readonly wallet_evm_extensions_not_found: 21803;
|
|
667
|
+
/**
|
|
668
|
+
* Wallets - Keystore
|
|
669
|
+
*/
|
|
670
|
+
readonly wallet_keystore_invalid_password: 21901;
|
|
671
|
+
readonly wallet_keystore_unsupported_version: 21902;
|
|
672
|
+
/**
|
|
673
|
+
* Wallets - Near Extensions
|
|
674
|
+
*/
|
|
675
|
+
readonly wallet_near_extensions_failed_to_switch_network: 22001;
|
|
676
|
+
readonly wallet_near_extensions_no_provider: 22002;
|
|
677
|
+
readonly wallet_near_extensions_not_found: 22003;
|
|
678
|
+
readonly wallet_near_method_not_supported: 22003;
|
|
679
|
+
/**
|
|
680
|
+
* Wallets - Vultisig
|
|
681
|
+
*/
|
|
682
|
+
readonly wallet_vultisig_not_found: 22101;
|
|
683
|
+
readonly wallet_vultisig_contract_address_not_provided: 22102;
|
|
684
|
+
readonly wallet_vultisig_asset_not_defined: 22103;
|
|
685
|
+
readonly wallet_vultisig_send_transaction_no_address: 22104;
|
|
686
|
+
/**
|
|
687
|
+
* Wallets - Xaman
|
|
688
|
+
*/
|
|
689
|
+
readonly wallet_xaman_not_configured: 23001;
|
|
690
|
+
readonly wallet_xaman_not_connected: 23002;
|
|
691
|
+
readonly wallet_xaman_auth_failed: 23003;
|
|
692
|
+
readonly wallet_xaman_connection_failed: 23004;
|
|
693
|
+
readonly wallet_xaman_transaction_failed: 23005;
|
|
694
|
+
readonly wallet_xaman_monitoring_failed: 23006;
|
|
695
|
+
/**
|
|
696
|
+
* Wallets - TronLink
|
|
697
|
+
*/
|
|
698
|
+
readonly wallet_tronlink_request_accounts_failed: 24001;
|
|
699
|
+
readonly wallet_tronlink_locked: 24002;
|
|
700
|
+
/**
|
|
701
|
+
* Chainflip
|
|
702
|
+
*/
|
|
703
|
+
readonly chainflip_channel_error: 30001;
|
|
704
|
+
readonly chainflip_unknown_asset: 30002;
|
|
705
|
+
/**
|
|
706
|
+
* Chainflip - Broker
|
|
707
|
+
*/
|
|
708
|
+
readonly chainflip_broker_invalid_params: 30101;
|
|
709
|
+
readonly chainflip_broker_recipient_error: 30102;
|
|
710
|
+
readonly chainflip_broker_register: 30103;
|
|
711
|
+
readonly chainflip_broker_tx_error: 30104;
|
|
712
|
+
readonly chainflip_broker_withdraw: 30105;
|
|
713
|
+
readonly chainflip_broker_fund_only_flip_supported: 30106;
|
|
714
|
+
readonly chainflip_broker_fund_invalid_address: 30107;
|
|
715
|
+
/**
|
|
716
|
+
* THORChain
|
|
717
|
+
*/
|
|
718
|
+
readonly thorchain_chain_halted: 40001;
|
|
719
|
+
readonly thorchain_trading_halted: 40002;
|
|
720
|
+
readonly thorchain_asset_is_not_tcy: 40003;
|
|
721
|
+
/**
|
|
722
|
+
* THORChain - Swap
|
|
723
|
+
*/
|
|
724
|
+
readonly thorchain_swapin_router_required: 40101;
|
|
725
|
+
readonly thorchain_swapin_vault_required: 40102;
|
|
726
|
+
readonly thorchain_swapin_memo_required: 40103;
|
|
727
|
+
readonly thorchain_swapin_token_required: 40104;
|
|
728
|
+
readonly thorchain_preferred_asset_payout_required: 40105;
|
|
729
|
+
/**
|
|
730
|
+
* Toolboxes - Cosmos
|
|
731
|
+
*/
|
|
732
|
+
readonly toolbox_cosmos_account_not_found: 50101;
|
|
733
|
+
readonly toolbox_cosmos_invalid_fee: 50102;
|
|
734
|
+
readonly toolbox_cosmos_invalid_params: 50103;
|
|
735
|
+
readonly toolbox_cosmos_no_signer: 50104;
|
|
736
|
+
readonly toolbox_cosmos_not_supported: 50105;
|
|
737
|
+
readonly toolbox_cosmos_signer_not_defined: 50106;
|
|
738
|
+
readonly toolbox_cosmos_validate_address_prefix_not_found: 50107;
|
|
739
|
+
readonly toolbox_cosmos_verify_signature_no_pubkey: 50108;
|
|
740
|
+
/**
|
|
741
|
+
* Toolboxes - EVM
|
|
742
|
+
*/
|
|
743
|
+
readonly toolbox_evm_error_estimating_gas_limit: 50201;
|
|
744
|
+
readonly toolbox_evm_error_sending_transaction: 50202;
|
|
745
|
+
readonly toolbox_evm_gas_estimation_error: 50203;
|
|
746
|
+
readonly toolbox_evm_invalid_gas_asset_address: 50204;
|
|
747
|
+
readonly toolbox_evm_invalid_params: 50205;
|
|
748
|
+
readonly toolbox_evm_invalid_transaction: 50206;
|
|
749
|
+
readonly toolbox_evm_no_abi_fragment: 50207;
|
|
750
|
+
readonly toolbox_evm_no_contract_address: 50208;
|
|
751
|
+
readonly toolbox_evm_no_fee_data: 50209;
|
|
752
|
+
readonly toolbox_evm_no_from_address: 50210;
|
|
753
|
+
readonly toolbox_evm_no_gas_price: 50211;
|
|
754
|
+
readonly toolbox_evm_no_signer_address: 50212;
|
|
755
|
+
readonly toolbox_evm_no_signer: 50213;
|
|
756
|
+
readonly toolbox_evm_no_to_address: 50214;
|
|
757
|
+
readonly toolbox_evm_not_supported: 50215;
|
|
758
|
+
readonly toolbox_evm_provider_not_eip1193_compatible: 50216;
|
|
759
|
+
/**
|
|
760
|
+
* Toolboxes - UTXO
|
|
761
|
+
*/
|
|
762
|
+
readonly toolbox_utxo_api_error: 50301;
|
|
763
|
+
readonly toolbox_utxo_broadcast_failed: 50302;
|
|
764
|
+
readonly toolbox_utxo_insufficient_balance: 50303;
|
|
765
|
+
readonly toolbox_utxo_invalid_address: 50304;
|
|
766
|
+
readonly toolbox_utxo_invalid_params: 50305;
|
|
767
|
+
readonly toolbox_utxo_invalid_transaction: 50306;
|
|
768
|
+
readonly toolbox_utxo_no_signer: 50307;
|
|
769
|
+
readonly toolbox_utxo_not_supported: 50308;
|
|
770
|
+
/**
|
|
771
|
+
* Toolboxes - Solana
|
|
772
|
+
*/
|
|
773
|
+
readonly toolbox_solana_no_signer: 50401;
|
|
774
|
+
readonly toolbox_solana_fee_estimation_failed: 50402;
|
|
775
|
+
/**
|
|
776
|
+
* Toolboxes - Substrate
|
|
777
|
+
*/
|
|
778
|
+
readonly toolbox_substrate_not_supported: 50501;
|
|
779
|
+
readonly toolbox_substrate_transfer_error: 50502;
|
|
780
|
+
/**
|
|
781
|
+
* Toolboxes - Radix
|
|
782
|
+
*/
|
|
783
|
+
readonly toolbox_radix_method_not_supported: 50601;
|
|
784
|
+
/**
|
|
785
|
+
* Toolboxes - Ripple
|
|
786
|
+
*/
|
|
787
|
+
readonly toolbox_ripple_get_balance_error: 50701;
|
|
788
|
+
readonly toolbox_ripple_rpc_not_configured: 50702;
|
|
789
|
+
readonly toolbox_ripple_signer_not_found: 50703;
|
|
790
|
+
readonly toolbox_ripple_asset_not_supported: 50704;
|
|
791
|
+
readonly toolbox_ripple_broadcast_error: 50705;
|
|
792
|
+
/**
|
|
793
|
+
* Toolboxes - Tron
|
|
794
|
+
*/
|
|
795
|
+
readonly toolbox_tron_no_signer: 50801;
|
|
796
|
+
readonly toolbox_tron_invalid_token_identifier: 50802;
|
|
797
|
+
readonly toolbox_tron_token_transfer_failed: 50803;
|
|
798
|
+
readonly toolbox_tron_transaction_creation_failed: 50804;
|
|
799
|
+
readonly toolbox_tron_fee_estimation_failed: 50805;
|
|
800
|
+
readonly toolbox_tron_trongrid_api_error: 50806;
|
|
801
|
+
readonly toolbox_tron_approve_failed: 50807;
|
|
802
|
+
readonly toolbox_tron_invalid_token_contract: 50808;
|
|
803
|
+
readonly toolbox_tron_allowance_check_failed: 50809;
|
|
804
|
+
/**
|
|
805
|
+
* Toolboxes - Near
|
|
806
|
+
*/
|
|
807
|
+
readonly toolbox_near_no_signer: 90601;
|
|
808
|
+
readonly toolbox_near_invalid_address: 90602;
|
|
809
|
+
readonly toolbox_near_invalid_amount: 90603;
|
|
810
|
+
readonly toolbox_near_transfer_failed: 90604;
|
|
811
|
+
readonly toolbox_near_access_key_error: 90605;
|
|
812
|
+
readonly toolbox_near_no_rpc_url: 90606;
|
|
813
|
+
readonly toolbox_near_empty_batch: 90607;
|
|
814
|
+
readonly toolbox_near_balance_failed: 90608;
|
|
815
|
+
readonly toolbox_near_invalid_name: 90609;
|
|
816
|
+
readonly toolbox_near_missing_contract_address: 90610;
|
|
817
|
+
readonly toolbox_near_no_account: 90611;
|
|
818
|
+
readonly toolbox_near_invalid_gas_params: 90612;
|
|
819
|
+
readonly toolbox_near_no_public_key_found: 90613;
|
|
820
|
+
/**
|
|
821
|
+
* Toolboxes - SUI
|
|
822
|
+
*/
|
|
823
|
+
readonly toolbox_sui_address_required: 90701;
|
|
824
|
+
readonly toolbox_sui_keypair_required: 90702;
|
|
825
|
+
readonly toolbox_sui_balance_error: 90703;
|
|
826
|
+
readonly toolbox_sui_transaction_creation_error: 90704;
|
|
827
|
+
readonly toolbox_sui_signing_error: 90705;
|
|
828
|
+
readonly toolbox_sui_broadcast_error: 90706;
|
|
829
|
+
readonly toolbox_sui_no_signer: 90707;
|
|
830
|
+
readonly toolbox_sui_no_sender: 90708;
|
|
831
|
+
/**
|
|
832
|
+
* Toolboxes - General
|
|
833
|
+
*/
|
|
834
|
+
readonly toolbox_not_supported: 59901;
|
|
835
|
+
/**
|
|
836
|
+
* NEAR Plugin
|
|
837
|
+
*/
|
|
838
|
+
readonly plugin_near_invalid_name: 41001;
|
|
839
|
+
readonly plugin_near_no_connection: 41002;
|
|
840
|
+
readonly plugin_near_name_unavailable: 41003;
|
|
841
|
+
readonly plugin_near_registration_failed: 41004;
|
|
842
|
+
readonly plugin_near_transfer_failed: 41005;
|
|
843
|
+
/**
|
|
844
|
+
* Garden Plugin
|
|
845
|
+
*/
|
|
846
|
+
readonly plugin_garden_missing_data: 42001;
|
|
847
|
+
/**
|
|
848
|
+
* SwapKit API
|
|
849
|
+
*/
|
|
850
|
+
readonly api_v2_invalid_response: 60001;
|
|
851
|
+
readonly api_v2_server_error: 60002;
|
|
852
|
+
readonly api_v2_invalid_method_key_hash: 60003;
|
|
853
|
+
/**
|
|
854
|
+
* Helpers
|
|
855
|
+
*/
|
|
856
|
+
readonly helpers_invalid_number_different_decimals: 70001;
|
|
857
|
+
readonly helpers_invalid_number_of_years: 70002;
|
|
858
|
+
readonly helpers_invalid_identifier: 70003;
|
|
859
|
+
readonly helpers_invalid_asset_url: 70004;
|
|
860
|
+
readonly helpers_invalid_asset_identifier: 70005;
|
|
861
|
+
readonly helpers_invalid_memo_type: 70006;
|
|
862
|
+
readonly helpers_failed_to_switch_network: 70007;
|
|
863
|
+
readonly helpers_not_found_provider: 70008;
|
|
864
|
+
readonly helpers_chain_not_supported: 70009;
|
|
865
|
+
readonly helpers_invalid_params: 70010;
|
|
866
|
+
readonly helpers_invalid_response: 70011;
|
|
867
|
+
readonly helpers_chain_no_public_or_set_rpc_url: 70012;
|
|
868
|
+
/**
|
|
869
|
+
* Anything else
|
|
870
|
+
*/
|
|
871
|
+
readonly not_implemented: 99999;
|
|
872
|
+
};
|
|
873
|
+
constructor(errorOrErrorKey: ErrorKeys | {
|
|
874
|
+
errorKey: ErrorKeys;
|
|
875
|
+
info?: Record<string, any>;
|
|
876
|
+
}, sourceErrorOrInfo?: any);
|
|
877
|
+
}
|
|
878
|
+
export {};
|
|
879
|
+
//# sourceMappingURL=uSwapError.d.ts.map
|