@zama-fhe/sdk 3.2.0-alpha.2 → 3.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/base-signer.cjs.map +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/cjs/relayer-sdk.worker.js +2 -2
- package/dist/cjs/web/index.cjs +2 -2
- package/dist/esm/base-signer-BVqcM5jt.js.map +1 -1
- package/dist/esm/{cleartext-CCfrFze1.d.ts → cleartext-DMW5nK1M.d.ts} +2 -2
- package/dist/esm/ethers/index.d.ts +2 -2
- package/dist/esm/{index-Dxizm4rJ.d.ts → index-DoVo9J1n.d.ts} +2 -2
- package/dist/esm/index.d.ts +6 -6
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/node/index.d.ts +2 -2
- package/dist/esm/query/index.d.ts +3 -3
- package/dist/esm/relayer-sdk.worker.js +2 -2
- package/dist/esm/{types-DdUTTFUy.d.ts → types-BjDu-RZg.d.ts} +23 -17
- package/dist/esm/{types-DF2ClIc_.d.ts → types-DiZhtG8i.d.ts} +2 -2
- package/dist/esm/{types-BAp_HdIk.d.ts → types-Xg_On_yY.d.ts} +2 -2
- package/dist/esm/viem/index.d.ts +2 -2
- package/dist/esm/web/index.d.ts +1 -1
- package/dist/esm/web/index.js +2 -2
- package/package.json +3 -3
package/dist/esm/node/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { n as FheChain } from "../types-BgczXqW2.js";
|
|
2
2
|
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-CYBH0nyo.js";
|
|
3
3
|
import { $ as CreateDelegatedEIP712ResponseData, At as WorkerRequest, C as BaseWorkerClient, Ct as RequestZKProofVerificationResponseData, Dt as UserDecryptRequest, Et as UserDecryptPayload, M as GenericStorage, Mt as WorkerResponse, Ot as UserDecryptResponseData, Q as CreateDelegatedEIP712Request, St as RequestZKProofVerificationRequest, Tt as UpdateCsrfRequest, X as BaseRequest, Z as CreateDelegatedEIP712Payload, _ as PublicParamsData, _t as InitPayload, at as DelegatedUserDecryptResponseData, bt as PublicDecryptRequest, c as DelegatedUserDecryptParams, ct as EncryptResponseData, d as EncryptParams, dt as GenerateKeypairResponseData, et as CreateEIP712Payload, f as EncryptResult, ft as GenericLogger, g as PublicDecryptResult, gt as GetPublicParamsResponseData, ht as GetPublicParamsRequest, it as DelegatedUserDecryptRequest, jt as WorkerRequestType, kt as WorkerEnv, l as EIP712TypedData, lt as ErrorResponse, m as FheEncryptionKey, mt as GetPublicKeyResponseData, n as RelayerSDK, nt as CreateEIP712ResponseData, o as TransportKeyPair, ot as EncryptPayload, p as EncryptedValue, pt as GetPublicKeyRequest, rt as DelegatedUserDecryptPayload, s as ClearValue, st as EncryptRequest, tt as CreateEIP712Request, ut as GenerateKeypairRequest, vt as InitRequest, wt as SuccessResponse, x as UserDecryptParams, xt as PublicDecryptResponseData, yt as PublicDecryptPayload } from "../relayer-cleartext-DkKKjfI6.js";
|
|
4
|
-
import { l as BaseRelayer, n as RelayerConfig } from "../types-
|
|
5
|
-
import { t as cleartext } from "../cleartext-
|
|
4
|
+
import { l as BaseRelayer, n as RelayerConfig } from "../types-BjDu-RZg.js";
|
|
5
|
+
import { t as cleartext } from "../cleartext-DMW5nK1M.js";
|
|
6
6
|
import { Address, Hex } from "viem";
|
|
7
7
|
import { Worker } from "node:worker_threads";
|
|
8
8
|
import { InputProofBytesType, KmsDelegatedUserDecryptEIP712Type, ZKProofLike } from "@zama-fhe/relayer-sdk/node";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { A as TransferCallbacks, B as TransactionReceipt, D as TransferOptions, E as ShieldPath, F as WalletAccount, I as WalletAccountChange, L as WalletAccountListener, M as GenericStorage, O as UnshieldOptions, P as GenericSigner, T as ShieldOptions, V as TransactionResult, c as DelegatedUserDecryptParams, d as EncryptParams, f as EncryptResult, g as PublicDecryptResult, j as UnshieldCallbacks, k as ShieldCallbacks, l as EIP712TypedData, n as RelayerSDK, o as TransportKeyPair, p as EncryptedValue, s as ClearValue, u as EncryptInput, w as ApprovalStrategy, x as UserDecryptParams, z as RawLog } from "../relayer-cleartext-DkKKjfI6.js";
|
|
2
|
-
import { A as UnshieldPhase2StartedEvent, C as SetOperatorSubmittedEvent, D as TransferFromSubmittedEvent, E as TransactionOperation, F as ZamaSDKEventListener, J as UnwrapRequestedEvent, L as ZamaSDKEvents, M as UnwrapSubmittedEvent, N as ZamaSDKEvent, O as TransferSubmittedEvent, P as ZamaSDKEventInput, S as RevokeDelegationSubmittedEvent, T as TransactionErrorEvent, U as OnChainEvent, V as ConfidentialTransferEvent, Y as
|
|
3
|
-
import { $ as DecryptResult, at as QueryFactoryOptions, ct as TokenWrapperPairWithMetadata, d as WrappedToken, et as EncryptedInput, f as BatchBalancesResult, it as MutationFactoryOptions, l as WrappersRegistry, m as Token, nt as SignerQueryContext, o as ZamaSDK, ot as PaginatedResult, p as BatchDecryptAsOptions, rt as zamaQueryKeys, st as TokenWrapperPair, tt as decryptValuesQueryOptions } from "../index-
|
|
2
|
+
import { A as UnshieldPhase2StartedEvent, C as SetOperatorSubmittedEvent, D as TransferFromSubmittedEvent, E as TransactionOperation, F as ZamaSDKEventListener, J as UnwrapRequestedEvent, L as ZamaSDKEvents, M as UnwrapSubmittedEvent, N as ZamaSDKEvent, O as TransferSubmittedEvent, P as ZamaSDKEventInput, S as RevokeDelegationSubmittedEvent, T as TransactionErrorEvent, U as OnChainEvent, V as ConfidentialTransferEvent, Y as WrapEvent, _ as DelegationSubmittedEvent, a as ZamaConfig, b as EncryptStartEvent, f as ApproveUnderlyingSubmittedEvent, g as DecryptStartEvent, h as DecryptErrorEvent, j as UnshieldPhase2SubmittedEvent, k as UnshieldPhase1SubmittedEvent, m as DecryptEndEvent, p as BaseEvent, q as UnwrapFinalizedEvent, v as EncryptEndEvent, w as ShieldSubmittedEvent, x as FinalizeUnwrapSubmittedEvent, y as EncryptErrorEvent } from "../types-BjDu-RZg.js";
|
|
3
|
+
import { $ as DecryptResult, at as QueryFactoryOptions, ct as TokenWrapperPairWithMetadata, d as WrappedToken, et as EncryptedInput, f as BatchBalancesResult, it as MutationFactoryOptions, l as WrappersRegistry, m as Token, nt as SignerQueryContext, o as ZamaSDK, ot as PaginatedResult, p as BatchDecryptAsOptions, rt as zamaQueryKeys, st as TokenWrapperPair, tt as decryptValuesQueryOptions } from "../index-DoVo9J1n.js";
|
|
4
4
|
import { Address, Hex } from "viem";
|
|
5
5
|
|
|
6
6
|
//#region src/query/utils.d.ts
|
|
@@ -338,5 +338,5 @@ interface DelegationStatusQueryConfig {
|
|
|
338
338
|
}
|
|
339
339
|
declare function delegationStatusQueryOptions(sdk: ZamaSDK, config: DelegationStatusQueryConfig): QueryFactoryOptions<DelegationStatusData, Error, DelegationStatusData, ReturnType<typeof zamaQueryKeys.delegationStatus.scope>>;
|
|
340
340
|
//#endregion
|
|
341
|
-
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 ConfidentialTransferEvent, type ConfidentialTransferFromParams, type ConfidentialTransferParams, type DecryptBalanceAsParams, type DecryptEndEvent, type DecryptErrorEvent, type EncryptedInput as DecryptInput, type PublicDecryptResult as DecryptPublicValuesResult, type DecryptResult, type DecryptStartEvent, type UserDecryptParams as DecryptValuesParams, type DelegateDecryptionParams, type DelegatedDecryptValuesMutationParams, type DelegatedUserDecryptParams as DelegatedDecryptValuesParams, 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 QueryClientLike, type QueryFactoryOptions, type QueryFilterLike, type QueryLike, type RawLog, type RelayerSDK, type ResumeUnshieldParams, type RevokeDelegationParams, type RevokeDelegationSubmittedEvent, type SetOperatorSubmittedEvent, type ShieldCallbacks, type ShieldOptions, type ShieldParams, type ShieldPath, type ShieldSubmittedEvent, 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 TransportKeyPair, 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
|
|
341
|
+
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 ConfidentialTransferEvent, type ConfidentialTransferFromParams, type ConfidentialTransferParams, type DecryptBalanceAsParams, type DecryptEndEvent, type DecryptErrorEvent, type EncryptedInput as DecryptInput, type PublicDecryptResult as DecryptPublicValuesResult, type DecryptResult, type DecryptStartEvent, type UserDecryptParams as DecryptValuesParams, type DelegateDecryptionParams, type DelegatedDecryptValuesMutationParams, type DelegatedUserDecryptParams as DelegatedDecryptValuesParams, 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 QueryClientLike, type QueryFactoryOptions, type QueryFilterLike, type QueryLike, type RawLog, type RelayerSDK, type ResumeUnshieldParams, type RevokeDelegationParams, type RevokeDelegationSubmittedEvent, type SetOperatorSubmittedEvent, type ShieldCallbacks, type ShieldOptions, type ShieldParams, type ShieldPath, type ShieldSubmittedEvent, 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 TransportKeyPair, 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, confidentialTransferFromMutationOptions, confidentialTransferMutationOptions, decryptBalanceAsMutationOptions, decryptPublicValuesMutationOptions, decryptValuesQueryOptions, delegateDecryptionMutationOptions, delegatedDecryptValuesMutationOptions, delegationStatusQueryOptions, encryptMutationOptions, filterQueryOptions, finalizeUnwrapMutationOptions, grantPermitMutationOptions, hasPermitQueryOptions, hashFn, invalidateAfterApproveUnderlying, invalidateAfterSetOperator, invalidateAfterShield, invalidateAfterTransfer, invalidateAfterUnshield, invalidateAfterUnwrap, invalidateBalanceQueries, invalidateWagmiBalanceQueries, invalidateWalletLifecycleQueries, isConfidentialQueryOptions, isConfidentialTokenValidQueryOptions, isWrapperQueryOptions, listPairsQueryOptions, resumeUnshieldMutationOptions, revokeDelegationMutationOptions, revokePermitsMutationOptions, shieldMutationOptions, tokenAddressQueryOptions, tokenMetadataQueryOptions, tokenPairQueryOptions, tokenPairsLengthQueryOptions, tokenPairsQueryOptions, tokenPairsSliceQueryOptions, totalSupplyQueryOptions, underlyingAllowanceQueryOptions, unshieldAllMutationOptions, unshieldMutationOptions, unwrapAllMutationOptions, unwrapMutationOptions, wrapperDiscoveryQueryOptions, zamaQueryKeys };
|
|
342
342
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -102,7 +102,7 @@
|
|
|
102
102
|
const relayerUrls = /* @__PURE__ */ new Set();
|
|
103
103
|
let csrfTokenBase = "";
|
|
104
104
|
const CSRF_HEADER_NAME = "x-csrf-token";
|
|
105
|
-
const MUTATING_METHODS = new Set([
|
|
105
|
+
const MUTATING_METHODS = /* @__PURE__ */ new Set([
|
|
106
106
|
"POST",
|
|
107
107
|
"PUT",
|
|
108
108
|
"DELETE",
|
|
@@ -142,7 +142,7 @@
|
|
|
142
142
|
}
|
|
143
143
|
const originalFetch = fetch;
|
|
144
144
|
/** Allowed CDN hostnames for loading the relayer SDK script. */
|
|
145
|
-
const ALLOWED_CDN_HOSTS = new Set(["cdn.zama.org"]);
|
|
145
|
+
const ALLOWED_CDN_HOSTS = /* @__PURE__ */ new Set(["cdn.zama.org"]);
|
|
146
146
|
/**
|
|
147
147
|
* Validate the CDN URL supplied by the caller.
|
|
148
148
|
* Ensures only HTTPS URLs from approved hosts are used when loading
|
|
@@ -9,8 +9,8 @@ import { InputProofBytesType, KmsDelegatedUserDecryptEIP712Type, ZKProofLike } f
|
|
|
9
9
|
* Pass to `getLogs({ topics: [Object.values(Topics)] })` to fetch all events.
|
|
10
10
|
*/
|
|
11
11
|
declare const Topics: {
|
|
12
|
-
/** `ConfidentialTransfer(address indexed from, address indexed to, bytes32 indexed amount)` */readonly ConfidentialTransfer: `0x${string}`; /** `
|
|
13
|
-
readonly
|
|
12
|
+
/** `ConfidentialTransfer(address indexed from, address indexed to, bytes32 indexed amount)` */readonly ConfidentialTransfer: `0x${string}`; /** `Wrap(address indexed to, uint256 roundedAmount, euint64 encryptedWrappedAmount)` */
|
|
13
|
+
readonly Wrap: `0x${string}`; /** `UnwrapRequested(address indexed receiver, bytes32 indexed unwrapRequestId, bytes32 amount)` */
|
|
14
14
|
readonly UnwrapRequested: `0x${string}`; /** `UnwrapFinalized(address indexed receiver, bytes32 indexed unwrapRequestId, bytes32 encryptedAmount, uint64 cleartextAmount)` */
|
|
15
15
|
readonly UnwrapFinalized: `0x${string}`;
|
|
16
16
|
};
|
|
@@ -24,13 +24,19 @@ interface ConfidentialTransferEvent {
|
|
|
24
24
|
/** FHE encrypted value for the transferred amount. */
|
|
25
25
|
readonly encryptedAmount: EncryptedValue;
|
|
26
26
|
}
|
|
27
|
-
/**
|
|
28
|
-
|
|
29
|
-
|
|
27
|
+
/**
|
|
28
|
+
* Decoded `Wrap` event — an ERC-20 shield (wrap) operation. Emitted alongside a
|
|
29
|
+
* `ConfidentialTransfer(from=zeroAddress, ...)`; `encryptedWrappedAmount` is the same FHE
|
|
30
|
+
* handle that lands in `ConfidentialTransfer.encryptedAmount`.
|
|
31
|
+
*/
|
|
32
|
+
interface WrapEvent {
|
|
33
|
+
readonly eventName: "Wrap";
|
|
30
34
|
/** Receiver of the minted confidential tokens. */
|
|
31
35
|
readonly to: Address;
|
|
32
|
-
/**
|
|
33
|
-
readonly
|
|
36
|
+
/** Cleartext underlying ERC-20 tokens deposited, rounded down to a multiple of the rate. */
|
|
37
|
+
readonly roundedAmount: bigint;
|
|
38
|
+
/** FHE encrypted value for the wrapped (minted) amount. */
|
|
39
|
+
readonly encryptedWrappedAmount: EncryptedValue;
|
|
34
40
|
}
|
|
35
41
|
/** Decoded `UnwrapRequested` event — an unshield request submitted. */
|
|
36
42
|
interface UnwrapRequestedEvent {
|
|
@@ -55,18 +61,18 @@ interface UnwrapFinalizedEvent {
|
|
|
55
61
|
readonly unwrapRequestId?: EncryptedValue;
|
|
56
62
|
}
|
|
57
63
|
/** Union of all decoded confidential token event types. */
|
|
58
|
-
type OnChainEvent = ConfidentialTransferEvent |
|
|
64
|
+
type OnChainEvent = ConfidentialTransferEvent | WrapEvent | UnwrapRequestedEvent | UnwrapFinalizedEvent;
|
|
59
65
|
/**
|
|
60
66
|
* ConfidentialTransfer(address indexed from, address indexed to, bytes32 indexed amount)
|
|
61
67
|
* All 3 params indexed → topics[1..3], no data.
|
|
62
68
|
*/
|
|
63
69
|
declare function decodeConfidentialTransfer(log: RawLog): ConfidentialTransferEvent | null;
|
|
64
70
|
/**
|
|
65
|
-
*
|
|
71
|
+
* Wrap(address indexed to, uint256 roundedAmount, euint64 encryptedWrappedAmount)
|
|
66
72
|
* Indexed: to (topics[1])
|
|
67
|
-
* Data:
|
|
73
|
+
* Data: roundedAmount (uint256), encryptedWrappedAmount (bytes32)
|
|
68
74
|
*/
|
|
69
|
-
declare function
|
|
75
|
+
declare function decodeWrap(log: RawLog): WrapEvent | null;
|
|
70
76
|
/**
|
|
71
77
|
* UnwrapRequested(address indexed receiver, bytes32 indexed unwrapRequestId, bytes32 amount)
|
|
72
78
|
*/
|
|
@@ -107,15 +113,15 @@ declare function decodeOnChainEvents(logs: readonly RawLog[]): OnChainEvent[];
|
|
|
107
113
|
*/
|
|
108
114
|
declare function findUnwrapRequested(logs: readonly RawLog[]): UnwrapRequestedEvent | null;
|
|
109
115
|
/**
|
|
110
|
-
* Find the first {@link
|
|
116
|
+
* Find the first {@link WrapEvent} in a logs array.
|
|
111
117
|
*
|
|
112
118
|
* @example
|
|
113
119
|
* ```ts
|
|
114
|
-
* const event =
|
|
115
|
-
* if (event) console.log(event.to, event.
|
|
120
|
+
* const event = findWrap(receipt.logs);
|
|
121
|
+
* if (event) console.log(event.to, event.roundedAmount);
|
|
116
122
|
* ```
|
|
117
123
|
*/
|
|
118
|
-
declare function
|
|
124
|
+
declare function findWrap(logs: readonly RawLog[]): WrapEvent | null;
|
|
119
125
|
/**
|
|
120
126
|
* All confidential token event topic0 hashes.
|
|
121
127
|
* Pass to `getLogs({ topics: [TOKEN_TOPICS] })` to fetch
|
|
@@ -647,5 +653,5 @@ type ZamaConfig = {
|
|
|
647
653
|
readonly [zamaConfigBrand]: true;
|
|
648
654
|
};
|
|
649
655
|
//#endregion
|
|
650
|
-
export { decodeDelegatedForUserDecryption as $, UnshieldPhase2StartedEvent as A, AclTopics as B, SetOperatorSubmittedEvent as C, TransferFromSubmittedEvent as D, TransactionOperation as E, ZamaSDKEventListener as F, TOKEN_TOPICS as G, DelegatedForUserDecryptionEvent as H, ZamaSDKEventType as I, UnwrapRequestedEvent as J, Topics as K, ZamaSDKEvents as L, UnwrapSubmittedEvent as M, ZamaSDKEvent as N, TransferSubmittedEvent as O, ZamaSDKEventInput as P, decodeConfidentialTransfer as Q, ACL_TOPICS as R, RevokeDelegationSubmittedEvent as S, TransactionErrorEvent as T, OnChainEvent as U, ConfidentialTransferEvent as V, RevokedDelegationForUserDecryptionEvent as W, decodeAclEvent as X,
|
|
651
|
-
//# sourceMappingURL=types-
|
|
656
|
+
export { decodeDelegatedForUserDecryption as $, UnshieldPhase2StartedEvent as A, AclTopics as B, SetOperatorSubmittedEvent as C, TransferFromSubmittedEvent as D, TransactionOperation as E, ZamaSDKEventListener as F, TOKEN_TOPICS as G, DelegatedForUserDecryptionEvent as H, ZamaSDKEventType as I, UnwrapRequestedEvent as J, Topics as K, ZamaSDKEvents as L, UnwrapSubmittedEvent as M, ZamaSDKEvent as N, TransferSubmittedEvent as O, ZamaSDKEventInput as P, decodeConfidentialTransfer as Q, ACL_TOPICS as R, RevokeDelegationSubmittedEvent as S, TransactionErrorEvent as T, OnChainEvent as U, ConfidentialTransferEvent as V, RevokedDelegationForUserDecryptionEvent as W, decodeAclEvent as X, WrapEvent as Y, decodeAclEvents as Z, DelegationSubmittedEvent as _, ZamaConfig as a, decodeWrap as at, EncryptStartEvent as b, RelayerWeb as c, findUnwrapRequested as ct, WorkerLike as d, decodeOnChainEvent as et, ApproveUnderlyingSubmittedEvent as f, DecryptStartEvent as g, DecryptErrorEvent as h, WebRelayerOptions as i, decodeUnwrapRequested as it, UnshieldPhase2SubmittedEvent as j, UnshieldPhase1SubmittedEvent as k, BaseRelayer as l, findWrap as lt, DecryptEndEvent as m, RelayerConfig as n, decodeRevokedDelegationForUserDecryption as nt, ZamaConfigBase as o, findDelegatedForUserDecryption as ot, BaseEvent as p, UnwrapFinalizedEvent as q, WebRelayerConfig as r, decodeUnwrapFinalized as rt, ZamaConfigGeneric as s, findRevokedDelegationForUserDecryption as st, CleartextRelayerConfig as t, decodeOnChainEvents as tt, RelayerDispatcher as u, EncryptEndEvent as v, ShieldSubmittedEvent as w, FinalizeUnwrapSubmittedEvent as x, EncryptErrorEvent as y, AclEvent as z };
|
|
657
|
+
//# sourceMappingURL=types-BjDu-RZg.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as AtLeastOneChain } from "./types-BgczXqW2.js";
|
|
2
|
-
import { o as ZamaConfigBase } from "./types-
|
|
2
|
+
import { o as ZamaConfigBase } from "./types-BjDu-RZg.js";
|
|
3
3
|
import { EIP1193Provider, PublicClient, WalletClient } from "viem";
|
|
4
4
|
|
|
5
5
|
//#region src/viem/types.d.ts
|
|
@@ -11,4 +11,4 @@ interface ZamaConfigViem<TChains extends AtLeastOneChain = AtLeastOneChain> exte
|
|
|
11
11
|
}
|
|
12
12
|
//#endregion
|
|
13
13
|
export { ZamaConfigViem as t };
|
|
14
|
-
//# sourceMappingURL=types-
|
|
14
|
+
//# sourceMappingURL=types-DiZhtG8i.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as AtLeastOneChain } from "./types-BgczXqW2.js";
|
|
2
|
-
import { o as ZamaConfigBase } from "./types-
|
|
2
|
+
import { o as ZamaConfigBase } from "./types-BjDu-RZg.js";
|
|
3
3
|
import { EIP1193Provider } from "viem";
|
|
4
4
|
import { Provider, Signer } from "ethers";
|
|
5
5
|
|
|
@@ -27,4 +27,4 @@ type ZamaConfigEthers<TChains extends AtLeastOneChain = AtLeastOneChain> = ZamaC
|
|
|
27
27
|
});
|
|
28
28
|
//#endregion
|
|
29
29
|
export { ZamaConfigEthers as t };
|
|
30
|
-
//# sourceMappingURL=types-
|
|
30
|
+
//# sourceMappingURL=types-Xg_On_yY.d.ts.map
|
package/dist/esm/viem/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { n as FheChain } from "../types-BgczXqW2.js";
|
|
2
2
|
import { B as TransactionReceipt, J as WriteContractConfig, N as GenericProvider, W as ReadContractConfig, l as EIP712TypedData, p as EncryptedValue } from "../relayer-cleartext-DkKKjfI6.js";
|
|
3
|
-
import { a as ZamaConfig } from "../types-
|
|
3
|
+
import { a as ZamaConfig } from "../types-BjDu-RZg.js";
|
|
4
4
|
import { t as BaseSigner } from "../base-signer-ByGw5ReU.js";
|
|
5
|
-
import { t as ZamaConfigViem } from "../types-
|
|
5
|
+
import { t as ZamaConfigViem } from "../types-DiZhtG8i.js";
|
|
6
6
|
import { Abi, Address, ContractFunctionArgs, ContractFunctionName, ContractFunctionReturnType, EIP1193Provider, Hex, Hex as Hex$1, PublicClient, WalletClient } from "viem";
|
|
7
7
|
|
|
8
8
|
//#region src/viem/config.d.ts
|
package/dist/esm/web/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { b as RelayerWebSecurityConfig, y as RelayerWebConfig } from "../relayer-cleartext-DkKKjfI6.js";
|
|
2
|
-
import { c as RelayerWeb, i as WebRelayerOptions, r as WebRelayerConfig } from "../types-
|
|
2
|
+
import { c as RelayerWeb, i as WebRelayerOptions, r as WebRelayerConfig } from "../types-BjDu-RZg.js";
|
|
3
3
|
|
|
4
4
|
//#region src/config/web.d.ts
|
|
5
5
|
/**
|
package/dist/esm/web/index.js
CHANGED
|
@@ -102,7 +102,7 @@ import{t as e}from"../indexeddb-storage-Mi-fCWN3.js";import{a as t,o as n,r}from
|
|
|
102
102
|
const relayerUrls = /* @__PURE__ */ new Set();
|
|
103
103
|
let csrfTokenBase = "";
|
|
104
104
|
const CSRF_HEADER_NAME = "x-csrf-token";
|
|
105
|
-
const MUTATING_METHODS = new Set([
|
|
105
|
+
const MUTATING_METHODS = /* @__PURE__ */ new Set([
|
|
106
106
|
"POST",
|
|
107
107
|
"PUT",
|
|
108
108
|
"DELETE",
|
|
@@ -142,7 +142,7 @@ import{t as e}from"../indexeddb-storage-Mi-fCWN3.js";import{a as t,o as n,r}from
|
|
|
142
142
|
}
|
|
143
143
|
const originalFetch = fetch;
|
|
144
144
|
/** Allowed CDN hostnames for loading the relayer SDK script. */
|
|
145
|
-
const ALLOWED_CDN_HOSTS = new Set(["cdn.zama.org"]);
|
|
145
|
+
const ALLOWED_CDN_HOSTS = /* @__PURE__ */ new Set(["cdn.zama.org"]);
|
|
146
146
|
/**
|
|
147
147
|
* Validate the CDN URL supplied by the caller.
|
|
148
148
|
* Ensures only HTTPS URLs from approved hosts are used when loading
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zama-fhe/sdk",
|
|
3
|
-
"version": "3.2.0
|
|
3
|
+
"version": "3.2.0",
|
|
4
4
|
"description": "TypeScript SDK for Zama fhEVM confidential smart contracts",
|
|
5
5
|
"license": "BSD-3-Clause-Clear",
|
|
6
6
|
"author": "Zama",
|
|
@@ -160,8 +160,8 @@
|
|
|
160
160
|
},
|
|
161
161
|
"dependencies": {
|
|
162
162
|
"@zama-fhe/relayer-sdk": "~0.4.4",
|
|
163
|
-
"viem": "
|
|
164
|
-
"zod": "
|
|
163
|
+
"viem": ">=2",
|
|
164
|
+
"zod": ">=4"
|
|
165
165
|
},
|
|
166
166
|
"devDependencies": {
|
|
167
167
|
"@tanstack/query-core": "^5.101.0"
|