@0xsquid/react-hooks 8.0.5 → 8.0.7-hedera-beta.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/constants.d.ts +2 -0
- package/dist/core/queries/queries-keys.d.ts +6 -3
- package/dist/core/types/evm.d.ts +0 -1
- package/dist/hooks/hedera/useHederaTokenAssociations.d.ts +11 -0
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/transaction/useErc20Allowance.d.ts +3 -11
- package/dist/{index-fCnKL8wD.js → index-C0H64ktj.js} +326 -190
- package/dist/index-C0H64ktj.js.map +1 -0
- package/dist/{index-B402hKhN.js → index-DFAgGls6.js} +327 -194
- package/dist/index-DFAgGls6.js.map +1 -0
- package/dist/index.esm.js +2 -2
- package/dist/index.js +5 -2
- package/dist/index.js.map +1 -1
- package/dist/{secretService-CIyWIixx.js → secretService-D7gPw0fs.js} +3 -3
- package/dist/{secretService-CIyWIixx.js.map → secretService-D7gPw0fs.js.map} +1 -1
- package/dist/{secretService-CV_qKM-f.js → secretService-DX3NE6Of.js} +3 -3
- package/dist/{secretService-CV_qKM-f.js.map → secretService-DX3NE6Of.js.map} +1 -1
- package/dist/services/index.d.ts +1 -0
- package/dist/services/internal/hederaService.d.ts +2 -0
- package/dist/{stellarService.client-BK4en2TV.js → stellarService.client-Cr3lD8Iw.js} +3 -3
- package/dist/{stellarService.client-BK4en2TV.js.map → stellarService.client-Cr3lD8Iw.js.map} +1 -1
- package/dist/{stellarService.client-K2_2eYYZ.js → stellarService.client-peMOjG49.js} +3 -3
- package/dist/{stellarService.client-K2_2eYYZ.js.map → stellarService.client-peMOjG49.js.map} +1 -1
- package/package.json +1 -1
- package/dist/index-B402hKhN.js.map +0 -1
- package/dist/index-fCnKL8wD.js.map +0 -1
package/dist/core/constants.d.ts
CHANGED
|
@@ -64,8 +64,10 @@ export declare const CHAIN_IDS: {
|
|
|
64
64
|
readonly GNOSIS: "100";
|
|
65
65
|
readonly SONIC: "146";
|
|
66
66
|
readonly HYPER_EVM: "999";
|
|
67
|
+
readonly DCHAIN: "2716446429837000";
|
|
67
68
|
readonly SONEIUM: "1868";
|
|
68
69
|
readonly PEAQ: "3338";
|
|
70
|
+
readonly HEDERA: "295";
|
|
69
71
|
readonly BITCOIN: "bitcoin";
|
|
70
72
|
readonly SOLANA: "solana-mainnet-beta";
|
|
71
73
|
readonly SUI: "sui-mainnet";
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { ChainType, RouteResponse } from "@0xsquid/squid-types";
|
|
2
2
|
import { HistoryTransaction } from "../../core/types/history";
|
|
3
3
|
import { AppConfig, SlippageOption } from "../types/config";
|
|
4
|
-
import { ApprovalType } from "../types/evm";
|
|
5
4
|
import { SwapDirection } from "../types/swap";
|
|
6
5
|
import { Timeframe, TokenWithBalance } from "../types/tokens";
|
|
7
6
|
export declare enum QueryKeys {
|
|
@@ -35,7 +34,9 @@ export declare enum QueryKeys {
|
|
|
35
34
|
XrplAccountActivatedInfo = "xrplAccountActivatedInfo",
|
|
36
35
|
FiatToCryptoPaymentMethods = "fiatToCryptoPaymentMethods",
|
|
37
36
|
Stellar = "stellar",
|
|
38
|
-
StellarAccountActivatedInfo = "stellarAccountActivatedInfo"
|
|
37
|
+
StellarAccountActivatedInfo = "stellarAccountActivatedInfo",
|
|
38
|
+
Hedera = "hedera",
|
|
39
|
+
IsHederaTokenAssociated = "isHederaTokenAssociated"
|
|
39
40
|
}
|
|
40
41
|
export declare const keys: () => {
|
|
41
42
|
all: QueryKeys;
|
|
@@ -46,6 +47,7 @@ export declare const keys: () => {
|
|
|
46
47
|
transactions: () => QueryKeys[];
|
|
47
48
|
xrpl: () => QueryKeys[];
|
|
48
49
|
stellar: () => QueryKeys[];
|
|
50
|
+
hedera: () => QueryKeys[];
|
|
49
51
|
coinGeckoPrices: (coingeckoIds?: string[]) => (string | undefined)[];
|
|
50
52
|
historicalData: (coingeckoId?: string, timeFrame?: Timeframe) => (string | undefined)[];
|
|
51
53
|
tokensData: (tokens?: TokenWithBalance[]) => (string | undefined)[];
|
|
@@ -57,7 +59,7 @@ export declare const keys: () => {
|
|
|
57
59
|
fiatToCryptoStatus: (transactionId?: string) => (string | undefined)[];
|
|
58
60
|
sendTransactionStatus: (txHash: string | undefined, chainId: string | undefined) => (string | undefined)[];
|
|
59
61
|
allTransactionsStatus: (transactions: HistoryTransaction[] | undefined) => string[];
|
|
60
|
-
routeApproved: (routeData: RouteResponse["route"] | undefined, allowanceInWei: bigint | undefined
|
|
62
|
+
routeApproved: (routeData: RouteResponse["route"] | undefined, allowanceInWei: bigint | undefined) => (string | undefined)[];
|
|
61
63
|
sendTransactionGas: (chainId: string | undefined, tokenAddress: string | undefined, from: string | undefined) => (string | undefined)[];
|
|
62
64
|
ensData: (address?: string) => (string | undefined)[];
|
|
63
65
|
ensSearch: (query?: string) => (string | undefined)[];
|
|
@@ -70,5 +72,6 @@ export declare const keys: () => {
|
|
|
70
72
|
isXrplTrustLineApproved: (address: string | undefined, chainId: string | undefined, chainType: ChainType | undefined, tokenAddress: string | undefined, trustLineLimit: string | undefined, amountToApprove: bigint | undefined) => (string | undefined)[];
|
|
71
73
|
xrplAccountActivatedInfo: (destinationAddress: string | undefined, toChainId: string | undefined, toChainType: ChainType | undefined) => (string | undefined)[];
|
|
72
74
|
stellarAccountActivatedInfo: (address: string | undefined, chainId: string | undefined, chainType: ChainType | undefined) => (string | undefined)[];
|
|
75
|
+
isHederaTokenAssociated: (address: string | undefined, chainId: string | undefined, chainType: ChainType | undefined, tokenAddress: string | undefined) => (string | undefined)[];
|
|
73
76
|
};
|
|
74
77
|
export declare const getPrefixKey: (key: QueryKeys) => QueryKeys[];
|
package/dist/core/types/evm.d.ts
CHANGED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ChainData, Token } from "@0xsquid/squid-types";
|
|
2
|
+
interface Params {
|
|
3
|
+
address: string | undefined;
|
|
4
|
+
token: Token | undefined;
|
|
5
|
+
chain: ChainData | undefined;
|
|
6
|
+
}
|
|
7
|
+
export declare function useHederaTokenAssociations({ address, chain, token }: Params): {
|
|
8
|
+
isTokenAssociated: import("@tanstack/react-query").UseQueryResult<boolean, unknown>;
|
|
9
|
+
associateToken: import("@tanstack/react-query").UseMutationResult<boolean, unknown, void, unknown>;
|
|
10
|
+
};
|
|
11
|
+
export {};
|
package/dist/hooks/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ export { useTrackSearchEmpty } from "./analytics/useTrackSearchEmpty";
|
|
|
2
2
|
export { useSquidChains } from "./chains/useSquidChains";
|
|
3
3
|
export { useClient } from "./client/useClient";
|
|
4
4
|
export { useCosmosForChain } from "./cosmos/useCosmosForChain";
|
|
5
|
+
export { useHederaTokenAssociations } from "./hedera/useHederaTokenAssociations";
|
|
5
6
|
export { useKeyboardNavigation } from "./navigation/useKeyboardNavigation";
|
|
6
7
|
export * from "./onramp/useFiatToCrypto";
|
|
7
8
|
export { useSquidQueryClient } from "./query/useSquidQueryClient";
|
|
@@ -1,21 +1,15 @@
|
|
|
1
|
+
import { SquidDataType } from "@0xsquid/squid-types";
|
|
1
2
|
interface Erc20AllowanceParams {
|
|
2
3
|
tokenAddress: string | undefined;
|
|
3
4
|
ownerAddress: string | undefined;
|
|
4
5
|
spenderAddress: string | undefined;
|
|
5
6
|
amount: bigint | undefined;
|
|
6
7
|
chainId: number | undefined;
|
|
8
|
+
transactionType: SquidDataType | undefined;
|
|
7
9
|
enabled?: boolean;
|
|
8
10
|
}
|
|
9
|
-
export declare const useErc20Allowance: ({ tokenAddress, ownerAddress, spenderAddress, amount, chainId, enabled, }: Erc20AllowanceParams) => {
|
|
11
|
+
export declare const useErc20Allowance: ({ tokenAddress, ownerAddress, spenderAddress, amount, chainId, transactionType, enabled, }: Erc20AllowanceParams) => {
|
|
10
12
|
hasAllowance: boolean;
|
|
11
|
-
error: Error;
|
|
12
|
-
isNativeToken?: undefined;
|
|
13
|
-
query?: undefined;
|
|
14
|
-
allowanceInWei?: undefined;
|
|
15
|
-
} | {
|
|
16
|
-
hasAllowance: boolean;
|
|
17
|
-
isNativeToken: boolean;
|
|
18
|
-
error?: undefined;
|
|
19
13
|
query?: undefined;
|
|
20
14
|
allowanceInWei?: undefined;
|
|
21
15
|
} | {
|
|
@@ -156,7 +150,5 @@ export declare const useErc20Allowance: ({ tokenAddress, ownerAddress, spenderAd
|
|
|
156
150
|
}], "allowance", readonly [`0x${string}`, `0x${string}`], bigint>;
|
|
157
151
|
hasAllowance: boolean;
|
|
158
152
|
allowanceInWei: bigint;
|
|
159
|
-
error?: undefined;
|
|
160
|
-
isNativeToken?: undefined;
|
|
161
153
|
};
|
|
162
154
|
export {};
|