@zama-fhe/sdk 3.4.0-alpha.2 → 3.4.0-alpha.3

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.
@@ -1,5 +1,5 @@
1
1
  import { a as hoodi, c as sepolia, i as hardhat, n as bscTestnet, o as ingenTestnet, r as chains, s as mainnet, t as anvil } from "../index-doNE2KoX.js";
2
- import { It as EIP712TypedData, Nt as ClearValue, Pt as DecryptPublicValuesResult, Rt as EncryptParams, Ut as FhevmRelayerSDK, n as RelayerConfig, s as GenericLogger } from "../types-nwhfaUCK.js";
3
- import { t as cleartext } from "../cleartext-Bvx-0y6k.js";
4
- import { i as node, n as asyncLocalStorage, r as NodeRelayerConfig, t as AsyncLocalMapStorage } from "../index-CDJk5ZAg.js";
2
+ import { Ft as DecryptPublicValuesResult, Lt as EIP712TypedData, Pt as ClearValue, Wt as FhevmRelayerSDK, n as RelayerConfig, s as GenericLogger, zt as EncryptParams } from "../types-C5XL-FYs.js";
3
+ import { t as cleartext } from "../cleartext-D2thmTZC.js";
4
+ import { i as node, n as asyncLocalStorage, r as NodeRelayerConfig, t as AsyncLocalMapStorage } from "../index-DNToBw2D.js";
5
5
  export { AsyncLocalMapStorage, type ClearValue, type DecryptPublicValuesResult, type EIP712TypedData, type EncryptParams, type GenericLogger, type NodeRelayerConfig, type RelayerConfig, type FhevmRelayerSDK as RelayerSDK, anvil, asyncLocalStorage, bscTestnet, chains, cleartext, hardhat, hoodi, ingenTestnet, mainnet, node, sepolia };
@@ -1,3 +1,380 @@
1
- import { $ as TransferOptions, A as EncryptEndEvent, At as RawLog, B as TransferSubmittedEvent, Bt as EncryptedValue, D as DecryptErrorEvent, E as DecryptEndEvent, F as SetOperatorSubmittedEvent, G as ZamaSDKEvent, H as UnshieldPhase2StartedEvent, I as ShieldSubmittedEvent, It as EIP712TypedData, K as ZamaSDKEventInput, L as TransactionErrorEvent, Lt as EncryptInput, M as EncryptStartEvent, Mt as TransactionResult, N as FinalizeUnwrapSubmittedEvent, Nt as ClearValue, O as DecryptStartEvent, P as RevokeDelegationSubmittedEvent, Pt as DecryptPublicValuesResult, Q as ShieldPath, R as TransactionOperation, Rt as EncryptParams, T as BaseEvent, U as UnshieldPhase2SubmittedEvent, Ut as FhevmRelayerSDK, V as UnshieldPhase1SubmittedEvent, W as UnwrapSubmittedEvent, X as ApprovalStrategy, Y as ZamaSDKEvents, Z as ShieldOptions, c as GenericStorage, d as WalletAccount, et as UnshieldOptions, f as WalletAccountChange, ht as WrapEvent, i as ZamaConfig, j as EncryptErrorEvent, jt as TransactionReceipt, k as DelegationSubmittedEvent, lt as OnChainEvent, mt as UnwrapRequestedEvent, nt as TransferCallbacks, p as WalletAccountListener, pt as UnwrapFinalizedEvent, q as ZamaSDKEventListener, rt as UnshieldCallbacks, st as ConfidentialTransferEvent, tt as ShieldCallbacks, u as GenericSigner, w as ApproveUnderlyingSubmittedEvent, z as TransferFromSubmittedEvent, zt as EncryptResult } from "../types-nwhfaUCK.js";
2
- import { $ as confidentialTransferMutationOptions, A as encryptMutationOptions, An as tokenMetadataQueryOptions, B as UnshieldParams, Bn as invalidateAfterUnwrap, C as grantPermitMutationOptions, Cn as TotalSupplyQueryConfig, Ct as BatchDecryptAsOptions, D as DecryptResult, Dn as isWrapperQueryOptions, E as delegatedDecryptValuesMutationOptions, En as isConfidentialQueryOptions, F as unwrapMutationOptions, Fn as invalidateAfterSetOperator, G as confidentialSetOperatorMutationOptions, Gn as SignerQueryContext, H as ApproveUnderlyingParams, Hn as invalidateWagmiBalanceQueries, I as ResumeUnshieldParams, In as invalidateAfterShield, J as ConfidentialTransferFromParams, Jn as StrippedQueryOptionKeys, K as ConfidentialTransferFromAndCallParams, Kn as MutationFactoryOptions, L as resumeUnshieldMutationOptions, Ln as invalidateAfterTransfer, M as finalizeUnwrapMutationOptions, Mn as QueryFilterLike, N as unwrapAllMutationOptions, Nn as QueryLike, O as EncryptedInput, On as TokenMetadata, P as UnwrapParams, Pn as invalidateAfterApproveUnderlying, Q as ConfidentialTransferParams, R as UnshieldAllParams, Rn as invalidateAfterUnshield, S as hasPermitQueryOptions, St as BatchBalancesResult, T as DelegatedDecryptValuesMutationParams, Tn as IsConfidentialQueryConfig, U as approveUnderlyingMutationOptions, Un as invalidateWalletLifecycleQueries, V as unshieldMutationOptions, Vn as invalidateBalanceQueries, W as ConfidentialSetOperatorParams, Wn as zamaQueryKeys, X as ConfidentialTransferAndCallParams, Xn as hashFn, Y as confidentialTransferFromMutationOptions, Yn as filterQueryOptions, Z as confidentialTransferAndCallMutationOptions, _ as DelegateDecryptionParams, _t as ConfidentialBalancesQueryConfig, at as TokenAddressQueryConfig, b as revokePermitsMutationOptions, bt as confidentialBalanceQueryOptions, c as DelegationStatusData, cn as ConfidentialIsOperatorQueryConfig, ct as WrappersRegistryQueryConfig, d as RevokeDelegationParams, dn as pendingUnshieldQueryOptions, dt as listPairsQueryOptions, et as ShieldParams, f as revokeDelegationMutationOptions, fn as UnderlyingAllowanceQueryConfig, ft as tokenAddressQueryOptions, g as decryptBalanceAsMutationOptions, gt as tokenPairsSliceQueryOptions, h as DecryptBalanceAsParams, hn as wrapperDiscoveryQueryOptions, ht as tokenPairsQueryOptions, it as ListPairsQueryConfig, j as FinalizeUnwrapParams, jn as QueryClientLike, k as decryptValuesQueryOptions, kn as TokenMetadataQueryConfig, l as DelegationStatusQueryConfig, ln as confidentialIsOperatorQueryOptions, lt as confidentialTokenAddressQueryOptions, m as batchDecryptBalancesAsMutationOptions, mn as WrapperDiscoveryQueryConfig, mt as tokenPairsLengthQueryOptions, nt as ConfidentialTokenAddressQueryConfig, ot as TokenPairQueryConfig, p as BatchDecryptBalancesAsParams, pn as underlyingAllowanceQueryOptions, pt as tokenPairQueryOptions, q as confidentialTransferFromAndCallMutationOptions, qn as QueryFactoryOptions, rt as IsConfidentialTokenValidQueryConfig, st as TokenPairsSliceQueryConfig, t as ZamaSDK, tt as shieldMutationOptions, u as delegationStatusQueryOptions, un as PendingUnshieldQueryConfig, ut as isConfidentialTokenValidQueryOptions, v as delegateDecryptionMutationOptions, vt as confidentialBalancesQueryOptions, w as decryptPublicValuesMutationOptions, wn as totalSupplyQueryOptions, wt as Token, x as HasPermitQueryConfig, xn as SerializedTransportKeyPair, xt as WrappedToken, y as clearCredentialsMutationOptions, yt as ConfidentialBalanceQueryConfig, z as unshieldAllMutationOptions, zn as invalidateAfterUnshieldSettled } from "../zama-sdk-aaLl2ZlA.js";
3
- export { type ApprovalStrategy, type ApproveUnderlyingParams, type ApproveUnderlyingSubmittedEvent, type BaseEvent, type BatchBalancesResult, type BatchDecryptAsOptions, type BatchDecryptBalancesAsParams, type ClearValue, type ConfidentialBalanceQueryConfig, type ConfidentialBalancesQueryConfig, type ConfidentialIsOperatorQueryConfig, type ConfidentialSetOperatorParams, type ConfidentialTokenAddressQueryConfig, type ConfidentialTransferAndCallParams, type ConfidentialTransferEvent, type ConfidentialTransferFromAndCallParams, type ConfidentialTransferFromParams, type ConfidentialTransferParams, type DecryptBalanceAsParams, type DecryptEndEvent, type DecryptErrorEvent, type EncryptedInput as DecryptInput, type DecryptPublicValuesResult, type DecryptResult, type DecryptStartEvent, type DelegateDecryptionParams, type DelegatedDecryptValuesMutationParams, type DelegationStatusData, type DelegationStatusQueryConfig, type DelegationSubmittedEvent, type EIP712TypedData, type EncryptEndEvent, type EncryptErrorEvent, type EncryptInput, type EncryptParams, type EncryptResult, type EncryptStartEvent, type EncryptedValue, type FinalizeUnwrapParams, type FinalizeUnwrapSubmittedEvent, type GenericSigner, type GenericStorage, type HasPermitQueryConfig, type IsConfidentialQueryConfig, type IsConfidentialTokenValidQueryConfig, type ListPairsQueryConfig, type MutationFactoryOptions, type OnChainEvent, type PendingUnshieldQueryConfig, type QueryClientLike, type QueryFactoryOptions, type QueryFilterLike, type QueryLike, type RawLog, type FhevmRelayerSDK as RelayerSDK, type ResumeUnshieldParams, type RevokeDelegationParams, type RevokeDelegationSubmittedEvent, type SerializedTransportKeyPair, type SetOperatorSubmittedEvent, type ShieldCallbacks, type ShieldOptions, type ShieldParams, type ShieldPath, type ShieldSubmittedEvent, type SignerQueryContext, type StrippedQueryOptionKeys, type Token, type TokenAddressQueryConfig, type TokenMetadata, type TokenMetadataQueryConfig, type TokenPairQueryConfig, type TokenPairsSliceQueryConfig, type TotalSupplyQueryConfig, type TransactionErrorEvent, type TransactionOperation, type TransactionReceipt, type TransactionResult, 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 UnwrapFinalizedEvent, type UnwrapParams, type UnwrapRequestedEvent, type UnwrapSubmittedEvent, type WalletAccount, type WalletAccountChange, type WalletAccountListener, type WrapEvent, type WrappedToken, type WrapperDiscoveryQueryConfig, type WrappersRegistryQueryConfig, type ZamaConfig, type ZamaSDK, type ZamaSDKEvent, type ZamaSDKEventInput, type ZamaSDKEventListener, ZamaSDKEvents, approveUnderlyingMutationOptions, batchDecryptBalancesAsMutationOptions, 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, invalidateBalanceQueries, invalidateWagmiBalanceQueries, invalidateWalletLifecycleQueries, isConfidentialQueryOptions, isConfidentialTokenValidQueryOptions, isWrapperQueryOptions, listPairsQueryOptions, pendingUnshieldQueryOptions, resumeUnshieldMutationOptions, revokeDelegationMutationOptions, revokePermitsMutationOptions, shieldMutationOptions, tokenAddressQueryOptions, tokenMetadataQueryOptions, tokenPairQueryOptions, tokenPairsLengthQueryOptions, tokenPairsQueryOptions, tokenPairsSliceQueryOptions, totalSupplyQueryOptions, underlyingAllowanceQueryOptions, unshieldAllMutationOptions, unshieldMutationOptions, unwrapAllMutationOptions, unwrapMutationOptions, wrapperDiscoveryQueryOptions, zamaQueryKeys };
1
+ import { $ as TransferOptions, A as EncryptEndEvent, B as TransferSubmittedEvent, Bt as EncryptResult, D as DecryptErrorEvent, E as DecryptEndEvent, F as SetOperatorSubmittedEvent, Ft as DecryptPublicValuesResult, G as ZamaSDKEvent, H as UnshieldPhase2StartedEvent, I as ShieldSubmittedEvent, K as ZamaSDKEventInput, L as TransactionErrorEvent, Lt as EIP712TypedData, M as EncryptStartEvent, Mt as TransactionReceipt, N as FinalizeUnwrapSubmittedEvent, Nt as TransactionResult, O as DecryptStartEvent, P as RevokeDelegationSubmittedEvent, Pt as ClearValue, Q as ShieldPath, R as TransactionOperation, Rt as EncryptInput, T as BaseEvent, U as UnshieldPhase2SubmittedEvent, V as UnshieldPhase1SubmittedEvent, Vt as EncryptedValue, W as UnwrapSubmittedEvent, Wt as FhevmRelayerSDK, X as ApprovalStrategy, Y as ZamaSDKEvents, Z as ShieldOptions, c as GenericStorage, ct as ConfidentialTransferEvent, d as WalletAccount, et as UnshieldOptions, f as WalletAccountChange, gt as WrapEvent, ht as UnwrapRequestedEvent, i as ZamaConfig, it as UnshieldCallbacks, j as EncryptErrorEvent, jt as RawLog, k as DelegationSubmittedEvent, mt as UnwrapFinalizedEvent, nt as ShieldCallbacks, p as WalletAccountListener, q as ZamaSDKEventListener, rt as TransferCallbacks, tt as UnwrapResult, u as GenericSigner, ut as OnChainEvent, w as ApproveUnderlyingSubmittedEvent, z as TransferFromSubmittedEvent, zt as EncryptParams } from "../types-C5XL-FYs.js";
2
+ import { _ as BatchBalancesResult, _t as MutationFactoryOptions, bt as TokenWrapperPair, d as ZamaSDK, ft as DecryptResult, g as WrappedToken, gt as zamaQueryKeys, ht as SignerQueryContext, m as WrappersRegistry, mt as decryptValuesQueryOptions, pt as EncryptedInput, ut as SerializedTransportKeyPair, v as BatchDecryptAsOptions, vt as QueryFactoryOptions, xt as TokenWrapperPairWithMetadata, y as Token, yt as PaginatedResult } from "../index-09tK1t8M.js";
3
+ import "../index-DNToBw2D.js";
4
+ import { Address, Hex } from "viem";
5
+ //#region src/query/utils.d.ts
6
+ type StrippedQueryOptionKeys = "gcTime" | "staleTime" | "enabled" | "select" | "refetchInterval" | "refetchOnMount" | "refetchOnWindowFocus" | "refetchOnReconnect" | "retry" | "retryDelay" | "retryOnMount" | "queryFn" | "queryKey" | "queryKeyHashFn" | "initialData" | "initialDataUpdatedAt" | "placeholderData" | "structuralSharing" | "throwOnError" | "meta" | "query" | "pollingInterval";
7
+ /**
8
+ * Remove TanStack behavioral options from a query config object so only domain
9
+ * parameters remain for the lower-level factory.
10
+ *
11
+ * @example
12
+ * ```ts
13
+ * const params = filterQueryOptions({
14
+ * query: { enabled: false },
15
+ * gcTime: 60_000,
16
+ * owner: "0xabc",
17
+ * });
18
+ * // => { owner: "0xabc" }
19
+ * ```
20
+ */
21
+ declare function filterQueryOptions<TOptions extends Record<string, unknown>>(options: TOptions): Omit<TOptions, StrippedQueryOptionKeys>;
22
+ /**
23
+ * Stable hash function for query keys.
24
+ * Sorts object keys recursively and converts bigint values to strings.
25
+ *
26
+ * @remarks
27
+ * bigint values are serialized as decimal strings, so `42n` and `"42"` hash to
28
+ * the same token when they occupy the same position. This collision is accepted
29
+ * by design for the current query-key conventions in this package.
30
+ */
31
+ declare function hashFn(queryKey: readonly unknown[]): string;
32
+ //#endregion
33
+ //#region src/query/invalidation.d.ts
34
+ interface QueryLike {
35
+ queryKey: readonly unknown[];
36
+ }
37
+ interface QueryFilterLike {
38
+ queryKey?: readonly unknown[];
39
+ predicate?: (query: QueryLike) => boolean;
40
+ }
41
+ interface QueryClientLike {
42
+ invalidateQueries(filters: QueryFilterLike): void | Promise<void>;
43
+ removeQueries(filters: QueryFilterLike): void;
44
+ }
45
+ declare function invalidateAfterUnwrap(queryClient: QueryClientLike, tokenAddress: Address): void;
46
+ declare function invalidateBalanceQueries(queryClient: QueryClientLike, tokenAddress: Address): void;
47
+ declare function invalidateAfterShield(queryClient: QueryClientLike, tokenAddress: Address): void;
48
+ declare function invalidateAfterUnshield(queryClient: QueryClientLike, tokenAddress: Address): void;
49
+ declare function invalidateAfterUnshieldSettled(queryClient: QueryClientLike, tokenAddress: Address): void;
50
+ declare function invalidateAfterTransfer(queryClient: QueryClientLike, tokenAddress: Address): void;
51
+ declare function invalidateAfterApproveUnderlying(queryClient: QueryClientLike, tokenAddress: Address): void;
52
+ declare function invalidateAfterSetOperator(queryClient: QueryClientLike, tokenAddress: Address): void;
53
+ declare function invalidateWagmiBalanceQueries(queryClient: QueryClientLike): void;
54
+ declare function invalidateWalletLifecycleQueries(queryClient: QueryClientLike): void;
55
+ //#endregion
56
+ //#region src/query/token-metadata.d.ts
57
+ /** ERC-20 token metadata returned by {@link tokenMetadataQueryOptions}. */
58
+ interface TokenMetadata {
59
+ name: string;
60
+ symbol: string;
61
+ decimals: number;
62
+ }
63
+ interface TokenMetadataQueryConfig {
64
+ query?: Record<string, unknown>;
65
+ }
66
+ declare function tokenMetadataQueryOptions(sdk: ZamaSDK, tokenAddress: Address, config?: TokenMetadataQueryConfig): QueryFactoryOptions<TokenMetadata, Error, TokenMetadata, ReturnType<typeof zamaQueryKeys.tokenMetadata.token>>;
67
+ //#endregion
68
+ //#region src/query/is-confidential.d.ts
69
+ interface IsConfidentialQueryConfig {
70
+ query?: Record<string, unknown>;
71
+ }
72
+ declare function isConfidentialQueryOptions(sdk: ZamaSDK, tokenAddress: Address, config?: IsConfidentialQueryConfig): QueryFactoryOptions<boolean, Error, boolean, ReturnType<typeof zamaQueryKeys.isConfidential.token>>;
73
+ declare function isWrapperQueryOptions(sdk: ZamaSDK, tokenAddress: Address, config?: IsConfidentialQueryConfig): QueryFactoryOptions<boolean, Error, boolean, ReturnType<typeof zamaQueryKeys.isWrapper.token>>;
74
+ //#endregion
75
+ //#region src/query/total-supply.d.ts
76
+ interface TotalSupplyQueryConfig {
77
+ query?: Record<string, unknown>;
78
+ }
79
+ declare function totalSupplyQueryOptions(sdk: ZamaSDK, tokenAddress: Address, config?: TotalSupplyQueryConfig): QueryFactoryOptions<bigint, Error, bigint, ReturnType<typeof zamaQueryKeys.totalSupply.token>>;
80
+ //#endregion
81
+ //#region src/query/wrapper-discovery.d.ts
82
+ interface WrapperDiscoveryQueryConfig {
83
+ /**
84
+ * Address of any confidential token you control.
85
+ * Used to scope the query cache key and to gate whether the query
86
+ * is enabled — it does not affect which wrapper the registry returns.
87
+ */
88
+ tokenAddress?: Address;
89
+ /**
90
+ * The ERC-20 token address to discover the confidential wrapper for.
91
+ * The registry is resolved automatically from chain config.
92
+ */
93
+ erc20Address?: Address;
94
+ /**
95
+ * The resolved registry contract address for the current chain.
96
+ * Included in the query key so that switching chains invalidates
97
+ * stale cached results. Pass `undefined` when the chain ID is not
98
+ * yet known — the query will be disabled.
99
+ */
100
+ registryAddress?: Address;
101
+ query?: Record<string, unknown>;
102
+ }
103
+ declare function wrapperDiscoveryQueryOptions(registry: WrappersRegistry, config: WrapperDiscoveryQueryConfig): QueryFactoryOptions<Address | null, Error, Address | null, ReturnType<typeof zamaQueryKeys.wrapperDiscovery.token>>;
104
+ //#endregion
105
+ //#region src/query/underlying-allowance.d.ts
106
+ interface UnderlyingAllowanceQueryConfig {
107
+ owner?: Address;
108
+ query?: Record<string, unknown>;
109
+ }
110
+ declare function underlyingAllowanceQueryOptions(sdk: ZamaSDK, tokenAddress: Address, config: UnderlyingAllowanceQueryConfig): QueryFactoryOptions<bigint, Error, bigint, ReturnType<typeof zamaQueryKeys.underlyingAllowance.scope>>;
111
+ //#endregion
112
+ //#region src/query/pending-unshield.d.ts
113
+ interface PendingUnshieldQueryConfig {
114
+ query?: Record<string, unknown>;
115
+ }
116
+ /**
117
+ * Query options for reading the unwrap tx hash of an unshield that was
118
+ * interrupted between its two phases (returns `null` if none is pending).
119
+ *
120
+ * Backed by {@link ZamaSDK} storage via `WrappedToken.getPendingUnshield()`.
121
+ * `staleTime: 0` so the value reflects storage on mount; the unshield/unwrap
122
+ * mutations also invalidate this key on success.
123
+ */
124
+ declare function pendingUnshieldQueryOptions(sdk: ZamaSDK, tokenAddress: Address, config?: PendingUnshieldQueryConfig): QueryFactoryOptions<Hex | null, Error, Hex | null, ReturnType<typeof zamaQueryKeys.pendingUnshield.token>>;
125
+ //#endregion
126
+ //#region src/query/confidential-is-operator.d.ts
127
+ interface ConfidentialIsOperatorQueryConfig {
128
+ holder?: Address;
129
+ spender?: Address;
130
+ query?: Record<string, unknown>;
131
+ }
132
+ declare function confidentialIsOperatorQueryOptions(sdk: ZamaSDK, tokenAddress: Address | undefined, config: ConfidentialIsOperatorQueryConfig): QueryFactoryOptions<boolean, Error, boolean, ReturnType<typeof zamaQueryKeys.confidentialIsOperator.scope>>;
133
+ //#endregion
134
+ //#region src/query/confidential-balance.d.ts
135
+ interface ConfidentialBalanceQueryConfig {
136
+ tokenAddress: Address;
137
+ account?: Address;
138
+ query?: Record<string, unknown>;
139
+ }
140
+ /** Query options for a single confidential token balance. Auto-gated on `account`. */
141
+ declare function confidentialBalanceQueryOptions(token: Token, config: ConfidentialBalanceQueryConfig, signerContext?: SignerQueryContext): QueryFactoryOptions<bigint, Error, bigint, ReturnType<typeof zamaQueryKeys.confidentialBalance.owner>>;
142
+ //#endregion
143
+ //#region src/query/confidential-balances.d.ts
144
+ interface ConfidentialBalancesQueryConfig {
145
+ account?: Address;
146
+ query?: Record<string, unknown>;
147
+ }
148
+ declare function confidentialBalancesQueryOptions(tokens: Token[], config?: ConfidentialBalancesQueryConfig, signerContext?: SignerQueryContext): QueryFactoryOptions<BatchBalancesResult, Error, BatchBalancesResult, ReturnType<typeof zamaQueryKeys.confidentialBalances.tokens>>;
149
+ //#endregion
150
+ //#region src/query/wrappers-registry.d.ts
151
+ interface WrappersRegistryQueryConfig {
152
+ registryAddress: Address | undefined;
153
+ query?: Record<string, unknown>;
154
+ }
155
+ declare function tokenPairsQueryOptions(sdk: ZamaSDK, config: WrappersRegistryQueryConfig): QueryFactoryOptions<readonly TokenWrapperPair[], Error, readonly TokenWrapperPair[], ReturnType<typeof zamaQueryKeys.wrappersRegistry.tokenPairs>>;
156
+ interface ConfidentialTokenAddressQueryConfig extends WrappersRegistryQueryConfig {
157
+ tokenAddress?: Address;
158
+ }
159
+ declare function confidentialTokenAddressQueryOptions(sdk: ZamaSDK, config: ConfidentialTokenAddressQueryConfig): QueryFactoryOptions<readonly [boolean, Address], Error, readonly [boolean, Address], ReturnType<typeof zamaQueryKeys.wrappersRegistry.confidentialTokenAddress>>;
160
+ interface TokenAddressQueryConfig extends WrappersRegistryQueryConfig {
161
+ confidentialTokenAddress?: Address;
162
+ }
163
+ declare function tokenAddressQueryOptions(sdk: ZamaSDK, config: TokenAddressQueryConfig): QueryFactoryOptions<readonly [boolean, Address], Error, readonly [boolean, Address], ReturnType<typeof zamaQueryKeys.wrappersRegistry.tokenAddress>>;
164
+ declare function tokenPairsLengthQueryOptions(sdk: ZamaSDK, config: WrappersRegistryQueryConfig): QueryFactoryOptions<bigint, Error, bigint, ReturnType<typeof zamaQueryKeys.wrappersRegistry.tokenPairsLength>>;
165
+ interface TokenPairsSliceQueryConfig extends WrappersRegistryQueryConfig {
166
+ fromIndex?: bigint;
167
+ toIndex?: bigint;
168
+ }
169
+ declare function tokenPairsSliceQueryOptions(sdk: ZamaSDK, config: TokenPairsSliceQueryConfig): QueryFactoryOptions<readonly TokenWrapperPair[], Error, readonly TokenWrapperPair[], ReturnType<typeof zamaQueryKeys.wrappersRegistry.tokenPairsSlice>>;
170
+ interface TokenPairQueryConfig extends WrappersRegistryQueryConfig {
171
+ index?: bigint;
172
+ }
173
+ declare function tokenPairQueryOptions(sdk: ZamaSDK, config: TokenPairQueryConfig): QueryFactoryOptions<TokenWrapperPair, Error, TokenWrapperPair, ReturnType<typeof zamaQueryKeys.wrappersRegistry.tokenPair>>;
174
+ interface IsConfidentialTokenValidQueryConfig extends WrappersRegistryQueryConfig {
175
+ confidentialTokenAddress?: Address;
176
+ }
177
+ declare function isConfidentialTokenValidQueryOptions(sdk: ZamaSDK, config: IsConfidentialTokenValidQueryConfig): QueryFactoryOptions<boolean, Error, boolean, ReturnType<typeof zamaQueryKeys.wrappersRegistry.isConfidentialTokenValid>>;
178
+ interface ListPairsQueryConfig {
179
+ /**
180
+ * The registry address for this chain — used as a query key discriminator.
181
+ * The registry instance already knows how to resolve the address for the
182
+ * current chain; this field just keeps the TanStack Query cache isolated
183
+ * per registry contract.
184
+ */
185
+ registryAddress: Address | undefined;
186
+ page?: number;
187
+ pageSize?: number;
188
+ metadata?: boolean;
189
+ query?: Record<string, unknown>;
190
+ }
191
+ /**
192
+ * Query options for paginated listing of token wrapper pairs.
193
+ *
194
+ * Accepts a {@link WrappersRegistry} instance rather than a raw provider so that the
195
+ * class-level TTL cache is shared across multiple `queryFn` executions. Pass
196
+ * `sdk.registry` (the ZamaSDK lazy singleton) to ensure a single shared cache.
197
+ */
198
+ declare function listPairsQueryOptions(registry: WrappersRegistry, config: ListPairsQueryConfig): QueryFactoryOptions<PaginatedResult<TokenWrapperPair | TokenWrapperPairWithMetadata>, Error, PaginatedResult<TokenWrapperPair | TokenWrapperPairWithMetadata>, ReturnType<typeof zamaQueryKeys.wrappersRegistry.listPairs>>;
199
+ //#endregion
200
+ //#region src/query/shield.d.ts
201
+ /** Variables for {@link shieldMutationOptions}. */
202
+ interface ShieldParams extends ShieldOptions {
203
+ amount: bigint;
204
+ }
205
+ declare function shieldMutationOptions(token: WrappedToken): MutationFactoryOptions<readonly ["zama.shield", Address], ShieldParams, TransactionResult>;
206
+ //#endregion
207
+ //#region src/query/transfer.d.ts
208
+ /** Variables for {@link confidentialTransferMutationOptions}. */
209
+ interface ConfidentialTransferParams extends TransferOptions {
210
+ to: Address;
211
+ amount: bigint;
212
+ }
213
+ declare function confidentialTransferMutationOptions(token: Token): MutationFactoryOptions<readonly ["zama.confidentialTransfer", Address], ConfidentialTransferParams, TransactionResult>;
214
+ //#endregion
215
+ //#region src/query/transfer-and-call.d.ts
216
+ /** Variables for {@link confidentialTransferAndCallMutationOptions}. */
217
+ interface ConfidentialTransferAndCallParams extends TransferOptions {
218
+ to: Address;
219
+ amount: bigint;
220
+ /** Opaque bytes forwarded to the recipient's ERC-7984 receiver hook. */
221
+ data: Hex;
222
+ }
223
+ declare function confidentialTransferAndCallMutationOptions(token: Token): MutationFactoryOptions<readonly ["zama.confidentialTransferAndCall", Address], ConfidentialTransferAndCallParams, TransactionResult>;
224
+ //#endregion
225
+ //#region src/query/transfer-from.d.ts
226
+ /** Variables for {@link confidentialTransferFromMutationOptions}. */
227
+ interface ConfidentialTransferFromParams {
228
+ from: Address;
229
+ to: Address;
230
+ amount: bigint;
231
+ /** Optional progress callbacks for the multi-step transfer flow. */
232
+ callbacks?: TransferCallbacks;
233
+ }
234
+ declare function confidentialTransferFromMutationOptions(token: Token): MutationFactoryOptions<readonly ["zama.confidentialTransferFrom", Address], ConfidentialTransferFromParams, TransactionResult>;
235
+ //#endregion
236
+ //#region src/query/transfer-from-and-call.d.ts
237
+ /** Variables for {@link confidentialTransferFromAndCallMutationOptions}. */
238
+ interface ConfidentialTransferFromAndCallParams {
239
+ from: Address;
240
+ to: Address;
241
+ amount: bigint;
242
+ /** Opaque bytes forwarded to the recipient's ERC-7984 receiver hook. */
243
+ data: Hex;
244
+ /** Optional progress callbacks for the multi-step transfer flow. */
245
+ callbacks?: TransferCallbacks;
246
+ }
247
+ declare function confidentialTransferFromAndCallMutationOptions(token: Token): MutationFactoryOptions<readonly ["zama.confidentialTransferFromAndCall", Address], ConfidentialTransferFromAndCallParams, TransactionResult>;
248
+ //#endregion
249
+ //#region src/query/set-operator.d.ts
250
+ /** Variables for {@link confidentialSetOperatorMutationOptions}. */
251
+ interface ConfidentialSetOperatorParams {
252
+ operator: Address;
253
+ until?: number;
254
+ }
255
+ declare function confidentialSetOperatorMutationOptions(token: Token): MutationFactoryOptions<readonly ["zama.confidentialSetOperator", Address], ConfidentialSetOperatorParams, TransactionResult>;
256
+ //#endregion
257
+ //#region src/query/approve-underlying.d.ts
258
+ /** Variables for {@link approveUnderlyingMutationOptions}. */
259
+ interface ApproveUnderlyingParams {
260
+ amount?: bigint;
261
+ }
262
+ declare function approveUnderlyingMutationOptions(token: WrappedToken): MutationFactoryOptions<readonly ["zama.approveUnderlying", Address], ApproveUnderlyingParams, TransactionResult>;
263
+ //#endregion
264
+ //#region src/query/unshield.d.ts
265
+ /** Variables for {@link unshieldMutationOptions}. */
266
+ interface UnshieldParams extends UnshieldOptions {
267
+ amount: bigint;
268
+ }
269
+ declare function unshieldMutationOptions(token: WrappedToken): MutationFactoryOptions<readonly ["zama.unshield", Address], UnshieldParams, TransactionResult>;
270
+ //#endregion
271
+ //#region src/query/unshield-all.d.ts
272
+ /** Variables for {@link unshieldAllMutationOptions}. */
273
+ interface UnshieldAllParams extends UnshieldCallbacks {}
274
+ declare function unshieldAllMutationOptions(token: WrappedToken): MutationFactoryOptions<readonly ["zama.unshieldAll", Address], UnshieldAllParams | void, TransactionResult>;
275
+ //#endregion
276
+ //#region src/query/resume-unshield.d.ts
277
+ /** Variables for {@link resumeUnshieldMutationOptions}. */
278
+ interface ResumeUnshieldParams extends UnshieldCallbacks {
279
+ unwrapTxHash: Hex;
280
+ }
281
+ declare function resumeUnshieldMutationOptions(token: WrappedToken): MutationFactoryOptions<readonly ["zama.resumeUnshield", Address], ResumeUnshieldParams, TransactionResult>;
282
+ //#endregion
283
+ //#region src/query/unwrap.d.ts
284
+ /** Variables for {@link unwrapMutationOptions}. */
285
+ interface UnwrapParams {
286
+ amount: bigint;
287
+ }
288
+ declare function unwrapMutationOptions(token: WrappedToken): MutationFactoryOptions<readonly ["zama.unwrap", Address], UnwrapParams, UnwrapResult>;
289
+ //#endregion
290
+ //#region src/query/unwrap-all.d.ts
291
+ declare function unwrapAllMutationOptions(token: WrappedToken): MutationFactoryOptions<readonly ["zama.unwrapAll", Address], void, UnwrapResult>;
292
+ //#endregion
293
+ //#region src/query/finalize-unwrap.d.ts
294
+ /** Variables for {@link finalizeUnwrapMutationOptions}. */
295
+ type FinalizeUnwrapParams = {
296
+ /** Identifier from an `UnwrapRequested` event. */
297
+ unwrapRequestId: EncryptedValue;
298
+ };
299
+ declare function finalizeUnwrapMutationOptions(token: WrappedToken): MutationFactoryOptions<readonly ["zama.finalizeUnwrap", Address], FinalizeUnwrapParams, TransactionResult>;
300
+ //#endregion
301
+ //#region src/query/encrypt.d.ts
302
+ declare function encryptMutationOptions(sdk: ZamaSDK): MutationFactoryOptions<readonly ["zama.encrypt"], EncryptParams, EncryptResult>;
303
+ //#endregion
304
+ //#region src/query/delegated-decrypt.d.ts
305
+ interface DelegatedDecryptValuesMutationParams {
306
+ encryptedInputs: EncryptedInput[];
307
+ delegatorAddress: Address;
308
+ }
309
+ declare function delegatedDecryptValuesMutationOptions(sdk: ZamaSDK): MutationFactoryOptions<readonly ["zama.delegatedDecryptValues"], DelegatedDecryptValuesMutationParams, Readonly<Record<EncryptedValue, ClearValue>>>;
310
+ //#endregion
311
+ //#region src/query/public-decrypt.d.ts
312
+ declare function decryptPublicValuesMutationOptions(sdk: ZamaSDK): MutationFactoryOptions<readonly ["zama.decryptPublicValues"], EncryptedValue[], DecryptPublicValuesResult>;
313
+ //#endregion
314
+ //#region src/query/grant-permit.d.ts
315
+ declare function grantPermitMutationOptions(sdk: ZamaSDK): MutationFactoryOptions<readonly ["zama.grantPermit"], Address[], void>;
316
+ //#endregion
317
+ //#region src/query/has-permit.d.ts
318
+ interface HasPermitQueryConfig {
319
+ /** Contract addresses to check credentials against. */
320
+ contractAddresses: Address[];
321
+ /**
322
+ * Standard TanStack query options. `hasPermit` intentionally overrides cache
323
+ * timing because permit state is wallet-local, not server state: every fetch
324
+ * should read the SDK credential service directly.
325
+ */
326
+ query?: Record<string, unknown>;
327
+ }
328
+ declare function hasPermitQueryOptions(sdk: ZamaSDK, config: HasPermitQueryConfig, signerContext?: SignerQueryContext): QueryFactoryOptions<boolean, Error, boolean, ReturnType<typeof zamaQueryKeys.hasPermit.scope>>;
329
+ //#endregion
330
+ //#region src/query/revoke-permits.d.ts
331
+ /** TanStack Query mutation factory for {@link Permits.revokePermits}. */
332
+ declare function revokePermitsMutationOptions(sdk: ZamaSDK): MutationFactoryOptions<readonly ["zama.revokePermits"], Address[] | void, void>;
333
+ //#endregion
334
+ //#region src/query/clear-credentials.d.ts
335
+ /** TanStack Query mutation factory for {@link Permits.clear}. */
336
+ declare function clearCredentialsMutationOptions(sdk: ZamaSDK): MutationFactoryOptions<readonly ["zama.clearCredentials"], void, void>;
337
+ //#endregion
338
+ //#region src/query/delegate-decryption.d.ts
339
+ /** Variables for {@link delegateDecryptionMutationOptions}. */
340
+ interface DelegateDecryptionParams {
341
+ delegateAddress: Address;
342
+ expirationDate?: Date;
343
+ }
344
+ declare function delegateDecryptionMutationOptions(sdk: ZamaSDK, contractAddress: Address): MutationFactoryOptions<readonly ["zama.delegateDecryption", Address], DelegateDecryptionParams, TransactionResult>;
345
+ //#endregion
346
+ //#region src/query/decrypt-balance-as.d.ts
347
+ /** Variables for {@link decryptBalanceAsMutationOptions}. */
348
+ interface DecryptBalanceAsParams {
349
+ delegatorAddress: Address;
350
+ accountAddress?: Address;
351
+ }
352
+ declare function decryptBalanceAsMutationOptions(token: Token): MutationFactoryOptions<readonly ["zama.decryptBalanceAs", Address], DecryptBalanceAsParams, bigint>;
353
+ //#endregion
354
+ //#region src/query/batch-decrypt-balances-as.d.ts
355
+ /** Variables for {@link batchDecryptBalancesAsMutationOptions}. */
356
+ type BatchDecryptBalancesAsParams = BatchDecryptAsOptions;
357
+ declare function batchDecryptBalancesAsMutationOptions(tokens: Token[]): MutationFactoryOptions<readonly ["zama.batchDecryptBalancesAs", ...Address[]], BatchDecryptBalancesAsParams, Map<Address, bigint>>;
358
+ //#endregion
359
+ //#region src/query/revoke-delegation.d.ts
360
+ /** Variables for {@link revokeDelegationMutationOptions}. */
361
+ interface RevokeDelegationParams {
362
+ delegateAddress: Address;
363
+ }
364
+ declare function revokeDelegationMutationOptions(sdk: ZamaSDK, contractAddress: Address): MutationFactoryOptions<readonly ["zama.revokeDelegation", Address], RevokeDelegationParams, TransactionResult>;
365
+ //#endregion
366
+ //#region src/query/delegation-status.d.ts
367
+ interface DelegationStatusData {
368
+ isActive: boolean;
369
+ expiryTimestamp: bigint;
370
+ }
371
+ interface DelegationStatusQueryConfig {
372
+ contractAddress: Address | undefined;
373
+ delegatorAddress?: Address;
374
+ delegateAddress?: Address;
375
+ query?: Record<string, unknown>;
376
+ }
377
+ declare function delegationStatusQueryOptions(sdk: ZamaSDK, config: DelegationStatusQueryConfig): QueryFactoryOptions<DelegationStatusData, Error, DelegationStatusData, ReturnType<typeof zamaQueryKeys.delegationStatus.scope>>;
378
+ //#endregion
379
+ export { type ApprovalStrategy, type ApproveUnderlyingParams, type ApproveUnderlyingSubmittedEvent, type BaseEvent, type BatchBalancesResult, type BatchDecryptAsOptions, type BatchDecryptBalancesAsParams, type ClearValue, type ConfidentialBalanceQueryConfig, type ConfidentialBalancesQueryConfig, type ConfidentialIsOperatorQueryConfig, type ConfidentialSetOperatorParams, type ConfidentialTokenAddressQueryConfig, type ConfidentialTransferAndCallParams, type ConfidentialTransferEvent, type ConfidentialTransferFromAndCallParams, type ConfidentialTransferFromParams, type ConfidentialTransferParams, type DecryptBalanceAsParams, type DecryptEndEvent, type DecryptErrorEvent, type EncryptedInput as DecryptInput, type DecryptPublicValuesResult, type DecryptResult, type DecryptStartEvent, type DelegateDecryptionParams, type DelegatedDecryptValuesMutationParams, type DelegationStatusData, type DelegationStatusQueryConfig, type DelegationSubmittedEvent, type EIP712TypedData, type EncryptEndEvent, type EncryptErrorEvent, type EncryptInput, type EncryptParams, type EncryptResult, type EncryptStartEvent, type EncryptedValue, type FinalizeUnwrapParams, type FinalizeUnwrapSubmittedEvent, type GenericSigner, type GenericStorage, type HasPermitQueryConfig, type IsConfidentialQueryConfig, type IsConfidentialTokenValidQueryConfig, type ListPairsQueryConfig, type MutationFactoryOptions, type OnChainEvent, type PendingUnshieldQueryConfig, type QueryClientLike, type QueryFactoryOptions, type QueryFilterLike, type QueryLike, type RawLog, type FhevmRelayerSDK as RelayerSDK, type ResumeUnshieldParams, type RevokeDelegationParams, type RevokeDelegationSubmittedEvent, type SerializedTransportKeyPair, type SetOperatorSubmittedEvent, type ShieldCallbacks, type ShieldOptions, type ShieldParams, type ShieldPath, type ShieldSubmittedEvent, type SignerQueryContext, type StrippedQueryOptionKeys, type Token, type TokenAddressQueryConfig, type TokenMetadata, type TokenMetadataQueryConfig, type TokenPairQueryConfig, type TokenPairsSliceQueryConfig, type TotalSupplyQueryConfig, type TransactionErrorEvent, type TransactionOperation, type TransactionReceipt, type TransactionResult, 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 UnwrapFinalizedEvent, type UnwrapParams, type UnwrapRequestedEvent, type UnwrapSubmittedEvent, type WalletAccount, type WalletAccountChange, type WalletAccountListener, type WrapEvent, type WrappedToken, type WrapperDiscoveryQueryConfig, type WrappersRegistryQueryConfig, type ZamaConfig, type ZamaSDK, type ZamaSDKEvent, type ZamaSDKEventInput, type ZamaSDKEventListener, ZamaSDKEvents, approveUnderlyingMutationOptions, batchDecryptBalancesAsMutationOptions, 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, invalidateBalanceQueries, invalidateWagmiBalanceQueries, invalidateWalletLifecycleQueries, isConfidentialQueryOptions, isConfidentialTokenValidQueryOptions, isWrapperQueryOptions, listPairsQueryOptions, pendingUnshieldQueryOptions, resumeUnshieldMutationOptions, revokeDelegationMutationOptions, revokePermitsMutationOptions, shieldMutationOptions, tokenAddressQueryOptions, tokenMetadataQueryOptions, tokenPairQueryOptions, tokenPairsLengthQueryOptions, tokenPairsQueryOptions, tokenPairsSliceQueryOptions, totalSupplyQueryOptions, underlyingAllowanceQueryOptions, unshieldAllMutationOptions, unshieldMutationOptions, unwrapAllMutationOptions, unwrapMutationOptions, wrapperDiscoveryQueryOptions, zamaQueryKeys };
380
+ //# sourceMappingURL=index.d.ts.map