@0xsquid/react-hooks 8.11.0 → 8.11.1-beta-danal.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core/client/index.d.ts +1 -0
- package/dist/core/constants.d.ts +2 -0
- package/dist/core/types/danal.d.ts +1 -0
- package/dist/core/types/wallet.d.ts +7 -0
- package/dist/hooks/chains/useSquidChains.d.ts +1 -0
- package/dist/hooks/tokens/useSquidTokens.d.ts +1 -0
- package/dist/hooks/wallet/useMultiChainWallet.d.ts +38 -0
- package/dist/hooks/wallet/useWallet.d.ts +42 -0
- package/dist/{index-D5bkikGx.js → index-Bz_l0J0g.js} +125 -17
- package/dist/index-Bz_l0J0g.js.map +1 -0
- package/dist/{index-BzTFES6t.js → index-COYrDBlh.js} +125 -16
- package/dist/index-COYrDBlh.js.map +1 -0
- package/dist/{index.es-DaKI7v5_.js → index.es-Bh80Pkl-.js} +2 -2
- package/dist/{index.es-DaKI7v5_.js.map → index.es-Bh80Pkl-.js.map} +1 -1
- package/dist/{index.es-wL3I3c3h.js → index.es-Cqc-vgYs.js} +2 -2
- package/dist/{index.es-wL3I3c3h.js.map → index.es-Cqc-vgYs.js.map} +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/{secretService-D70MRo5w.js → secretService-SFoJwk5s.js} +2 -2
- package/dist/{secretService-D70MRo5w.js.map → secretService-SFoJwk5s.js.map} +1 -1
- package/dist/{secretService-BMH_eXJd.js → secretService-uItv_3Jq.js} +2 -2
- package/dist/{secretService-BMH_eXJd.js.map → secretService-uItv_3Jq.js.map} +1 -1
- package/dist/server.esm.js +6 -0
- package/dist/server.esm.js.map +1 -1
- package/dist/server.js +6 -0
- package/dist/server.js.map +1 -1
- package/dist/services/internal/danalService.d.ts +7 -0
- package/dist/services/internal/transactionService.d.ts +8 -0
- package/dist/{stellarService.client-DhwF4F1c.js → stellarService.client-C-DwcHfr.js} +2 -2
- package/dist/{stellarService.client-DhwF4F1c.js.map → stellarService.client-C-DwcHfr.js.map} +1 -1
- package/dist/{stellarService.client-BpCW1qZY.js → stellarService.client-rTXJcduV.js} +2 -2
- package/dist/{stellarService.client-BpCW1qZY.js.map → stellarService.client-rTXJcduV.js.map} +1 -1
- package/dist/tests/danalService.test.d.ts +1 -0
- package/package.json +2 -2
- package/dist/index-BzTFES6t.js.map +0 -1
- package/dist/index-D5bkikGx.js.map +0 -1
|
@@ -14,6 +14,7 @@ type ChainTypeToClient = {
|
|
|
14
14
|
[ChainType.XRPL]: XrplRpcClient;
|
|
15
15
|
[ChainType.STELLAR]: StellarRpcClient;
|
|
16
16
|
[ChainType.CANTON]: null;
|
|
17
|
+
[ChainType.DANAL]: null;
|
|
17
18
|
};
|
|
18
19
|
export declare function getClient<T extends ChainType>(chain: ChainData): Promise<ChainTypeToClient[T]>;
|
|
19
20
|
export {};
|
package/dist/core/constants.d.ts
CHANGED
|
@@ -22,6 +22,7 @@ export declare const nativeSuiTokenAddress = "0x00000000000000000000000000000000
|
|
|
22
22
|
export declare const nativeXrplTokenAddress = "xrp";
|
|
23
23
|
export declare const nativeStellarTokenAddress = "CAS3J7GYLGXMF6TDJBBYYSE3HQ6BBSMLNUQ34T6TZMYMW2EVH34XOWMA";
|
|
24
24
|
export declare const nativeCantonTokenAddress = "DSO::1220b1431ef217342db44d516bb9befde802be7d8899637d290895fa58880f19accc";
|
|
25
|
+
export declare const nativeDanalTokenAddress = "pci";
|
|
25
26
|
export declare const defaultSlippage: SlippageOption;
|
|
26
27
|
export declare const destinationAddressResetValue = "null";
|
|
27
28
|
export declare const fallbackAddressResetValue = "null";
|
|
@@ -83,6 +84,7 @@ export declare const CHAIN_IDS: {
|
|
|
83
84
|
readonly STELLAR: "stellar-mainnet";
|
|
84
85
|
readonly STELLAR_TESTNET: "stellar-testnet";
|
|
85
86
|
readonly CANTON: "canton";
|
|
87
|
+
readonly DANAL_TESTNET: "danal-testnet";
|
|
86
88
|
};
|
|
87
89
|
export declare const chainTypeToDefaultChainIdMap: Record<ChainType, string>;
|
|
88
90
|
export declare const chainTypeToNativeTokenAddressMap: Record<ChainType, string>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type DanalConnector = null;
|
|
@@ -2,6 +2,7 @@ import type { ChainType } from "@0xsquid/squid-types";
|
|
|
2
2
|
import { BitcoinConnector } from "./bitcoin";
|
|
3
3
|
import { CantonConnector } from "./canton";
|
|
4
4
|
import { CosmosConnector } from "./cosmos";
|
|
5
|
+
import { DanalConnector } from "./danal";
|
|
5
6
|
import { EvmConnector } from "./evm";
|
|
6
7
|
import { SolanaConnector } from "./solana";
|
|
7
8
|
import { StellarConnector } from "./stellar";
|
|
@@ -62,6 +63,10 @@ export type CantonWallet = Wallet & {
|
|
|
62
63
|
type: ChainType.CANTON;
|
|
63
64
|
connector: ConnectorByChainType[ChainType.CANTON];
|
|
64
65
|
};
|
|
66
|
+
export type DanalWallet = Wallet & {
|
|
67
|
+
type: ChainType.DANAL;
|
|
68
|
+
connector: ConnectorByChainType[ChainType.DANAL];
|
|
69
|
+
};
|
|
65
70
|
export type SupportedChain = {
|
|
66
71
|
chainType: ChainType;
|
|
67
72
|
chains?: string[];
|
|
@@ -144,6 +149,7 @@ export interface ChainTypeToWalletState {
|
|
|
144
149
|
[ChainType.XRPL]: BaseWalletState<XrplWallet>;
|
|
145
150
|
[ChainType.STELLAR]: BaseWalletState<StellarWallet>;
|
|
146
151
|
[ChainType.CANTON]: BaseWalletState<CantonWallet>;
|
|
152
|
+
[ChainType.DANAL]: BaseWalletState<DanalWallet>;
|
|
147
153
|
}
|
|
148
154
|
interface ConnectorByChainType extends Record<ChainType, unknown> {
|
|
149
155
|
[ChainType.EVM]: EvmConnector;
|
|
@@ -154,5 +160,6 @@ interface ConnectorByChainType extends Record<ChainType, unknown> {
|
|
|
154
160
|
[ChainType.XRPL]: XrplConnector;
|
|
155
161
|
[ChainType.STELLAR]: StellarConnector;
|
|
156
162
|
[ChainType.CANTON]: CantonConnector;
|
|
163
|
+
[ChainType.DANAL]: DanalConnector;
|
|
157
164
|
}
|
|
158
165
|
export {};
|
|
@@ -13,6 +13,7 @@ export declare const useSquidChains: (direction?: SwapDirection) => {
|
|
|
13
13
|
xrplChains: ChainData[];
|
|
14
14
|
stellarChains: ChainData[];
|
|
15
15
|
cantonChains: ChainData[];
|
|
16
|
+
danalChains: ChainData[];
|
|
16
17
|
getChainType: (chainId?: string) => ChainType | undefined;
|
|
17
18
|
findChain: (chainId: string | undefined) => ChainData | undefined;
|
|
18
19
|
};
|
|
@@ -314,5 +314,43 @@ export declare const useMultiChainWallet: (chain: ChainData | undefined) => {
|
|
|
314
314
|
} & {
|
|
315
315
|
type: ChainType.CANTON;
|
|
316
316
|
connector: import("../../core/types/canton").CantonConnector;
|
|
317
|
+
}) | ({
|
|
318
|
+
name: string;
|
|
319
|
+
connectorId: import("../../core/types/wallet").ConnectorID;
|
|
320
|
+
connectorName: string;
|
|
321
|
+
icon: string | undefined;
|
|
322
|
+
windowFlag: import("../../core/types/wallet").WindowWalletFlag;
|
|
323
|
+
isMobile?: boolean | undefined;
|
|
324
|
+
isQrWallet?: boolean | undefined;
|
|
325
|
+
isInstalled?: (() => boolean) | undefined;
|
|
326
|
+
skipInstallCheck?: boolean | undefined;
|
|
327
|
+
rdns?: string | undefined;
|
|
328
|
+
links?: import("../../core/types/wallet").WalletLinks | undefined;
|
|
329
|
+
} & {
|
|
330
|
+
isMultiChain: true;
|
|
331
|
+
supportedNetworks: import("../../core/types/wallet").NetworkConfig[];
|
|
332
|
+
} & {
|
|
333
|
+
type: ChainType.DANAL;
|
|
334
|
+
connector: null;
|
|
335
|
+
}) | ({
|
|
336
|
+
name: string;
|
|
337
|
+
connectorId: import("../../core/types/wallet").ConnectorID;
|
|
338
|
+
connectorName: string;
|
|
339
|
+
icon: string | undefined;
|
|
340
|
+
windowFlag: import("../../core/types/wallet").WindowWalletFlag;
|
|
341
|
+
isMobile?: boolean | undefined;
|
|
342
|
+
isQrWallet?: boolean | undefined;
|
|
343
|
+
isInstalled?: (() => boolean) | undefined;
|
|
344
|
+
skipInstallCheck?: boolean | undefined;
|
|
345
|
+
rdns?: string | undefined;
|
|
346
|
+
links?: import("../../core/types/wallet").WalletLinks | undefined;
|
|
347
|
+
} & {
|
|
348
|
+
isMultiChain?: false | undefined;
|
|
349
|
+
} & {
|
|
350
|
+
type: ChainType.DANAL;
|
|
351
|
+
connector: null;
|
|
352
|
+
} & {
|
|
353
|
+
type: ChainType.DANAL;
|
|
354
|
+
connector: null;
|
|
317
355
|
}) | undefined;
|
|
318
356
|
};
|
|
@@ -341,6 +341,48 @@ export declare const useWallet: () => {
|
|
|
341
341
|
});
|
|
342
342
|
address: string;
|
|
343
343
|
}>;
|
|
344
|
+
danal: Partial<{
|
|
345
|
+
wallet: ({
|
|
346
|
+
name: string;
|
|
347
|
+
connectorId: import("../../core/types/wallet").ConnectorID;
|
|
348
|
+
connectorName: string;
|
|
349
|
+
icon: string | undefined;
|
|
350
|
+
windowFlag: import("../../core/types/wallet").WindowWalletFlag;
|
|
351
|
+
isMobile?: boolean | undefined;
|
|
352
|
+
isQrWallet?: boolean | undefined;
|
|
353
|
+
isInstalled?: (() => boolean) | undefined;
|
|
354
|
+
skipInstallCheck?: boolean | undefined;
|
|
355
|
+
rdns?: string | undefined;
|
|
356
|
+
links?: import("../../core/types/wallet").WalletLinks | undefined;
|
|
357
|
+
} & {
|
|
358
|
+
isMultiChain: true;
|
|
359
|
+
supportedNetworks: import("../../core/types/wallet").NetworkConfig[];
|
|
360
|
+
} & {
|
|
361
|
+
type: ChainType.DANAL;
|
|
362
|
+
connector: null;
|
|
363
|
+
}) | ({
|
|
364
|
+
name: string;
|
|
365
|
+
connectorId: import("../../core/types/wallet").ConnectorID;
|
|
366
|
+
connectorName: string;
|
|
367
|
+
icon: string | undefined;
|
|
368
|
+
windowFlag: import("../../core/types/wallet").WindowWalletFlag;
|
|
369
|
+
isMobile?: boolean | undefined;
|
|
370
|
+
isQrWallet?: boolean | undefined;
|
|
371
|
+
isInstalled?: (() => boolean) | undefined;
|
|
372
|
+
skipInstallCheck?: boolean | undefined;
|
|
373
|
+
rdns?: string | undefined;
|
|
374
|
+
links?: import("../../core/types/wallet").WalletLinks | undefined;
|
|
375
|
+
} & {
|
|
376
|
+
isMultiChain?: false | undefined;
|
|
377
|
+
} & {
|
|
378
|
+
type: ChainType.DANAL;
|
|
379
|
+
connector: null;
|
|
380
|
+
} & {
|
|
381
|
+
type: ChainType.DANAL;
|
|
382
|
+
connector: null;
|
|
383
|
+
});
|
|
384
|
+
address: string;
|
|
385
|
+
}>;
|
|
344
386
|
};
|
|
345
387
|
connectedAddresses: Record<ChainType, string | undefined>;
|
|
346
388
|
connectingWalletState: import("../store/useWalletStore").ConnectingWalletState;
|
|
@@ -59,6 +59,7 @@ const suiZeroAddress = "0x0000000000000000000000000000000000000000";
|
|
|
59
59
|
const xrplZeroAddress = "rrrrrrrrrrrrrrrrrrrrrhoLvTp";
|
|
60
60
|
const stellarZeroAddress = "GAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAWHF";
|
|
61
61
|
const cantonZeroAddress = "none::12200000000000000000000000000000000000000000000000000000000000000000";
|
|
62
|
+
const danalZeroAddress = "PCI00000000000000000000000000000000000000000000000000";
|
|
62
63
|
const chainTypeToZeroAddressMap = {
|
|
63
64
|
[ChainType.EVM]: zeroAddress$1,
|
|
64
65
|
[ChainType.COSMOS]: cosmosZeroAddress,
|
|
@@ -68,6 +69,7 @@ const chainTypeToZeroAddressMap = {
|
|
|
68
69
|
[ChainType.XRPL]: xrplZeroAddress,
|
|
69
70
|
[ChainType.STELLAR]: stellarZeroAddress,
|
|
70
71
|
[ChainType.CANTON]: cantonZeroAddress,
|
|
72
|
+
[ChainType.DANAL]: danalZeroAddress,
|
|
71
73
|
};
|
|
72
74
|
const nativeEvmTokenAddress = "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee";
|
|
73
75
|
const nativeCosmosTokenAddress = "uosmo";
|
|
@@ -77,6 +79,7 @@ const nativeSuiTokenAddress = "0x00000000000000000000000000000000000000000000000
|
|
|
77
79
|
const nativeXrplTokenAddress = "xrp";
|
|
78
80
|
const nativeStellarTokenAddress = "CAS3J7GYLGXMF6TDJBBYYSE3HQ6BBSMLNUQ34T6TZMYMW2EVH34XOWMA";
|
|
79
81
|
const nativeCantonTokenAddress = "DSO::1220b1431ef217342db44d516bb9befde802be7d8899637d290895fa58880f19accc";
|
|
82
|
+
const nativeDanalTokenAddress = "pci";
|
|
80
83
|
// by setting slippage to undefined, it's set to "auto"
|
|
81
84
|
const defaultSlippage = undefined;
|
|
82
85
|
const destinationAddressResetValue = "null";
|
|
@@ -142,6 +145,7 @@ const CHAIN_IDS = {
|
|
|
142
145
|
STELLAR: "stellar-mainnet",
|
|
143
146
|
STELLAR_TESTNET: "stellar-testnet",
|
|
144
147
|
CANTON: "canton",
|
|
148
|
+
DANAL_TESTNET: "danal-testnet",
|
|
145
149
|
};
|
|
146
150
|
const chainTypeToDefaultChainIdMap = {
|
|
147
151
|
[ChainType.EVM]: CHAIN_IDS.ETHEREUM,
|
|
@@ -152,6 +156,7 @@ const chainTypeToDefaultChainIdMap = {
|
|
|
152
156
|
[ChainType.XRPL]: CHAIN_IDS.XRPL,
|
|
153
157
|
[ChainType.STELLAR]: CHAIN_IDS.STELLAR,
|
|
154
158
|
[ChainType.CANTON]: CHAIN_IDS.CANTON,
|
|
159
|
+
[ChainType.DANAL]: CHAIN_IDS.DANAL_TESTNET,
|
|
155
160
|
};
|
|
156
161
|
const chainTypeToNativeTokenAddressMap = {
|
|
157
162
|
[ChainType.EVM]: nativeEvmTokenAddress,
|
|
@@ -162,6 +167,7 @@ const chainTypeToNativeTokenAddressMap = {
|
|
|
162
167
|
[ChainType.XRPL]: nativeXrplTokenAddress,
|
|
163
168
|
[ChainType.STELLAR]: nativeStellarTokenAddress,
|
|
164
169
|
[ChainType.CANTON]: nativeCantonTokenAddress,
|
|
170
|
+
[ChainType.DANAL]: nativeDanalTokenAddress,
|
|
165
171
|
};
|
|
166
172
|
const defaultConfigValues = {
|
|
167
173
|
integratorId: INTEGRATOR_ID,
|
|
@@ -21105,6 +21111,34 @@ function groupCantonHoldingBalances(acsResponse) {
|
|
|
21105
21111
|
return Object.fromEntries(Object.entries(totals).map(([key, total]) => [key, total.toString(10)]));
|
|
21106
21112
|
}
|
|
21107
21113
|
|
|
21114
|
+
// Matches the backend validation: "PCI" + 50 uppercase-hex chars, case-sensitive.
|
|
21115
|
+
const DANAL_ADDRESS_REGEX = /^PCI[0-9A-F]{50}$/;
|
|
21116
|
+
function isDanalAddressValid(address) {
|
|
21117
|
+
if (!address)
|
|
21118
|
+
return false;
|
|
21119
|
+
return DANAL_ADDRESS_REGEX.test(address);
|
|
21120
|
+
}
|
|
21121
|
+
function isDanalTransferRequestBody(value) {
|
|
21122
|
+
if (typeof value !== "object" || value === null)
|
|
21123
|
+
return false;
|
|
21124
|
+
const { receiver, amount, memo } = value;
|
|
21125
|
+
return (typeof receiver === "string" &&
|
|
21126
|
+
receiver.length > 0 &&
|
|
21127
|
+
typeof amount === "string" &&
|
|
21128
|
+
amount.length > 0 &&
|
|
21129
|
+
typeof memo === "string" &&
|
|
21130
|
+
memo.length > 0);
|
|
21131
|
+
}
|
|
21132
|
+
function parseDanalTransferBody(data) {
|
|
21133
|
+
try {
|
|
21134
|
+
const parsed = JSON.parse(data);
|
|
21135
|
+
return isDanalTransferRequestBody(parsed) ? parsed : null;
|
|
21136
|
+
}
|
|
21137
|
+
catch {
|
|
21138
|
+
return null;
|
|
21139
|
+
}
|
|
21140
|
+
}
|
|
21141
|
+
|
|
21108
21142
|
const solanaTokenProgramIdByAddress = {
|
|
21109
21143
|
[TOKEN_PROGRAM_ID.toBase58()]: TOKEN_PROGRAM_ID,
|
|
21110
21144
|
[TOKEN_2022_PROGRAM_ID.toBase58()]: TOKEN_2022_PROGRAM_ID,
|
|
@@ -21441,6 +21475,15 @@ function isOnChainTxData(squidData) {
|
|
|
21441
21475
|
function isDepositAddressDirectTransferRoute(squidData) {
|
|
21442
21476
|
return squidData.type === SquidDataType.DepositAddressDirectTransfer;
|
|
21443
21477
|
}
|
|
21478
|
+
/**
|
|
21479
|
+
* Danal keeps SquidDataType.DepositAddressWithMemo, which XRPL/Stellar use for
|
|
21480
|
+
* wallet-signed transactions — so the deposit treatment is gated on the chain,
|
|
21481
|
+
* not just the type
|
|
21482
|
+
*/
|
|
21483
|
+
function isDanalDepositRoute(route) {
|
|
21484
|
+
return (route.params.fromChain === CHAIN_IDS.DANAL_TESTNET &&
|
|
21485
|
+
route.transactionRequest?.type === SquidDataType.DepositAddressWithMemo);
|
|
21486
|
+
}
|
|
21444
21487
|
function getHistoryTransactionId(tx) {
|
|
21445
21488
|
switch (tx.txType) {
|
|
21446
21489
|
case HistoryTxType.SWAP:
|
|
@@ -21965,6 +22008,11 @@ const chainTypeToTrimLength = {
|
|
|
21965
22008
|
start: 3,
|
|
21966
22009
|
end: 3,
|
|
21967
22010
|
},
|
|
22011
|
+
// PCI0180...E77E
|
|
22012
|
+
[ChainType.DANAL]: {
|
|
22013
|
+
start: 7,
|
|
22014
|
+
end: 4,
|
|
22015
|
+
},
|
|
21968
22016
|
};
|
|
21969
22017
|
const truncateWithEllipsis = (value, startLength, endLength) => value.length <= startLength + endLength
|
|
21970
22018
|
? value
|
|
@@ -22013,6 +22061,8 @@ const isWalletAddressValid = (chainData, address) => {
|
|
|
22013
22061
|
return isStellarAddressValid(address);
|
|
22014
22062
|
case ChainType.CANTON:
|
|
22015
22063
|
return isCantonAddressValid(address);
|
|
22064
|
+
case ChainType.DANAL:
|
|
22065
|
+
return isDanalAddressValid(address);
|
|
22016
22066
|
}
|
|
22017
22067
|
};
|
|
22018
22068
|
const redirectToExtensionsStore = (wallet) => {
|
|
@@ -22297,6 +22347,8 @@ const connectByChainType = async (chainType, wallet, defaultChain, params) => {
|
|
|
22297
22347
|
connector,
|
|
22298
22348
|
},
|
|
22299
22349
|
});
|
|
22350
|
+
case ChainType.DANAL:
|
|
22351
|
+
return null;
|
|
22300
22352
|
}
|
|
22301
22353
|
};
|
|
22302
22354
|
const getChainTypesToConnect = (selectedChainTypes, defaultChain, supportedChains) => {
|
|
@@ -23281,7 +23333,7 @@ const handleDestinationAddressOnSwapChange = ({ fromChainId, fromTokenAddress, t
|
|
|
23281
23333
|
});
|
|
23282
23334
|
let destinationTokenAddress = toChainId && !toTokenAddress
|
|
23283
23335
|
? defaultToAddress
|
|
23284
|
-
:
|
|
23336
|
+
: toTokenAddress ?? swapRoute?.toTokenAddress;
|
|
23285
23337
|
const lowerCaseDestinationTokenAddress = destinationTokenAddress?.toLowerCase();
|
|
23286
23338
|
if (destinationTokensFiltered.find((t) => t.address === lowerCaseDestinationTokenAddress) === undefined) {
|
|
23287
23339
|
destinationTokenAddress = defaultToAddress;
|
|
@@ -23333,7 +23385,7 @@ const getNewSwapParamsFromInput = ({ inputParams, initialSwapRoute, tokens, chai
|
|
|
23333
23385
|
toTokenAddress === initialSwapRoute?.fromTokenAddress;
|
|
23334
23386
|
const sourceTokenAddress = sameNewDestAndInitialSource || onlySourceChainIdChanged
|
|
23335
23387
|
? defaultFromAddress
|
|
23336
|
-
:
|
|
23388
|
+
: fromTokenAddress ?? initialSwapRoute?.fromTokenAddress;
|
|
23337
23389
|
let destinationTokenAddress = undefined;
|
|
23338
23390
|
if (!sameNewSourceAndInitialDest) {
|
|
23339
23391
|
if (onlySourceChainIdChanged) {
|
|
@@ -23655,7 +23707,7 @@ const filterViewableTokens = (tokens, config, direction) => {
|
|
|
23655
23707
|
};
|
|
23656
23708
|
const getSecretNetworkBalances = async (chainData, cosmosAddress, squidTokens, keplrTypeWallet) => {
|
|
23657
23709
|
const squidSecretTokens = squidTokens.filter((t) => t.chainId === CHAIN_IDS.SECRET);
|
|
23658
|
-
const { fetchAllSecretBalances } = await import('./secretService-
|
|
23710
|
+
const { fetchAllSecretBalances } = await import('./secretService-uItv_3Jq.js');
|
|
23659
23711
|
return fetchAllSecretBalances(chainData, cosmosAddress, squidSecretTokens, keplrTypeWallet);
|
|
23660
23712
|
};
|
|
23661
23713
|
function getTokenAssetsKey(token) {
|
|
@@ -25649,7 +25701,7 @@ const useSquidTokens = (direction) => {
|
|
|
25649
25701
|
config.availableChains,
|
|
25650
25702
|
direction,
|
|
25651
25703
|
]);
|
|
25652
|
-
const { evmTokens, cosmosTokens, solanaTokens, bitcoinTokens, suiTokens, xrplTokens, stellarTokens, cantonTokens, } = useMemo(() => {
|
|
25704
|
+
const { evmTokens, cosmosTokens, solanaTokens, bitcoinTokens, suiTokens, xrplTokens, stellarTokens, cantonTokens, danalTokens, } = useMemo(() => {
|
|
25653
25705
|
return tokens?.reduce((acc, token) => {
|
|
25654
25706
|
switch (token.type) {
|
|
25655
25707
|
case ChainType.EVM:
|
|
@@ -25676,6 +25728,9 @@ const useSquidTokens = (direction) => {
|
|
|
25676
25728
|
case ChainType.CANTON:
|
|
25677
25729
|
acc.cantonTokens.push(token);
|
|
25678
25730
|
break;
|
|
25731
|
+
case ChainType.DANAL:
|
|
25732
|
+
acc.danalTokens.push(token);
|
|
25733
|
+
break;
|
|
25679
25734
|
}
|
|
25680
25735
|
return acc;
|
|
25681
25736
|
}, {
|
|
@@ -25687,6 +25742,7 @@ const useSquidTokens = (direction) => {
|
|
|
25687
25742
|
xrplTokens: [],
|
|
25688
25743
|
stellarTokens: [],
|
|
25689
25744
|
cantonTokens: [],
|
|
25745
|
+
danalTokens: [],
|
|
25690
25746
|
});
|
|
25691
25747
|
}, [tokens]);
|
|
25692
25748
|
const findToken = useCallback((address, chainId) => {
|
|
@@ -25705,6 +25761,7 @@ const useSquidTokens = (direction) => {
|
|
|
25705
25761
|
xrplTokens,
|
|
25706
25762
|
stellarTokens,
|
|
25707
25763
|
cantonTokens,
|
|
25764
|
+
danalTokens,
|
|
25708
25765
|
};
|
|
25709
25766
|
};
|
|
25710
25767
|
|
|
@@ -26241,6 +26298,7 @@ const chainTypeToRefetchInterval = {
|
|
|
26241
26298
|
[ChainType.XRPL]: 1_000,
|
|
26242
26299
|
[ChainType.STELLAR]: 1_000,
|
|
26243
26300
|
[ChainType.CANTON]: 1_000,
|
|
26301
|
+
[ChainType.DANAL]: 1_000,
|
|
26244
26302
|
};
|
|
26245
26303
|
/**
|
|
26246
26304
|
* Returns the status refetch interval of a Send transaction
|
|
@@ -26507,7 +26565,7 @@ const useSquidChains = (direction) => {
|
|
|
26507
26565
|
const chain = findChain(chainId);
|
|
26508
26566
|
return chain?.chainType;
|
|
26509
26567
|
}, [findChain]);
|
|
26510
|
-
const { evmChains, cosmosChains, suiChains, stellarChains, xrplChains, cantonChains, } = useMemo(() => {
|
|
26568
|
+
const { evmChains, cosmosChains, suiChains, stellarChains, xrplChains, cantonChains, danalChains, } = useMemo(() => {
|
|
26511
26569
|
return chains.reduce((acc, chain) => {
|
|
26512
26570
|
switch (chain.chainType) {
|
|
26513
26571
|
case ChainType.EVM:
|
|
@@ -26528,6 +26586,9 @@ const useSquidChains = (direction) => {
|
|
|
26528
26586
|
case ChainType.CANTON:
|
|
26529
26587
|
acc.cantonChains.push(chain);
|
|
26530
26588
|
break;
|
|
26589
|
+
case ChainType.DANAL:
|
|
26590
|
+
acc.danalChains.push(chain);
|
|
26591
|
+
break;
|
|
26531
26592
|
}
|
|
26532
26593
|
return acc;
|
|
26533
26594
|
}, {
|
|
@@ -26537,6 +26598,7 @@ const useSquidChains = (direction) => {
|
|
|
26537
26598
|
xrplChains: [],
|
|
26538
26599
|
stellarChains: [],
|
|
26539
26600
|
cantonChains: [],
|
|
26601
|
+
danalChains: [],
|
|
26540
26602
|
});
|
|
26541
26603
|
}, [chains]);
|
|
26542
26604
|
const { supportedSourceChains, supportedDestinationChains } = useMemo(() => {
|
|
@@ -26558,6 +26620,7 @@ const useSquidChains = (direction) => {
|
|
|
26558
26620
|
xrplChains,
|
|
26559
26621
|
stellarChains,
|
|
26560
26622
|
cantonChains,
|
|
26623
|
+
danalChains,
|
|
26561
26624
|
getChainType,
|
|
26562
26625
|
findChain,
|
|
26563
26626
|
};
|
|
@@ -27403,7 +27466,7 @@ function useStellarWallets() {
|
|
|
27403
27466
|
try {
|
|
27404
27467
|
const { allowAllModules: initializeAllModules } = await import('@creit.tech/stellar-wallets-kit');
|
|
27405
27468
|
const { LedgerModule } = await import('@creit.tech/stellar-wallets-kit/modules/ledger.module.mjs');
|
|
27406
|
-
const { formatStellarWallet } = await import('./stellarService.client-
|
|
27469
|
+
const { formatStellarWallet } = await import('./stellarService.client-rTXJcduV.js');
|
|
27407
27470
|
const modules = [...initializeAllModules(), new LedgerModule()];
|
|
27408
27471
|
const promises = modules.map(async (module) => {
|
|
27409
27472
|
const isAvailable = await module.isAvailable();
|
|
@@ -28213,6 +28276,8 @@ const useMultiChainWallet = (chain) => {
|
|
|
28213
28276
|
chainType: chain.chainType,
|
|
28214
28277
|
}),
|
|
28215
28278
|
};
|
|
28279
|
+
case ChainType.DANAL:
|
|
28280
|
+
return {};
|
|
28216
28281
|
}
|
|
28217
28282
|
}, [
|
|
28218
28283
|
chain?.chainType,
|
|
@@ -29051,6 +29116,8 @@ async function createClient(chain) {
|
|
|
29051
29116
|
return new StellarRpcClient(chain.rpc);
|
|
29052
29117
|
case ChainType.CANTON:
|
|
29053
29118
|
return null;
|
|
29119
|
+
case ChainType.DANAL:
|
|
29120
|
+
return null;
|
|
29054
29121
|
}
|
|
29055
29122
|
}
|
|
29056
29123
|
|
|
@@ -30317,7 +30384,7 @@ const useCantonBalance = ({ chain, token, userAddress, enabled = true, refreshIn
|
|
|
30317
30384
|
};
|
|
30318
30385
|
|
|
30319
30386
|
function useNativeTokenForChain(chain) {
|
|
30320
|
-
const { evmTokens, cosmosTokens, solanaTokens, bitcoinTokens, suiTokens, xrplTokens, stellarTokens, cantonTokens, } = useSquidTokens();
|
|
30387
|
+
const { evmTokens, cosmosTokens, solanaTokens, bitcoinTokens, suiTokens, xrplTokens, stellarTokens, cantonTokens, danalTokens, } = useSquidTokens();
|
|
30321
30388
|
const getTokensForChainType = () => {
|
|
30322
30389
|
if (!chain?.chainType)
|
|
30323
30390
|
return [];
|
|
@@ -30338,6 +30405,8 @@ function useNativeTokenForChain(chain) {
|
|
|
30338
30405
|
return stellarTokens;
|
|
30339
30406
|
case ChainType.CANTON:
|
|
30340
30407
|
return cantonTokens;
|
|
30408
|
+
case ChainType.DANAL:
|
|
30409
|
+
return danalTokens;
|
|
30341
30410
|
}
|
|
30342
30411
|
};
|
|
30343
30412
|
const nativeTokenForChainType = useMemo(() => {
|
|
@@ -30598,6 +30667,9 @@ const useNativeBalance = (chain) => {
|
|
|
30598
30667
|
case ChainType.CANTON:
|
|
30599
30668
|
balance = nativeCantonBalance;
|
|
30600
30669
|
break;
|
|
30670
|
+
case ChainType.DANAL:
|
|
30671
|
+
balance = undefined;
|
|
30672
|
+
break;
|
|
30601
30673
|
}
|
|
30602
30674
|
const balanceFormatted = !!balance
|
|
30603
30675
|
? formatBNToReadable(balance.value, balance.decimals)
|
|
@@ -30637,6 +30709,8 @@ const useNativeBalance = (chain) => {
|
|
|
30637
30709
|
return isStellarLoading;
|
|
30638
30710
|
case ChainType.CANTON:
|
|
30639
30711
|
return isCantonLoading;
|
|
30712
|
+
case ChainType.DANAL:
|
|
30713
|
+
return false;
|
|
30640
30714
|
}
|
|
30641
30715
|
}, [
|
|
30642
30716
|
chain?.chainType,
|
|
@@ -30862,7 +30936,7 @@ function hederaWalletConnect(parameters) {
|
|
|
30862
30936
|
const optionalChains = config.chains.map((x) => x.id);
|
|
30863
30937
|
if (!optionalChains.length)
|
|
30864
30938
|
return;
|
|
30865
|
-
const { EthereumProvider } = await import('./index.es-
|
|
30939
|
+
const { EthereumProvider } = await import('./index.es-Cqc-vgYs.js');
|
|
30866
30940
|
const rawProvider = await EthereumProvider.init({
|
|
30867
30941
|
...restParameters,
|
|
30868
30942
|
disableProviderPing: true,
|
|
@@ -31096,6 +31170,8 @@ const useSigner = ({ chain }) => {
|
|
|
31096
31170
|
return isStellarSignerReady;
|
|
31097
31171
|
case ChainType.CANTON:
|
|
31098
31172
|
return isCantonSignerReady;
|
|
31173
|
+
case ChainType.DANAL:
|
|
31174
|
+
return false;
|
|
31099
31175
|
}
|
|
31100
31176
|
}, [
|
|
31101
31177
|
chain?.chainType,
|
|
@@ -31571,11 +31647,13 @@ function useDepositAddress(squidRoute) {
|
|
|
31571
31647
|
CHAIN_IDS.BITCOIN,
|
|
31572
31648
|
CHAIN_IDS.SOLANA,
|
|
31573
31649
|
CHAIN_IDS.CANTON,
|
|
31650
|
+
CHAIN_IDS.DANAL_TESTNET,
|
|
31574
31651
|
];
|
|
31575
31652
|
return chainsSupportingDepositAddress.includes(fromChain.chainId);
|
|
31576
31653
|
}, [fromChain?.chainId]);
|
|
31577
|
-
const routeProvidesDirectDepositAddress = !!squidRoute?.transactionRequest &&
|
|
31578
|
-
isDepositAddressDirectTransferRoute(squidRoute.transactionRequest)
|
|
31654
|
+
const routeProvidesDirectDepositAddress = (!!squidRoute?.transactionRequest &&
|
|
31655
|
+
isDepositAddressDirectTransferRoute(squidRoute.transactionRequest)) ||
|
|
31656
|
+
(!!squidRoute && isDanalDepositRoute(squidRoute));
|
|
31579
31657
|
const swapWillGenerateDepositAddress = isChainflipDepositRoute(squidRoute) || routeProvidesDirectDepositAddress;
|
|
31580
31658
|
const paymentMethod = isAvailableAsPaymentMethod
|
|
31581
31659
|
? selectedPaymentMethod
|
|
@@ -31601,6 +31679,19 @@ function useDepositAddress(squidRoute) {
|
|
|
31601
31679
|
});
|
|
31602
31680
|
return;
|
|
31603
31681
|
}
|
|
31682
|
+
else if (isDanalDepositRoute(route)) {
|
|
31683
|
+
const transferBody = parseDanalTransferBody(route.transactionRequest.data);
|
|
31684
|
+
if (!transferBody) {
|
|
31685
|
+
throw new Error("Could not parse Danal transfer request body");
|
|
31686
|
+
}
|
|
31687
|
+
setDeposit({
|
|
31688
|
+
amount: transferBody.amount,
|
|
31689
|
+
depositAddress: route.transactionRequest.target,
|
|
31690
|
+
statusTrackingId: transferBody.memo,
|
|
31691
|
+
memo: transferBody.memo,
|
|
31692
|
+
});
|
|
31693
|
+
return;
|
|
31694
|
+
}
|
|
31604
31695
|
else if (isDepositAddressDirectTransferRoute(route.transactionRequest)) {
|
|
31605
31696
|
// Canton case
|
|
31606
31697
|
const orderHash = route.transactionRequest.data;
|
|
@@ -31650,7 +31741,7 @@ const useUrlSwapParams = () => {
|
|
|
31650
31741
|
|
|
31651
31742
|
const useAllTokensWithBalanceForChainType = ({ chainType, address, direction, queryOptions, }) => {
|
|
31652
31743
|
const { evmChains, cosmosChains, suiChains, xrplChains, stellarChains } = useSquidChains(direction);
|
|
31653
|
-
const { evmTokens, cosmosTokens, solanaTokens, bitcoinTokens, suiTokens, xrplTokens, stellarTokens, cantonTokens, } = useSquidTokens(direction);
|
|
31744
|
+
const { evmTokens, cosmosTokens, solanaTokens, bitcoinTokens, suiTokens, xrplTokens, stellarTokens, cantonTokens, danalTokens, } = useSquidTokens(direction);
|
|
31654
31745
|
const { keplrTypeWallet } = useCosmosContext();
|
|
31655
31746
|
const cantonConnector = useWalletStore((store) => store.connectedWalletsByChainType[ChainType.CANTON]?.wallet?.connector);
|
|
31656
31747
|
const placeholderData = useMemo(() => {
|
|
@@ -31663,6 +31754,7 @@ const useAllTokensWithBalanceForChainType = ({ chainType, address, direction, qu
|
|
|
31663
31754
|
[ChainType.XRPL]: xrplTokens.map((t) => ({ ...t, balance: "0" })),
|
|
31664
31755
|
[ChainType.STELLAR]: stellarTokens.map((t) => ({ ...t, balance: "0" })),
|
|
31665
31756
|
[ChainType.CANTON]: cantonTokens.map((t) => ({ ...t, balance: "0" })),
|
|
31757
|
+
[ChainType.DANAL]: danalTokens.map((t) => ({ ...t, balance: "0" })),
|
|
31666
31758
|
};
|
|
31667
31759
|
if (!chainType) {
|
|
31668
31760
|
// Return all tokens with zero balance
|
|
@@ -31685,6 +31777,7 @@ const useAllTokensWithBalanceForChainType = ({ chainType, address, direction, qu
|
|
|
31685
31777
|
xrplTokens,
|
|
31686
31778
|
stellarTokens,
|
|
31687
31779
|
cantonTokens,
|
|
31780
|
+
danalTokens,
|
|
31688
31781
|
]);
|
|
31689
31782
|
const isQueryEnabled = useMemo(() => {
|
|
31690
31783
|
// Respect the queryOptions.enabled override if provided
|
|
@@ -31709,6 +31802,8 @@ const useAllTokensWithBalanceForChainType = ({ chainType, address, direction, qu
|
|
|
31709
31802
|
return stellarTokens.length > 0;
|
|
31710
31803
|
case ChainType.CANTON:
|
|
31711
31804
|
return cantonTokens.length > 0;
|
|
31805
|
+
case ChainType.DANAL:
|
|
31806
|
+
return danalTokens.length > 0;
|
|
31712
31807
|
}
|
|
31713
31808
|
}, [
|
|
31714
31809
|
chainType,
|
|
@@ -31722,6 +31817,7 @@ const useAllTokensWithBalanceForChainType = ({ chainType, address, direction, qu
|
|
|
31722
31817
|
xrplTokens.length,
|
|
31723
31818
|
stellarTokens.length,
|
|
31724
31819
|
cantonTokens.length,
|
|
31820
|
+
danalTokens.length,
|
|
31725
31821
|
]);
|
|
31726
31822
|
const query = useQuery(keys().allTokensBalance(address, chainType, direction), async () => {
|
|
31727
31823
|
// Return zero balances if no address
|
|
@@ -31846,6 +31942,12 @@ const useAllConnectedWalletBalances = ({ direction, queryOptions = {
|
|
|
31846
31942
|
direction,
|
|
31847
31943
|
queryOptions,
|
|
31848
31944
|
});
|
|
31945
|
+
const danalBalancesQuery = useAllTokensWithBalanceForChainType({
|
|
31946
|
+
chainType: ChainType.DANAL,
|
|
31947
|
+
address: connectedAddresses?.[ChainType.DANAL],
|
|
31948
|
+
direction,
|
|
31949
|
+
queryOptions,
|
|
31950
|
+
});
|
|
31849
31951
|
// Create a map of chain type to balance query results
|
|
31850
31952
|
const balanceQueries = useMemo(() => ({
|
|
31851
31953
|
[ChainType.EVM]: evmBalancesQuery,
|
|
@@ -31856,6 +31958,7 @@ const useAllConnectedWalletBalances = ({ direction, queryOptions = {
|
|
|
31856
31958
|
[ChainType.XRPL]: xrplBalancesQuery,
|
|
31857
31959
|
[ChainType.STELLAR]: stellarBalancesQuery,
|
|
31858
31960
|
[ChainType.CANTON]: cantonBalancesQuery,
|
|
31961
|
+
[ChainType.DANAL]: danalBalancesQuery,
|
|
31859
31962
|
}), [
|
|
31860
31963
|
evmBalancesQuery,
|
|
31861
31964
|
cosmosBalancesQuery,
|
|
@@ -31865,6 +31968,7 @@ const useAllConnectedWalletBalances = ({ direction, queryOptions = {
|
|
|
31865
31968
|
xrplBalancesQuery,
|
|
31866
31969
|
stellarBalancesQuery,
|
|
31867
31970
|
cantonBalancesQuery,
|
|
31971
|
+
danalBalancesQuery,
|
|
31868
31972
|
]);
|
|
31869
31973
|
// Combine all tokens from different chains
|
|
31870
31974
|
const allTokens = useMemo(() => Object.values(balanceQueries).flatMap((query) => query.data?.tokens ?? []), [balanceQueries]);
|
|
@@ -31972,6 +32076,8 @@ const useMultiChainBalance = ({ chain, token, userAddress, enabled = true, }) =>
|
|
|
31972
32076
|
return stellarBalance;
|
|
31973
32077
|
case ChainType.CANTON:
|
|
31974
32078
|
return cantonBalance;
|
|
32079
|
+
case ChainType.DANAL:
|
|
32080
|
+
return "0";
|
|
31975
32081
|
}
|
|
31976
32082
|
}, [
|
|
31977
32083
|
chain?.chainType,
|
|
@@ -33081,8 +33187,9 @@ function useSendTransaction({ to, amount, token, chain, }) {
|
|
|
33081
33187
|
chain,
|
|
33082
33188
|
});
|
|
33083
33189
|
break;
|
|
33084
|
-
case ChainType.CANTON:
|
|
33085
|
-
|
|
33190
|
+
case ChainType.CANTON:
|
|
33191
|
+
case ChainType.DANAL: {
|
|
33192
|
+
throw new Error(`Send not implemented for chain type ${chain.chainType}`);
|
|
33086
33193
|
}
|
|
33087
33194
|
}
|
|
33088
33195
|
return {
|
|
@@ -33288,7 +33395,8 @@ async function getSendTransactionStatus({ chain, txHash, }) {
|
|
|
33288
33395
|
chain,
|
|
33289
33396
|
});
|
|
33290
33397
|
case ChainType.CANTON:
|
|
33291
|
-
|
|
33398
|
+
case ChainType.DANAL:
|
|
33399
|
+
throw new Error(`Send not implemented for chain type ${chain.chainType}`);
|
|
33292
33400
|
}
|
|
33293
33401
|
}
|
|
33294
33402
|
|
|
@@ -38158,7 +38266,7 @@ refetchIntervalInBackground = false, refetchInterval = 30000, quoteOnly = true,
|
|
|
38158
38266
|
//
|
|
38159
38267
|
// If deposit address is not selected, we use the connected address as the source address instead
|
|
38160
38268
|
const sourceUserAddress = isDepositAddressActive
|
|
38161
|
-
?
|
|
38269
|
+
? depositRefundAddress ?? sourceConnectedAddress
|
|
38162
38270
|
: sourceConnectedAddress;
|
|
38163
38271
|
const squidRouteQueryKeys = useMemo(() => keys().transaction(fromChain?.chainId, toChain?.chainId, toToken?.address, fromToken?.address, fromPrice, config.slippage, sourceUserAddress, config.degenMode, destinationAddress, fallbackAddress, quoteOnly, fromChain?.chainType, config.preHook, config.postHook, config.overrideGasRefundAddress), [
|
|
38164
38272
|
fromChain?.chainId,
|
|
@@ -38825,5 +38933,5 @@ const SquidProvider = ({ children, config, placeholder, }) => {
|
|
|
38825
38933
|
React.createElement(CosmosProvider, null, children))))))))))) : (placeholder);
|
|
38826
38934
|
};
|
|
38827
38935
|
|
|
38828
|
-
export { useWalletStore as $, AxelarStatusResponseType as A, useHederaAccountActivation as B, CHAIN_IDS as C, DEFAULT_LOCALE as D, useHederaTokenAssociations as E, useKeyboardNavigation as F, useSquidQueryClient as G, HistoryTxType as H, useSquid as I, useStellarAccountActivation as J, useStellarTrustLine as K, useAddressBookStore as L, useAssetsColorsStore as M, Nr as N, useFavoriteTokensStore as O, useHistoryStore as P, QueryKeys as Q, useSendTransactionStore as R, SquidStatusErrorType as S, TransactionErrorType as T, useConfigStore as U, useSquidStore as V, Wo as W, XamanXrplNetwork as X, useSwapRoutePersistStore as Y, useTransactionStore as Z, ConnectingWalletStatus as _, WindowWalletFlag as a, useAvailableQuotes as a$, useDepositAddress as a0, useSwap as a1, buildUrlSearchParamsFromSwapEvent as a2, parseInitialAssetsFromUrl as a3, useUrlSwapParams as a4, useAllConnectedWalletBalances as a5, useAllTokensWithBalanceForChainType as a6, useCosmosBalance as a7, useEvmBalance as a8, useMultiChainBalance as a9, useRouteWarnings as aA, useSendTransactionStatus as aB, useSwapTransactionStatus as aC, useAvatar as aD, useHistory as aE, useDebouncedValue as aF, useAddToken as aG, useAutoConnect as aH, useEnsDataForAddress as aI, useEnsSearch as aJ, useGnosisContext as aK, useIsSameAddressAndGnosisContext as aL, useIntegratorContext as aM, useMultiChainWallet as aN, useSigner as aO, useWallet as aP, useWallets as aQ, useXrplTrustLine as aR, TX_STATUS_CONSTANTS as aS, FINAL_TRANSACTION_STATUSES as aT, useGetFiatQuote as aU, useGetOnRampConfig as aV, useExecuteFiatQuote as aW, useFiatOnRampTxStatus as aX, useFiatTransactions as aY, useCurrencyDetails as aZ, useCountryDetails as a_, useMultipleTokenPrices as aa, useBitcoinNativeBalance as ab, useCosmosNativeBalance as ac, useEvmNativeBalance as ad, useNativeBalance as ae, useSolanaNativeBalance as af, useStellarNativeBalance as ag, useSuiNativeBalance as ah, useXrplNativeBalance as ai, useNativeTokenForChain as aj, useSingleTokenPrice as ak, useSourceChainGasToken as al, useSquidTokens as am, useHistoricalData as an, useTokensData as ao, useEstimateSendTransaction as ap, useSendTransaction as aq, useSendTransactionGas as ar, useAllTransactionsStatus as as, useApproval as at, useDepositTransactionStatus as au, useEstimate as av, useEstimatePriceImpact as aw, useExecuteTransaction as ax, useGetRoute as ay, useGetRouteWrapper as az, DEFAULT_ROUTE_REFETCH_INTERVAL as b, addEthereumChain as b$, useRecommendedQuote as b0, useGetOnrampPaymentTypes as b1, useSuggestedFiatAmounts as b2, SquidProvider as b3, EnsService as b4, getXummClient as b5, isXamanXAppContext as b6, getQueryHeaders as b7, getStatusCode as b8, is404Error as b9, randomIntFromInterval as bA, getTokensForChain as bB, getFirstAvailableChainId as bC, fetchHighestBalanceToken as bD, getInitialOrDefaultTokenAddressForChain as bE, getInitialTokenAddressForChain as bF, filterTokensForDestination as bG, getInitialChainIdFromConfig as bH, getCosmosKey as bI, getKeysSettled as bJ, getAllKeysForSupportedCosmosChains as bK, isCosmosAddressValid as bL, getCosmosSigningClient as bM, getCosmosChainInfosObject as bN, connectCosmosWallet as bO, isFallbackAddressNeeded as bP, suggestChainOrThrow as bQ, normalizeError as bR, transactionErrorCode as bS, isUserRejectionError as bT, getTransactionError as bU, handleTransactionErrorEvents as bV, isSwapRouteError as bW, isStatusError as bX, createQuoteRequestParamsHash as bY, WidgetEvents as bZ, EvmNetworkNotSupportedErrorCode as b_, assetsBaseUrl as ba, shareSubgraphId as bb, sortTokensBySharedSubgraphIds as bc, getSupportedChainIdsForDirection as bd, filterChains as be, filterTokens as bf, getTokenImage as bg, getNewSwapParamsFromInput as bh, sortAllTokens as bi, findToken as bj, findNativeToken as bk, normalizeIbcAddress as bl, groupTokensBySymbol as bm, groupTokensByChainId as bn, filterViewableTokens as bo, getSecretNetworkBalances as bp, getTokenAssetsKey as bq, fetchAssetsColors as br, isSupportedChainType as bs, initializeSquidData as bt, isEmptyObject as bu, normalizeTokenSymbol as bv, areTokenSymbolsCompatible as bw, isEvmosChain as bx, resolveChainIdFromAsset as by, getConfigWithDefaults as bz, chainTypeToNativeTokenAddressMap as c,
|
|
38829
|
-
//# sourceMappingURL=index-
|
|
38936
|
+
export { useWalletStore as $, AxelarStatusResponseType as A, useHederaAccountActivation as B, CHAIN_IDS as C, DEFAULT_LOCALE as D, useHederaTokenAssociations as E, useKeyboardNavigation as F, useSquidQueryClient as G, HistoryTxType as H, useSquid as I, useStellarAccountActivation as J, useStellarTrustLine as K, useAddressBookStore as L, useAssetsColorsStore as M, Nr as N, useFavoriteTokensStore as O, useHistoryStore as P, QueryKeys as Q, useSendTransactionStore as R, SquidStatusErrorType as S, TransactionErrorType as T, useConfigStore as U, useSquidStore as V, Wo as W, XamanXrplNetwork as X, useSwapRoutePersistStore as Y, useTransactionStore as Z, ConnectingWalletStatus as _, WindowWalletFlag as a, useAvailableQuotes as a$, useDepositAddress as a0, useSwap as a1, buildUrlSearchParamsFromSwapEvent as a2, parseInitialAssetsFromUrl as a3, useUrlSwapParams as a4, useAllConnectedWalletBalances as a5, useAllTokensWithBalanceForChainType as a6, useCosmosBalance as a7, useEvmBalance as a8, useMultiChainBalance as a9, useRouteWarnings as aA, useSendTransactionStatus as aB, useSwapTransactionStatus as aC, useAvatar as aD, useHistory as aE, useDebouncedValue as aF, useAddToken as aG, useAutoConnect as aH, useEnsDataForAddress as aI, useEnsSearch as aJ, useGnosisContext as aK, useIsSameAddressAndGnosisContext as aL, useIntegratorContext as aM, useMultiChainWallet as aN, useSigner as aO, useWallet as aP, useWallets as aQ, useXrplTrustLine as aR, TX_STATUS_CONSTANTS as aS, FINAL_TRANSACTION_STATUSES as aT, useGetFiatQuote as aU, useGetOnRampConfig as aV, useExecuteFiatQuote as aW, useFiatOnRampTxStatus as aX, useFiatTransactions as aY, useCurrencyDetails as aZ, useCountryDetails as a_, useMultipleTokenPrices as aa, useBitcoinNativeBalance as ab, useCosmosNativeBalance as ac, useEvmNativeBalance as ad, useNativeBalance as ae, useSolanaNativeBalance as af, useStellarNativeBalance as ag, useSuiNativeBalance as ah, useXrplNativeBalance as ai, useNativeTokenForChain as aj, useSingleTokenPrice as ak, useSourceChainGasToken as al, useSquidTokens as am, useHistoricalData as an, useTokensData as ao, useEstimateSendTransaction as ap, useSendTransaction as aq, useSendTransactionGas as ar, useAllTransactionsStatus as as, useApproval as at, useDepositTransactionStatus as au, useEstimate as av, useEstimatePriceImpact as aw, useExecuteTransaction as ax, useGetRoute as ay, useGetRouteWrapper as az, DEFAULT_ROUTE_REFETCH_INTERVAL as b, addEthereumChain as b$, useRecommendedQuote as b0, useGetOnrampPaymentTypes as b1, useSuggestedFiatAmounts as b2, SquidProvider as b3, EnsService as b4, getXummClient as b5, isXamanXAppContext as b6, getQueryHeaders as b7, getStatusCode as b8, is404Error as b9, randomIntFromInterval as bA, getTokensForChain as bB, getFirstAvailableChainId as bC, fetchHighestBalanceToken as bD, getInitialOrDefaultTokenAddressForChain as bE, getInitialTokenAddressForChain as bF, filterTokensForDestination as bG, getInitialChainIdFromConfig as bH, getCosmosKey as bI, getKeysSettled as bJ, getAllKeysForSupportedCosmosChains as bK, isCosmosAddressValid as bL, getCosmosSigningClient as bM, getCosmosChainInfosObject as bN, connectCosmosWallet as bO, isFallbackAddressNeeded as bP, suggestChainOrThrow as bQ, normalizeError as bR, transactionErrorCode as bS, isUserRejectionError as bT, getTransactionError as bU, handleTransactionErrorEvents as bV, isSwapRouteError as bW, isStatusError as bX, createQuoteRequestParamsHash as bY, WidgetEvents as bZ, EvmNetworkNotSupportedErrorCode as b_, assetsBaseUrl as ba, shareSubgraphId as bb, sortTokensBySharedSubgraphIds as bc, getSupportedChainIdsForDirection as bd, filterChains as be, filterTokens as bf, getTokenImage as bg, getNewSwapParamsFromInput as bh, sortAllTokens as bi, findToken as bj, findNativeToken as bk, normalizeIbcAddress as bl, groupTokensBySymbol as bm, groupTokensByChainId as bn, filterViewableTokens as bo, getSecretNetworkBalances as bp, getTokenAssetsKey as bq, fetchAssetsColors as br, isSupportedChainType as bs, initializeSquidData as bt, isEmptyObject as bu, normalizeTokenSymbol as bv, areTokenSymbolsCompatible as bw, isEvmosChain as bx, resolveChainIdFromAsset as by, getConfigWithDefaults as bz, chainTypeToNativeTokenAddressMap as c, getSendTxStatusRefetchInterval as c$, parseEvmAddress as c0, formatEvmWallet as c1, filterWagmiConnector as c2, waitForReceiptWithRetry as c3, getUserCountry as c4, getCountryData as c5, getCurrencyData as c6, adaptiveRound as c7, getSuggestedAmountsForCurrency as c8, HederaExtensionHelper as c9, isStellarIssuedToken as cA, getStellarHorizonApiUrl as cB, isValidIssuedAsset as cC, isValidHorizonAsset as cD, formatTransactionHistoryDate as cE, getAxelarExplorerTxUrl as cF, getSourceExplorerTxUrl as cG, getMainExplorerUrl as cH, formatDistance as cI, formatSeconds as cJ, formatSwapTxStatusResponseForStorage as cK, simplifyRouteAction as cL, fetchSwapTransactionStatus as cM, compareTransactionIds as cN, isCoralBridgeAction as cO, isActionCompletedOnSourceTx as cP, sleep as cQ, isChainflipDepositRoute as cR, isChainflipBridgeTransaction as cS, isOnChainTxData as cT, isDepositAddressDirectTransferRoute as cU, isDanalDepositRoute as cV, getHistoryTransactionId as cW, getStepStatuses as cX, getHalfSuccessState as cY, getStepsInfos as cZ, getSwapTxStatusRefetchInterval as c_, convertHederaAccountIdToEvmAddress as ca, convertEvmAddressToHederaAccountId as cb, scaleHbarToWei as cc, scaleWeiToHbar as cd, parseToBigInt as ce, roundNumericValue as cf, formatUnitsRounded as cg, formatTokenAmount as ch, formatUsdAmount as ci, trimExtraDecimals as cj, getNumericValue as ck, cleanAmount as cl, convertTokenAmountToUSD as cm, convertUSDToTokenAmount as cn, calculateTotal24hChange as co, getRouteExpiry as cp, searchTokens as cq, filterSolanaWallets as cr, isSolanaAddressValid as cs, executeSolanaSwap as ct, executeSolanaTransfer as cu, isStellarAddressValid as cv, getStellarNetwork as cw, stellarAddressToScVal as cx, getStellarTrustLineAsset as cy, isStellarToken as cz, definedInWindow as d, chainflipMultihopBridgeType as d0, getBridgeType as d1, getTransactionStatus as d2, getTransactionEndStatus as d3, isHistoryTransactionPending as d4, isHistoryTransactionFailed as d5, isHistoryTransactionWarning as d6, isHistoryTransactionEnded as d7, formatHash as d8, isWalletAddressValid as d9, redirectToExtensionsStore as da, populateWallets as db, buildFallbackWallets as dc, getDefaultChain as dd, sortWallets as de, areSameAddress as df, sortAddressBook as dg, calculateTotalUsdBalanceUSD as dh, addTokenToWallet as di, isEvmChainNotSupportedError as dj, getWalletSupportedChainTypes as dk, getConnectorForChainType as dl, walletSupportsChainType as dm, connectWallet as dn, cancelConnectWallet as dp, isProblematicConnector as dq, mergeWallets as dr, isXionSmartContractAddress as ds, isXrplAddressValid as dt, buildXrplTrustSetTx as du, getXrplNetwork as dv, parseXrplPaymentTx as dw, parseXrplTokenAddress as dx, er as e, formatBNToReadable as f, chainTypeToZeroAddressMap as g, destinationAddressResetValue as h, fallbackAddressResetValue as i, nativeCantonTokenAddress as j, nativeCosmosTokenAddress as k, nativeEvmTokenAddress as l, nativeSolanaTokenAddress as m, nativeBitcoinTokenAddress as n, nativeStellarTokenAddress as o, nativeSuiTokenAddress as p, nativeXrplTokenAddress as q, CosmosProvider as r, SendTransactionStatus as s, TransactionStatus as t, useCosmosContext as u, useTrackSearchEmpty as v, walletIconBaseUrl as w, useSquidChains as x, useClient as y, useCosmosForChain as z };
|
|
38937
|
+
//# sourceMappingURL=index-Bz_l0J0g.js.map
|