@zama-fhe/sdk 3.6.0 → 3.7.0-alpha.1
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 +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/ethers/index.cjs +1 -1
- package/dist/cjs/ethers/index.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/query/index.cjs +1 -1
- package/dist/cjs/query/index.cjs.map +1 -1
- package/dist/cjs/relayer.cjs +1 -1
- package/dist/cjs/relayer.cjs.map +1 -1
- package/dist/cjs/token.cjs +1 -1
- package/dist/cjs/token.cjs.map +1 -1
- package/dist/cjs/viem/index.cjs +1 -1
- package/dist/cjs/viem/index.cjs.map +1 -1
- package/dist/cjs/wrappers-registry.cjs +1 -1
- package/dist/cjs/wrappers-registry.cjs.map +1 -1
- package/dist/esm/base-signer-BB5y3-NC.js +2 -0
- package/dist/esm/base-signer-BB5y3-NC.js.map +1 -0
- package/dist/esm/{base-signer-Iu5Lszrf.d.ts → base-signer-DlSb15WN.d.ts} +2 -2
- package/dist/esm/chains/index.d.ts +1 -1
- package/dist/esm/chains/index.js +1 -1
- package/dist/esm/chains-DEpKup1n.js +2 -0
- package/dist/esm/chains-DEpKup1n.js.map +1 -0
- package/dist/esm/cleartext/index.d.ts +2 -2
- package/dist/esm/cleartext/index.js +1 -1
- package/dist/esm/{cleartext-B2DI8fgm.d.ts → cleartext-CROV-hgJ.d.ts} +2 -2
- package/dist/esm/{cleartext-iE4sWgSP.js → cleartext-ClC0vjWl.js} +2 -2
- package/dist/esm/{cleartext-iE4sWgSP.js.map → cleartext-ClC0vjWl.js.map} +1 -1
- package/dist/esm/encrypt.worker.js +51 -51
- package/dist/esm/{encryption-BKoalB4o.js → encryption-kKFwg89L.js} +2 -2
- package/dist/esm/{encryption-BKoalB4o.js.map → encryption-kKFwg89L.js.map} +1 -1
- package/dist/esm/ethers/index.d.ts +4 -4
- package/dist/esm/ethers/index.js +1 -1
- package/dist/esm/ethers/index.js.map +1 -1
- package/dist/esm/fhevm-relayer-Bh-_Ngak.js +8 -0
- package/dist/esm/fhevm-relayer-Bh-_Ngak.js.map +1 -0
- package/dist/esm/{index-BCh3VaZo.d.ts → index-CxgmG5MO.d.ts} +164 -39
- package/dist/esm/{index-S6QjPkZE.d.ts → index-DnWijpGT.d.ts} +4 -4
- package/dist/esm/{index-ijgDL4IC.d.ts → index-Gk1S0gjO.d.ts} +14 -1
- package/dist/esm/index.d.ts +8 -8
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/node/index.d.ts +4 -4
- package/dist/esm/node/index.js +1 -1
- package/dist/esm/query/index.d.ts +11 -7
- package/dist/esm/query/index.js +1 -1
- package/dist/esm/query/index.js.map +1 -1
- package/dist/esm/relayer-_TF7Dign.js +2 -0
- package/dist/esm/relayer-_TF7Dign.js.map +1 -0
- package/dist/esm/token-67R06DRQ.js +2 -0
- package/dist/esm/{token-BejFVO8m.js.map → token-67R06DRQ.js.map} +1 -1
- package/dist/esm/{types-CFDG6lIJ.d.ts → types-CeLa3fMJ.d.ts} +3 -3
- package/dist/esm/{types-Ce9Lhvrf.d.ts → types-kqUexcdj.d.ts} +3 -3
- package/dist/esm/{types-D3W3J65M.d.ts → types-xCRG0yhi.d.ts} +31 -4
- package/dist/esm/{validation-BRu06AM_.js → validation-SxWOOONy.js} +2 -2
- package/dist/esm/{validation-BRu06AM_.js.map → validation-SxWOOONy.js.map} +1 -1
- package/dist/esm/viem/index.d.ts +4 -4
- package/dist/esm/viem/index.js +1 -1
- package/dist/esm/viem/index.js.map +1 -1
- package/dist/esm/web/index.d.ts +1 -1
- package/dist/esm/web/index.js +1 -1
- package/dist/esm/wrappers-registry-DqsZPwr9.js +2 -0
- package/dist/esm/wrappers-registry-DqsZPwr9.js.map +1 -0
- package/package.json +2 -2
- package/dist/esm/base-signer-DGIEzavu.js +0 -2
- package/dist/esm/base-signer-DGIEzavu.js.map +0 -1
- package/dist/esm/chains-ByyCdrrd.js +0 -2
- package/dist/esm/chains-ByyCdrrd.js.map +0 -1
- package/dist/esm/fhevm-relayer-Cm-ZR1vP.js +0 -8
- package/dist/esm/fhevm-relayer-Cm-ZR1vP.js.map +0 -1
- package/dist/esm/relayer-CVKO9GmQ.js +0 -2
- package/dist/esm/relayer-CVKO9GmQ.js.map +0 -1
- package/dist/esm/token-BejFVO8m.js +0 -2
- package/dist/esm/wrappers-registry-BLe7PkZi.js +0 -2
- package/dist/esm/wrappers-registry-BLe7PkZi.js.map +0 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { f as FheChain } from "./index-
|
|
2
|
-
import { $t as ClearValue, Ct as UnshieldCallbacks, D as GenericSigner, O as WalletAccount, Qt as TransactionResult, S as TransactionKind, St as TransferCallbacks, _ as PrepareTransactionRequest, _t as TransferOptions, an as EncryptResult, bt as WrapOptions, c as GenericStorage, en as DecryptPublicValuesResult, fn as RelayerSDK, g as PrepareOptions, ht as ShieldOptions, i as ZamaConfig, in as EncryptParams, l as GenericProvider, ln as FhevmRelayerOptions, o as ZamaConfigGeneric, on as EncryptedValue, v as PreparedFor, vt as UnshieldOptions, yt as UnwrapResult } from "./types-
|
|
3
|
-
import "./cleartext-
|
|
4
|
-
import "./types-
|
|
5
|
-
import "./base-signer-
|
|
6
|
-
import "./types-
|
|
1
|
+
import { f as FheChain } from "./index-Gk1S0gjO.js";
|
|
2
|
+
import { $t as ClearValue, Ct as UnshieldCallbacks, D as GenericSigner, O as WalletAccount, Qt as TransactionResult, S as TransactionKind, St as TransferCallbacks, _ as PrepareTransactionRequest, _t as TransferOptions, an as EncryptResult, bt as WrapOptions, c as GenericStorage, en as DecryptPublicValuesResult, fn as RelayerSDK, g as PrepareOptions, ht as ShieldOptions, i as ZamaConfig, in as EncryptParams, l as GenericProvider, ln as FhevmRelayerOptions, o as ZamaConfigGeneric, on as EncryptedValue, v as PreparedFor, vt as UnshieldOptions, yt as UnwrapResult } from "./types-xCRG0yhi.js";
|
|
3
|
+
import "./cleartext-CROV-hgJ.js";
|
|
4
|
+
import "./types-CeLa3fMJ.js";
|
|
5
|
+
import "./base-signer-DlSb15WN.js";
|
|
6
|
+
import "./types-kqUexcdj.js";
|
|
7
7
|
import { Address, Address as Address$1, Hex, Hex as Hex$1 } from "viem";
|
|
8
8
|
import { z } from "zod/mini";
|
|
9
9
|
import { MutationFunctionContext, QueryKey, QueryObserverOptions, skipToken } from "@tanstack/query-core";
|
|
@@ -19604,6 +19604,15 @@ declare function isConfidentialTokenValidContract(registry: Address, confidentia
|
|
|
19604
19604
|
readonly args: readonly [`0x${string}`];
|
|
19605
19605
|
};
|
|
19606
19606
|
//#endregion
|
|
19607
|
+
//#region src/contracts/constants.d.ts
|
|
19608
|
+
/** uint64 max — represents a permanent (no-expiry) delegation. */
|
|
19609
|
+
declare const MAX_UINT64: bigint;
|
|
19610
|
+
/**
|
|
19611
|
+
* `contractAddress` covering every confidential contract with a single
|
|
19612
|
+
* delegation.
|
|
19613
|
+
*/
|
|
19614
|
+
declare const WILDCARD_CONTRACT: "0xFFfFfFffFFfffFFfFFfFFFFFffFFFffffFfFFFfF";
|
|
19615
|
+
//#endregion
|
|
19607
19616
|
//#region src/schemas/primitives.d.ts
|
|
19608
19617
|
declare const checksummedTag: unique symbol;
|
|
19609
19618
|
/** An EVM address that has been put through `getAddress` (EIP-55 checksum form). */
|
|
@@ -19611,6 +19620,25 @@ type ChecksummedAddress = Address & {
|
|
|
19611
19620
|
readonly [checksummedTag]: true;
|
|
19612
19621
|
};
|
|
19613
19622
|
//#endregion
|
|
19623
|
+
//#region src/credentials/utils.d.ts
|
|
19624
|
+
/**
|
|
19625
|
+
* Sentinel requesting a V2 permissive ("wildcard") permit from
|
|
19626
|
+
* {@link CredentialService.grantPermit} / {@link Permits.grantPermit} /
|
|
19627
|
+
* {@link Permits.grantDelegationPermit} — one permit covering every contract,
|
|
19628
|
+
* present and future, instead of an explicit list. Always an explicit opt-in:
|
|
19629
|
+
* passing a contract list, however large, never signs a wildcard permit.
|
|
19630
|
+
*
|
|
19631
|
+
* @example
|
|
19632
|
+
* ```ts
|
|
19633
|
+
* import { WILDCARD_PERMIT } from "@zama-fhe/sdk";
|
|
19634
|
+
*
|
|
19635
|
+
* await sdk.permits.grantPermit(WILDCARD_PERMIT);
|
|
19636
|
+
* ```
|
|
19637
|
+
*/
|
|
19638
|
+
declare const WILDCARD_PERMIT: "wildcard";
|
|
19639
|
+
/** The type of {@link WILDCARD_PERMIT}. */
|
|
19640
|
+
type WildcardPermit = typeof WILDCARD_PERMIT;
|
|
19641
|
+
//#endregion
|
|
19614
19642
|
//#region src/credentials/types.d.ts
|
|
19615
19643
|
/**
|
|
19616
19644
|
* Serialized transport key pair — ML-KEM public + private key as hex, the shape
|
|
@@ -19660,27 +19688,54 @@ interface SerializedPermit {
|
|
|
19660
19688
|
signature: Hex;
|
|
19661
19689
|
/** Address that produced the signature. */
|
|
19662
19690
|
signerAddress: ChecksummedAddress;
|
|
19691
|
+
/**
|
|
19692
|
+
* V2 (unified) permits only — delegation is metadata alongside the signed
|
|
19693
|
+
* message, not part of it. Absent for V1 (where delegation lives inside
|
|
19694
|
+
* `eip712.message`) and for a non-delegated V2 permit.
|
|
19695
|
+
*/
|
|
19696
|
+
delegatorAddress?: ChecksummedAddress;
|
|
19663
19697
|
}
|
|
19664
|
-
/**
|
|
19665
|
-
|
|
19666
|
-
* contract addresses for a bounded time window. Wraps the serialized `@fhevm/sdk`
|
|
19667
|
-
* permit ({@link SerializedPermit}) alongside the scope/coverage metadata the
|
|
19668
|
-
* permission store indexes on.
|
|
19669
|
-
*
|
|
19670
|
-
* Mirrors {@link PermissionSchema}; kept in sync by a `.test-d.ts` guard.
|
|
19671
|
-
*/
|
|
19672
|
-
interface Permission {
|
|
19698
|
+
/** Fields shared by every permit version, regardless of shape. */
|
|
19699
|
+
interface PermissionBase {
|
|
19673
19700
|
/** Public key of the transport key pair this permit is bound to, hex-encoded. */
|
|
19674
19701
|
keypairPublicKey: Hex;
|
|
19675
|
-
/**
|
|
19702
|
+
/**
|
|
19703
|
+
* Contract addresses this permit grants decrypt access to. Never empty for
|
|
19704
|
+
* a V1 permit; an empty list on a V2 permit is a wildcard — see {@link PermissionV2}.
|
|
19705
|
+
*/
|
|
19676
19706
|
contractAddresses: ChecksummedAddress[];
|
|
19677
19707
|
/** The signed serialized permit. */
|
|
19678
19708
|
serializedPermit: SerializedPermit;
|
|
19679
19709
|
/** Unix timestamp (seconds) when the permit becomes valid. */
|
|
19680
19710
|
startTimestamp: number;
|
|
19681
|
-
|
|
19711
|
+
}
|
|
19712
|
+
/** A V1 ("legacy") permit — always scoped to a specific, non-empty contract list. */
|
|
19713
|
+
interface PermissionV1 extends PermissionBase {
|
|
19714
|
+
/** Discriminant identifying this as a {@link PermissionV1}. */
|
|
19715
|
+
version: 1;
|
|
19716
|
+
/** Validity window length in days from {@link PermissionBase.startTimestamp}. */
|
|
19682
19717
|
durationDays: number;
|
|
19683
19718
|
}
|
|
19719
|
+
/**
|
|
19720
|
+
* A V2 (unified) permit. `contractAddresses: []` is a *wildcard* (permissive)
|
|
19721
|
+
* permit — it covers every contract, not zero.
|
|
19722
|
+
*/
|
|
19723
|
+
interface PermissionV2 extends PermissionBase {
|
|
19724
|
+
/** Discriminant identifying this as a {@link PermissionV2}. */
|
|
19725
|
+
version: 2;
|
|
19726
|
+
/** Validity window length in seconds from {@link PermissionBase.startTimestamp}. */
|
|
19727
|
+
durationSeconds: number;
|
|
19728
|
+
}
|
|
19729
|
+
/**
|
|
19730
|
+
* A signed EIP-712 permit binding a signer (and optional delegator) to a set of
|
|
19731
|
+
* contract addresses for a bounded time window. Wraps the serialized `@fhevm/sdk`
|
|
19732
|
+
* permit ({@link SerializedPermit}) alongside the scope/coverage metadata the
|
|
19733
|
+
* permission store indexes on.
|
|
19734
|
+
*
|
|
19735
|
+
* Discriminated by `version`: {@link PermissionV1} or {@link PermissionV2}.
|
|
19736
|
+
* Mirrors {@link PermissionSchema}; kept in sync by a `.test-d.ts` guard.
|
|
19737
|
+
*/
|
|
19738
|
+
type Permission = PermissionV1 | PermissionV2;
|
|
19684
19739
|
/**
|
|
19685
19740
|
* Offline `preparePermit` request — `grantPermit`'s parameters split around
|
|
19686
19741
|
* the wallet signature. `signer` and `delegator` are explicit addresses, not
|
|
@@ -19690,8 +19745,12 @@ interface Permission {
|
|
|
19690
19745
|
interface PreparePermitRequest {
|
|
19691
19746
|
/** Address that will sign the returned EIP-712 typed data. */
|
|
19692
19747
|
signer: Address;
|
|
19693
|
-
/**
|
|
19694
|
-
|
|
19748
|
+
/**
|
|
19749
|
+
* Contract addresses to authorize, or {@link WildcardPermit} to request a
|
|
19750
|
+
* V2 permit covering every contract. Maximum {@link MAX_CONTRACTS_PER_PERMIT}
|
|
19751
|
+
* per call — no chunking. Ignored (and unchecked) when requesting a wildcard.
|
|
19752
|
+
*/
|
|
19753
|
+
contracts: readonly Address[] | WildcardPermit;
|
|
19695
19754
|
/** Delegator address, for a delegated permit. Omit for a self permit. */
|
|
19696
19755
|
delegator?: Address;
|
|
19697
19756
|
/** Permit validity window in days. Defaults to the SDK's configured `permitTTL`. */
|
|
@@ -19703,24 +19762,40 @@ interface PreparePermitRequest {
|
|
|
19703
19762
|
* out-of-process signer returns for it.
|
|
19704
19763
|
*
|
|
19705
19764
|
* Deliberately minimal: `chainId`, `contracts`, `startTimestamp`,
|
|
19706
|
-
* `durationDays`, and the transport public key are all
|
|
19707
|
-
* {@link eip712}'s `domain`/`message` directly
|
|
19708
|
-
* signature-verified payload) — carrying
|
|
19709
|
-
* create two sources of truth that could
|
|
19710
|
-
* for display/logging use.
|
|
19765
|
+
* `durationDays`/`durationSeconds`, and the transport public key are all
|
|
19766
|
+
* readable off {@link PreparedPermitBase.eip712}'s `domain`/`message` directly
|
|
19767
|
+
* (and, once registered, off the signature-verified payload) — carrying
|
|
19768
|
+
* separate top-level copies would only create two sources of truth that could
|
|
19769
|
+
* disagree. Read them from `eip712` for display/logging use.
|
|
19711
19770
|
*
|
|
19712
|
-
* `version
|
|
19713
|
-
*
|
|
19714
|
-
* process boundary as-is.
|
|
19771
|
+
* Discriminated by `version`: {@link PreparedPermitV1} (protocol ≤0.13) or
|
|
19772
|
+
* {@link PreparedPermitV2} (protocol ≥0.14, unified/wildcard). JSON-safe —
|
|
19773
|
+
* ships across a process boundary as-is.
|
|
19715
19774
|
*/
|
|
19716
|
-
|
|
19717
|
-
|
|
19718
|
-
|
|
19775
|
+
type PreparedPermit = PreparedPermitV1 | PreparedPermitV2;
|
|
19776
|
+
/** Fields shared by every prepared-permit version. */
|
|
19777
|
+
interface PreparedPermitBase {
|
|
19719
19778
|
/** The EIP-712 typed data to sign with `eth_signTypedData_v4`. */
|
|
19720
19779
|
eip712: SerializedPermitEip712;
|
|
19721
19780
|
/** Address expected to sign {@link eip712}. */
|
|
19722
19781
|
signerAddress: ChecksummedAddress;
|
|
19723
19782
|
}
|
|
19783
|
+
/** A V1 ("legacy") prepared permit. Delegation, if any, lives inside `eip712.message`. */
|
|
19784
|
+
interface PreparedPermitV1 extends PreparedPermitBase {
|
|
19785
|
+
/** Discriminant identifying this as a {@link PreparedPermitV1}. */
|
|
19786
|
+
version: 1;
|
|
19787
|
+
}
|
|
19788
|
+
/**
|
|
19789
|
+
* A V2 (unified) prepared permit. V2 delegation is post-sign metadata, not
|
|
19790
|
+
* part of the signed message, so a delegated request carries it here instead
|
|
19791
|
+
* of inside `eip712.message`.
|
|
19792
|
+
*/
|
|
19793
|
+
interface PreparedPermitV2 extends PreparedPermitBase {
|
|
19794
|
+
/** Discriminant identifying this as a {@link PreparedPermitV2}. */
|
|
19795
|
+
version: 2;
|
|
19796
|
+
/** Delegator address, for a delegated permit. Absent for a self permit. */
|
|
19797
|
+
delegatorAddress?: ChecksummedAddress;
|
|
19798
|
+
}
|
|
19724
19799
|
//#endregion
|
|
19725
19800
|
//#region src/errors/base.d.ts
|
|
19726
19801
|
/**
|
|
@@ -19789,6 +19864,8 @@ declare const ZamaErrorCode: {
|
|
|
19789
19864
|
readonly DelegationExpiryUnchanged: "DELEGATION_EXPIRY_UNCHANGED";
|
|
19790
19865
|
/** Delegate address cannot be the contract address. */
|
|
19791
19866
|
readonly DelegationDelegateEqualsContract: "DELEGATION_DELEGATE_EQUALS_CONTRACT";
|
|
19867
|
+
/** Delegate address cannot be the wildcard address — it's only valid as `contractAddress`. */
|
|
19868
|
+
readonly DelegationDelegateCannotBeWildcard: "DELEGATION_DELEGATE_CANNOT_BE_WILDCARD";
|
|
19792
19869
|
/** Contract address cannot be the sender address. */
|
|
19793
19870
|
readonly DelegationContractIsSelf: "DELEGATION_CONTRACT_IS_SELF";
|
|
19794
19871
|
/** The ACL contract is paused. */
|
|
@@ -19813,6 +19890,10 @@ declare const ZamaErrorCode: {
|
|
|
19813
19890
|
readonly PreparedPermitChainMismatch: "PREPARED_PERMIT_CHAIN_MISMATCH";
|
|
19814
19891
|
/** A prepared permit's validity window elapsed before its signature was registered. */
|
|
19815
19892
|
readonly PreparedPermitExpired: "PREPARED_PERMIT_EXPIRED";
|
|
19893
|
+
/** V2 (unified) decryption permits — including wildcard permits — need protocol v0.14+; the connected chain hasn't upgraded yet. */
|
|
19894
|
+
readonly UnifiedPermitNotSupported: "UNIFIED_PERMIT_NOT_SUPPORTED";
|
|
19895
|
+
/** A stored V2/wildcard permit's scope is needed, but the connected relayer instance doesn't support unified decryption yet. */
|
|
19896
|
+
readonly UnifiedDecryptionUnsupported: "UNIFIED_DECRYPTION_UNSUPPORTED";
|
|
19816
19897
|
/** The unwrap request was already finalized on-chain; there is nothing left to resume. */
|
|
19817
19898
|
readonly UnshieldAlreadyFinalized: "UNSHIELD_ALREADY_FINALIZED";
|
|
19818
19899
|
};
|
|
@@ -19974,6 +20055,30 @@ declare class PreparedPermitChainMismatchError extends ZamaError {
|
|
|
19974
20055
|
declare class PreparedPermitExpiredError extends ZamaError {
|
|
19975
20056
|
constructor(message: string, options?: ErrorOptions);
|
|
19976
20057
|
}
|
|
20058
|
+
/**
|
|
20059
|
+
* The connected chain doesn't support V2 (unified) decryption permits yet —
|
|
20060
|
+
* including {@link WILDCARD_PERMIT} — because it hasn't upgraded to protocol
|
|
20061
|
+
* v0.14 or later. Thrown before any wallet prompt: the SDK detects this from
|
|
20062
|
+
* the chain's on-chain KMS context, without a signature attempt. V1 permits
|
|
20063
|
+
* (an explicit contract list, not `WILDCARD_PERMIT`) are unaffected — grant
|
|
20064
|
+
* one of those instead, or retry once the network upgrades.
|
|
20065
|
+
*/
|
|
20066
|
+
declare class UnifiedPermitNotSupportedError extends ZamaError {
|
|
20067
|
+
constructor(message: string, options?: ErrorOptions);
|
|
20068
|
+
}
|
|
20069
|
+
/**
|
|
20070
|
+
* A stored V2 (unified/wildcard) permit's scope is needed for this decrypt,
|
|
20071
|
+
* but the connected relayer instance hasn't deployed the `/v3/user-decrypt`
|
|
20072
|
+
* route it requires. Distinct from {@link UnifiedPermitNotSupportedError}:
|
|
20073
|
+
* that one fires at *signing* time because the *chain* hasn't upgraded to
|
|
20074
|
+
* protocol v0.14+; this one fires at *decrypt* time even though the chain and
|
|
20075
|
+
* the stored permit are both V2-capable — only this particular relayer
|
|
20076
|
+
* instance hasn't deployed the route yet. Grant a specific-contract (V1)
|
|
20077
|
+
* permit instead, or retry once the relayer upgrades.
|
|
20078
|
+
*/
|
|
20079
|
+
declare class UnifiedDecryptionUnsupportedError extends ZamaError {
|
|
20080
|
+
constructor(message: string, options?: ErrorOptions);
|
|
20081
|
+
}
|
|
19977
20082
|
//#endregion
|
|
19978
20083
|
//#region src/errors/delegation.d.ts
|
|
19979
20084
|
/** Delegation cannot target self (delegate === msg.sender). */
|
|
@@ -20000,6 +20105,10 @@ declare class DelegationExpiryUnchangedError extends ZamaError {
|
|
|
20000
20105
|
declare class DelegationDelegateEqualsContractError extends ZamaError {
|
|
20001
20106
|
constructor(message: string, options?: ErrorOptions);
|
|
20002
20107
|
}
|
|
20108
|
+
/** Delegate address cannot be the wildcard address — it's only valid as `contractAddress`. */
|
|
20109
|
+
declare class DelegationDelegateCannotBeWildcardError extends ZamaError {
|
|
20110
|
+
constructor(message: string, options?: ErrorOptions);
|
|
20111
|
+
}
|
|
20003
20112
|
/** Contract address cannot be the sender address. */
|
|
20004
20113
|
declare class DelegationContractIsSelfError extends ZamaError {
|
|
20005
20114
|
constructor(message: string, options?: ErrorOptions);
|
|
@@ -20358,6 +20467,8 @@ interface ErrorForCode {
|
|
|
20358
20467
|
[ZamaErrorCode.DelegationExpiryUnchanged]: DelegationExpiryUnchangedError;
|
|
20359
20468
|
/** Thrown for {@link ZamaErrorCode.DelegationDelegateEqualsContract}. */
|
|
20360
20469
|
[ZamaErrorCode.DelegationDelegateEqualsContract]: DelegationDelegateEqualsContractError;
|
|
20470
|
+
/** Thrown for {@link ZamaErrorCode.DelegationDelegateCannotBeWildcard}. */
|
|
20471
|
+
[ZamaErrorCode.DelegationDelegateCannotBeWildcard]: DelegationDelegateCannotBeWildcardError;
|
|
20361
20472
|
/** Thrown for {@link ZamaErrorCode.DelegationContractIsSelf}. */
|
|
20362
20473
|
[ZamaErrorCode.DelegationContractIsSelf]: DelegationContractIsSelfError;
|
|
20363
20474
|
/** Thrown for {@link ZamaErrorCode.AclPaused}. */
|
|
@@ -20382,6 +20493,10 @@ interface ErrorForCode {
|
|
|
20382
20493
|
[ZamaErrorCode.PreparedPermitChainMismatch]: PreparedPermitChainMismatchError;
|
|
20383
20494
|
/** Thrown for {@link ZamaErrorCode.PreparedPermitExpired}. */
|
|
20384
20495
|
[ZamaErrorCode.PreparedPermitExpired]: PreparedPermitExpiredError;
|
|
20496
|
+
/** Thrown for {@link ZamaErrorCode.UnifiedPermitNotSupported}. */
|
|
20497
|
+
[ZamaErrorCode.UnifiedPermitNotSupported]: UnifiedPermitNotSupportedError;
|
|
20498
|
+
/** Thrown for {@link ZamaErrorCode.UnifiedDecryptionUnsupported}. */
|
|
20499
|
+
[ZamaErrorCode.UnifiedDecryptionUnsupported]: UnifiedDecryptionUnsupportedError;
|
|
20385
20500
|
/** Thrown for {@link ZamaErrorCode.UnshieldAlreadyFinalized}. */
|
|
20386
20501
|
[ZamaErrorCode.UnshieldAlreadyFinalized]: UnshieldAlreadyFinalizedError;
|
|
20387
20502
|
}
|
|
@@ -20436,21 +20551,29 @@ declare class Permits {
|
|
|
20436
20551
|
* rejection is preserved (already-signed chunks are persisted before the
|
|
20437
20552
|
* next prompt).
|
|
20438
20553
|
*
|
|
20439
|
-
* @
|
|
20554
|
+
* Pass {@link WILDCARD_PERMIT} instead of an address list to request a V2
|
|
20555
|
+
* permissive permit covering every contract, present and future — an
|
|
20556
|
+
* explicit opt-in, not something a large address list implies. A stolen
|
|
20557
|
+
* wildcard permit decrypts anything the signer owns until it expires, so
|
|
20558
|
+
* prefer a specific contract list unless the caller genuinely needs
|
|
20559
|
+
* unbounded coverage.
|
|
20560
|
+
*
|
|
20561
|
+
* @param contracts - Contract addresses to authorize, or {@link WILDCARD_PERMIT}.
|
|
20440
20562
|
* @throws if `transportKeyPairDerivationSecret` is configured and the keypair fails to wrap or
|
|
20441
20563
|
* unwrap. {@link KeyWrappingError}
|
|
20442
20564
|
*/
|
|
20443
|
-
grantPermit(contracts: Address[]): Promise<void>;
|
|
20565
|
+
grantPermit(contracts: Address[] | WildcardPermit): Promise<void>;
|
|
20444
20566
|
/**
|
|
20445
20567
|
* Sign and store an EIP-712 delegation permit authorizing decryption on
|
|
20446
|
-
* behalf of `delegator`. Same idempotence/chunking semantics as
|
|
20568
|
+
* behalf of `delegator`. Same idempotence/chunking/wildcard semantics as
|
|
20569
|
+
* {@link grantPermit}.
|
|
20447
20570
|
*
|
|
20448
20571
|
* @param delegator - The address that delegated decryption rights to the connected signer.
|
|
20449
|
-
* @param contracts - Contract addresses to authorize.
|
|
20572
|
+
* @param contracts - Contract addresses to authorize, or {@link WILDCARD_PERMIT}.
|
|
20450
20573
|
* @throws if `transportKeyPairDerivationSecret` is configured and the keypair fails to wrap or
|
|
20451
20574
|
* unwrap. {@link KeyWrappingError}
|
|
20452
20575
|
*/
|
|
20453
|
-
grantDelegationPermit(delegator: Address, contracts: Address[]): Promise<void>;
|
|
20576
|
+
grantDelegationPermit(delegator: Address, contracts: Address[] | WildcardPermit): Promise<void>;
|
|
20454
20577
|
/**
|
|
20455
20578
|
* Pure store lookup: is there a permit covering `contracts`?
|
|
20456
20579
|
* No wallet prompt, no transport key pair generation. Returns `false` when no signer
|
|
@@ -20569,7 +20692,7 @@ declare class Permits {
|
|
|
20569
20692
|
}
|
|
20570
20693
|
//#endregion
|
|
20571
20694
|
//#region src/services/delegation-service.d.ts
|
|
20572
|
-
/** Delegation activity and expiry, resolved from
|
|
20695
|
+
/** Delegation activity and expiry, resolved from the active contract or wildcard grant. */
|
|
20573
20696
|
interface DelegationStatus {
|
|
20574
20697
|
/** Whether the delegation is currently active (exists and not expired). */
|
|
20575
20698
|
isActive: boolean;
|
|
@@ -20602,7 +20725,8 @@ declare class Delegations {
|
|
|
20602
20725
|
* window with a bounded internal retry, so you can decrypt right after this
|
|
20603
20726
|
* resolves.
|
|
20604
20727
|
*
|
|
20605
|
-
* @param contractAddress - The confidential contract address to delegate on
|
|
20728
|
+
* @param contractAddress - The confidential contract address to delegate on, or
|
|
20729
|
+
* {@link WILDCARD_CONTRACT} to cover every contract with a single delegation.
|
|
20606
20730
|
* @param delegateAddress - Address to delegate decryption rights to.
|
|
20607
20731
|
* @param expirationDate - Optional expiration date (defaults to permanent delegation via `uint64.max`).
|
|
20608
20732
|
* @returns The transaction hash and mined receipt.
|
|
@@ -20610,6 +20734,7 @@ declare class Delegations {
|
|
|
20610
20734
|
* @throws if signer and provider are on different chains. {@link ChainMismatchError}
|
|
20611
20735
|
* @throws if `expirationDate` is less than 1 hour in the future. {@link DelegationExpirationTooSoonError}
|
|
20612
20736
|
* @throws if the delegate equals the connected wallet. {@link DelegationSelfNotAllowedError}
|
|
20737
|
+
* @throws if the delegate is the wildcard address. {@link DelegationDelegateCannotBeWildcardError}
|
|
20613
20738
|
* @throws if the delegate equals the contract address. {@link DelegationDelegateEqualsContractError}
|
|
20614
20739
|
* @throws if the new expiry equals the current one. {@link DelegationExpiryUnchangedError}
|
|
20615
20740
|
* @throws if the delegation transaction reverts. {@link TransactionRevertedError}
|
|
@@ -22127,5 +22252,5 @@ declare const ZERO_ENCRYPTED_VALUE: "0x00000000000000000000000000000000000000000
|
|
|
22127
22252
|
*/
|
|
22128
22253
|
declare function isEncryptedValueZero(encryptedValue: string): boolean;
|
|
22129
22254
|
//#endregion
|
|
22130
|
-
export { BalanceErrorDetails as $,
|
|
22131
|
-
//# sourceMappingURL=index-
|
|
22255
|
+
export { BalanceErrorDetails as $, getConfidentialTokenAddressContract as $t, BatchDecryptAsOptions as A, rateContract as An, ZamaErrorCode as At, TransactionRevertedError as B, PreparedPermitV1 as Bt, ZamaSDKOptions as C, confidentialBalanceOfContract as Cn, RevokedKmsContextError as Ct, WrappersRegistryConfig as D, finalizeUnwrapContract as Dn, UnifiedPermitNotSupportedError as Dt, WrappersRegistry as E, confidentialTransferFromContract as En, UnifiedDecryptionUnsupportedError as Et, Permits as F, unwrapRequesterContract as Fn, PermissionV1 as Ft, SignerRequiredError as G, WILDCARD_PERMIT as Gt, SigningFailedError as H, SerializedPermit as Ht, ErrorForCode as I, wrapContract as In, PermissionV2 as It, RpcRateLimitError as J, MAX_UINT64 as Jt, WalletAccountNotReadyError as K, WildcardPermit as Kt, matchZamaError as L, createConfig as Ln, PreparePermitRequest as Lt, Offline as M, underlyingContract as Mn, retryAfterSeconds as Mt, Delegations as N, unwrapContract as Nn, Permission as Nt, WrappedToken as O, inferredTotalSupplyContract as On, ChainMismatchError as Ot, DelegationStatus as P, unwrapFromBalanceContract as Pn, PermissionBase as Pt, BalanceCheckUnavailableError as Q, TokenWrapperPairWithMetadata as Qt, UnshieldAlreadyFinalizedDetails as R, PreparedPermit as Rt, ZamaSDK as S, symbolContract as Sn, PreparedPermitExpiredError as St, ListPairsOptions as T, confidentialTransferContract as Tn, TransportKeyPairExpiredError as Tt, SigningRejectedError as U, SerializedPermitEip712 as Ut, SigningErrorMetadata as V, PreparedPermitV2 as Vt, SignerNotConfiguredError as W, SerializedTransportKeyPair as Wt, ConfigurationError as X, PaginatedResult as Xt, NotEntitledError as Y, WILDCARD_CONTRACT as Yt, RelayerRequestFailedError as Z, TokenWrapperPair as Zt, decryptValuesQueryOptions as _, allowanceContract as _n, DelegationSelfNotAllowedError as _t, ChromeSessionStorage as a, isConfidentialTokenValidContract as an, EncryptOffloadUnavailableError as at, MutationFactoryOptions as b, decimalsContract as bn, NoCiphertextError as bt, indexedDBStorage as c, isHandleDelegatedContract as cn, DelegationContractIsSelfError as ct, Decryption as d, ERC1363_INTERFACE_ID as dn, DelegationDelegateEqualsContractError as dt, getTokenAddressContract as en, ERC20ReadFailedError as et, BatchDecryptItem as f, ERC7984_INTERFACE_ID as fn, DelegationExpirationTooSoonError as ft, EncryptedInput as g, supportsInterfaceContract as gn, DelegationNotPropagatedError as gt, DecryptResult as h, isConfidentialWrapperContract as hn, DelegationNotFoundError as ht, isEncryptedValueZero as i, getTokenPairsSliceContract as in, DecryptionFailedError as it, Token as j, setOperatorContract as jn, isRetryable as jt, BatchBalancesResult as k, isOperatorContract as kn, ZamaError as kt, MemoryStorage as l, revokeDelegationContract as ln, DelegationCooldownError as lt, DelegatedDecryptOptions as m, isConfidentialTokenContract as mn, DelegationExpiryUnchangedError as mt, Hex$1 as n, getTokenPairsContract as nn, InsufficientConfidentialBalanceError as nt, chromeSessionStorage as o, delegateForUserDecryptionContract as on, EncryptionFailedError as ot, BatchDecryptResult as p, ERC7984_WRAPPER_INTERFACE_ID as pn, DelegationExpiredError as pt, WalletNotConnectedError as q, ChecksummedAddress as qt, ZERO_ENCRYPTED_VALUE as r, getTokenPairsLengthContract as rn, InsufficientERC20BalanceError as rt, IndexedDBStorage as s, getDelegationExpiryContract as sn, AclPausedError as st, Address$1 as t, getTokenPairContract as tn, InsufficientAllowanceError as tt, memoryStorage as u, transferAndCallContract as un, DelegationDelegateCannotBeWildcardError as ut, SignerQueryContext as v, approveContract as vn, InvalidTransportKeyPairError as vt, DefaultRegistryAddresses as w, confidentialTotalSupplyContract as wn, TransportKeyPairChangedError as wt, QueryFactoryOptions as x, nameContract as xn, PreparedPermitChainMismatchError as xt, zamaQueryKeys as y, balanceOfContract as yn, KeyWrappingError as yt, UnshieldAlreadyFinalizedError as z, PreparedPermitBase as zt };
|
|
22256
|
+
//# sourceMappingURL=index-CxgmG5MO.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import "./index-
|
|
2
|
-
import { c as GenericStorage, dn as RelayerOptions, n as RelayerConfig } from "./types-
|
|
3
|
-
import "./cleartext-
|
|
1
|
+
import "./index-Gk1S0gjO.js";
|
|
2
|
+
import { c as GenericStorage, dn as RelayerOptions, n as RelayerConfig } from "./types-xCRG0yhi.js";
|
|
3
|
+
import "./cleartext-CROV-hgJ.js";
|
|
4
4
|
//#region src/node/config.d.ts
|
|
5
5
|
/** Node transport — drives the FHE backend directly on the calling thread. */
|
|
6
6
|
interface NodeRelayerConfig extends RelayerConfig {
|
|
@@ -58,4 +58,4 @@ declare class AsyncLocalMapStorage implements GenericStorage {
|
|
|
58
58
|
declare const asyncLocalStorage: AsyncLocalMapStorage;
|
|
59
59
|
//#endregion
|
|
60
60
|
export { node as i, asyncLocalStorage as n, NodeRelayerConfig as r, AsyncLocalMapStorage as t };
|
|
61
|
-
//# sourceMappingURL=index-
|
|
61
|
+
//# sourceMappingURL=index-DnWijpGT.d.ts.map
|
|
@@ -36,6 +36,15 @@ interface FheChain<TId extends number = number> {
|
|
|
36
36
|
readonly kmsContractAddress: Address;
|
|
37
37
|
/** Address of the input verifier contract. */
|
|
38
38
|
readonly inputVerifierContractAddress: Address;
|
|
39
|
+
/**
|
|
40
|
+
* Address of the `ProtocolConfig` contract. Required to sign or use V2
|
|
41
|
+
* (unified) decryption permits — including {@link WILDCARD_PERMIT} — which
|
|
42
|
+
* need protocol v0.14+. Leave `undefined` for a chain still on protocol
|
|
43
|
+
* ≤0.13, or one whose `ProtocolConfig` address isn't known yet: V2 permit
|
|
44
|
+
* signing then fails with a clear {@link UnifiedPermitNotSupportedError}
|
|
45
|
+
* instead of a wallet prompt. V1 permits are unaffected either way.
|
|
46
|
+
*/
|
|
47
|
+
readonly protocolConfigContractAddress?: Address | undefined;
|
|
39
48
|
/** EIP-712 verifying contract address for decryption requests. */
|
|
40
49
|
readonly verifyingContractAddressDecryption: Address;
|
|
41
50
|
/** EIP-712 verifying contract address for input verification. */
|
|
@@ -76,6 +85,7 @@ declare const mainnet: {
|
|
|
76
85
|
readonly verifyingContractAddressDecryption: "0x0f6024a97684f7d90ddb0fAAD79cB15F2C888D24";
|
|
77
86
|
readonly verifyingContractAddressInputVerification: "0xcB1bB072f38bdAF0F328CdEf1Fc6eDa1DF029287";
|
|
78
87
|
readonly registryAddress: "0xeb5015fF021DB115aCe010f23F55C2591059bBA0";
|
|
88
|
+
readonly protocolConfigContractAddress: "0xD8236B57394f90726b26aB25D38CeAC776E1a7C4";
|
|
79
89
|
};
|
|
80
90
|
/**
|
|
81
91
|
* Polygon mainnet network configuration (chainId 137).
|
|
@@ -91,6 +101,7 @@ declare const polygon: {
|
|
|
91
101
|
readonly verifyingContractAddressDecryption: "0x0f6024a97684f7d90ddb0fAAD79cB15F2C888D24";
|
|
92
102
|
readonly verifyingContractAddressInputVerification: "0xcB1bB072f38bdAF0F328CdEf1Fc6eDa1DF029287";
|
|
93
103
|
readonly registryAddress: "0xc8908569868758dAF814B5a8b96bBc44D1653d54";
|
|
104
|
+
readonly protocolConfigContractAddress: "0x17f62Ab3A1Ea519703cD597410147A30Fa1a7f1e";
|
|
94
105
|
};
|
|
95
106
|
/**
|
|
96
107
|
* Sepolia testnet network configuration (chainId 11155111).
|
|
@@ -106,6 +117,7 @@ declare const sepolia: {
|
|
|
106
117
|
readonly verifyingContractAddressDecryption: "0x5D8BD78e2ea6bbE41f26dFe9fdaEAa349e077478";
|
|
107
118
|
readonly verifyingContractAddressInputVerification: "0x483b9dE06E4E4C7D35CCf5837A1668487406D955";
|
|
108
119
|
readonly registryAddress: "0x2f0750Bbb0A246059d80e94c454586a7F27a128e";
|
|
120
|
+
readonly protocolConfigContractAddress: "0x51f9AFBc89Ea792e1a21a12AB802ab58D4dbee83";
|
|
109
121
|
};
|
|
110
122
|
/**
|
|
111
123
|
* Polygon Amoy testnet network configuration (chainId 80002).
|
|
@@ -121,6 +133,7 @@ declare const polygonAmoy: {
|
|
|
121
133
|
readonly verifyingContractAddressDecryption: "0x5D8BD78e2ea6bbE41f26dFe9fdaEAa349e077478";
|
|
122
134
|
readonly verifyingContractAddressInputVerification: "0x483b9dE06E4E4C7D35CCf5837A1668487406D955";
|
|
123
135
|
readonly registryAddress: "0xF486c3D4F4562760A43883e72E8D6f6Cf2EFdA94";
|
|
136
|
+
readonly protocolConfigContractAddress: "0x4CcF009Aba90D04f52b31fc7aDdE240578aFe10F";
|
|
124
137
|
};
|
|
125
138
|
/**
|
|
126
139
|
* Hoodi testnet configuration (chainId 560048).
|
|
@@ -217,4 +230,4 @@ declare const anvil: {
|
|
|
217
230
|
declare const chains: Record<number, FheChain>;
|
|
218
231
|
//#endregion
|
|
219
232
|
export { hoodi as a, polygon as c, AtLeastOneChain as d, FheChain as f, hardhat as i, polygonAmoy as l, bscTestnet as n, ingenTestnet as o, FheChainAuth as p, chains as r, mainnet as s, anvil as t, sepolia as u };
|
|
220
|
-
//# sourceMappingURL=index-
|
|
233
|
+
//# sourceMappingURL=index-Gk1S0gjO.d.ts.map
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { a as hoodi, c as polygon, d as AtLeastOneChain, f as FheChain, i as hardhat, l as polygonAmoy, n as bscTestnet, o as ingenTestnet, p as FheChainAuth, r as chains, s as mainnet, t as anvil, u as sepolia } from "./index-
|
|
2
|
-
import { $ as SetOperatorSubmittedEvent, $t as ClearValue, A as WalletAccountListener, At as RevokedDelegationForUserDecryptionEvent, B as ApproveUnderlyingSubmittedEvent, Bt as decodeOnChainEvent, C as TransferAndCallRequest, Ct as UnshieldCallbacks, D as GenericSigner, Dt as ConfidentialTransferEvent, E as WrapRequest, Et as AclTopics, F as ReadContractReturnType, Ft as WrapEvent, G as DelegationSubmittedEvent, Gt as decodeWrap, H as DecryptEndEvent, Ht as decodeRevokedDelegationForUserDecryption, I as ReadFunctionName, It as decodeAclEvent, J as EncryptStartEvent, Jt as findUnwrapRequested, K as EncryptEndEvent, Kt as findDelegatedForUserDecryption, L as WriteContractArgs, Lt as decodeAclEvents, M as ContractAbi, Mt as Topics, N as ReadContractArgs, Nt as UnwrapFinalizedEvent, O as WalletAccount, Ot as DelegatedForUserDecryptionEvent, P as ReadContractConfig, Pt as UnwrapRequestedEvent, Q as RevokeDelegationSubmittedEvent, Qt as TransactionResult, R as WriteContractConfig, Rt as decodeConfidentialTransfer, S as TransactionKind, St as TransferCallbacks, T as UnwrapRequest, Tt as AclEvent, U as DecryptErrorEvent, Ut as decodeUnwrapFinalized, V as BaseEvent, Vt as decodeOnChainEvents, W as DecryptStartEvent, Wt as decodeUnwrapRequested, X as PermitErrorEvent, Xt as RawLog, Y as FinalizeUnwrapSubmittedEvent, Yt as findWrap, Z as PermitOperation, Zt as TransactionReceipt, _ as PrepareTransactionRequest, _t as TransferOptions, a as ZamaConfigBase, an as EncryptResult, at as UnshieldPhase1SubmittedEvent, b as RevokeDelegationRequest, bt as WrapOptions, c as GenericStorage, cn as FhevmClientOptions, ct as UnwrapSubmittedEvent, d as ConfidentialTransferFromRequest, dn as RelayerOptions, dt as ZamaSDKEventListener, en as DecryptPublicValuesResult, et as ShieldSubmittedEvent, f as ConfidentialTransferRequest, fn as RelayerSDK, ft as ZamaSDKEventType, g as PrepareOptions, gt as ShieldPath, h as PrepareFees, ht as ShieldOptions, i as ZamaConfig, in as EncryptParams, it as TransferSubmittedEvent, j as WalletAccountStore, jt as TOKEN_TOPICS, k as WalletAccountChange, kt as OnChainEvent, l as GenericProvider, ln as FhevmRelayerOptions, lt as WrapSubmittedEvent, m as FinalizeUnwrapRequest, mt as ApprovalStrategy, n as RelayerConfig, nn as EIP712TypedData, nt as TransactionOperation, o as ZamaConfigGeneric, on as EncryptedValue, ot as UnshieldPhase2StartedEvent, p as DelegateDecryptionRequest, pn as TypedValue, pt as ZamaSDKEvents, q as EncryptErrorEvent, qt as findRevokedDelegationForUserDecryption, rn as EncryptInput, rt as TransferFromSubmittedEvent, s as GenericLogger, sn as FhevmClient, st as UnshieldPhase2SubmittedEvent, t as CleartextRelayerConfig, tn as DecryptValuesParameters, tt as TransactionErrorEvent, u as ApproveUnderlyingRequest, un as FhevmRuntimeConfig, ut as ZamaSDKEvent, v as PreparedFor, vt as UnshieldOptions, w as UnwrapAllRequest, wt as ACL_TOPICS, x as SetOperatorRequest, xt as ShieldCallbacks, y as PreparedTransaction, yt as UnwrapResult, z as WriteFunctionName, zt as decodeDelegatedForUserDecryption } from "./types-
|
|
3
|
-
import { t as cleartext } from "./cleartext-
|
|
4
|
-
import { t as ZamaConfigEthers } from "./types-
|
|
5
|
-
import { n as MutableWalletAccountStore, r as createWalletAccountStore, t as BaseSigner } from "./base-signer-
|
|
6
|
-
import { $ as BalanceErrorDetails, $t as
|
|
7
|
-
import { t as ZamaConfigViem } from "./types-
|
|
8
|
-
export { ACL_TOPICS, type AclEvent, AclPausedError, AclTopics, type Address, type ApprovalStrategy, type ApproveUnderlyingRequest, type ApproveUnderlyingSubmittedEvent, type AtLeastOneChain, BalanceCheckUnavailableError, type BalanceErrorDetails, type BaseEvent, BaseSigner, type BatchBalancesResult, type BatchDecryptAsOptions, type BatchDecryptItem, type BatchDecryptResult, ChainMismatchError, type ChecksummedAddress, ChromeSessionStorage, type ClearValue, type CleartextRelayerConfig, type ConfidentialTransferEvent, type ConfidentialTransferFromRequest, type ConfidentialTransferRequest, ConfigurationError, type ContractAbi, type DecryptEndEvent, type DecryptErrorEvent, type EncryptedInput as DecryptInput, type DecryptPublicValuesResult, type DecryptResult, type DecryptStartEvent, type DecryptValuesParameters, Decryption, DecryptionFailedError, DefaultRegistryAddresses, type DelegateDecryptionRequest, type DelegatedDecryptOptions, type DelegatedForUserDecryptionEvent, DelegationContractIsSelfError, DelegationCooldownError, DelegationDelegateEqualsContractError, DelegationExpirationTooSoonError, DelegationExpiredError, DelegationExpiryUnchangedError, DelegationNotFoundError, DelegationNotPropagatedError, DelegationSelfNotAllowedError, type DelegationStatus, type DelegationSubmittedEvent, Delegations, type EIP712TypedData, ERC1363_INTERFACE_ID, ERC20ReadFailedError, ERC7984_INTERFACE_ID, ERC7984_WRAPPER_INTERFACE_ID, type EncryptEndEvent, type EncryptErrorEvent, type EncryptInput, EncryptOffloadUnavailableError, type EncryptParams, type EncryptResult, type EncryptStartEvent, type EncryptedValue, EncryptionFailedError, type ErrorForCode, type FheChain, type FheChainAuth, type FhevmClient, type FhevmClientOptions, type FhevmRelayerOptions, type FhevmRuntimeConfig, type FinalizeUnwrapRequest, type FinalizeUnwrapSubmittedEvent, type GenericLogger, type GenericProvider, type GenericSigner, type GenericStorage, type Hex, IndexedDBStorage, InsufficientAllowanceError, InsufficientConfidentialBalanceError, InsufficientERC20BalanceError, InvalidTransportKeyPairError, KeyWrappingError, type ListPairsOptions, MemoryStorage, MutableWalletAccountStore, NoCiphertextError, NotEntitledError, Offline, type OnChainEvent, type PaginatedResult, type Permission, type PermitErrorEvent, type PermitOperation, Permits, type PrepareFees, type PrepareOptions, type PreparePermitRequest, type PrepareTransactionRequest, type PreparedFor, type PreparedPermit, PreparedPermitChainMismatchError, PreparedPermitExpiredError, type PreparedTransaction, type RawLog, type ReadContractArgs, type ReadContractConfig, type ReadContractReturnType, type ReadFunctionName, type RelayerConfig, type RelayerOptions, RelayerRequestFailedError, type RelayerSDK, type RevokeDelegationRequest, type RevokeDelegationSubmittedEvent, type RevokedDelegationForUserDecryptionEvent, RevokedKmsContextError, RpcRateLimitError, type SerializedPermit, type SerializedPermitEip712, type SerializedTransportKeyPair, type SetOperatorRequest, type SetOperatorSubmittedEvent, type ShieldCallbacks, type ShieldOptions, type ShieldPath, type ShieldSubmittedEvent, SignerNotConfiguredError, SignerRequiredError, type SigningErrorMetadata, SigningFailedError, SigningRejectedError, TOKEN_TOPICS, Token, type TokenWrapperPair, type TokenWrapperPairWithMetadata, Topics, type TransactionErrorEvent, type TransactionKind, type TransactionOperation, type TransactionReceipt, type TransactionResult, TransactionRevertedError, type TransferAndCallRequest, type TransferCallbacks, type TransferFromSubmittedEvent, type TransferOptions, type TransferSubmittedEvent, TransportKeyPairChangedError, TransportKeyPairExpiredError, type TypedValue, type UnshieldAlreadyFinalizedDetails, UnshieldAlreadyFinalizedError, type UnshieldCallbacks, type UnshieldOptions, type UnshieldPhase1SubmittedEvent, type UnshieldPhase2StartedEvent, type UnshieldPhase2SubmittedEvent, type UnwrapAllRequest, type UnwrapFinalizedEvent, type UnwrapRequest, type UnwrapRequestedEvent, type UnwrapResult, type UnwrapSubmittedEvent, type WalletAccount, type WalletAccountChange, type WalletAccountListener, WalletAccountNotReadyError, type WalletAccountStore, WalletNotConnectedError, type WrapEvent, type WrapOptions, type WrapRequest, type WrapSubmittedEvent, WrappedToken, WrappersRegistry, type WrappersRegistryConfig, type WriteContractArgs, type WriteContractConfig, type WriteFunctionName, ZERO_ENCRYPTED_VALUE, type ZamaConfig, type ZamaConfigBase, type ZamaConfigEthers, type ZamaConfigGeneric, type ZamaConfigViem, ZamaError, ZamaErrorCode, ZamaSDK, type ZamaSDKEvent, type ZamaSDKEventListener, type ZamaSDKEventType, ZamaSDKEvents, type ZamaSDKOptions, allowanceContract, anvil, approveContract, balanceOfContract, bscTestnet, chains, chromeSessionStorage, cleartext, confidentialBalanceOfContract, confidentialTotalSupplyContract, confidentialTransferContract, confidentialTransferFromContract, createConfig, createWalletAccountStore, decimalsContract, decodeAclEvent, decodeAclEvents, decodeConfidentialTransfer, decodeDelegatedForUserDecryption, decodeOnChainEvent, decodeOnChainEvents, decodeRevokedDelegationForUserDecryption, decodeUnwrapFinalized, decodeUnwrapRequested, decodeWrap, delegateForUserDecryptionContract, finalizeUnwrapContract, findDelegatedForUserDecryption, findRevokedDelegationForUserDecryption, findUnwrapRequested, findWrap, getConfidentialTokenAddressContract, getDelegationExpiryContract, getTokenAddressContract, getTokenPairContract, getTokenPairsContract, getTokenPairsLengthContract, getTokenPairsSliceContract, hardhat, hoodi, indexedDBStorage, inferredTotalSupplyContract, ingenTestnet, isConfidentialTokenContract, isConfidentialTokenValidContract, isConfidentialWrapperContract, isEncryptedValueZero, isHandleDelegatedContract, isOperatorContract, isRetryable, mainnet, matchZamaError, memoryStorage, nameContract, polygon, polygonAmoy, rateContract, retryAfterSeconds, revokeDelegationContract, sepolia, setOperatorContract, supportsInterfaceContract, symbolContract, transferAndCallContract, underlyingContract, unwrapContract, unwrapFromBalanceContract, unwrapRequesterContract, wrapContract };
|
|
1
|
+
import { a as hoodi, c as polygon, d as AtLeastOneChain, f as FheChain, i as hardhat, l as polygonAmoy, n as bscTestnet, o as ingenTestnet, p as FheChainAuth, r as chains, s as mainnet, t as anvil, u as sepolia } from "./index-Gk1S0gjO.js";
|
|
2
|
+
import { $ as SetOperatorSubmittedEvent, $t as ClearValue, A as WalletAccountListener, At as RevokedDelegationForUserDecryptionEvent, B as ApproveUnderlyingSubmittedEvent, Bt as decodeOnChainEvent, C as TransferAndCallRequest, Ct as UnshieldCallbacks, D as GenericSigner, Dt as ConfidentialTransferEvent, E as WrapRequest, Et as AclTopics, F as ReadContractReturnType, Ft as WrapEvent, G as DelegationSubmittedEvent, Gt as decodeWrap, H as DecryptEndEvent, Ht as decodeRevokedDelegationForUserDecryption, I as ReadFunctionName, It as decodeAclEvent, J as EncryptStartEvent, Jt as findUnwrapRequested, K as EncryptEndEvent, Kt as findDelegatedForUserDecryption, L as WriteContractArgs, Lt as decodeAclEvents, M as ContractAbi, Mt as Topics, N as ReadContractArgs, Nt as UnwrapFinalizedEvent, O as WalletAccount, Ot as DelegatedForUserDecryptionEvent, P as ReadContractConfig, Pt as UnwrapRequestedEvent, Q as RevokeDelegationSubmittedEvent, Qt as TransactionResult, R as WriteContractConfig, Rt as decodeConfidentialTransfer, S as TransactionKind, St as TransferCallbacks, T as UnwrapRequest, Tt as AclEvent, U as DecryptErrorEvent, Ut as decodeUnwrapFinalized, V as BaseEvent, Vt as decodeOnChainEvents, W as DecryptStartEvent, Wt as decodeUnwrapRequested, X as PermitErrorEvent, Xt as RawLog, Y as FinalizeUnwrapSubmittedEvent, Yt as findWrap, Z as PermitOperation, Zt as TransactionReceipt, _ as PrepareTransactionRequest, _t as TransferOptions, a as ZamaConfigBase, an as EncryptResult, at as UnshieldPhase1SubmittedEvent, b as RevokeDelegationRequest, bt as WrapOptions, c as GenericStorage, cn as FhevmClientOptions, ct as UnwrapSubmittedEvent, d as ConfidentialTransferFromRequest, dn as RelayerOptions, dt as ZamaSDKEventListener, en as DecryptPublicValuesResult, et as ShieldSubmittedEvent, f as ConfidentialTransferRequest, fn as RelayerSDK, ft as ZamaSDKEventType, g as PrepareOptions, gt as ShieldPath, h as PrepareFees, ht as ShieldOptions, i as ZamaConfig, in as EncryptParams, it as TransferSubmittedEvent, j as WalletAccountStore, jt as TOKEN_TOPICS, k as WalletAccountChange, kt as OnChainEvent, l as GenericProvider, ln as FhevmRelayerOptions, lt as WrapSubmittedEvent, m as FinalizeUnwrapRequest, mt as ApprovalStrategy, n as RelayerConfig, nn as EIP712TypedData, nt as TransactionOperation, o as ZamaConfigGeneric, on as EncryptedValue, ot as UnshieldPhase2StartedEvent, p as DelegateDecryptionRequest, pn as TypedValue, pt as ZamaSDKEvents, q as EncryptErrorEvent, qt as findRevokedDelegationForUserDecryption, rn as EncryptInput, rt as TransferFromSubmittedEvent, s as GenericLogger, sn as FhevmClient, st as UnshieldPhase2SubmittedEvent, t as CleartextRelayerConfig, tn as DecryptValuesParameters, tt as TransactionErrorEvent, u as ApproveUnderlyingRequest, un as FhevmRuntimeConfig, ut as ZamaSDKEvent, v as PreparedFor, vt as UnshieldOptions, w as UnwrapAllRequest, wt as ACL_TOPICS, x as SetOperatorRequest, xt as ShieldCallbacks, y as PreparedTransaction, yt as UnwrapResult, z as WriteFunctionName, zt as decodeDelegatedForUserDecryption } from "./types-xCRG0yhi.js";
|
|
3
|
+
import { t as cleartext } from "./cleartext-CROV-hgJ.js";
|
|
4
|
+
import { t as ZamaConfigEthers } from "./types-CeLa3fMJ.js";
|
|
5
|
+
import { n as MutableWalletAccountStore, r as createWalletAccountStore, t as BaseSigner } from "./base-signer-DlSb15WN.js";
|
|
6
|
+
import { $ as BalanceErrorDetails, $t as getConfidentialTokenAddressContract, A as BatchDecryptAsOptions, An as rateContract, At as ZamaErrorCode, B as TransactionRevertedError, Bt as PreparedPermitV1, C as ZamaSDKOptions, Cn as confidentialBalanceOfContract, Ct as RevokedKmsContextError, D as WrappersRegistryConfig, Dn as finalizeUnwrapContract, Dt as UnifiedPermitNotSupportedError, E as WrappersRegistry, En as confidentialTransferFromContract, Et as UnifiedDecryptionUnsupportedError, F as Permits, Fn as unwrapRequesterContract, Ft as PermissionV1, G as SignerRequiredError, Gt as WILDCARD_PERMIT, H as SigningFailedError, Ht as SerializedPermit, I as ErrorForCode, In as wrapContract, It as PermissionV2, J as RpcRateLimitError, Jt as MAX_UINT64, K as WalletAccountNotReadyError, Kt as WildcardPermit, L as matchZamaError, Ln as createConfig, Lt as PreparePermitRequest, M as Offline, Mn as underlyingContract, Mt as retryAfterSeconds, N as Delegations, Nn as unwrapContract, Nt as Permission, O as WrappedToken, On as inferredTotalSupplyContract, Ot as ChainMismatchError, P as DelegationStatus, Pn as unwrapFromBalanceContract, Pt as PermissionBase, Q as BalanceCheckUnavailableError, Qt as TokenWrapperPairWithMetadata, R as UnshieldAlreadyFinalizedDetails, Rt as PreparedPermit, S as ZamaSDK, Sn as symbolContract, St as PreparedPermitExpiredError, T as ListPairsOptions, Tn as confidentialTransferContract, Tt as TransportKeyPairExpiredError, U as SigningRejectedError, Ut as SerializedPermitEip712, V as SigningErrorMetadata, Vt as PreparedPermitV2, W as SignerNotConfiguredError, Wt as SerializedTransportKeyPair, X as ConfigurationError, Xt as PaginatedResult, Y as NotEntitledError, Yt as WILDCARD_CONTRACT, Z as RelayerRequestFailedError, Zt as TokenWrapperPair, _n as allowanceContract, _t as DelegationSelfNotAllowedError, a as ChromeSessionStorage, an as isConfidentialTokenValidContract, at as EncryptOffloadUnavailableError, bn as decimalsContract, bt as NoCiphertextError, c as indexedDBStorage, cn as isHandleDelegatedContract, ct as DelegationContractIsSelfError, d as Decryption, dn as ERC1363_INTERFACE_ID, dt as DelegationDelegateEqualsContractError, en as getTokenAddressContract, et as ERC20ReadFailedError, f as BatchDecryptItem, fn as ERC7984_INTERFACE_ID, ft as DelegationExpirationTooSoonError, g as EncryptedInput, gn as supportsInterfaceContract, gt as DelegationNotPropagatedError, h as DecryptResult, hn as isConfidentialWrapperContract, ht as DelegationNotFoundError, i as isEncryptedValueZero, in as getTokenPairsSliceContract, it as DecryptionFailedError, j as Token, jn as setOperatorContract, jt as isRetryable, k as BatchBalancesResult, kn as isOperatorContract, kt as ZamaError, l as MemoryStorage, ln as revokeDelegationContract, lt as DelegationCooldownError, m as DelegatedDecryptOptions, mn as isConfidentialTokenContract, mt as DelegationExpiryUnchangedError, n as Hex, nn as getTokenPairsContract, nt as InsufficientConfidentialBalanceError, o as chromeSessionStorage, on as delegateForUserDecryptionContract, ot as EncryptionFailedError, p as BatchDecryptResult, pn as ERC7984_WRAPPER_INTERFACE_ID, pt as DelegationExpiredError, q as WalletNotConnectedError, qt as ChecksummedAddress, r as ZERO_ENCRYPTED_VALUE, rn as getTokenPairsLengthContract, rt as InsufficientERC20BalanceError, s as IndexedDBStorage, sn as getDelegationExpiryContract, st as AclPausedError, t as Address, tn as getTokenPairContract, tt as InsufficientAllowanceError, u as memoryStorage, un as transferAndCallContract, ut as DelegationDelegateCannotBeWildcardError, vn as approveContract, vt as InvalidTransportKeyPairError, w as DefaultRegistryAddresses, wn as confidentialTotalSupplyContract, wt as TransportKeyPairChangedError, xn as nameContract, xt as PreparedPermitChainMismatchError, yn as balanceOfContract, yt as KeyWrappingError, z as UnshieldAlreadyFinalizedError, zt as PreparedPermitBase } from "./index-CxgmG5MO.js";
|
|
7
|
+
import { t as ZamaConfigViem } from "./types-kqUexcdj.js";
|
|
8
|
+
export { ACL_TOPICS, type AclEvent, AclPausedError, AclTopics, type Address, type ApprovalStrategy, type ApproveUnderlyingRequest, type ApproveUnderlyingSubmittedEvent, type AtLeastOneChain, BalanceCheckUnavailableError, type BalanceErrorDetails, type BaseEvent, BaseSigner, type BatchBalancesResult, type BatchDecryptAsOptions, type BatchDecryptItem, type BatchDecryptResult, ChainMismatchError, type ChecksummedAddress, ChromeSessionStorage, type ClearValue, type CleartextRelayerConfig, type ConfidentialTransferEvent, type ConfidentialTransferFromRequest, type ConfidentialTransferRequest, ConfigurationError, type ContractAbi, type DecryptEndEvent, type DecryptErrorEvent, type EncryptedInput as DecryptInput, type DecryptPublicValuesResult, type DecryptResult, type DecryptStartEvent, type DecryptValuesParameters, Decryption, DecryptionFailedError, DefaultRegistryAddresses, type DelegateDecryptionRequest, type DelegatedDecryptOptions, type DelegatedForUserDecryptionEvent, DelegationContractIsSelfError, DelegationCooldownError, DelegationDelegateCannotBeWildcardError, DelegationDelegateEqualsContractError, DelegationExpirationTooSoonError, DelegationExpiredError, DelegationExpiryUnchangedError, DelegationNotFoundError, DelegationNotPropagatedError, DelegationSelfNotAllowedError, type DelegationStatus, type DelegationSubmittedEvent, Delegations, type EIP712TypedData, ERC1363_INTERFACE_ID, ERC20ReadFailedError, ERC7984_INTERFACE_ID, ERC7984_WRAPPER_INTERFACE_ID, type EncryptEndEvent, type EncryptErrorEvent, type EncryptInput, EncryptOffloadUnavailableError, type EncryptParams, type EncryptResult, type EncryptStartEvent, type EncryptedValue, EncryptionFailedError, type ErrorForCode, type FheChain, type FheChainAuth, type FhevmClient, type FhevmClientOptions, type FhevmRelayerOptions, type FhevmRuntimeConfig, type FinalizeUnwrapRequest, type FinalizeUnwrapSubmittedEvent, type GenericLogger, type GenericProvider, type GenericSigner, type GenericStorage, type Hex, IndexedDBStorage, InsufficientAllowanceError, InsufficientConfidentialBalanceError, InsufficientERC20BalanceError, InvalidTransportKeyPairError, KeyWrappingError, type ListPairsOptions, MAX_UINT64, MemoryStorage, MutableWalletAccountStore, NoCiphertextError, NotEntitledError, Offline, type OnChainEvent, type PaginatedResult, type Permission, type PermissionBase, type PermissionV1, type PermissionV2, type PermitErrorEvent, type PermitOperation, Permits, type PrepareFees, type PrepareOptions, type PreparePermitRequest, type PrepareTransactionRequest, type PreparedFor, type PreparedPermit, type PreparedPermitBase, PreparedPermitChainMismatchError, PreparedPermitExpiredError, type PreparedPermitV1, type PreparedPermitV2, type PreparedTransaction, type RawLog, type ReadContractArgs, type ReadContractConfig, type ReadContractReturnType, type ReadFunctionName, type RelayerConfig, type RelayerOptions, RelayerRequestFailedError, type RelayerSDK, type RevokeDelegationRequest, type RevokeDelegationSubmittedEvent, type RevokedDelegationForUserDecryptionEvent, RevokedKmsContextError, RpcRateLimitError, type SerializedPermit, type SerializedPermitEip712, type SerializedTransportKeyPair, type SetOperatorRequest, type SetOperatorSubmittedEvent, type ShieldCallbacks, type ShieldOptions, type ShieldPath, type ShieldSubmittedEvent, SignerNotConfiguredError, SignerRequiredError, type SigningErrorMetadata, SigningFailedError, SigningRejectedError, TOKEN_TOPICS, Token, type TokenWrapperPair, type TokenWrapperPairWithMetadata, Topics, type TransactionErrorEvent, type TransactionKind, type TransactionOperation, type TransactionReceipt, type TransactionResult, TransactionRevertedError, type TransferAndCallRequest, type TransferCallbacks, type TransferFromSubmittedEvent, type TransferOptions, type TransferSubmittedEvent, TransportKeyPairChangedError, TransportKeyPairExpiredError, type TypedValue, UnifiedDecryptionUnsupportedError, UnifiedPermitNotSupportedError, type UnshieldAlreadyFinalizedDetails, UnshieldAlreadyFinalizedError, type UnshieldCallbacks, type UnshieldOptions, type UnshieldPhase1SubmittedEvent, type UnshieldPhase2StartedEvent, type UnshieldPhase2SubmittedEvent, type UnwrapAllRequest, type UnwrapFinalizedEvent, type UnwrapRequest, type UnwrapRequestedEvent, type UnwrapResult, type UnwrapSubmittedEvent, WILDCARD_CONTRACT, WILDCARD_PERMIT, type WalletAccount, type WalletAccountChange, type WalletAccountListener, WalletAccountNotReadyError, type WalletAccountStore, WalletNotConnectedError, type WildcardPermit, type WrapEvent, type WrapOptions, type WrapRequest, type WrapSubmittedEvent, WrappedToken, WrappersRegistry, type WrappersRegistryConfig, type WriteContractArgs, type WriteContractConfig, type WriteFunctionName, ZERO_ENCRYPTED_VALUE, type ZamaConfig, type ZamaConfigBase, type ZamaConfigEthers, type ZamaConfigGeneric, type ZamaConfigViem, ZamaError, ZamaErrorCode, ZamaSDK, type ZamaSDKEvent, type ZamaSDKEventListener, type ZamaSDKEventType, ZamaSDKEvents, type ZamaSDKOptions, allowanceContract, anvil, approveContract, balanceOfContract, bscTestnet, chains, chromeSessionStorage, cleartext, confidentialBalanceOfContract, confidentialTotalSupplyContract, confidentialTransferContract, confidentialTransferFromContract, createConfig, createWalletAccountStore, decimalsContract, decodeAclEvent, decodeAclEvents, decodeConfidentialTransfer, decodeDelegatedForUserDecryption, decodeOnChainEvent, decodeOnChainEvents, decodeRevokedDelegationForUserDecryption, decodeUnwrapFinalized, decodeUnwrapRequested, decodeWrap, delegateForUserDecryptionContract, finalizeUnwrapContract, findDelegatedForUserDecryption, findRevokedDelegationForUserDecryption, findUnwrapRequested, findWrap, getConfidentialTokenAddressContract, getDelegationExpiryContract, getTokenAddressContract, getTokenPairContract, getTokenPairsContract, getTokenPairsLengthContract, getTokenPairsSliceContract, hardhat, hoodi, indexedDBStorage, inferredTotalSupplyContract, ingenTestnet, isConfidentialTokenContract, isConfidentialTokenValidContract, isConfidentialWrapperContract, isEncryptedValueZero, isHandleDelegatedContract, isOperatorContract, isRetryable, mainnet, matchZamaError, memoryStorage, nameContract, polygon, polygonAmoy, rateContract, retryAfterSeconds, revokeDelegationContract, sepolia, setOperatorContract, supportsInterfaceContract, symbolContract, transferAndCallContract, underlyingContract, unwrapContract, unwrapFromBalanceContract, unwrapRequesterContract, wrapContract };
|