@cofhe/react 0.0.0-beta-20260324063313 → 0.0.0-beta-20260324094644
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.cjs +750 -209
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +49 -5
- package/dist/index.d.ts +49 -5
- package/dist/index.js +693 -157
- package/dist/index.js.map +1 -1
- package/package.json +4 -3
package/dist/index.d.cts
CHANGED
|
@@ -5,7 +5,7 @@ import { z } from 'zod';
|
|
|
5
5
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
6
6
|
import { QueryClient, UseQueryOptions, UseQueryResult, UseMutationOptions, UseMutationResult, MutationFunctionContext } from '@tanstack/react-query';
|
|
7
7
|
import * as viem from 'viem';
|
|
8
|
-
import { WalletClient, PublicClient, Address, Hash, Abi, ContractFunctionName, ContractFunctionArgs, Chain, WriteContractParameters, Account, TransactionReceipt } from 'viem';
|
|
8
|
+
import { WalletClient, PublicClient, Address, Hash, Abi, ContractFunctionName, ContractFunctionArgs, Chain, WriteContractParameters, Account, SimulateContractReturnType, SimulateContractParameters, TransactionReceipt } from 'viem';
|
|
9
9
|
import { Permit } from '@cofhe/sdk/permits';
|
|
10
10
|
import BigNumber from 'bignumber.js';
|
|
11
11
|
import * as zustand_middleware from 'zustand/middleware';
|
|
@@ -14921,6 +14921,21 @@ declare function useCofheTokenTransfer(writeMutationOptions?: UseCofheTokenTrans
|
|
|
14921
14921
|
encryptAmountAndSendToken: ({ input, encryptionOptions }: EncryptAndSendInput) => Promise<`0x${string}`>;
|
|
14922
14922
|
};
|
|
14923
14923
|
|
|
14924
|
+
type CofheSimulateWriteContractCallArgs<TAbi extends Abi | readonly unknown[] = Abi, TFunctionName extends ContractFunctionName<TAbi, 'nonpayable' | 'payable'> = ContractFunctionName<TAbi, 'nonpayable' | 'payable'>, TArgs extends ContractFunctionArgs<TAbi, 'nonpayable' | 'payable', TFunctionName> = ContractFunctionArgs<TAbi, 'nonpayable' | 'payable', TFunctionName>, TChainOverride extends Chain | undefined = Chain | undefined> = SimulateContractParameters<TAbi, TFunctionName, TArgs, Chain | undefined, TChainOverride, Account | Address | undefined>;
|
|
14925
|
+
type CofheSimulateWriteContractData<TAbi extends Abi | readonly unknown[], TFunctionName extends ContractFunctionName<TAbi, 'nonpayable' | 'payable'>, TArgs extends ContractFunctionArgs<TAbi, 'nonpayable' | 'payable', TFunctionName>, TChainOverride extends Chain | undefined> = SimulateContractReturnType<TAbi, TFunctionName, TArgs, Chain | undefined, Account | undefined, TChainOverride, Account | Address | undefined>;
|
|
14926
|
+
type UseCofheSimulateWriteContractQueryOptions<TData, TSelectedData> = Omit<UseQueryOptions<TData, Error, TSelectedData>, 'queryKey' | 'queryFn'> & {
|
|
14927
|
+
enabled?: boolean;
|
|
14928
|
+
};
|
|
14929
|
+
declare function useCofheSimulateWriteContract<TAbi extends Abi | readonly unknown[] = Abi, TFunctionName extends ContractFunctionName<TAbi, 'nonpayable' | 'payable'> = ContractFunctionName<TAbi, 'nonpayable' | 'payable'>, TArgs extends ContractFunctionArgs<TAbi, 'nonpayable' | 'payable', TFunctionName> = ContractFunctionArgs<TAbi, 'nonpayable' | 'payable', TFunctionName>, TChainOverride extends Chain | undefined = Chain | undefined, TSelectedData = CofheSimulateWriteContractData<TAbi, TFunctionName, TArgs, TChainOverride>>(callArgs?: CofheSimulateWriteContractCallArgs<TAbi, TFunctionName, TArgs, TChainOverride>, queryOptions?: UseCofheSimulateWriteContractQueryOptions<CofheSimulateWriteContractData<TAbi, TFunctionName, TArgs, TChainOverride>, TSelectedData>): UseQueryResult<TSelectedData, Error>;
|
|
14930
|
+
|
|
14931
|
+
declare function getCofheTokenShieldCallArgs(params: {
|
|
14932
|
+
token: Token;
|
|
14933
|
+
amount: bigint;
|
|
14934
|
+
account: Address;
|
|
14935
|
+
}): {
|
|
14936
|
+
main: CofheSimulateWriteContractCallArgs;
|
|
14937
|
+
approval?: CofheSimulateWriteContractCallArgs;
|
|
14938
|
+
};
|
|
14924
14939
|
type UnshieldClaim = {
|
|
14925
14940
|
ctHash: bigint;
|
|
14926
14941
|
requestedAmount: bigint;
|
|
@@ -14959,9 +14974,10 @@ declare enum TransactionActionType {
|
|
|
14959
14974
|
ShieldSend = "shieldSend",
|
|
14960
14975
|
Shield = "shield",
|
|
14961
14976
|
Unshield = "unshield",
|
|
14962
|
-
Claim = "claim"
|
|
14977
|
+
Claim = "claim",
|
|
14978
|
+
Approve = "approve"
|
|
14963
14979
|
}
|
|
14964
|
-
type TransactionActionString = 'Shielded Transfer' | 'Shield' | 'Unshield' | 'Claim';
|
|
14980
|
+
type TransactionActionString = 'Shielded Transfer' | 'Shield' | 'Unshield' | 'Claim' | 'Approve';
|
|
14965
14981
|
type BaseTransaction = {
|
|
14966
14982
|
hash: `0x${string}`;
|
|
14967
14983
|
status: TransactionStatus;
|
|
@@ -14981,10 +14997,13 @@ type SendingTransaction = BaseTransaction & {
|
|
|
14981
14997
|
type ClaimingTransaction = BaseTransaction & {
|
|
14982
14998
|
actionType: TransactionActionType.Claim;
|
|
14983
14999
|
};
|
|
15000
|
+
type ApprovingTransaction = BaseTransaction & {
|
|
15001
|
+
actionType: TransactionActionType.Approve;
|
|
15002
|
+
};
|
|
14984
15003
|
type UnshieldingTransaction = BaseTransaction & {
|
|
14985
15004
|
actionType: TransactionActionType.Unshield;
|
|
14986
15005
|
};
|
|
14987
|
-
type Transaction = UnshieldingTransaction | ShieldingTransaction | SendingTransaction | ClaimingTransaction;
|
|
15006
|
+
type Transaction = UnshieldingTransaction | ShieldingTransaction | SendingTransaction | ClaimingTransaction | ApprovingTransaction;
|
|
14988
15007
|
type NewTransaction = DistributiveOmit<Transaction, 'status' | 'timestamp'>;
|
|
14989
15008
|
interface TransactionStore {
|
|
14990
15009
|
transactions: ChainRecord<HashRecord<Transaction>>;
|
|
@@ -15012,6 +15031,11 @@ declare const useTransactionStore: zustand.UseBoundStore<Omit<zustand.StoreApi<T
|
|
|
15012
15031
|
};
|
|
15013
15032
|
}>;
|
|
15014
15033
|
|
|
15034
|
+
declare function getCofheTokenUnshieldCallArgs(params: {
|
|
15035
|
+
token: Token;
|
|
15036
|
+
amount: bigint;
|
|
15037
|
+
account: Address;
|
|
15038
|
+
}): CofheSimulateWriteContractCallArgs;
|
|
15015
15039
|
type UseTokenUnshieldMutationInput = {
|
|
15016
15040
|
/** Token object with confidentialityType */
|
|
15017
15041
|
token: Token;
|
|
@@ -15108,6 +15132,10 @@ declare function useCofheTokenUnshield(input: UseCofheTokenUnshieldInput): {
|
|
|
15108
15132
|
mutateAsync: _tanstack_react_query.UseMutateAsyncFunction<`0x${string}`, Error, UseTokenUnshieldMutationInput, unknown>;
|
|
15109
15133
|
};
|
|
15110
15134
|
|
|
15135
|
+
declare function getCofheTokenClaimUnshieldedCallArgs(params: {
|
|
15136
|
+
token: Token;
|
|
15137
|
+
account: Address;
|
|
15138
|
+
}): CofheSimulateWriteContractCallArgs;
|
|
15111
15139
|
type UseClaimUnshieldInput = {
|
|
15112
15140
|
/** Token object with confidentialityType */
|
|
15113
15141
|
token: Token;
|
|
@@ -15328,6 +15356,22 @@ type UseCoingeckoContractMarketChartRangeOptions = Omit<UseQueryOptions<Coingeck
|
|
|
15328
15356
|
*/
|
|
15329
15357
|
declare function useCoingeckoContractMarketChartRange({ chainId, contractAddress, enabled: enabledInput, apiBaseUrl, platformIdOverride, vsCurrency, rangeMs, }: UseCoingeckoContractMarketChartRangeInput, queryOptions?: UseCoingeckoContractMarketChartRangeOptions): UseQueryResult<CoingeckoMarketChartPoint[] | null, Error>;
|
|
15330
15358
|
|
|
15359
|
+
type UseTokenAllowanceInput = {
|
|
15360
|
+
/** ERC20 token contract address */
|
|
15361
|
+
tokenAddress?: Address;
|
|
15362
|
+
/** Allowance owner */
|
|
15363
|
+
ownerAddress?: Address;
|
|
15364
|
+
/** Allowance spender */
|
|
15365
|
+
spenderAddress?: Address;
|
|
15366
|
+
};
|
|
15367
|
+
type UseTokenAllowanceOptions<TSelectedData = bigint> = Omit<UseQueryOptions<bigint, Error, TSelectedData>, 'queryKey' | 'queryFn'>;
|
|
15368
|
+
type UseTokenAllowanceResult = {
|
|
15369
|
+
data?: bigint;
|
|
15370
|
+
isFetching: boolean;
|
|
15371
|
+
refetch: () => Promise<unknown>;
|
|
15372
|
+
};
|
|
15373
|
+
declare function useTokenAllowance({ tokenAddress, ownerAddress, spenderAddress }: UseTokenAllowanceInput, options?: UseTokenAllowanceOptions): UseTokenAllowanceResult;
|
|
15374
|
+
|
|
15331
15375
|
type NoInferLocal<T> = [T][T extends any ? 0 : never];
|
|
15332
15376
|
type ConfidentialityAwareAbiArgs<TAbi extends Abi | readonly unknown[], TFunctionName extends string> = NoInferLocal<Exclude<CofheInputArgsPreTransform<TAbi, TFunctionName>, undefined>>;
|
|
15333
15377
|
declare function useCofheEncryptAndWriteContract<TExtraVars = unknown>({ encrypingMutationOptions, writingMutationOptions, }?: {
|
|
@@ -15544,4 +15588,4 @@ type Input = {
|
|
|
15544
15588
|
};
|
|
15545
15589
|
declare const useCofheNavigateToCreatePermit: () => ({ cause }?: Input) => void;
|
|
15546
15590
|
|
|
15547
|
-
export { type ClaimableAmountByTokenAddress, type CofheClientConfig, type CofheContextValue, CofheProvider, type CofheProviderProps, type CofheConfigWithReact as CofhesdkConfigWithReact, type CoingeckoMarketChartPoint, ETH_ADDRESS_LOWERCASE, type Erc20Pair, FheTypesList, type FloatingButtonPosition, FnxEncryptInput, type FnxFloatingButtonProps, FnxFloatingButtonWithProvider, MainPage, SettingsPage, type Token, type Transaction, type TransactionActionString, TransactionActionType, TransactionStatus, type TransactionStatusString, type TransactionStore, type UnshieldClaim, type UnshieldClaimsSummary, type UnshieldClaimsSummaryByTokenAddress, type UseCoingeckoContractMarketChartRangeInput, type UseCoingeckoContractMarketChartRangeOptions, type UseCoingeckoUsdPriceInput, type UseCoingeckoUsdPriceOptions, type UseTransactionReceiptsByHashInput, actionToString, createCofheConfig, encryptedValueToString, fheTypeToString, formatRelativeTime, getBlockExplorerAddressUrl, getBlockExplorerTokenUrl, getBlockExplorerTxUrl, getBlockExplorerUrl, isEthPair, isWrappedEthToken, statusToString, truncateHash, useCofheActivePermit, useCofheAllPermits, useCofheAutoConnect, useCofheClient, useCofheConnection, useCofheContext, useCofheEncrypt, useCofheEncryptAndWriteContract, useCofheNavigateToCreatePermit, useCofhePublicClient, useCofheReadContractAndDecrypt, useCofheRemovePermit, useCofheSelectPermit, useCofheTokenClaimUnshielded, useCofheTokenClaimable, useCofheTokenDecryptedBalance, useCofheTokenLists, useCofheTokenShield, useCofheTokenTransfer, useCofheTokenUnshield, useCofheTokens, useCofheTokensClaimable, useCofheTokensWithExistingEncryptedBalances, useCofheWalletClient, useCofheWriteContract, useCoingeckoContractMarketChartRange, useCoingeckoUsdPrice, useInternalQueryClient, useTokensWithPublicBalances, useTransactionReceiptsByHash, useTransactionStore };
|
|
15591
|
+
export { type ClaimableAmountByTokenAddress, type CofheClientConfig, type CofheContextValue, CofheProvider, type CofheProviderProps, type CofheConfigWithReact as CofhesdkConfigWithReact, type CoingeckoMarketChartPoint, ETH_ADDRESS_LOWERCASE, type Erc20Pair, FheTypesList, type FloatingButtonPosition, FnxEncryptInput, type FnxFloatingButtonProps, FnxFloatingButtonWithProvider, MainPage, SettingsPage, type Token, type Transaction, type TransactionActionString, TransactionActionType, TransactionStatus, type TransactionStatusString, type TransactionStore, type UnshieldClaim, type UnshieldClaimsSummary, type UnshieldClaimsSummaryByTokenAddress, type UseCoingeckoContractMarketChartRangeInput, type UseCoingeckoContractMarketChartRangeOptions, type UseCoingeckoUsdPriceInput, type UseCoingeckoUsdPriceOptions, type UseTransactionReceiptsByHashInput, actionToString, createCofheConfig, encryptedValueToString, fheTypeToString, formatRelativeTime, getBlockExplorerAddressUrl, getBlockExplorerTokenUrl, getBlockExplorerTxUrl, getBlockExplorerUrl, getCofheTokenClaimUnshieldedCallArgs, getCofheTokenShieldCallArgs, getCofheTokenUnshieldCallArgs, isEthPair, isWrappedEthToken, statusToString, truncateHash, useCofheActivePermit, useCofheAllPermits, useCofheAutoConnect, useCofheClient, useCofheConnection, useCofheContext, useCofheEncrypt, useCofheEncryptAndWriteContract, useCofheNavigateToCreatePermit, useCofhePublicClient, useCofheReadContractAndDecrypt, useCofheRemovePermit, useCofheSelectPermit, useCofheSimulateWriteContract, useCofheTokenClaimUnshielded, useCofheTokenClaimable, useCofheTokenDecryptedBalance, useCofheTokenLists, useCofheTokenShield, useCofheTokenTransfer, useCofheTokenUnshield, useCofheTokens, useCofheTokensClaimable, useCofheTokensWithExistingEncryptedBalances, useCofheWalletClient, useCofheWriteContract, useCoingeckoContractMarketChartRange, useCoingeckoUsdPrice, useInternalQueryClient, useTokenAllowance, useTokensWithPublicBalances, useTransactionReceiptsByHash, useTransactionStore };
|
package/dist/index.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import { z } from 'zod';
|
|
|
5
5
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
6
6
|
import { QueryClient, UseQueryOptions, UseQueryResult, UseMutationOptions, UseMutationResult, MutationFunctionContext } from '@tanstack/react-query';
|
|
7
7
|
import * as viem from 'viem';
|
|
8
|
-
import { WalletClient, PublicClient, Address, Hash, Abi, ContractFunctionName, ContractFunctionArgs, Chain, WriteContractParameters, Account, TransactionReceipt } from 'viem';
|
|
8
|
+
import { WalletClient, PublicClient, Address, Hash, Abi, ContractFunctionName, ContractFunctionArgs, Chain, WriteContractParameters, Account, SimulateContractReturnType, SimulateContractParameters, TransactionReceipt } from 'viem';
|
|
9
9
|
import { Permit } from '@cofhe/sdk/permits';
|
|
10
10
|
import BigNumber from 'bignumber.js';
|
|
11
11
|
import * as zustand_middleware from 'zustand/middleware';
|
|
@@ -14921,6 +14921,21 @@ declare function useCofheTokenTransfer(writeMutationOptions?: UseCofheTokenTrans
|
|
|
14921
14921
|
encryptAmountAndSendToken: ({ input, encryptionOptions }: EncryptAndSendInput) => Promise<`0x${string}`>;
|
|
14922
14922
|
};
|
|
14923
14923
|
|
|
14924
|
+
type CofheSimulateWriteContractCallArgs<TAbi extends Abi | readonly unknown[] = Abi, TFunctionName extends ContractFunctionName<TAbi, 'nonpayable' | 'payable'> = ContractFunctionName<TAbi, 'nonpayable' | 'payable'>, TArgs extends ContractFunctionArgs<TAbi, 'nonpayable' | 'payable', TFunctionName> = ContractFunctionArgs<TAbi, 'nonpayable' | 'payable', TFunctionName>, TChainOverride extends Chain | undefined = Chain | undefined> = SimulateContractParameters<TAbi, TFunctionName, TArgs, Chain | undefined, TChainOverride, Account | Address | undefined>;
|
|
14925
|
+
type CofheSimulateWriteContractData<TAbi extends Abi | readonly unknown[], TFunctionName extends ContractFunctionName<TAbi, 'nonpayable' | 'payable'>, TArgs extends ContractFunctionArgs<TAbi, 'nonpayable' | 'payable', TFunctionName>, TChainOverride extends Chain | undefined> = SimulateContractReturnType<TAbi, TFunctionName, TArgs, Chain | undefined, Account | undefined, TChainOverride, Account | Address | undefined>;
|
|
14926
|
+
type UseCofheSimulateWriteContractQueryOptions<TData, TSelectedData> = Omit<UseQueryOptions<TData, Error, TSelectedData>, 'queryKey' | 'queryFn'> & {
|
|
14927
|
+
enabled?: boolean;
|
|
14928
|
+
};
|
|
14929
|
+
declare function useCofheSimulateWriteContract<TAbi extends Abi | readonly unknown[] = Abi, TFunctionName extends ContractFunctionName<TAbi, 'nonpayable' | 'payable'> = ContractFunctionName<TAbi, 'nonpayable' | 'payable'>, TArgs extends ContractFunctionArgs<TAbi, 'nonpayable' | 'payable', TFunctionName> = ContractFunctionArgs<TAbi, 'nonpayable' | 'payable', TFunctionName>, TChainOverride extends Chain | undefined = Chain | undefined, TSelectedData = CofheSimulateWriteContractData<TAbi, TFunctionName, TArgs, TChainOverride>>(callArgs?: CofheSimulateWriteContractCallArgs<TAbi, TFunctionName, TArgs, TChainOverride>, queryOptions?: UseCofheSimulateWriteContractQueryOptions<CofheSimulateWriteContractData<TAbi, TFunctionName, TArgs, TChainOverride>, TSelectedData>): UseQueryResult<TSelectedData, Error>;
|
|
14930
|
+
|
|
14931
|
+
declare function getCofheTokenShieldCallArgs(params: {
|
|
14932
|
+
token: Token;
|
|
14933
|
+
amount: bigint;
|
|
14934
|
+
account: Address;
|
|
14935
|
+
}): {
|
|
14936
|
+
main: CofheSimulateWriteContractCallArgs;
|
|
14937
|
+
approval?: CofheSimulateWriteContractCallArgs;
|
|
14938
|
+
};
|
|
14924
14939
|
type UnshieldClaim = {
|
|
14925
14940
|
ctHash: bigint;
|
|
14926
14941
|
requestedAmount: bigint;
|
|
@@ -14959,9 +14974,10 @@ declare enum TransactionActionType {
|
|
|
14959
14974
|
ShieldSend = "shieldSend",
|
|
14960
14975
|
Shield = "shield",
|
|
14961
14976
|
Unshield = "unshield",
|
|
14962
|
-
Claim = "claim"
|
|
14977
|
+
Claim = "claim",
|
|
14978
|
+
Approve = "approve"
|
|
14963
14979
|
}
|
|
14964
|
-
type TransactionActionString = 'Shielded Transfer' | 'Shield' | 'Unshield' | 'Claim';
|
|
14980
|
+
type TransactionActionString = 'Shielded Transfer' | 'Shield' | 'Unshield' | 'Claim' | 'Approve';
|
|
14965
14981
|
type BaseTransaction = {
|
|
14966
14982
|
hash: `0x${string}`;
|
|
14967
14983
|
status: TransactionStatus;
|
|
@@ -14981,10 +14997,13 @@ type SendingTransaction = BaseTransaction & {
|
|
|
14981
14997
|
type ClaimingTransaction = BaseTransaction & {
|
|
14982
14998
|
actionType: TransactionActionType.Claim;
|
|
14983
14999
|
};
|
|
15000
|
+
type ApprovingTransaction = BaseTransaction & {
|
|
15001
|
+
actionType: TransactionActionType.Approve;
|
|
15002
|
+
};
|
|
14984
15003
|
type UnshieldingTransaction = BaseTransaction & {
|
|
14985
15004
|
actionType: TransactionActionType.Unshield;
|
|
14986
15005
|
};
|
|
14987
|
-
type Transaction = UnshieldingTransaction | ShieldingTransaction | SendingTransaction | ClaimingTransaction;
|
|
15006
|
+
type Transaction = UnshieldingTransaction | ShieldingTransaction | SendingTransaction | ClaimingTransaction | ApprovingTransaction;
|
|
14988
15007
|
type NewTransaction = DistributiveOmit<Transaction, 'status' | 'timestamp'>;
|
|
14989
15008
|
interface TransactionStore {
|
|
14990
15009
|
transactions: ChainRecord<HashRecord<Transaction>>;
|
|
@@ -15012,6 +15031,11 @@ declare const useTransactionStore: zustand.UseBoundStore<Omit<zustand.StoreApi<T
|
|
|
15012
15031
|
};
|
|
15013
15032
|
}>;
|
|
15014
15033
|
|
|
15034
|
+
declare function getCofheTokenUnshieldCallArgs(params: {
|
|
15035
|
+
token: Token;
|
|
15036
|
+
amount: bigint;
|
|
15037
|
+
account: Address;
|
|
15038
|
+
}): CofheSimulateWriteContractCallArgs;
|
|
15015
15039
|
type UseTokenUnshieldMutationInput = {
|
|
15016
15040
|
/** Token object with confidentialityType */
|
|
15017
15041
|
token: Token;
|
|
@@ -15108,6 +15132,10 @@ declare function useCofheTokenUnshield(input: UseCofheTokenUnshieldInput): {
|
|
|
15108
15132
|
mutateAsync: _tanstack_react_query.UseMutateAsyncFunction<`0x${string}`, Error, UseTokenUnshieldMutationInput, unknown>;
|
|
15109
15133
|
};
|
|
15110
15134
|
|
|
15135
|
+
declare function getCofheTokenClaimUnshieldedCallArgs(params: {
|
|
15136
|
+
token: Token;
|
|
15137
|
+
account: Address;
|
|
15138
|
+
}): CofheSimulateWriteContractCallArgs;
|
|
15111
15139
|
type UseClaimUnshieldInput = {
|
|
15112
15140
|
/** Token object with confidentialityType */
|
|
15113
15141
|
token: Token;
|
|
@@ -15328,6 +15356,22 @@ type UseCoingeckoContractMarketChartRangeOptions = Omit<UseQueryOptions<Coingeck
|
|
|
15328
15356
|
*/
|
|
15329
15357
|
declare function useCoingeckoContractMarketChartRange({ chainId, contractAddress, enabled: enabledInput, apiBaseUrl, platformIdOverride, vsCurrency, rangeMs, }: UseCoingeckoContractMarketChartRangeInput, queryOptions?: UseCoingeckoContractMarketChartRangeOptions): UseQueryResult<CoingeckoMarketChartPoint[] | null, Error>;
|
|
15330
15358
|
|
|
15359
|
+
type UseTokenAllowanceInput = {
|
|
15360
|
+
/** ERC20 token contract address */
|
|
15361
|
+
tokenAddress?: Address;
|
|
15362
|
+
/** Allowance owner */
|
|
15363
|
+
ownerAddress?: Address;
|
|
15364
|
+
/** Allowance spender */
|
|
15365
|
+
spenderAddress?: Address;
|
|
15366
|
+
};
|
|
15367
|
+
type UseTokenAllowanceOptions<TSelectedData = bigint> = Omit<UseQueryOptions<bigint, Error, TSelectedData>, 'queryKey' | 'queryFn'>;
|
|
15368
|
+
type UseTokenAllowanceResult = {
|
|
15369
|
+
data?: bigint;
|
|
15370
|
+
isFetching: boolean;
|
|
15371
|
+
refetch: () => Promise<unknown>;
|
|
15372
|
+
};
|
|
15373
|
+
declare function useTokenAllowance({ tokenAddress, ownerAddress, spenderAddress }: UseTokenAllowanceInput, options?: UseTokenAllowanceOptions): UseTokenAllowanceResult;
|
|
15374
|
+
|
|
15331
15375
|
type NoInferLocal<T> = [T][T extends any ? 0 : never];
|
|
15332
15376
|
type ConfidentialityAwareAbiArgs<TAbi extends Abi | readonly unknown[], TFunctionName extends string> = NoInferLocal<Exclude<CofheInputArgsPreTransform<TAbi, TFunctionName>, undefined>>;
|
|
15333
15377
|
declare function useCofheEncryptAndWriteContract<TExtraVars = unknown>({ encrypingMutationOptions, writingMutationOptions, }?: {
|
|
@@ -15544,4 +15588,4 @@ type Input = {
|
|
|
15544
15588
|
};
|
|
15545
15589
|
declare const useCofheNavigateToCreatePermit: () => ({ cause }?: Input) => void;
|
|
15546
15590
|
|
|
15547
|
-
export { type ClaimableAmountByTokenAddress, type CofheClientConfig, type CofheContextValue, CofheProvider, type CofheProviderProps, type CofheConfigWithReact as CofhesdkConfigWithReact, type CoingeckoMarketChartPoint, ETH_ADDRESS_LOWERCASE, type Erc20Pair, FheTypesList, type FloatingButtonPosition, FnxEncryptInput, type FnxFloatingButtonProps, FnxFloatingButtonWithProvider, MainPage, SettingsPage, type Token, type Transaction, type TransactionActionString, TransactionActionType, TransactionStatus, type TransactionStatusString, type TransactionStore, type UnshieldClaim, type UnshieldClaimsSummary, type UnshieldClaimsSummaryByTokenAddress, type UseCoingeckoContractMarketChartRangeInput, type UseCoingeckoContractMarketChartRangeOptions, type UseCoingeckoUsdPriceInput, type UseCoingeckoUsdPriceOptions, type UseTransactionReceiptsByHashInput, actionToString, createCofheConfig, encryptedValueToString, fheTypeToString, formatRelativeTime, getBlockExplorerAddressUrl, getBlockExplorerTokenUrl, getBlockExplorerTxUrl, getBlockExplorerUrl, isEthPair, isWrappedEthToken, statusToString, truncateHash, useCofheActivePermit, useCofheAllPermits, useCofheAutoConnect, useCofheClient, useCofheConnection, useCofheContext, useCofheEncrypt, useCofheEncryptAndWriteContract, useCofheNavigateToCreatePermit, useCofhePublicClient, useCofheReadContractAndDecrypt, useCofheRemovePermit, useCofheSelectPermit, useCofheTokenClaimUnshielded, useCofheTokenClaimable, useCofheTokenDecryptedBalance, useCofheTokenLists, useCofheTokenShield, useCofheTokenTransfer, useCofheTokenUnshield, useCofheTokens, useCofheTokensClaimable, useCofheTokensWithExistingEncryptedBalances, useCofheWalletClient, useCofheWriteContract, useCoingeckoContractMarketChartRange, useCoingeckoUsdPrice, useInternalQueryClient, useTokensWithPublicBalances, useTransactionReceiptsByHash, useTransactionStore };
|
|
15591
|
+
export { type ClaimableAmountByTokenAddress, type CofheClientConfig, type CofheContextValue, CofheProvider, type CofheProviderProps, type CofheConfigWithReact as CofhesdkConfigWithReact, type CoingeckoMarketChartPoint, ETH_ADDRESS_LOWERCASE, type Erc20Pair, FheTypesList, type FloatingButtonPosition, FnxEncryptInput, type FnxFloatingButtonProps, FnxFloatingButtonWithProvider, MainPage, SettingsPage, type Token, type Transaction, type TransactionActionString, TransactionActionType, TransactionStatus, type TransactionStatusString, type TransactionStore, type UnshieldClaim, type UnshieldClaimsSummary, type UnshieldClaimsSummaryByTokenAddress, type UseCoingeckoContractMarketChartRangeInput, type UseCoingeckoContractMarketChartRangeOptions, type UseCoingeckoUsdPriceInput, type UseCoingeckoUsdPriceOptions, type UseTransactionReceiptsByHashInput, actionToString, createCofheConfig, encryptedValueToString, fheTypeToString, formatRelativeTime, getBlockExplorerAddressUrl, getBlockExplorerTokenUrl, getBlockExplorerTxUrl, getBlockExplorerUrl, getCofheTokenClaimUnshieldedCallArgs, getCofheTokenShieldCallArgs, getCofheTokenUnshieldCallArgs, isEthPair, isWrappedEthToken, statusToString, truncateHash, useCofheActivePermit, useCofheAllPermits, useCofheAutoConnect, useCofheClient, useCofheConnection, useCofheContext, useCofheEncrypt, useCofheEncryptAndWriteContract, useCofheNavigateToCreatePermit, useCofhePublicClient, useCofheReadContractAndDecrypt, useCofheRemovePermit, useCofheSelectPermit, useCofheSimulateWriteContract, useCofheTokenClaimUnshielded, useCofheTokenClaimable, useCofheTokenDecryptedBalance, useCofheTokenLists, useCofheTokenShield, useCofheTokenTransfer, useCofheTokenUnshield, useCofheTokens, useCofheTokensClaimable, useCofheTokensWithExistingEncryptedBalances, useCofheWalletClient, useCofheWriteContract, useCoingeckoContractMarketChartRange, useCoingeckoUsdPrice, useInternalQueryClient, useTokenAllowance, useTokensWithPublicBalances, useTransactionReceiptsByHash, useTransactionStore };
|