@circle-fin/app-kit 1.4.1 → 1.5.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/CHANGELOG.md +19 -0
- package/README.md +3 -3
- package/chains.cjs +198 -2
- package/chains.d.ts +6 -2
- package/chains.mjs +198 -2
- package/index.cjs +1040 -221
- package/index.d.ts +326 -2
- package/index.mjs +1040 -221
- package/package.json +5 -5
package/index.d.ts
CHANGED
|
@@ -667,6 +667,8 @@ declare enum Blockchain {
|
|
|
667
667
|
Hedera_Testnet = "Hedera_Testnet",
|
|
668
668
|
HyperEVM = "HyperEVM",
|
|
669
669
|
HyperEVM_Testnet = "HyperEVM_Testnet",
|
|
670
|
+
Injective = "Injective",
|
|
671
|
+
Injective_Testnet = "Injective_Testnet",
|
|
670
672
|
Ink = "Ink",
|
|
671
673
|
Ink_Testnet = "Ink_Testnet",
|
|
672
674
|
Linea = "Linea",
|
|
@@ -681,6 +683,8 @@ declare enum Blockchain {
|
|
|
681
683
|
Noble_Testnet = "Noble_Testnet",
|
|
682
684
|
Optimism = "Optimism",
|
|
683
685
|
Optimism_Sepolia = "Optimism_Sepolia",
|
|
686
|
+
Pharos = "Pharos",
|
|
687
|
+
Pharos_Testnet = "Pharos_Testnet",
|
|
684
688
|
Polkadot_Asset_Hub = "Polkadot_Asset_Hub",
|
|
685
689
|
Polkadot_Westmint = "Polkadot_Westmint",
|
|
686
690
|
Plume = "Plume",
|
|
@@ -899,11 +903,13 @@ declare enum BridgeChain {
|
|
|
899
903
|
Edge = "Edge",
|
|
900
904
|
Ethereum = "Ethereum",
|
|
901
905
|
HyperEVM = "HyperEVM",
|
|
906
|
+
Injective = "Injective",
|
|
902
907
|
Ink = "Ink",
|
|
903
908
|
Linea = "Linea",
|
|
904
909
|
Monad = "Monad",
|
|
905
910
|
Morph = "Morph",
|
|
906
911
|
Optimism = "Optimism",
|
|
912
|
+
Pharos = "Pharos",
|
|
907
913
|
Plume = "Plume",
|
|
908
914
|
Polygon = "Polygon",
|
|
909
915
|
Sei = "Sei",
|
|
@@ -920,11 +926,13 @@ declare enum BridgeChain {
|
|
|
920
926
|
Edge_Testnet = "Edge_Testnet",
|
|
921
927
|
Ethereum_Sepolia = "Ethereum_Sepolia",
|
|
922
928
|
HyperEVM_Testnet = "HyperEVM_Testnet",
|
|
929
|
+
Injective_Testnet = "Injective_Testnet",
|
|
923
930
|
Ink_Testnet = "Ink_Testnet",
|
|
924
931
|
Linea_Sepolia = "Linea_Sepolia",
|
|
925
932
|
Monad_Testnet = "Monad_Testnet",
|
|
926
933
|
Morph_Testnet = "Morph_Testnet",
|
|
927
934
|
Optimism_Sepolia = "Optimism_Sepolia",
|
|
935
|
+
Pharos_Testnet = "Pharos_Testnet",
|
|
928
936
|
Plume_Testnet = "Plume_Testnet",
|
|
929
937
|
Polygon_Amoy_Testnet = "Polygon_Amoy_Testnet",
|
|
930
938
|
Sei_Testnet = "Sei_Testnet",
|
|
@@ -2129,6 +2137,98 @@ declare const HyperEVMTestnet: {
|
|
|
2129
2137
|
};
|
|
2130
2138
|
};
|
|
2131
2139
|
|
|
2140
|
+
/**
|
|
2141
|
+
* Injective Mainnet chain definition
|
|
2142
|
+
* @remarks
|
|
2143
|
+
* This represents the official production network for the Injective blockchain.
|
|
2144
|
+
* Injective is a high-performance, interoperable Layer-1 blockchain built for
|
|
2145
|
+
* finance, with an EVM execution layer on top of a Cosmos SDK base and
|
|
2146
|
+
* sub-second block finality.
|
|
2147
|
+
*/
|
|
2148
|
+
declare const Injective: {
|
|
2149
|
+
readonly type: "evm";
|
|
2150
|
+
readonly chain: Blockchain.Injective;
|
|
2151
|
+
readonly name: "Injective";
|
|
2152
|
+
readonly title: "Injective Mainnet";
|
|
2153
|
+
readonly nativeCurrency: {
|
|
2154
|
+
readonly name: "Injective";
|
|
2155
|
+
readonly symbol: "INJ";
|
|
2156
|
+
readonly decimals: 18;
|
|
2157
|
+
};
|
|
2158
|
+
readonly chainId: 1776;
|
|
2159
|
+
readonly isTestnet: false;
|
|
2160
|
+
readonly explorerUrl: "https://injscan.com/transaction/{hash}";
|
|
2161
|
+
readonly rpcEndpoints: readonly ["https://sentry.evm-rpc.injective.network"];
|
|
2162
|
+
readonly eurcAddress: null;
|
|
2163
|
+
readonly usdcAddress: "0xa00C59fF5a080D2b954d0c75e46E22a0c371235a";
|
|
2164
|
+
readonly usdtAddress: null;
|
|
2165
|
+
readonly cctp: {
|
|
2166
|
+
readonly domain: 29;
|
|
2167
|
+
readonly contracts: {
|
|
2168
|
+
readonly v2: {
|
|
2169
|
+
readonly type: "split";
|
|
2170
|
+
readonly tokenMessenger: "0x28b5a0e9C621a5BadaA536219b3a228C8168cf5d";
|
|
2171
|
+
readonly messageTransmitter: "0x81D40F21F12A8F0E3252Bccb954D722d4c464B64";
|
|
2172
|
+
readonly confirmations: 1;
|
|
2173
|
+
readonly fastConfirmations: 1;
|
|
2174
|
+
};
|
|
2175
|
+
};
|
|
2176
|
+
readonly forwarderSupported: {
|
|
2177
|
+
readonly source: false;
|
|
2178
|
+
readonly destination: false;
|
|
2179
|
+
};
|
|
2180
|
+
};
|
|
2181
|
+
readonly kitContracts: {
|
|
2182
|
+
readonly bridge: "0xB3FA262d0fB521cc93bE83d87b322b8A23DAf3F0";
|
|
2183
|
+
};
|
|
2184
|
+
};
|
|
2185
|
+
|
|
2186
|
+
/**
|
|
2187
|
+
* Injective Testnet chain definition
|
|
2188
|
+
* @remarks
|
|
2189
|
+
* This represents the official test network for the Injective blockchain.
|
|
2190
|
+
* Injective is a high-performance, interoperable Layer-1 blockchain built for
|
|
2191
|
+
* finance, with an EVM execution layer on top of a Cosmos SDK base and
|
|
2192
|
+
* sub-second block finality.
|
|
2193
|
+
*/
|
|
2194
|
+
declare const InjectiveTestnet: {
|
|
2195
|
+
readonly type: "evm";
|
|
2196
|
+
readonly chain: Blockchain.Injective_Testnet;
|
|
2197
|
+
readonly name: "Injective Testnet";
|
|
2198
|
+
readonly title: "Injective Testnet";
|
|
2199
|
+
readonly nativeCurrency: {
|
|
2200
|
+
readonly name: "Injective";
|
|
2201
|
+
readonly symbol: "INJ";
|
|
2202
|
+
readonly decimals: 18;
|
|
2203
|
+
};
|
|
2204
|
+
readonly chainId: 1439;
|
|
2205
|
+
readonly isTestnet: true;
|
|
2206
|
+
readonly explorerUrl: "https://testnet.explorer.injective.network/transaction/{hash}";
|
|
2207
|
+
readonly rpcEndpoints: readonly ["https://k8s.testnet.json-rpc.injective.network"];
|
|
2208
|
+
readonly eurcAddress: null;
|
|
2209
|
+
readonly usdcAddress: "0x0C382e685bbeeFE5d3d9C29e29E341fEE8E84C5d";
|
|
2210
|
+
readonly usdtAddress: null;
|
|
2211
|
+
readonly cctp: {
|
|
2212
|
+
readonly domain: 29;
|
|
2213
|
+
readonly contracts: {
|
|
2214
|
+
readonly v2: {
|
|
2215
|
+
readonly type: "split";
|
|
2216
|
+
readonly tokenMessenger: "0x8FE6B999Dc680CcFDD5Bf7EB0974218be2542DAA";
|
|
2217
|
+
readonly messageTransmitter: "0xE737e5cEBEEBa77EFE34D4aa090756590b1CE275";
|
|
2218
|
+
readonly confirmations: 1;
|
|
2219
|
+
readonly fastConfirmations: 1;
|
|
2220
|
+
};
|
|
2221
|
+
};
|
|
2222
|
+
readonly forwarderSupported: {
|
|
2223
|
+
readonly source: false;
|
|
2224
|
+
readonly destination: false;
|
|
2225
|
+
};
|
|
2226
|
+
};
|
|
2227
|
+
readonly kitContracts: {
|
|
2228
|
+
readonly bridge: "0xC5567a5E3370d4DBfB0540025078e283e36A363d";
|
|
2229
|
+
};
|
|
2230
|
+
};
|
|
2231
|
+
|
|
2132
2232
|
/**
|
|
2133
2233
|
* Ink Mainnet chain definition
|
|
2134
2234
|
* @remarks
|
|
@@ -2732,6 +2832,96 @@ declare const OptimismSepolia: {
|
|
|
2732
2832
|
};
|
|
2733
2833
|
};
|
|
2734
2834
|
|
|
2835
|
+
/**
|
|
2836
|
+
* Pharos Mainnet chain definition
|
|
2837
|
+
* @remarks
|
|
2838
|
+
* This represents the official production network for the Pharos blockchain.
|
|
2839
|
+
* Pharos is a modular, full-stack parallel Layer 1 blockchain with
|
|
2840
|
+
* sub-second finality and EVM compatibility.
|
|
2841
|
+
*/
|
|
2842
|
+
declare const Pharos: {
|
|
2843
|
+
readonly type: "evm";
|
|
2844
|
+
readonly chain: Blockchain.Pharos;
|
|
2845
|
+
readonly name: "Pharos";
|
|
2846
|
+
readonly title: "Pharos Mainnet";
|
|
2847
|
+
readonly nativeCurrency: {
|
|
2848
|
+
readonly name: "Pharos";
|
|
2849
|
+
readonly symbol: "PHAROS";
|
|
2850
|
+
readonly decimals: 18;
|
|
2851
|
+
};
|
|
2852
|
+
readonly chainId: 1672;
|
|
2853
|
+
readonly isTestnet: false;
|
|
2854
|
+
readonly explorerUrl: "https://pharos.socialscan.io/tx/{hash}";
|
|
2855
|
+
readonly rpcEndpoints: readonly ["https://rpc.pharos.xyz"];
|
|
2856
|
+
readonly eurcAddress: null;
|
|
2857
|
+
readonly usdcAddress: "0xC879C018dB60520F4355C26eD1a6D572cdAC1815";
|
|
2858
|
+
readonly usdtAddress: null;
|
|
2859
|
+
readonly cctp: {
|
|
2860
|
+
readonly domain: 31;
|
|
2861
|
+
readonly contracts: {
|
|
2862
|
+
readonly v2: {
|
|
2863
|
+
readonly type: "split";
|
|
2864
|
+
readonly tokenMessenger: "0x28b5a0e9C621a5BadaA536219b3a228C8168cf5d";
|
|
2865
|
+
readonly messageTransmitter: "0x81D40F21F12A8F0E3252Bccb954D722d4c464B64";
|
|
2866
|
+
readonly confirmations: 1;
|
|
2867
|
+
readonly fastConfirmations: 1;
|
|
2868
|
+
};
|
|
2869
|
+
};
|
|
2870
|
+
readonly forwarderSupported: {
|
|
2871
|
+
readonly source: false;
|
|
2872
|
+
readonly destination: false;
|
|
2873
|
+
};
|
|
2874
|
+
};
|
|
2875
|
+
readonly kitContracts: {
|
|
2876
|
+
readonly bridge: "0xB3FA262d0fB521cc93bE83d87b322b8A23DAf3F0";
|
|
2877
|
+
};
|
|
2878
|
+
};
|
|
2879
|
+
|
|
2880
|
+
/**
|
|
2881
|
+
* Pharos Atlantic Testnet chain definition
|
|
2882
|
+
* @remarks
|
|
2883
|
+
* This represents the official test network for the Pharos blockchain.
|
|
2884
|
+
* Pharos is a modular, full-stack parallel Layer 1 blockchain with
|
|
2885
|
+
* sub-second finality and EVM compatibility.
|
|
2886
|
+
*/
|
|
2887
|
+
declare const PharosTestnet: {
|
|
2888
|
+
readonly type: "evm";
|
|
2889
|
+
readonly chain: Blockchain.Pharos_Testnet;
|
|
2890
|
+
readonly name: "Pharos Atlantic";
|
|
2891
|
+
readonly title: "Pharos Atlantic Testnet";
|
|
2892
|
+
readonly nativeCurrency: {
|
|
2893
|
+
readonly name: "Pharos";
|
|
2894
|
+
readonly symbol: "PHAROS";
|
|
2895
|
+
readonly decimals: 18;
|
|
2896
|
+
};
|
|
2897
|
+
readonly chainId: 688689;
|
|
2898
|
+
readonly isTestnet: true;
|
|
2899
|
+
readonly explorerUrl: "https://atlantic.pharosscan.xyz/tx/{hash}";
|
|
2900
|
+
readonly rpcEndpoints: readonly ["https://atlantic.dplabs-internal.com"];
|
|
2901
|
+
readonly eurcAddress: null;
|
|
2902
|
+
readonly usdcAddress: "0xcfC8330f4BCAB529c625D12781b1C19466A9Fc8B";
|
|
2903
|
+
readonly usdtAddress: null;
|
|
2904
|
+
readonly cctp: {
|
|
2905
|
+
readonly domain: 31;
|
|
2906
|
+
readonly contracts: {
|
|
2907
|
+
readonly v2: {
|
|
2908
|
+
readonly type: "split";
|
|
2909
|
+
readonly tokenMessenger: "0x8FE6B999Dc680CcFDD5Bf7EB0974218be2542DAA";
|
|
2910
|
+
readonly messageTransmitter: "0xE737e5cEBEEBa77EFE34D4aa090756590b1CE275";
|
|
2911
|
+
readonly confirmations: 1;
|
|
2912
|
+
readonly fastConfirmations: 1;
|
|
2913
|
+
};
|
|
2914
|
+
};
|
|
2915
|
+
readonly forwarderSupported: {
|
|
2916
|
+
readonly source: false;
|
|
2917
|
+
readonly destination: false;
|
|
2918
|
+
};
|
|
2919
|
+
};
|
|
2920
|
+
readonly kitContracts: {
|
|
2921
|
+
readonly bridge: "0xC5567a5E3370d4DBfB0540025078e283e36A363d";
|
|
2922
|
+
};
|
|
2923
|
+
};
|
|
2924
|
+
|
|
2735
2925
|
/**
|
|
2736
2926
|
* Plume Mainnet chain definition
|
|
2737
2927
|
* @remarks
|
|
@@ -3014,7 +3204,7 @@ declare const Sei: {
|
|
|
3014
3204
|
};
|
|
3015
3205
|
readonly chainId: 1329;
|
|
3016
3206
|
readonly isTestnet: false;
|
|
3017
|
-
readonly explorerUrl: "https://
|
|
3207
|
+
readonly explorerUrl: "https://seiscan.io/tx/{hash}";
|
|
3018
3208
|
readonly rpcEndpoints: readonly ["https://evm-rpc.sei-apis.com"];
|
|
3019
3209
|
readonly eurcAddress: null;
|
|
3020
3210
|
readonly usdcAddress: "0xe15fC38F6D8c56aF07bbCBe3BAf5708A2Bf42392";
|
|
@@ -3072,7 +3262,7 @@ declare const SeiTestnet: {
|
|
|
3072
3262
|
};
|
|
3073
3263
|
readonly chainId: 1328;
|
|
3074
3264
|
readonly isTestnet: true;
|
|
3075
|
-
readonly explorerUrl: "https://
|
|
3265
|
+
readonly explorerUrl: "https://testnet.seiscan.io/tx/{hash}";
|
|
3076
3266
|
readonly rpcEndpoints: readonly ["https://evm-rpc-testnet.sei-apis.com"];
|
|
3077
3267
|
readonly eurcAddress: null;
|
|
3078
3268
|
readonly usdcAddress: "0x4fCF1784B31630811181f670Aea7A7bEF803eaED";
|
|
@@ -3870,6 +4060,8 @@ declare const Chains_Hedera: typeof Hedera;
|
|
|
3870
4060
|
declare const Chains_HederaTestnet: typeof HederaTestnet;
|
|
3871
4061
|
declare const Chains_HyperEVM: typeof HyperEVM;
|
|
3872
4062
|
declare const Chains_HyperEVMTestnet: typeof HyperEVMTestnet;
|
|
4063
|
+
declare const Chains_Injective: typeof Injective;
|
|
4064
|
+
declare const Chains_InjectiveTestnet: typeof InjectiveTestnet;
|
|
3873
4065
|
declare const Chains_Ink: typeof Ink;
|
|
3874
4066
|
declare const Chains_InkTestnet: typeof InkTestnet;
|
|
3875
4067
|
declare const Chains_Linea: typeof Linea;
|
|
@@ -3884,6 +4076,8 @@ declare const Chains_Noble: typeof Noble;
|
|
|
3884
4076
|
declare const Chains_NobleTestnet: typeof NobleTestnet;
|
|
3885
4077
|
declare const Chains_Optimism: typeof Optimism;
|
|
3886
4078
|
declare const Chains_OptimismSepolia: typeof OptimismSepolia;
|
|
4079
|
+
declare const Chains_Pharos: typeof Pharos;
|
|
4080
|
+
declare const Chains_PharosTestnet: typeof PharosTestnet;
|
|
3887
4081
|
declare const Chains_Plume: typeof Plume;
|
|
3888
4082
|
declare const Chains_PlumeTestnet: typeof PlumeTestnet;
|
|
3889
4083
|
declare const Chains_PolkadotAssetHub: typeof PolkadotAssetHub;
|
|
@@ -3933,6 +4127,8 @@ declare namespace Chains {
|
|
|
3933
4127
|
Chains_HederaTestnet as HederaTestnet,
|
|
3934
4128
|
Chains_HyperEVM as HyperEVM,
|
|
3935
4129
|
Chains_HyperEVMTestnet as HyperEVMTestnet,
|
|
4130
|
+
Chains_Injective as Injective,
|
|
4131
|
+
Chains_InjectiveTestnet as InjectiveTestnet,
|
|
3936
4132
|
Chains_Ink as Ink,
|
|
3937
4133
|
Chains_InkTestnet as InkTestnet,
|
|
3938
4134
|
Chains_Linea as Linea,
|
|
@@ -3947,6 +4143,8 @@ declare namespace Chains {
|
|
|
3947
4143
|
Chains_NobleTestnet as NobleTestnet,
|
|
3948
4144
|
Chains_Optimism as Optimism,
|
|
3949
4145
|
Chains_OptimismSepolia as OptimismSepolia,
|
|
4146
|
+
Chains_Pharos as Pharos,
|
|
4147
|
+
Chains_PharosTestnet as PharosTestnet,
|
|
3950
4148
|
Chains_Plume as Plume,
|
|
3951
4149
|
Chains_PlumeTestnet as PlumeTestnet,
|
|
3952
4150
|
Chains_PolkadotAssetHub as PolkadotAssetHub,
|
|
@@ -7016,6 +7214,7 @@ declare module './types' {
|
|
|
7016
7214
|
POL: true;
|
|
7017
7215
|
PLUME: true;
|
|
7018
7216
|
MON: true;
|
|
7217
|
+
cirBTC: true;
|
|
7019
7218
|
}
|
|
7020
7219
|
}
|
|
7021
7220
|
|
|
@@ -9224,6 +9423,63 @@ TChainDefinition extends ChainDefinition = ChainDefinition> {
|
|
|
9224
9423
|
*/
|
|
9225
9424
|
invocationMeta?: InvocationMeta;
|
|
9226
9425
|
}
|
|
9426
|
+
/**
|
|
9427
|
+
* Machine-readable classification of a {@link BridgeStep} error.
|
|
9428
|
+
*
|
|
9429
|
+
* Consumers may use this field for UX decisions (e.g. distinguish a user
|
|
9430
|
+
* rejection from a wallet capability error) without string-matching on
|
|
9431
|
+
* {@link BridgeStep.errorMessage}. The original human-readable error
|
|
9432
|
+
* message is always preserved for display/logging.
|
|
9433
|
+
*
|
|
9434
|
+
* @remarks
|
|
9435
|
+
* The categories map to the most common failure shapes observed across
|
|
9436
|
+
* the EIP-5792 batched bridge path and the sequential bridge path:
|
|
9437
|
+
*
|
|
9438
|
+
* - `user_rejected` — user declined a wallet request (JSON-RPC `4001`).
|
|
9439
|
+
* - `atomic_unsupported` — wallet reported it cannot perform EIP-5792
|
|
9440
|
+
* atomic batching on this chain. Covers JSON-RPC `5700` (unsupported
|
|
9441
|
+
* capabilities), `5710` (chain not supported for the requested
|
|
9442
|
+
* capability), and `5750` (atomicity requires a wallet upgrade which
|
|
9443
|
+
* the user declined), or equivalent viem-wrapped messages.
|
|
9444
|
+
* - `batch_too_large` — wallet rejected the batch for exceeding its
|
|
9445
|
+
* size limit (JSON-RPC `5740`).
|
|
9446
|
+
* - `duplicate_batch_id` — wallet reported a duplicate batchId
|
|
9447
|
+
* (JSON-RPC `5720`).
|
|
9448
|
+
* - `unknown_bundle` — wallet reported an unknown bundle id during
|
|
9449
|
+
* status polling (JSON-RPC `5730`).
|
|
9450
|
+
* - `polling_timeout` — SDK polled `wallet_getCallsStatus` until the
|
|
9451
|
+
* configured timeout without receiving a terminal status.
|
|
9452
|
+
* - `failed_offchain` — wallet reported EIP-5792 `statusCode: 400`
|
|
9453
|
+
* (batch not included onchain, wallet will not retry).
|
|
9454
|
+
* - `reverted_onchain` — wallet reported EIP-5792 `statusCode: 500`
|
|
9455
|
+
* (batch reverted completely onchain).
|
|
9456
|
+
* - `partial_reverted` — wallet reported EIP-5792 `statusCode: 600`
|
|
9457
|
+
* (batch reverted partially onchain).
|
|
9458
|
+
* - `chain_revert` — transaction was mined but reverted on-chain
|
|
9459
|
+
* (sequential path).
|
|
9460
|
+
* - `unknown` — error did not match any of the above categories.
|
|
9461
|
+
*
|
|
9462
|
+
* @since 2.0.0
|
|
9463
|
+
*
|
|
9464
|
+
* @example
|
|
9465
|
+
* ```typescript
|
|
9466
|
+
* import type { BridgeStep } from '@core/provider'
|
|
9467
|
+
*
|
|
9468
|
+
* const step: BridgeStep = {
|
|
9469
|
+
* name: 'approve',
|
|
9470
|
+
* state: 'error',
|
|
9471
|
+
* errorMessage: 'User rejected the request',
|
|
9472
|
+
* errorCategory: 'user_rejected',
|
|
9473
|
+
* }
|
|
9474
|
+
*
|
|
9475
|
+
* if (step.errorCategory === 'user_rejected') {
|
|
9476
|
+
* // silent abort: user intentionally cancelled
|
|
9477
|
+
* } else if (step.errorCategory === 'atomic_unsupported') {
|
|
9478
|
+
* // hint the user about switching to step-by-step signing
|
|
9479
|
+
* }
|
|
9480
|
+
* ```
|
|
9481
|
+
*/
|
|
9482
|
+
type BridgeStepErrorCategory = 'user_rejected' | 'atomic_unsupported' | 'batch_too_large' | 'duplicate_batch_id' | 'unknown_bundle' | 'polling_timeout' | 'failed_offchain' | 'reverted_onchain' | 'partial_reverted' | 'chain_revert' | 'unknown';
|
|
9227
9483
|
/**
|
|
9228
9484
|
* A step in the bridge process.
|
|
9229
9485
|
*
|
|
@@ -9280,6 +9536,21 @@ interface BridgeStep {
|
|
|
9280
9536
|
errorMessage?: string;
|
|
9281
9537
|
/** Optional raw error object (can be Viem/Ethers/Chain error) */
|
|
9282
9538
|
error?: unknown;
|
|
9539
|
+
/**
|
|
9540
|
+
* Optional machine-readable classification of the error.
|
|
9541
|
+
*
|
|
9542
|
+
* Present when the step is in `state: 'error'` and the SDK was able to
|
|
9543
|
+
* categorize the failure. See {@link BridgeStepErrorCategory} for the
|
|
9544
|
+
* list of categories and how they map to underlying error shapes.
|
|
9545
|
+
*
|
|
9546
|
+
* @remarks
|
|
9547
|
+
* The human-readable {@link errorMessage} is always preserved for
|
|
9548
|
+
* logging and display; this field is additive and should be preferred
|
|
9549
|
+
* over string-matching `errorMessage` for machine decisions.
|
|
9550
|
+
*
|
|
9551
|
+
* @since 2.0.0
|
|
9552
|
+
*/
|
|
9553
|
+
errorCategory?: BridgeStepErrorCategory;
|
|
9283
9554
|
}
|
|
9284
9555
|
/**
|
|
9285
9556
|
* Result object returned after a successful cross-chain bridge operation.
|
|
@@ -11289,6 +11560,15 @@ interface BridgeKitConfig<TExtraProviders extends FlexibleBridgingProvider[] = [
|
|
|
11289
11560
|
* the appropriate provider based on order and the transfer parameters.
|
|
11290
11561
|
*/
|
|
11291
11562
|
providers?: TExtraProviders;
|
|
11563
|
+
/**
|
|
11564
|
+
* Disable error telemetry.
|
|
11565
|
+
*
|
|
11566
|
+
* When `true`, the SDK will not POST error details to the telemetry
|
|
11567
|
+
* endpoint when public methods throw. Defaults to `false` (enabled).
|
|
11568
|
+
*
|
|
11569
|
+
* @defaultValue false
|
|
11570
|
+
*/
|
|
11571
|
+
disableErrorReporting?: boolean;
|
|
11292
11572
|
}
|
|
11293
11573
|
/**
|
|
11294
11574
|
* Merges action types from multiple bridging providers into a unified action map.
|
|
@@ -11443,6 +11723,10 @@ declare class BridgeKit<TExtraProviders extends FlexibleBridgingProvider[] = []>
|
|
|
11443
11723
|
* A custom fee policy for the kit.
|
|
11444
11724
|
*/
|
|
11445
11725
|
customFeePolicy: CustomFeePolicy$2 | undefined;
|
|
11726
|
+
/** Whether error telemetry is disabled. */
|
|
11727
|
+
private readonly disableErrorReporting;
|
|
11728
|
+
/** Per-kit telemetry identity for shared helpers. */
|
|
11729
|
+
private readonly telemetryConfig;
|
|
11446
11730
|
/**
|
|
11447
11731
|
* Create a new BridgeKit instance.
|
|
11448
11732
|
*
|
|
@@ -13292,6 +13576,15 @@ interface SwapKitConfig<TExtraProviders extends FlexibleSwappingProvider[] = []>
|
|
|
13292
13576
|
* for all swaps executed through the created context.
|
|
13293
13577
|
*/
|
|
13294
13578
|
customFeePolicy?: CustomFeePolicy$1;
|
|
13579
|
+
/**
|
|
13580
|
+
* Disable error telemetry.
|
|
13581
|
+
*
|
|
13582
|
+
* When `true`, the SDK will not POST error details to the telemetry
|
|
13583
|
+
* endpoint when public methods throw. Defaults to `false` (enabled).
|
|
13584
|
+
*
|
|
13585
|
+
* @defaultValue false
|
|
13586
|
+
*/
|
|
13587
|
+
disableErrorReporting?: boolean;
|
|
13295
13588
|
}
|
|
13296
13589
|
|
|
13297
13590
|
/**
|
|
@@ -15024,6 +15317,16 @@ interface AppKitContext {
|
|
|
15024
15317
|
* ```
|
|
15025
15318
|
*/
|
|
15026
15319
|
actions: Record<'bridge', Record<string, ((payload: unknown) => void)[]>>;
|
|
15320
|
+
/**
|
|
15321
|
+
* Disable error telemetry for all sub-kits.
|
|
15322
|
+
*
|
|
15323
|
+
* When `true`, none of the underlying kits (BridgeKit, SwapKit,
|
|
15324
|
+
* UnifiedBalanceKit) will POST error details to the telemetry
|
|
15325
|
+
* endpoint when operations throw. Defaults to `false` (enabled).
|
|
15326
|
+
*
|
|
15327
|
+
* @defaultValue false
|
|
15328
|
+
*/
|
|
15329
|
+
disableErrorReporting?: boolean;
|
|
15027
15330
|
}
|
|
15028
15331
|
/**
|
|
15029
15332
|
* Type for event handler functions that can be registered with the AppKit.
|
|
@@ -15818,6 +16121,18 @@ interface UnifiedBalanceKitConfig<TExtraProviders extends FlexibleGatewayProvide
|
|
|
15818
16121
|
* @defaultValue false
|
|
15819
16122
|
*/
|
|
15820
16123
|
disableAnalytics?: boolean;
|
|
16124
|
+
/**
|
|
16125
|
+
* Disable error telemetry.
|
|
16126
|
+
*
|
|
16127
|
+
* When `true`, the SDK will not POST error details to the telemetry
|
|
16128
|
+
* endpoint when public methods throw. Defaults to `false` (enabled).
|
|
16129
|
+
*
|
|
16130
|
+
* @remarks
|
|
16131
|
+
* Only applies to the class-based API (`new UnifiedBalanceKit()`).
|
|
16132
|
+
*
|
|
16133
|
+
* @defaultValue false
|
|
16134
|
+
*/
|
|
16135
|
+
disableErrorReporting?: boolean;
|
|
15821
16136
|
}
|
|
15822
16137
|
|
|
15823
16138
|
/**
|
|
@@ -16896,6 +17211,15 @@ type AppKitConfig = CreateContextParams & {
|
|
|
16896
17211
|
developerFee?: Partial<DeveloperFeeHooks>;
|
|
16897
17212
|
/** Optional config forwarded to the underlying {@link UnifiedBalanceKit}. */
|
|
16898
17213
|
unifiedBalance?: UnifiedBalanceKitConfig;
|
|
17214
|
+
/**
|
|
17215
|
+
* Disable error telemetry for all underlying kits.
|
|
17216
|
+
*
|
|
17217
|
+
* When `true`, BridgeKit, SwapKit, and UnifiedBalanceKit will not
|
|
17218
|
+
* POST error details to the telemetry endpoint. Defaults to `false`.
|
|
17219
|
+
*
|
|
17220
|
+
* @defaultValue false
|
|
17221
|
+
*/
|
|
17222
|
+
disableErrorReporting?: boolean;
|
|
16899
17223
|
};
|
|
16900
17224
|
/**
|
|
16901
17225
|
* A high-level SDK for stablecoin operations, including bridging and swapping.
|