@swapkit/api-sdk-typescript 5.1.1 → 5.1.2-nightly.20260904041036
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/index.d.cts +245 -4
- package/dist/index.d.ts +245 -4
- package/package.json +1 -1
- package/src/types.ts +245 -3
package/dist/index.d.cts
CHANGED
|
@@ -763,6 +763,247 @@ type TrackTransactionResponse = {
|
|
|
763
763
|
};
|
|
764
764
|
}>;
|
|
765
765
|
};
|
|
766
|
+
type TrackLedgerSwapResponse = {
|
|
767
|
+
ledgerSwap: {
|
|
768
|
+
swapId: string;
|
|
769
|
+
/**
|
|
770
|
+
* Last persisted Ledger status. e.g. `READY`, `PENDING`, `FINISHED`
|
|
771
|
+
*/
|
|
772
|
+
status: string;
|
|
773
|
+
/**
|
|
774
|
+
* Provider that quoted the swap. e.g. `NEAR`
|
|
775
|
+
*/
|
|
776
|
+
provider?: string;
|
|
777
|
+
/**
|
|
778
|
+
* ISO-8601 timestamp of when the swap payload was built
|
|
779
|
+
*/
|
|
780
|
+
createdAt: string;
|
|
781
|
+
fromAsset: string;
|
|
782
|
+
toAsset: string;
|
|
783
|
+
fromAmount: string;
|
|
784
|
+
expectedAmountTo?: string;
|
|
785
|
+
/**
|
|
786
|
+
* Deposit address the end user was instructed to fund
|
|
787
|
+
*/
|
|
788
|
+
payinAddress: string;
|
|
789
|
+
payinTransactionId?: string;
|
|
790
|
+
payoutTransactionId?: string;
|
|
791
|
+
providerFees: string;
|
|
792
|
+
referralFees: string;
|
|
793
|
+
payoutNetworkFees: string;
|
|
794
|
+
};
|
|
795
|
+
transaction?: {
|
|
796
|
+
chainId: '36900' | 'aleo' | 'aptos' | '42161' | '1313161554' | '43114' | '8453' | '80094' | '56' | 'bitcoin' | 'bitcoincash' | '3637' | 'cardano' | 'chainflip' | '1116' | '21000000' | 'cosmoshub-4' | '25' | 'dash' | 'dogecoin' | '1' | '100' | 'harbor-1' | 'harbor-stagenet-1' | '999' | 'hype' | 'kaiyo-1' | 'litecoin' | '59144' | 'mayachain-mainnet-v1' | 'mayachain-stagenet-v1' | '4326' | '143' | 'near' | 'noble-1' | '10' | '9745' | 'polkadot' | '137' | 'radix-mainnet' | 'ripple' | '4663' | 'solana' | '146' | 'spark' | 'stellar' | '0x534e5f4d41494e' | 'sui' | 'thorchain-1' | 'thorchain-stagenet-v2' | 'ton' | '728126428' | '130' | '196' | 'zcash';
|
|
797
|
+
hash: string;
|
|
798
|
+
block: number;
|
|
799
|
+
type: 'approve' | 'claim' | 'deposit' | 'lending' | 'lp_action' | 'native_contract_call' | 'native_send' | 'stake' | 'unstake' | 'streaming_swap' | 'swap' | 'thorname_action' | 'token_contract_call' | 'token_transfer' | 'unknown' | 'donate';
|
|
800
|
+
status: 'unknown' | 'not_started' | 'pending' | 'swapping' | 'completed' | 'refunded' | 'failed';
|
|
801
|
+
trackingStatus?: 'not_started' | 'starting' | 'broadcasted' | 'mempool' | 'inbound' | 'outbound' | 'swapping' | 'completed' | 'refunded' | 'partially_refunded' | 'dropped' | 'reverted' | 'replaced' | 'retries_exceeded' | 'parsing_error';
|
|
802
|
+
fromAsset: string;
|
|
803
|
+
fromAmount: string;
|
|
804
|
+
fromAddress: string;
|
|
805
|
+
toAsset: string;
|
|
806
|
+
toAmount: string;
|
|
807
|
+
toAddress: string;
|
|
808
|
+
finalAsset?: {
|
|
809
|
+
chain: 'ADI' | 'ALEO' | 'APT' | 'ARB' | 'AURORA' | 'AVAX' | 'BASE' | 'BERA' | 'BSC' | 'BTC' | 'BCH' | 'BOTANIX' | 'ADA' | 'FLIP' | 'CORE' | 'CORN' | 'GAIA' | 'CRO' | 'DASH' | 'DOGE' | 'ETH' | 'GNO' | 'HARBOR' | 'HYPEREVM' | 'HYPE' | 'KUJI' | 'LTC' | 'LINEA' | 'MAYA' | 'MEGAETH' | 'MONAD' | 'NEAR' | 'NOBLE' | 'OP' | 'XPL' | 'DOT' | 'POL' | 'XRD' | 'XRP' | 'HOOD' | 'SOL' | 'SONIC' | 'SPARK' | 'XLM' | 'STRK' | 'SUI' | 'THOR' | 'TON' | 'TRON' | 'UNI' | 'XLAYER' | 'ZEC';
|
|
810
|
+
symbol: string;
|
|
811
|
+
ticker: string;
|
|
812
|
+
decimal?: number;
|
|
813
|
+
address?: string;
|
|
814
|
+
isGasAsset: boolean;
|
|
815
|
+
isSynthetic: boolean;
|
|
816
|
+
tax?: {
|
|
817
|
+
buy: number;
|
|
818
|
+
sell: number;
|
|
819
|
+
};
|
|
820
|
+
};
|
|
821
|
+
finalAddress?: string;
|
|
822
|
+
finalisedAt: number;
|
|
823
|
+
/**
|
|
824
|
+
* Slippage tolerance from the original quote, in basis points
|
|
825
|
+
*/
|
|
826
|
+
slippageTolerance?: number;
|
|
827
|
+
/**
|
|
828
|
+
* Realized slippage of the settled output vs the quoted expected output, in basis points. Positive means the swap settled for less than quoted
|
|
829
|
+
*/
|
|
830
|
+
realizedSlippageBps?: number;
|
|
831
|
+
transient?: {
|
|
832
|
+
estimatedTimeToComplete: number;
|
|
833
|
+
currentLegIndex?: number;
|
|
834
|
+
estimates?: {
|
|
835
|
+
inboundObservation: number;
|
|
836
|
+
inboundConfirmation: number;
|
|
837
|
+
streamingSwap: number;
|
|
838
|
+
outboundDelay: number;
|
|
839
|
+
outboundObservation: number;
|
|
840
|
+
currentStage: string;
|
|
841
|
+
};
|
|
842
|
+
providerDetails?: {
|
|
843
|
+
streamingDetails?: {
|
|
844
|
+
quantity?: number;
|
|
845
|
+
count?: number;
|
|
846
|
+
interval?: number;
|
|
847
|
+
subSwapsMap?: Array<number>;
|
|
848
|
+
};
|
|
849
|
+
depositChannelId?: string;
|
|
850
|
+
depositAddress?: string;
|
|
851
|
+
};
|
|
852
|
+
};
|
|
853
|
+
meta?: {
|
|
854
|
+
broadcastedAt?: number;
|
|
855
|
+
wallet?: string;
|
|
856
|
+
quoteId?: string;
|
|
857
|
+
explorerUrl?: string;
|
|
858
|
+
providerExplorerUrl?: string;
|
|
859
|
+
affiliate?: string;
|
|
860
|
+
fees?: Array<{
|
|
861
|
+
type: 'liquidity' | 'network' | 'inbound' | 'outbound' | 'affiliate' | 'service' | 'tax' | 'priority';
|
|
862
|
+
amount: string;
|
|
863
|
+
amountBps?: number;
|
|
864
|
+
asset: string;
|
|
865
|
+
chain: string;
|
|
866
|
+
protocol: 'CHAINFLIP' | 'CHAINFLIP_STREAMING' | 'MAYACHAIN' | 'MAYACHAIN_STREAMING' | 'ONEINCH' | 'PANCAKESWAP' | 'SUSHISWAP_V2' | 'THORCHAIN' | 'THORCHAIN_STREAMING' | 'TRADERJOE_V2' | 'UNISWAP_V2' | 'UNISWAP_V3' | 'JUPITER' | 'OKX' | 'NEAR' | 'GARDEN' | 'HARBOR' | 'FLASHNET' | 'MAYAN' | 'PANGOLIN_V1' | 'CAVIAR_V1' | 'OPENOCEAN_V2' | 'OCISWAP_V1' | 'CAMELOT_V3';
|
|
867
|
+
}>;
|
|
868
|
+
amountInUsd?: string;
|
|
869
|
+
amountOutUsd?: string;
|
|
870
|
+
provider?: 'CHAINFLIP' | 'CHAINFLIP_STREAMING' | 'MAYACHAIN' | 'MAYACHAIN_STREAMING' | 'ONEINCH' | 'PANCAKESWAP' | 'SUSHISWAP_V2' | 'THORCHAIN' | 'THORCHAIN_STREAMING' | 'TRADERJOE_V2' | 'UNISWAP_V2' | 'UNISWAP_V3' | 'JUPITER' | 'OKX' | 'NEAR' | 'GARDEN' | 'HARBOR' | 'FLASHNET' | 'MAYAN' | 'PANGOLIN_V1' | 'CAVIAR_V1' | 'OPENOCEAN_V2' | 'OCISWAP_V1' | 'CAMELOT_V3';
|
|
871
|
+
providerAction?: 'swap' | 'aggregation' | 'addLiquidity' | 'withdrawLiquidity' | 'addSavers' | 'withdrawSavers' | 'borrow' | 'repay' | 'name' | 'donate' | 'claim' | 'stake' | 'unstake' | 'createOrder' | 'cancelOrder';
|
|
872
|
+
providerOrderId?: string;
|
|
873
|
+
images?: {
|
|
874
|
+
from?: string;
|
|
875
|
+
to?: string;
|
|
876
|
+
provider?: string;
|
|
877
|
+
chain?: string;
|
|
878
|
+
};
|
|
879
|
+
affiliateFees?: Array<{
|
|
880
|
+
affiliate: string;
|
|
881
|
+
bps: string;
|
|
882
|
+
isReferrer: boolean;
|
|
883
|
+
}>;
|
|
884
|
+
failReason?: string;
|
|
885
|
+
failTargetAddress?: string;
|
|
886
|
+
targetAddress?: string;
|
|
887
|
+
};
|
|
888
|
+
payload?: {
|
|
889
|
+
evmCalldata?: string;
|
|
890
|
+
evmValue?: string;
|
|
891
|
+
logs?: unknown;
|
|
892
|
+
memo?: string;
|
|
893
|
+
spender?: string;
|
|
894
|
+
manifest?: unknown;
|
|
895
|
+
intentHash?: string;
|
|
896
|
+
thorname?: string;
|
|
897
|
+
decodedPayload?: unknown;
|
|
898
|
+
};
|
|
899
|
+
legs: Array<{
|
|
900
|
+
chainId: '36900' | 'aleo' | 'aptos' | '42161' | '1313161554' | '43114' | '8453' | '80094' | '56' | 'bitcoin' | 'bitcoincash' | '3637' | 'cardano' | 'chainflip' | '1116' | '21000000' | 'cosmoshub-4' | '25' | 'dash' | 'dogecoin' | '1' | '100' | 'harbor-1' | 'harbor-stagenet-1' | '999' | 'hype' | 'kaiyo-1' | 'litecoin' | '59144' | 'mayachain-mainnet-v1' | 'mayachain-stagenet-v1' | '4326' | '143' | 'near' | 'noble-1' | '10' | '9745' | 'polkadot' | '137' | 'radix-mainnet' | 'ripple' | '4663' | 'solana' | '146' | 'spark' | 'stellar' | '0x534e5f4d41494e' | 'sui' | 'thorchain-1' | 'thorchain-stagenet-v2' | 'ton' | '728126428' | '130' | '196' | 'zcash';
|
|
901
|
+
hash: string;
|
|
902
|
+
block: number;
|
|
903
|
+
type: 'approve' | 'claim' | 'deposit' | 'lending' | 'lp_action' | 'native_contract_call' | 'native_send' | 'stake' | 'unstake' | 'streaming_swap' | 'swap' | 'thorname_action' | 'token_contract_call' | 'token_transfer' | 'unknown' | 'donate';
|
|
904
|
+
status: 'unknown' | 'not_started' | 'pending' | 'swapping' | 'completed' | 'refunded' | 'failed';
|
|
905
|
+
trackingStatus?: 'not_started' | 'starting' | 'broadcasted' | 'mempool' | 'inbound' | 'outbound' | 'swapping' | 'completed' | 'refunded' | 'partially_refunded' | 'dropped' | 'reverted' | 'replaced' | 'retries_exceeded' | 'parsing_error';
|
|
906
|
+
fromAsset: string;
|
|
907
|
+
fromAmount: string;
|
|
908
|
+
fromAddress: string;
|
|
909
|
+
toAsset: string;
|
|
910
|
+
toAmount: string;
|
|
911
|
+
toAddress: string;
|
|
912
|
+
finalAsset?: {
|
|
913
|
+
chain: 'ADI' | 'ALEO' | 'APT' | 'ARB' | 'AURORA' | 'AVAX' | 'BASE' | 'BERA' | 'BSC' | 'BTC' | 'BCH' | 'BOTANIX' | 'ADA' | 'FLIP' | 'CORE' | 'CORN' | 'GAIA' | 'CRO' | 'DASH' | 'DOGE' | 'ETH' | 'GNO' | 'HARBOR' | 'HYPEREVM' | 'HYPE' | 'KUJI' | 'LTC' | 'LINEA' | 'MAYA' | 'MEGAETH' | 'MONAD' | 'NEAR' | 'NOBLE' | 'OP' | 'XPL' | 'DOT' | 'POL' | 'XRD' | 'XRP' | 'HOOD' | 'SOL' | 'SONIC' | 'SPARK' | 'XLM' | 'STRK' | 'SUI' | 'THOR' | 'TON' | 'TRON' | 'UNI' | 'XLAYER' | 'ZEC';
|
|
914
|
+
symbol: string;
|
|
915
|
+
ticker: string;
|
|
916
|
+
decimal?: number;
|
|
917
|
+
address?: string;
|
|
918
|
+
isGasAsset: boolean;
|
|
919
|
+
isSynthetic: boolean;
|
|
920
|
+
tax?: {
|
|
921
|
+
buy: number;
|
|
922
|
+
sell: number;
|
|
923
|
+
};
|
|
924
|
+
};
|
|
925
|
+
finalAddress?: string;
|
|
926
|
+
finalisedAt: number;
|
|
927
|
+
/**
|
|
928
|
+
* Slippage tolerance from the original quote, in basis points
|
|
929
|
+
*/
|
|
930
|
+
slippageTolerance?: number;
|
|
931
|
+
/**
|
|
932
|
+
* Realized slippage of the settled output vs the quoted expected output, in basis points. Positive means the swap settled for less than quoted
|
|
933
|
+
*/
|
|
934
|
+
realizedSlippageBps?: number;
|
|
935
|
+
transient?: {
|
|
936
|
+
estimatedTimeToComplete: number;
|
|
937
|
+
currentLegIndex?: number;
|
|
938
|
+
estimates?: {
|
|
939
|
+
inboundObservation: number;
|
|
940
|
+
inboundConfirmation: number;
|
|
941
|
+
streamingSwap: number;
|
|
942
|
+
outboundDelay: number;
|
|
943
|
+
outboundObservation: number;
|
|
944
|
+
currentStage: string;
|
|
945
|
+
};
|
|
946
|
+
providerDetails?: {
|
|
947
|
+
streamingDetails?: {
|
|
948
|
+
quantity?: number;
|
|
949
|
+
count?: number;
|
|
950
|
+
interval?: number;
|
|
951
|
+
subSwapsMap?: Array<number>;
|
|
952
|
+
};
|
|
953
|
+
depositChannelId?: string;
|
|
954
|
+
depositAddress?: string;
|
|
955
|
+
};
|
|
956
|
+
};
|
|
957
|
+
meta?: {
|
|
958
|
+
broadcastedAt?: number;
|
|
959
|
+
wallet?: string;
|
|
960
|
+
quoteId?: string;
|
|
961
|
+
explorerUrl?: string;
|
|
962
|
+
providerExplorerUrl?: string;
|
|
963
|
+
affiliate?: string;
|
|
964
|
+
fees?: Array<{
|
|
965
|
+
type: 'liquidity' | 'network' | 'inbound' | 'outbound' | 'affiliate' | 'service' | 'tax' | 'priority';
|
|
966
|
+
amount: string;
|
|
967
|
+
amountBps?: number;
|
|
968
|
+
asset: string;
|
|
969
|
+
chain: string;
|
|
970
|
+
protocol: 'CHAINFLIP' | 'CHAINFLIP_STREAMING' | 'MAYACHAIN' | 'MAYACHAIN_STREAMING' | 'ONEINCH' | 'PANCAKESWAP' | 'SUSHISWAP_V2' | 'THORCHAIN' | 'THORCHAIN_STREAMING' | 'TRADERJOE_V2' | 'UNISWAP_V2' | 'UNISWAP_V3' | 'JUPITER' | 'OKX' | 'NEAR' | 'GARDEN' | 'HARBOR' | 'FLASHNET' | 'MAYAN' | 'PANGOLIN_V1' | 'CAVIAR_V1' | 'OPENOCEAN_V2' | 'OCISWAP_V1' | 'CAMELOT_V3';
|
|
971
|
+
}>;
|
|
972
|
+
amountInUsd?: string;
|
|
973
|
+
amountOutUsd?: string;
|
|
974
|
+
provider?: 'CHAINFLIP' | 'CHAINFLIP_STREAMING' | 'MAYACHAIN' | 'MAYACHAIN_STREAMING' | 'ONEINCH' | 'PANCAKESWAP' | 'SUSHISWAP_V2' | 'THORCHAIN' | 'THORCHAIN_STREAMING' | 'TRADERJOE_V2' | 'UNISWAP_V2' | 'UNISWAP_V3' | 'JUPITER' | 'OKX' | 'NEAR' | 'GARDEN' | 'HARBOR' | 'FLASHNET' | 'MAYAN' | 'PANGOLIN_V1' | 'CAVIAR_V1' | 'OPENOCEAN_V2' | 'OCISWAP_V1' | 'CAMELOT_V3';
|
|
975
|
+
providerAction?: 'swap' | 'aggregation' | 'addLiquidity' | 'withdrawLiquidity' | 'addSavers' | 'withdrawSavers' | 'borrow' | 'repay' | 'name' | 'donate' | 'claim' | 'stake' | 'unstake' | 'createOrder' | 'cancelOrder';
|
|
976
|
+
providerOrderId?: string;
|
|
977
|
+
images?: {
|
|
978
|
+
from?: string;
|
|
979
|
+
to?: string;
|
|
980
|
+
provider?: string;
|
|
981
|
+
chain?: string;
|
|
982
|
+
};
|
|
983
|
+
affiliateFees?: Array<{
|
|
984
|
+
affiliate: string;
|
|
985
|
+
bps: string;
|
|
986
|
+
isReferrer: boolean;
|
|
987
|
+
}>;
|
|
988
|
+
failReason?: string;
|
|
989
|
+
failTargetAddress?: string;
|
|
990
|
+
targetAddress?: string;
|
|
991
|
+
};
|
|
992
|
+
payload?: {
|
|
993
|
+
evmCalldata?: string;
|
|
994
|
+
evmValue?: string;
|
|
995
|
+
logs?: unknown;
|
|
996
|
+
memo?: string;
|
|
997
|
+
spender?: string;
|
|
998
|
+
manifest?: unknown;
|
|
999
|
+
intentHash?: string;
|
|
1000
|
+
thorname?: string;
|
|
1001
|
+
decodedPayload?: unknown;
|
|
1002
|
+
};
|
|
1003
|
+
}>;
|
|
1004
|
+
};
|
|
1005
|
+
pendingReason?: 'awaiting_deposit' | 'indexing';
|
|
1006
|
+
};
|
|
766
1007
|
type InsertTrackedTransactionRequest = {
|
|
767
1008
|
legs: Array<{
|
|
768
1009
|
chainId: '36900' | 'aleo' | 'aptos' | '42161' | '1313161554' | '43114' | '8453' | '80094' | '56' | 'bitcoin' | 'bitcoincash' | '3637' | 'cardano' | 'chainflip' | '1116' | '21000000' | 'cosmoshub-4' | '25' | 'dash' | 'dogecoin' | '1' | '100' | 'harbor-1' | 'harbor-stagenet-1' | '999' | 'hype' | 'kaiyo-1' | 'litecoin' | '59144' | 'mayachain-mainnet-v1' | 'mayachain-stagenet-v1' | '4326' | '143' | 'near' | 'noble-1' | '10' | '9745' | 'polkadot' | '137' | 'radix-mainnet' | 'ripple' | '4663' | 'solana' | '146' | 'spark' | 'stellar' | '0x534e5f4d41494e' | 'sui' | 'thorchain-1' | 'thorchain-stagenet-v2' | 'ton' | '728126428' | '130' | '196' | 'zcash';
|
|
@@ -1192,7 +1433,7 @@ type GetQuoteResponse = {
|
|
|
1192
1433
|
nextLegProvider?: 'CHAINFLIP' | 'CHAINFLIP_STREAMING' | 'MAYACHAIN' | 'MAYACHAIN_STREAMING' | 'ONEINCH' | 'PANCAKESWAP' | 'SUSHISWAP_V2' | 'THORCHAIN' | 'THORCHAIN_STREAMING' | 'TRADERJOE_V2' | 'UNISWAP_V2' | 'UNISWAP_V3' | 'JUPITER' | 'OKX' | 'NEAR' | 'GARDEN' | 'HARBOR' | 'FLASHNET' | 'MAYAN' | 'PANGOLIN_V1' | 'CAVIAR_V1' | 'OPENOCEAN_V2' | 'OCISWAP_V1' | 'CAMELOT_V3';
|
|
1193
1434
|
}>;
|
|
1194
1435
|
warnings: Array<{
|
|
1195
|
-
code: 'highSlippage' | 'highPriceImpact' | 'noSourceAddressToBuildTransaction' | 'affiliateFeeTooSmallSoRemoved' | 'unableToApplyReferralProgram' | 'insufficientBalance' | 'insufficientGas' | 'unableToBuildTransaction' | 'unableToEstimateGas' | 'limitPriceBelowSpot' | 'limitPriceWithinFeeGap';
|
|
1436
|
+
code: 'highSlippage' | 'highPriceImpact' | 'noSourceAddressToBuildTransaction' | 'affiliateFeeTooSmallSoRemoved' | 'unableToApplyReferralProgram' | 'insufficientBalance' | 'insufficientGas' | 'unableToBuildTransaction' | 'unableToEstimateGas' | 'limitPriceBelowSpot' | 'limitPriceWithinFeeGap' | 'litecoinMwebNotSupported';
|
|
1196
1437
|
display: string;
|
|
1197
1438
|
tooltip?: string;
|
|
1198
1439
|
}>;
|
|
@@ -1237,7 +1478,7 @@ type GetQuoteResponse = {
|
|
|
1237
1478
|
error?: string;
|
|
1238
1479
|
providerErrors?: Array<{
|
|
1239
1480
|
provider?: 'CHAINFLIP' | 'CHAINFLIP_STREAMING' | 'MAYACHAIN' | 'MAYACHAIN_STREAMING' | 'ONEINCH' | 'PANCAKESWAP' | 'SUSHISWAP_V2' | 'THORCHAIN' | 'THORCHAIN_STREAMING' | 'TRADERJOE_V2' | 'UNISWAP_V2' | 'UNISWAP_V3' | 'JUPITER' | 'OKX' | 'NEAR' | 'GARDEN' | 'HARBOR' | 'FLASHNET' | 'MAYAN' | 'PANGOLIN_V1' | 'CAVIAR_V1' | 'OPENOCEAN_V2' | 'OCISWAP_V1' | 'CAMELOT_V3';
|
|
1240
|
-
errorCode?: 'noRpcFallbacks' | 'requestTimeout' | 'invalidApiVersion' | 'isSanctionedAddress' | 'unknownError' | 'internalServerError' | 'test_error' | 'blockHeaderNotFound' | 'blockHashNotFoundAtHeight' | 'blackListAsset' | 'txHashMissing' | 'invalidAsset' | 'currentBlockHeaderNotFound' | 'failedToRetrieveBalance' | 'failedToRetrieveBlock' | 'failedToRetrieveFees' | 'notImplementedBCH' | 'notImplementedDoge' | 'noPoolsFound' | 'noVaultsFound' | 'noTxFound' | 'multipleCosmosMessages' | 'heightOrHashNotProvided' | 'priceTooVolatile' | 'unknownDenom' | 'invalidBlockHeight' | 'timestampExtrinsicNoArgumentsForBlock' | 'timestampExtrinsicNoTimestampForBlock' | 'noTimestampExtrinsicForHash' | 'timestampExtrinsicNoArgumentsForHash' | 'txMemoUndefined' | 'txMemoIncorrect' | 'txTypeNotFound' | 'txNoMessage' | 'txNotFound' | 'txReceiptNotFound' | 'txParsingError' | 'txLogsParsingError' | 'txFailed' | 'jobDataParsingError' | 'dataformRunFailed' | 'dataformAssertionFailed' | 'blockNotFound' | 'balanceNotFound' | 'blockbookCallFailed' | 'configError' | 'unsafeTestDatabase' | 'synthSwapDisallowed' | 'noQuoteResponse' | 'noPoolAssetsFound' | 'noThorchainPools' | 'noMayachainPools' | 'noThorchainNetworkInfo' | 'invalidAffiliateFee' | 'invalidBuyAssetAddress' | 'invalidSellAssetAddress' | 'invalidSourceAddress' | 'invalidDestinationAddress' | 'invalidParam' | 'xrpAddressRequiresTag' | 'invalidChainId' | 'invalidChain' | 'unsupportedChainId' | 'unsupportedEVMChainId' | 'unsupportedMethod' | 'unsupportedProvider' | 'unsupportedProgram' | 'unsupportedEvent' | 'invalidParamsForMethod' | 'noWhitelistTokens' | 'failedFetchGasPrice' | 'chainflipBrokerApiUnavailable' | 'failedToBuildVaultSwapTransaction' | 'failedToOpenBtcPrivateChannel' | 'failedToCloseBtcPrivateChannel' | 'affiliateNotRegistered' | 'failedToCreateDepositChannel' | 'failedToRegisterAccount' | 'failedToRegisterAffiliate' | 'failedToWithdrawAffiliate' | 'noProviderDetailsFound' | 'noTokenListsFound' | 'tokenNotFound' | 'tokenPriceNotFound' | 'tokenPriceUnavailable' | 'tokenPriceFailedToUpdate' | 'legsArrayIsEmpty' | 'failedToFetchQuoteForLeg' | 'noBlockHeaderFound' | 'failedToSimulateSwap' | 'swapHalted' | 'memoTooLongForSourceChain' | 'addressScreeningFailed' | 'missingScreeningConfig' | 'insufficientLiquidity' | 'noSaversFound' | 'noInbounDataFound' | 'noInboundAddressesFound' | 'noTargetAddress' | 'noInboundAddressFoundForChain' | 'noLastBlocksFound' | 'noVersionFound' | 'noConstantsFound' | 'noMimirsFound' | 'noRoutesFound' | 'quoteNotFound' | 'providerResponseFormError' | 'ledgerWrongPayload' | 'failedToFetchTx' | 'failedBuildTransactionDetails' | 'failedToCreateRouteMetadata' | 'txBuildingTimeout' | 'noLegsForRoute' | 'insufficientBalance' | 'insufficientAllowance' | 'insufficientGas' | 'unableToBuildTransaction' | 'noRouterAddressFound' | 'noAggregatorAddressFound' | 'noContractInstanceFound' | 'noContractAddressFound' | 'invalidAffiliate' | 'invalidAffiliateName' | 'thornameNotFound' | 'thornameAffiliate' | 'No provider found' | 'providerAssetNotFound' | 'No Record found' | 'Slippage too low' | 'tradingHalted' | 'mayanameNotFound' | 'noWrappedGasAsset' | 'aggregatorAddressNotFound' | 'routerAddressNotFound' | 'dummyAddressNotFound' | 'trackerError' | 'thorchainPoolUnavailable' | 'noTradingPairs' | 'missingState' | 'ledgerSwapNotFound' | 'ledgerSwapNotReadyForTracking' | 'ledgerInvalidParsingMode' | 'ledgerWebhookNotifyFailed' | 'errorEstimatingGas' | 'apiKeyInvalid' | 'apiKeyFailedToUpdate' | 'apiKeySignatureExists' | 'apiKeySignatureKeyTypeMismatch' | 'apiKeyExpired' | 'unauthorized' | 'failedToCreateMemo' | 'invalidAddressForChain' | 'invalidAddress' | 'riskyAddress' | 'noRoutesToProcess' | 'sellAssetAmountTooSmall' | 'sellAssetAmountTooLarge' | 'missingPrivateKey' | 'noMemoPriceProtection' | 'nodeMethodNotFound' | 'nodeRpcNotFound' | 'thirdPartyProviderNotFound' | 'quoteUnavailable' | 'targetInstructionNotFound' | 'referrerExist' | 'referrerNotFound' | 'invalidReferrer' | 'quoteLogicError' | 'missingDecimal' | 'noGasInfoInDB' | 'quoteError' | 'valueOverflow' | 'missingChainflipMeta' | 'contractAndMethodRequired' | 'tokenImageError' | 'fileNotFound' | 'fileFormatError' | 'ipError' | 'failedToSaveLedgerSwap' | 'missingValue' | 'missingDBQueryParam' | 'unableEstimateTxTime' | 'affiliateStatsMissingDate' | 'affiliateStatsMissingNextFilter' | 'affiliateStatsNoActions' | 'unsupportedNotificationEvent' | 'unsupportedNotificationChannel' | 'invalidWebhookUrl' | 'webhookDeliveryFailed' | 'serverStateNotFound' | 'apiRequestFailed' | 'apiRateLimit' | 'invalidActionStep' | 'providerIsRequired' | 'rateLimitExceeded' | 'depositChannelNotFound' | 'auditLogInsertFailed' | 'affiliateNameHistoryInsertFailed' | 'invalidRouteId' | 'invalidQuoteId' | 'invalidRoute' | 'quoteExpired' | 'swapQuoteNotFound' | 'swapRouteNotFound' | 'swapTransactionFailed' | 'swapChainflipMetaMissing' | 'swapChainflipChannelFailed' | 'swapTransferTxFailed' | 'chainflipVaultSwapNotSupported' | 'chainflipVaultSwapEncodingFailed' | 'chainflipVaultSwapInvalidChain' | 'chainflipVaultSwapBitcoinCCMNotSupported' | 'chainflipVaultSwapTransactionBuildFailed' | 'zcashInvalidAddress' | 'zcashInsufficientUTXOs' | 'zcashUTXOSelectionFailed' | 'zcashTransactionBuildFailed' | 'zcashShieldedRefundMissing' | 'zcashMemoTooLong' | 'zcashUnifiedAddressUnsupported' | 'zcashShieldedMemoUnavailable' | 'invalidTokenProgram' | 'solanaOutputBelowRentExemptMinimum' | 'solanaTokenProgramUnavailable' | 'invalidRequest' | 'pubsubEventNotRegistered' | 'pubsubTopicNotFound' | 'pubsubEnvelopeParsingError' | 'invalidSpender' | 'outputAmountDeviationTooHigh' | 'swapSizeExceeded' | 'v2EndpointNotAllowed' | 'externalServiceFailed' | 'tenantEncryptKeyNotFound' | 'tenantKeyPairEncryptionError' | 'slip24AmountOverflow' | 'slip24InvalidSignature' | 'slip24DigestComputationFailed' | 'invalidTxHashFormat' | 'affiliateNotFound' | 'nearAffiliateProviderAssetNotFound' | 'nearAffiliateDepositAddressFailed' | 'flashnetAffiliateRegistrationFailed' | 'flashnetAffiliateClaimFailed' | 'flashnetAffiliateNotFound' | 'limitOrderUnsupportedChain' | 'limitOrderQuoteNotFound' | 'limitOrderRouteNotFound' | 'limitOrderNotFound' | 'limitOrderInvalidState' | 'limitOrderBuildFailed' | 'limitOrderSubmissionFailed' | 'limitOrderCancelFailed' | 'limitOrderExpirationOutOfBounds' | 'limitOrderUnsupportedFillFlags' | 'limitOrderAmountAmbiguous' | 'limitOrderChainMismatch' | 'limitOrderUnsupportedPair' | 'limitOrderActionUnavailable' | 'limitOrderProviderError';
|
|
1481
|
+
errorCode?: 'noRpcFallbacks' | 'requestTimeout' | 'invalidApiVersion' | 'isSanctionedAddress' | 'unknownError' | 'internalServerError' | 'test_error' | 'blockHeaderNotFound' | 'blockHashNotFoundAtHeight' | 'blackListAsset' | 'txHashMissing' | 'invalidAsset' | 'currentBlockHeaderNotFound' | 'failedToRetrieveBalance' | 'failedToRetrieveBlock' | 'failedToRetrieveFees' | 'notImplementedBCH' | 'notImplementedDoge' | 'noPoolsFound' | 'noVaultsFound' | 'noTxFound' | 'multipleCosmosMessages' | 'heightOrHashNotProvided' | 'priceTooVolatile' | 'unknownDenom' | 'invalidBlockHeight' | 'timestampExtrinsicNoArgumentsForBlock' | 'timestampExtrinsicNoTimestampForBlock' | 'noTimestampExtrinsicForHash' | 'timestampExtrinsicNoArgumentsForHash' | 'txMemoUndefined' | 'txMemoIncorrect' | 'txTypeNotFound' | 'txNoMessage' | 'txNotFound' | 'txReceiptNotFound' | 'txParsingError' | 'txLogsParsingError' | 'txFailed' | 'jobDataParsingError' | 'dataformRunFailed' | 'dataformAssertionFailed' | 'blockNotFound' | 'balanceNotFound' | 'blockbookCallFailed' | 'configError' | 'unsafeTestDatabase' | 'synthSwapDisallowed' | 'noQuoteResponse' | 'noPoolAssetsFound' | 'noThorchainPools' | 'noMayachainPools' | 'noThorchainNetworkInfo' | 'invalidAffiliateFee' | 'invalidBuyAssetAddress' | 'invalidSellAssetAddress' | 'invalidSourceAddress' | 'invalidDestinationAddress' | 'invalidParam' | 'xrpAddressRequiresTag' | 'invalidChainId' | 'invalidChain' | 'unsupportedChainId' | 'unsupportedEVMChainId' | 'unsupportedMethod' | 'unsupportedProvider' | 'unsupportedProgram' | 'unsupportedEvent' | 'invalidParamsForMethod' | 'noWhitelistTokens' | 'failedFetchGasPrice' | 'chainflipBrokerApiUnavailable' | 'failedToBuildVaultSwapTransaction' | 'failedToOpenBtcPrivateChannel' | 'failedToCloseBtcPrivateChannel' | 'affiliateNotRegistered' | 'failedToCreateDepositChannel' | 'failedToRegisterAccount' | 'failedToRegisterAffiliate' | 'failedToWithdrawAffiliate' | 'noProviderDetailsFound' | 'noTokenListsFound' | 'tokenNotFound' | 'tokenPriceNotFound' | 'tokenPriceUnavailable' | 'tokenPriceFailedToUpdate' | 'legsArrayIsEmpty' | 'failedToFetchQuoteForLeg' | 'noBlockHeaderFound' | 'failedToSimulateSwap' | 'swapHalted' | 'memoTooLongForSourceChain' | 'addressScreeningFailed' | 'missingScreeningConfig' | 'insufficientLiquidity' | 'noSaversFound' | 'noInbounDataFound' | 'noInboundAddressesFound' | 'noTargetAddress' | 'noInboundAddressFoundForChain' | 'noLastBlocksFound' | 'noVersionFound' | 'noConstantsFound' | 'noMimirsFound' | 'noRoutesFound' | 'quoteNotFound' | 'providerResponseFormError' | 'ledgerWrongPayload' | 'failedToFetchTx' | 'failedBuildTransactionDetails' | 'failedToCreateRouteMetadata' | 'txBuildingTimeout' | 'noLegsForRoute' | 'insufficientBalance' | 'insufficientAllowance' | 'insufficientGas' | 'unableToBuildTransaction' | 'noRouterAddressFound' | 'noAggregatorAddressFound' | 'noContractInstanceFound' | 'noContractAddressFound' | 'invalidAffiliate' | 'invalidAffiliateName' | 'thornameNotFound' | 'thornameAffiliate' | 'No provider found' | 'providerAssetNotFound' | 'No Record found' | 'Slippage too low' | 'tradingHalted' | 'mayanameNotFound' | 'noWrappedGasAsset' | 'aggregatorAddressNotFound' | 'routerAddressNotFound' | 'dummyAddressNotFound' | 'trackerError' | 'thorchainPoolUnavailable' | 'noTradingPairs' | 'missingState' | 'ledgerSwapNotFound' | 'ledgerSwapNotReadyForTracking' | 'ledgerInvalidParsingMode' | 'ledgerWebhookNotifyFailed' | 'errorEstimatingGas' | 'apiKeyInvalid' | 'apiKeyFailedToUpdate' | 'apiKeySignatureExists' | 'apiKeySignatureKeyTypeMismatch' | 'apiKeyExpired' | 'unauthorized' | 'failedToCreateMemo' | 'invalidAddressForChain' | 'invalidAddress' | 'riskyAddress' | 'noRoutesToProcess' | 'sellAssetAmountTooSmall' | 'sellAssetAmountTooLarge' | 'missingPrivateKey' | 'noMemoPriceProtection' | 'nodeMethodNotFound' | 'nodeRpcNotFound' | 'thirdPartyProviderNotFound' | 'quoteUnavailable' | 'targetInstructionNotFound' | 'referrerExist' | 'referrerNotFound' | 'invalidReferrer' | 'quoteLogicError' | 'missingDecimal' | 'noGasInfoInDB' | 'quoteError' | 'valueOverflow' | 'missingChainflipMeta' | 'contractAndMethodRequired' | 'tokenImageError' | 'fileNotFound' | 'fileFormatError' | 'ipError' | 'failedToSaveLedgerSwap' | 'missingValue' | 'missingDBQueryParam' | 'unableEstimateTxTime' | 'affiliateStatsMissingDate' | 'affiliateStatsMissingNextFilter' | 'affiliateStatsNoActions' | 'unsupportedNotificationEvent' | 'unsupportedNotificationChannel' | 'invalidWebhookUrl' | 'webhookDeliveryFailed' | 'serverStateNotFound' | 'apiRequestFailed' | 'apiRateLimit' | 'invalidActionStep' | 'providerIsRequired' | 'rateLimitExceeded' | 'depositChannelNotFound' | 'auditLogInsertFailed' | 'affiliateNameHistoryInsertFailed' | 'invalidRouteId' | 'invalidQuoteId' | 'invalidRoute' | 'quoteExpired' | 'swapQuoteNotFound' | 'swapRouteNotFound' | 'swapTransactionFailed' | 'swapChainflipMetaMissing' | 'swapChainflipChannelFailed' | 'swapTransferTxFailed' | 'chainflipVaultSwapNotSupported' | 'chainflipVaultSwapEncodingFailed' | 'chainflipVaultSwapInvalidChain' | 'chainflipVaultSwapBitcoinCCMNotSupported' | 'chainflipVaultSwapTransactionBuildFailed' | 'zcashInvalidAddress' | 'zcashInsufficientUTXOs' | 'zcashUTXOSelectionFailed' | 'zcashTransactionBuildFailed' | 'zcashShieldedRefundMissing' | 'zcashMemoTooLong' | 'litecoinMwebAddressUnsupported' | 'zcashUnifiedAddressUnsupported' | 'zcashShieldedMemoUnavailable' | 'invalidTokenProgram' | 'solanaOutputBelowRentExemptMinimum' | 'solanaTokenProgramUnavailable' | 'invalidRequest' | 'pubsubEventNotRegistered' | 'pubsubTopicNotFound' | 'pubsubEnvelopeParsingError' | 'invalidSpender' | 'outputAmountDeviationTooHigh' | 'swapSizeExceeded' | 'v2EndpointNotAllowed' | 'externalServiceFailed' | 'tenantEncryptKeyNotFound' | 'tenantKeyPairEncryptionError' | 'slip24AmountOverflow' | 'slip24InvalidSignature' | 'slip24DigestComputationFailed' | 'invalidTxHashFormat' | 'affiliateNotFound' | 'nearAffiliateProviderAssetNotFound' | 'nearAffiliateDepositAddressFailed' | 'flashnetAffiliateRegistrationFailed' | 'flashnetAffiliateClaimFailed' | 'flashnetAffiliateNotFound' | 'limitOrderUnsupportedChain' | 'limitOrderQuoteNotFound' | 'limitOrderRouteNotFound' | 'limitOrderNotFound' | 'limitOrderInvalidState' | 'limitOrderBuildFailed' | 'limitOrderSubmissionFailed' | 'limitOrderCancelFailed' | 'limitOrderExpirationOutOfBounds' | 'limitOrderUnsupportedFillFlags' | 'limitOrderAmountAmbiguous' | 'limitOrderChainMismatch' | 'limitOrderUnsupportedPair' | 'limitOrderActionUnavailable' | 'limitOrderProviderError';
|
|
1241
1482
|
message?: string;
|
|
1242
1483
|
/**
|
|
1243
1484
|
* Provider minimum sell amount (human units), when the provider reported one
|
|
@@ -1427,7 +1668,7 @@ type ExecuteSwapResponse = {
|
|
|
1427
1668
|
nextLegProvider?: 'CHAINFLIP' | 'CHAINFLIP_STREAMING' | 'MAYACHAIN' | 'MAYACHAIN_STREAMING' | 'ONEINCH' | 'PANCAKESWAP' | 'SUSHISWAP_V2' | 'THORCHAIN' | 'THORCHAIN_STREAMING' | 'TRADERJOE_V2' | 'UNISWAP_V2' | 'UNISWAP_V3' | 'JUPITER' | 'OKX' | 'NEAR' | 'GARDEN' | 'HARBOR' | 'FLASHNET' | 'MAYAN' | 'PANGOLIN_V1' | 'CAVIAR_V1' | 'OPENOCEAN_V2' | 'OCISWAP_V1' | 'CAMELOT_V3';
|
|
1428
1669
|
}>;
|
|
1429
1670
|
warnings: Array<{
|
|
1430
|
-
code: 'highSlippage' | 'highPriceImpact' | 'noSourceAddressToBuildTransaction' | 'affiliateFeeTooSmallSoRemoved' | 'unableToApplyReferralProgram' | 'insufficientBalance' | 'insufficientGas' | 'unableToBuildTransaction' | 'unableToEstimateGas' | 'limitPriceBelowSpot' | 'limitPriceWithinFeeGap';
|
|
1671
|
+
code: 'highSlippage' | 'highPriceImpact' | 'noSourceAddressToBuildTransaction' | 'affiliateFeeTooSmallSoRemoved' | 'unableToApplyReferralProgram' | 'insufficientBalance' | 'insufficientGas' | 'unableToBuildTransaction' | 'unableToEstimateGas' | 'limitPriceBelowSpot' | 'limitPriceWithinFeeGap' | 'litecoinMwebNotSupported';
|
|
1431
1672
|
display: string;
|
|
1432
1673
|
tooltip?: string;
|
|
1433
1674
|
}>;
|
|
@@ -2505,4 +2746,4 @@ declare const ChainflipService: {
|
|
|
2505
2746
|
readonly createBrokerChannel: <ThrowOnError extends boolean = false>(options: Options<CreateBrokerChannelData, ThrowOnError>) => RequestResult<CreateBrokerChannelResponses, unknown, ThrowOnError>;
|
|
2506
2747
|
};
|
|
2507
2748
|
|
|
2508
|
-
export { ChainflipService, type ClientOptions, type CreateBrokerChannelData, type CreateBrokerChannelRequest, type CreateBrokerChannelResponse, type CreateBrokerChannelResponse2, type CreateBrokerChannelResponses, type ExecuteSwapData, type ExecuteSwapError, type ExecuteSwapErrors, type ExecuteSwapRequest, type ExecuteSwapResponse, type ExecuteSwapResponse2, type ExecuteSwapResponses, GasService, type GetAssetProvidersResponse, type GetCachedPriceData, type GetCachedPriceRequest, type GetCachedPriceResponse, type GetCachedPriceResponse2, type GetCachedPriceResponses, type GetGasHistoryData, type GetGasHistoryResponse, type GetGasHistoryResponse2, type GetGasHistoryResponses, type GetGasPricesData, type GetGasPricesResponse, type GetGasPricesResponse2, type GetGasPricesResponses, type GetProviderIdentifiersMappingResponse, type GetProvidersData, type GetProvidersError, type GetProvidersErrors, type GetProvidersResponse, type GetProvidersResponse2, type GetProvidersResponses, type GetProvidersStatusResponse, type GetQuoteData, type GetQuoteError, type GetQuoteErrors, type GetQuoteRequest, type GetQuoteResponse, type GetQuoteResponse2, type GetQuoteResponses, type GetSwapFromAssetsData, type GetSwapFromAssetsError, type GetSwapFromAssetsErrors, type GetSwapFromAssetsResponse, type GetSwapFromAssetsResponse2, type GetSwapFromAssetsResponses, type GetSwapToAssetsData, type GetSwapToAssetsError, type GetSwapToAssetsErrors, type GetSwapToAssetsResponse, type GetSwapToAssetsResponse2, type GetSwapToAssetsResponses, type GetTokensData, type GetTokensError, type GetTokensErrors, type GetTokensResponse, type GetTokensResponse2, type GetTokensResponses, type GetWhitelistPoolsResponse, type GetWhitelistTokensResponse, type InsertTrackedTransactionRequest, type InsertTrackedTransactionResponse, type Options, PriceService, QuoteService, type RegisterChainflipAffiliateRequest, type RegisterChainflipAffiliateResponse, type ScreenAddressData, type ScreenAddressError, type ScreenAddressErrors, type ScreenAddressRequest, type ScreenAddressResponse, type ScreenAddressResponse2, type ScreenAddressResponses, ScreenService, type SearchTokensData, type SearchTokensError, type SearchTokensErrors, type SearchTokensResponse, type SearchTokensResponse2, type SearchTokensResponses, type SwapKitClientOptions, SwapKitService, SwapService, TokenlistService, TrackService, type TrackTransactionData, type TrackTransactionError, type TrackTransactionErrors, type TrackTransactionRequest, type TrackTransactionResponse, type TrackTransactionResponse2, type TrackTransactionResponses, type WithdrawChainflipAffiliateFeesRequest, type WithdrawChainflipAffiliateFeesResponse, client, configureSwapKit, createBrokerChannel, executeSwap, getCachedPrice, getGasHistory, getGasPrices, getProviders, getQuote, getSwapFromAssets, getSwapToAssets, getTokens, screenAddress, searchTokens, trackTransaction };
|
|
2749
|
+
export { ChainflipService, type ClientOptions, type CreateBrokerChannelData, type CreateBrokerChannelRequest, type CreateBrokerChannelResponse, type CreateBrokerChannelResponse2, type CreateBrokerChannelResponses, type ExecuteSwapData, type ExecuteSwapError, type ExecuteSwapErrors, type ExecuteSwapRequest, type ExecuteSwapResponse, type ExecuteSwapResponse2, type ExecuteSwapResponses, GasService, type GetAssetProvidersResponse, type GetCachedPriceData, type GetCachedPriceRequest, type GetCachedPriceResponse, type GetCachedPriceResponse2, type GetCachedPriceResponses, type GetGasHistoryData, type GetGasHistoryResponse, type GetGasHistoryResponse2, type GetGasHistoryResponses, type GetGasPricesData, type GetGasPricesResponse, type GetGasPricesResponse2, type GetGasPricesResponses, type GetProviderIdentifiersMappingResponse, type GetProvidersData, type GetProvidersError, type GetProvidersErrors, type GetProvidersResponse, type GetProvidersResponse2, type GetProvidersResponses, type GetProvidersStatusResponse, type GetQuoteData, type GetQuoteError, type GetQuoteErrors, type GetQuoteRequest, type GetQuoteResponse, type GetQuoteResponse2, type GetQuoteResponses, type GetSwapFromAssetsData, type GetSwapFromAssetsError, type GetSwapFromAssetsErrors, type GetSwapFromAssetsResponse, type GetSwapFromAssetsResponse2, type GetSwapFromAssetsResponses, type GetSwapToAssetsData, type GetSwapToAssetsError, type GetSwapToAssetsErrors, type GetSwapToAssetsResponse, type GetSwapToAssetsResponse2, type GetSwapToAssetsResponses, type GetTokensData, type GetTokensError, type GetTokensErrors, type GetTokensResponse, type GetTokensResponse2, type GetTokensResponses, type GetWhitelistPoolsResponse, type GetWhitelistTokensResponse, type InsertTrackedTransactionRequest, type InsertTrackedTransactionResponse, type Options, PriceService, QuoteService, type RegisterChainflipAffiliateRequest, type RegisterChainflipAffiliateResponse, type ScreenAddressData, type ScreenAddressError, type ScreenAddressErrors, type ScreenAddressRequest, type ScreenAddressResponse, type ScreenAddressResponse2, type ScreenAddressResponses, ScreenService, type SearchTokensData, type SearchTokensError, type SearchTokensErrors, type SearchTokensResponse, type SearchTokensResponse2, type SearchTokensResponses, type SwapKitClientOptions, SwapKitService, SwapService, TokenlistService, type TrackLedgerSwapResponse, TrackService, type TrackTransactionData, type TrackTransactionError, type TrackTransactionErrors, type TrackTransactionRequest, type TrackTransactionResponse, type TrackTransactionResponse2, type TrackTransactionResponses, type WithdrawChainflipAffiliateFeesRequest, type WithdrawChainflipAffiliateFeesResponse, client, configureSwapKit, createBrokerChannel, executeSwap, getCachedPrice, getGasHistory, getGasPrices, getProviders, getQuote, getSwapFromAssets, getSwapToAssets, getTokens, screenAddress, searchTokens, trackTransaction };
|
package/dist/index.d.ts
CHANGED
|
@@ -763,6 +763,247 @@ type TrackTransactionResponse = {
|
|
|
763
763
|
};
|
|
764
764
|
}>;
|
|
765
765
|
};
|
|
766
|
+
type TrackLedgerSwapResponse = {
|
|
767
|
+
ledgerSwap: {
|
|
768
|
+
swapId: string;
|
|
769
|
+
/**
|
|
770
|
+
* Last persisted Ledger status. e.g. `READY`, `PENDING`, `FINISHED`
|
|
771
|
+
*/
|
|
772
|
+
status: string;
|
|
773
|
+
/**
|
|
774
|
+
* Provider that quoted the swap. e.g. `NEAR`
|
|
775
|
+
*/
|
|
776
|
+
provider?: string;
|
|
777
|
+
/**
|
|
778
|
+
* ISO-8601 timestamp of when the swap payload was built
|
|
779
|
+
*/
|
|
780
|
+
createdAt: string;
|
|
781
|
+
fromAsset: string;
|
|
782
|
+
toAsset: string;
|
|
783
|
+
fromAmount: string;
|
|
784
|
+
expectedAmountTo?: string;
|
|
785
|
+
/**
|
|
786
|
+
* Deposit address the end user was instructed to fund
|
|
787
|
+
*/
|
|
788
|
+
payinAddress: string;
|
|
789
|
+
payinTransactionId?: string;
|
|
790
|
+
payoutTransactionId?: string;
|
|
791
|
+
providerFees: string;
|
|
792
|
+
referralFees: string;
|
|
793
|
+
payoutNetworkFees: string;
|
|
794
|
+
};
|
|
795
|
+
transaction?: {
|
|
796
|
+
chainId: '36900' | 'aleo' | 'aptos' | '42161' | '1313161554' | '43114' | '8453' | '80094' | '56' | 'bitcoin' | 'bitcoincash' | '3637' | 'cardano' | 'chainflip' | '1116' | '21000000' | 'cosmoshub-4' | '25' | 'dash' | 'dogecoin' | '1' | '100' | 'harbor-1' | 'harbor-stagenet-1' | '999' | 'hype' | 'kaiyo-1' | 'litecoin' | '59144' | 'mayachain-mainnet-v1' | 'mayachain-stagenet-v1' | '4326' | '143' | 'near' | 'noble-1' | '10' | '9745' | 'polkadot' | '137' | 'radix-mainnet' | 'ripple' | '4663' | 'solana' | '146' | 'spark' | 'stellar' | '0x534e5f4d41494e' | 'sui' | 'thorchain-1' | 'thorchain-stagenet-v2' | 'ton' | '728126428' | '130' | '196' | 'zcash';
|
|
797
|
+
hash: string;
|
|
798
|
+
block: number;
|
|
799
|
+
type: 'approve' | 'claim' | 'deposit' | 'lending' | 'lp_action' | 'native_contract_call' | 'native_send' | 'stake' | 'unstake' | 'streaming_swap' | 'swap' | 'thorname_action' | 'token_contract_call' | 'token_transfer' | 'unknown' | 'donate';
|
|
800
|
+
status: 'unknown' | 'not_started' | 'pending' | 'swapping' | 'completed' | 'refunded' | 'failed';
|
|
801
|
+
trackingStatus?: 'not_started' | 'starting' | 'broadcasted' | 'mempool' | 'inbound' | 'outbound' | 'swapping' | 'completed' | 'refunded' | 'partially_refunded' | 'dropped' | 'reverted' | 'replaced' | 'retries_exceeded' | 'parsing_error';
|
|
802
|
+
fromAsset: string;
|
|
803
|
+
fromAmount: string;
|
|
804
|
+
fromAddress: string;
|
|
805
|
+
toAsset: string;
|
|
806
|
+
toAmount: string;
|
|
807
|
+
toAddress: string;
|
|
808
|
+
finalAsset?: {
|
|
809
|
+
chain: 'ADI' | 'ALEO' | 'APT' | 'ARB' | 'AURORA' | 'AVAX' | 'BASE' | 'BERA' | 'BSC' | 'BTC' | 'BCH' | 'BOTANIX' | 'ADA' | 'FLIP' | 'CORE' | 'CORN' | 'GAIA' | 'CRO' | 'DASH' | 'DOGE' | 'ETH' | 'GNO' | 'HARBOR' | 'HYPEREVM' | 'HYPE' | 'KUJI' | 'LTC' | 'LINEA' | 'MAYA' | 'MEGAETH' | 'MONAD' | 'NEAR' | 'NOBLE' | 'OP' | 'XPL' | 'DOT' | 'POL' | 'XRD' | 'XRP' | 'HOOD' | 'SOL' | 'SONIC' | 'SPARK' | 'XLM' | 'STRK' | 'SUI' | 'THOR' | 'TON' | 'TRON' | 'UNI' | 'XLAYER' | 'ZEC';
|
|
810
|
+
symbol: string;
|
|
811
|
+
ticker: string;
|
|
812
|
+
decimal?: number;
|
|
813
|
+
address?: string;
|
|
814
|
+
isGasAsset: boolean;
|
|
815
|
+
isSynthetic: boolean;
|
|
816
|
+
tax?: {
|
|
817
|
+
buy: number;
|
|
818
|
+
sell: number;
|
|
819
|
+
};
|
|
820
|
+
};
|
|
821
|
+
finalAddress?: string;
|
|
822
|
+
finalisedAt: number;
|
|
823
|
+
/**
|
|
824
|
+
* Slippage tolerance from the original quote, in basis points
|
|
825
|
+
*/
|
|
826
|
+
slippageTolerance?: number;
|
|
827
|
+
/**
|
|
828
|
+
* Realized slippage of the settled output vs the quoted expected output, in basis points. Positive means the swap settled for less than quoted
|
|
829
|
+
*/
|
|
830
|
+
realizedSlippageBps?: number;
|
|
831
|
+
transient?: {
|
|
832
|
+
estimatedTimeToComplete: number;
|
|
833
|
+
currentLegIndex?: number;
|
|
834
|
+
estimates?: {
|
|
835
|
+
inboundObservation: number;
|
|
836
|
+
inboundConfirmation: number;
|
|
837
|
+
streamingSwap: number;
|
|
838
|
+
outboundDelay: number;
|
|
839
|
+
outboundObservation: number;
|
|
840
|
+
currentStage: string;
|
|
841
|
+
};
|
|
842
|
+
providerDetails?: {
|
|
843
|
+
streamingDetails?: {
|
|
844
|
+
quantity?: number;
|
|
845
|
+
count?: number;
|
|
846
|
+
interval?: number;
|
|
847
|
+
subSwapsMap?: Array<number>;
|
|
848
|
+
};
|
|
849
|
+
depositChannelId?: string;
|
|
850
|
+
depositAddress?: string;
|
|
851
|
+
};
|
|
852
|
+
};
|
|
853
|
+
meta?: {
|
|
854
|
+
broadcastedAt?: number;
|
|
855
|
+
wallet?: string;
|
|
856
|
+
quoteId?: string;
|
|
857
|
+
explorerUrl?: string;
|
|
858
|
+
providerExplorerUrl?: string;
|
|
859
|
+
affiliate?: string;
|
|
860
|
+
fees?: Array<{
|
|
861
|
+
type: 'liquidity' | 'network' | 'inbound' | 'outbound' | 'affiliate' | 'service' | 'tax' | 'priority';
|
|
862
|
+
amount: string;
|
|
863
|
+
amountBps?: number;
|
|
864
|
+
asset: string;
|
|
865
|
+
chain: string;
|
|
866
|
+
protocol: 'CHAINFLIP' | 'CHAINFLIP_STREAMING' | 'MAYACHAIN' | 'MAYACHAIN_STREAMING' | 'ONEINCH' | 'PANCAKESWAP' | 'SUSHISWAP_V2' | 'THORCHAIN' | 'THORCHAIN_STREAMING' | 'TRADERJOE_V2' | 'UNISWAP_V2' | 'UNISWAP_V3' | 'JUPITER' | 'OKX' | 'NEAR' | 'GARDEN' | 'HARBOR' | 'FLASHNET' | 'MAYAN' | 'PANGOLIN_V1' | 'CAVIAR_V1' | 'OPENOCEAN_V2' | 'OCISWAP_V1' | 'CAMELOT_V3';
|
|
867
|
+
}>;
|
|
868
|
+
amountInUsd?: string;
|
|
869
|
+
amountOutUsd?: string;
|
|
870
|
+
provider?: 'CHAINFLIP' | 'CHAINFLIP_STREAMING' | 'MAYACHAIN' | 'MAYACHAIN_STREAMING' | 'ONEINCH' | 'PANCAKESWAP' | 'SUSHISWAP_V2' | 'THORCHAIN' | 'THORCHAIN_STREAMING' | 'TRADERJOE_V2' | 'UNISWAP_V2' | 'UNISWAP_V3' | 'JUPITER' | 'OKX' | 'NEAR' | 'GARDEN' | 'HARBOR' | 'FLASHNET' | 'MAYAN' | 'PANGOLIN_V1' | 'CAVIAR_V1' | 'OPENOCEAN_V2' | 'OCISWAP_V1' | 'CAMELOT_V3';
|
|
871
|
+
providerAction?: 'swap' | 'aggregation' | 'addLiquidity' | 'withdrawLiquidity' | 'addSavers' | 'withdrawSavers' | 'borrow' | 'repay' | 'name' | 'donate' | 'claim' | 'stake' | 'unstake' | 'createOrder' | 'cancelOrder';
|
|
872
|
+
providerOrderId?: string;
|
|
873
|
+
images?: {
|
|
874
|
+
from?: string;
|
|
875
|
+
to?: string;
|
|
876
|
+
provider?: string;
|
|
877
|
+
chain?: string;
|
|
878
|
+
};
|
|
879
|
+
affiliateFees?: Array<{
|
|
880
|
+
affiliate: string;
|
|
881
|
+
bps: string;
|
|
882
|
+
isReferrer: boolean;
|
|
883
|
+
}>;
|
|
884
|
+
failReason?: string;
|
|
885
|
+
failTargetAddress?: string;
|
|
886
|
+
targetAddress?: string;
|
|
887
|
+
};
|
|
888
|
+
payload?: {
|
|
889
|
+
evmCalldata?: string;
|
|
890
|
+
evmValue?: string;
|
|
891
|
+
logs?: unknown;
|
|
892
|
+
memo?: string;
|
|
893
|
+
spender?: string;
|
|
894
|
+
manifest?: unknown;
|
|
895
|
+
intentHash?: string;
|
|
896
|
+
thorname?: string;
|
|
897
|
+
decodedPayload?: unknown;
|
|
898
|
+
};
|
|
899
|
+
legs: Array<{
|
|
900
|
+
chainId: '36900' | 'aleo' | 'aptos' | '42161' | '1313161554' | '43114' | '8453' | '80094' | '56' | 'bitcoin' | 'bitcoincash' | '3637' | 'cardano' | 'chainflip' | '1116' | '21000000' | 'cosmoshub-4' | '25' | 'dash' | 'dogecoin' | '1' | '100' | 'harbor-1' | 'harbor-stagenet-1' | '999' | 'hype' | 'kaiyo-1' | 'litecoin' | '59144' | 'mayachain-mainnet-v1' | 'mayachain-stagenet-v1' | '4326' | '143' | 'near' | 'noble-1' | '10' | '9745' | 'polkadot' | '137' | 'radix-mainnet' | 'ripple' | '4663' | 'solana' | '146' | 'spark' | 'stellar' | '0x534e5f4d41494e' | 'sui' | 'thorchain-1' | 'thorchain-stagenet-v2' | 'ton' | '728126428' | '130' | '196' | 'zcash';
|
|
901
|
+
hash: string;
|
|
902
|
+
block: number;
|
|
903
|
+
type: 'approve' | 'claim' | 'deposit' | 'lending' | 'lp_action' | 'native_contract_call' | 'native_send' | 'stake' | 'unstake' | 'streaming_swap' | 'swap' | 'thorname_action' | 'token_contract_call' | 'token_transfer' | 'unknown' | 'donate';
|
|
904
|
+
status: 'unknown' | 'not_started' | 'pending' | 'swapping' | 'completed' | 'refunded' | 'failed';
|
|
905
|
+
trackingStatus?: 'not_started' | 'starting' | 'broadcasted' | 'mempool' | 'inbound' | 'outbound' | 'swapping' | 'completed' | 'refunded' | 'partially_refunded' | 'dropped' | 'reverted' | 'replaced' | 'retries_exceeded' | 'parsing_error';
|
|
906
|
+
fromAsset: string;
|
|
907
|
+
fromAmount: string;
|
|
908
|
+
fromAddress: string;
|
|
909
|
+
toAsset: string;
|
|
910
|
+
toAmount: string;
|
|
911
|
+
toAddress: string;
|
|
912
|
+
finalAsset?: {
|
|
913
|
+
chain: 'ADI' | 'ALEO' | 'APT' | 'ARB' | 'AURORA' | 'AVAX' | 'BASE' | 'BERA' | 'BSC' | 'BTC' | 'BCH' | 'BOTANIX' | 'ADA' | 'FLIP' | 'CORE' | 'CORN' | 'GAIA' | 'CRO' | 'DASH' | 'DOGE' | 'ETH' | 'GNO' | 'HARBOR' | 'HYPEREVM' | 'HYPE' | 'KUJI' | 'LTC' | 'LINEA' | 'MAYA' | 'MEGAETH' | 'MONAD' | 'NEAR' | 'NOBLE' | 'OP' | 'XPL' | 'DOT' | 'POL' | 'XRD' | 'XRP' | 'HOOD' | 'SOL' | 'SONIC' | 'SPARK' | 'XLM' | 'STRK' | 'SUI' | 'THOR' | 'TON' | 'TRON' | 'UNI' | 'XLAYER' | 'ZEC';
|
|
914
|
+
symbol: string;
|
|
915
|
+
ticker: string;
|
|
916
|
+
decimal?: number;
|
|
917
|
+
address?: string;
|
|
918
|
+
isGasAsset: boolean;
|
|
919
|
+
isSynthetic: boolean;
|
|
920
|
+
tax?: {
|
|
921
|
+
buy: number;
|
|
922
|
+
sell: number;
|
|
923
|
+
};
|
|
924
|
+
};
|
|
925
|
+
finalAddress?: string;
|
|
926
|
+
finalisedAt: number;
|
|
927
|
+
/**
|
|
928
|
+
* Slippage tolerance from the original quote, in basis points
|
|
929
|
+
*/
|
|
930
|
+
slippageTolerance?: number;
|
|
931
|
+
/**
|
|
932
|
+
* Realized slippage of the settled output vs the quoted expected output, in basis points. Positive means the swap settled for less than quoted
|
|
933
|
+
*/
|
|
934
|
+
realizedSlippageBps?: number;
|
|
935
|
+
transient?: {
|
|
936
|
+
estimatedTimeToComplete: number;
|
|
937
|
+
currentLegIndex?: number;
|
|
938
|
+
estimates?: {
|
|
939
|
+
inboundObservation: number;
|
|
940
|
+
inboundConfirmation: number;
|
|
941
|
+
streamingSwap: number;
|
|
942
|
+
outboundDelay: number;
|
|
943
|
+
outboundObservation: number;
|
|
944
|
+
currentStage: string;
|
|
945
|
+
};
|
|
946
|
+
providerDetails?: {
|
|
947
|
+
streamingDetails?: {
|
|
948
|
+
quantity?: number;
|
|
949
|
+
count?: number;
|
|
950
|
+
interval?: number;
|
|
951
|
+
subSwapsMap?: Array<number>;
|
|
952
|
+
};
|
|
953
|
+
depositChannelId?: string;
|
|
954
|
+
depositAddress?: string;
|
|
955
|
+
};
|
|
956
|
+
};
|
|
957
|
+
meta?: {
|
|
958
|
+
broadcastedAt?: number;
|
|
959
|
+
wallet?: string;
|
|
960
|
+
quoteId?: string;
|
|
961
|
+
explorerUrl?: string;
|
|
962
|
+
providerExplorerUrl?: string;
|
|
963
|
+
affiliate?: string;
|
|
964
|
+
fees?: Array<{
|
|
965
|
+
type: 'liquidity' | 'network' | 'inbound' | 'outbound' | 'affiliate' | 'service' | 'tax' | 'priority';
|
|
966
|
+
amount: string;
|
|
967
|
+
amountBps?: number;
|
|
968
|
+
asset: string;
|
|
969
|
+
chain: string;
|
|
970
|
+
protocol: 'CHAINFLIP' | 'CHAINFLIP_STREAMING' | 'MAYACHAIN' | 'MAYACHAIN_STREAMING' | 'ONEINCH' | 'PANCAKESWAP' | 'SUSHISWAP_V2' | 'THORCHAIN' | 'THORCHAIN_STREAMING' | 'TRADERJOE_V2' | 'UNISWAP_V2' | 'UNISWAP_V3' | 'JUPITER' | 'OKX' | 'NEAR' | 'GARDEN' | 'HARBOR' | 'FLASHNET' | 'MAYAN' | 'PANGOLIN_V1' | 'CAVIAR_V1' | 'OPENOCEAN_V2' | 'OCISWAP_V1' | 'CAMELOT_V3';
|
|
971
|
+
}>;
|
|
972
|
+
amountInUsd?: string;
|
|
973
|
+
amountOutUsd?: string;
|
|
974
|
+
provider?: 'CHAINFLIP' | 'CHAINFLIP_STREAMING' | 'MAYACHAIN' | 'MAYACHAIN_STREAMING' | 'ONEINCH' | 'PANCAKESWAP' | 'SUSHISWAP_V2' | 'THORCHAIN' | 'THORCHAIN_STREAMING' | 'TRADERJOE_V2' | 'UNISWAP_V2' | 'UNISWAP_V3' | 'JUPITER' | 'OKX' | 'NEAR' | 'GARDEN' | 'HARBOR' | 'FLASHNET' | 'MAYAN' | 'PANGOLIN_V1' | 'CAVIAR_V1' | 'OPENOCEAN_V2' | 'OCISWAP_V1' | 'CAMELOT_V3';
|
|
975
|
+
providerAction?: 'swap' | 'aggregation' | 'addLiquidity' | 'withdrawLiquidity' | 'addSavers' | 'withdrawSavers' | 'borrow' | 'repay' | 'name' | 'donate' | 'claim' | 'stake' | 'unstake' | 'createOrder' | 'cancelOrder';
|
|
976
|
+
providerOrderId?: string;
|
|
977
|
+
images?: {
|
|
978
|
+
from?: string;
|
|
979
|
+
to?: string;
|
|
980
|
+
provider?: string;
|
|
981
|
+
chain?: string;
|
|
982
|
+
};
|
|
983
|
+
affiliateFees?: Array<{
|
|
984
|
+
affiliate: string;
|
|
985
|
+
bps: string;
|
|
986
|
+
isReferrer: boolean;
|
|
987
|
+
}>;
|
|
988
|
+
failReason?: string;
|
|
989
|
+
failTargetAddress?: string;
|
|
990
|
+
targetAddress?: string;
|
|
991
|
+
};
|
|
992
|
+
payload?: {
|
|
993
|
+
evmCalldata?: string;
|
|
994
|
+
evmValue?: string;
|
|
995
|
+
logs?: unknown;
|
|
996
|
+
memo?: string;
|
|
997
|
+
spender?: string;
|
|
998
|
+
manifest?: unknown;
|
|
999
|
+
intentHash?: string;
|
|
1000
|
+
thorname?: string;
|
|
1001
|
+
decodedPayload?: unknown;
|
|
1002
|
+
};
|
|
1003
|
+
}>;
|
|
1004
|
+
};
|
|
1005
|
+
pendingReason?: 'awaiting_deposit' | 'indexing';
|
|
1006
|
+
};
|
|
766
1007
|
type InsertTrackedTransactionRequest = {
|
|
767
1008
|
legs: Array<{
|
|
768
1009
|
chainId: '36900' | 'aleo' | 'aptos' | '42161' | '1313161554' | '43114' | '8453' | '80094' | '56' | 'bitcoin' | 'bitcoincash' | '3637' | 'cardano' | 'chainflip' | '1116' | '21000000' | 'cosmoshub-4' | '25' | 'dash' | 'dogecoin' | '1' | '100' | 'harbor-1' | 'harbor-stagenet-1' | '999' | 'hype' | 'kaiyo-1' | 'litecoin' | '59144' | 'mayachain-mainnet-v1' | 'mayachain-stagenet-v1' | '4326' | '143' | 'near' | 'noble-1' | '10' | '9745' | 'polkadot' | '137' | 'radix-mainnet' | 'ripple' | '4663' | 'solana' | '146' | 'spark' | 'stellar' | '0x534e5f4d41494e' | 'sui' | 'thorchain-1' | 'thorchain-stagenet-v2' | 'ton' | '728126428' | '130' | '196' | 'zcash';
|
|
@@ -1192,7 +1433,7 @@ type GetQuoteResponse = {
|
|
|
1192
1433
|
nextLegProvider?: 'CHAINFLIP' | 'CHAINFLIP_STREAMING' | 'MAYACHAIN' | 'MAYACHAIN_STREAMING' | 'ONEINCH' | 'PANCAKESWAP' | 'SUSHISWAP_V2' | 'THORCHAIN' | 'THORCHAIN_STREAMING' | 'TRADERJOE_V2' | 'UNISWAP_V2' | 'UNISWAP_V3' | 'JUPITER' | 'OKX' | 'NEAR' | 'GARDEN' | 'HARBOR' | 'FLASHNET' | 'MAYAN' | 'PANGOLIN_V1' | 'CAVIAR_V1' | 'OPENOCEAN_V2' | 'OCISWAP_V1' | 'CAMELOT_V3';
|
|
1193
1434
|
}>;
|
|
1194
1435
|
warnings: Array<{
|
|
1195
|
-
code: 'highSlippage' | 'highPriceImpact' | 'noSourceAddressToBuildTransaction' | 'affiliateFeeTooSmallSoRemoved' | 'unableToApplyReferralProgram' | 'insufficientBalance' | 'insufficientGas' | 'unableToBuildTransaction' | 'unableToEstimateGas' | 'limitPriceBelowSpot' | 'limitPriceWithinFeeGap';
|
|
1436
|
+
code: 'highSlippage' | 'highPriceImpact' | 'noSourceAddressToBuildTransaction' | 'affiliateFeeTooSmallSoRemoved' | 'unableToApplyReferralProgram' | 'insufficientBalance' | 'insufficientGas' | 'unableToBuildTransaction' | 'unableToEstimateGas' | 'limitPriceBelowSpot' | 'limitPriceWithinFeeGap' | 'litecoinMwebNotSupported';
|
|
1196
1437
|
display: string;
|
|
1197
1438
|
tooltip?: string;
|
|
1198
1439
|
}>;
|
|
@@ -1237,7 +1478,7 @@ type GetQuoteResponse = {
|
|
|
1237
1478
|
error?: string;
|
|
1238
1479
|
providerErrors?: Array<{
|
|
1239
1480
|
provider?: 'CHAINFLIP' | 'CHAINFLIP_STREAMING' | 'MAYACHAIN' | 'MAYACHAIN_STREAMING' | 'ONEINCH' | 'PANCAKESWAP' | 'SUSHISWAP_V2' | 'THORCHAIN' | 'THORCHAIN_STREAMING' | 'TRADERJOE_V2' | 'UNISWAP_V2' | 'UNISWAP_V3' | 'JUPITER' | 'OKX' | 'NEAR' | 'GARDEN' | 'HARBOR' | 'FLASHNET' | 'MAYAN' | 'PANGOLIN_V1' | 'CAVIAR_V1' | 'OPENOCEAN_V2' | 'OCISWAP_V1' | 'CAMELOT_V3';
|
|
1240
|
-
errorCode?: 'noRpcFallbacks' | 'requestTimeout' | 'invalidApiVersion' | 'isSanctionedAddress' | 'unknownError' | 'internalServerError' | 'test_error' | 'blockHeaderNotFound' | 'blockHashNotFoundAtHeight' | 'blackListAsset' | 'txHashMissing' | 'invalidAsset' | 'currentBlockHeaderNotFound' | 'failedToRetrieveBalance' | 'failedToRetrieveBlock' | 'failedToRetrieveFees' | 'notImplementedBCH' | 'notImplementedDoge' | 'noPoolsFound' | 'noVaultsFound' | 'noTxFound' | 'multipleCosmosMessages' | 'heightOrHashNotProvided' | 'priceTooVolatile' | 'unknownDenom' | 'invalidBlockHeight' | 'timestampExtrinsicNoArgumentsForBlock' | 'timestampExtrinsicNoTimestampForBlock' | 'noTimestampExtrinsicForHash' | 'timestampExtrinsicNoArgumentsForHash' | 'txMemoUndefined' | 'txMemoIncorrect' | 'txTypeNotFound' | 'txNoMessage' | 'txNotFound' | 'txReceiptNotFound' | 'txParsingError' | 'txLogsParsingError' | 'txFailed' | 'jobDataParsingError' | 'dataformRunFailed' | 'dataformAssertionFailed' | 'blockNotFound' | 'balanceNotFound' | 'blockbookCallFailed' | 'configError' | 'unsafeTestDatabase' | 'synthSwapDisallowed' | 'noQuoteResponse' | 'noPoolAssetsFound' | 'noThorchainPools' | 'noMayachainPools' | 'noThorchainNetworkInfo' | 'invalidAffiliateFee' | 'invalidBuyAssetAddress' | 'invalidSellAssetAddress' | 'invalidSourceAddress' | 'invalidDestinationAddress' | 'invalidParam' | 'xrpAddressRequiresTag' | 'invalidChainId' | 'invalidChain' | 'unsupportedChainId' | 'unsupportedEVMChainId' | 'unsupportedMethod' | 'unsupportedProvider' | 'unsupportedProgram' | 'unsupportedEvent' | 'invalidParamsForMethod' | 'noWhitelistTokens' | 'failedFetchGasPrice' | 'chainflipBrokerApiUnavailable' | 'failedToBuildVaultSwapTransaction' | 'failedToOpenBtcPrivateChannel' | 'failedToCloseBtcPrivateChannel' | 'affiliateNotRegistered' | 'failedToCreateDepositChannel' | 'failedToRegisterAccount' | 'failedToRegisterAffiliate' | 'failedToWithdrawAffiliate' | 'noProviderDetailsFound' | 'noTokenListsFound' | 'tokenNotFound' | 'tokenPriceNotFound' | 'tokenPriceUnavailable' | 'tokenPriceFailedToUpdate' | 'legsArrayIsEmpty' | 'failedToFetchQuoteForLeg' | 'noBlockHeaderFound' | 'failedToSimulateSwap' | 'swapHalted' | 'memoTooLongForSourceChain' | 'addressScreeningFailed' | 'missingScreeningConfig' | 'insufficientLiquidity' | 'noSaversFound' | 'noInbounDataFound' | 'noInboundAddressesFound' | 'noTargetAddress' | 'noInboundAddressFoundForChain' | 'noLastBlocksFound' | 'noVersionFound' | 'noConstantsFound' | 'noMimirsFound' | 'noRoutesFound' | 'quoteNotFound' | 'providerResponseFormError' | 'ledgerWrongPayload' | 'failedToFetchTx' | 'failedBuildTransactionDetails' | 'failedToCreateRouteMetadata' | 'txBuildingTimeout' | 'noLegsForRoute' | 'insufficientBalance' | 'insufficientAllowance' | 'insufficientGas' | 'unableToBuildTransaction' | 'noRouterAddressFound' | 'noAggregatorAddressFound' | 'noContractInstanceFound' | 'noContractAddressFound' | 'invalidAffiliate' | 'invalidAffiliateName' | 'thornameNotFound' | 'thornameAffiliate' | 'No provider found' | 'providerAssetNotFound' | 'No Record found' | 'Slippage too low' | 'tradingHalted' | 'mayanameNotFound' | 'noWrappedGasAsset' | 'aggregatorAddressNotFound' | 'routerAddressNotFound' | 'dummyAddressNotFound' | 'trackerError' | 'thorchainPoolUnavailable' | 'noTradingPairs' | 'missingState' | 'ledgerSwapNotFound' | 'ledgerSwapNotReadyForTracking' | 'ledgerInvalidParsingMode' | 'ledgerWebhookNotifyFailed' | 'errorEstimatingGas' | 'apiKeyInvalid' | 'apiKeyFailedToUpdate' | 'apiKeySignatureExists' | 'apiKeySignatureKeyTypeMismatch' | 'apiKeyExpired' | 'unauthorized' | 'failedToCreateMemo' | 'invalidAddressForChain' | 'invalidAddress' | 'riskyAddress' | 'noRoutesToProcess' | 'sellAssetAmountTooSmall' | 'sellAssetAmountTooLarge' | 'missingPrivateKey' | 'noMemoPriceProtection' | 'nodeMethodNotFound' | 'nodeRpcNotFound' | 'thirdPartyProviderNotFound' | 'quoteUnavailable' | 'targetInstructionNotFound' | 'referrerExist' | 'referrerNotFound' | 'invalidReferrer' | 'quoteLogicError' | 'missingDecimal' | 'noGasInfoInDB' | 'quoteError' | 'valueOverflow' | 'missingChainflipMeta' | 'contractAndMethodRequired' | 'tokenImageError' | 'fileNotFound' | 'fileFormatError' | 'ipError' | 'failedToSaveLedgerSwap' | 'missingValue' | 'missingDBQueryParam' | 'unableEstimateTxTime' | 'affiliateStatsMissingDate' | 'affiliateStatsMissingNextFilter' | 'affiliateStatsNoActions' | 'unsupportedNotificationEvent' | 'unsupportedNotificationChannel' | 'invalidWebhookUrl' | 'webhookDeliveryFailed' | 'serverStateNotFound' | 'apiRequestFailed' | 'apiRateLimit' | 'invalidActionStep' | 'providerIsRequired' | 'rateLimitExceeded' | 'depositChannelNotFound' | 'auditLogInsertFailed' | 'affiliateNameHistoryInsertFailed' | 'invalidRouteId' | 'invalidQuoteId' | 'invalidRoute' | 'quoteExpired' | 'swapQuoteNotFound' | 'swapRouteNotFound' | 'swapTransactionFailed' | 'swapChainflipMetaMissing' | 'swapChainflipChannelFailed' | 'swapTransferTxFailed' | 'chainflipVaultSwapNotSupported' | 'chainflipVaultSwapEncodingFailed' | 'chainflipVaultSwapInvalidChain' | 'chainflipVaultSwapBitcoinCCMNotSupported' | 'chainflipVaultSwapTransactionBuildFailed' | 'zcashInvalidAddress' | 'zcashInsufficientUTXOs' | 'zcashUTXOSelectionFailed' | 'zcashTransactionBuildFailed' | 'zcashShieldedRefundMissing' | 'zcashMemoTooLong' | 'zcashUnifiedAddressUnsupported' | 'zcashShieldedMemoUnavailable' | 'invalidTokenProgram' | 'solanaOutputBelowRentExemptMinimum' | 'solanaTokenProgramUnavailable' | 'invalidRequest' | 'pubsubEventNotRegistered' | 'pubsubTopicNotFound' | 'pubsubEnvelopeParsingError' | 'invalidSpender' | 'outputAmountDeviationTooHigh' | 'swapSizeExceeded' | 'v2EndpointNotAllowed' | 'externalServiceFailed' | 'tenantEncryptKeyNotFound' | 'tenantKeyPairEncryptionError' | 'slip24AmountOverflow' | 'slip24InvalidSignature' | 'slip24DigestComputationFailed' | 'invalidTxHashFormat' | 'affiliateNotFound' | 'nearAffiliateProviderAssetNotFound' | 'nearAffiliateDepositAddressFailed' | 'flashnetAffiliateRegistrationFailed' | 'flashnetAffiliateClaimFailed' | 'flashnetAffiliateNotFound' | 'limitOrderUnsupportedChain' | 'limitOrderQuoteNotFound' | 'limitOrderRouteNotFound' | 'limitOrderNotFound' | 'limitOrderInvalidState' | 'limitOrderBuildFailed' | 'limitOrderSubmissionFailed' | 'limitOrderCancelFailed' | 'limitOrderExpirationOutOfBounds' | 'limitOrderUnsupportedFillFlags' | 'limitOrderAmountAmbiguous' | 'limitOrderChainMismatch' | 'limitOrderUnsupportedPair' | 'limitOrderActionUnavailable' | 'limitOrderProviderError';
|
|
1481
|
+
errorCode?: 'noRpcFallbacks' | 'requestTimeout' | 'invalidApiVersion' | 'isSanctionedAddress' | 'unknownError' | 'internalServerError' | 'test_error' | 'blockHeaderNotFound' | 'blockHashNotFoundAtHeight' | 'blackListAsset' | 'txHashMissing' | 'invalidAsset' | 'currentBlockHeaderNotFound' | 'failedToRetrieveBalance' | 'failedToRetrieveBlock' | 'failedToRetrieveFees' | 'notImplementedBCH' | 'notImplementedDoge' | 'noPoolsFound' | 'noVaultsFound' | 'noTxFound' | 'multipleCosmosMessages' | 'heightOrHashNotProvided' | 'priceTooVolatile' | 'unknownDenom' | 'invalidBlockHeight' | 'timestampExtrinsicNoArgumentsForBlock' | 'timestampExtrinsicNoTimestampForBlock' | 'noTimestampExtrinsicForHash' | 'timestampExtrinsicNoArgumentsForHash' | 'txMemoUndefined' | 'txMemoIncorrect' | 'txTypeNotFound' | 'txNoMessage' | 'txNotFound' | 'txReceiptNotFound' | 'txParsingError' | 'txLogsParsingError' | 'txFailed' | 'jobDataParsingError' | 'dataformRunFailed' | 'dataformAssertionFailed' | 'blockNotFound' | 'balanceNotFound' | 'blockbookCallFailed' | 'configError' | 'unsafeTestDatabase' | 'synthSwapDisallowed' | 'noQuoteResponse' | 'noPoolAssetsFound' | 'noThorchainPools' | 'noMayachainPools' | 'noThorchainNetworkInfo' | 'invalidAffiliateFee' | 'invalidBuyAssetAddress' | 'invalidSellAssetAddress' | 'invalidSourceAddress' | 'invalidDestinationAddress' | 'invalidParam' | 'xrpAddressRequiresTag' | 'invalidChainId' | 'invalidChain' | 'unsupportedChainId' | 'unsupportedEVMChainId' | 'unsupportedMethod' | 'unsupportedProvider' | 'unsupportedProgram' | 'unsupportedEvent' | 'invalidParamsForMethod' | 'noWhitelistTokens' | 'failedFetchGasPrice' | 'chainflipBrokerApiUnavailable' | 'failedToBuildVaultSwapTransaction' | 'failedToOpenBtcPrivateChannel' | 'failedToCloseBtcPrivateChannel' | 'affiliateNotRegistered' | 'failedToCreateDepositChannel' | 'failedToRegisterAccount' | 'failedToRegisterAffiliate' | 'failedToWithdrawAffiliate' | 'noProviderDetailsFound' | 'noTokenListsFound' | 'tokenNotFound' | 'tokenPriceNotFound' | 'tokenPriceUnavailable' | 'tokenPriceFailedToUpdate' | 'legsArrayIsEmpty' | 'failedToFetchQuoteForLeg' | 'noBlockHeaderFound' | 'failedToSimulateSwap' | 'swapHalted' | 'memoTooLongForSourceChain' | 'addressScreeningFailed' | 'missingScreeningConfig' | 'insufficientLiquidity' | 'noSaversFound' | 'noInbounDataFound' | 'noInboundAddressesFound' | 'noTargetAddress' | 'noInboundAddressFoundForChain' | 'noLastBlocksFound' | 'noVersionFound' | 'noConstantsFound' | 'noMimirsFound' | 'noRoutesFound' | 'quoteNotFound' | 'providerResponseFormError' | 'ledgerWrongPayload' | 'failedToFetchTx' | 'failedBuildTransactionDetails' | 'failedToCreateRouteMetadata' | 'txBuildingTimeout' | 'noLegsForRoute' | 'insufficientBalance' | 'insufficientAllowance' | 'insufficientGas' | 'unableToBuildTransaction' | 'noRouterAddressFound' | 'noAggregatorAddressFound' | 'noContractInstanceFound' | 'noContractAddressFound' | 'invalidAffiliate' | 'invalidAffiliateName' | 'thornameNotFound' | 'thornameAffiliate' | 'No provider found' | 'providerAssetNotFound' | 'No Record found' | 'Slippage too low' | 'tradingHalted' | 'mayanameNotFound' | 'noWrappedGasAsset' | 'aggregatorAddressNotFound' | 'routerAddressNotFound' | 'dummyAddressNotFound' | 'trackerError' | 'thorchainPoolUnavailable' | 'noTradingPairs' | 'missingState' | 'ledgerSwapNotFound' | 'ledgerSwapNotReadyForTracking' | 'ledgerInvalidParsingMode' | 'ledgerWebhookNotifyFailed' | 'errorEstimatingGas' | 'apiKeyInvalid' | 'apiKeyFailedToUpdate' | 'apiKeySignatureExists' | 'apiKeySignatureKeyTypeMismatch' | 'apiKeyExpired' | 'unauthorized' | 'failedToCreateMemo' | 'invalidAddressForChain' | 'invalidAddress' | 'riskyAddress' | 'noRoutesToProcess' | 'sellAssetAmountTooSmall' | 'sellAssetAmountTooLarge' | 'missingPrivateKey' | 'noMemoPriceProtection' | 'nodeMethodNotFound' | 'nodeRpcNotFound' | 'thirdPartyProviderNotFound' | 'quoteUnavailable' | 'targetInstructionNotFound' | 'referrerExist' | 'referrerNotFound' | 'invalidReferrer' | 'quoteLogicError' | 'missingDecimal' | 'noGasInfoInDB' | 'quoteError' | 'valueOverflow' | 'missingChainflipMeta' | 'contractAndMethodRequired' | 'tokenImageError' | 'fileNotFound' | 'fileFormatError' | 'ipError' | 'failedToSaveLedgerSwap' | 'missingValue' | 'missingDBQueryParam' | 'unableEstimateTxTime' | 'affiliateStatsMissingDate' | 'affiliateStatsMissingNextFilter' | 'affiliateStatsNoActions' | 'unsupportedNotificationEvent' | 'unsupportedNotificationChannel' | 'invalidWebhookUrl' | 'webhookDeliveryFailed' | 'serverStateNotFound' | 'apiRequestFailed' | 'apiRateLimit' | 'invalidActionStep' | 'providerIsRequired' | 'rateLimitExceeded' | 'depositChannelNotFound' | 'auditLogInsertFailed' | 'affiliateNameHistoryInsertFailed' | 'invalidRouteId' | 'invalidQuoteId' | 'invalidRoute' | 'quoteExpired' | 'swapQuoteNotFound' | 'swapRouteNotFound' | 'swapTransactionFailed' | 'swapChainflipMetaMissing' | 'swapChainflipChannelFailed' | 'swapTransferTxFailed' | 'chainflipVaultSwapNotSupported' | 'chainflipVaultSwapEncodingFailed' | 'chainflipVaultSwapInvalidChain' | 'chainflipVaultSwapBitcoinCCMNotSupported' | 'chainflipVaultSwapTransactionBuildFailed' | 'zcashInvalidAddress' | 'zcashInsufficientUTXOs' | 'zcashUTXOSelectionFailed' | 'zcashTransactionBuildFailed' | 'zcashShieldedRefundMissing' | 'zcashMemoTooLong' | 'litecoinMwebAddressUnsupported' | 'zcashUnifiedAddressUnsupported' | 'zcashShieldedMemoUnavailable' | 'invalidTokenProgram' | 'solanaOutputBelowRentExemptMinimum' | 'solanaTokenProgramUnavailable' | 'invalidRequest' | 'pubsubEventNotRegistered' | 'pubsubTopicNotFound' | 'pubsubEnvelopeParsingError' | 'invalidSpender' | 'outputAmountDeviationTooHigh' | 'swapSizeExceeded' | 'v2EndpointNotAllowed' | 'externalServiceFailed' | 'tenantEncryptKeyNotFound' | 'tenantKeyPairEncryptionError' | 'slip24AmountOverflow' | 'slip24InvalidSignature' | 'slip24DigestComputationFailed' | 'invalidTxHashFormat' | 'affiliateNotFound' | 'nearAffiliateProviderAssetNotFound' | 'nearAffiliateDepositAddressFailed' | 'flashnetAffiliateRegistrationFailed' | 'flashnetAffiliateClaimFailed' | 'flashnetAffiliateNotFound' | 'limitOrderUnsupportedChain' | 'limitOrderQuoteNotFound' | 'limitOrderRouteNotFound' | 'limitOrderNotFound' | 'limitOrderInvalidState' | 'limitOrderBuildFailed' | 'limitOrderSubmissionFailed' | 'limitOrderCancelFailed' | 'limitOrderExpirationOutOfBounds' | 'limitOrderUnsupportedFillFlags' | 'limitOrderAmountAmbiguous' | 'limitOrderChainMismatch' | 'limitOrderUnsupportedPair' | 'limitOrderActionUnavailable' | 'limitOrderProviderError';
|
|
1241
1482
|
message?: string;
|
|
1242
1483
|
/**
|
|
1243
1484
|
* Provider minimum sell amount (human units), when the provider reported one
|
|
@@ -1427,7 +1668,7 @@ type ExecuteSwapResponse = {
|
|
|
1427
1668
|
nextLegProvider?: 'CHAINFLIP' | 'CHAINFLIP_STREAMING' | 'MAYACHAIN' | 'MAYACHAIN_STREAMING' | 'ONEINCH' | 'PANCAKESWAP' | 'SUSHISWAP_V2' | 'THORCHAIN' | 'THORCHAIN_STREAMING' | 'TRADERJOE_V2' | 'UNISWAP_V2' | 'UNISWAP_V3' | 'JUPITER' | 'OKX' | 'NEAR' | 'GARDEN' | 'HARBOR' | 'FLASHNET' | 'MAYAN' | 'PANGOLIN_V1' | 'CAVIAR_V1' | 'OPENOCEAN_V2' | 'OCISWAP_V1' | 'CAMELOT_V3';
|
|
1428
1669
|
}>;
|
|
1429
1670
|
warnings: Array<{
|
|
1430
|
-
code: 'highSlippage' | 'highPriceImpact' | 'noSourceAddressToBuildTransaction' | 'affiliateFeeTooSmallSoRemoved' | 'unableToApplyReferralProgram' | 'insufficientBalance' | 'insufficientGas' | 'unableToBuildTransaction' | 'unableToEstimateGas' | 'limitPriceBelowSpot' | 'limitPriceWithinFeeGap';
|
|
1671
|
+
code: 'highSlippage' | 'highPriceImpact' | 'noSourceAddressToBuildTransaction' | 'affiliateFeeTooSmallSoRemoved' | 'unableToApplyReferralProgram' | 'insufficientBalance' | 'insufficientGas' | 'unableToBuildTransaction' | 'unableToEstimateGas' | 'limitPriceBelowSpot' | 'limitPriceWithinFeeGap' | 'litecoinMwebNotSupported';
|
|
1431
1672
|
display: string;
|
|
1432
1673
|
tooltip?: string;
|
|
1433
1674
|
}>;
|
|
@@ -2505,4 +2746,4 @@ declare const ChainflipService: {
|
|
|
2505
2746
|
readonly createBrokerChannel: <ThrowOnError extends boolean = false>(options: Options<CreateBrokerChannelData, ThrowOnError>) => RequestResult<CreateBrokerChannelResponses, unknown, ThrowOnError>;
|
|
2506
2747
|
};
|
|
2507
2748
|
|
|
2508
|
-
export { ChainflipService, type ClientOptions, type CreateBrokerChannelData, type CreateBrokerChannelRequest, type CreateBrokerChannelResponse, type CreateBrokerChannelResponse2, type CreateBrokerChannelResponses, type ExecuteSwapData, type ExecuteSwapError, type ExecuteSwapErrors, type ExecuteSwapRequest, type ExecuteSwapResponse, type ExecuteSwapResponse2, type ExecuteSwapResponses, GasService, type GetAssetProvidersResponse, type GetCachedPriceData, type GetCachedPriceRequest, type GetCachedPriceResponse, type GetCachedPriceResponse2, type GetCachedPriceResponses, type GetGasHistoryData, type GetGasHistoryResponse, type GetGasHistoryResponse2, type GetGasHistoryResponses, type GetGasPricesData, type GetGasPricesResponse, type GetGasPricesResponse2, type GetGasPricesResponses, type GetProviderIdentifiersMappingResponse, type GetProvidersData, type GetProvidersError, type GetProvidersErrors, type GetProvidersResponse, type GetProvidersResponse2, type GetProvidersResponses, type GetProvidersStatusResponse, type GetQuoteData, type GetQuoteError, type GetQuoteErrors, type GetQuoteRequest, type GetQuoteResponse, type GetQuoteResponse2, type GetQuoteResponses, type GetSwapFromAssetsData, type GetSwapFromAssetsError, type GetSwapFromAssetsErrors, type GetSwapFromAssetsResponse, type GetSwapFromAssetsResponse2, type GetSwapFromAssetsResponses, type GetSwapToAssetsData, type GetSwapToAssetsError, type GetSwapToAssetsErrors, type GetSwapToAssetsResponse, type GetSwapToAssetsResponse2, type GetSwapToAssetsResponses, type GetTokensData, type GetTokensError, type GetTokensErrors, type GetTokensResponse, type GetTokensResponse2, type GetTokensResponses, type GetWhitelistPoolsResponse, type GetWhitelistTokensResponse, type InsertTrackedTransactionRequest, type InsertTrackedTransactionResponse, type Options, PriceService, QuoteService, type RegisterChainflipAffiliateRequest, type RegisterChainflipAffiliateResponse, type ScreenAddressData, type ScreenAddressError, type ScreenAddressErrors, type ScreenAddressRequest, type ScreenAddressResponse, type ScreenAddressResponse2, type ScreenAddressResponses, ScreenService, type SearchTokensData, type SearchTokensError, type SearchTokensErrors, type SearchTokensResponse, type SearchTokensResponse2, type SearchTokensResponses, type SwapKitClientOptions, SwapKitService, SwapService, TokenlistService, TrackService, type TrackTransactionData, type TrackTransactionError, type TrackTransactionErrors, type TrackTransactionRequest, type TrackTransactionResponse, type TrackTransactionResponse2, type TrackTransactionResponses, type WithdrawChainflipAffiliateFeesRequest, type WithdrawChainflipAffiliateFeesResponse, client, configureSwapKit, createBrokerChannel, executeSwap, getCachedPrice, getGasHistory, getGasPrices, getProviders, getQuote, getSwapFromAssets, getSwapToAssets, getTokens, screenAddress, searchTokens, trackTransaction };
|
|
2749
|
+
export { ChainflipService, type ClientOptions, type CreateBrokerChannelData, type CreateBrokerChannelRequest, type CreateBrokerChannelResponse, type CreateBrokerChannelResponse2, type CreateBrokerChannelResponses, type ExecuteSwapData, type ExecuteSwapError, type ExecuteSwapErrors, type ExecuteSwapRequest, type ExecuteSwapResponse, type ExecuteSwapResponse2, type ExecuteSwapResponses, GasService, type GetAssetProvidersResponse, type GetCachedPriceData, type GetCachedPriceRequest, type GetCachedPriceResponse, type GetCachedPriceResponse2, type GetCachedPriceResponses, type GetGasHistoryData, type GetGasHistoryResponse, type GetGasHistoryResponse2, type GetGasHistoryResponses, type GetGasPricesData, type GetGasPricesResponse, type GetGasPricesResponse2, type GetGasPricesResponses, type GetProviderIdentifiersMappingResponse, type GetProvidersData, type GetProvidersError, type GetProvidersErrors, type GetProvidersResponse, type GetProvidersResponse2, type GetProvidersResponses, type GetProvidersStatusResponse, type GetQuoteData, type GetQuoteError, type GetQuoteErrors, type GetQuoteRequest, type GetQuoteResponse, type GetQuoteResponse2, type GetQuoteResponses, type GetSwapFromAssetsData, type GetSwapFromAssetsError, type GetSwapFromAssetsErrors, type GetSwapFromAssetsResponse, type GetSwapFromAssetsResponse2, type GetSwapFromAssetsResponses, type GetSwapToAssetsData, type GetSwapToAssetsError, type GetSwapToAssetsErrors, type GetSwapToAssetsResponse, type GetSwapToAssetsResponse2, type GetSwapToAssetsResponses, type GetTokensData, type GetTokensError, type GetTokensErrors, type GetTokensResponse, type GetTokensResponse2, type GetTokensResponses, type GetWhitelistPoolsResponse, type GetWhitelistTokensResponse, type InsertTrackedTransactionRequest, type InsertTrackedTransactionResponse, type Options, PriceService, QuoteService, type RegisterChainflipAffiliateRequest, type RegisterChainflipAffiliateResponse, type ScreenAddressData, type ScreenAddressError, type ScreenAddressErrors, type ScreenAddressRequest, type ScreenAddressResponse, type ScreenAddressResponse2, type ScreenAddressResponses, ScreenService, type SearchTokensData, type SearchTokensError, type SearchTokensErrors, type SearchTokensResponse, type SearchTokensResponse2, type SearchTokensResponses, type SwapKitClientOptions, SwapKitService, SwapService, TokenlistService, type TrackLedgerSwapResponse, TrackService, type TrackTransactionData, type TrackTransactionError, type TrackTransactionErrors, type TrackTransactionRequest, type TrackTransactionResponse, type TrackTransactionResponse2, type TrackTransactionResponses, type WithdrawChainflipAffiliateFeesRequest, type WithdrawChainflipAffiliateFeesResponse, client, configureSwapKit, createBrokerChannel, executeSwap, getCachedPrice, getGasHistory, getGasPrices, getProviders, getQuote, getSwapFromAssets, getSwapToAssets, getTokens, screenAddress, searchTokens, trackTransaction };
|
package/package.json
CHANGED
package/src/types.ts
CHANGED
|
@@ -454,6 +454,248 @@ export type TrackTransactionResponse = {
|
|
|
454
454
|
}>;
|
|
455
455
|
};
|
|
456
456
|
|
|
457
|
+
export type TrackLedgerSwapResponse = {
|
|
458
|
+
ledgerSwap: {
|
|
459
|
+
swapId: string;
|
|
460
|
+
/**
|
|
461
|
+
* Last persisted Ledger status. e.g. `READY`, `PENDING`, `FINISHED`
|
|
462
|
+
*/
|
|
463
|
+
status: string;
|
|
464
|
+
/**
|
|
465
|
+
* Provider that quoted the swap. e.g. `NEAR`
|
|
466
|
+
*/
|
|
467
|
+
provider?: string;
|
|
468
|
+
/**
|
|
469
|
+
* ISO-8601 timestamp of when the swap payload was built
|
|
470
|
+
*/
|
|
471
|
+
createdAt: string;
|
|
472
|
+
fromAsset: string;
|
|
473
|
+
toAsset: string;
|
|
474
|
+
fromAmount: string;
|
|
475
|
+
expectedAmountTo?: string;
|
|
476
|
+
/**
|
|
477
|
+
* Deposit address the end user was instructed to fund
|
|
478
|
+
*/
|
|
479
|
+
payinAddress: string;
|
|
480
|
+
payinTransactionId?: string;
|
|
481
|
+
payoutTransactionId?: string;
|
|
482
|
+
providerFees: string;
|
|
483
|
+
referralFees: string;
|
|
484
|
+
payoutNetworkFees: string;
|
|
485
|
+
};
|
|
486
|
+
transaction?: {
|
|
487
|
+
chainId: '36900' | 'aleo' | 'aptos' | '42161' | '1313161554' | '43114' | '8453' | '80094' | '56' | 'bitcoin' | 'bitcoincash' | '3637' | 'cardano' | 'chainflip' | '1116' | '21000000' | 'cosmoshub-4' | '25' | 'dash' | 'dogecoin' | '1' | '100' | 'harbor-1' | 'harbor-stagenet-1' | '999' | 'hype' | 'kaiyo-1' | 'litecoin' | '59144' | 'mayachain-mainnet-v1' | 'mayachain-stagenet-v1' | '4326' | '143' | 'near' | 'noble-1' | '10' | '9745' | 'polkadot' | '137' | 'radix-mainnet' | 'ripple' | '4663' | 'solana' | '146' | 'spark' | 'stellar' | '0x534e5f4d41494e' | 'sui' | 'thorchain-1' | 'thorchain-stagenet-v2' | 'ton' | '728126428' | '130' | '196' | 'zcash';
|
|
488
|
+
hash: string;
|
|
489
|
+
block: number;
|
|
490
|
+
type: 'approve' | 'claim' | 'deposit' | 'lending' | 'lp_action' | 'native_contract_call' | 'native_send' | 'stake' | 'unstake' | 'streaming_swap' | 'swap' | 'thorname_action' | 'token_contract_call' | 'token_transfer' | 'unknown' | 'donate';
|
|
491
|
+
status: 'unknown' | 'not_started' | 'pending' | 'swapping' | 'completed' | 'refunded' | 'failed';
|
|
492
|
+
trackingStatus?: 'not_started' | 'starting' | 'broadcasted' | 'mempool' | 'inbound' | 'outbound' | 'swapping' | 'completed' | 'refunded' | 'partially_refunded' | 'dropped' | 'reverted' | 'replaced' | 'retries_exceeded' | 'parsing_error';
|
|
493
|
+
fromAsset: string;
|
|
494
|
+
fromAmount: string;
|
|
495
|
+
fromAddress: string;
|
|
496
|
+
toAsset: string;
|
|
497
|
+
toAmount: string;
|
|
498
|
+
toAddress: string;
|
|
499
|
+
finalAsset?: {
|
|
500
|
+
chain: 'ADI' | 'ALEO' | 'APT' | 'ARB' | 'AURORA' | 'AVAX' | 'BASE' | 'BERA' | 'BSC' | 'BTC' | 'BCH' | 'BOTANIX' | 'ADA' | 'FLIP' | 'CORE' | 'CORN' | 'GAIA' | 'CRO' | 'DASH' | 'DOGE' | 'ETH' | 'GNO' | 'HARBOR' | 'HYPEREVM' | 'HYPE' | 'KUJI' | 'LTC' | 'LINEA' | 'MAYA' | 'MEGAETH' | 'MONAD' | 'NEAR' | 'NOBLE' | 'OP' | 'XPL' | 'DOT' | 'POL' | 'XRD' | 'XRP' | 'HOOD' | 'SOL' | 'SONIC' | 'SPARK' | 'XLM' | 'STRK' | 'SUI' | 'THOR' | 'TON' | 'TRON' | 'UNI' | 'XLAYER' | 'ZEC';
|
|
501
|
+
symbol: string;
|
|
502
|
+
ticker: string;
|
|
503
|
+
decimal?: number;
|
|
504
|
+
address?: string;
|
|
505
|
+
isGasAsset: boolean;
|
|
506
|
+
isSynthetic: boolean;
|
|
507
|
+
tax?: {
|
|
508
|
+
buy: number;
|
|
509
|
+
sell: number;
|
|
510
|
+
};
|
|
511
|
+
};
|
|
512
|
+
finalAddress?: string;
|
|
513
|
+
finalisedAt: number;
|
|
514
|
+
/**
|
|
515
|
+
* Slippage tolerance from the original quote, in basis points
|
|
516
|
+
*/
|
|
517
|
+
slippageTolerance?: number;
|
|
518
|
+
/**
|
|
519
|
+
* Realized slippage of the settled output vs the quoted expected output, in basis points. Positive means the swap settled for less than quoted
|
|
520
|
+
*/
|
|
521
|
+
realizedSlippageBps?: number;
|
|
522
|
+
transient?: {
|
|
523
|
+
estimatedTimeToComplete: number;
|
|
524
|
+
currentLegIndex?: number;
|
|
525
|
+
estimates?: {
|
|
526
|
+
inboundObservation: number;
|
|
527
|
+
inboundConfirmation: number;
|
|
528
|
+
streamingSwap: number;
|
|
529
|
+
outboundDelay: number;
|
|
530
|
+
outboundObservation: number;
|
|
531
|
+
currentStage: string;
|
|
532
|
+
};
|
|
533
|
+
providerDetails?: {
|
|
534
|
+
streamingDetails?: {
|
|
535
|
+
quantity?: number;
|
|
536
|
+
count?: number;
|
|
537
|
+
interval?: number;
|
|
538
|
+
subSwapsMap?: Array<number>;
|
|
539
|
+
};
|
|
540
|
+
depositChannelId?: string;
|
|
541
|
+
depositAddress?: string;
|
|
542
|
+
};
|
|
543
|
+
};
|
|
544
|
+
meta?: {
|
|
545
|
+
broadcastedAt?: number;
|
|
546
|
+
wallet?: string;
|
|
547
|
+
quoteId?: string;
|
|
548
|
+
explorerUrl?: string;
|
|
549
|
+
providerExplorerUrl?: string;
|
|
550
|
+
affiliate?: string;
|
|
551
|
+
fees?: Array<{
|
|
552
|
+
type: 'liquidity' | 'network' | 'inbound' | 'outbound' | 'affiliate' | 'service' | 'tax' | 'priority';
|
|
553
|
+
amount: string;
|
|
554
|
+
amountBps?: number;
|
|
555
|
+
asset: string;
|
|
556
|
+
chain: string;
|
|
557
|
+
protocol: 'CHAINFLIP' | 'CHAINFLIP_STREAMING' | 'MAYACHAIN' | 'MAYACHAIN_STREAMING' | 'ONEINCH' | 'PANCAKESWAP' | 'SUSHISWAP_V2' | 'THORCHAIN' | 'THORCHAIN_STREAMING' | 'TRADERJOE_V2' | 'UNISWAP_V2' | 'UNISWAP_V3' | 'JUPITER' | 'OKX' | 'NEAR' | 'GARDEN' | 'HARBOR' | 'FLASHNET' | 'MAYAN' | 'PANGOLIN_V1' | 'CAVIAR_V1' | 'OPENOCEAN_V2' | 'OCISWAP_V1' | 'CAMELOT_V3';
|
|
558
|
+
}>;
|
|
559
|
+
amountInUsd?: string;
|
|
560
|
+
amountOutUsd?: string;
|
|
561
|
+
provider?: 'CHAINFLIP' | 'CHAINFLIP_STREAMING' | 'MAYACHAIN' | 'MAYACHAIN_STREAMING' | 'ONEINCH' | 'PANCAKESWAP' | 'SUSHISWAP_V2' | 'THORCHAIN' | 'THORCHAIN_STREAMING' | 'TRADERJOE_V2' | 'UNISWAP_V2' | 'UNISWAP_V3' | 'JUPITER' | 'OKX' | 'NEAR' | 'GARDEN' | 'HARBOR' | 'FLASHNET' | 'MAYAN' | 'PANGOLIN_V1' | 'CAVIAR_V1' | 'OPENOCEAN_V2' | 'OCISWAP_V1' | 'CAMELOT_V3';
|
|
562
|
+
providerAction?: 'swap' | 'aggregation' | 'addLiquidity' | 'withdrawLiquidity' | 'addSavers' | 'withdrawSavers' | 'borrow' | 'repay' | 'name' | 'donate' | 'claim' | 'stake' | 'unstake' | 'createOrder' | 'cancelOrder';
|
|
563
|
+
providerOrderId?: string;
|
|
564
|
+
images?: {
|
|
565
|
+
from?: string;
|
|
566
|
+
to?: string;
|
|
567
|
+
provider?: string;
|
|
568
|
+
chain?: string;
|
|
569
|
+
};
|
|
570
|
+
affiliateFees?: Array<{
|
|
571
|
+
affiliate: string;
|
|
572
|
+
bps: string;
|
|
573
|
+
isReferrer: boolean;
|
|
574
|
+
}>;
|
|
575
|
+
failReason?: string;
|
|
576
|
+
failTargetAddress?: string;
|
|
577
|
+
targetAddress?: string;
|
|
578
|
+
};
|
|
579
|
+
payload?: {
|
|
580
|
+
evmCalldata?: string;
|
|
581
|
+
evmValue?: string;
|
|
582
|
+
logs?: unknown;
|
|
583
|
+
memo?: string;
|
|
584
|
+
spender?: string;
|
|
585
|
+
manifest?: unknown;
|
|
586
|
+
intentHash?: string;
|
|
587
|
+
thorname?: string;
|
|
588
|
+
decodedPayload?: unknown;
|
|
589
|
+
};
|
|
590
|
+
legs: Array<{
|
|
591
|
+
chainId: '36900' | 'aleo' | 'aptos' | '42161' | '1313161554' | '43114' | '8453' | '80094' | '56' | 'bitcoin' | 'bitcoincash' | '3637' | 'cardano' | 'chainflip' | '1116' | '21000000' | 'cosmoshub-4' | '25' | 'dash' | 'dogecoin' | '1' | '100' | 'harbor-1' | 'harbor-stagenet-1' | '999' | 'hype' | 'kaiyo-1' | 'litecoin' | '59144' | 'mayachain-mainnet-v1' | 'mayachain-stagenet-v1' | '4326' | '143' | 'near' | 'noble-1' | '10' | '9745' | 'polkadot' | '137' | 'radix-mainnet' | 'ripple' | '4663' | 'solana' | '146' | 'spark' | 'stellar' | '0x534e5f4d41494e' | 'sui' | 'thorchain-1' | 'thorchain-stagenet-v2' | 'ton' | '728126428' | '130' | '196' | 'zcash';
|
|
592
|
+
hash: string;
|
|
593
|
+
block: number;
|
|
594
|
+
type: 'approve' | 'claim' | 'deposit' | 'lending' | 'lp_action' | 'native_contract_call' | 'native_send' | 'stake' | 'unstake' | 'streaming_swap' | 'swap' | 'thorname_action' | 'token_contract_call' | 'token_transfer' | 'unknown' | 'donate';
|
|
595
|
+
status: 'unknown' | 'not_started' | 'pending' | 'swapping' | 'completed' | 'refunded' | 'failed';
|
|
596
|
+
trackingStatus?: 'not_started' | 'starting' | 'broadcasted' | 'mempool' | 'inbound' | 'outbound' | 'swapping' | 'completed' | 'refunded' | 'partially_refunded' | 'dropped' | 'reverted' | 'replaced' | 'retries_exceeded' | 'parsing_error';
|
|
597
|
+
fromAsset: string;
|
|
598
|
+
fromAmount: string;
|
|
599
|
+
fromAddress: string;
|
|
600
|
+
toAsset: string;
|
|
601
|
+
toAmount: string;
|
|
602
|
+
toAddress: string;
|
|
603
|
+
finalAsset?: {
|
|
604
|
+
chain: 'ADI' | 'ALEO' | 'APT' | 'ARB' | 'AURORA' | 'AVAX' | 'BASE' | 'BERA' | 'BSC' | 'BTC' | 'BCH' | 'BOTANIX' | 'ADA' | 'FLIP' | 'CORE' | 'CORN' | 'GAIA' | 'CRO' | 'DASH' | 'DOGE' | 'ETH' | 'GNO' | 'HARBOR' | 'HYPEREVM' | 'HYPE' | 'KUJI' | 'LTC' | 'LINEA' | 'MAYA' | 'MEGAETH' | 'MONAD' | 'NEAR' | 'NOBLE' | 'OP' | 'XPL' | 'DOT' | 'POL' | 'XRD' | 'XRP' | 'HOOD' | 'SOL' | 'SONIC' | 'SPARK' | 'XLM' | 'STRK' | 'SUI' | 'THOR' | 'TON' | 'TRON' | 'UNI' | 'XLAYER' | 'ZEC';
|
|
605
|
+
symbol: string;
|
|
606
|
+
ticker: string;
|
|
607
|
+
decimal?: number;
|
|
608
|
+
address?: string;
|
|
609
|
+
isGasAsset: boolean;
|
|
610
|
+
isSynthetic: boolean;
|
|
611
|
+
tax?: {
|
|
612
|
+
buy: number;
|
|
613
|
+
sell: number;
|
|
614
|
+
};
|
|
615
|
+
};
|
|
616
|
+
finalAddress?: string;
|
|
617
|
+
finalisedAt: number;
|
|
618
|
+
/**
|
|
619
|
+
* Slippage tolerance from the original quote, in basis points
|
|
620
|
+
*/
|
|
621
|
+
slippageTolerance?: number;
|
|
622
|
+
/**
|
|
623
|
+
* Realized slippage of the settled output vs the quoted expected output, in basis points. Positive means the swap settled for less than quoted
|
|
624
|
+
*/
|
|
625
|
+
realizedSlippageBps?: number;
|
|
626
|
+
transient?: {
|
|
627
|
+
estimatedTimeToComplete: number;
|
|
628
|
+
currentLegIndex?: number;
|
|
629
|
+
estimates?: {
|
|
630
|
+
inboundObservation: number;
|
|
631
|
+
inboundConfirmation: number;
|
|
632
|
+
streamingSwap: number;
|
|
633
|
+
outboundDelay: number;
|
|
634
|
+
outboundObservation: number;
|
|
635
|
+
currentStage: string;
|
|
636
|
+
};
|
|
637
|
+
providerDetails?: {
|
|
638
|
+
streamingDetails?: {
|
|
639
|
+
quantity?: number;
|
|
640
|
+
count?: number;
|
|
641
|
+
interval?: number;
|
|
642
|
+
subSwapsMap?: Array<number>;
|
|
643
|
+
};
|
|
644
|
+
depositChannelId?: string;
|
|
645
|
+
depositAddress?: string;
|
|
646
|
+
};
|
|
647
|
+
};
|
|
648
|
+
meta?: {
|
|
649
|
+
broadcastedAt?: number;
|
|
650
|
+
wallet?: string;
|
|
651
|
+
quoteId?: string;
|
|
652
|
+
explorerUrl?: string;
|
|
653
|
+
providerExplorerUrl?: string;
|
|
654
|
+
affiliate?: string;
|
|
655
|
+
fees?: Array<{
|
|
656
|
+
type: 'liquidity' | 'network' | 'inbound' | 'outbound' | 'affiliate' | 'service' | 'tax' | 'priority';
|
|
657
|
+
amount: string;
|
|
658
|
+
amountBps?: number;
|
|
659
|
+
asset: string;
|
|
660
|
+
chain: string;
|
|
661
|
+
protocol: 'CHAINFLIP' | 'CHAINFLIP_STREAMING' | 'MAYACHAIN' | 'MAYACHAIN_STREAMING' | 'ONEINCH' | 'PANCAKESWAP' | 'SUSHISWAP_V2' | 'THORCHAIN' | 'THORCHAIN_STREAMING' | 'TRADERJOE_V2' | 'UNISWAP_V2' | 'UNISWAP_V3' | 'JUPITER' | 'OKX' | 'NEAR' | 'GARDEN' | 'HARBOR' | 'FLASHNET' | 'MAYAN' | 'PANGOLIN_V1' | 'CAVIAR_V1' | 'OPENOCEAN_V2' | 'OCISWAP_V1' | 'CAMELOT_V3';
|
|
662
|
+
}>;
|
|
663
|
+
amountInUsd?: string;
|
|
664
|
+
amountOutUsd?: string;
|
|
665
|
+
provider?: 'CHAINFLIP' | 'CHAINFLIP_STREAMING' | 'MAYACHAIN' | 'MAYACHAIN_STREAMING' | 'ONEINCH' | 'PANCAKESWAP' | 'SUSHISWAP_V2' | 'THORCHAIN' | 'THORCHAIN_STREAMING' | 'TRADERJOE_V2' | 'UNISWAP_V2' | 'UNISWAP_V3' | 'JUPITER' | 'OKX' | 'NEAR' | 'GARDEN' | 'HARBOR' | 'FLASHNET' | 'MAYAN' | 'PANGOLIN_V1' | 'CAVIAR_V1' | 'OPENOCEAN_V2' | 'OCISWAP_V1' | 'CAMELOT_V3';
|
|
666
|
+
providerAction?: 'swap' | 'aggregation' | 'addLiquidity' | 'withdrawLiquidity' | 'addSavers' | 'withdrawSavers' | 'borrow' | 'repay' | 'name' | 'donate' | 'claim' | 'stake' | 'unstake' | 'createOrder' | 'cancelOrder';
|
|
667
|
+
providerOrderId?: string;
|
|
668
|
+
images?: {
|
|
669
|
+
from?: string;
|
|
670
|
+
to?: string;
|
|
671
|
+
provider?: string;
|
|
672
|
+
chain?: string;
|
|
673
|
+
};
|
|
674
|
+
affiliateFees?: Array<{
|
|
675
|
+
affiliate: string;
|
|
676
|
+
bps: string;
|
|
677
|
+
isReferrer: boolean;
|
|
678
|
+
}>;
|
|
679
|
+
failReason?: string;
|
|
680
|
+
failTargetAddress?: string;
|
|
681
|
+
targetAddress?: string;
|
|
682
|
+
};
|
|
683
|
+
payload?: {
|
|
684
|
+
evmCalldata?: string;
|
|
685
|
+
evmValue?: string;
|
|
686
|
+
logs?: unknown;
|
|
687
|
+
memo?: string;
|
|
688
|
+
spender?: string;
|
|
689
|
+
manifest?: unknown;
|
|
690
|
+
intentHash?: string;
|
|
691
|
+
thorname?: string;
|
|
692
|
+
decodedPayload?: unknown;
|
|
693
|
+
};
|
|
694
|
+
}>;
|
|
695
|
+
};
|
|
696
|
+
pendingReason?: 'awaiting_deposit' | 'indexing';
|
|
697
|
+
};
|
|
698
|
+
|
|
457
699
|
export type InsertTrackedTransactionRequest = {
|
|
458
700
|
legs: Array<{
|
|
459
701
|
chainId: '36900' | 'aleo' | 'aptos' | '42161' | '1313161554' | '43114' | '8453' | '80094' | '56' | 'bitcoin' | 'bitcoincash' | '3637' | 'cardano' | 'chainflip' | '1116' | '21000000' | 'cosmoshub-4' | '25' | 'dash' | 'dogecoin' | '1' | '100' | 'harbor-1' | 'harbor-stagenet-1' | '999' | 'hype' | 'kaiyo-1' | 'litecoin' | '59144' | 'mayachain-mainnet-v1' | 'mayachain-stagenet-v1' | '4326' | '143' | 'near' | 'noble-1' | '10' | '9745' | 'polkadot' | '137' | 'radix-mainnet' | 'ripple' | '4663' | 'solana' | '146' | 'spark' | 'stellar' | '0x534e5f4d41494e' | 'sui' | 'thorchain-1' | 'thorchain-stagenet-v2' | 'ton' | '728126428' | '130' | '196' | 'zcash';
|
|
@@ -896,7 +1138,7 @@ export type GetQuoteResponse = {
|
|
|
896
1138
|
nextLegProvider?: 'CHAINFLIP' | 'CHAINFLIP_STREAMING' | 'MAYACHAIN' | 'MAYACHAIN_STREAMING' | 'ONEINCH' | 'PANCAKESWAP' | 'SUSHISWAP_V2' | 'THORCHAIN' | 'THORCHAIN_STREAMING' | 'TRADERJOE_V2' | 'UNISWAP_V2' | 'UNISWAP_V3' | 'JUPITER' | 'OKX' | 'NEAR' | 'GARDEN' | 'HARBOR' | 'FLASHNET' | 'MAYAN' | 'PANGOLIN_V1' | 'CAVIAR_V1' | 'OPENOCEAN_V2' | 'OCISWAP_V1' | 'CAMELOT_V3';
|
|
897
1139
|
}>;
|
|
898
1140
|
warnings: Array<{
|
|
899
|
-
code: 'highSlippage' | 'highPriceImpact' | 'noSourceAddressToBuildTransaction' | 'affiliateFeeTooSmallSoRemoved' | 'unableToApplyReferralProgram' | 'insufficientBalance' | 'insufficientGas' | 'unableToBuildTransaction' | 'unableToEstimateGas' | 'limitPriceBelowSpot' | 'limitPriceWithinFeeGap';
|
|
1141
|
+
code: 'highSlippage' | 'highPriceImpact' | 'noSourceAddressToBuildTransaction' | 'affiliateFeeTooSmallSoRemoved' | 'unableToApplyReferralProgram' | 'insufficientBalance' | 'insufficientGas' | 'unableToBuildTransaction' | 'unableToEstimateGas' | 'limitPriceBelowSpot' | 'limitPriceWithinFeeGap' | 'litecoinMwebNotSupported';
|
|
900
1142
|
display: string;
|
|
901
1143
|
tooltip?: string;
|
|
902
1144
|
}>;
|
|
@@ -941,7 +1183,7 @@ export type GetQuoteResponse = {
|
|
|
941
1183
|
error?: string;
|
|
942
1184
|
providerErrors?: Array<{
|
|
943
1185
|
provider?: 'CHAINFLIP' | 'CHAINFLIP_STREAMING' | 'MAYACHAIN' | 'MAYACHAIN_STREAMING' | 'ONEINCH' | 'PANCAKESWAP' | 'SUSHISWAP_V2' | 'THORCHAIN' | 'THORCHAIN_STREAMING' | 'TRADERJOE_V2' | 'UNISWAP_V2' | 'UNISWAP_V3' | 'JUPITER' | 'OKX' | 'NEAR' | 'GARDEN' | 'HARBOR' | 'FLASHNET' | 'MAYAN' | 'PANGOLIN_V1' | 'CAVIAR_V1' | 'OPENOCEAN_V2' | 'OCISWAP_V1' | 'CAMELOT_V3';
|
|
944
|
-
errorCode?: 'noRpcFallbacks' | 'requestTimeout' | 'invalidApiVersion' | 'isSanctionedAddress' | 'unknownError' | 'internalServerError' | 'test_error' | 'blockHeaderNotFound' | 'blockHashNotFoundAtHeight' | 'blackListAsset' | 'txHashMissing' | 'invalidAsset' | 'currentBlockHeaderNotFound' | 'failedToRetrieveBalance' | 'failedToRetrieveBlock' | 'failedToRetrieveFees' | 'notImplementedBCH' | 'notImplementedDoge' | 'noPoolsFound' | 'noVaultsFound' | 'noTxFound' | 'multipleCosmosMessages' | 'heightOrHashNotProvided' | 'priceTooVolatile' | 'unknownDenom' | 'invalidBlockHeight' | 'timestampExtrinsicNoArgumentsForBlock' | 'timestampExtrinsicNoTimestampForBlock' | 'noTimestampExtrinsicForHash' | 'timestampExtrinsicNoArgumentsForHash' | 'txMemoUndefined' | 'txMemoIncorrect' | 'txTypeNotFound' | 'txNoMessage' | 'txNotFound' | 'txReceiptNotFound' | 'txParsingError' | 'txLogsParsingError' | 'txFailed' | 'jobDataParsingError' | 'dataformRunFailed' | 'dataformAssertionFailed' | 'blockNotFound' | 'balanceNotFound' | 'blockbookCallFailed' | 'configError' | 'unsafeTestDatabase' | 'synthSwapDisallowed' | 'noQuoteResponse' | 'noPoolAssetsFound' | 'noThorchainPools' | 'noMayachainPools' | 'noThorchainNetworkInfo' | 'invalidAffiliateFee' | 'invalidBuyAssetAddress' | 'invalidSellAssetAddress' | 'invalidSourceAddress' | 'invalidDestinationAddress' | 'invalidParam' | 'xrpAddressRequiresTag' | 'invalidChainId' | 'invalidChain' | 'unsupportedChainId' | 'unsupportedEVMChainId' | 'unsupportedMethod' | 'unsupportedProvider' | 'unsupportedProgram' | 'unsupportedEvent' | 'invalidParamsForMethod' | 'noWhitelistTokens' | 'failedFetchGasPrice' | 'chainflipBrokerApiUnavailable' | 'failedToBuildVaultSwapTransaction' | 'failedToOpenBtcPrivateChannel' | 'failedToCloseBtcPrivateChannel' | 'affiliateNotRegistered' | 'failedToCreateDepositChannel' | 'failedToRegisterAccount' | 'failedToRegisterAffiliate' | 'failedToWithdrawAffiliate' | 'noProviderDetailsFound' | 'noTokenListsFound' | 'tokenNotFound' | 'tokenPriceNotFound' | 'tokenPriceUnavailable' | 'tokenPriceFailedToUpdate' | 'legsArrayIsEmpty' | 'failedToFetchQuoteForLeg' | 'noBlockHeaderFound' | 'failedToSimulateSwap' | 'swapHalted' | 'memoTooLongForSourceChain' | 'addressScreeningFailed' | 'missingScreeningConfig' | 'insufficientLiquidity' | 'noSaversFound' | 'noInbounDataFound' | 'noInboundAddressesFound' | 'noTargetAddress' | 'noInboundAddressFoundForChain' | 'noLastBlocksFound' | 'noVersionFound' | 'noConstantsFound' | 'noMimirsFound' | 'noRoutesFound' | 'quoteNotFound' | 'providerResponseFormError' | 'ledgerWrongPayload' | 'failedToFetchTx' | 'failedBuildTransactionDetails' | 'failedToCreateRouteMetadata' | 'txBuildingTimeout' | 'noLegsForRoute' | 'insufficientBalance' | 'insufficientAllowance' | 'insufficientGas' | 'unableToBuildTransaction' | 'noRouterAddressFound' | 'noAggregatorAddressFound' | 'noContractInstanceFound' | 'noContractAddressFound' | 'invalidAffiliate' | 'invalidAffiliateName' | 'thornameNotFound' | 'thornameAffiliate' | 'No provider found' | 'providerAssetNotFound' | 'No Record found' | 'Slippage too low' | 'tradingHalted' | 'mayanameNotFound' | 'noWrappedGasAsset' | 'aggregatorAddressNotFound' | 'routerAddressNotFound' | 'dummyAddressNotFound' | 'trackerError' | 'thorchainPoolUnavailable' | 'noTradingPairs' | 'missingState' | 'ledgerSwapNotFound' | 'ledgerSwapNotReadyForTracking' | 'ledgerInvalidParsingMode' | 'ledgerWebhookNotifyFailed' | 'errorEstimatingGas' | 'apiKeyInvalid' | 'apiKeyFailedToUpdate' | 'apiKeySignatureExists' | 'apiKeySignatureKeyTypeMismatch' | 'apiKeyExpired' | 'unauthorized' | 'failedToCreateMemo' | 'invalidAddressForChain' | 'invalidAddress' | 'riskyAddress' | 'noRoutesToProcess' | 'sellAssetAmountTooSmall' | 'sellAssetAmountTooLarge' | 'missingPrivateKey' | 'noMemoPriceProtection' | 'nodeMethodNotFound' | 'nodeRpcNotFound' | 'thirdPartyProviderNotFound' | 'quoteUnavailable' | 'targetInstructionNotFound' | 'referrerExist' | 'referrerNotFound' | 'invalidReferrer' | 'quoteLogicError' | 'missingDecimal' | 'noGasInfoInDB' | 'quoteError' | 'valueOverflow' | 'missingChainflipMeta' | 'contractAndMethodRequired' | 'tokenImageError' | 'fileNotFound' | 'fileFormatError' | 'ipError' | 'failedToSaveLedgerSwap' | 'missingValue' | 'missingDBQueryParam' | 'unableEstimateTxTime' | 'affiliateStatsMissingDate' | 'affiliateStatsMissingNextFilter' | 'affiliateStatsNoActions' | 'unsupportedNotificationEvent' | 'unsupportedNotificationChannel' | 'invalidWebhookUrl' | 'webhookDeliveryFailed' | 'serverStateNotFound' | 'apiRequestFailed' | 'apiRateLimit' | 'invalidActionStep' | 'providerIsRequired' | 'rateLimitExceeded' | 'depositChannelNotFound' | 'auditLogInsertFailed' | 'affiliateNameHistoryInsertFailed' | 'invalidRouteId' | 'invalidQuoteId' | 'invalidRoute' | 'quoteExpired' | 'swapQuoteNotFound' | 'swapRouteNotFound' | 'swapTransactionFailed' | 'swapChainflipMetaMissing' | 'swapChainflipChannelFailed' | 'swapTransferTxFailed' | 'chainflipVaultSwapNotSupported' | 'chainflipVaultSwapEncodingFailed' | 'chainflipVaultSwapInvalidChain' | 'chainflipVaultSwapBitcoinCCMNotSupported' | 'chainflipVaultSwapTransactionBuildFailed' | 'zcashInvalidAddress' | 'zcashInsufficientUTXOs' | 'zcashUTXOSelectionFailed' | 'zcashTransactionBuildFailed' | 'zcashShieldedRefundMissing' | 'zcashMemoTooLong' | 'zcashUnifiedAddressUnsupported' | 'zcashShieldedMemoUnavailable' | 'invalidTokenProgram' | 'solanaOutputBelowRentExemptMinimum' | 'solanaTokenProgramUnavailable' | 'invalidRequest' | 'pubsubEventNotRegistered' | 'pubsubTopicNotFound' | 'pubsubEnvelopeParsingError' | 'invalidSpender' | 'outputAmountDeviationTooHigh' | 'swapSizeExceeded' | 'v2EndpointNotAllowed' | 'externalServiceFailed' | 'tenantEncryptKeyNotFound' | 'tenantKeyPairEncryptionError' | 'slip24AmountOverflow' | 'slip24InvalidSignature' | 'slip24DigestComputationFailed' | 'invalidTxHashFormat' | 'affiliateNotFound' | 'nearAffiliateProviderAssetNotFound' | 'nearAffiliateDepositAddressFailed' | 'flashnetAffiliateRegistrationFailed' | 'flashnetAffiliateClaimFailed' | 'flashnetAffiliateNotFound' | 'limitOrderUnsupportedChain' | 'limitOrderQuoteNotFound' | 'limitOrderRouteNotFound' | 'limitOrderNotFound' | 'limitOrderInvalidState' | 'limitOrderBuildFailed' | 'limitOrderSubmissionFailed' | 'limitOrderCancelFailed' | 'limitOrderExpirationOutOfBounds' | 'limitOrderUnsupportedFillFlags' | 'limitOrderAmountAmbiguous' | 'limitOrderChainMismatch' | 'limitOrderUnsupportedPair' | 'limitOrderActionUnavailable' | 'limitOrderProviderError';
|
|
1186
|
+
errorCode?: 'noRpcFallbacks' | 'requestTimeout' | 'invalidApiVersion' | 'isSanctionedAddress' | 'unknownError' | 'internalServerError' | 'test_error' | 'blockHeaderNotFound' | 'blockHashNotFoundAtHeight' | 'blackListAsset' | 'txHashMissing' | 'invalidAsset' | 'currentBlockHeaderNotFound' | 'failedToRetrieveBalance' | 'failedToRetrieveBlock' | 'failedToRetrieveFees' | 'notImplementedBCH' | 'notImplementedDoge' | 'noPoolsFound' | 'noVaultsFound' | 'noTxFound' | 'multipleCosmosMessages' | 'heightOrHashNotProvided' | 'priceTooVolatile' | 'unknownDenom' | 'invalidBlockHeight' | 'timestampExtrinsicNoArgumentsForBlock' | 'timestampExtrinsicNoTimestampForBlock' | 'noTimestampExtrinsicForHash' | 'timestampExtrinsicNoArgumentsForHash' | 'txMemoUndefined' | 'txMemoIncorrect' | 'txTypeNotFound' | 'txNoMessage' | 'txNotFound' | 'txReceiptNotFound' | 'txParsingError' | 'txLogsParsingError' | 'txFailed' | 'jobDataParsingError' | 'dataformRunFailed' | 'dataformAssertionFailed' | 'blockNotFound' | 'balanceNotFound' | 'blockbookCallFailed' | 'configError' | 'unsafeTestDatabase' | 'synthSwapDisallowed' | 'noQuoteResponse' | 'noPoolAssetsFound' | 'noThorchainPools' | 'noMayachainPools' | 'noThorchainNetworkInfo' | 'invalidAffiliateFee' | 'invalidBuyAssetAddress' | 'invalidSellAssetAddress' | 'invalidSourceAddress' | 'invalidDestinationAddress' | 'invalidParam' | 'xrpAddressRequiresTag' | 'invalidChainId' | 'invalidChain' | 'unsupportedChainId' | 'unsupportedEVMChainId' | 'unsupportedMethod' | 'unsupportedProvider' | 'unsupportedProgram' | 'unsupportedEvent' | 'invalidParamsForMethod' | 'noWhitelistTokens' | 'failedFetchGasPrice' | 'chainflipBrokerApiUnavailable' | 'failedToBuildVaultSwapTransaction' | 'failedToOpenBtcPrivateChannel' | 'failedToCloseBtcPrivateChannel' | 'affiliateNotRegistered' | 'failedToCreateDepositChannel' | 'failedToRegisterAccount' | 'failedToRegisterAffiliate' | 'failedToWithdrawAffiliate' | 'noProviderDetailsFound' | 'noTokenListsFound' | 'tokenNotFound' | 'tokenPriceNotFound' | 'tokenPriceUnavailable' | 'tokenPriceFailedToUpdate' | 'legsArrayIsEmpty' | 'failedToFetchQuoteForLeg' | 'noBlockHeaderFound' | 'failedToSimulateSwap' | 'swapHalted' | 'memoTooLongForSourceChain' | 'addressScreeningFailed' | 'missingScreeningConfig' | 'insufficientLiquidity' | 'noSaversFound' | 'noInbounDataFound' | 'noInboundAddressesFound' | 'noTargetAddress' | 'noInboundAddressFoundForChain' | 'noLastBlocksFound' | 'noVersionFound' | 'noConstantsFound' | 'noMimirsFound' | 'noRoutesFound' | 'quoteNotFound' | 'providerResponseFormError' | 'ledgerWrongPayload' | 'failedToFetchTx' | 'failedBuildTransactionDetails' | 'failedToCreateRouteMetadata' | 'txBuildingTimeout' | 'noLegsForRoute' | 'insufficientBalance' | 'insufficientAllowance' | 'insufficientGas' | 'unableToBuildTransaction' | 'noRouterAddressFound' | 'noAggregatorAddressFound' | 'noContractInstanceFound' | 'noContractAddressFound' | 'invalidAffiliate' | 'invalidAffiliateName' | 'thornameNotFound' | 'thornameAffiliate' | 'No provider found' | 'providerAssetNotFound' | 'No Record found' | 'Slippage too low' | 'tradingHalted' | 'mayanameNotFound' | 'noWrappedGasAsset' | 'aggregatorAddressNotFound' | 'routerAddressNotFound' | 'dummyAddressNotFound' | 'trackerError' | 'thorchainPoolUnavailable' | 'noTradingPairs' | 'missingState' | 'ledgerSwapNotFound' | 'ledgerSwapNotReadyForTracking' | 'ledgerInvalidParsingMode' | 'ledgerWebhookNotifyFailed' | 'errorEstimatingGas' | 'apiKeyInvalid' | 'apiKeyFailedToUpdate' | 'apiKeySignatureExists' | 'apiKeySignatureKeyTypeMismatch' | 'apiKeyExpired' | 'unauthorized' | 'failedToCreateMemo' | 'invalidAddressForChain' | 'invalidAddress' | 'riskyAddress' | 'noRoutesToProcess' | 'sellAssetAmountTooSmall' | 'sellAssetAmountTooLarge' | 'missingPrivateKey' | 'noMemoPriceProtection' | 'nodeMethodNotFound' | 'nodeRpcNotFound' | 'thirdPartyProviderNotFound' | 'quoteUnavailable' | 'targetInstructionNotFound' | 'referrerExist' | 'referrerNotFound' | 'invalidReferrer' | 'quoteLogicError' | 'missingDecimal' | 'noGasInfoInDB' | 'quoteError' | 'valueOverflow' | 'missingChainflipMeta' | 'contractAndMethodRequired' | 'tokenImageError' | 'fileNotFound' | 'fileFormatError' | 'ipError' | 'failedToSaveLedgerSwap' | 'missingValue' | 'missingDBQueryParam' | 'unableEstimateTxTime' | 'affiliateStatsMissingDate' | 'affiliateStatsMissingNextFilter' | 'affiliateStatsNoActions' | 'unsupportedNotificationEvent' | 'unsupportedNotificationChannel' | 'invalidWebhookUrl' | 'webhookDeliveryFailed' | 'serverStateNotFound' | 'apiRequestFailed' | 'apiRateLimit' | 'invalidActionStep' | 'providerIsRequired' | 'rateLimitExceeded' | 'depositChannelNotFound' | 'auditLogInsertFailed' | 'affiliateNameHistoryInsertFailed' | 'invalidRouteId' | 'invalidQuoteId' | 'invalidRoute' | 'quoteExpired' | 'swapQuoteNotFound' | 'swapRouteNotFound' | 'swapTransactionFailed' | 'swapChainflipMetaMissing' | 'swapChainflipChannelFailed' | 'swapTransferTxFailed' | 'chainflipVaultSwapNotSupported' | 'chainflipVaultSwapEncodingFailed' | 'chainflipVaultSwapInvalidChain' | 'chainflipVaultSwapBitcoinCCMNotSupported' | 'chainflipVaultSwapTransactionBuildFailed' | 'zcashInvalidAddress' | 'zcashInsufficientUTXOs' | 'zcashUTXOSelectionFailed' | 'zcashTransactionBuildFailed' | 'zcashShieldedRefundMissing' | 'zcashMemoTooLong' | 'litecoinMwebAddressUnsupported' | 'zcashUnifiedAddressUnsupported' | 'zcashShieldedMemoUnavailable' | 'invalidTokenProgram' | 'solanaOutputBelowRentExemptMinimum' | 'solanaTokenProgramUnavailable' | 'invalidRequest' | 'pubsubEventNotRegistered' | 'pubsubTopicNotFound' | 'pubsubEnvelopeParsingError' | 'invalidSpender' | 'outputAmountDeviationTooHigh' | 'swapSizeExceeded' | 'v2EndpointNotAllowed' | 'externalServiceFailed' | 'tenantEncryptKeyNotFound' | 'tenantKeyPairEncryptionError' | 'slip24AmountOverflow' | 'slip24InvalidSignature' | 'slip24DigestComputationFailed' | 'invalidTxHashFormat' | 'affiliateNotFound' | 'nearAffiliateProviderAssetNotFound' | 'nearAffiliateDepositAddressFailed' | 'flashnetAffiliateRegistrationFailed' | 'flashnetAffiliateClaimFailed' | 'flashnetAffiliateNotFound' | 'limitOrderUnsupportedChain' | 'limitOrderQuoteNotFound' | 'limitOrderRouteNotFound' | 'limitOrderNotFound' | 'limitOrderInvalidState' | 'limitOrderBuildFailed' | 'limitOrderSubmissionFailed' | 'limitOrderCancelFailed' | 'limitOrderExpirationOutOfBounds' | 'limitOrderUnsupportedFillFlags' | 'limitOrderAmountAmbiguous' | 'limitOrderChainMismatch' | 'limitOrderUnsupportedPair' | 'limitOrderActionUnavailable' | 'limitOrderProviderError';
|
|
945
1187
|
message?: string;
|
|
946
1188
|
/**
|
|
947
1189
|
* Provider minimum sell amount (human units), when the provider reported one
|
|
@@ -1133,7 +1375,7 @@ export type ExecuteSwapResponse = {
|
|
|
1133
1375
|
nextLegProvider?: 'CHAINFLIP' | 'CHAINFLIP_STREAMING' | 'MAYACHAIN' | 'MAYACHAIN_STREAMING' | 'ONEINCH' | 'PANCAKESWAP' | 'SUSHISWAP_V2' | 'THORCHAIN' | 'THORCHAIN_STREAMING' | 'TRADERJOE_V2' | 'UNISWAP_V2' | 'UNISWAP_V3' | 'JUPITER' | 'OKX' | 'NEAR' | 'GARDEN' | 'HARBOR' | 'FLASHNET' | 'MAYAN' | 'PANGOLIN_V1' | 'CAVIAR_V1' | 'OPENOCEAN_V2' | 'OCISWAP_V1' | 'CAMELOT_V3';
|
|
1134
1376
|
}>;
|
|
1135
1377
|
warnings: Array<{
|
|
1136
|
-
code: 'highSlippage' | 'highPriceImpact' | 'noSourceAddressToBuildTransaction' | 'affiliateFeeTooSmallSoRemoved' | 'unableToApplyReferralProgram' | 'insufficientBalance' | 'insufficientGas' | 'unableToBuildTransaction' | 'unableToEstimateGas' | 'limitPriceBelowSpot' | 'limitPriceWithinFeeGap';
|
|
1378
|
+
code: 'highSlippage' | 'highPriceImpact' | 'noSourceAddressToBuildTransaction' | 'affiliateFeeTooSmallSoRemoved' | 'unableToApplyReferralProgram' | 'insufficientBalance' | 'insufficientGas' | 'unableToBuildTransaction' | 'unableToEstimateGas' | 'limitPriceBelowSpot' | 'limitPriceWithinFeeGap' | 'litecoinMwebNotSupported';
|
|
1137
1379
|
display: string;
|
|
1138
1380
|
tooltip?: string;
|
|
1139
1381
|
}>;
|