@0xsquid/react-hooks 6.4.4-xrpl-beta.5 → 6.4.4-xrpl-beta.7
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/core/client/index.d.ts +14 -0
- package/dist/core/client/index.js +34 -0
- package/dist/core/client/index.js.map +1 -0
- package/dist/core/connectors/bitcoin/helpers.d.ts +15 -0
- package/dist/core/connectors/bitcoin/helpers.js +6 -1
- package/dist/core/connectors/bitcoin/helpers.js.map +1 -1
- package/dist/core/connectors/bitcoin/wallets/index.d.ts +1 -0
- package/dist/core/connectors/bitcoin/wallets/index.js +1 -0
- package/dist/core/connectors/bitcoin/wallets/index.js.map +1 -1
- package/dist/core/connectors/bitcoin/wallets/keplr.d.ts +11 -0
- package/dist/core/connectors/bitcoin/wallets/keplr.js +28 -0
- package/dist/core/connectors/bitcoin/wallets/keplr.js.map +1 -0
- package/dist/core/connectors/xrp/Xaman.js +1 -1
- package/dist/core/constants.d.ts +4 -1
- package/dist/core/constants.js +8 -2
- package/dist/core/constants.js.map +1 -1
- package/dist/core/providers/SolanaProvider.d.ts +0 -2
- package/dist/core/providers/SolanaProvider.js.map +1 -1
- package/dist/core/queries/queries-keys.d.ts +19 -26
- package/dist/core/queries/queries-keys.js +55 -76
- package/dist/core/queries/queries-keys.js.map +1 -1
- package/dist/core/types/config.d.ts +2 -0
- package/dist/core/types/error.d.ts +4 -3
- package/dist/core/types/error.js.map +1 -1
- package/dist/core/types/event.d.ts +24 -1
- package/dist/core/types/history.d.ts +84 -0
- package/dist/core/types/history.js +7 -0
- package/dist/core/types/history.js.map +1 -0
- package/dist/core/types/index.d.ts +4 -2
- package/dist/core/types/index.js +1 -1
- package/dist/core/types/index.js.map +1 -1
- package/dist/core/types/onramps/index.d.ts +2 -0
- package/dist/core/types/onramps/index.js +3 -0
- package/dist/core/types/onramps/index.js.map +1 -0
- package/dist/core/types/onramps/onramp.d.ts +157 -0
- package/dist/core/types/onramps/onramp.js +2 -0
- package/dist/core/types/onramps/onramp.js.map +1 -0
- package/dist/core/types/onramps/revolut.d.ts +92 -0
- package/dist/core/types/onramps/revolut.js +2 -0
- package/dist/core/types/onramps/revolut.js.map +1 -0
- package/dist/core/types/transaction.d.ts +10 -30
- package/dist/core/types/transaction.js +6 -0
- package/dist/core/types/transaction.js.map +1 -1
- package/dist/core/wallets.js +10 -2
- package/dist/core/wallets.js.map +1 -1
- package/dist/hooks/analytics/useTrackSearchEmpty.d.ts +12 -0
- package/dist/hooks/analytics/useTrackSearchEmpty.js +22 -0
- package/dist/hooks/analytics/useTrackSearchEmpty.js.map +1 -0
- package/dist/hooks/client/useClient.d.ts +2 -0
- package/dist/hooks/client/useClient.js +58 -1
- package/dist/hooks/client/useClient.js.map +1 -1
- package/dist/hooks/cosmos/useCosmos.d.ts +9 -0
- package/dist/hooks/cosmos/useCosmos.js +43 -30
- package/dist/hooks/cosmos/useCosmos.js.map +1 -1
- package/dist/hooks/cosmos/useCosmosForChain.d.ts +1 -1
- package/dist/hooks/cosmos/useCosmosForChain.js +20 -13
- package/dist/hooks/cosmos/useCosmosForChain.js.map +1 -1
- package/dist/hooks/index.d.ts +9 -1
- package/dist/hooks/index.js +9 -1
- package/dist/hooks/index.js.map +1 -1
- package/dist/hooks/onramp/useFiatToCrypto.d.ts +84 -0
- package/dist/hooks/onramp/useFiatToCrypto.js +316 -0
- package/dist/hooks/onramp/useFiatToCrypto.js.map +1 -0
- package/dist/hooks/solana/useSolana.d.ts +2 -1
- package/dist/hooks/solana/useSolana.js +4 -2
- package/dist/hooks/solana/useSolana.js.map +1 -1
- package/dist/hooks/store/useHistoryStore.d.ts +33 -13
- package/dist/hooks/store/useHistoryStore.js +120 -32
- package/dist/hooks/store/useHistoryStore.js.map +1 -1
- package/dist/hooks/store/useSendTransactionStore.d.ts +20 -0
- package/dist/hooks/store/useSendTransactionStore.js +21 -0
- package/dist/hooks/store/useSendTransactionStore.js.map +1 -0
- package/dist/hooks/store/useSquidStore.d.ts +0 -1
- package/dist/hooks/store/useSquidStore.js +0 -1
- package/dist/hooks/store/useSquidStore.js.map +1 -1
- package/dist/hooks/sui/useSuiWallets.js +11 -5
- package/dist/hooks/sui/useSuiWallets.js.map +1 -1
- package/dist/hooks/transaction/send/useEstimateSendTransactionGas.d.ts +28 -0
- package/dist/hooks/transaction/send/useEstimateSendTransactionGas.js +58 -0
- package/dist/hooks/transaction/send/useEstimateSendTransactionGas.js.map +1 -0
- package/dist/hooks/transaction/send/useSendTransaction.d.ts +13 -0
- package/dist/hooks/transaction/send/useSendTransaction.js +214 -0
- package/dist/hooks/transaction/send/useSendTransaction.js.map +1 -0
- package/dist/hooks/transaction/send/useSendTransactionGas.d.ts +6 -0
- package/dist/hooks/transaction/send/useSendTransactionGas.js +73 -0
- package/dist/hooks/transaction/send/useSendTransactionGas.js.map +1 -0
- package/dist/hooks/transaction/useAllTransactionsStatus.d.ts +34 -2
- package/dist/hooks/transaction/useAllTransactionsStatus.js +112 -62
- package/dist/hooks/transaction/useAllTransactionsStatus.js.map +1 -1
- package/dist/hooks/transaction/useApproval.js +3 -3
- package/dist/hooks/transaction/useApproval.js.map +1 -1
- package/dist/hooks/transaction/useEstimate.d.ts +1 -1
- package/dist/hooks/transaction/useExecuteTransaction.js +61 -42
- package/dist/hooks/transaction/useExecuteTransaction.js.map +1 -1
- package/dist/hooks/transaction/useGetRoute.d.ts +3 -0
- package/dist/hooks/transaction/useGetRoute.js +12 -9
- package/dist/hooks/transaction/useGetRoute.js.map +1 -1
- package/dist/hooks/transaction/useSendTransactionStatus.d.ts +11 -0
- package/dist/hooks/transaction/useSendTransactionStatus.js +53 -0
- package/dist/hooks/transaction/useSendTransactionStatus.js.map +1 -0
- package/dist/hooks/transaction/useSwapTransactionStatus.d.ts +15 -0
- package/dist/hooks/transaction/{useSingleTransaction.js → useSwapTransactionStatus.js} +40 -18
- package/dist/hooks/transaction/useSwapTransactionStatus.js.map +1 -0
- package/dist/hooks/user/useAvatar.js +13 -7
- package/dist/hooks/user/useAvatar.js.map +1 -1
- package/dist/hooks/user/useHistory.d.ts +12 -10
- package/dist/hooks/user/useHistory.js +49 -51
- package/dist/hooks/user/useHistory.js.map +1 -1
- package/dist/hooks/utils/useUtils.d.ts +7 -0
- package/dist/hooks/utils/useUtils.js +20 -0
- package/dist/hooks/utils/useUtils.js.map +1 -0
- package/dist/hooks/wallet/useEns.d.ts +0 -1
- package/dist/hooks/wallet/useEns.js +1 -13
- package/dist/hooks/wallet/useEns.js.map +1 -1
- package/dist/hooks/wallet/useMultiChainWallet.d.ts +3 -0
- package/dist/hooks/wallet/useMultiChainWallet.js +19 -0
- package/dist/hooks/wallet/useMultiChainWallet.js.map +1 -1
- package/dist/hooks/wallet/useSigner.d.ts +6 -5
- package/dist/hooks/wallet/useSigner.js +20 -15
- package/dist/hooks/wallet/useSigner.js.map +1 -1
- package/dist/hooks/xrp/useXrpWallets.js +4 -2
- package/dist/hooks/xrp/useXrpWallets.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/services/external/index.d.ts +1 -0
- package/dist/services/external/index.js +2 -0
- package/dist/services/external/index.js.map +1 -0
- package/dist/services/external/onrampAdapter.d.ts +12 -0
- package/dist/services/external/onrampAdapter.js +41 -0
- package/dist/services/external/onrampAdapter.js.map +1 -0
- package/dist/services/external/rpcService.d.ts +2 -2
- package/dist/services/external/rpcService.js +2 -5
- package/dist/services/external/rpcService.js.map +1 -1
- package/dist/services/index.d.ts +3 -1
- package/dist/services/index.js +3 -1
- package/dist/services/index.js.map +1 -1
- package/dist/services/internal/assetsService.d.ts +2 -0
- package/dist/services/internal/assetsService.js +6 -0
- package/dist/services/internal/assetsService.js.map +1 -1
- package/dist/services/internal/bitcoinService.js +9 -1
- package/dist/services/internal/bitcoinService.js.map +1 -1
- package/dist/services/internal/configService.js +3 -0
- package/dist/services/internal/configService.js.map +1 -1
- package/dist/services/internal/cosmosService.d.ts +12 -0
- package/dist/services/internal/cosmosService.js +18 -1
- package/dist/services/internal/cosmosService.js.map +1 -1
- package/dist/services/internal/countryCurrencyMap.d.ts +13 -0
- package/dist/services/internal/countryCurrencyMap.js +1102 -0
- package/dist/services/internal/countryCurrencyMap.js.map +1 -0
- package/dist/services/internal/errorService.d.ts +3 -7
- package/dist/services/internal/errorService.js +4 -4
- package/dist/services/internal/errorService.js.map +1 -1
- package/dist/services/internal/estimateService.js +5 -5
- package/dist/services/internal/estimateService.js.map +1 -1
- package/dist/services/internal/eventService.d.ts +31 -0
- package/dist/services/internal/eventService.js +40 -5
- package/dist/services/internal/eventService.js.map +1 -1
- package/dist/services/internal/fiatToCryptoService.d.ts +29 -0
- package/dist/services/internal/fiatToCryptoService.js +84 -0
- package/dist/services/internal/fiatToCryptoService.js.map +1 -0
- package/dist/services/internal/fiatToCryptoService.test.d.ts +1 -0
- package/dist/services/internal/fiatToCryptoService.test.js +45 -0
- package/dist/services/internal/fiatToCryptoService.test.js.map +1 -0
- package/dist/services/internal/numberService.d.ts +1 -0
- package/dist/services/internal/numberService.js +15 -0
- package/dist/services/internal/numberService.js.map +1 -1
- package/dist/services/internal/searchService.d.ts +1 -1
- package/dist/services/internal/searchService.js +18 -15
- package/dist/services/internal/searchService.js.map +1 -1
- package/dist/services/internal/sendTransaction.d.ts +40 -0
- package/dist/services/internal/sendTransaction.js +69 -0
- package/dist/services/internal/sendTransaction.js.map +1 -0
- package/dist/services/internal/sendTransactionStatus.d.ts +6 -0
- package/dist/services/internal/sendTransactionStatus.js +106 -0
- package/dist/services/internal/sendTransactionStatus.js.map +1 -0
- package/dist/services/internal/suiService.d.ts +6 -0
- package/dist/services/internal/suiService.js +15 -11
- package/dist/services/internal/suiService.js.map +1 -1
- package/dist/services/internal/transactionService.d.ts +8 -36
- package/dist/services/internal/transactionService.js +29 -27
- package/dist/services/internal/transactionService.js.map +1 -1
- package/dist/services/internal/transactionStatusService.d.ts +16 -5
- package/dist/services/internal/transactionStatusService.js +80 -5
- package/dist/services/internal/transactionStatusService.js.map +1 -1
- package/dist/services/internal/walletService.d.ts +0 -1
- package/dist/services/internal/walletService.js +0 -5
- package/dist/services/internal/walletService.js.map +1 -1
- package/dist/services/internal/xionService.d.ts +1 -0
- package/dist/services/internal/xionService.js +6 -0
- package/dist/services/internal/xionService.js.map +1 -0
- package/dist/tests/assetsService.test.js +13 -26
- package/dist/tests/assetsService.test.js.map +1 -1
- package/dist/tests/numberService.test.js +12 -1
- package/dist/tests/numberService.test.js.map +1 -1
- package/dist/tests/searchService.test.js +0 -6
- package/dist/tests/searchService.test.js.map +1 -1
- package/dist/tests/transactionService.test.js +18 -18
- package/dist/tests/transactionService.test.js.map +1 -1
- package/package.json +5 -3
- package/dist/hooks/transaction/useSingleTransaction.d.ts +0 -10
- package/dist/hooks/transaction/useSingleTransaction.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"queries-keys.js","sourceRoot":"","sources":["../../../src/core/queries/queries-keys.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"queries-keys.js","sourceRoot":"","sources":["../../../src/core/queries/queries-keys.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,uBAAuB,EAAE,MAAM,4CAA4C,CAAC;AAIrF,MAAM,CAAN,IAAY,SA4BX;AA5BD,WAAY,SAAS;IACnB,wBAAW,CAAA;IACX,oCAAuB,CAAA;IACvB,8BAAiB,CAAA;IACjB,8BAAiB,CAAA;IACjB,kCAAqB,CAAA;IACrB,gCAAmB,CAAA;IACnB,kDAAqC,CAAA;IACrC,0CAA6B,CAAA;IAC7B,wCAA2B,CAAA;IAC3B,4DAA+C,CAAA;IAC/C,4DAA+C,CAAA;IAC/C,4CAA+B,CAAA;IAC/B,sDAAyC,CAAA;IACzC,gCAAmB,CAAA;IACnB,oCAAuB,CAAA;IACvB,gDAAmC,CAAA;IACnC,4CAA+B,CAAA;IAC/B,8CAAiC,CAAA;IACjC,sCAAyB,CAAA;IACzB,oCAAuB,CAAA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,EAAE;QACX,KAAK,SAAS,CAAC,GAAG;YAChB,OAAO,CAAC,GAAG,CAAC,CAAC;QAEf,KAAK,SAAS,CAAC,OAAO,CAAC;QACvB,KAAK,SAAS,CAAC,gBAAgB;YAC7B,OAAO,CAAC,GAAG,IAAI,EAAE,CAAC,QAAQ,EAAE,EAAE,GAAG,CAAC,CAAC;QAErC,KAAK,SAAS,CAAC,WAAW,CAAC;QAC3B,KAAK,SAAS,CAAC,qBAAqB,CAAC;QACrC,KAAK,SAAS,CAAC,kBAAkB,CAAC;QAClC,KAAK,SAAS,CAAC,qBAAqB,CAAC;QACrC,KAAK,SAAS,CAAC,YAAY,CAAC;QAC5B,KAAK,SAAS,CAAC,aAAa;YAC1B,OAAO,CAAC,GAAG,IAAI,EAAE,CAAC,YAAY,EAAE,EAAE,GAAG,CAAC,CAAC;QAEzC;YACE,OAAO,CAAC,SAAS,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;KAC/B;AACH,CAAC,CAAC"}
|
|
@@ -26,13 +26,14 @@ export interface TransactionError {
|
|
|
26
26
|
};
|
|
27
27
|
}
|
|
28
28
|
export interface SquidRouteError {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
29
|
+
message: string;
|
|
30
|
+
statusCode: number;
|
|
31
|
+
type: string;
|
|
32
32
|
}
|
|
33
33
|
export interface SquidStatusError {
|
|
34
34
|
errorType?: string;
|
|
35
35
|
}
|
|
36
|
+
export type SquidRouteErrorType = "Unknown" | "UnknownError" | "SquidServiceError" | "BAD_REQUEST";
|
|
36
37
|
export declare enum SquidStatusErrorType {
|
|
37
38
|
NotFoundError = "NotFoundError"
|
|
38
39
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error.js","sourceRoot":"","sources":["../../../src/core/types/error.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,oBAKX;AALD,WAAY,oBAAoB;IAC9B,uFAAgB,CAAA;IAChB,mFAAc,CAAA;IACd,qEAAO,CAAA;IACP,qEAAO,CAAA;AACT,CAAC,EALW,oBAAoB,KAApB,oBAAoB,QAK/B;
|
|
1
|
+
{"version":3,"file":"error.js","sourceRoot":"","sources":["../../../src/core/types/error.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,oBAKX;AALD,WAAY,oBAAoB;IAC9B,uFAAgB,CAAA;IAChB,mFAAc,CAAA;IACd,qEAAO,CAAA;IACP,qEAAO,CAAA;AACT,CAAC,EALW,oBAAoB,KAApB,oBAAoB,QAK/B;AAsCD,MAAM,CAAN,IAAY,oBAEX;AAFD,WAAY,oBAAoB;IAC9B,uDAA+B,CAAA;AACjC,CAAC,EAFW,oBAAoB,KAApB,oBAAoB,QAE/B"}
|
|
@@ -1,6 +1,14 @@
|
|
|
1
|
-
import type { RouteRequest, RouteResponse } from "@0xsquid/squid-types";
|
|
1
|
+
import type { RouteRequest, RouteResponse, Token } from "@0xsquid/squid-types";
|
|
2
2
|
import { TransactionErrorWithMessage } from "./error";
|
|
3
|
+
import { ExecuteQuoteClient } from "./onramps";
|
|
3
4
|
type BaseSwapEventParams = Pick<RouteRequest, "fromAddress" | "toAddress" | "fromChain" | "toChain" | "fromToken" | "toToken" | "fromAmount">;
|
|
5
|
+
type BaseSendTransactionEventParams = {
|
|
6
|
+
fromAddress: string;
|
|
7
|
+
toAddress: string;
|
|
8
|
+
amount: string;
|
|
9
|
+
token: Pick<Token, "address" | "chainId" | "symbol" | "type">;
|
|
10
|
+
};
|
|
11
|
+
export type SearchContext = "token" | "chain";
|
|
4
12
|
export interface WidgetEventMap {
|
|
5
13
|
swapStatus: {
|
|
6
14
|
status: string;
|
|
@@ -42,6 +50,21 @@ export interface WidgetEventMap {
|
|
|
42
50
|
reason?: string;
|
|
43
51
|
txHash?: string;
|
|
44
52
|
};
|
|
53
|
+
onrampQuoteRequest: {
|
|
54
|
+
fiatCurrency: string;
|
|
55
|
+
cryptoCurrencyID: string;
|
|
56
|
+
amount: number;
|
|
57
|
+
region?: string;
|
|
58
|
+
};
|
|
59
|
+
onrampQuoteExecute: ExecuteQuoteClient;
|
|
60
|
+
searchEmpty: {
|
|
61
|
+
searchQuery: string;
|
|
62
|
+
context: SearchContext;
|
|
63
|
+
};
|
|
64
|
+
preSend: BaseSendTransactionEventParams;
|
|
65
|
+
postSend: BaseSendTransactionEventParams & {
|
|
66
|
+
txHash: string;
|
|
67
|
+
};
|
|
45
68
|
qrWalletConnectData: {
|
|
46
69
|
matrix: Array<Array<boolean>>;
|
|
47
70
|
};
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { ChainType, StatusResponse } from "@0xsquid/squid-types";
|
|
2
|
+
import { OnRampTransactionStatusType } from "./onramps";
|
|
3
|
+
import { SendTransactionStatus, SimplifiedRouteAction, TransactionStatus } from "./transaction";
|
|
4
|
+
type SimplifiedStatusResponse = Pick<StatusResponse, "axelarTransactionUrl"> & {
|
|
5
|
+
toChain?: Pick<NonNullable<StatusResponse["toChain"]>, "transactionUrl"> | undefined;
|
|
6
|
+
};
|
|
7
|
+
export type SwapTransactionHistory = {
|
|
8
|
+
fromChain: string;
|
|
9
|
+
fromToken: string;
|
|
10
|
+
fromAddress: string;
|
|
11
|
+
fromAmount: string;
|
|
12
|
+
toChain: string;
|
|
13
|
+
toToken: string;
|
|
14
|
+
transactionId: string;
|
|
15
|
+
transactionIdForStatus?: string;
|
|
16
|
+
quoteId: string | undefined;
|
|
17
|
+
toAddress: string;
|
|
18
|
+
toAmount: string;
|
|
19
|
+
status: TransactionStatus;
|
|
20
|
+
timestamp: number;
|
|
21
|
+
nonce?: number;
|
|
22
|
+
routeType: string | undefined;
|
|
23
|
+
statusResponse?: SimplifiedStatusResponse;
|
|
24
|
+
sourceTxExplorerUrl?: string;
|
|
25
|
+
bridgeType?: string;
|
|
26
|
+
actions?: SimplifiedRouteAction[];
|
|
27
|
+
};
|
|
28
|
+
export type SendTransactionHistory = {
|
|
29
|
+
toAddress: string;
|
|
30
|
+
token: {
|
|
31
|
+
address: string;
|
|
32
|
+
symbol: string;
|
|
33
|
+
decimals: number;
|
|
34
|
+
chainId: string;
|
|
35
|
+
type: ChainType;
|
|
36
|
+
};
|
|
37
|
+
timestamp: number;
|
|
38
|
+
status: SendTransactionStatus;
|
|
39
|
+
hash: string;
|
|
40
|
+
amount: string;
|
|
41
|
+
};
|
|
42
|
+
export type FiatTransactionHistory = {
|
|
43
|
+
fromCountryCode: string;
|
|
44
|
+
orderId: string;
|
|
45
|
+
fromFiatCurrency: string;
|
|
46
|
+
fromAmount: string;
|
|
47
|
+
toCryptoCurrencyID: string;
|
|
48
|
+
toTokenAddress: string;
|
|
49
|
+
toCryptoAmount: string;
|
|
50
|
+
toChainId: string;
|
|
51
|
+
toAddress: string;
|
|
52
|
+
status: OnRampTransactionStatusType;
|
|
53
|
+
timestamp: number;
|
|
54
|
+
transactionHash?: string;
|
|
55
|
+
errorMessage?: string;
|
|
56
|
+
providerId: string;
|
|
57
|
+
};
|
|
58
|
+
export declare enum HistoryTxType {
|
|
59
|
+
SWAP = 0,
|
|
60
|
+
BUY = 1,
|
|
61
|
+
SEND = 2
|
|
62
|
+
}
|
|
63
|
+
export type TxTypeToStatusMap = {
|
|
64
|
+
[HistoryTxType.SWAP]: TransactionStatus;
|
|
65
|
+
[HistoryTxType.BUY]: OnRampTransactionStatusType;
|
|
66
|
+
[HistoryTxType.SEND]: SendTransactionStatus;
|
|
67
|
+
};
|
|
68
|
+
export type StatusForTxType<T extends HistoryTxType> = T extends keyof TxTypeToStatusMap ? TxTypeToStatusMap[T] : never;
|
|
69
|
+
export type TxTypeToTransactionMap = {
|
|
70
|
+
[HistoryTxType.SWAP]: {
|
|
71
|
+
data: SwapTransactionHistory;
|
|
72
|
+
txType: HistoryTxType.SWAP;
|
|
73
|
+
};
|
|
74
|
+
[HistoryTxType.BUY]: {
|
|
75
|
+
data: FiatTransactionHistory;
|
|
76
|
+
txType: HistoryTxType.BUY;
|
|
77
|
+
};
|
|
78
|
+
[HistoryTxType.SEND]: {
|
|
79
|
+
data: SendTransactionHistory;
|
|
80
|
+
txType: HistoryTxType.SEND;
|
|
81
|
+
};
|
|
82
|
+
};
|
|
83
|
+
export type HistoryTransaction = TxTypeToTransactionMap[HistoryTxType];
|
|
84
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export var HistoryTxType;
|
|
2
|
+
(function (HistoryTxType) {
|
|
3
|
+
HistoryTxType[HistoryTxType["SWAP"] = 0] = "SWAP";
|
|
4
|
+
HistoryTxType[HistoryTxType["BUY"] = 1] = "BUY";
|
|
5
|
+
HistoryTxType[HistoryTxType["SEND"] = 2] = "SEND";
|
|
6
|
+
})(HistoryTxType || (HistoryTxType = {}));
|
|
7
|
+
//# sourceMappingURL=history.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"history.js","sourceRoot":"","sources":["../../../src/core/types/history.ts"],"names":[],"mappings":"AAoEA,MAAM,CAAN,IAAY,aAIX;AAJD,WAAY,aAAa;IACvB,iDAAI,CAAA;IACJ,+CAAG,CAAA;IACH,iDAAI,CAAA;AACN,CAAC,EAJW,aAAa,KAAb,aAAa,QAIxB"}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
export type { AppConfig } from "./config";
|
|
2
|
-
export { SquidStatusErrorType, TransactionErrorType, type SquidRouteError, type SquidStatusError, } from "./error";
|
|
2
|
+
export { SquidStatusErrorType, TransactionErrorType, type SquidRouteError, type SquidRouteErrorType, type SquidStatusError, } from "./error";
|
|
3
|
+
export type * from "./history";
|
|
4
|
+
export type * from "./onramps/";
|
|
3
5
|
export type { SwapParams } from "./swap";
|
|
4
6
|
export type { Chain, Token } from "./tokens";
|
|
5
|
-
export { AxelarStatusResponseType,
|
|
7
|
+
export { AxelarStatusResponseType, SendTransactionStatus, TransactionStatus, type TransactionParams, } from "./transaction";
|
|
6
8
|
export type { BitcoinWallet, ConnectorID, CosmosWallet, EnsData, EnsSearchResult, FullAddressData, NetworkConfig, SolanaWallet, SupportedChain, Wallet, } from "./wallet";
|
|
7
9
|
export { XamanXrplNetwork } from "./xrp";
|
package/dist/core/types/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { SquidStatusErrorType, TransactionErrorType, } from "./error";
|
|
2
|
-
export { AxelarStatusResponseType, TransactionStatus, } from "./transaction";
|
|
2
|
+
export { AxelarStatusResponseType, SendTransactionStatus, TransactionStatus, } from "./transaction";
|
|
3
3
|
export { XamanXrplNetwork } from "./xrp";
|
|
4
4
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/types/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,oBAAoB,EACpB,oBAAoB,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/types/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,oBAAoB,EACpB,oBAAoB,GAIrB,MAAM,SAAS,CAAC;AAKjB,OAAO,EACL,wBAAwB,EACxB,qBAAqB,EACrB,iBAAiB,GAElB,MAAM,eAAe,CAAC;AAavB,OAAO,EAAE,gBAAgB,EAAE,MAAM,OAAO,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/core/types/onramps/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC"}
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
import { ChainData } from "@0xsquid/squid-types";
|
|
2
|
+
import { ICountry } from "countries-list";
|
|
3
|
+
import { Token } from "../tokens";
|
|
4
|
+
export type OnRampTransactionStatusType = "awaiting_payment" | "processing" | "completed" | "failed";
|
|
5
|
+
export type PaymentMethodType = "credit_card" | "bank_transfer";
|
|
6
|
+
export type OnRampProviderType = "revolut" | "onramper";
|
|
7
|
+
export type ExecuteFiatQuoteResult = {
|
|
8
|
+
redirectUrl: string | unknown;
|
|
9
|
+
orderId: string;
|
|
10
|
+
};
|
|
11
|
+
export type ExecuteFiatQuoteResultClient = ExecuteFiatQuoteResult & {
|
|
12
|
+
executeQuoteRequest: ExecuteQuoteClient;
|
|
13
|
+
toChain: ChainData | undefined;
|
|
14
|
+
};
|
|
15
|
+
export type OnRampQuoteResponse = {
|
|
16
|
+
fiatCurrency: string;
|
|
17
|
+
cryptoCurrencyID: string;
|
|
18
|
+
amount: number;
|
|
19
|
+
fees?: {
|
|
20
|
+
fixed?: number;
|
|
21
|
+
percentage?: number;
|
|
22
|
+
};
|
|
23
|
+
cryptoAmount: number;
|
|
24
|
+
};
|
|
25
|
+
export type OnRampQuoteParams = {
|
|
26
|
+
fiatCurrency: string;
|
|
27
|
+
cryptoCurrencyID: string;
|
|
28
|
+
amount: number | string;
|
|
29
|
+
paymentMethod?: string;
|
|
30
|
+
region?: string;
|
|
31
|
+
};
|
|
32
|
+
export type OnRampTransactionStatus = {
|
|
33
|
+
transactionId: string;
|
|
34
|
+
transactionHash?: string;
|
|
35
|
+
status: OnRampTransactionStatusType;
|
|
36
|
+
createdAt: string;
|
|
37
|
+
updatedAt: string;
|
|
38
|
+
errorMessage?: string | null;
|
|
39
|
+
};
|
|
40
|
+
export type ExecuteQuoteServer = {
|
|
41
|
+
orderId: string;
|
|
42
|
+
fiatCurrency: string;
|
|
43
|
+
cryptoCurrencyID: string;
|
|
44
|
+
amount: number;
|
|
45
|
+
walletAddress: string;
|
|
46
|
+
paymentMethod: PaymentMethodType;
|
|
47
|
+
region?: string;
|
|
48
|
+
onrampProviderId: string;
|
|
49
|
+
};
|
|
50
|
+
export type ExecuteQuoteClient = Omit<ExecuteQuoteServer, "paymentMethod"> & {
|
|
51
|
+
cryptoAmount: number;
|
|
52
|
+
squidToken?: {
|
|
53
|
+
address: string;
|
|
54
|
+
chainId: string;
|
|
55
|
+
};
|
|
56
|
+
providerId: string;
|
|
57
|
+
paymentMethod: PaymentMethodType | string;
|
|
58
|
+
};
|
|
59
|
+
export type FiatCurrency = {
|
|
60
|
+
denomination: string;
|
|
61
|
+
minLimit?: number;
|
|
62
|
+
maxLimit?: number;
|
|
63
|
+
};
|
|
64
|
+
export type FiatCurrencyEnhanced = FiatCurrency & {
|
|
65
|
+
symbol: string;
|
|
66
|
+
name?: string;
|
|
67
|
+
flagUrl?: string;
|
|
68
|
+
countryCode?: string;
|
|
69
|
+
};
|
|
70
|
+
export type OnRampCryptoAsset = {
|
|
71
|
+
tokenSymbol: string;
|
|
72
|
+
blockchain: string;
|
|
73
|
+
smartContractAddress?: string;
|
|
74
|
+
};
|
|
75
|
+
export type TokenWithOnRampID = Token & {
|
|
76
|
+
cryptoCurrencyID: string;
|
|
77
|
+
};
|
|
78
|
+
export type CountryWithCode = ICountry & {
|
|
79
|
+
code: string;
|
|
80
|
+
flagUrl?: string;
|
|
81
|
+
};
|
|
82
|
+
export type FiatToCryptoConfig = {
|
|
83
|
+
supportedPaymentMethods: string[];
|
|
84
|
+
supportedTokens: TokenWithOnRampID[];
|
|
85
|
+
supportedCurrencies: FiatCurrencyEnhanced[];
|
|
86
|
+
supportedCountries: CountryWithCode[];
|
|
87
|
+
};
|
|
88
|
+
export type OnrampPaymentMethodType = "credit_card" | "bank_transfer" | "apple_pay" | "google_pay" | "revolut";
|
|
89
|
+
export interface OnrampPaymentMethodLimits {
|
|
90
|
+
min: number;
|
|
91
|
+
max: number;
|
|
92
|
+
}
|
|
93
|
+
export interface OnrampPaymentMethodDetails {
|
|
94
|
+
currencyStatus: string;
|
|
95
|
+
limits: {
|
|
96
|
+
[provider: string]: OnrampPaymentMethodLimits;
|
|
97
|
+
aggregatedLimit: OnrampPaymentMethodLimits;
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
export interface OnrampPaymentMethod {
|
|
101
|
+
id: string;
|
|
102
|
+
name: string;
|
|
103
|
+
icon?: string;
|
|
104
|
+
isRecommended?: boolean;
|
|
105
|
+
details?: OnrampPaymentMethodDetails;
|
|
106
|
+
}
|
|
107
|
+
export type OnrampPaymentMethodRecommendation = "BestPrice" | "Fastest" | "LowestFee";
|
|
108
|
+
export interface OnrampQuoteResult {
|
|
109
|
+
internalProviderId: string;
|
|
110
|
+
onrampProviderId: string;
|
|
111
|
+
providerName: string;
|
|
112
|
+
providerIcon?: string;
|
|
113
|
+
recommendations?: OnrampPaymentMethodRecommendation[] | string[];
|
|
114
|
+
rate: number;
|
|
115
|
+
networkFee: number;
|
|
116
|
+
serviceFee: number;
|
|
117
|
+
totalFee: number;
|
|
118
|
+
receivedAmount: number;
|
|
119
|
+
paymentMethods: OnrampPaymentMethod[];
|
|
120
|
+
paymentMethodsRecommendation?: {
|
|
121
|
+
recommendedId: string;
|
|
122
|
+
reason?: string;
|
|
123
|
+
};
|
|
124
|
+
quoteId?: string;
|
|
125
|
+
}
|
|
126
|
+
export interface OnrampQuoteResponse {
|
|
127
|
+
quotes: OnrampQuoteResult[];
|
|
128
|
+
recommendedQuote?: {
|
|
129
|
+
internalProviderId: string;
|
|
130
|
+
onrampProviderId: string;
|
|
131
|
+
reason?: string;
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
export interface OnrampConfigResponse {
|
|
135
|
+
id: string;
|
|
136
|
+
name: string;
|
|
137
|
+
icon?: string;
|
|
138
|
+
supportedFiats: string[];
|
|
139
|
+
supportedCryptos: {
|
|
140
|
+
id: string;
|
|
141
|
+
address: string;
|
|
142
|
+
chainId: string;
|
|
143
|
+
}[];
|
|
144
|
+
supportedCountries: string[];
|
|
145
|
+
supportedPaymentMethods?: string[];
|
|
146
|
+
supportedOnramps?: {
|
|
147
|
+
id: string;
|
|
148
|
+
name: string;
|
|
149
|
+
icon?: string;
|
|
150
|
+
}[];
|
|
151
|
+
limits?: {
|
|
152
|
+
[key: string]: {
|
|
153
|
+
min: number;
|
|
154
|
+
max: number;
|
|
155
|
+
};
|
|
156
|
+
};
|
|
157
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"onramp.js","sourceRoot":"","sources":["../../../../src/core/types/onramps/onramp.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
export interface RevolutQuoteResponse {
|
|
2
|
+
service_fee: {
|
|
3
|
+
amount: number;
|
|
4
|
+
currency: string;
|
|
5
|
+
};
|
|
6
|
+
network_fee: {
|
|
7
|
+
amount: number;
|
|
8
|
+
currency: string;
|
|
9
|
+
};
|
|
10
|
+
crypto: {
|
|
11
|
+
amount: number;
|
|
12
|
+
currencyId: string;
|
|
13
|
+
};
|
|
14
|
+
partner_fee: {
|
|
15
|
+
amount: number;
|
|
16
|
+
currency: string;
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
export interface RevolutRedirectResponse {
|
|
20
|
+
ramp_redirect_url: string;
|
|
21
|
+
}
|
|
22
|
+
export interface RevolutQuoteParams {
|
|
23
|
+
fiat: string;
|
|
24
|
+
crypto: string;
|
|
25
|
+
amount: string;
|
|
26
|
+
payment?: string;
|
|
27
|
+
region?: string;
|
|
28
|
+
}
|
|
29
|
+
export interface RevolutCryptoAsset {
|
|
30
|
+
id: string;
|
|
31
|
+
currency: string;
|
|
32
|
+
blockchain: string;
|
|
33
|
+
smartContractAddress?: string;
|
|
34
|
+
feePercentages?: number[];
|
|
35
|
+
}
|
|
36
|
+
export interface RevolutConfig {
|
|
37
|
+
version: string;
|
|
38
|
+
countries: string[];
|
|
39
|
+
fiat: {
|
|
40
|
+
currency: string;
|
|
41
|
+
min_limit: number;
|
|
42
|
+
max_limit: number;
|
|
43
|
+
}[];
|
|
44
|
+
crypto: RevolutCryptoAsset[];
|
|
45
|
+
payment_methods: string[];
|
|
46
|
+
}
|
|
47
|
+
export interface RevolutOrderStatus {
|
|
48
|
+
id: string;
|
|
49
|
+
fiat: {
|
|
50
|
+
amount: number;
|
|
51
|
+
currency: string;
|
|
52
|
+
};
|
|
53
|
+
crypto: {
|
|
54
|
+
amount: number;
|
|
55
|
+
currencyId: string;
|
|
56
|
+
};
|
|
57
|
+
fees: {
|
|
58
|
+
ramp_fee: {
|
|
59
|
+
amount: number;
|
|
60
|
+
currency: string;
|
|
61
|
+
};
|
|
62
|
+
partner_fee: {
|
|
63
|
+
amount: number;
|
|
64
|
+
currency: string;
|
|
65
|
+
};
|
|
66
|
+
network_fee: {
|
|
67
|
+
amount: number;
|
|
68
|
+
currency: string;
|
|
69
|
+
};
|
|
70
|
+
};
|
|
71
|
+
exchange_rate: number;
|
|
72
|
+
payment: string;
|
|
73
|
+
created_at: string;
|
|
74
|
+
updated_at: string;
|
|
75
|
+
status: string;
|
|
76
|
+
wallet: string;
|
|
77
|
+
transaction_hash?: string;
|
|
78
|
+
fees_partner_currency: {
|
|
79
|
+
ramp_fee: {
|
|
80
|
+
amount: number;
|
|
81
|
+
currency: string;
|
|
82
|
+
};
|
|
83
|
+
partner_fee: {
|
|
84
|
+
amount: number;
|
|
85
|
+
currency: string;
|
|
86
|
+
};
|
|
87
|
+
network_fee: {
|
|
88
|
+
amount: number;
|
|
89
|
+
currency: string;
|
|
90
|
+
};
|
|
91
|
+
};
|
|
92
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"revolut.js","sourceRoot":"","sources":["../../../../src/core/types/onramps/revolut.ts"],"names":[],"mappings":""}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import type { ChainData, RouteActionResponse, RouteResponse
|
|
1
|
+
import type { ChainData, RouteActionResponse, RouteResponse } from "@0xsquid/squid-types";
|
|
2
2
|
import type { UseQueryResult } from "@tanstack/react-query";
|
|
3
3
|
import type { TransactionErrorWithMessage } from "./error";
|
|
4
|
+
import { SwapTransactionHistory } from "./history";
|
|
4
5
|
export declare enum TransactionType {
|
|
5
6
|
BRIDGE = "BRIDGE",
|
|
6
7
|
BRIDGE_CALL = "BRIDGE_CALL",
|
|
@@ -35,6 +36,11 @@ export declare enum TransactionStatus {
|
|
|
35
36
|
REJECTED = "rejected",
|
|
36
37
|
REFUNDED = "refunded"
|
|
37
38
|
}
|
|
39
|
+
export declare enum SendTransactionStatus {
|
|
40
|
+
ONGOING = 0,
|
|
41
|
+
SUCCESS = 1,
|
|
42
|
+
ERROR = 2
|
|
43
|
+
}
|
|
38
44
|
export interface TransactionParams {
|
|
39
45
|
routeType: string;
|
|
40
46
|
fromChain?: ChainData;
|
|
@@ -42,6 +48,7 @@ export interface TransactionParams {
|
|
|
42
48
|
nonce?: number;
|
|
43
49
|
transactionIdForStatus?: string;
|
|
44
50
|
transactionId: string | undefined;
|
|
51
|
+
quoteId: string;
|
|
45
52
|
timestamp?: number;
|
|
46
53
|
sourceStatus?: TransactionStatus;
|
|
47
54
|
status: TransactionStatus;
|
|
@@ -52,7 +59,7 @@ export interface TransactionParams {
|
|
|
52
59
|
sourceTxExplorerUrl?: string;
|
|
53
60
|
sourceExplorerImgUrl?: string;
|
|
54
61
|
}
|
|
55
|
-
export type
|
|
62
|
+
export type SwapTransactionForHistoryStore = TransactionParams & Pick<RouteResponse["route"], "params" | "estimate">;
|
|
56
63
|
export interface StepStatusGetterProps {
|
|
57
64
|
transaction?: TransactionParams;
|
|
58
65
|
statusResponse?: UseQueryResult<any, unknown>;
|
|
@@ -61,34 +68,7 @@ export interface StepStatusGetterProps {
|
|
|
61
68
|
export interface PatchedRouteActionResponse extends Omit<RouteActionResponse, "data"> {
|
|
62
69
|
data?: RouteActionResponse["data"];
|
|
63
70
|
}
|
|
64
|
-
export type
|
|
71
|
+
export type SwapTransactionForStatus = Pick<SwapTransactionHistory, "fromChain" | "transactionId" | "toChain" | "status" | "fromAddress" | "bridgeType" | "transactionIdForStatus" | "actions" | "quoteId">;
|
|
65
72
|
export type SimplifiedRouteAction = Pick<PatchedRouteActionResponse, "type" | "provider"> & {
|
|
66
73
|
data?: any;
|
|
67
74
|
};
|
|
68
|
-
export type SimplifiedTransactionHistory = {
|
|
69
|
-
fromChain: string;
|
|
70
|
-
fromToken: string;
|
|
71
|
-
fromAddress: string;
|
|
72
|
-
fromAmount: string;
|
|
73
|
-
toChain: string;
|
|
74
|
-
toToken: string;
|
|
75
|
-
transactionId: string;
|
|
76
|
-
transactionIdForStatus?: string;
|
|
77
|
-
toAddress: string;
|
|
78
|
-
toAmount: string;
|
|
79
|
-
toAmountMin: string;
|
|
80
|
-
exchangeRate: string;
|
|
81
|
-
status: TransactionStatus;
|
|
82
|
-
aggregatePriceImpact?: string;
|
|
83
|
-
toAmountMinUSD?: string;
|
|
84
|
-
fromAmountUSD?: string;
|
|
85
|
-
toAmountUSD?: string;
|
|
86
|
-
timestamp: number;
|
|
87
|
-
slippage?: number;
|
|
88
|
-
nonce?: number;
|
|
89
|
-
routeType: string | undefined;
|
|
90
|
-
statusResponse?: StatusResponse;
|
|
91
|
-
sourceTxExplorerUrl?: string;
|
|
92
|
-
bridgeType?: string;
|
|
93
|
-
actions?: SimplifiedRouteAction[];
|
|
94
|
-
};
|
|
@@ -38,4 +38,10 @@ export var TransactionStatus;
|
|
|
38
38
|
// Coral refund
|
|
39
39
|
TransactionStatus["REFUNDED"] = "refunded";
|
|
40
40
|
})(TransactionStatus || (TransactionStatus = {}));
|
|
41
|
+
export var SendTransactionStatus;
|
|
42
|
+
(function (SendTransactionStatus) {
|
|
43
|
+
SendTransactionStatus[SendTransactionStatus["ONGOING"] = 0] = "ONGOING";
|
|
44
|
+
SendTransactionStatus[SendTransactionStatus["SUCCESS"] = 1] = "SUCCESS";
|
|
45
|
+
SendTransactionStatus[SendTransactionStatus["ERROR"] = 2] = "ERROR";
|
|
46
|
+
})(SendTransactionStatus || (SendTransactionStatus = {}));
|
|
41
47
|
//# sourceMappingURL=transaction.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transaction.js","sourceRoot":"","sources":["../../../src/core/types/transaction.ts"],"names":[],"mappings":"AASA,MAAM,CAAN,IAAY,eAKX;AALD,WAAY,eAAe;IACzB,oCAAiB,CAAA;IACjB,8CAA2B,CAAA;IAC3B,8CAA2B,CAAA;IAC3B,wDAAqC,CAAA;AACvC,CAAC,EALW,eAAe,KAAf,eAAe,QAK1B;AAED,MAAM,CAAN,IAAY,wBAaX;AAbD,WAAY,wBAAwB;IAClC,+EAAmD,CAAA;IACnD,yEAA6C,CAAA;IAC7C,iEAAqC,CAAA;IACrC,+EAAmD,CAAA;IACnD,2EAA+C,CAAA;IAC/C,wEAA4C,CAAA;IAC5C,kFAAsD,CAAA;IACtD,mFAAuD,CAAA;IACvD,+DAAmC,CAAA;IACnC,2DAA+B,CAAA;IAC/B,uEAA2C,CAAA;IAC3C,2CAAe,CAAA;AACjB,CAAC,EAbW,wBAAwB,KAAxB,wBAAwB,QAanC;AAED,MAAM,CAAN,IAAY,iBAgBX;AAhBD,WAAY,iBAAiB;IAC3B,kDAAkD;IAClD,wCAAmB,CAAA;IACnB,4CAAuB,CAAA;IACvB,wCAAmB,CAAA;IACnB,wDAAmC,CAAA;IACnC,4CAAuB,CAAA;IACvB,qDAAqD;IACrD,uDAAkC,CAAA;IAClC,8DAAyC,CAAA;IACzC,oCAAe,CAAA;IACf,wCAAmB,CAAA;IACnB,wCAAmB,CAAA;IACnB,0CAAqB,CAAA;IACrB,eAAe;IACf,0CAAqB,CAAA;AACvB,CAAC,EAhBW,iBAAiB,KAAjB,iBAAiB,QAgB5B"}
|
|
1
|
+
{"version":3,"file":"transaction.js","sourceRoot":"","sources":["../../../src/core/types/transaction.ts"],"names":[],"mappings":"AASA,MAAM,CAAN,IAAY,eAKX;AALD,WAAY,eAAe;IACzB,oCAAiB,CAAA;IACjB,8CAA2B,CAAA;IAC3B,8CAA2B,CAAA;IAC3B,wDAAqC,CAAA;AACvC,CAAC,EALW,eAAe,KAAf,eAAe,QAK1B;AAED,MAAM,CAAN,IAAY,wBAaX;AAbD,WAAY,wBAAwB;IAClC,+EAAmD,CAAA;IACnD,yEAA6C,CAAA;IAC7C,iEAAqC,CAAA;IACrC,+EAAmD,CAAA;IACnD,2EAA+C,CAAA;IAC/C,wEAA4C,CAAA;IAC5C,kFAAsD,CAAA;IACtD,mFAAuD,CAAA;IACvD,+DAAmC,CAAA;IACnC,2DAA+B,CAAA;IAC/B,uEAA2C,CAAA;IAC3C,2CAAe,CAAA;AACjB,CAAC,EAbW,wBAAwB,KAAxB,wBAAwB,QAanC;AAED,MAAM,CAAN,IAAY,iBAgBX;AAhBD,WAAY,iBAAiB;IAC3B,kDAAkD;IAClD,wCAAmB,CAAA;IACnB,4CAAuB,CAAA;IACvB,wCAAmB,CAAA;IACnB,wDAAmC,CAAA;IACnC,4CAAuB,CAAA;IACvB,qDAAqD;IACrD,uDAAkC,CAAA;IAClC,8DAAyC,CAAA;IACzC,oCAAe,CAAA;IACf,wCAAmB,CAAA;IACnB,wCAAmB,CAAA;IACnB,0CAAqB,CAAA;IACrB,eAAe;IACf,0CAAqB,CAAA;AACvB,CAAC,EAhBW,iBAAiB,KAAjB,iBAAiB,QAgB5B;AAED,MAAM,CAAN,IAAY,qBAIX;AAJD,WAAY,qBAAqB;IAC/B,uEAAO,CAAA;IACP,uEAAO,CAAA;IACP,mEAAK,CAAA;AACP,CAAC,EAJW,qBAAqB,KAArB,qBAAqB,QAIhC"}
|
package/dist/core/wallets.js
CHANGED
|
@@ -250,7 +250,7 @@ const xrpWallets = [
|
|
|
250
250
|
connectorId: "xrp-ledger-metamask-snap",
|
|
251
251
|
connectorName: "XRPL Metamask Snap",
|
|
252
252
|
windowFlag: WindowWalletFlag.XrpLedgerMetamaskSnap,
|
|
253
|
-
icon: `${walletIconBaseUrl}/metamask.webp`,
|
|
253
|
+
icon: `${walletIconBaseUrl}/metamask-xrpl-snap.webp`,
|
|
254
254
|
},
|
|
255
255
|
{
|
|
256
256
|
type: ChainType.XRPL,
|
|
@@ -259,7 +259,7 @@ const xrpWallets = [
|
|
|
259
259
|
connector: new CrossmarkConnector(),
|
|
260
260
|
connectorId: "crossmark",
|
|
261
261
|
connectorName: "Crossmark",
|
|
262
|
-
icon:
|
|
262
|
+
icon: `${walletIconBaseUrl}/crossmark.webp`,
|
|
263
263
|
},
|
|
264
264
|
];
|
|
265
265
|
export const multiChainWallets = [
|
|
@@ -321,6 +321,14 @@ export const multiChainWallets = [
|
|
|
321
321
|
},
|
|
322
322
|
}),
|
|
323
323
|
},
|
|
324
|
+
{
|
|
325
|
+
chainType: ChainType.BTC,
|
|
326
|
+
connector: () => ({
|
|
327
|
+
id: "keplr",
|
|
328
|
+
name: "Keplr",
|
|
329
|
+
provider: accessProperty(window, "bitcoin_keplr"),
|
|
330
|
+
}),
|
|
331
|
+
},
|
|
324
332
|
],
|
|
325
333
|
},
|
|
326
334
|
{
|