@zama-fhe/sdk 3.8.0-beta.2 → 3.8.0-beta.21
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/cjs/alignment.cjs +2 -0
- package/dist/cjs/alignment.cjs.map +1 -0
- package/dist/cjs/base-signer.cjs +1 -1
- package/dist/cjs/base-signer.cjs.map +1 -1
- package/dist/cjs/chains.cjs +1 -1
- package/dist/cjs/chains.cjs.map +1 -1
- package/dist/cjs/cleartext.cjs +1 -1
- package/dist/cjs/cleartext.cjs.map +1 -1
- package/dist/cjs/eip1193-subscribe.cjs +1 -1
- package/dist/cjs/eip1193-subscribe.cjs.map +1 -1
- package/dist/cjs/encryption.cjs.map +1 -1
- package/dist/cjs/ethers/index.cjs +1 -1
- package/dist/cjs/ethers/index.cjs.map +1 -1
- package/dist/cjs/fatal-batch.cjs.map +1 -1
- package/dist/cjs/fhevm-relayer.cjs +2 -2
- package/dist/cjs/fhevm-relayer.cjs.map +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/cjs/internal/index.cjs +1 -1
- package/dist/cjs/internal/index.cjs.map +1 -1
- package/dist/cjs/log-decoding.cjs +2 -0
- package/dist/cjs/log-decoding.cjs.map +1 -0
- package/dist/cjs/node/index.cjs +1 -1
- package/dist/cjs/node/index.cjs.map +1 -1
- package/dist/cjs/query/index.cjs +1 -1
- package/dist/cjs/query/index.cjs.map +1 -1
- package/dist/cjs/query-keys.cjs +2 -0
- package/dist/cjs/query-keys.cjs.map +1 -0
- package/dist/cjs/relayer.cjs +1 -1
- package/dist/cjs/relayer.cjs.map +1 -1
- package/dist/cjs/signing.cjs +1 -1
- package/dist/cjs/signing.cjs.map +1 -1
- package/dist/cjs/telemetry.cjs +1 -1
- package/dist/cjs/telemetry.cjs.map +1 -1
- package/dist/cjs/token.cjs +1 -1
- package/dist/cjs/token.cjs.map +1 -1
- package/dist/cjs/typed-data.cjs +2 -0
- package/dist/cjs/typed-data.cjs.map +1 -0
- package/dist/cjs/validation.cjs.map +1 -1
- package/dist/cjs/vaults/index.cjs +1 -1
- package/dist/cjs/vaults/index.cjs.map +1 -1
- package/dist/cjs/viem/index.cjs +1 -1
- package/dist/cjs/viem/index.cjs.map +1 -1
- package/dist/cjs/web/index.cjs +1 -1
- package/dist/cjs/web/index.cjs.map +1 -1
- package/dist/cjs/wrappers-registry.cjs.map +1 -1
- package/dist/esm/alignment-o-YIndFR.js +2 -0
- package/dist/esm/alignment-o-YIndFR.js.map +1 -0
- package/dist/esm/{base-signer-BxIDBDTF.d.ts → base-signer-nenGJU9U.d.ts} +2 -7
- package/dist/esm/base-signer-p5iz9eeb.js +2 -0
- package/dist/esm/base-signer-p5iz9eeb.js.map +1 -0
- package/dist/esm/chains/index.d.ts +11 -1
- package/dist/esm/chains/index.js +1 -1
- package/dist/esm/chains-BQXSxIwU.js +2 -0
- package/dist/esm/chains-BQXSxIwU.js.map +1 -0
- package/dist/esm/cleartext/index.d.ts +9 -2
- package/dist/esm/cleartext/index.js +1 -1
- package/dist/esm/{cleartext-BnTAN4-g.d.ts → cleartext-BLMLdKFh.d.ts} +2 -5
- package/dist/esm/{cleartext-CvCakQal.js → cleartext-C1Y5zc1Y.js} +2 -2
- package/dist/esm/cleartext-C1Y5zc1Y.js.map +1 -0
- package/dist/esm/{decryption-B0mY2M8N.d.ts → decryption-Cp8calaa.d.ts} +3777 -126
- package/dist/esm/{eip1193-subscribe-CNxVHW6y.js → eip1193-subscribe-DxAQh8dY.js} +2 -2
- package/dist/esm/eip1193-subscribe-DxAQh8dY.js.map +1 -0
- package/dist/esm/{encrypt-worker-client-BW88njEe.d.ts → encrypt-worker-client-CkEIA0Tp.d.ts} +3 -6
- package/dist/esm/encrypt.worker.js +27 -33
- package/dist/esm/{encryption-6AVd-82z.js → encryption-BT886Jlj.js} +2 -2
- package/dist/esm/{encryption-6AVd-82z.js.map → encryption-BT886Jlj.js.map} +1 -1
- package/dist/esm/ethers/index.d.ts +39 -34
- package/dist/esm/ethers/index.js +1 -1
- package/dist/esm/ethers/index.js.map +1 -1
- package/dist/esm/{fatal-batch-BiiS7KdS.js → fatal-batch-BYeHrf0V.js} +2 -2
- package/dist/esm/fatal-batch-BYeHrf0V.js.map +1 -0
- package/dist/esm/fhevm-relayer-BEzN0aev.js +8 -0
- package/dist/esm/fhevm-relayer-BEzN0aev.js.map +1 -0
- package/dist/esm/{index-DXCcwJ77.d.ts → index-CI6f4jxt.d.ts} +7 -10
- package/dist/esm/{index-fsWBYM8S.d.ts → index-ClNBSbRy.d.ts} +7 -11
- package/dist/esm/{index-D1Wtji3m.d.ts → index-ZTcD9b_z.d.ts} +31 -29
- package/dist/esm/index.d.ts +26 -31
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/internal/index.d.ts +14 -15
- package/dist/esm/internal/index.js +1 -1
- package/dist/esm/internal/index.js.map +1 -1
- package/dist/esm/{invalidation-CJ-pzOUG.d.ts → invalidation-IBiMIXGB.d.ts} +1 -4
- package/dist/esm/log-decoding-ZthqwHOv.js +2 -0
- package/dist/esm/log-decoding-ZthqwHOv.js.map +1 -0
- package/dist/esm/node/index.d.ts +12 -4
- package/dist/esm/node/index.js +1 -1
- package/dist/esm/node/index.js.map +1 -1
- package/dist/esm/query/index.d.ts +68 -141
- package/dist/esm/query/index.js +1 -1
- package/dist/esm/query/index.js.map +1 -1
- package/dist/esm/query-keys-CSPxPLBB.js +2 -0
- package/dist/esm/query-keys-CSPxPLBB.js.map +1 -0
- package/dist/esm/relayer-nWfQAlo7.js +2 -0
- package/dist/esm/relayer-nWfQAlo7.js.map +1 -0
- package/dist/esm/{signing-C6nbPCyd.js → signing-CVEOw21I.js} +2 -2
- package/dist/esm/signing-CVEOw21I.js.map +1 -0
- package/dist/esm/telemetry-YFH36F_7.js +2 -0
- package/dist/esm/telemetry-YFH36F_7.js.map +1 -0
- package/dist/esm/token-AXsOIUDB.js +2 -0
- package/dist/esm/token-AXsOIUDB.js.map +1 -0
- package/dist/esm/typed-data-eAgGr9V-.js +2 -0
- package/dist/esm/typed-data-eAgGr9V-.js.map +1 -0
- package/dist/esm/{types-Dc1fpXWt.d.ts → types-D253qkvB.d.ts} +3 -6
- package/dist/esm/{types-C2ccCjoA.d.ts → types-DH06Ap0n.d.ts} +3 -6
- package/dist/esm/{types-CHepK8MK.d.ts → types-Ubeo72FV.d.ts} +57 -41
- package/dist/esm/{validation-ClSvPh6P.js → validation-CZfDLOUh.js} +2 -2
- package/dist/esm/{validation-ClSvPh6P.js.map → validation-CZfDLOUh.js.map} +1 -1
- package/dist/esm/vaults/index.d.ts +247 -13771
- package/dist/esm/vaults/index.js +1 -1
- package/dist/esm/vaults/index.js.map +1 -1
- package/dist/esm/viem/index.d.ts +39 -34
- package/dist/esm/viem/index.js +1 -1
- package/dist/esm/viem/index.js.map +1 -1
- package/dist/esm/web/index.d.ts +13 -7
- package/dist/esm/web/index.js +1 -1
- package/dist/esm/web/index.js.map +1 -1
- package/dist/esm/wrappers-registry-Cm3JJeqx.js.map +1 -1
- package/package.json +2 -2
- package/dist/cjs/applied-runtime.cjs +0 -2
- package/dist/cjs/applied-runtime.cjs.map +0 -1
- package/dist/cjs/erc165.cjs +0 -2
- package/dist/cjs/erc165.cjs.map +0 -1
- package/dist/cjs/invalidation.cjs +0 -2
- package/dist/cjs/invalidation.cjs.map +0 -1
- package/dist/cjs/primitives.cjs +0 -2
- package/dist/cjs/primitives.cjs.map +0 -1
- package/dist/cjs/wrapped-token.cjs +0 -2
- package/dist/cjs/wrapped-token.cjs.map +0 -1
- package/dist/esm/applied-runtime-3fzqBC2V.js +0 -2
- package/dist/esm/applied-runtime-3fzqBC2V.js.map +0 -1
- package/dist/esm/base-signer-BoBsvn5Q.js +0 -2
- package/dist/esm/base-signer-BoBsvn5Q.js.map +0 -1
- package/dist/esm/chains-BwlDI944.js +0 -2
- package/dist/esm/chains-BwlDI944.js.map +0 -1
- package/dist/esm/cleartext-CvCakQal.js.map +0 -1
- package/dist/esm/eip1193-subscribe-CNxVHW6y.js.map +0 -1
- package/dist/esm/erc165-B8gx2luK.js +0 -2
- package/dist/esm/erc165-B8gx2luK.js.map +0 -1
- package/dist/esm/fatal-batch-BiiS7KdS.js.map +0 -1
- package/dist/esm/fhevm-relayer-CGvejcdJ.js +0 -8
- package/dist/esm/fhevm-relayer-CGvejcdJ.js.map +0 -1
- package/dist/esm/index-DkN4q5Cm.d.ts +0 -1
- package/dist/esm/invalidation-BgFjmXeQ.js +0 -2
- package/dist/esm/invalidation-BgFjmXeQ.js.map +0 -1
- package/dist/esm/primitives-Cym-3HKa.js +0 -2
- package/dist/esm/primitives-Cym-3HKa.js.map +0 -1
- package/dist/esm/relayer-C3jVhqSK.js +0 -2
- package/dist/esm/relayer-C3jVhqSK.js.map +0 -1
- package/dist/esm/signing-C6nbPCyd.js.map +0 -1
- package/dist/esm/telemetry-BDnhC-vh.js +0 -2
- package/dist/esm/telemetry-BDnhC-vh.js.map +0 -1
- package/dist/esm/token-g6sinwTx.js +0 -2
- package/dist/esm/token-g6sinwTx.js.map +0 -1
- package/dist/esm/wrapped-token-3usJd0oi.js +0 -2
- package/dist/esm/wrapped-token-3usJd0oi.js.map +0 -1
|
@@ -1,12 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Framework-agnostic TanStack Query building blocks for `@zama-fhe/sdk` —
|
|
3
|
+
* `*QueryOptions` and `*MutationOptions` factories, the {@link zamaQueryKeys}
|
|
4
|
+
* key factory, and the `invalidateAfter*` cache helpers.
|
|
5
|
+
*
|
|
6
|
+
* The hooks in `@zama-fhe/react-sdk` are thin wrappers over these factories.
|
|
7
|
+
* Import from `@zama-fhe/sdk/query` to build your own bindings without a
|
|
8
|
+
* dependency on React.
|
|
9
|
+
*
|
|
10
|
+
* @packageDocumentation
|
|
11
|
+
*/
|
|
12
|
+
import { $t as PreparedPermit, C as Delegations, Kt as ZamaError, Qt as PreparePermitRequest, S as Offline, T as Permits, _ as WrappersRegistryConfig, a as DecryptResult, an as PaginatedResult, b as BatchDecryptAsOptions, c as SignerQueryContext, d as QueryFactoryOptions, f as ZamaSDK, g as WrappersRegistry, h as ListPairsOptions, i as DelegatedDecryptOptions, in as ChecksummedAddress, l as zamaQueryKeys, n as BatchDecryptItem, nn as SerializedTransportKeyPair, o as EncryptedInput, on as TokenWrapperPair, p as ZamaSDKOptions, qt as ZamaErrorCode, r as BatchDecryptResult, rn as SignedPreparedPermit, s as decryptValuesQueryOptions, sn as TokenWrapperPairWithMetadata, t as Decryption, tn as SerializedPermitEip712, u as MutationFactoryOptions, v as WrappedToken, w as DelegationStatus, x as Token, y as BatchBalancesResult } from "../decryption-Cp8calaa.js";
|
|
13
|
+
import { a as invalidateAfterSetOperator, c as invalidateAfterUnshield, d as invalidateAfterWrap, f as invalidateBalanceQueries, i as invalidateAfterApproveUnderlying, l as invalidateAfterUnshieldSettled, m as invalidateWalletLifecycleQueries, n as QueryFilterLike, o as invalidateAfterShield, p as invalidateWagmiBalanceQueries, r as QueryLike, s as invalidateAfterTransfer, t as QueryClientLike, u as invalidateAfterUnwrap } from "../invalidation-IBiMIXGB.js";
|
|
14
|
+
import "../index-CI6f4jxt.js";
|
|
15
|
+
import { $ as RevokeDelegationSubmittedEvent, $t as RawLog, A as WalletAccountListener, At as ConfidentialTransferEvent, B as WriteFunctionName, C as TransferAndCallRequest, Ct as WrapOptions, D as GenericSigner, E as WrapRequest, Et as UnshieldCallbacks, F as ReadContractConfig, G as DecryptStartEvent, H as BaseEvent, I as ReadContractReturnType, It as UnwrapFinalizedEvent, J as EncryptErrorEvent, K as DelegationSubmittedEvent, L as ReadFunctionName, Lt as UnwrapRequestedEvent, M as ContractAbi, Mt as OnChainEvent, N as MulticallReturnType, O as WalletAccount, P as ReadContractArgs, Q as PermitOperation, R as WriteContractArgs, Rt as WrapEvent, S as TransactionKind, St as UnwrapResult, T as UnwrapRequest, Tt as TransferCallbacks, U as DecryptEndEvent, V as ApproveUnderlyingSubmittedEvent, W as DecryptErrorEvent, X as FinalizeUnwrapSubmittedEvent, Y as EncryptStartEvent, Z as PermitErrorEvent, _ as PrepareTransactionRequest, _t as ApprovalStrategy, an as EIP712TypedData, at as TransferSubmittedEvent, b as RevokeDelegationRequest, bt as TransferOptions, c as GenericStorage, cn as EncryptResult, ct as UnshieldPhase2SubmittedEvent, d as ConfidentialTransferFromRequest, en as TransactionReceipt, et as SetOperatorSubmittedEvent, f as ConfidentialTransferRequest, fn as FhevmRelayerOptions, ft as WrapSubmittedEvent, g as PrepareOptions, gn as RelayerSDK, gt as ZamaSDKEvents, h as PrepareFees, hn as RelayerRequestOptions, i as ZamaConfig, it as TransferFromSubmittedEvent, j as WalletAccountStore, k as WalletAccountChange, l as GenericProvider, ln as EncryptedValue, lt as UnwrapSubmittedEvent, m as FinalizeUnwrapRequest, mt as ZamaSDKEventListener, nn as ClearValue, nt as TransactionErrorEvent, on as EncryptInput, ot as UnshieldPhase1SubmittedEvent, p as DelegateDecryptionRequest, pn as FhevmRuntimeConfig, pt as ZamaSDKEvent, q as EncryptEndEvent, rn as DecryptPublicValuesResult, rt as TransactionOperation, s as GenericLogger, sn as EncryptParams, st as UnshieldPhase2StartedEvent, tn as TransactionResult, tt as ShieldSubmittedEvent, u as ApproveUnderlyingRequest, un as FhevmClient, v as PreparedFor, vt as ShieldOptions, w as UnwrapAllRequest, wt as ShieldCallbacks, x as SetOperatorRequest, xt as UnshieldOptions, y as PreparedTransaction, yt as ShieldPath, z as WriteContractConfig } from "../types-Ubeo72FV.js";
|
|
16
|
+
import "../index-ClNBSbRy.js";
|
|
17
|
+
import { f as FheChain, p as FheChainAuth } from "../index-ZTcD9b_z.js";
|
|
8
18
|
import { Address, Hex } from "viem";
|
|
9
|
-
//#region src/query/utils.d.ts
|
|
10
19
|
/** Union of TanStack Query option keys stripped by {@link filterQueryOptions}, leaving only domain parameters. */
|
|
11
20
|
type StrippedQueryOptionKeys = "gcTime" | "staleTime" | "enabled" | "select" | "refetchInterval" | "refetchOnMount" | "refetchOnWindowFocus" | "refetchOnReconnect" | "retry" | "retryDelay" | "retryOnMount" | "queryFn" | "queryKey" | "queryKeyHashFn" | "initialData" | "initialDataUpdatedAt" | "placeholderData" | "structuralSharing" | "throwOnError" | "meta" | "query" | "pollingInterval";
|
|
12
21
|
/**
|
|
@@ -23,7 +32,7 @@ type StrippedQueryOptionKeys = "gcTime" | "staleTime" | "enabled" | "select" | "
|
|
|
23
32
|
* // => { owner: "0xabc" }
|
|
24
33
|
* ```
|
|
25
34
|
*/
|
|
26
|
-
declare function filterQueryOptions<TOptions extends Record<string, unknown>>(options: TOptions): Omit<TOptions, StrippedQueryOptionKeys>;
|
|
35
|
+
export declare function filterQueryOptions<TOptions extends Record<string, unknown>>(options: TOptions): Omit<TOptions, StrippedQueryOptionKeys>;
|
|
27
36
|
/**
|
|
28
37
|
* Stable hash function for query keys.
|
|
29
38
|
* Sorts object keys recursively and converts bigint values to strings.
|
|
@@ -33,9 +42,7 @@ declare function filterQueryOptions<TOptions extends Record<string, unknown>>(op
|
|
|
33
42
|
* the same token when they occupy the same position. This collision is accepted
|
|
34
43
|
* by design for the current query-key conventions in this package.
|
|
35
44
|
*/
|
|
36
|
-
declare function hashFn(queryKey: readonly unknown[]): string;
|
|
37
|
-
//#endregion
|
|
38
|
-
//#region src/query/token-metadata.d.ts
|
|
45
|
+
export declare function hashFn(queryKey: readonly unknown[]): string;
|
|
39
46
|
/** ERC-20 token metadata returned by {@link tokenMetadataQueryOptions}. */
|
|
40
47
|
interface TokenMetadata {
|
|
41
48
|
/** Human-readable token name. */
|
|
@@ -51,29 +58,23 @@ interface TokenMetadataQueryConfig {
|
|
|
51
58
|
query?: Record<string, unknown>;
|
|
52
59
|
}
|
|
53
60
|
/** Builds TanStack Query options for reading an ERC-20 token's name, symbol, and decimals. */
|
|
54
|
-
declare function tokenMetadataQueryOptions(sdk: ZamaSDK, tokenAddress: Address, config?: TokenMetadataQueryConfig): QueryFactoryOptions<TokenMetadata, Error, TokenMetadata, ReturnType<typeof zamaQueryKeys.tokenMetadata.token>>;
|
|
55
|
-
//#endregion
|
|
56
|
-
//#region src/query/is-confidential.d.ts
|
|
61
|
+
export declare function tokenMetadataQueryOptions(sdk: ZamaSDK, tokenAddress: Address, config?: TokenMetadataQueryConfig): QueryFactoryOptions<TokenMetadata, Error, TokenMetadata, ReturnType<typeof zamaQueryKeys.tokenMetadata.token>>;
|
|
57
62
|
/** Configuration for {@link isConfidentialQueryOptions} and {@link isWrapperQueryOptions}. */
|
|
58
63
|
interface IsConfidentialQueryConfig {
|
|
59
64
|
/** Additional TanStack Query options merged into the generated query (e.g. `staleTime`, `enabled`). */
|
|
60
65
|
query?: Record<string, unknown>;
|
|
61
66
|
}
|
|
62
67
|
/** Builds TanStack Query options for reading whether a token address implements the confidential (ERC-7984) token interface. */
|
|
63
|
-
declare function isConfidentialQueryOptions(sdk: ZamaSDK, tokenAddress: Address, config?: IsConfidentialQueryConfig): QueryFactoryOptions<boolean, Error, boolean, ReturnType<typeof zamaQueryKeys.isConfidential.token>>;
|
|
68
|
+
export declare function isConfidentialQueryOptions(sdk: ZamaSDK, tokenAddress: Address, config?: IsConfidentialQueryConfig): QueryFactoryOptions<boolean, Error, boolean, ReturnType<typeof zamaQueryKeys.isConfidential.token>>;
|
|
64
69
|
/** Builds TanStack Query options for reading whether a token address is a confidential wrapper (ERC-7984 wrapper) contract. */
|
|
65
|
-
declare function isWrapperQueryOptions(sdk: ZamaSDK, tokenAddress: Address, config?: IsConfidentialQueryConfig): QueryFactoryOptions<boolean, Error, boolean, ReturnType<typeof zamaQueryKeys.isWrapper.token>>;
|
|
66
|
-
//#endregion
|
|
67
|
-
//#region src/query/total-supply.d.ts
|
|
70
|
+
export declare function isWrapperQueryOptions(sdk: ZamaSDK, tokenAddress: Address, config?: IsConfidentialQueryConfig): QueryFactoryOptions<boolean, Error, boolean, ReturnType<typeof zamaQueryKeys.isWrapper.token>>;
|
|
68
71
|
/** Configuration for {@link totalSupplyQueryOptions}. */
|
|
69
72
|
interface TotalSupplyQueryConfig {
|
|
70
73
|
/** Additional TanStack Query options merged into the generated query (e.g. `staleTime`, `enabled`). */
|
|
71
74
|
query?: Record<string, unknown>;
|
|
72
75
|
}
|
|
73
76
|
/** Builds TanStack Query options for reading a token's total supply. */
|
|
74
|
-
declare function totalSupplyQueryOptions(sdk: ZamaSDK, tokenAddress: Address, config?: TotalSupplyQueryConfig): QueryFactoryOptions<bigint, Error, bigint, ReturnType<typeof zamaQueryKeys.totalSupply.token>>;
|
|
75
|
-
//#endregion
|
|
76
|
-
//#region src/query/wrapper-discovery.d.ts
|
|
77
|
+
export declare function totalSupplyQueryOptions(sdk: ZamaSDK, tokenAddress: Address, config?: TotalSupplyQueryConfig): QueryFactoryOptions<bigint, Error, bigint, ReturnType<typeof zamaQueryKeys.totalSupply.token>>;
|
|
77
78
|
/** Configuration for {@link wrapperDiscoveryQueryOptions}. */
|
|
78
79
|
interface WrapperDiscoveryQueryConfig {
|
|
79
80
|
/**
|
|
@@ -98,9 +99,7 @@ interface WrapperDiscoveryQueryConfig {
|
|
|
98
99
|
query?: Record<string, unknown>;
|
|
99
100
|
}
|
|
100
101
|
/** Builds TanStack Query options for discovering the confidential wrapper address for a given ERC-20 token (resolves to `null` when none is registered). */
|
|
101
|
-
declare function wrapperDiscoveryQueryOptions(registry: WrappersRegistry, config: WrapperDiscoveryQueryConfig): QueryFactoryOptions<Address | null, Error, Address | null, ReturnType<typeof zamaQueryKeys.wrapperDiscovery.token>>;
|
|
102
|
-
//#endregion
|
|
103
|
-
//#region src/query/underlying-allowance.d.ts
|
|
102
|
+
export declare function wrapperDiscoveryQueryOptions(registry: WrappersRegistry, config: WrapperDiscoveryQueryConfig): QueryFactoryOptions<Address | null, Error, Address | null, ReturnType<typeof zamaQueryKeys.wrapperDiscovery.token>>;
|
|
104
103
|
/** Configuration for {@link underlyingAllowanceQueryOptions}. */
|
|
105
104
|
interface UnderlyingAllowanceQueryConfig {
|
|
106
105
|
/** Owner whose underlying-token allowance to read; the query stays disabled until provided. */
|
|
@@ -109,9 +108,7 @@ interface UnderlyingAllowanceQueryConfig {
|
|
|
109
108
|
query?: Record<string, unknown>;
|
|
110
109
|
}
|
|
111
110
|
/** Builds TanStack Query options for reading the ERC-20 allowance the owner has granted a confidential wrapper on its underlying token. */
|
|
112
|
-
declare function underlyingAllowanceQueryOptions(sdk: ZamaSDK, tokenAddress: Address, config: UnderlyingAllowanceQueryConfig): QueryFactoryOptions<bigint, Error, bigint, ReturnType<typeof zamaQueryKeys.underlyingAllowance.scope>>;
|
|
113
|
-
//#endregion
|
|
114
|
-
//#region src/query/pending-unshield.d.ts
|
|
111
|
+
export declare function underlyingAllowanceQueryOptions(sdk: ZamaSDK, tokenAddress: Address, config: UnderlyingAllowanceQueryConfig): QueryFactoryOptions<bigint, Error, bigint, ReturnType<typeof zamaQueryKeys.underlyingAllowance.scope>>;
|
|
115
112
|
/** Configuration for {@link pendingUnshieldQueryOptions}. */
|
|
116
113
|
interface PendingUnshieldQueryConfig {
|
|
117
114
|
/** Additional TanStack Query options merged into the generated query (e.g. `staleTime`, `enabled`). */
|
|
@@ -125,9 +122,7 @@ interface PendingUnshieldQueryConfig {
|
|
|
125
122
|
* `staleTime: 0` so the value reflects storage on mount; the unshield/unwrap
|
|
126
123
|
* mutations also invalidate this key on success.
|
|
127
124
|
*/
|
|
128
|
-
declare function pendingUnshieldQueryOptions(sdk: ZamaSDK, tokenAddress: Address, config?: PendingUnshieldQueryConfig): QueryFactoryOptions<Hex | null, Error, Hex | null, ReturnType<typeof zamaQueryKeys.pendingUnshield.token>>;
|
|
129
|
-
//#endregion
|
|
130
|
-
//#region src/query/confidential-is-operator.d.ts
|
|
125
|
+
export declare function pendingUnshieldQueryOptions(sdk: ZamaSDK, tokenAddress: Address, config?: PendingUnshieldQueryConfig): QueryFactoryOptions<Hex | null, Error, Hex | null, ReturnType<typeof zamaQueryKeys.pendingUnshield.token>>;
|
|
131
126
|
/** Configuration for {@link confidentialIsOperatorQueryOptions}. */
|
|
132
127
|
interface ConfidentialIsOperatorQueryConfig {
|
|
133
128
|
/** Token holder whose operator authorization to check; the query stays disabled until provided. */
|
|
@@ -138,9 +133,7 @@ interface ConfidentialIsOperatorQueryConfig {
|
|
|
138
133
|
query?: Record<string, unknown>;
|
|
139
134
|
}
|
|
140
135
|
/** Builds TanStack Query options for reading whether a spender is an authorized operator of a holder on a confidential token. */
|
|
141
|
-
declare function confidentialIsOperatorQueryOptions(sdk: ZamaSDK, tokenAddress: Address | undefined, config: ConfidentialIsOperatorQueryConfig): QueryFactoryOptions<boolean, Error, boolean, ReturnType<typeof zamaQueryKeys.confidentialIsOperator.scope>>;
|
|
142
|
-
//#endregion
|
|
143
|
-
//#region src/query/confidential-balance.d.ts
|
|
136
|
+
export declare function confidentialIsOperatorQueryOptions(sdk: ZamaSDK, tokenAddress: Address | undefined, config: ConfidentialIsOperatorQueryConfig): QueryFactoryOptions<boolean, Error, boolean, ReturnType<typeof zamaQueryKeys.confidentialIsOperator.scope>>;
|
|
144
137
|
/** Configuration for {@link confidentialBalanceQueryOptions}. */
|
|
145
138
|
interface ConfidentialBalanceQueryConfig {
|
|
146
139
|
/** Address of the confidential token to read the balance of. */
|
|
@@ -151,9 +144,7 @@ interface ConfidentialBalanceQueryConfig {
|
|
|
151
144
|
query?: Record<string, unknown>;
|
|
152
145
|
}
|
|
153
146
|
/** Query options for a single confidential token balance. Auto-gated on `account`. */
|
|
154
|
-
declare function confidentialBalanceQueryOptions(token: Token, config: ConfidentialBalanceQueryConfig, signerContext?: SignerQueryContext): QueryFactoryOptions<bigint, Error, bigint, ReturnType<typeof zamaQueryKeys.confidentialBalance.owner>>;
|
|
155
|
-
//#endregion
|
|
156
|
-
//#region src/query/confidential-balances.d.ts
|
|
147
|
+
export declare function confidentialBalanceQueryOptions(token: Token, config: ConfidentialBalanceQueryConfig, signerContext?: SignerQueryContext): QueryFactoryOptions<bigint, Error, bigint, ReturnType<typeof zamaQueryKeys.confidentialBalance.owner>>;
|
|
157
148
|
/** Configuration for {@link confidentialBalancesQueryOptions}. */
|
|
158
149
|
interface ConfidentialBalancesQueryConfig {
|
|
159
150
|
/** Account whose confidential balances to read; the query stays disabled until provided. */
|
|
@@ -162,9 +153,7 @@ interface ConfidentialBalancesQueryConfig {
|
|
|
162
153
|
query?: Record<string, unknown>;
|
|
163
154
|
}
|
|
164
155
|
/** Builds TanStack Query options for reading the confidential balances of several tokens for one account in a single batch. */
|
|
165
|
-
declare function confidentialBalancesQueryOptions(tokens: Token[], config?: ConfidentialBalancesQueryConfig, signerContext?: SignerQueryContext): QueryFactoryOptions<BatchBalancesResult, Error, BatchBalancesResult, ReturnType<typeof zamaQueryKeys.confidentialBalances.tokens>>;
|
|
166
|
-
//#endregion
|
|
167
|
-
//#region src/query/wrappers-registry.d.ts
|
|
156
|
+
export declare function confidentialBalancesQueryOptions(tokens: Token[], config?: ConfidentialBalancesQueryConfig, signerContext?: SignerQueryContext): QueryFactoryOptions<BatchBalancesResult, Error, BatchBalancesResult, ReturnType<typeof zamaQueryKeys.confidentialBalances.tokens>>;
|
|
168
157
|
/** Base configuration shared by the wrappers-registry query option factories. */
|
|
169
158
|
interface WrappersRegistryQueryConfig {
|
|
170
159
|
/** Registry contract address for the current chain; used as a query key discriminator. */
|
|
@@ -173,23 +162,23 @@ interface WrappersRegistryQueryConfig {
|
|
|
173
162
|
query?: Record<string, unknown>;
|
|
174
163
|
}
|
|
175
164
|
/** Builds TanStack Query options for reading all token wrapper pairs registered in the wrappers registry. */
|
|
176
|
-
declare function tokenPairsQueryOptions(sdk: ZamaSDK, config: WrappersRegistryQueryConfig): QueryFactoryOptions<readonly TokenWrapperPair[], Error, readonly TokenWrapperPair[], ReturnType<typeof zamaQueryKeys.wrappersRegistry.tokenPairs>>;
|
|
165
|
+
export declare function tokenPairsQueryOptions(sdk: ZamaSDK, config: WrappersRegistryQueryConfig): QueryFactoryOptions<readonly TokenWrapperPair[], Error, readonly TokenWrapperPair[], ReturnType<typeof zamaQueryKeys.wrappersRegistry.tokenPairs>>;
|
|
177
166
|
/** Configuration for {@link confidentialTokenAddressQueryOptions}. */
|
|
178
167
|
interface ConfidentialTokenAddressQueryConfig extends WrappersRegistryQueryConfig {
|
|
179
168
|
/** Underlying ERC-20 token address whose confidential counterpart to look up. */
|
|
180
169
|
tokenAddress?: Address;
|
|
181
170
|
}
|
|
182
171
|
/** Builds TanStack Query options for reading the confidential token address registered for a given underlying ERC-20 token. */
|
|
183
|
-
declare function confidentialTokenAddressQueryOptions(sdk: ZamaSDK, config: ConfidentialTokenAddressQueryConfig): QueryFactoryOptions<readonly [boolean, Address], Error, readonly [boolean, Address], ReturnType<typeof zamaQueryKeys.wrappersRegistry.confidentialTokenAddress>>;
|
|
172
|
+
export declare function confidentialTokenAddressQueryOptions(sdk: ZamaSDK, config: ConfidentialTokenAddressQueryConfig): QueryFactoryOptions<readonly [boolean, Address], Error, readonly [boolean, Address], ReturnType<typeof zamaQueryKeys.wrappersRegistry.confidentialTokenAddress>>;
|
|
184
173
|
/** Configuration for {@link tokenAddressQueryOptions}. */
|
|
185
174
|
interface TokenAddressQueryConfig extends WrappersRegistryQueryConfig {
|
|
186
175
|
/** Confidential token address whose underlying ERC-20 counterpart to look up. */
|
|
187
176
|
confidentialTokenAddress?: Address;
|
|
188
177
|
}
|
|
189
178
|
/** Builds TanStack Query options for reading the underlying ERC-20 token address registered for a given confidential token. */
|
|
190
|
-
declare function tokenAddressQueryOptions(sdk: ZamaSDK, config: TokenAddressQueryConfig): QueryFactoryOptions<readonly [boolean, Address], Error, readonly [boolean, Address], ReturnType<typeof zamaQueryKeys.wrappersRegistry.tokenAddress>>;
|
|
179
|
+
export declare function tokenAddressQueryOptions(sdk: ZamaSDK, config: TokenAddressQueryConfig): QueryFactoryOptions<readonly [boolean, Address], Error, readonly [boolean, Address], ReturnType<typeof zamaQueryKeys.wrappersRegistry.tokenAddress>>;
|
|
191
180
|
/** Builds TanStack Query options for reading the total number of token wrapper pairs in the registry. */
|
|
192
|
-
declare function tokenPairsLengthQueryOptions(sdk: ZamaSDK, config: WrappersRegistryQueryConfig): QueryFactoryOptions<bigint, Error, bigint, ReturnType<typeof zamaQueryKeys.wrappersRegistry.tokenPairsLength>>;
|
|
181
|
+
export declare function tokenPairsLengthQueryOptions(sdk: ZamaSDK, config: WrappersRegistryQueryConfig): QueryFactoryOptions<bigint, Error, bigint, ReturnType<typeof zamaQueryKeys.wrappersRegistry.tokenPairsLength>>;
|
|
193
182
|
/** Configuration for {@link tokenPairsSliceQueryOptions}. */
|
|
194
183
|
interface TokenPairsSliceQueryConfig extends WrappersRegistryQueryConfig {
|
|
195
184
|
/** Zero-based index of the first pair in the slice (inclusive). */
|
|
@@ -198,21 +187,21 @@ interface TokenPairsSliceQueryConfig extends WrappersRegistryQueryConfig {
|
|
|
198
187
|
toIndex?: bigint;
|
|
199
188
|
}
|
|
200
189
|
/** Builds TanStack Query options for reading a contiguous slice of the registry's token wrapper pairs. */
|
|
201
|
-
declare function tokenPairsSliceQueryOptions(sdk: ZamaSDK, config: TokenPairsSliceQueryConfig): QueryFactoryOptions<readonly TokenWrapperPair[], Error, readonly TokenWrapperPair[], ReturnType<typeof zamaQueryKeys.wrappersRegistry.tokenPairsSlice>>;
|
|
190
|
+
export declare function tokenPairsSliceQueryOptions(sdk: ZamaSDK, config: TokenPairsSliceQueryConfig): QueryFactoryOptions<readonly TokenWrapperPair[], Error, readonly TokenWrapperPair[], ReturnType<typeof zamaQueryKeys.wrappersRegistry.tokenPairsSlice>>;
|
|
202
191
|
/** Configuration for {@link tokenPairQueryOptions}. */
|
|
203
192
|
interface TokenPairQueryConfig extends WrappersRegistryQueryConfig {
|
|
204
193
|
/** Zero-based index of the token wrapper pair to read. */
|
|
205
194
|
index?: bigint;
|
|
206
195
|
}
|
|
207
196
|
/** Builds TanStack Query options for reading a single token wrapper pair by its index in the registry. */
|
|
208
|
-
declare function tokenPairQueryOptions(sdk: ZamaSDK, config: TokenPairQueryConfig): QueryFactoryOptions<TokenWrapperPair, Error, TokenWrapperPair, ReturnType<typeof zamaQueryKeys.wrappersRegistry.tokenPair>>;
|
|
197
|
+
export declare function tokenPairQueryOptions(sdk: ZamaSDK, config: TokenPairQueryConfig): QueryFactoryOptions<TokenWrapperPair, Error, TokenWrapperPair, ReturnType<typeof zamaQueryKeys.wrappersRegistry.tokenPair>>;
|
|
209
198
|
/** Configuration for {@link isConfidentialTokenValidQueryOptions}. */
|
|
210
199
|
interface IsConfidentialTokenValidQueryConfig extends WrappersRegistryQueryConfig {
|
|
211
200
|
/** Confidential token address to validate against the registry. */
|
|
212
201
|
confidentialTokenAddress?: Address;
|
|
213
202
|
}
|
|
214
203
|
/** Builds TanStack Query options for checking whether a confidential token is registered and valid in the registry. */
|
|
215
|
-
declare function isConfidentialTokenValidQueryOptions(sdk: ZamaSDK, config: IsConfidentialTokenValidQueryConfig): QueryFactoryOptions<boolean, Error, boolean, ReturnType<typeof zamaQueryKeys.wrappersRegistry.isConfidentialTokenValid>>;
|
|
204
|
+
export declare function isConfidentialTokenValidQueryOptions(sdk: ZamaSDK, config: IsConfidentialTokenValidQueryConfig): QueryFactoryOptions<boolean, Error, boolean, ReturnType<typeof zamaQueryKeys.wrappersRegistry.isConfidentialTokenValid>>;
|
|
216
205
|
/** Configuration for {@link listPairsQueryOptions}. */
|
|
217
206
|
interface ListPairsQueryConfig {
|
|
218
207
|
/**
|
|
@@ -238,18 +227,14 @@ interface ListPairsQueryConfig {
|
|
|
238
227
|
* class-level TTL cache is shared across multiple `queryFn` executions. Pass
|
|
239
228
|
* `sdk.registry` (the ZamaSDK lazy singleton) to ensure a single shared cache.
|
|
240
229
|
*/
|
|
241
|
-
declare function listPairsQueryOptions(registry: WrappersRegistry, config: ListPairsQueryConfig): QueryFactoryOptions<PaginatedResult<TokenWrapperPair | TokenWrapperPairWithMetadata>, Error, PaginatedResult<TokenWrapperPair | TokenWrapperPairWithMetadata>, ReturnType<typeof zamaQueryKeys.wrappersRegistry.listPairs>>;
|
|
242
|
-
//#endregion
|
|
243
|
-
//#region src/query/shield.d.ts
|
|
230
|
+
export declare function listPairsQueryOptions(registry: WrappersRegistry, config: ListPairsQueryConfig): QueryFactoryOptions<PaginatedResult<TokenWrapperPair | TokenWrapperPairWithMetadata>, Error, PaginatedResult<TokenWrapperPair | TokenWrapperPairWithMetadata>, ReturnType<typeof zamaQueryKeys.wrappersRegistry.listPairs>>;
|
|
244
231
|
/** Variables for {@link shieldMutationOptions}. */
|
|
245
232
|
interface ShieldParams extends ShieldOptions {
|
|
246
233
|
/** Amount of the public ERC-20 to shield, in the token's base units. */
|
|
247
234
|
amount: bigint;
|
|
248
235
|
}
|
|
249
236
|
/** Builds TanStack Query mutation options for {@link WrappedToken.shield | shielding} a public ERC-20 into its confidential form. @see {@link ShieldParams} */
|
|
250
|
-
declare function shieldMutationOptions(token: WrappedToken): MutationFactoryOptions<readonly ["zama.shield", Address], ShieldParams, TransactionResult>;
|
|
251
|
-
//#endregion
|
|
252
|
-
//#region src/query/transfer.d.ts
|
|
237
|
+
export declare function shieldMutationOptions(token: WrappedToken): MutationFactoryOptions<readonly ["zama.shield", Address], ShieldParams, TransactionResult>;
|
|
253
238
|
/** Variables for {@link confidentialTransferMutationOptions}. */
|
|
254
239
|
interface ConfidentialTransferParams extends TransferOptions {
|
|
255
240
|
/** Recipient address. */
|
|
@@ -258,9 +243,7 @@ interface ConfidentialTransferParams extends TransferOptions {
|
|
|
258
243
|
amount: bigint;
|
|
259
244
|
}
|
|
260
245
|
/** Builds TanStack Query mutation options for {@link Token.confidentialTransfer | transferring} confidential tokens. @see {@link ConfidentialTransferParams} */
|
|
261
|
-
declare function confidentialTransferMutationOptions(token: Token): MutationFactoryOptions<readonly ["zama.confidentialTransfer", Address], ConfidentialTransferParams, TransactionResult>;
|
|
262
|
-
//#endregion
|
|
263
|
-
//#region src/query/transfer-and-call.d.ts
|
|
246
|
+
export declare function confidentialTransferMutationOptions(token: Token): MutationFactoryOptions<readonly ["zama.confidentialTransfer", Address], ConfidentialTransferParams, TransactionResult>;
|
|
264
247
|
/** Variables for {@link confidentialTransferAndCallMutationOptions}. */
|
|
265
248
|
interface ConfidentialTransferAndCallParams extends TransferOptions {
|
|
266
249
|
/** Recipient address. */
|
|
@@ -271,9 +254,7 @@ interface ConfidentialTransferAndCallParams extends TransferOptions {
|
|
|
271
254
|
data: Hex;
|
|
272
255
|
}
|
|
273
256
|
/** Builds TanStack Query mutation options for {@link Token.confidentialTransferAndCall | transferring} confidential tokens and invoking the recipient's receiver hook. @see {@link ConfidentialTransferAndCallParams} */
|
|
274
|
-
declare function confidentialTransferAndCallMutationOptions(token: Token): MutationFactoryOptions<readonly ["zama.confidentialTransferAndCall", Address], ConfidentialTransferAndCallParams, TransactionResult>;
|
|
275
|
-
//#endregion
|
|
276
|
-
//#region src/query/transfer-from.d.ts
|
|
257
|
+
export declare function confidentialTransferAndCallMutationOptions(token: Token): MutationFactoryOptions<readonly ["zama.confidentialTransferAndCall", Address], ConfidentialTransferAndCallParams, TransactionResult>;
|
|
277
258
|
/** Variables for {@link confidentialTransferFromMutationOptions}. */
|
|
278
259
|
interface ConfidentialTransferFromParams {
|
|
279
260
|
/** Address to transfer from. */
|
|
@@ -286,9 +267,7 @@ interface ConfidentialTransferFromParams {
|
|
|
286
267
|
callbacks?: TransferCallbacks;
|
|
287
268
|
}
|
|
288
269
|
/** Builds TanStack Query mutation options for {@link Token.confidentialTransferFrom | transferring} confidential tokens from another account (operator flow). @see {@link ConfidentialTransferFromParams} */
|
|
289
|
-
declare function confidentialTransferFromMutationOptions(token: Token): MutationFactoryOptions<readonly ["zama.confidentialTransferFrom", Address], ConfidentialTransferFromParams, TransactionResult>;
|
|
290
|
-
//#endregion
|
|
291
|
-
//#region src/query/transfer-from-and-call.d.ts
|
|
270
|
+
export declare function confidentialTransferFromMutationOptions(token: Token): MutationFactoryOptions<readonly ["zama.confidentialTransferFrom", Address], ConfidentialTransferFromParams, TransactionResult>;
|
|
292
271
|
/** Variables for {@link confidentialTransferFromAndCallMutationOptions}. */
|
|
293
272
|
interface ConfidentialTransferFromAndCallParams {
|
|
294
273
|
/** Address to transfer from. */
|
|
@@ -303,9 +282,7 @@ interface ConfidentialTransferFromAndCallParams {
|
|
|
303
282
|
callbacks?: TransferCallbacks;
|
|
304
283
|
}
|
|
305
284
|
/** Builds TanStack Query mutation options for {@link Token.confidentialTransferFromAndCall | transferring} confidential tokens from another account and invoking the recipient's receiver hook. @see {@link ConfidentialTransferFromAndCallParams} */
|
|
306
|
-
declare function confidentialTransferFromAndCallMutationOptions(token: Token): MutationFactoryOptions<readonly ["zama.confidentialTransferFromAndCall", Address], ConfidentialTransferFromAndCallParams, TransactionResult>;
|
|
307
|
-
//#endregion
|
|
308
|
-
//#region src/query/set-operator.d.ts
|
|
285
|
+
export declare function confidentialTransferFromAndCallMutationOptions(token: Token): MutationFactoryOptions<readonly ["zama.confidentialTransferFromAndCall", Address], ConfidentialTransferFromAndCallParams, TransactionResult>;
|
|
309
286
|
/** Variables for {@link confidentialSetOperatorMutationOptions}. */
|
|
310
287
|
interface ConfidentialSetOperatorParams {
|
|
311
288
|
/** Operator address to authorize. */
|
|
@@ -314,77 +291,57 @@ interface ConfidentialSetOperatorParams {
|
|
|
314
291
|
until?: number;
|
|
315
292
|
}
|
|
316
293
|
/** Builds TanStack Query mutation options for {@link Token.setOperator | authorizing} an operator on a confidential token. @see {@link ConfidentialSetOperatorParams} */
|
|
317
|
-
declare function confidentialSetOperatorMutationOptions(token: Token): MutationFactoryOptions<readonly ["zama.confidentialSetOperator", Address], ConfidentialSetOperatorParams, TransactionResult>;
|
|
318
|
-
//#endregion
|
|
319
|
-
//#region src/query/approve-underlying.d.ts
|
|
294
|
+
export declare function confidentialSetOperatorMutationOptions(token: Token): MutationFactoryOptions<readonly ["zama.confidentialSetOperator", Address], ConfidentialSetOperatorParams, TransactionResult>;
|
|
320
295
|
/** Variables for {@link approveUnderlyingMutationOptions}. */
|
|
321
296
|
interface ApproveUnderlyingParams {
|
|
322
297
|
/** Amount of the underlying ERC-20 to approve, in its base units; omit for a max approval. */
|
|
323
298
|
amount?: bigint;
|
|
324
299
|
}
|
|
325
300
|
/** Builds TanStack Query mutation options for {@link WrappedToken.approveUnderlying | approving} the wrapper to spend the underlying ERC-20. @see {@link ApproveUnderlyingParams} */
|
|
326
|
-
declare function approveUnderlyingMutationOptions(token: WrappedToken): MutationFactoryOptions<readonly ["zama.approveUnderlying", Address], ApproveUnderlyingParams, TransactionResult>;
|
|
327
|
-
//#endregion
|
|
328
|
-
//#region src/query/unshield.d.ts
|
|
301
|
+
export declare function approveUnderlyingMutationOptions(token: WrappedToken): MutationFactoryOptions<readonly ["zama.approveUnderlying", Address], ApproveUnderlyingParams, TransactionResult>;
|
|
329
302
|
/** Variables for {@link unshieldMutationOptions}. */
|
|
330
303
|
interface UnshieldParams extends UnshieldOptions {
|
|
331
304
|
/** Amount of tokens to unshield, in the token's base units. */
|
|
332
305
|
amount: bigint;
|
|
333
306
|
}
|
|
334
307
|
/** Builds TanStack Query mutation options for {@link WrappedToken.unshield | unshielding} a confidential token back into its public ERC-20. @see {@link UnshieldParams} */
|
|
335
|
-
declare function unshieldMutationOptions(token: WrappedToken): MutationFactoryOptions<readonly ["zama.unshield", Address], UnshieldParams, TransactionResult>;
|
|
336
|
-
//#endregion
|
|
337
|
-
//#region src/query/unshield-all.d.ts
|
|
308
|
+
export declare function unshieldMutationOptions(token: WrappedToken): MutationFactoryOptions<readonly ["zama.unshield", Address], UnshieldParams, TransactionResult>;
|
|
338
309
|
/** Variables for {@link unshieldAllMutationOptions}. */
|
|
339
310
|
interface UnshieldAllParams extends UnshieldCallbacks {}
|
|
340
311
|
/** Builds TanStack Query mutation options for {@link WrappedToken.unshieldAll | unshielding} the entire confidential balance back into the public ERC-20. @see {@link UnshieldAllParams} */
|
|
341
|
-
declare function unshieldAllMutationOptions(token: WrappedToken): MutationFactoryOptions<readonly ["zama.unshieldAll", Address], UnshieldAllParams | void, TransactionResult>;
|
|
342
|
-
//#endregion
|
|
343
|
-
//#region src/query/resume-unshield.d.ts
|
|
312
|
+
export declare function unshieldAllMutationOptions(token: WrappedToken): MutationFactoryOptions<readonly ["zama.unshieldAll", Address], UnshieldAllParams | void, TransactionResult>;
|
|
344
313
|
/** Variables for {@link resumeUnshieldMutationOptions}. */
|
|
345
314
|
interface ResumeUnshieldParams extends UnshieldCallbacks {
|
|
346
315
|
/** Hash of the earlier unwrap request transaction to resume from. */
|
|
347
316
|
unwrapTxHash: Hex;
|
|
348
317
|
}
|
|
349
318
|
/** Builds TanStack Query mutation options for {@link WrappedToken.resumeUnshield | resuming} an interrupted unshield from its unwrap request transaction. @see {@link ResumeUnshieldParams} */
|
|
350
|
-
declare function resumeUnshieldMutationOptions(token: WrappedToken): MutationFactoryOptions<readonly ["zama.resumeUnshield", Address], ResumeUnshieldParams, TransactionResult>;
|
|
351
|
-
//#endregion
|
|
352
|
-
//#region src/query/unwrap.d.ts
|
|
319
|
+
export declare function resumeUnshieldMutationOptions(token: WrappedToken): MutationFactoryOptions<readonly ["zama.resumeUnshield", Address], ResumeUnshieldParams, TransactionResult>;
|
|
353
320
|
/** Variables for {@link unwrapMutationOptions}. */
|
|
354
321
|
interface UnwrapParams {
|
|
355
322
|
/** Amount of tokens to unwrap, in the token's base units. */
|
|
356
323
|
amount: bigint;
|
|
357
324
|
}
|
|
358
325
|
/** Builds TanStack Query mutation options for {@link WrappedToken.unwrap | unwrapping} a confidential token (request phase of the two-phase unwrap). @see {@link UnwrapParams} */
|
|
359
|
-
declare function unwrapMutationOptions(token: WrappedToken): MutationFactoryOptions<readonly ["zama.unwrap", Address], UnwrapParams, UnwrapResult>;
|
|
360
|
-
//#endregion
|
|
361
|
-
//#region src/query/wrap.d.ts
|
|
326
|
+
export declare function unwrapMutationOptions(token: WrappedToken): MutationFactoryOptions<readonly ["zama.unwrap", Address], UnwrapParams, UnwrapResult>;
|
|
362
327
|
/** Variables for {@link wrapMutationOptions}. */
|
|
363
328
|
interface WrapParams extends WrapOptions {
|
|
364
329
|
/** Amount of the public ERC-20 to wrap, in the token's base units. */
|
|
365
330
|
amount: bigint;
|
|
366
331
|
}
|
|
367
332
|
/** Builds TanStack Query mutation options for {@link WrappedToken.wrap | wrapping} a public ERC-20 into its confidential form. @see {@link WrapParams} */
|
|
368
|
-
declare function wrapMutationOptions(token: WrappedToken): MutationFactoryOptions<readonly ["zama.wrap", Address], WrapParams, TransactionResult>;
|
|
369
|
-
//#endregion
|
|
370
|
-
//#region src/query/unwrap-all.d.ts
|
|
333
|
+
export declare function wrapMutationOptions(token: WrappedToken): MutationFactoryOptions<readonly ["zama.wrap", Address], WrapParams, TransactionResult>;
|
|
371
334
|
/** Builds TanStack Query mutation options for {@link WrappedToken.unwrapAll | unwrapping} the entire confidential balance. */
|
|
372
|
-
declare function unwrapAllMutationOptions(token: WrappedToken): MutationFactoryOptions<readonly ["zama.unwrapAll", Address], void, UnwrapResult>;
|
|
373
|
-
//#endregion
|
|
374
|
-
//#region src/query/finalize-unwrap.d.ts
|
|
335
|
+
export declare function unwrapAllMutationOptions(token: WrappedToken): MutationFactoryOptions<readonly ["zama.unwrapAll", Address], void, UnwrapResult>;
|
|
375
336
|
/** Variables for {@link finalizeUnwrapMutationOptions}. */
|
|
376
337
|
type FinalizeUnwrapParams = {
|
|
377
338
|
/** Identifier from an `UnwrapRequested` event. */
|
|
378
339
|
unwrapRequestId: EncryptedValue;
|
|
379
340
|
};
|
|
380
341
|
/** Builds TanStack Query mutation options for {@link WrappedToken.finalizeUnwrap | finalizing} a previously requested unwrap. @see {@link FinalizeUnwrapParams} */
|
|
381
|
-
declare function finalizeUnwrapMutationOptions(token: WrappedToken): MutationFactoryOptions<readonly ["zama.finalizeUnwrap", Address], FinalizeUnwrapParams, TransactionResult>;
|
|
382
|
-
//#endregion
|
|
383
|
-
//#region src/query/encrypt.d.ts
|
|
342
|
+
export declare function finalizeUnwrapMutationOptions(token: WrappedToken): MutationFactoryOptions<readonly ["zama.finalizeUnwrap", Address], FinalizeUnwrapParams, TransactionResult>;
|
|
384
343
|
/** Builds TanStack Query mutation options for {@link ZamaSDK.encrypt | encrypting} plaintext inputs into an encrypted payload. */
|
|
385
|
-
declare function encryptMutationOptions(sdk: ZamaSDK): MutationFactoryOptions<readonly ["zama.encrypt"], EncryptParams, EncryptResult>;
|
|
386
|
-
//#endregion
|
|
387
|
-
//#region src/query/delegated-decrypt.d.ts
|
|
344
|
+
export declare function encryptMutationOptions(sdk: ZamaSDK): MutationFactoryOptions<readonly ["zama.encrypt"], EncryptParams, EncryptResult>;
|
|
388
345
|
/** Variables for {@link delegatedDecryptValuesMutationOptions}. */
|
|
389
346
|
interface DelegatedDecryptValuesMutationParams {
|
|
390
347
|
/** Encrypted values (with their contract addresses) to decrypt. */
|
|
@@ -393,35 +350,21 @@ interface DelegatedDecryptValuesMutationParams {
|
|
|
393
350
|
delegatorAddress: Address;
|
|
394
351
|
}
|
|
395
352
|
/** Builds TanStack Query mutation options for {@link Decryption.delegatedDecryptValues | decrypting} encrypted values via delegated decryption credentials. @see {@link DelegatedDecryptValuesMutationParams} */
|
|
396
|
-
declare function delegatedDecryptValuesMutationOptions(sdk: ZamaSDK): MutationFactoryOptions<readonly ["zama.delegatedDecryptValues"], DelegatedDecryptValuesMutationParams, Readonly<Record<EncryptedValue, ClearValue>>>;
|
|
397
|
-
//#endregion
|
|
398
|
-
//#region src/query/public-decrypt.d.ts
|
|
353
|
+
export declare function delegatedDecryptValuesMutationOptions(sdk: ZamaSDK): MutationFactoryOptions<readonly ["zama.delegatedDecryptValues"], DelegatedDecryptValuesMutationParams, Readonly<Record<EncryptedValue, ClearValue>>>;
|
|
399
354
|
/** Builds TanStack Query mutation options for {@link Decryption.decryptPublicValues | publicly decrypting} encrypted values, caching each clear result. */
|
|
400
|
-
declare function decryptPublicValuesMutationOptions(sdk: ZamaSDK): MutationFactoryOptions<readonly ["zama.decryptPublicValues"], EncryptedValue[], DecryptPublicValuesResult>;
|
|
401
|
-
//#endregion
|
|
402
|
-
//#region src/query/grant-permit.d.ts
|
|
355
|
+
export declare function decryptPublicValuesMutationOptions(sdk: ZamaSDK): MutationFactoryOptions<readonly ["zama.decryptPublicValues"], EncryptedValue[], DecryptPublicValuesResult>;
|
|
403
356
|
/** Builds TanStack Query mutation options for {@link Permits.grantPermit | granting} decryption permits for the given contract addresses. */
|
|
404
|
-
declare function grantPermitMutationOptions(sdk: ZamaSDK): MutationFactoryOptions<readonly ["zama.grantPermit"], Address[], void>;
|
|
405
|
-
//#endregion
|
|
406
|
-
//#region src/query/prepare-permit.d.ts
|
|
357
|
+
export declare function grantPermitMutationOptions(sdk: ZamaSDK): MutationFactoryOptions<readonly ["zama.grantPermit"], Address[], void>;
|
|
407
358
|
/** Builds TanStack Query mutation options for {@link Offline.preparePermit | preparing} an offline decryption permit. */
|
|
408
|
-
declare function preparePermitMutationOptions(sdk: ZamaSDK): MutationFactoryOptions<readonly ["zama.preparePermit"], PreparePermitRequest, PreparedPermit>;
|
|
409
|
-
//#endregion
|
|
410
|
-
//#region src/query/batch-prepare-permits.d.ts
|
|
359
|
+
export declare function preparePermitMutationOptions(sdk: ZamaSDK): MutationFactoryOptions<readonly ["zama.preparePermit"], PreparePermitRequest, PreparedPermit>;
|
|
411
360
|
/** Builds TanStack Query mutation options for {@link Offline.batchPreparePermits | preparing} a batch of offline decryption permits. */
|
|
412
|
-
declare function batchPreparePermitsMutationOptions(sdk: ZamaSDK): MutationFactoryOptions<readonly ["zama.batchPreparePermits"], PreparePermitRequest, PreparedPermit[]>;
|
|
413
|
-
//#endregion
|
|
414
|
-
//#region src/query/register-permit.d.ts
|
|
361
|
+
export declare function batchPreparePermitsMutationOptions(sdk: ZamaSDK): MutationFactoryOptions<readonly ["zama.batchPreparePermits"], PreparePermitRequest, PreparedPermit[]>;
|
|
415
362
|
/** Parameters for {@link registerPermitMutationOptions}. */
|
|
416
363
|
type RegisterPermitParams = SignedPreparedPermit;
|
|
417
364
|
/** Builds TanStack Query mutation options for {@link Permits.registerPermit | registering} a signed offline permit. */
|
|
418
|
-
declare function registerPermitMutationOptions(sdk: ZamaSDK): MutationFactoryOptions<readonly ["zama.registerPermit"], RegisterPermitParams, void>;
|
|
419
|
-
//#endregion
|
|
420
|
-
//#region src/query/batch-register-permits.d.ts
|
|
365
|
+
export declare function registerPermitMutationOptions(sdk: ZamaSDK): MutationFactoryOptions<readonly ["zama.registerPermit"], RegisterPermitParams, void>;
|
|
421
366
|
/** Builds TanStack Query mutation options for {@link Permits.batchRegisterPermits | registering} a list of signed offline permits. */
|
|
422
|
-
declare function batchRegisterPermitsMutationOptions(sdk: ZamaSDK): MutationFactoryOptions<readonly ["zama.batchRegisterPermits"], readonly SignedPreparedPermit[], void>;
|
|
423
|
-
//#endregion
|
|
424
|
-
//#region src/query/has-permit.d.ts
|
|
367
|
+
export declare function batchRegisterPermitsMutationOptions(sdk: ZamaSDK): MutationFactoryOptions<readonly ["zama.batchRegisterPermits"], readonly SignedPreparedPermit[], void>;
|
|
425
368
|
/** Configuration for {@link hasPermitQueryOptions}. */
|
|
426
369
|
interface HasPermitQueryConfig {
|
|
427
370
|
/** Contract addresses to check credentials against. */
|
|
@@ -434,17 +377,11 @@ interface HasPermitQueryConfig {
|
|
|
434
377
|
query?: Record<string, unknown>;
|
|
435
378
|
}
|
|
436
379
|
/** Builds TanStack Query options for reading whether the connected wallet holds a valid decryption permit for the given contracts. */
|
|
437
|
-
declare function hasPermitQueryOptions(sdk: ZamaSDK, config: HasPermitQueryConfig, signerContext?: SignerQueryContext): QueryFactoryOptions<boolean, Error, boolean, ReturnType<typeof zamaQueryKeys.hasPermit.scope>>;
|
|
438
|
-
//#endregion
|
|
439
|
-
//#region src/query/revoke-permits.d.ts
|
|
380
|
+
export declare function hasPermitQueryOptions(sdk: ZamaSDK, config: HasPermitQueryConfig, signerContext?: SignerQueryContext): QueryFactoryOptions<boolean, Error, boolean, ReturnType<typeof zamaQueryKeys.hasPermit.scope>>;
|
|
440
381
|
/** TanStack Query mutation factory for {@link Permits.revokePermits}. */
|
|
441
|
-
declare function revokePermitsMutationOptions(sdk: ZamaSDK): MutationFactoryOptions<readonly ["zama.revokePermits"], Address[] | void, void>;
|
|
442
|
-
//#endregion
|
|
443
|
-
//#region src/query/clear-credentials.d.ts
|
|
382
|
+
export declare function revokePermitsMutationOptions(sdk: ZamaSDK): MutationFactoryOptions<readonly ["zama.revokePermits"], Address[] | void, void>;
|
|
444
383
|
/** TanStack Query mutation factory for {@link Permits.clear}. */
|
|
445
|
-
declare function clearCredentialsMutationOptions(sdk: ZamaSDK): MutationFactoryOptions<readonly ["zama.clearCredentials"], void, void>;
|
|
446
|
-
//#endregion
|
|
447
|
-
//#region src/query/delegate-decryption.d.ts
|
|
384
|
+
export declare function clearCredentialsMutationOptions(sdk: ZamaSDK): MutationFactoryOptions<readonly ["zama.clearCredentials"], void, void>;
|
|
448
385
|
/** Variables for {@link delegateDecryptionMutationOptions}. */
|
|
449
386
|
interface DelegateDecryptionParams {
|
|
450
387
|
/** Address to grant delegated decryption rights to. */
|
|
@@ -453,9 +390,7 @@ interface DelegateDecryptionParams {
|
|
|
453
390
|
expirationDate?: Date;
|
|
454
391
|
}
|
|
455
392
|
/** Builds TanStack Query mutation options for {@link Delegations.delegateDecryption | granting} delegated decryption rights on a contract. @see {@link DelegateDecryptionParams} */
|
|
456
|
-
declare function delegateDecryptionMutationOptions(sdk: ZamaSDK, contractAddress: Address): MutationFactoryOptions<readonly ["zama.delegateDecryption", Address], DelegateDecryptionParams, TransactionResult>;
|
|
457
|
-
//#endregion
|
|
458
|
-
//#region src/query/decrypt-balance-as.d.ts
|
|
393
|
+
export declare function delegateDecryptionMutationOptions(sdk: ZamaSDK, contractAddress: Address): MutationFactoryOptions<readonly ["zama.delegateDecryption", Address], DelegateDecryptionParams, TransactionResult>;
|
|
459
394
|
/** Variables for {@link decryptBalanceAsMutationOptions}. */
|
|
460
395
|
interface DecryptBalanceAsParams {
|
|
461
396
|
/** Address of the account that delegated decryption rights to the connected wallet. */
|
|
@@ -464,24 +399,18 @@ interface DecryptBalanceAsParams {
|
|
|
464
399
|
accountAddress?: Address;
|
|
465
400
|
}
|
|
466
401
|
/** Builds TanStack Query mutation options for {@link Token.decryptBalanceAs | decrypting} a balance via delegated decryption credentials. @see {@link DecryptBalanceAsParams} */
|
|
467
|
-
declare function decryptBalanceAsMutationOptions(token: Token): MutationFactoryOptions<readonly ["zama.decryptBalanceAs", Address], DecryptBalanceAsParams, bigint>;
|
|
468
|
-
//#endregion
|
|
469
|
-
//#region src/query/batch-decrypt-balances-as.d.ts
|
|
402
|
+
export declare function decryptBalanceAsMutationOptions(token: Token): MutationFactoryOptions<readonly ["zama.decryptBalanceAs", Address], DecryptBalanceAsParams, bigint>;
|
|
470
403
|
/** Variables for {@link batchDecryptBalancesAsMutationOptions}. */
|
|
471
404
|
type BatchDecryptBalancesAsParams = BatchDecryptAsOptions;
|
|
472
405
|
/** Builds TanStack Query mutation options for {@link Token.batchDecryptBalancesAs | decrypting} multiple token balances via delegated decryption credentials. @see {@link BatchDecryptBalancesAsParams} */
|
|
473
|
-
declare function batchDecryptBalancesAsMutationOptions(tokens: Token[]): MutationFactoryOptions<readonly ["zama.batchDecryptBalancesAs", ...Address[]], BatchDecryptBalancesAsParams, Map<Address, bigint>>;
|
|
474
|
-
//#endregion
|
|
475
|
-
//#region src/query/revoke-delegation.d.ts
|
|
406
|
+
export declare function batchDecryptBalancesAsMutationOptions(tokens: Token[]): MutationFactoryOptions<readonly ["zama.batchDecryptBalancesAs", ...Address[]], BatchDecryptBalancesAsParams, Map<Address, bigint>>;
|
|
476
407
|
/** Variables for {@link revokeDelegationMutationOptions}. */
|
|
477
408
|
interface RevokeDelegationParams {
|
|
478
409
|
/** Address whose delegated decryption rights to revoke. */
|
|
479
410
|
delegateAddress: Address;
|
|
480
411
|
}
|
|
481
412
|
/** Builds TanStack Query mutation options for {@link Delegations.revokeDelegation | revoking} delegated decryption rights on a contract. @see {@link RevokeDelegationParams} */
|
|
482
|
-
declare function revokeDelegationMutationOptions(sdk: ZamaSDK, contractAddress: Address): MutationFactoryOptions<readonly ["zama.revokeDelegation", Address], RevokeDelegationParams, TransactionResult>;
|
|
483
|
-
//#endregion
|
|
484
|
-
//#region src/query/delegation-status.d.ts
|
|
413
|
+
export declare function revokeDelegationMutationOptions(sdk: ZamaSDK, contractAddress: Address): MutationFactoryOptions<readonly ["zama.revokeDelegation", Address], RevokeDelegationParams, TransactionResult>;
|
|
485
414
|
/** Configuration for {@link delegationStatusQueryOptions}. */
|
|
486
415
|
interface DelegationStatusQueryConfig {
|
|
487
416
|
/** Contract the delegation applies to; pass `undefined` to keep the query disabled. */
|
|
@@ -494,7 +423,5 @@ interface DelegationStatusQueryConfig {
|
|
|
494
423
|
query?: Record<string, unknown>;
|
|
495
424
|
}
|
|
496
425
|
/** Builds TanStack Query options for reading the decryption-delegation status between a delegator and a delegate on a contract. */
|
|
497
|
-
declare function delegationStatusQueryOptions(sdk: ZamaSDK, config: DelegationStatusQueryConfig): QueryFactoryOptions<DelegationStatus, Error, DelegationStatus, ReturnType<typeof zamaQueryKeys.delegationStatus.scope>>;
|
|
498
|
-
|
|
499
|
-
export { type ApprovalStrategy, type ApproveUnderlyingParams, type ApproveUnderlyingRequest, type ApproveUnderlyingSubmittedEvent, type BaseEvent, type BatchBalancesResult, type BatchDecryptAsOptions, type BatchDecryptBalancesAsParams, type BatchDecryptItem, type BatchDecryptResult, type ChecksummedAddress, type ClearValue, type ConfidentialBalanceQueryConfig, type ConfidentialBalancesQueryConfig, type ConfidentialIsOperatorQueryConfig, type ConfidentialSetOperatorParams, type ConfidentialTokenAddressQueryConfig, type ConfidentialTransferAndCallParams, type ConfidentialTransferEvent, type ConfidentialTransferFromAndCallParams, type ConfidentialTransferFromParams, type ConfidentialTransferFromRequest, type ConfidentialTransferParams, type ConfidentialTransferRequest, type ContractAbi, type DecryptBalanceAsParams, type DecryptEndEvent, type DecryptErrorEvent, type EncryptedInput as DecryptInput, type DecryptPublicValuesResult, type DecryptResult, type DecryptStartEvent, type Decryption, type DelegateDecryptionParams, type DelegateDecryptionRequest, type DelegatedDecryptOptions, type DelegatedDecryptValuesMutationParams, type DelegationStatus, type DelegationStatusQueryConfig, type DelegationSubmittedEvent, type Delegations, type EIP712TypedData, type EncryptEndEvent, type EncryptErrorEvent, type EncryptInput, type EncryptParams, type EncryptResult, type EncryptStartEvent, type EncryptedValue, type FheChain, type FheChainAuth, type FhevmClient, type FhevmRelayerOptions, type FhevmRuntimeConfig, type FinalizeUnwrapParams, type FinalizeUnwrapRequest, type FinalizeUnwrapSubmittedEvent, type GenericLogger, type GenericProvider, type GenericSigner, type GenericStorage, type HasPermitQueryConfig, type IsConfidentialQueryConfig, type IsConfidentialTokenValidQueryConfig, type ListPairsOptions, type ListPairsQueryConfig, type MutationFactoryOptions, type Offline, type OnChainEvent, type PaginatedResult, type PendingUnshieldQueryConfig, type PermitErrorEvent, type PermitOperation, type Permits, type PrepareFees, type PrepareOptions, type PreparePermitRequest, type PrepareTransactionRequest, type PreparedFor, type PreparedPermit, type PreparedTransaction, type QueryClientLike, type QueryFactoryOptions, type QueryFilterLike, type QueryLike, type RawLog, type ReadContractArgs, type ReadContractConfig, type ReadContractReturnType, type ReadFunctionName, type RegisterPermitParams, type RelayerRequestOptions, type RelayerSDK, type ResumeUnshieldParams, type RevokeDelegationParams, type RevokeDelegationRequest, type RevokeDelegationSubmittedEvent, type SerializedPermitEip712, type SerializedTransportKeyPair, type SetOperatorRequest, type SetOperatorSubmittedEvent, type ShieldCallbacks, type ShieldOptions, type ShieldParams, type ShieldPath, type ShieldSubmittedEvent, type SignedPreparedPermit, type SignerQueryContext, type StrippedQueryOptionKeys, type Token, type TokenAddressQueryConfig, type TokenMetadata, type TokenMetadataQueryConfig, type TokenPairQueryConfig, type TokenPairsSliceQueryConfig, type TokenWrapperPair, type TokenWrapperPairWithMetadata, type TotalSupplyQueryConfig, type TransactionErrorEvent, type TransactionKind, type TransactionOperation, type TransactionReceipt, type TransactionResult, type TransferAndCallRequest, type TransferCallbacks, type TransferFromSubmittedEvent, type TransferOptions, type TransferSubmittedEvent, type UnderlyingAllowanceQueryConfig, type UnshieldAllParams, type UnshieldCallbacks, type UnshieldOptions, type UnshieldParams, type UnshieldPhase1SubmittedEvent, type UnshieldPhase2StartedEvent, type UnshieldPhase2SubmittedEvent, type UnwrapAllRequest, type UnwrapFinalizedEvent, type UnwrapParams, type UnwrapRequest, type UnwrapRequestedEvent, type UnwrapResult, type UnwrapSubmittedEvent, type WalletAccount, type WalletAccountChange, type WalletAccountListener, type WalletAccountStore, type WrapEvent, type WrapOptions, type WrapParams, type WrapRequest, type WrapSubmittedEvent, type WrappedToken, type WrapperDiscoveryQueryConfig, type WrappersRegistry, type WrappersRegistryConfig, type WrappersRegistryQueryConfig, type WriteContractArgs, type WriteContractConfig, type WriteFunctionName, type ZamaConfig, type ZamaError, type ZamaErrorCode, type ZamaSDK, type ZamaSDKEvent, type ZamaSDKEventListener, ZamaSDKEvents, type ZamaSDKOptions, approveUnderlyingMutationOptions, batchDecryptBalancesAsMutationOptions, batchPreparePermitsMutationOptions, batchRegisterPermitsMutationOptions, clearCredentialsMutationOptions, confidentialBalanceQueryOptions, confidentialBalancesQueryOptions, confidentialIsOperatorQueryOptions, confidentialSetOperatorMutationOptions, confidentialTokenAddressQueryOptions, confidentialTransferAndCallMutationOptions, confidentialTransferFromAndCallMutationOptions, confidentialTransferFromMutationOptions, confidentialTransferMutationOptions, decryptBalanceAsMutationOptions, decryptPublicValuesMutationOptions, decryptValuesQueryOptions, delegateDecryptionMutationOptions, delegatedDecryptValuesMutationOptions, delegationStatusQueryOptions, encryptMutationOptions, filterQueryOptions, finalizeUnwrapMutationOptions, grantPermitMutationOptions, hasPermitQueryOptions, hashFn, invalidateAfterApproveUnderlying, invalidateAfterSetOperator, invalidateAfterShield, invalidateAfterTransfer, invalidateAfterUnshield, invalidateAfterUnshieldSettled, invalidateAfterUnwrap, invalidateAfterWrap, invalidateBalanceQueries, invalidateWagmiBalanceQueries, invalidateWalletLifecycleQueries, isConfidentialQueryOptions, isConfidentialTokenValidQueryOptions, isWrapperQueryOptions, listPairsQueryOptions, pendingUnshieldQueryOptions, preparePermitMutationOptions, registerPermitMutationOptions, resumeUnshieldMutationOptions, revokeDelegationMutationOptions, revokePermitsMutationOptions, shieldMutationOptions, tokenAddressQueryOptions, tokenMetadataQueryOptions, tokenPairQueryOptions, tokenPairsLengthQueryOptions, tokenPairsQueryOptions, tokenPairsSliceQueryOptions, totalSupplyQueryOptions, underlyingAllowanceQueryOptions, unshieldAllMutationOptions, unshieldMutationOptions, unwrapAllMutationOptions, unwrapMutationOptions, wrapMutationOptions, wrapperDiscoveryQueryOptions, zamaQueryKeys };
|
|
500
|
-
//# sourceMappingURL=index.d.ts.map
|
|
426
|
+
export declare function delegationStatusQueryOptions(sdk: ZamaSDK, config: DelegationStatusQueryConfig): QueryFactoryOptions<DelegationStatus, Error, DelegationStatus, ReturnType<typeof zamaQueryKeys.delegationStatus.scope>>;
|
|
427
|
+
export { type ApprovalStrategy, type ApproveUnderlyingParams, type ApproveUnderlyingRequest, type ApproveUnderlyingSubmittedEvent, type BaseEvent, type BatchBalancesResult, type BatchDecryptAsOptions, type BatchDecryptBalancesAsParams, type BatchDecryptItem, type BatchDecryptResult, type ChecksummedAddress, type ClearValue, type ConfidentialBalanceQueryConfig, type ConfidentialBalancesQueryConfig, type ConfidentialIsOperatorQueryConfig, type ConfidentialSetOperatorParams, type ConfidentialTokenAddressQueryConfig, type ConfidentialTransferAndCallParams, type ConfidentialTransferEvent, type ConfidentialTransferFromAndCallParams, type ConfidentialTransferFromParams, type ConfidentialTransferFromRequest, type ConfidentialTransferParams, type ConfidentialTransferRequest, type ContractAbi, type DecryptBalanceAsParams, type DecryptEndEvent, type DecryptErrorEvent, type EncryptedInput as DecryptInput, type DecryptPublicValuesResult, type DecryptResult, type DecryptStartEvent, type Decryption, type DelegateDecryptionParams, type DelegateDecryptionRequest, type DelegatedDecryptOptions, type DelegatedDecryptValuesMutationParams, type DelegationStatus, type DelegationStatusQueryConfig, type DelegationSubmittedEvent, type Delegations, type EIP712TypedData, type EncryptEndEvent, type EncryptErrorEvent, type EncryptInput, type EncryptParams, type EncryptResult, type EncryptStartEvent, type EncryptedValue, type FheChain, type FheChainAuth, type FhevmClient, type FhevmRelayerOptions, type FhevmRuntimeConfig, type FinalizeUnwrapParams, type FinalizeUnwrapRequest, type FinalizeUnwrapSubmittedEvent, type GenericLogger, type GenericProvider, type GenericSigner, type GenericStorage, type HasPermitQueryConfig, type IsConfidentialQueryConfig, type IsConfidentialTokenValidQueryConfig, type ListPairsOptions, type ListPairsQueryConfig, type MulticallReturnType, type MutationFactoryOptions, type Offline, type OnChainEvent, type PaginatedResult, type PendingUnshieldQueryConfig, type PermitErrorEvent, type PermitOperation, type Permits, type PrepareFees, type PrepareOptions, type PreparePermitRequest, type PrepareTransactionRequest, type PreparedFor, type PreparedPermit, type PreparedTransaction, type QueryClientLike, type QueryFactoryOptions, type QueryFilterLike, type QueryLike, type RawLog, type ReadContractArgs, type ReadContractConfig, type ReadContractReturnType, type ReadFunctionName, type RegisterPermitParams, type RelayerRequestOptions, type RelayerSDK, type ResumeUnshieldParams, type RevokeDelegationParams, type RevokeDelegationRequest, type RevokeDelegationSubmittedEvent, type SerializedPermitEip712, type SerializedTransportKeyPair, type SetOperatorRequest, type SetOperatorSubmittedEvent, type ShieldCallbacks, type ShieldOptions, type ShieldParams, type ShieldPath, type ShieldSubmittedEvent, type SignedPreparedPermit, type SignerQueryContext, type StrippedQueryOptionKeys, type Token, type TokenAddressQueryConfig, type TokenMetadata, type TokenMetadataQueryConfig, type TokenPairQueryConfig, type TokenPairsSliceQueryConfig, type TokenWrapperPair, type TokenWrapperPairWithMetadata, type TotalSupplyQueryConfig, type TransactionErrorEvent, type TransactionKind, type TransactionOperation, type TransactionReceipt, type TransactionResult, type TransferAndCallRequest, type TransferCallbacks, type TransferFromSubmittedEvent, type TransferOptions, type TransferSubmittedEvent, type UnderlyingAllowanceQueryConfig, type UnshieldAllParams, type UnshieldCallbacks, type UnshieldOptions, type UnshieldParams, type UnshieldPhase1SubmittedEvent, type UnshieldPhase2StartedEvent, type UnshieldPhase2SubmittedEvent, type UnwrapAllRequest, type UnwrapFinalizedEvent, type UnwrapParams, type UnwrapRequest, type UnwrapRequestedEvent, type UnwrapResult, type UnwrapSubmittedEvent, type WalletAccount, type WalletAccountChange, type WalletAccountListener, type WalletAccountStore, type WrapEvent, type WrapOptions, type WrapParams, type WrapRequest, type WrapSubmittedEvent, type WrappedToken, type WrapperDiscoveryQueryConfig, type WrappersRegistry, type WrappersRegistryConfig, type WrappersRegistryQueryConfig, type WriteContractArgs, type WriteContractConfig, type WriteFunctionName, type ZamaConfig, type ZamaError, type ZamaErrorCode, type ZamaSDK, type ZamaSDKEvent, type ZamaSDKEventListener, ZamaSDKEvents, type ZamaSDKOptions, decryptValuesQueryOptions, invalidateAfterApproveUnderlying, invalidateAfterSetOperator, invalidateAfterShield, invalidateAfterTransfer, invalidateAfterUnshield, invalidateAfterUnshieldSettled, invalidateAfterUnwrap, invalidateAfterWrap, invalidateBalanceQueries, invalidateWagmiBalanceQueries, invalidateWalletLifecycleQueries, zamaQueryKeys };
|
package/dist/esm/query/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{f as e}from"../relayer-C3jVhqSK.js";import{C as t,E as n,F as r,P as i,S as a,a as o,c as s,d as c,i as l,m as u,p as d}from"../erc165-B8gx2luK.js";import{t as f}from"../token-g6sinwTx.js";import{a as ee,i as p,n as m,o as h,r as g,s as _,t as v}from"../wrappers-registry-Cm3JJeqx.js";import{a as y,c as b,d as x,f as S,i as C,l as w,m as T,n as E,o as D,p as O,r as k,s as A,t as j,u as M}from"../invalidation-BgFjmXeQ.js";import{zeroAddress as N}from"viem";function P(e,t,n){let r=S.tokenMetadata.token(t);return{...O(n?.query??{}),queryKey:r,queryFn:async t=>{let[,{tokenAddress:n}]=t.queryKey,[r,i,a]=await Promise.all([e.provider.readContract(d(n)),e.provider.readContract(u(n)),e.provider.readContract(c(n))]);return{name:r,symbol:i,decimals:a}},staleTime:1/0,enabled:n?.query?.enabled!==!1}}function F(t,n,r){let i=S.isConfidential.token(n);return{...O(r?.query??{}),queryKey:i,queryFn:async n=>{let[,{tokenAddress:r}]=n.queryKey;try{return await t.provider.readContract(l(r))}catch(t){if(e(t))return!1;throw t}},staleTime:1/0,enabled:r?.query?.enabled!==!1}}function I(t,n,r){let i=S.isWrapper.token(n);return{...O(r?.query??{}),queryKey:i,queryFn:async n=>{let[,{tokenAddress:r}]=n.queryKey;try{return await t.provider.readContract(o(r))}catch(t){if(e(t))return!1;throw t}},staleTime:1/0,enabled:r?.query?.enabled!==!1}}function L(e,t,n){let r=S.totalSupply.token(t);return{...O(n?.query??{}),queryKey:r,queryFn:async t=>{let[,{tokenAddress:n}]=t.queryKey;return e.provider.readContract(a(n))},staleTime:3e4,enabled:n?.query?.enabled!==!1}}function R(e,t){let n=S.wrapperDiscovery.token(t.tokenAddress,t.erc20Address,t.registryAddress);return{...O(t.query??{}),queryKey:n,queryFn:async t=>{let[,{erc20Address:n}]=t.queryKey;i(n,`wrapperDiscoveryQueryOptions: erc20Address`);let r=await e.getConfidentialToken(n);return r?r.confidentialTokenAddress:null},staleTime:1/0,enabled:!!(t.tokenAddress&&t.erc20Address&&t.registryAddress)&&t.query?.enabled!==!1}}function z(e,t,r){let a=r.owner,o=r.query?.enabled!==!1,c=S.underlyingAllowance.scope(t,a);return{...O(r.query??{}),queryKey:c,queryFn:async t=>{let[,{tokenAddress:r,owner:a}]=t.queryKey;i(a,`underlyingAllowanceQueryOptions: owner`);let o=await e.provider.readContract(n(r));return e.provider.readContract(s(o,a,r))},staleTime:3e4,enabled:!!a&&o}}function B(e,t,n){let r=S.pendingUnshield.token(t);return{...O(n?.query??{}),queryKey:r,queryFn:async t=>{let[,{tokenAddress:n}]=t.queryKey;return e.createWrappedToken(n).getPendingUnshield()},staleTime:0,enabled:n?.query?.enabled!==!1}}function V(e,n,r){let a=r.holder,o=r.spender,s=r.query?.enabled!==!1,c=S.confidentialIsOperator.scope(n,a,o);return{...O(r.query??{}),queryKey:c,queryFn:async n=>{let[,{tokenAddress:r,holder:a,spender:o}]=n.queryKey;return i(r,`confidentialIsOperatorQueryOptions: tokenAddress`),i(a,`confidentialIsOperatorQueryOptions: holder`),i(o,`confidentialIsOperatorQueryOptions: spender`),e.provider.readContract(t(r,a,o))},staleTime:3e4,enabled:!!(n&&a&&o)&&s}}function H(e,t,n={}){let r=t.query??{};return{...O(r),queryKey:S.confidentialBalance.owner(t.tokenAddress,t.account,n.walletAccount),queryFn:async t=>{let[,{owner:n}]=t.queryKey;return i(n,`confidentialBalanceQueryOptions: owner`),e.balanceOf(n)},enabled:!!t.account&&n.walletAccount!==void 0&&r?.enabled!==!1}}function U(e,t,n={}){let r=t?.account,a=n.walletAccount,o=t?.query??{},s=e.map(e=>e.address);return{...O(o),queryKey:S.confidentialBalances.tokens(s,r,a),queryFn:async t=>{let[,{owner:n}]=t.queryKey;return i(n,`confidentialBalancesQueryOptions: owner`),f.batchBalancesOf(e,n)},enabled:!!r&&e.length>0&&a!==void 0&&o?.enabled!==!1}}function W(e,t){let n=!!t.registryAddress&&t.query?.enabled!==!1,r=S.wrappersRegistry.tokenPairs(t.registryAddress??N);return{...O(t.query??{}),queryKey:r,queryFn:async t=>{let[,{registryAddress:n}]=t.queryKey;return e.provider.readContract(p(n))},staleTime:e.registry.ttlMs,enabled:n}}function G(e,t){let n=!!t.registryAddress&&!!t.tokenAddress&&t.query?.enabled!==!1,r=S.wrappersRegistry.confidentialTokenAddress(t.registryAddress??N,t.tokenAddress??N);return{...O(t.query??{}),queryKey:r,queryFn:async t=>{let[,{registryAddress:n,tokenAddress:r}]=t.queryKey;return e.provider.readContract(v(n,r))},staleTime:e.registry.ttlMs,enabled:n}}function K(e,t){let n=!!t.registryAddress&&!!t.confidentialTokenAddress&&t.query?.enabled!==!1,r=S.wrappersRegistry.tokenAddress(t.registryAddress??N,t.confidentialTokenAddress??N);return{...O(t.query??{}),queryKey:r,queryFn:async t=>{let[,{registryAddress:n,confidentialTokenAddress:r}]=t.queryKey;return e.provider.readContract(m(n,r))},staleTime:e.registry.ttlMs,enabled:n}}function q(e,t){let n=!!t.registryAddress&&t.query?.enabled!==!1,r=S.wrappersRegistry.tokenPairsLength(t.registryAddress??N);return{...O(t.query??{}),queryKey:r,queryFn:async t=>{let[,{registryAddress:n}]=t.queryKey;return e.provider.readContract(ee(n))},staleTime:e.registry.ttlMs,enabled:n}}function J(e,t){let n=!!t.registryAddress&&t.fromIndex!==void 0&&t.toIndex!==void 0&&t.query?.enabled!==!1,r=S.wrappersRegistry.tokenPairsSlice(t.registryAddress??N,String(t.fromIndex??0n),String(t.toIndex??0n));return{...O(t.query??{}),queryKey:r,queryFn:async t=>{let[,{registryAddress:n,fromIndex:r,toIndex:i}]=t.queryKey;return e.provider.readContract(h(n,BigInt(r),BigInt(i)))},staleTime:e.registry.ttlMs,enabled:n}}function te(e,t){let n=!!t.registryAddress&&t.index!==void 0&&t.query?.enabled!==!1,r=S.wrappersRegistry.tokenPair(t.registryAddress??N,String(t.index??0n));return{...O(t.query??{}),queryKey:r,queryFn:async t=>{let[,{registryAddress:n,index:r}]=t.queryKey;return e.provider.readContract(g(n,BigInt(r)))},staleTime:e.registry.ttlMs,enabled:n}}function Y(e,t){let n=!!t.registryAddress&&!!t.confidentialTokenAddress&&t.query?.enabled!==!1,r=S.wrappersRegistry.isConfidentialTokenValid(t.registryAddress??N,t.confidentialTokenAddress??N);return{...O(t.query??{}),queryKey:r,queryFn:async t=>{let[,{registryAddress:n,confidentialTokenAddress:r}]=t.queryKey;return e.provider.readContract(_(n,r))},staleTime:e.registry.ttlMs,enabled:n}}function X(e,t){let n=!!t.registryAddress&&t.query?.enabled!==!1,r=S.wrappersRegistry.listPairs(t.registryAddress??N,t.page??1,t.pageSize??100,t.metadata??!1);return{...O(t.query??{}),queryKey:r,queryFn:async t=>{let[,{page:n,pageSize:r,metadata:i}]=t.queryKey;return e.listPairs({page:n,pageSize:r,metadata:i})},staleTime:e.ttlMs,enabled:n}}function Z(e){return{mutationKey:[`zama.shield`,e.address],mutationFn:async({amount:t,...n})=>e.shield(t,n)}}function Q(e){return{mutationKey:[`zama.confidentialTransfer`,e.address],mutationFn:async({to:t,amount:n,...r})=>e.confidentialTransfer(t,n,r)}}function ne(e){return{mutationKey:[`zama.confidentialTransferAndCall`,e.address],mutationFn:async({to:t,amount:n,data:r,...i})=>e.confidentialTransferAndCall(t,n,r,i)}}function re(e){return{mutationKey:[`zama.confidentialTransferFrom`,e.address],mutationFn:async({from:t,to:n,amount:r,callbacks:i})=>e.confidentialTransferFrom(t,n,r,i)}}function ie(e){return{mutationKey:[`zama.confidentialTransferFromAndCall`,e.address],mutationFn:async({from:t,to:n,amount:r,data:i,callbacks:a})=>e.confidentialTransferFromAndCall(t,n,r,i,a)}}function ae(e){return{mutationKey:[`zama.confidentialSetOperator`,e.address],mutationFn:async({operator:t,until:n})=>e.setOperator(t,n)}}function oe(e){return{mutationKey:[`zama.approveUnderlying`,e.address],mutationFn:async({amount:t})=>e.approveUnderlying(t)}}function se(e){return{mutationKey:[`zama.unshield`,e.address],mutationFn:async({amount:t,...n})=>e.unshield(t,n)}}function ce(e){return{mutationKey:[`zama.unshieldAll`,e.address],mutationFn:async t=>e.unshieldAll(t||void 0)}}function le(e){return{mutationKey:[`zama.resumeUnshield`,e.address],mutationFn:async({unwrapTxHash:t,...n})=>e.resumeUnshield(t,n)}}function ue(e){return{mutationKey:[`zama.unwrap`,e.address],mutationFn:async({amount:t})=>e.unwrap(t)}}function de(e){return{mutationKey:[`zama.wrap`,e.address],mutationFn:async({amount:t,...n})=>e.wrap(t,n)}}function fe(e){return{mutationKey:[`zama.unwrapAll`,e.address],mutationFn:async()=>e.unwrapAll()}}function pe(e){return{mutationKey:[`zama.finalizeUnwrap`,e.address],mutationFn:async({unwrapRequestId:t})=>e.finalizeUnwrap(t)}}function me(e){return{mutationKey:[`zama.encrypt`],mutationFn:async t=>e.encrypt(t)}}function he(e){return{mutationKey:[`zama.delegatedDecryptValues`],mutationFn:async t=>e.decryption.delegatedDecryptValues(t.encryptedInputs,t.delegatorAddress)}}function ge(e){return{mutationKey:[`zama.decryptPublicValues`],mutationFn:async t=>e.decryption.decryptPublicValues(t),onSuccess:(e,t,n,r)=>{for(let[t,n]of Object.entries(e.clearValues))r.client.setQueryData(S.decryption.encryptedValue(t),n)}}}function _e(e){return{mutationKey:[`zama.grantPermit`],mutationFn:t=>e.permits.grantPermit(t)}}function ve(e){return{mutationKey:[`zama.preparePermit`],mutationFn:t=>e.offline.preparePermit(t)}}function ye(e){return{mutationKey:[`zama.batchPreparePermits`],mutationFn:t=>e.offline.batchPreparePermits(t)}}function be(e){return{mutationKey:[`zama.registerPermit`],mutationFn:({prepared:t,signature:n})=>e.permits.registerPermit(t,n)}}function $(e){return{mutationKey:[`zama.batchRegisterPermits`],mutationFn:t=>e.permits.batchRegisterPermits(t)}}function xe(e,t,n={}){let r=t.query?.enabled!==!1;return{...O(t?.query??{}),queryKey:S.hasPermit.scope(t.contractAddresses,n.walletAccount),queryFn:t=>{let[,{contractAddresses:n}]=t.queryKey;return e.permits.hasPermit(n)},staleTime:0,gcTime:0,refetchOnMount:`always`,refetchOnWindowFocus:!1,enabled:r&&n.walletAccount!==void 0&&t.contractAddresses.length>0}}function Se(e){return{mutationKey:[`zama.revokePermits`],mutationFn:t=>t===void 0?e.permits.revokePermits():e.permits.revokePermits(t)}}function Ce(e){return{mutationKey:[`zama.clearCredentials`],mutationFn:()=>e.permits.clear()}}function we(e,t){return{mutationKey:[`zama.delegateDecryption`,t],mutationFn:async({delegateAddress:n,expirationDate:r})=>e.delegations.delegateDecryption({contractAddress:t,delegateAddress:n,expirationDate:r})}}function Te(e,t,n={}){return{queryKey:S.decryption.encryptedInputs(t,n.walletAccount),queryFn:t=>{let[,{encryptedInputs:n}]=t.queryKey;return e.decryption.decryptValues(n)},staleTime:1/0,enabled:t.length>0&&n.walletAccount!==void 0}}function Ee(e){return{mutationKey:[`zama.decryptBalanceAs`,e.address],mutationFn:async({delegatorAddress:t,accountAddress:n})=>e.decryptBalanceAs({delegatorAddress:t,accountAddress:n})}}function De(e){return{mutationKey:[`zama.batchDecryptBalancesAs`,...e.map(e=>e.address)],mutationFn:async t=>f.batchDecryptBalancesAs(e,t)}}function Oe(e,t){return{mutationKey:[`zama.revokeDelegation`,t],mutationFn:async({delegateAddress:n})=>e.delegations.revokeDelegation({contractAddress:t,delegateAddress:n})}}function ke(e,t){return{...O(t.query??{}),queryKey:S.delegationStatus.scope(t.contractAddress,t.delegatorAddress,t.delegateAddress),queryFn:async t=>{let[,{contractAddress:n,delegatorAddress:r,delegateAddress:a}]=t.queryKey;return i(n,`delegationStatusQueryOptions: contractAddress`),i(r,`delegationStatusQueryOptions: delegatorAddress`),i(a,`delegationStatusQueryOptions: delegateAddress`),e.delegations.getStatus({contractAddress:n,delegatorAddress:r,delegateAddress:a})},enabled:!!(t.contractAddress&&t.delegatorAddress&&t.delegateAddress)&&t.query?.enabled!==!1}}export{r as ZamaSDKEvents,oe as approveUnderlyingMutationOptions,De as batchDecryptBalancesAsMutationOptions,ye as batchPreparePermitsMutationOptions,$ as batchRegisterPermitsMutationOptions,Ce as clearCredentialsMutationOptions,H as confidentialBalanceQueryOptions,U as confidentialBalancesQueryOptions,V as confidentialIsOperatorQueryOptions,ae as confidentialSetOperatorMutationOptions,G as confidentialTokenAddressQueryOptions,ne as confidentialTransferAndCallMutationOptions,ie as confidentialTransferFromAndCallMutationOptions,re as confidentialTransferFromMutationOptions,Q as confidentialTransferMutationOptions,Ee as decryptBalanceAsMutationOptions,ge as decryptPublicValuesMutationOptions,Te as decryptValuesQueryOptions,we as delegateDecryptionMutationOptions,he as delegatedDecryptValuesMutationOptions,ke as delegationStatusQueryOptions,me as encryptMutationOptions,O as filterQueryOptions,pe as finalizeUnwrapMutationOptions,_e as grantPermitMutationOptions,xe as hasPermitQueryOptions,T as hashFn,j as invalidateAfterApproveUnderlying,E as invalidateAfterSetOperator,k as invalidateAfterShield,C as invalidateAfterTransfer,y as invalidateAfterUnshield,D as invalidateAfterUnshieldSettled,A as invalidateAfterUnwrap,b as invalidateAfterWrap,w as invalidateBalanceQueries,M as invalidateWagmiBalanceQueries,x as invalidateWalletLifecycleQueries,F as isConfidentialQueryOptions,Y as isConfidentialTokenValidQueryOptions,I as isWrapperQueryOptions,X as listPairsQueryOptions,B as pendingUnshieldQueryOptions,ve as preparePermitMutationOptions,be as registerPermitMutationOptions,le as resumeUnshieldMutationOptions,Oe as revokeDelegationMutationOptions,Se as revokePermitsMutationOptions,Z as shieldMutationOptions,K as tokenAddressQueryOptions,P as tokenMetadataQueryOptions,te as tokenPairQueryOptions,q as tokenPairsLengthQueryOptions,W as tokenPairsQueryOptions,J as tokenPairsSliceQueryOptions,L as totalSupplyQueryOptions,z as underlyingAllowanceQueryOptions,ce as unshieldAllMutationOptions,se as unshieldMutationOptions,fe as unwrapAllMutationOptions,ue as unwrapMutationOptions,de as wrapMutationOptions,R as wrapperDiscoveryQueryOptions,S as zamaQueryKeys};
|
|
1
|
+
import{t as e}from"../query-keys-CSPxPLBB.js";import{A as t,B as n,D as r,E as i,_ as a,c as o,f as s,h as c,l as ee,v as l,z as u}from"../alignment-o-YIndFR.js";import{p as d}from"../relayer-nWfQAlo7.js";import{t as f}from"../token-AXsOIUDB.js";import{a as te,i as p,n as m,o as h,r as g,s as _,t as v}from"../wrappers-registry-Cm3JJeqx.js";import{zeroAddress as y}from"viem";import{z as b}from"zod/mini";function x(e){if(!S(e))return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(!S(n)||!n.hasOwnProperty(`isPrototypeOf`))}function S(e){return Object.prototype.toString.call(e)===`[object Object]`}function C(e){let{gcTime:t,staleTime:n,enabled:r,select:i,refetchInterval:a,refetchOnMount:o,refetchOnWindowFocus:s,refetchOnReconnect:c,retry:ee,retryDelay:l,retryOnMount:u,queryFn:d,queryKey:f,queryKeyHashFn:te,initialData:p,initialDataUpdatedAt:m,placeholderData:h,structuralSharing:g,throwOnError:_,meta:v,query:y,pollingInterval:b,...x}=e;return x}function w(e){return JSON.stringify(e,(e,t)=>x(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):typeof t==`bigint`?t.toString():t)}function T(t,n){t.invalidateQueries({queryKey:e.underlyingAllowance.token(n)})}function E(t,n){t.invalidateQueries({queryKey:e.pendingUnshield.token(n)})}function D(e,t){k(e,t),T(e,t),E(e,t),H(e)}function O(e,t){k(e,t),T(e,t),H(e)}function k(t,n){t.invalidateQueries({queryKey:e.confidentialBalance.token(n)}),t.invalidateQueries({queryKey:e.confidentialBalances.all})}function A(e,t){k(e,t),T(e,t),H(e)}function j(e,t){k(e,t),T(e,t),E(e,t),H(e)}function M(e,t){E(e,t)}function N(e,t){k(e,t)}function P(e,t){T(e,t)}function F(t,n){t.invalidateQueries({queryKey:e.confidentialIsOperator.token(n)})}function I(e){return Array.isArray(e.queryKey)&&typeof e.queryKey[0]==`string`?e.queryKey[0].startsWith(`zama.`):!1}const L=b.enum([`balanceOf`,`confidentialBalanceOf`]),R=b.object({functionName:L}),z=b.object({contracts:b.array(b.unknown())});function B(e){if(R.safeParse(e).success)return!0;let t=z.safeParse(e);return t.success&&t.data.contracts.some(e=>R.safeParse(e).success)}function V(e){return Array.isArray(e.queryKey)&&e.queryKey.some(B)}function H(e){e.invalidateQueries({predicate:V})}function U(t){t.removeQueries({queryKey:e.decryption.all}),t.removeQueries({queryKey:e.hasPermit.all}),t.invalidateQueries({predicate:I}),H(t)}function W(t,n,r){let i=e.tokenMetadata.token(n);return{...C(r?.query??{}),queryKey:i,queryFn:async e=>{let[,{tokenAddress:n}]=e.queryKey,[r,i,o]=await Promise.all([t.provider.readContract(a(n)),t.provider.readContract(l(n)),t.provider.readContract(c(n))]);return{name:r,symbol:i,decimals:o}},staleTime:1/0,enabled:r?.query?.enabled!==!1}}function G(t,n,r){let i=e.isConfidential.token(n);return{...C(r?.query??{}),queryKey:i,queryFn:async e=>{let[,{tokenAddress:n}]=e.queryKey;try{return await t.provider.readContract(o(n))}catch(e){if(d(e))return!1;throw e}},staleTime:1/0,enabled:r?.query?.enabled!==!1}}function K(t,n,r){let i=e.isWrapper.token(n);return{...C(r?.query??{}),queryKey:i,queryFn:async e=>{let[,{tokenAddress:n}]=e.queryKey;try{return await t.provider.readContract(ee(n))}catch(e){if(d(e))return!1;throw e}},staleTime:1/0,enabled:r?.query?.enabled!==!1}}function q(t,n,r){let a=e.totalSupply.token(n);return{...C(r?.query??{}),queryKey:a,queryFn:async e=>{let[,{tokenAddress:n}]=e.queryKey;return t.provider.readContract(i(n))},staleTime:3e4,enabled:r?.query?.enabled!==!1}}function J(t,n){let r=e.wrapperDiscovery.token(n.tokenAddress,n.erc20Address,n.registryAddress);return{...C(n.query??{}),queryKey:r,queryFn:async e=>{let[,{erc20Address:n}]=e.queryKey;u(n,`wrapperDiscoveryQueryOptions: erc20Address`);let r=await t.getConfidentialToken(n);return r?r.confidentialTokenAddress:null},staleTime:1/0,enabled:!!(n.tokenAddress&&n.erc20Address&&n.registryAddress)&&n.query?.enabled!==!1}}function Y(n,r,i){let a=i.owner,o=i.query?.enabled!==!1,c=e.underlyingAllowance.scope(r,a);return{...C(i.query??{}),queryKey:c,queryFn:async e=>{let[,{tokenAddress:r,owner:i}]=e.queryKey;u(i,`underlyingAllowanceQueryOptions: owner`);let a=await n.provider.readContract(t(r));return n.provider.readContract(s(a,i,r))},staleTime:3e4,enabled:!!a&&o}}function X(t,n,r){let i=e.pendingUnshield.token(n);return{...C(r?.query??{}),queryKey:i,queryFn:async e=>{let[,{tokenAddress:n}]=e.queryKey;return t.createWrappedToken(n).getPendingUnshield()},staleTime:0,enabled:r?.query?.enabled!==!1}}function Z(t,n,i){let a=i.holder,o=i.spender,s=i.query?.enabled!==!1,c=e.confidentialIsOperator.scope(n,a,o);return{...C(i.query??{}),queryKey:c,queryFn:async e=>{let[,{tokenAddress:n,holder:i,spender:a}]=e.queryKey;return u(n,`confidentialIsOperatorQueryOptions: tokenAddress`),u(i,`confidentialIsOperatorQueryOptions: holder`),u(a,`confidentialIsOperatorQueryOptions: spender`),t.provider.readContract(r(n,i,a))},staleTime:3e4,enabled:!!(n&&a&&o)&&s}}function Q(t,n,r={}){let i=n.query??{};return{...C(i),queryKey:e.confidentialBalance.owner(n.tokenAddress,n.account,r.walletAccount),queryFn:async e=>{let[,{owner:n}]=e.queryKey;return u(n,`confidentialBalanceQueryOptions: owner`),t.balanceOf(n)},enabled:!!n.account&&r.walletAccount!==void 0&&i?.enabled!==!1}}function ne(t,n,r={}){let i=n?.account,a=r.walletAccount,o=n?.query??{},s=t.map(e=>e.address);return{...C(o),queryKey:e.confidentialBalances.tokens(s,i,a),queryFn:async e=>{let[,{owner:n}]=e.queryKey;return u(n,`confidentialBalancesQueryOptions: owner`),f.batchBalancesOf(t,n)},enabled:!!i&&t.length>0&&a!==void 0&&o?.enabled!==!1}}function re(t,n){let r=!!n.registryAddress&&n.query?.enabled!==!1,i=e.wrappersRegistry.tokenPairs(n.registryAddress??y);return{...C(n.query??{}),queryKey:i,queryFn:async e=>{let[,{registryAddress:n}]=e.queryKey;return t.provider.readContract(p(n))},staleTime:t.registry.ttlMs,enabled:r}}function ie(t,n){let r=!!n.registryAddress&&!!n.tokenAddress&&n.query?.enabled!==!1,i=e.wrappersRegistry.confidentialTokenAddress(n.registryAddress??y,n.tokenAddress??y);return{...C(n.query??{}),queryKey:i,queryFn:async e=>{let[,{registryAddress:n,tokenAddress:r}]=e.queryKey;return t.provider.readContract(v(n,r))},staleTime:t.registry.ttlMs,enabled:r}}function ae(t,n){let r=!!n.registryAddress&&!!n.confidentialTokenAddress&&n.query?.enabled!==!1,i=e.wrappersRegistry.tokenAddress(n.registryAddress??y,n.confidentialTokenAddress??y);return{...C(n.query??{}),queryKey:i,queryFn:async e=>{let[,{registryAddress:n,confidentialTokenAddress:r}]=e.queryKey;return t.provider.readContract(m(n,r))},staleTime:t.registry.ttlMs,enabled:r}}function oe(t,n){let r=!!n.registryAddress&&n.query?.enabled!==!1,i=e.wrappersRegistry.tokenPairsLength(n.registryAddress??y);return{...C(n.query??{}),queryKey:i,queryFn:async e=>{let[,{registryAddress:n}]=e.queryKey;return t.provider.readContract(te(n))},staleTime:t.registry.ttlMs,enabled:r}}function se(t,n){let r=!!n.registryAddress&&n.fromIndex!==void 0&&n.toIndex!==void 0&&n.query?.enabled!==!1,i=e.wrappersRegistry.tokenPairsSlice(n.registryAddress??y,String(n.fromIndex??0n),String(n.toIndex??0n));return{...C(n.query??{}),queryKey:i,queryFn:async e=>{let[,{registryAddress:n,fromIndex:r,toIndex:i}]=e.queryKey;return t.provider.readContract(h(n,BigInt(r),BigInt(i)))},staleTime:t.registry.ttlMs,enabled:r}}function ce(t,n){let r=!!n.registryAddress&&n.index!==void 0&&n.query?.enabled!==!1,i=e.wrappersRegistry.tokenPair(n.registryAddress??y,String(n.index??0n));return{...C(n.query??{}),queryKey:i,queryFn:async e=>{let[,{registryAddress:n,index:r}]=e.queryKey;return t.provider.readContract(g(n,BigInt(r)))},staleTime:t.registry.ttlMs,enabled:r}}function le(t,n){let r=!!n.registryAddress&&!!n.confidentialTokenAddress&&n.query?.enabled!==!1,i=e.wrappersRegistry.isConfidentialTokenValid(n.registryAddress??y,n.confidentialTokenAddress??y);return{...C(n.query??{}),queryKey:i,queryFn:async e=>{let[,{registryAddress:n,confidentialTokenAddress:r}]=e.queryKey;return t.provider.readContract(_(n,r))},staleTime:t.registry.ttlMs,enabled:r}}function ue(t,n){let r=!!n.registryAddress&&n.query?.enabled!==!1,i=e.wrappersRegistry.listPairs(n.registryAddress??y,n.page??1,n.pageSize??100,n.metadata??!1);return{...C(n.query??{}),queryKey:i,queryFn:async e=>{let[,{page:n,pageSize:r,metadata:i}]=e.queryKey;return t.listPairs({page:n,pageSize:r,metadata:i})},staleTime:t.ttlMs,enabled:r}}function de(e){return{mutationKey:[`zama.shield`,e.address],mutationFn:async({amount:t,...n})=>e.shield(t,n)}}function fe(e){return{mutationKey:[`zama.confidentialTransfer`,e.address],mutationFn:async({to:t,amount:n,...r})=>e.confidentialTransfer(t,n,r)}}function pe(e){return{mutationKey:[`zama.confidentialTransferAndCall`,e.address],mutationFn:async({to:t,amount:n,data:r,...i})=>e.confidentialTransferAndCall(t,n,r,i)}}function me(e){return{mutationKey:[`zama.confidentialTransferFrom`,e.address],mutationFn:async({from:t,to:n,amount:r,callbacks:i})=>e.confidentialTransferFrom(t,n,r,i)}}function he(e){return{mutationKey:[`zama.confidentialTransferFromAndCall`,e.address],mutationFn:async({from:t,to:n,amount:r,data:i,callbacks:a})=>e.confidentialTransferFromAndCall(t,n,r,i,a)}}function ge(e){return{mutationKey:[`zama.confidentialSetOperator`,e.address],mutationFn:async({operator:t,until:n})=>e.setOperator(t,n)}}function _e(e){return{mutationKey:[`zama.approveUnderlying`,e.address],mutationFn:async({amount:t})=>e.approveUnderlying(t)}}function ve(e){return{mutationKey:[`zama.unshield`,e.address],mutationFn:async({amount:t,...n})=>e.unshield(t,n)}}function ye(e){return{mutationKey:[`zama.unshieldAll`,e.address],mutationFn:async t=>e.unshieldAll(t||void 0)}}function be(e){return{mutationKey:[`zama.resumeUnshield`,e.address],mutationFn:async({unwrapTxHash:t,...n})=>e.resumeUnshield(t,n)}}function xe(e){return{mutationKey:[`zama.unwrap`,e.address],mutationFn:async({amount:t})=>e.unwrap(t)}}function Se(e){return{mutationKey:[`zama.wrap`,e.address],mutationFn:async({amount:t,...n})=>e.wrap(t,n)}}function Ce(e){return{mutationKey:[`zama.unwrapAll`,e.address],mutationFn:async()=>e.unwrapAll()}}function we(e){return{mutationKey:[`zama.finalizeUnwrap`,e.address],mutationFn:async({unwrapRequestId:t})=>e.finalizeUnwrap(t)}}function Te(e){return{mutationKey:[`zama.encrypt`],mutationFn:async t=>e.encrypt(t)}}function Ee(e){return{mutationKey:[`zama.delegatedDecryptValues`],mutationFn:async t=>e.decryption.delegatedDecryptValues(t.encryptedInputs,t.delegatorAddress)}}function De(t){return{mutationKey:[`zama.decryptPublicValues`],mutationFn:async e=>t.decryption.decryptPublicValues(e),onSuccess:(t,n,r,i)=>{for(let[n,r]of Object.entries(t.clearValues))i.client.setQueryData(e.decryption.encryptedValue(n),r)}}}function $(e){return{mutationKey:[`zama.grantPermit`],mutationFn:t=>e.permits.grantPermit(t)}}function Oe(e){return{mutationKey:[`zama.preparePermit`],mutationFn:t=>e.offline.preparePermit(t)}}function ke(e){return{mutationKey:[`zama.batchPreparePermits`],mutationFn:t=>e.offline.batchPreparePermits(t)}}function Ae(e){return{mutationKey:[`zama.registerPermit`],mutationFn:({prepared:t,signature:n})=>e.permits.registerPermit(t,n)}}function je(e){return{mutationKey:[`zama.batchRegisterPermits`],mutationFn:t=>e.permits.batchRegisterPermits(t)}}function Me(t,n,r={}){let i=n.query?.enabled!==!1;return{...C(n?.query??{}),queryKey:e.hasPermit.scope(n.contractAddresses,r.walletAccount),queryFn:e=>{let[,{contractAddresses:n}]=e.queryKey;return t.permits.hasPermit(n)},staleTime:0,gcTime:0,refetchOnMount:`always`,refetchOnWindowFocus:!1,enabled:i&&r.walletAccount!==void 0&&n.contractAddresses.length>0}}function Ne(e){return{mutationKey:[`zama.revokePermits`],mutationFn:t=>t===void 0?e.permits.revokePermits():e.permits.revokePermits(t)}}function Pe(e){return{mutationKey:[`zama.clearCredentials`],mutationFn:()=>e.permits.clear()}}function Fe(e,t){return{mutationKey:[`zama.delegateDecryption`,t],mutationFn:async({delegateAddress:n,expirationDate:r})=>e.delegations.delegateDecryption({contractAddress:t,delegateAddress:n,expirationDate:r})}}function Ie(t,n,r={}){return{queryKey:e.decryption.encryptedInputs(n,r.walletAccount),queryFn:e=>{let[,{encryptedInputs:n}]=e.queryKey;return t.decryption.decryptValues(n)},staleTime:1/0,enabled:n.length>0&&r.walletAccount!==void 0}}function Le(e){return{mutationKey:[`zama.decryptBalanceAs`,e.address],mutationFn:async({delegatorAddress:t,accountAddress:n})=>e.decryptBalanceAs({delegatorAddress:t,accountAddress:n})}}function Re(e){return{mutationKey:[`zama.batchDecryptBalancesAs`,...e.map(e=>e.address)],mutationFn:async t=>f.batchDecryptBalancesAs(e,t)}}function ze(e,t){return{mutationKey:[`zama.revokeDelegation`,t],mutationFn:async({delegateAddress:n})=>e.delegations.revokeDelegation({contractAddress:t,delegateAddress:n})}}function Be(t,n){return{...C(n.query??{}),queryKey:e.delegationStatus.scope(n.contractAddress,n.delegatorAddress,n.delegateAddress),queryFn:async e=>{let[,{contractAddress:n,delegatorAddress:r,delegateAddress:i}]=e.queryKey;return u(n,`delegationStatusQueryOptions: contractAddress`),u(r,`delegationStatusQueryOptions: delegatorAddress`),u(i,`delegationStatusQueryOptions: delegateAddress`),t.delegations.getStatus({contractAddress:n,delegatorAddress:r,delegateAddress:i})},enabled:!!(n.contractAddress&&n.delegatorAddress&&n.delegateAddress)&&n.query?.enabled!==!1}}export{n as ZamaSDKEvents,_e as approveUnderlyingMutationOptions,Re as batchDecryptBalancesAsMutationOptions,ke as batchPreparePermitsMutationOptions,je as batchRegisterPermitsMutationOptions,Pe as clearCredentialsMutationOptions,Q as confidentialBalanceQueryOptions,ne as confidentialBalancesQueryOptions,Z as confidentialIsOperatorQueryOptions,ge as confidentialSetOperatorMutationOptions,ie as confidentialTokenAddressQueryOptions,pe as confidentialTransferAndCallMutationOptions,he as confidentialTransferFromAndCallMutationOptions,me as confidentialTransferFromMutationOptions,fe as confidentialTransferMutationOptions,Le as decryptBalanceAsMutationOptions,De as decryptPublicValuesMutationOptions,Ie as decryptValuesQueryOptions,Fe as delegateDecryptionMutationOptions,Ee as delegatedDecryptValuesMutationOptions,Be as delegationStatusQueryOptions,Te as encryptMutationOptions,C as filterQueryOptions,we as finalizeUnwrapMutationOptions,$ as grantPermitMutationOptions,Me as hasPermitQueryOptions,w as hashFn,P as invalidateAfterApproveUnderlying,F as invalidateAfterSetOperator,A as invalidateAfterShield,N as invalidateAfterTransfer,j as invalidateAfterUnshield,M as invalidateAfterUnshieldSettled,D as invalidateAfterUnwrap,O as invalidateAfterWrap,k as invalidateBalanceQueries,H as invalidateWagmiBalanceQueries,U as invalidateWalletLifecycleQueries,G as isConfidentialQueryOptions,le as isConfidentialTokenValidQueryOptions,K as isWrapperQueryOptions,ue as listPairsQueryOptions,X as pendingUnshieldQueryOptions,Oe as preparePermitMutationOptions,Ae as registerPermitMutationOptions,be as resumeUnshieldMutationOptions,ze as revokeDelegationMutationOptions,Ne as revokePermitsMutationOptions,de as shieldMutationOptions,ae as tokenAddressQueryOptions,W as tokenMetadataQueryOptions,ce as tokenPairQueryOptions,oe as tokenPairsLengthQueryOptions,re as tokenPairsQueryOptions,se as tokenPairsSliceQueryOptions,q as totalSupplyQueryOptions,Y as underlyingAllowanceQueryOptions,ye as unshieldAllMutationOptions,ve as unshieldMutationOptions,Ce as unwrapAllMutationOptions,xe as unwrapMutationOptions,Se as wrapMutationOptions,J as wrapperDiscoveryQueryOptions,e as zamaQueryKeys};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|