@cofhe/react 0.5.2 → 0.6.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/index.cjs CHANGED
@@ -52,7 +52,8 @@
52
52
 
53
53
 
54
54
 
55
- var _chunk3YAGCPSAcjs = require('./chunk-3YAGCPSA.cjs');
55
+
56
+ var _chunk6ANXPYT6cjs = require('./chunk-6ANXPYT6.cjs');
56
57
 
57
58
  // src/index.ts
58
59
  var _web = require('@cofhe/sdk/web');
@@ -111,5 +112,6 @@ var _web = require('@cofhe/sdk/web');
111
112
 
112
113
 
113
114
 
114
- exports.CofheProvider = _chunk3YAGCPSAcjs.CofheProvider; exports.ETH_ADDRESS_LOWERCASE = _chunk3YAGCPSAcjs.ETH_ADDRESS_LOWERCASE; exports.FheTypesList = _chunk3YAGCPSAcjs.FheTypesList; exports.TransactionActionType = _chunk3YAGCPSAcjs.TransactionActionType; exports.TransactionStatus = _chunk3YAGCPSAcjs.TransactionStatus; exports.actionToString = _chunk3YAGCPSAcjs.actionToString; exports.createCofheClient = _web.createCofheClient; exports.createCofheConfig = _chunk3YAGCPSAcjs.createCofheConfig; exports.formatRelativeTime = _chunk3YAGCPSAcjs.formatRelativeTime; exports.getBlockExplorerAddressUrl = _chunk3YAGCPSAcjs.getBlockExplorerAddressUrl; exports.getBlockExplorerTokenUrl = _chunk3YAGCPSAcjs.getBlockExplorerTokenUrl; exports.getBlockExplorerTxUrl = _chunk3YAGCPSAcjs.getBlockExplorerTxUrl; exports.getBlockExplorerUrl = _chunk3YAGCPSAcjs.getBlockExplorerUrl; exports.getCofheTokenClaimUnshieldedCallArgs = _chunk3YAGCPSAcjs.getCofheTokenClaimUnshieldedCallArgs; exports.getCofheTokenShieldCallArgs = _chunk3YAGCPSAcjs.getCofheTokenShieldCallArgs; exports.getCofheTokenUnshieldCallArgs = _chunk3YAGCPSAcjs.getCofheTokenUnshieldCallArgs; exports.isEthPair = _chunk3YAGCPSAcjs.isEthPair; exports.isWrappedEthToken = _chunk3YAGCPSAcjs.isWrappedEthToken; exports.statusToString = _chunk3YAGCPSAcjs.statusToString; exports.truncateHash = _chunk3YAGCPSAcjs.truncateHash; exports.useCofheActivePermit = _chunk3YAGCPSAcjs.useCofheActivePermit; exports.useCofheAllPermits = _chunk3YAGCPSAcjs.useCofheAllPermits; exports.useCofheAutoConnect = _chunk3YAGCPSAcjs.useCofheAutoConnect; exports.useCofheClient = _chunk3YAGCPSAcjs.useCofheClient; exports.useCofheConnection = _chunk3YAGCPSAcjs.useCofheConnection; exports.useCofheContext = _chunk3YAGCPSAcjs.useCofheContext; exports.useCofheEnabled = _chunk3YAGCPSAcjs.useCofheEnabled; exports.useCofheEncrypt = _chunk3YAGCPSAcjs.useCofheEncrypt; exports.useCofheEncryptAndWriteContract = _chunk3YAGCPSAcjs.useCofheEncryptAndWriteContract; exports.useCofheNavigateToCreatePermit = _chunk3YAGCPSAcjs.useCofheNavigateToCreatePermit; exports.useCofhePublicClient = _chunk3YAGCPSAcjs.useCofhePublicClient; exports.useCofheReadContractAndDecrypt = _chunk3YAGCPSAcjs.useCofheReadContractAndDecrypt; exports.useCofheRemovePermit = _chunk3YAGCPSAcjs.useCofheRemovePermit; exports.useCofheSelectPermit = _chunk3YAGCPSAcjs.useCofheSelectPermit; exports.useCofheSimulateWriteContract = _chunk3YAGCPSAcjs.useCofheSimulateWriteContract; exports.useCofheTokenClaimUnshielded = _chunk3YAGCPSAcjs.useCofheTokenClaimUnshielded; exports.useCofheTokenClaimable = _chunk3YAGCPSAcjs.useCofheTokenClaimable; exports.useCofheTokenDecryptedBalance = _chunk3YAGCPSAcjs.useCofheTokenDecryptedBalance; exports.useCofheTokenLists = _chunk3YAGCPSAcjs.useCofheTokenLists; exports.useCofheTokenShield = _chunk3YAGCPSAcjs.useCofheTokenShield; exports.useCofheTokenTransfer = _chunk3YAGCPSAcjs.useCofheTokenTransfer; exports.useCofheTokenUnshield = _chunk3YAGCPSAcjs.useCofheTokenUnshield; exports.useCofheTokens = _chunk3YAGCPSAcjs.useCofheTokens; exports.useCofheTokensClaimable = _chunk3YAGCPSAcjs.useCofheTokensClaimable; exports.useCofheTokensWithExistingEncryptedBalances = _chunk3YAGCPSAcjs.useCofheTokensWithExistingEncryptedBalances; exports.useCofheWalletClient = _chunk3YAGCPSAcjs.useCofheWalletClient; exports.useCofheWriteContract = _chunk3YAGCPSAcjs.useCofheWriteContract; exports.useCoingeckoContractMarketChartRange = _chunk3YAGCPSAcjs.useCoingeckoContractMarketChartRange; exports.useCoingeckoUsdPrice = _chunk3YAGCPSAcjs.useCoingeckoUsdPrice; exports.useInternalQueryClient = _chunk3YAGCPSAcjs.useInternalQueryClient; exports.useTokenAllowance = _chunk3YAGCPSAcjs.useTokenAllowance; exports.useTokensWithPublicBalances = _chunk3YAGCPSAcjs.useTokensWithPublicBalances; exports.useTransactionReceiptsByHash = _chunk3YAGCPSAcjs.useTransactionReceiptsByHash; exports.useTransactionStore = _chunk3YAGCPSAcjs.useTransactionStore;
115
+
116
+ exports.CofheProvider = _chunk6ANXPYT6cjs.CofheProvider; exports.ETH_ADDRESS_LOWERCASE = _chunk6ANXPYT6cjs.ETH_ADDRESS_LOWERCASE; exports.FheTypesList = _chunk6ANXPYT6cjs.FheTypesList; exports.TransactionActionType = _chunk6ANXPYT6cjs.TransactionActionType; exports.TransactionStatus = _chunk6ANXPYT6cjs.TransactionStatus; exports.actionToString = _chunk6ANXPYT6cjs.actionToString; exports.createCofheClient = _web.createCofheClient; exports.createCofheConfig = _chunk6ANXPYT6cjs.createCofheConfig; exports.formatRelativeTime = _chunk6ANXPYT6cjs.formatRelativeTime; exports.getBlockExplorerAddressUrl = _chunk6ANXPYT6cjs.getBlockExplorerAddressUrl; exports.getBlockExplorerTokenUrl = _chunk6ANXPYT6cjs.getBlockExplorerTokenUrl; exports.getBlockExplorerTxUrl = _chunk6ANXPYT6cjs.getBlockExplorerTxUrl; exports.getBlockExplorerUrl = _chunk6ANXPYT6cjs.getBlockExplorerUrl; exports.getCofheTokenClaimUnshieldedCallArgs = _chunk6ANXPYT6cjs.getCofheTokenClaimUnshieldedCallArgs; exports.getCofheTokenShieldCallArgs = _chunk6ANXPYT6cjs.getCofheTokenShieldCallArgs; exports.getCofheTokenUnshieldCallArgs = _chunk6ANXPYT6cjs.getCofheTokenUnshieldCallArgs; exports.isEthPair = _chunk6ANXPYT6cjs.isEthPair; exports.isWrappedEthToken = _chunk6ANXPYT6cjs.isWrappedEthToken; exports.statusToString = _chunk6ANXPYT6cjs.statusToString; exports.truncateHash = _chunk6ANXPYT6cjs.truncateHash; exports.useCofheActivePermit = _chunk6ANXPYT6cjs.useCofheActivePermit; exports.useCofheAllPermits = _chunk6ANXPYT6cjs.useCofheAllPermits; exports.useCofheAutoConnect = _chunk6ANXPYT6cjs.useCofheAutoConnect; exports.useCofheClient = _chunk6ANXPYT6cjs.useCofheClient; exports.useCofheConnection = _chunk6ANXPYT6cjs.useCofheConnection; exports.useCofheContext = _chunk6ANXPYT6cjs.useCofheContext; exports.useCofheCreatePermit = _chunk6ANXPYT6cjs.useCofheCreatePermit; exports.useCofheEnabled = _chunk6ANXPYT6cjs.useCofheEnabled; exports.useCofheEncrypt = _chunk6ANXPYT6cjs.useCofheEncrypt; exports.useCofheEncryptAndWriteContract = _chunk6ANXPYT6cjs.useCofheEncryptAndWriteContract; exports.useCofheNavigateToCreatePermit = _chunk6ANXPYT6cjs.useCofheNavigateToCreatePermit; exports.useCofhePublicClient = _chunk6ANXPYT6cjs.useCofhePublicClient; exports.useCofheReadContractAndDecrypt = _chunk6ANXPYT6cjs.useCofheReadContractAndDecrypt; exports.useCofheRemovePermit = _chunk6ANXPYT6cjs.useCofheRemovePermit; exports.useCofheSelectPermit = _chunk6ANXPYT6cjs.useCofheSelectPermit; exports.useCofheSimulateWriteContract = _chunk6ANXPYT6cjs.useCofheSimulateWriteContract; exports.useCofheTokenClaimUnshielded = _chunk6ANXPYT6cjs.useCofheTokenClaimUnshielded; exports.useCofheTokenClaimable = _chunk6ANXPYT6cjs.useCofheTokenClaimable; exports.useCofheTokenDecryptedBalance = _chunk6ANXPYT6cjs.useCofheTokenDecryptedBalance; exports.useCofheTokenLists = _chunk6ANXPYT6cjs.useCofheTokenLists; exports.useCofheTokenShield = _chunk6ANXPYT6cjs.useCofheTokenShield; exports.useCofheTokenTransfer = _chunk6ANXPYT6cjs.useCofheTokenTransfer; exports.useCofheTokenUnshield = _chunk6ANXPYT6cjs.useCofheTokenUnshield; exports.useCofheTokens = _chunk6ANXPYT6cjs.useCofheTokens; exports.useCofheTokensClaimable = _chunk6ANXPYT6cjs.useCofheTokensClaimable; exports.useCofheTokensWithExistingEncryptedBalances = _chunk6ANXPYT6cjs.useCofheTokensWithExistingEncryptedBalances; exports.useCofheWalletClient = _chunk6ANXPYT6cjs.useCofheWalletClient; exports.useCofheWriteContract = _chunk6ANXPYT6cjs.useCofheWriteContract; exports.useCoingeckoContractMarketChartRange = _chunk6ANXPYT6cjs.useCoingeckoContractMarketChartRange; exports.useCoingeckoUsdPrice = _chunk6ANXPYT6cjs.useCoingeckoUsdPrice; exports.useInternalQueryClient = _chunk6ANXPYT6cjs.useInternalQueryClient; exports.useTokenAllowance = _chunk6ANXPYT6cjs.useTokenAllowance; exports.useTokensWithPublicBalances = _chunk6ANXPYT6cjs.useTokensWithPublicBalances; exports.useTransactionReceiptsByHash = _chunk6ANXPYT6cjs.useTransactionReceiptsByHash; exports.useTransactionStore = _chunk6ANXPYT6cjs.useTransactionStore;
115
117
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/cofhesdk/cofhesdk/packages/react/dist/index.cjs","../src/index.ts"],"names":[],"mappings":"AAAA;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,wDAA6B;AAC7B;AACA;AC4BA,qCAAkC;AD1BlC;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,g3HAAC","file":"/home/runner/work/cofhesdk/cofhesdk/packages/react/dist/index.cjs","sourcesContent":[null,"// Providers\nexport { CofheProvider, useCofheContext } from './providers/index';\n\n// Hooks\nexport {\n useCofheConnection,\n useCofheEnabled,\n useCofheActivePermit,\n useCofheAllPermits,\n useCofheRemovePermit,\n useCofheSelectPermit,\n useCofhePublicClient,\n useCofheWalletClient,\n useCofheEncrypt,\n useCofheWriteContract,\n useCofheSimulateWriteContract,\n useCofheClient,\n useCofheTokens,\n useCofheTokensWithExistingEncryptedBalances,\n useTokensWithPublicBalances,\n useCofheTokenLists,\n useCofheTokenShield,\n getCofheTokenShieldCallArgs,\n useCofheTokenUnshield,\n getCofheTokenUnshieldCallArgs,\n useCofheTokenClaimUnshielded,\n getCofheTokenClaimUnshieldedCallArgs,\n useCofheTokenClaimable,\n useCofheTokensClaimable,\n useCofheTokenDecryptedBalance,\n useCofheTokenTransfer,\n useTokenAllowance,\n useTransactionReceiptsByHash,\n ETH_ADDRESS_LOWERCASE,\n type Erc20Pair,\n type UnshieldClaim,\n type UnshieldClaimsSummary,\n type UnshieldClaimsSummaryByTokenAddress,\n type ClaimableAmountByTokenAddress,\n type UseTransactionReceiptsByHashInput,\n useCoingeckoUsdPrice,\n type UseCoingeckoUsdPriceInput,\n type UseCoingeckoUsdPriceOptions,\n useCoingeckoContractMarketChartRange,\n type CoingeckoMarketChartPoint,\n type UseCoingeckoContractMarketChartRangeInput,\n type UseCoingeckoContractMarketChartRangeOptions,\n} from '@/hooks/index';\n\nexport { useCofheEncryptAndWriteContract } from '@/hooks/useCofheEncryptAndWriteContract';\nexport { useCofheReadContractAndDecrypt } from '@/hooks/useCofheReadContractAndDecrypt';\n\n// Utils\nexport {\n FheTypesList,\n getBlockExplorerUrl,\n getBlockExplorerTxUrl,\n getBlockExplorerAddressUrl,\n getBlockExplorerTokenUrl,\n formatRelativeTime,\n truncateHash,\n isEthPair,\n isWrappedEthToken,\n} from './utils/index';\n\n// Stores\nexport {\n useTransactionStore,\n TransactionStatus,\n TransactionActionType,\n actionToString,\n statusToString,\n type Transaction,\n type TransactionStore,\n type TransactionStatusString,\n type TransactionActionString,\n} from './stores/transactionStore';\n\nexport { createCofheConfig } from './config';\nexport type { CofheReactLogger, CofheReactLoggerMethod } from './config';\n\n// Types\nexport type { CofheContextValue, CofheProviderProps, CofheClientConfig } from './types/index';\n\nexport { createCofheClient } from '@cofhe/sdk/web';\n\nexport { useCofheNavigateToCreatePermit } from '@/hooks/permits/useCofheNavigateToCreatePermit';\nexport { useCofheAutoConnect } from '@/hooks/useCofheAutoConnect';\n\nexport type { CofheConfigWithReact as CofhesdkConfigWithReact } from './config';\n\nexport type { Token } from './types/token';\n\nexport { useInternalQueryClient } from './providers/index';\n"]}
1
+ {"version":3,"sources":["/home/runner/work/cofhesdk/cofhesdk/packages/react/dist/index.cjs","../src/index.ts"],"names":[],"mappings":"AAAA;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,wDAA6B;AAC7B;AACA;AC2BA,qCAAkC;ADzBlC;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,u7HAAC","file":"/home/runner/work/cofhesdk/cofhesdk/packages/react/dist/index.cjs","sourcesContent":[null,"// Providers\nexport { CofheProvider, useCofheContext } from './providers/index';\n\n// Hooks\nexport {\n useCofheConnection,\n useCofheEnabled,\n useCofheActivePermit,\n useCofheAllPermits,\n useCofheRemovePermit,\n useCofheSelectPermit,\n useCofhePublicClient,\n useCofheWalletClient,\n useCofheEncrypt,\n useCofheWriteContract,\n useCofheSimulateWriteContract,\n useCofheClient,\n useCofheTokens,\n useCofheTokensWithExistingEncryptedBalances,\n useTokensWithPublicBalances,\n useCofheTokenLists,\n useCofheTokenShield,\n getCofheTokenShieldCallArgs,\n useCofheTokenUnshield,\n getCofheTokenUnshieldCallArgs,\n useCofheTokenClaimUnshielded,\n getCofheTokenClaimUnshieldedCallArgs,\n useCofheTokenClaimable,\n useCofheTokensClaimable,\n useCofheTokenDecryptedBalance,\n useCofheTokenTransfer,\n useTokenAllowance,\n useTransactionReceiptsByHash,\n ETH_ADDRESS_LOWERCASE,\n type Erc20Pair,\n type UnshieldClaim,\n type UnshieldClaimsSummary,\n type UnshieldClaimsSummaryByTokenAddress,\n type ClaimableAmountByTokenAddress,\n type UseTransactionReceiptsByHashInput,\n useCoingeckoUsdPrice,\n type UseCoingeckoUsdPriceInput,\n type UseCoingeckoUsdPriceOptions,\n useCoingeckoContractMarketChartRange,\n type CoingeckoMarketChartPoint,\n type UseCoingeckoContractMarketChartRangeInput,\n type UseCoingeckoContractMarketChartRangeOptions,\n} from '@/hooks/index';\n\nexport { useCofheEncryptAndWriteContract } from '@/hooks/useCofheEncryptAndWriteContract';\nexport { useCofheReadContractAndDecrypt } from '@/hooks/useCofheReadContractAndDecrypt';\n\n// Utils\nexport {\n FheTypesList,\n getBlockExplorerUrl,\n getBlockExplorerTxUrl,\n getBlockExplorerAddressUrl,\n getBlockExplorerTokenUrl,\n formatRelativeTime,\n truncateHash,\n isEthPair,\n isWrappedEthToken,\n} from './utils/index';\n\n// Stores\nexport {\n useTransactionStore,\n TransactionStatus,\n TransactionActionType,\n actionToString,\n statusToString,\n type Transaction,\n type TransactionStore,\n type TransactionStatusString,\n type TransactionActionString,\n} from './stores/transactionStore';\n\nexport { createCofheConfig } from './config';\nexport type { CofheReactLogger, CofheReactLoggerMethod } from './config';\n\n// Types\nexport type { CofheContextValue, CofheProviderProps, CofheClientConfig } from './types/index';\n\nexport { createCofheClient } from '@cofhe/sdk/web';\n\nexport { useCofheNavigateToCreatePermit } from '@/hooks/permits/useCofheNavigateToCreatePermit';\nexport { useCofheCreatePermit } from '@/hooks/permits/useCofheCreatePermit';\nexport { useCofheAutoConnect } from '@/hooks/useCofheAutoConnect';\n\nexport type { CofheConfigWithReact as CofhesdkConfigWithReact } from './config';\n\nexport type { Token } from './types/token';\n\nexport { useInternalQueryClient } from './providers/index';\n"]}
package/dist/index.d.cts CHANGED
@@ -15213,6 +15213,22 @@ declare function useTokensWithPublicBalances({ chainId: _chainId, accountAddress
15213
15213
  enabled?: boolean;
15214
15214
  } & Omit<UseTokenBalanceOptions, 'select'>): UseTokensWithPublicBalancesResult;
15215
15215
 
15216
+ type CreatePermitArgs = {
15217
+ name: string;
15218
+ isSelf: true;
15219
+ expirationSeconds: number;
15220
+ } | {
15221
+ name: string;
15222
+ isSelf: false;
15223
+ receiver: `0x${string}`;
15224
+ expirationSeconds: number;
15225
+ };
15226
+ type Input$2 = {
15227
+ onSuccess?: () => void;
15228
+ onError?: (error: Error) => void;
15229
+ };
15230
+ declare const useCofheCreatePermit: ({ onSuccess, onError }?: Input$2) => _tanstack_react_query.UseMutationResult<void, Error, CreatePermitArgs, unknown>;
15231
+
15216
15232
  type Input$1 = {
15217
15233
  publicClient?: PublicClient;
15218
15234
  walletClient?: WalletClient;
@@ -15361,4 +15377,4 @@ type Input = {
15361
15377
  };
15362
15378
  declare const useCofheNavigateToCreatePermit: () => ({ cause }?: Input) => void;
15363
15379
 
15364
- export { type ClaimableAmountByTokenAddress, type CofheClientConfig, type CofheContextValue, CofheProvider, type CofheProviderProps, type CofheReactLogger, type CofheReactLoggerMethod, type CofheConfigWithReact as CofhesdkConfigWithReact, type CoingeckoMarketChartPoint, 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, getCofheTokenClaimUnshieldedCallArgs, getCofheTokenShieldCallArgs, getCofheTokenUnshieldCallArgs, statusToString, useCofheActivePermit, useCofheAllPermits, useCofheAutoConnect, useCofheClient, useCofheConnection, useCofheContext, useCofheEnabled, 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 };
15380
+ export { type ClaimableAmountByTokenAddress, type CofheClientConfig, type CofheContextValue, CofheProvider, type CofheProviderProps, type CofheReactLogger, type CofheReactLoggerMethod, type CofheConfigWithReact as CofhesdkConfigWithReact, type CoingeckoMarketChartPoint, 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, getCofheTokenClaimUnshieldedCallArgs, getCofheTokenShieldCallArgs, getCofheTokenUnshieldCallArgs, statusToString, useCofheActivePermit, useCofheAllPermits, useCofheAutoConnect, useCofheClient, useCofheConnection, useCofheContext, useCofheCreatePermit, useCofheEnabled, 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
@@ -15213,6 +15213,22 @@ declare function useTokensWithPublicBalances({ chainId: _chainId, accountAddress
15213
15213
  enabled?: boolean;
15214
15214
  } & Omit<UseTokenBalanceOptions, 'select'>): UseTokensWithPublicBalancesResult;
15215
15215
 
15216
+ type CreatePermitArgs = {
15217
+ name: string;
15218
+ isSelf: true;
15219
+ expirationSeconds: number;
15220
+ } | {
15221
+ name: string;
15222
+ isSelf: false;
15223
+ receiver: `0x${string}`;
15224
+ expirationSeconds: number;
15225
+ };
15226
+ type Input$2 = {
15227
+ onSuccess?: () => void;
15228
+ onError?: (error: Error) => void;
15229
+ };
15230
+ declare const useCofheCreatePermit: ({ onSuccess, onError }?: Input$2) => _tanstack_react_query.UseMutationResult<void, Error, CreatePermitArgs, unknown>;
15231
+
15216
15232
  type Input$1 = {
15217
15233
  publicClient?: PublicClient;
15218
15234
  walletClient?: WalletClient;
@@ -15361,4 +15377,4 @@ type Input = {
15361
15377
  };
15362
15378
  declare const useCofheNavigateToCreatePermit: () => ({ cause }?: Input) => void;
15363
15379
 
15364
- export { type ClaimableAmountByTokenAddress, type CofheClientConfig, type CofheContextValue, CofheProvider, type CofheProviderProps, type CofheReactLogger, type CofheReactLoggerMethod, type CofheConfigWithReact as CofhesdkConfigWithReact, type CoingeckoMarketChartPoint, 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, getCofheTokenClaimUnshieldedCallArgs, getCofheTokenShieldCallArgs, getCofheTokenUnshieldCallArgs, statusToString, useCofheActivePermit, useCofheAllPermits, useCofheAutoConnect, useCofheClient, useCofheConnection, useCofheContext, useCofheEnabled, 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 };
15380
+ export { type ClaimableAmountByTokenAddress, type CofheClientConfig, type CofheContextValue, CofheProvider, type CofheProviderProps, type CofheReactLogger, type CofheReactLoggerMethod, type CofheConfigWithReact as CofhesdkConfigWithReact, type CoingeckoMarketChartPoint, 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, getCofheTokenClaimUnshieldedCallArgs, getCofheTokenShieldCallArgs, getCofheTokenUnshieldCallArgs, statusToString, useCofheActivePermit, useCofheAllPermits, useCofheAutoConnect, useCofheClient, useCofheConnection, useCofheContext, useCofheCreatePermit, useCofheEnabled, 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.js CHANGED
@@ -24,6 +24,7 @@ import {
24
24
  useCofheClient,
25
25
  useCofheConnection,
26
26
  useCofheContext,
27
+ useCofheCreatePermit,
27
28
  useCofheEnabled,
28
29
  useCofheEncrypt,
29
30
  useCofheEncryptAndWriteContract,
@@ -52,7 +53,7 @@ import {
52
53
  useTokensWithPublicBalances,
53
54
  useTransactionReceiptsByHash,
54
55
  useTransactionStore
55
- } from "./chunk-N3S7TQY6.js";
56
+ } from "./chunk-C5RYFTRG.js";
56
57
 
57
58
  // src/index.ts
58
59
  import { createCofheClient } from "@cofhe/sdk/web";
@@ -83,6 +84,7 @@ export {
83
84
  useCofheClient,
84
85
  useCofheConnection,
85
86
  useCofheContext,
87
+ useCofheCreatePermit,
86
88
  useCofheEnabled,
87
89
  useCofheEncrypt,
88
90
  useCofheEncryptAndWriteContract,
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"sourcesContent":["// Providers\nexport { CofheProvider, useCofheContext } from './providers/index';\n\n// Hooks\nexport {\n useCofheConnection,\n useCofheEnabled,\n useCofheActivePermit,\n useCofheAllPermits,\n useCofheRemovePermit,\n useCofheSelectPermit,\n useCofhePublicClient,\n useCofheWalletClient,\n useCofheEncrypt,\n useCofheWriteContract,\n useCofheSimulateWriteContract,\n useCofheClient,\n useCofheTokens,\n useCofheTokensWithExistingEncryptedBalances,\n useTokensWithPublicBalances,\n useCofheTokenLists,\n useCofheTokenShield,\n getCofheTokenShieldCallArgs,\n useCofheTokenUnshield,\n getCofheTokenUnshieldCallArgs,\n useCofheTokenClaimUnshielded,\n getCofheTokenClaimUnshieldedCallArgs,\n useCofheTokenClaimable,\n useCofheTokensClaimable,\n useCofheTokenDecryptedBalance,\n useCofheTokenTransfer,\n useTokenAllowance,\n useTransactionReceiptsByHash,\n ETH_ADDRESS_LOWERCASE,\n type Erc20Pair,\n type UnshieldClaim,\n type UnshieldClaimsSummary,\n type UnshieldClaimsSummaryByTokenAddress,\n type ClaimableAmountByTokenAddress,\n type UseTransactionReceiptsByHashInput,\n useCoingeckoUsdPrice,\n type UseCoingeckoUsdPriceInput,\n type UseCoingeckoUsdPriceOptions,\n useCoingeckoContractMarketChartRange,\n type CoingeckoMarketChartPoint,\n type UseCoingeckoContractMarketChartRangeInput,\n type UseCoingeckoContractMarketChartRangeOptions,\n} from '@/hooks/index';\n\nexport { useCofheEncryptAndWriteContract } from '@/hooks/useCofheEncryptAndWriteContract';\nexport { useCofheReadContractAndDecrypt } from '@/hooks/useCofheReadContractAndDecrypt';\n\n// Utils\nexport {\n FheTypesList,\n getBlockExplorerUrl,\n getBlockExplorerTxUrl,\n getBlockExplorerAddressUrl,\n getBlockExplorerTokenUrl,\n formatRelativeTime,\n truncateHash,\n isEthPair,\n isWrappedEthToken,\n} from './utils/index';\n\n// Stores\nexport {\n useTransactionStore,\n TransactionStatus,\n TransactionActionType,\n actionToString,\n statusToString,\n type Transaction,\n type TransactionStore,\n type TransactionStatusString,\n type TransactionActionString,\n} from './stores/transactionStore';\n\nexport { createCofheConfig } from './config';\nexport type { CofheReactLogger, CofheReactLoggerMethod } from './config';\n\n// Types\nexport type { CofheContextValue, CofheProviderProps, CofheClientConfig } from './types/index';\n\nexport { createCofheClient } from '@cofhe/sdk/web';\n\nexport { useCofheNavigateToCreatePermit } from '@/hooks/permits/useCofheNavigateToCreatePermit';\nexport { useCofheAutoConnect } from '@/hooks/useCofheAutoConnect';\n\nexport type { CofheConfigWithReact as CofhesdkConfigWithReact } from './config';\n\nexport type { Token } from './types/token';\n\nexport { useInternalQueryClient } from './providers/index';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoFA,SAAS,yBAAyB;","names":[]}
1
+ {"version":3,"sources":["../src/index.ts"],"sourcesContent":["// Providers\nexport { CofheProvider, useCofheContext } from './providers/index';\n\n// Hooks\nexport {\n useCofheConnection,\n useCofheEnabled,\n useCofheActivePermit,\n useCofheAllPermits,\n useCofheRemovePermit,\n useCofheSelectPermit,\n useCofhePublicClient,\n useCofheWalletClient,\n useCofheEncrypt,\n useCofheWriteContract,\n useCofheSimulateWriteContract,\n useCofheClient,\n useCofheTokens,\n useCofheTokensWithExistingEncryptedBalances,\n useTokensWithPublicBalances,\n useCofheTokenLists,\n useCofheTokenShield,\n getCofheTokenShieldCallArgs,\n useCofheTokenUnshield,\n getCofheTokenUnshieldCallArgs,\n useCofheTokenClaimUnshielded,\n getCofheTokenClaimUnshieldedCallArgs,\n useCofheTokenClaimable,\n useCofheTokensClaimable,\n useCofheTokenDecryptedBalance,\n useCofheTokenTransfer,\n useTokenAllowance,\n useTransactionReceiptsByHash,\n ETH_ADDRESS_LOWERCASE,\n type Erc20Pair,\n type UnshieldClaim,\n type UnshieldClaimsSummary,\n type UnshieldClaimsSummaryByTokenAddress,\n type ClaimableAmountByTokenAddress,\n type UseTransactionReceiptsByHashInput,\n useCoingeckoUsdPrice,\n type UseCoingeckoUsdPriceInput,\n type UseCoingeckoUsdPriceOptions,\n useCoingeckoContractMarketChartRange,\n type CoingeckoMarketChartPoint,\n type UseCoingeckoContractMarketChartRangeInput,\n type UseCoingeckoContractMarketChartRangeOptions,\n} from '@/hooks/index';\n\nexport { useCofheEncryptAndWriteContract } from '@/hooks/useCofheEncryptAndWriteContract';\nexport { useCofheReadContractAndDecrypt } from '@/hooks/useCofheReadContractAndDecrypt';\n\n// Utils\nexport {\n FheTypesList,\n getBlockExplorerUrl,\n getBlockExplorerTxUrl,\n getBlockExplorerAddressUrl,\n getBlockExplorerTokenUrl,\n formatRelativeTime,\n truncateHash,\n isEthPair,\n isWrappedEthToken,\n} from './utils/index';\n\n// Stores\nexport {\n useTransactionStore,\n TransactionStatus,\n TransactionActionType,\n actionToString,\n statusToString,\n type Transaction,\n type TransactionStore,\n type TransactionStatusString,\n type TransactionActionString,\n} from './stores/transactionStore';\n\nexport { createCofheConfig } from './config';\nexport type { CofheReactLogger, CofheReactLoggerMethod } from './config';\n\n// Types\nexport type { CofheContextValue, CofheProviderProps, CofheClientConfig } from './types/index';\n\nexport { createCofheClient } from '@cofhe/sdk/web';\n\nexport { useCofheNavigateToCreatePermit } from '@/hooks/permits/useCofheNavigateToCreatePermit';\nexport { useCofheCreatePermit } from '@/hooks/permits/useCofheCreatePermit';\nexport { useCofheAutoConnect } from '@/hooks/useCofheAutoConnect';\n\nexport type { CofheConfigWithReact as CofhesdkConfigWithReact } from './config';\n\nexport type { Token } from './types/token';\n\nexport { useInternalQueryClient } from './providers/index';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoFA,SAAS,yBAAyB;","names":[]}