@tokenops/sdk 1.5.1 → 2.0.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/CHANGELOG.md +198 -2
- package/CONTRIBUTING.md +4 -2
- package/README.md +146 -90
- package/SECURITY.md +7 -1
- package/SUPPORT.md +47 -0
- package/dist/{chunk-YQIBBEFJ.js → chunk-335Z2W67.js} +1 -1
- package/dist/{chunk-2NCLOQ56.cjs → chunk-3QHNYEQD.cjs} +77 -0
- package/dist/chunk-456VDDA3.js +370 -0
- package/dist/{chunk-SG65XWH7.js → chunk-4RAAATVY.js} +1 -3
- package/dist/{chunk-6BMP4ICG.js → chunk-4TSDNZQ3.js} +60 -2
- package/dist/{chunk-PUPKNW3R.cjs → chunk-5576FRT3.cjs} +30 -6
- package/dist/{chunk-AOP6HMPW.js → chunk-6GNR22OV.js} +75 -1
- package/dist/{chunk-NTZY6IB7.js → chunk-6NAVMWZQ.js} +4 -3
- package/dist/{chunk-C7BRZXJA.cjs → chunk-6PXXGACR.cjs} +8 -7
- package/dist/{chunk-IJFQ5L4I.js → chunk-74QFZ5MK.js} +4 -3
- package/dist/chunk-7AFPOE7N.cjs +59 -0
- package/dist/chunk-AXIPOR3C.js +56 -0
- package/dist/chunk-CTED3MTR.cjs +380 -0
- package/dist/{chunk-XGGTQQFH.js → chunk-DZHYSUGY.js} +28 -7
- package/dist/{chunk-OXTLPTO3.js → chunk-EAJ7SYHE.js} +4 -3
- package/dist/{chunk-V2PXZVBF.cjs → chunk-FGEB7RMY.cjs} +4 -4
- package/dist/chunk-GKKDAW44.js +8823 -0
- package/dist/{chunk-2PWNH3UE.js → chunk-H5POPGOZ.js} +63 -5
- package/dist/{chunk-W7IGCOVL.cjs → chunk-JQYC66TO.cjs} +9 -8
- package/dist/{chunk-PFXURMBZ.cjs → chunk-JZLGCTGK.cjs} +68 -8
- package/dist/{chunk-JYOTGRSO.cjs → chunk-KFRDLKMA.cjs} +61 -1
- package/dist/chunk-M4IT6DNJ.cjs +608 -0
- package/dist/{chunk-KLKI352M.cjs → chunk-MVDQMV25.cjs} +0 -3
- package/dist/chunk-NCVX3K2N.cjs +161 -0
- package/dist/chunk-NWFMBLSQ.js +4 -0
- package/dist/chunk-O5676ZWY.js +585 -0
- package/dist/chunk-PUX5VXDB.cjs +8845 -0
- package/dist/{chunk-IXLO7GO5.js → chunk-TWT3STIX.js} +46 -80
- package/dist/chunk-UG5RKLU2.cjs +6 -0
- package/dist/chunk-VP2B4WM2.js +154 -0
- package/dist/{chunk-5X5WL5CU.cjs → chunk-WJLECC22.cjs} +51 -88
- package/dist/{chunk-WENHUPZC.cjs → chunk-XAYGD4E4.cjs} +9 -8
- package/dist/core/addresses.d.ts +15 -3
- package/dist/core/brands.d.ts +8 -2
- package/dist/core/errors.d.ts +71 -10
- package/dist/core/preflight.d.ts +1 -0
- package/dist/fhe/erc7984-abi.d.ts +1 -0
- package/dist/fhe/index.cjs +34 -13
- package/dist/fhe/index.d.cts +1 -0
- package/dist/fhe/index.d.ts +1 -0
- package/dist/fhe/index.js +19 -6
- package/dist/fhe/mock-erc7984.d.ts +4 -4
- package/dist/fhe/operators.d.ts +160 -3
- package/dist/fhe/react/index.cjs +14 -0
- package/dist/fhe/react/index.d.cts +2 -0
- package/dist/fhe/react/index.d.ts +2 -0
- package/dist/fhe/react/index.js +6 -0
- package/dist/fhe/react/useEnsureOperator.d.ts +56 -0
- package/dist/fhe/react/useIsOperator.d.ts +54 -0
- package/dist/fhe/sepolia-encryptor-web.d.ts +18 -3
- package/dist/fhe/types.d.ts +6 -0
- package/dist/fhe-airdrop/abis/{cloneable.d.ts → airdrop-base.d.ts} +254 -396
- package/dist/fhe-airdrop/abis/compliance.d.ts +422 -0
- package/dist/fhe-airdrop/abis/ecdsa.d.ts +1316 -0
- package/dist/fhe-airdrop/abis/factory.d.ts +1319 -190
- package/dist/fhe-airdrop/abis/index.d.ts +5 -2
- package/dist/fhe-airdrop/abis/merkle.d.ts +1238 -0
- package/dist/fhe-airdrop/advanced/index.cjs +10 -12
- package/dist/fhe-airdrop/advanced/index.d.cts +34 -11
- package/dist/fhe-airdrop/advanced/index.d.ts +34 -11
- package/dist/fhe-airdrop/advanced/index.js +2 -8
- package/dist/fhe-airdrop/advanced/react/index.cjs +34 -48
- package/dist/fhe-airdrop/advanced/react/index.d.cts +9 -3
- package/dist/fhe-airdrop/advanced/react/index.d.ts +9 -3
- package/dist/fhe-airdrop/advanced/react/index.js +33 -48
- package/dist/fhe-airdrop/advanced/react/usePredictEcdsaAirdropAddress.d.ts +33 -0
- package/dist/fhe-airdrop/advanced/react/usePredictMerkleAirdropAddress.d.ts +27 -0
- package/dist/fhe-airdrop/airdrop-base.d.ts +600 -0
- package/dist/fhe-airdrop/campaign.d.ts +297 -0
- package/dist/fhe-airdrop/compliance.d.ts +302 -0
- package/dist/fhe-airdrop/constants.d.ts +33 -0
- package/dist/fhe-airdrop/ecdsa.d.ts +263 -0
- package/dist/fhe-airdrop/encryption.d.ts +92 -14
- package/dist/fhe-airdrop/errors.d.ts +245 -15
- package/dist/fhe-airdrop/factory.d.ts +533 -274
- package/dist/fhe-airdrop/guards.d.ts +273 -0
- package/dist/fhe-airdrop/index.cjs +1089 -33
- package/dist/fhe-airdrop/index.d.cts +46 -8
- package/dist/fhe-airdrop/index.d.ts +46 -8
- package/dist/fhe-airdrop/index.js +929 -7
- package/dist/fhe-airdrop/merkle-tree.d.ts +103 -0
- package/dist/fhe-airdrop/merkle.d.ts +180 -0
- package/dist/fhe-airdrop/react/_shared.d.ts +144 -71
- package/dist/fhe-airdrop/react/index.cjs +364 -413
- package/dist/fhe-airdrop/react/index.d.cts +53 -72
- package/dist/fhe-airdrop/react/index.d.ts +53 -72
- package/dist/fhe-airdrop/react/index.js +258 -369
- package/dist/fhe-airdrop/react/useAirdropGasFee.d.ts +10 -5
- package/dist/fhe-airdrop/react/useAirdropHasRole.d.ts +15 -6
- package/dist/fhe-airdrop/react/useAirdropPause.d.ts +30 -0
- package/dist/fhe-airdrop/react/useAirdropPaused.d.ts +17 -0
- package/dist/fhe-airdrop/react/useAirdropToken.d.ts +11 -4
- package/dist/fhe-airdrop/react/useAirdropWindow.d.ts +37 -0
- package/dist/fhe-airdrop/react/useClaimedAmount.d.ts +29 -0
- package/dist/fhe-airdrop/react/useComplianceManager.d.ts +16 -0
- package/dist/fhe-airdrop/react/useCreateEcdsaAirdrop.d.ts +28 -0
- package/dist/fhe-airdrop/react/useCreateMerkleAirdrop.d.ts +25 -0
- package/dist/fhe-airdrop/react/useEcdsaClaim.d.ts +23 -0
- package/dist/fhe-airdrop/react/useEffectiveUpgradeable.d.ts +20 -0
- package/dist/fhe-airdrop/react/useExtendClaimWindow.d.ts +17 -12
- package/dist/fhe-airdrop/react/useFactoryFees.d.ts +28 -0
- package/dist/fhe-airdrop/react/useFactoryRegistry.d.ts +35 -0
- package/dist/fhe-airdrop/react/useFundAirdrop.d.ts +35 -0
- package/dist/fhe-airdrop/react/useGrantInstanceRoles.d.ts +35 -0
- package/dist/fhe-airdrop/react/useMerkleClaim.d.ts +34 -0
- package/dist/fhe-airdrop/react/useMerkleRoot.d.ts +15 -0
- package/dist/fhe-airdrop/react/useSetMerkleRoot.d.ts +22 -0
- package/dist/fhe-airdrop/react/useWithdrawConfidential.d.ts +23 -0
- package/dist/fhe-airdrop/roles.d.ts +147 -0
- package/dist/fhe-airdrop/types.d.ts +68 -55
- package/dist/fhe-disperse/errors.d.ts +55 -0
- package/dist/fhe-disperse/index.cjs +34 -25
- package/dist/fhe-disperse/index.d.cts +1 -1
- package/dist/fhe-disperse/index.d.ts +1 -1
- package/dist/fhe-disperse/index.js +6 -5
- package/dist/fhe-disperse/react/index.cjs +42 -23
- package/dist/fhe-disperse/react/index.d.cts +3 -1
- package/dist/fhe-disperse/react/index.d.ts +3 -1
- package/dist/fhe-disperse/react/index.js +9 -6
- package/dist/fhe-vesting/advanced/index.cjs +8 -7
- package/dist/fhe-vesting/advanced/index.js +6 -5
- package/dist/fhe-vesting/advanced/react/index.cjs +12 -11
- package/dist/fhe-vesting/advanced/react/index.js +9 -8
- package/dist/fhe-vesting/index.cjs +35 -34
- package/dist/fhe-vesting/index.js +7 -6
- package/dist/fhe-vesting/manager.d.ts +19 -0
- package/dist/fhe-vesting/react/index.cjs +160 -140
- package/dist/fhe-vesting/react/index.d.cts +6 -4
- package/dist/fhe-vesting/react/index.d.ts +6 -4
- package/dist/fhe-vesting/react/index.js +24 -16
- package/dist/fhe-vesting/react/useAccessClaimableAmount.d.ts +11 -3
- package/dist/fhe-vesting/react/useAccessSettledAmount.d.ts +11 -3
- package/dist/fhe-vesting/react/useAccessTotalAllocation.d.ts +11 -3
- package/dist/fhe-vesting/react/useAccessVestedAmount.d.ts +11 -3
- package/dist/fhe-vesting/react/useAdminGetClaimableAmount.d.ts +1 -1
- package/dist/fhe-vesting/react/useAdminGetSettledAmount.d.ts +1 -1
- package/dist/fhe-vesting/react/useAdminGetTotalAllocation.d.ts +1 -1
- package/dist/fhe-vesting/react/useAdminGetVestedAmount.d.ts +1 -1
- package/dist/fhe-vesting/react/useAdminPartialClaim.d.ts +8 -0
- package/dist/fhe-vesting/react/useClaim.d.ts +1 -1
- package/dist/fhe-vesting/react/useDiscloseHandleToParty.d.ts +1 -1
- package/dist/fhe-vesting/react/useManagerDiscloseHandleToParty.d.ts +1 -1
- package/dist/fhe-vesting/react/usePartialClaim.d.ts +1 -1
- package/dist/fhe-vesting/react/useVestingInfo.d.ts +1 -1
- package/dist/fhe-vesting/types.d.ts +12 -1
- package/dist/index.cjs +27 -15
- package/dist/index.js +1 -1
- package/dist/testnet-faucet/index.cjs +17 -16
- package/dist/testnet-faucet/index.js +5 -4
- package/dist/testnet-faucet/react/index.cjs +11 -10
- package/dist/testnet-faucet/react/index.js +6 -5
- package/package.json +18 -9
- package/dist/chunk-4WPGQSNT.cjs +0 -44
- package/dist/chunk-6R4KNAPK.js +0 -1630
- package/dist/chunk-DUZIIRPF.js +0 -1655
- package/dist/chunk-MCRBVJGZ.cjs +0 -1637
- package/dist/chunk-ODLTEGHB.js +0 -41
- package/dist/chunk-ORFTDNFZ.js +0 -105
- package/dist/chunk-T46YXSBP.cjs +0 -109
- package/dist/chunk-TIUKIY5V.cjs +0 -1663
- package/dist/fhe-airdrop/advanced/factory-advanced.d.ts +0 -53
- package/dist/fhe-airdrop/advanced/react/usePredictAirdropAddress.d.ts +0 -49
- package/dist/fhe-airdrop/airdrop.d.ts +0 -310
- package/dist/fhe-airdrop/react/useAccessClaimAmount.d.ts +0 -31
- package/dist/fhe-airdrop/react/useAirdropCanExtendClaimWindow.d.ts +0 -7
- package/dist/fhe-airdrop/react/useAirdropClaim.d.ts +0 -27
- package/dist/fhe-airdrop/react/useAirdropClaimTypehash.d.ts +0 -10
- package/dist/fhe-airdrop/react/useAirdropClaimedSignatures.d.ts +0 -16
- package/dist/fhe-airdrop/react/useAirdropDeploymentBlockNumber.d.ts +0 -6
- package/dist/fhe-airdrop/react/useAirdropDomainSeparator.d.ts +0 -8
- package/dist/fhe-airdrop/react/useAirdropEndTime.d.ts +0 -10
- package/dist/fhe-airdrop/react/useAirdropFactoryCustomFee.d.ts +0 -17
- package/dist/fhe-airdrop/react/useAirdropFactoryDefaultGasFee.d.ts +0 -10
- package/dist/fhe-airdrop/react/useAirdropFactoryDisableCustomFee.d.ts +0 -15
- package/dist/fhe-airdrop/react/useAirdropFactoryFeeCollector.d.ts +0 -11
- package/dist/fhe-airdrop/react/useAirdropFactoryInitCodeHash.d.ts +0 -17
- package/dist/fhe-airdrop/react/useAirdropFactorySetCustomFee.d.ts +0 -17
- package/dist/fhe-airdrop/react/useAirdropFactorySetDefaultGasFee.d.ts +0 -16
- package/dist/fhe-airdrop/react/useAirdropFactorySetFeeCollector.d.ts +0 -15
- package/dist/fhe-airdrop/react/useAirdropGrantRole.d.ts +0 -16
- package/dist/fhe-airdrop/react/useAirdropHasClaimEnded.d.ts +0 -7
- package/dist/fhe-airdrop/react/useAirdropHasClaimStarted.d.ts +0 -7
- package/dist/fhe-airdrop/react/useAirdropIsClaimWindowActive.d.ts +0 -9
- package/dist/fhe-airdrop/react/useAirdropIsPaused.d.ts +0 -8
- package/dist/fhe-airdrop/react/useAirdropIsSignatureClaimed.d.ts +0 -22
- package/dist/fhe-airdrop/react/useAirdropIsSignatureValid.d.ts +0 -51
- package/dist/fhe-airdrop/react/useAirdropRevokeRole.d.ts +0 -15
- package/dist/fhe-airdrop/react/useAirdropStartTime.d.ts +0 -10
- package/dist/fhe-airdrop/react/useAirdropWithdrawGasFee.d.ts +0 -15
- package/dist/fhe-airdrop/react/useAirdropWithdrawOtherConfidentialToken.d.ts +0 -14
- package/dist/fhe-airdrop/react/useAirdropWithdrawOtherToken.d.ts +0 -14
- package/dist/fhe-airdrop/react/useClaim.d.ts +0 -31
- package/dist/fhe-airdrop/react/useConfidentialAirdropFactoryImplementation.d.ts +0 -11
- package/dist/fhe-airdrop/react/useCreateAndFundConfidentialAirdrop.d.ts +0 -41
- package/dist/fhe-airdrop/react/useCreateAndFundConfidentialAirdropAndGetAddress.d.ts +0 -48
- package/dist/fhe-airdrop/react/useCreateConfidentialAirdrop.d.ts +0 -29
- package/dist/fhe-airdrop/react/useCreateConfidentialAirdropAndGetAddress.d.ts +0 -31
- package/dist/fhe-airdrop/react/useDisableCustomFee.d.ts +0 -14
- package/dist/fhe-airdrop/react/useFactoryCustomFee.d.ts +0 -17
- package/dist/fhe-airdrop/react/useFactoryDefaultGasFee.d.ts +0 -10
- package/dist/fhe-airdrop/react/useFactoryFeeCollector.d.ts +0 -11
- package/dist/fhe-airdrop/react/useFactoryInitCodeHash.d.ts +0 -17
- package/dist/fhe-airdrop/react/useFundConfidentialAirdrop.d.ts +0 -33
- package/dist/fhe-airdrop/react/useGetClaimAmount.d.ts +0 -30
- package/dist/fhe-airdrop/react/usePreflightCreateAirdrop.d.ts +0 -51
- package/dist/fhe-airdrop/react/useSetCustomFee.d.ts +0 -16
- package/dist/fhe-airdrop/react/useSetDefaultGasFee.d.ts +0 -15
- package/dist/fhe-airdrop/react/useSetFeeCollector.d.ts +0 -14
- package/dist/fhe-airdrop/react/useSetPaused.d.ts +0 -14
- package/dist/fhe-airdrop/react/useSignClaimAuthorization.d.ts +0 -31
- package/dist/fhe-airdrop/react/useWithdraw.d.ts +0 -12
- package/dist/fhe-airdrop/react/useWithdrawOtherConfidentialToken.d.ts +0 -13
- package/dist/fhe-airdrop/react/useWithdrawOtherToken.d.ts +0 -13
- package/dist/fhe-vesting/react/useGetClaimableAmount.d.ts +0 -13
- package/dist/fhe-vesting/react/useGetSettledAmount.d.ts +0 -14
- package/dist/fhe-vesting/react/useGetTotalAllocation.d.ts +0 -13
- package/dist/fhe-vesting/react/useGetVestedAmount.d.ts +0 -25
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
import type { Address, Hex } from "viem";
|
|
2
|
+
import { type TokenOpsSdkError } from "../core/errors.js";
|
|
3
|
+
import type { AirdropBaseClient } from "./airdrop-base.js";
|
|
4
|
+
/**
|
|
5
|
+
* The on-chain role names this module knows how to grant or revoke.
|
|
6
|
+
*
|
|
7
|
+
* @alpha
|
|
8
|
+
*/
|
|
9
|
+
export type RoleName = "DEFAULT_ADMIN_ROLE" | "PAUSER_ROLE" | "WINDOW_ADMIN_ROLE" | "TREASURY_ROLE" | "RESCUER_ROLE" | "DISCLOSURE_ADMIN_ROLE" | "UPGRADER_ROLE" | "MERKLE_ADMIN_ROLE" | "SIGNER_ROLE";
|
|
10
|
+
/**
|
|
11
|
+
* The roles a campaign creator may hand off after `createEcdsaAirdrop` /
|
|
12
|
+
* `createMerkleAirdrop`. Every field is optional — pass only the roles you
|
|
13
|
+
* intend to split.
|
|
14
|
+
*
|
|
15
|
+
* `merkleAdmin` only exists on Merkle instances and `signer` only on ECDSA
|
|
16
|
+
* ones; passing either against the wrong variant is one of
|
|
17
|
+
* {@link planInstanceRoleSplit}'s three refusals.
|
|
18
|
+
*
|
|
19
|
+
* @alpha
|
|
20
|
+
*/
|
|
21
|
+
export interface InstanceRoleAssignment {
|
|
22
|
+
pauser?: Address;
|
|
23
|
+
windowAdmin?: Address;
|
|
24
|
+
treasury?: Address;
|
|
25
|
+
rescuer?: Address;
|
|
26
|
+
disclosureAdmin?: Address;
|
|
27
|
+
upgrader?: Address;
|
|
28
|
+
merkleAdmin?: Address;
|
|
29
|
+
signer?: Address;
|
|
30
|
+
/** Granting this always fails from DEFAULT_ADMIN — see planInstanceRoleSplit. */
|
|
31
|
+
feeCollector?: Address;
|
|
32
|
+
/** Transfers DEFAULT_ADMIN_ROLE. Granted first, then revoked from the creator. */
|
|
33
|
+
admin?: Address;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* One `grantRole`/`revokeRole` transaction {@link grantInstanceRoles} will submit, in order.
|
|
37
|
+
*
|
|
38
|
+
* @alpha
|
|
39
|
+
*/
|
|
40
|
+
export interface RoleGrantStep {
|
|
41
|
+
kind: "grant" | "revoke";
|
|
42
|
+
role: RoleName;
|
|
43
|
+
account: Address;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* The outcome of one step from {@link grantInstanceRoles}. Exactly one of
|
|
47
|
+
* `hash` / `error` is set — never both, never neither. `hash` is set only
|
|
48
|
+
* once that transaction's receipt has been confirmed with `status ===
|
|
49
|
+
* "success"`; a transaction that was submitted but mined with a reverted
|
|
50
|
+
* status is reported as `error`, not `hash`.
|
|
51
|
+
*
|
|
52
|
+
* @alpha
|
|
53
|
+
*/
|
|
54
|
+
export interface RoleGrantOutcome {
|
|
55
|
+
role: string;
|
|
56
|
+
account: Address;
|
|
57
|
+
hash?: Hex;
|
|
58
|
+
error?: TokenOpsSdkError;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Turn an {@link InstanceRoleAssignment} into an ordered list of
|
|
62
|
+
* `grantRole`/`revokeRole` steps — a pure function, precisely so its ordering
|
|
63
|
+
* guarantees are testable without a chain.
|
|
64
|
+
*
|
|
65
|
+
* Three requests are refused outright rather than turned into a step that
|
|
66
|
+
* would only revert on-chain:
|
|
67
|
+
*
|
|
68
|
+
* 1. **`feeCollector`.** `FEE_COLLECTOR_ROLE` is self-administered
|
|
69
|
+
* (`_setRoleAdmin(FEE_COLLECTOR_ROLE, FEE_COLLECTOR_ROLE)`,
|
|
70
|
+
* `ConfidentialAirdropBase.sol:142`) — `DEFAULT_ADMIN_ROLE` cannot grant
|
|
71
|
+
* it, only an existing member can, and the campaign creator never is one
|
|
72
|
+
* (the factory's collector is seeded instead, `:143`).
|
|
73
|
+
* 2. **`admin` set to the zero address.** Mirrors the contract's
|
|
74
|
+
* unconditional `ZeroAdminGrant` guard (`_grantRole`, `:281`).
|
|
75
|
+
* 3. **A variant-only role on the wrong campaign** — `merkleAdmin` on an
|
|
76
|
+
* ECDSA instance, or `signer` on a Merkle one. Neither role exists there;
|
|
77
|
+
* the getter itself would revert.
|
|
78
|
+
*
|
|
79
|
+
* `admin`, when present, always produces two steps — grant the new admin,
|
|
80
|
+
* then revoke `args.caller` — and the revoke is always ORDERED LAST, after
|
|
81
|
+
* every other step in the plan. `_revokeRole`'s `LastAdmin` floor
|
|
82
|
+
* (`ConfidentialAirdropBase.sol:261`) blocks removing the sole
|
|
83
|
+
* `DEFAULT_ADMIN_ROLE` member, so revoking the creator first would strand
|
|
84
|
+
* every later grant with no admin left to authorize it.
|
|
85
|
+
*
|
|
86
|
+
* @throws {@link FeeCollectorSelfAdministeredError} for refusal 1 — a distinct
|
|
87
|
+
* condition with a distinct remedy (an existing collector must call
|
|
88
|
+
* `grantRole`), so it gets its own type rather than being folded into the
|
|
89
|
+
* generic argument error.
|
|
90
|
+
* @throws {@link InvalidArgumentError} for refusals 2 and 3.
|
|
91
|
+
*
|
|
92
|
+
* @alpha
|
|
93
|
+
*/
|
|
94
|
+
export declare function planInstanceRoleSplit(args: {
|
|
95
|
+
assignment: InstanceRoleAssignment;
|
|
96
|
+
caller: Address;
|
|
97
|
+
airdropType: "ecdsa" | "merkle";
|
|
98
|
+
}): RoleGrantStep[];
|
|
99
|
+
/**
|
|
100
|
+
* Execute an {@link InstanceRoleAssignment} against a live instance:
|
|
101
|
+
* {@link planInstanceRoleSplit} the steps, then submit them one at a time,
|
|
102
|
+
* **waiting for each step's receipt before submitting the next.**
|
|
103
|
+
*
|
|
104
|
+
* That confirmation is not optional bookkeeping — it is what makes the
|
|
105
|
+
* `DEFAULT_ADMIN_ROLE` handoff correct. `revokeRole`'s simulate reads
|
|
106
|
+
* `latest` chain state; if the preceding grant were only submitted and not
|
|
107
|
+
* yet mined, the revoke would simulate (and the contract would enforce its
|
|
108
|
+
* `LastAdmin` floor) against a world where the new admin does not exist yet,
|
|
109
|
+
* reverting a step that should succeed. Confirming first makes each step's
|
|
110
|
+
* simulate see every effect the plan already committed.
|
|
111
|
+
*
|
|
112
|
+
* This makes the executor slower than a fire-and-forget submit loop —
|
|
113
|
+
* intentionally: correctness of the ordering guarantee in
|
|
114
|
+
* {@link planInstanceRoleSplit} depends on it.
|
|
115
|
+
*
|
|
116
|
+
* **This is several transactions, not one — never atomic.** Each step is
|
|
117
|
+
* caught individually, so one failing grant or revoke does not abort the
|
|
118
|
+
* rest; inspect each {@link RoleGrantOutcome} rather than assuming
|
|
119
|
+
* all-or-nothing. A step whose transaction is submitted but mined with a
|
|
120
|
+
* reverted status is recorded as a failed outcome (`error` set, not `hash`)
|
|
121
|
+
* — a submitted-but-reverted transaction is never reported as a success. A
|
|
122
|
+
* `DEFAULT_ADMIN_ROLE` handoff that fails on the revoke half after the grant
|
|
123
|
+
* half already landed leaves the instance with TWO admins — not broken, just
|
|
124
|
+
* not yet what was asked for; re-run with only `assignment.admin` set (and
|
|
125
|
+
* `revokeFromCreator: true`) to finish it.
|
|
126
|
+
*
|
|
127
|
+
* The plan's `caller` and `airdropType` are derived from `airdrop` itself —
|
|
128
|
+
* the wallet client's default account, and a chain read of `airdropType()` —
|
|
129
|
+
* so this function's inputs stay limited to what the caller actually chooses.
|
|
130
|
+
*
|
|
131
|
+
* @param args.revokeFromCreator When `assignment.admin` is set, whether to
|
|
132
|
+
* also revoke the creator's `DEFAULT_ADMIN_ROLE` (the default). Pass `false`
|
|
133
|
+
* to grant the new admin only, leaving both addresses as admins — an
|
|
134
|
+
* escape hatch for callers not yet ready to give up the creator's access.
|
|
135
|
+
* @throws {@link FeeCollectorSelfAdministeredError} or {@link InvalidArgumentError} before any
|
|
136
|
+
* transaction — but NOT synchronously: the plan is built after an awaited
|
|
137
|
+
* `airdropType()` read. See the three refusals on {@link planInstanceRoleSplit}.
|
|
138
|
+
* @throws {@link MissingWalletClientError} when `airdrop` has no wallet client.
|
|
139
|
+
* @throws {@link MissingAccountError} when the wallet client has no default account.
|
|
140
|
+
*
|
|
141
|
+
* @alpha
|
|
142
|
+
*/
|
|
143
|
+
export declare function grantInstanceRoles(args: {
|
|
144
|
+
airdrop: AirdropBaseClient;
|
|
145
|
+
assignment: InstanceRoleAssignment;
|
|
146
|
+
revokeFromCreator?: boolean;
|
|
147
|
+
}): Promise<RoleGrantOutcome[]>;
|
|
@@ -1,66 +1,79 @@
|
|
|
1
|
-
import type { Address } from "viem";
|
|
2
|
-
import type {
|
|
3
|
-
export type { EncryptedInput, EncryptedInputs, EncryptedViewResult } from "../fhe/types.js";
|
|
1
|
+
import type { Address, Hex } from "viem";
|
|
2
|
+
import type { DedupMode, DeploymentMode } from "./constants.js";
|
|
4
3
|
/**
|
|
5
|
-
*
|
|
4
|
+
* Create-time fields shared by both variants. There is deliberately no `admin`
|
|
5
|
+
* field: the factory injects `admin = msg.sender`. Split roles after create
|
|
6
|
+
* with `grantInstanceRoles` — see `roles.ts`.
|
|
6
7
|
*
|
|
7
|
-
*
|
|
8
|
-
* maps them to the on-chain struct fields `startTime` / `endTime` before
|
|
9
|
-
* encoding — do not pass the on-chain names directly.
|
|
8
|
+
* @alpha
|
|
10
9
|
*/
|
|
11
|
-
export interface
|
|
10
|
+
export interface CommonAirdropParams {
|
|
12
11
|
token: Address;
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
startTime: number;
|
|
13
|
+
endTime: number;
|
|
15
14
|
canExtendClaimWindow: boolean;
|
|
16
|
-
|
|
15
|
+
/**
|
|
16
|
+
* Only valid when `token` is a stock ERC7984ERC20Wrapper: `claimAndUnwrap` burns from the
|
|
17
|
+
* airdrop instance's pooled wrapper balance, so a hooked or fee-taking wrapper can deliver an
|
|
18
|
+
* amount the pool balance alone doesn't bound correctly. See {@link NonStockWrapperError}.
|
|
19
|
+
*/
|
|
20
|
+
unwrappable: boolean;
|
|
21
|
+
/** Client admin AND client delegate of the compliance clone. Zero means msg.sender. */
|
|
22
|
+
complianceAdmin: Address;
|
|
17
23
|
}
|
|
18
|
-
/**
|
|
19
|
-
export interface
|
|
20
|
-
|
|
21
|
-
|
|
24
|
+
/** @alpha */
|
|
25
|
+
export interface EcdsaAirdropParams {
|
|
26
|
+
common: CommonAirdropParams;
|
|
27
|
+
signer: Address;
|
|
28
|
+
dedupMode: DedupMode;
|
|
29
|
+
}
|
|
30
|
+
/** @alpha */
|
|
31
|
+
export interface MerkleAirdropParams {
|
|
32
|
+
common: CommonAirdropParams;
|
|
33
|
+
/** Zero root is only permitted when `isMerkleRootMutable` is true. */
|
|
34
|
+
merkleRoot: Hex;
|
|
35
|
+
isMerkleRootMutable: boolean;
|
|
22
36
|
}
|
|
23
37
|
/**
|
|
24
|
-
*
|
|
38
|
+
* Arguments shared by both `factory.createEcdsaAirdrop` / `createMerkleAirdrop` entrypoints.
|
|
25
39
|
*
|
|
26
|
-
*
|
|
27
|
-
* - `isFactoryOperator` — `true` when the creator has approved the factory as
|
|
28
|
-
* an ERC-7984 operator on `params.token`. Only required when funding in the
|
|
29
|
-
* same transaction (`createAndFundConfidentialAirdrop` /
|
|
30
|
-
* `fundConfidentialAirdrop`); `false` also when the token address was
|
|
31
|
-
* structurally invalid and the read was skipped.
|
|
32
|
-
* - `gasFee` — the per-claim gas fee (wei) the factory will embed into the
|
|
33
|
-
* clone for this creator: the creator's custom fee when one is enabled,
|
|
34
|
-
* otherwise `defaultGasFee`. This is the `gasFee` to use for address
|
|
35
|
-
* prediction and later `fundConfidentialAirdrop` calls.
|
|
36
|
-
* - `predictedAirdrop` — deterministic CREATE2 clone address for
|
|
37
|
-
* `(params, userSalt, creator, gasFee)`. `undefined` when `userSalt` was not
|
|
38
|
-
* supplied or the params were structurally invalid.
|
|
39
|
-
* - `alreadyDeployed` — `true` when bytecode already exists at
|
|
40
|
-
* `predictedAirdrop` (a repeat create with the same salt would revert).
|
|
41
|
-
* `undefined` when `predictedAirdrop` is `undefined`.
|
|
42
|
-
* - `ready` — `true` when no blockers were detected.
|
|
43
|
-
* - `blockers` — human-readable blocker descriptions. Empty when
|
|
44
|
-
* `ready === true`.
|
|
45
|
-
* - `blockerErrors` — the same blockers as typed `TokenOpsSdkError`s, index-
|
|
46
|
-
* aligned with `blockers`. Branch on `error.code` to render UI.
|
|
40
|
+
* @alpha
|
|
47
41
|
*/
|
|
48
|
-
export interface
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
42
|
+
export interface CreateAirdropArgs<P> {
|
|
43
|
+
params: P;
|
|
44
|
+
mode: DeploymentMode;
|
|
45
|
+
userSalt: Hex;
|
|
46
|
+
}
|
|
47
|
+
/** @alpha */
|
|
48
|
+
export interface CreateAirdropResult {
|
|
49
|
+
hash: Hex;
|
|
50
|
+
airdrop: Address;
|
|
51
|
+
complianceManager: Address;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* One recipient's committed allocation, keyed for `CampaignEntry.merkleProof` construction.
|
|
55
|
+
*
|
|
56
|
+
* @alpha
|
|
57
|
+
*/
|
|
58
|
+
export interface CampaignRecipient {
|
|
59
|
+
recipient: Address;
|
|
60
|
+
/** The recipient's CUMULATIVE total, not a per-drop tranche. A claim pays
|
|
61
|
+
* `total - min(total, alreadyDelivered)`. */
|
|
62
|
+
cumulativeTotal: bigint;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* One recipient's encrypted, proof-bearing claim input — everything `merkle.claim` needs.
|
|
66
|
+
*
|
|
67
|
+
* @alpha
|
|
68
|
+
*/
|
|
69
|
+
export interface CampaignEntry {
|
|
70
|
+
recipient: Address;
|
|
71
|
+
handle: Hex;
|
|
72
|
+
inputProof: Hex;
|
|
73
|
+
merkleProof: readonly Hex[];
|
|
74
|
+
}
|
|
75
|
+
/** @alpha */
|
|
76
|
+
export interface BuiltCampaign {
|
|
77
|
+
root: Hex;
|
|
78
|
+
entries: readonly CampaignEntry[];
|
|
66
79
|
}
|
|
@@ -18,6 +18,61 @@ export declare class NotRegisteredError extends TokenOpsSdkError {
|
|
|
18
18
|
cause?: unknown;
|
|
19
19
|
});
|
|
20
20
|
}
|
|
21
|
+
/**
|
|
22
|
+
* Wallet-mode disperse: the user's registered sub-wallet pair has not (fully)
|
|
23
|
+
* approved the singleton as an ERC-7984 operator on the token, so the
|
|
24
|
+
* singleton cannot move funds held by the sub-wallets. Surfaced by
|
|
25
|
+
* `preflightDisperse` in `wallet` / `wallet-token-fee` mode.
|
|
26
|
+
*
|
|
27
|
+
* Remediation: call `approveUserWalletsForToken(token)` on the singleton —
|
|
28
|
+
* the per-wallet approval states are in `context` (and mirrored on
|
|
29
|
+
* `PreflightReport.hasApprovedSubwallets`).
|
|
30
|
+
*/
|
|
31
|
+
export declare class SubwalletsNotApprovedError extends TokenOpsSdkError {
|
|
32
|
+
readonly name = "SubwalletsNotApprovedError";
|
|
33
|
+
readonly context: {
|
|
34
|
+
method: string;
|
|
35
|
+
contractAddress: Address;
|
|
36
|
+
user: Address;
|
|
37
|
+
token: Address;
|
|
38
|
+
wallet0Approved: boolean;
|
|
39
|
+
wallet1Approved: boolean;
|
|
40
|
+
};
|
|
41
|
+
constructor(args: {
|
|
42
|
+
method: string;
|
|
43
|
+
contractAddress: Address;
|
|
44
|
+
user: Address;
|
|
45
|
+
token: Address;
|
|
46
|
+
wallet0Approved: boolean;
|
|
47
|
+
wallet1Approved: boolean;
|
|
48
|
+
cause?: unknown;
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Direct-mode disperse: the sender has not approved the singleton as an
|
|
53
|
+
* ERC-7984 operator on the token, so `disperseConfidentialTokenDirect` would
|
|
54
|
+
* revert with the raw `ERC7984UnauthorizedSpender` selector (`0x79f2cb38`).
|
|
55
|
+
* Surfaced by `preflightDisperse` in `direct` mode.
|
|
56
|
+
*
|
|
57
|
+
* Remediation: call `setOperator()` / `ensureOperator()` (exported from
|
|
58
|
+
* `@tokenops/sdk/fhe`) with the singleton address before dispersing.
|
|
59
|
+
*/
|
|
60
|
+
export declare class SingletonNotApprovedError extends TokenOpsSdkError {
|
|
61
|
+
readonly name = "SingletonNotApprovedError";
|
|
62
|
+
readonly context: {
|
|
63
|
+
method: string;
|
|
64
|
+
contractAddress: Address;
|
|
65
|
+
user: Address;
|
|
66
|
+
token: Address;
|
|
67
|
+
};
|
|
68
|
+
constructor(args: {
|
|
69
|
+
method: string;
|
|
70
|
+
contractAddress: Address;
|
|
71
|
+
user: Address;
|
|
72
|
+
token: Address;
|
|
73
|
+
cause?: unknown;
|
|
74
|
+
});
|
|
75
|
+
}
|
|
21
76
|
/**
|
|
22
77
|
* The user has already registered — `register(token)` is single-use per user.
|
|
23
78
|
* Use `approveUserWalletsForToken(token)` to grant the existing wallet pair
|
|
@@ -1,98 +1,107 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var chunkJZLGCTGK_cjs = require('../chunk-JZLGCTGK.cjs');
|
|
4
|
+
var chunkKFRDLKMA_cjs = require('../chunk-KFRDLKMA.cjs');
|
|
5
5
|
require('../chunk-TEBM66WA.cjs');
|
|
6
6
|
require('../chunk-FAXIIH5R.cjs');
|
|
7
7
|
var chunkFWHYQZ5E_cjs = require('../chunk-FWHYQZ5E.cjs');
|
|
8
|
-
require('../chunk-
|
|
9
|
-
require('../chunk-
|
|
8
|
+
require('../chunk-UG5RKLU2.cjs');
|
|
9
|
+
require('../chunk-MVDQMV25.cjs');
|
|
10
|
+
require('../chunk-5576FRT3.cjs');
|
|
10
11
|
require('../chunk-JK4XMMKM.cjs');
|
|
11
|
-
require('../chunk-VJKZWYYJ.cjs');
|
|
12
12
|
require('../chunk-66IHPTOK.cjs');
|
|
13
13
|
var chunk67OV5CX2_cjs = require('../chunk-67OV5CX2.cjs');
|
|
14
|
+
require('../chunk-VJKZWYYJ.cjs');
|
|
14
15
|
|
|
15
16
|
|
|
16
17
|
|
|
17
18
|
Object.defineProperty(exports, "AlreadyRegisteredError", {
|
|
18
19
|
enumerable: true,
|
|
19
|
-
get: function () { return
|
|
20
|
+
get: function () { return chunkJZLGCTGK_cjs.AlreadyRegisteredError; }
|
|
20
21
|
});
|
|
21
22
|
Object.defineProperty(exports, "ConfidentialDisperseClient", {
|
|
22
23
|
enumerable: true,
|
|
23
|
-
get: function () { return
|
|
24
|
+
get: function () { return chunkJZLGCTGK_cjs.ConfidentialDisperseClient; }
|
|
24
25
|
});
|
|
25
26
|
Object.defineProperty(exports, "DEFAULT_ADMIN_ROLE", {
|
|
26
27
|
enumerable: true,
|
|
27
|
-
get: function () { return
|
|
28
|
+
get: function () { return chunkJZLGCTGK_cjs.DEFAULT_ADMIN_ROLE; }
|
|
28
29
|
});
|
|
29
30
|
Object.defineProperty(exports, "DisperseEncryptedReserveNotGrantedError", {
|
|
30
31
|
enumerable: true,
|
|
31
|
-
get: function () { return
|
|
32
|
+
get: function () { return chunkJZLGCTGK_cjs.DisperseEncryptedReserveNotGrantedError; }
|
|
32
33
|
});
|
|
33
34
|
Object.defineProperty(exports, "DisperseSubwalletNotFoundError", {
|
|
34
35
|
enumerable: true,
|
|
35
|
-
get: function () { return
|
|
36
|
+
get: function () { return chunkJZLGCTGK_cjs.DisperseSubwalletNotFoundError; }
|
|
36
37
|
});
|
|
37
38
|
Object.defineProperty(exports, "FEE_COLLECTOR_ROLE", {
|
|
38
39
|
enumerable: true,
|
|
39
|
-
get: function () { return
|
|
40
|
+
get: function () { return chunkJZLGCTGK_cjs.FEE_COLLECTOR_ROLE; }
|
|
40
41
|
});
|
|
41
42
|
Object.defineProperty(exports, "FEE_MANAGER_ROLE", {
|
|
42
43
|
enumerable: true,
|
|
43
|
-
get: function () { return
|
|
44
|
+
get: function () { return chunkJZLGCTGK_cjs.FEE_MANAGER_ROLE; }
|
|
44
45
|
});
|
|
45
46
|
Object.defineProperty(exports, "NotRegisteredError", {
|
|
46
47
|
enumerable: true,
|
|
47
|
-
get: function () { return
|
|
48
|
+
get: function () { return chunkJZLGCTGK_cjs.NotRegisteredError; }
|
|
48
49
|
});
|
|
49
50
|
Object.defineProperty(exports, "PAUSER_ROLE", {
|
|
50
51
|
enumerable: true,
|
|
51
|
-
get: function () { return
|
|
52
|
+
get: function () { return chunkJZLGCTGK_cjs.PAUSER_ROLE; }
|
|
53
|
+
});
|
|
54
|
+
Object.defineProperty(exports, "SingletonNotApprovedError", {
|
|
55
|
+
enumerable: true,
|
|
56
|
+
get: function () { return chunkJZLGCTGK_cjs.SingletonNotApprovedError; }
|
|
57
|
+
});
|
|
58
|
+
Object.defineProperty(exports, "SubwalletsNotApprovedError", {
|
|
59
|
+
enumerable: true,
|
|
60
|
+
get: function () { return chunkJZLGCTGK_cjs.SubwalletsNotApprovedError; }
|
|
52
61
|
});
|
|
53
62
|
Object.defineProperty(exports, "WITHDRAWER_ROLE", {
|
|
54
63
|
enumerable: true,
|
|
55
|
-
get: function () { return
|
|
64
|
+
get: function () { return chunkJZLGCTGK_cjs.WITHDRAWER_ROLE; }
|
|
56
65
|
});
|
|
57
66
|
Object.defineProperty(exports, "computeSubtotals", {
|
|
58
67
|
enumerable: true,
|
|
59
|
-
get: function () { return
|
|
68
|
+
get: function () { return chunkJZLGCTGK_cjs.computeSubtotals; }
|
|
60
69
|
});
|
|
61
70
|
Object.defineProperty(exports, "createConfidentialDisperseClient", {
|
|
62
71
|
enumerable: true,
|
|
63
|
-
get: function () { return
|
|
72
|
+
get: function () { return chunkJZLGCTGK_cjs.createConfidentialDisperseClient; }
|
|
64
73
|
});
|
|
65
74
|
Object.defineProperty(exports, "disperseConfidentialAbi", {
|
|
66
75
|
enumerable: true,
|
|
67
|
-
get: function () { return
|
|
76
|
+
get: function () { return chunkJZLGCTGK_cjs.disperseConfidentialAbi; }
|
|
68
77
|
});
|
|
69
78
|
Object.defineProperty(exports, "disperseWalletAbi", {
|
|
70
79
|
enumerable: true,
|
|
71
|
-
get: function () { return
|
|
80
|
+
get: function () { return chunkJZLGCTGK_cjs.disperseWalletAbi; }
|
|
72
81
|
});
|
|
73
82
|
Object.defineProperty(exports, "encryptUint64", {
|
|
74
83
|
enumerable: true,
|
|
75
|
-
get: function () { return
|
|
84
|
+
get: function () { return chunkJZLGCTGK_cjs.encryptUint64; }
|
|
76
85
|
});
|
|
77
86
|
Object.defineProperty(exports, "encryptUint64Batch", {
|
|
78
87
|
enumerable: true,
|
|
79
|
-
get: function () { return
|
|
88
|
+
get: function () { return chunkJZLGCTGK_cjs.encryptUint64Batch; }
|
|
80
89
|
});
|
|
81
90
|
Object.defineProperty(exports, "resolveEncryptor", {
|
|
82
91
|
enumerable: true,
|
|
83
|
-
get: function () { return
|
|
92
|
+
get: function () { return chunkJZLGCTGK_cjs.resolveEncryptor; }
|
|
84
93
|
});
|
|
85
94
|
Object.defineProperty(exports, "ERC7984_OPERATOR_MAX_DEADLINE", {
|
|
86
95
|
enumerable: true,
|
|
87
|
-
get: function () { return
|
|
96
|
+
get: function () { return chunkKFRDLKMA_cjs.ERC7984_OPERATOR_MAX_DEADLINE; }
|
|
88
97
|
});
|
|
89
98
|
Object.defineProperty(exports, "revokeOperator", {
|
|
90
99
|
enumerable: true,
|
|
91
|
-
get: function () { return
|
|
100
|
+
get: function () { return chunkKFRDLKMA_cjs.revokeOperator; }
|
|
92
101
|
});
|
|
93
102
|
Object.defineProperty(exports, "setOperator", {
|
|
94
103
|
enumerable: true,
|
|
95
|
-
get: function () { return
|
|
104
|
+
get: function () { return chunkKFRDLKMA_cjs.setOperator; }
|
|
96
105
|
});
|
|
97
106
|
Object.defineProperty(exports, "erc7984OperatorAbi", {
|
|
98
107
|
enumerable: true,
|
|
@@ -11,4 +11,4 @@ export declare const WITHDRAWER_ROLE: "0x10dac8c06a04bec0b551627dad28bc00d6516b0
|
|
|
11
11
|
export declare const DEFAULT_ADMIN_ROLE: "0x0000000000000000000000000000000000000000000000000000000000000000";
|
|
12
12
|
export { TokenOpsSdkError, isTokenOpsSdkError, DeploymentAddressUnavailableError, UnsupportedChainError, MissingAccountError, MissingClientError, MissingEncryptorError, MissingPublicClientError, MissingWalletClientError, InvalidArgumentError, ReceiptEventAmbiguousError, ReceiptEventNotFoundError, TokenOpsValidationError, ContractRevertError, TokenOpsContractError, PausedError, AccessDeniedError, OperatorNotApprovedError, InsufficientFeeError, InsufficientBalanceError, BatchTooLargeError, FeatureDisabledError, TransferFailedError, FheHandleNotAllowedError, AlreadyInitializedError, ReentrancyError, InvalidSignatureError, WalletRejectedError, WalletChainMismatchError, NetworkError, InsufficientGasFundsError, UnknownWriteFailureError, UserRejectedSignatureError, SigningFailedError, RelayerUnreachableError, EncryptionFailedError, DecryptionFailedError, UserDecryptNotAllowedError, type DeploymentAddressUnavailableReason, type TokenOpsSdkErrorCode, } from "../core/errors.js";
|
|
13
13
|
export { type PreflightResult } from "../core/preflight.js";
|
|
14
|
-
export { NotRegisteredError, AlreadyRegisteredError } from "./errors.js";
|
|
14
|
+
export { NotRegisteredError, AlreadyRegisteredError, SubwalletsNotApprovedError, SingletonNotApprovedError, } from "./errors.js";
|
|
@@ -11,4 +11,4 @@ export declare const WITHDRAWER_ROLE: "0x10dac8c06a04bec0b551627dad28bc00d6516b0
|
|
|
11
11
|
export declare const DEFAULT_ADMIN_ROLE: "0x0000000000000000000000000000000000000000000000000000000000000000";
|
|
12
12
|
export { TokenOpsSdkError, isTokenOpsSdkError, DeploymentAddressUnavailableError, UnsupportedChainError, MissingAccountError, MissingClientError, MissingEncryptorError, MissingPublicClientError, MissingWalletClientError, InvalidArgumentError, ReceiptEventAmbiguousError, ReceiptEventNotFoundError, TokenOpsValidationError, ContractRevertError, TokenOpsContractError, PausedError, AccessDeniedError, OperatorNotApprovedError, InsufficientFeeError, InsufficientBalanceError, BatchTooLargeError, FeatureDisabledError, TransferFailedError, FheHandleNotAllowedError, AlreadyInitializedError, ReentrancyError, InvalidSignatureError, WalletRejectedError, WalletChainMismatchError, NetworkError, InsufficientGasFundsError, UnknownWriteFailureError, UserRejectedSignatureError, SigningFailedError, RelayerUnreachableError, EncryptionFailedError, DecryptionFailedError, UserDecryptNotAllowedError, type DeploymentAddressUnavailableReason, type TokenOpsSdkErrorCode, } from "../core/errors.js";
|
|
13
13
|
export { type PreflightResult } from "../core/preflight.js";
|
|
14
|
-
export { NotRegisteredError, AlreadyRegisteredError } from "./errors.js";
|
|
14
|
+
export { NotRegisteredError, AlreadyRegisteredError, SubwalletsNotApprovedError, SingletonNotApprovedError, } from "./errors.js";
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
export { AlreadyRegisteredError, ConfidentialDisperseClient, DEFAULT_ADMIN_ROLE, DisperseEncryptedReserveNotGrantedError, DisperseSubwalletNotFoundError, FEE_COLLECTOR_ROLE, FEE_MANAGER_ROLE, NotRegisteredError, PAUSER_ROLE, WITHDRAWER_ROLE, computeSubtotals, createConfidentialDisperseClient, disperseConfidentialAbi, disperseWalletAbi, encryptUint64, encryptUint64Batch, resolveEncryptor } from '../chunk-
|
|
2
|
-
export { ERC7984_OPERATOR_MAX_DEADLINE, revokeOperator, setOperator } from '../chunk-
|
|
1
|
+
export { AlreadyRegisteredError, ConfidentialDisperseClient, DEFAULT_ADMIN_ROLE, DisperseEncryptedReserveNotGrantedError, DisperseSubwalletNotFoundError, FEE_COLLECTOR_ROLE, FEE_MANAGER_ROLE, NotRegisteredError, PAUSER_ROLE, SingletonNotApprovedError, SubwalletsNotApprovedError, WITHDRAWER_ROLE, computeSubtotals, createConfidentialDisperseClient, disperseConfidentialAbi, disperseWalletAbi, encryptUint64, encryptUint64Batch, resolveEncryptor } from '../chunk-H5POPGOZ.js';
|
|
2
|
+
export { ERC7984_OPERATOR_MAX_DEADLINE, revokeOperator, setOperator } from '../chunk-4TSDNZQ3.js';
|
|
3
3
|
import '../chunk-WMACINXO.js';
|
|
4
4
|
import '../chunk-ZWXJTBZO.js';
|
|
5
5
|
export { erc7984OperatorAbi } from '../chunk-7VELUOMI.js';
|
|
6
|
-
import '../chunk-
|
|
7
|
-
import '../chunk-
|
|
6
|
+
import '../chunk-NWFMBLSQ.js';
|
|
7
|
+
import '../chunk-4RAAATVY.js';
|
|
8
|
+
import '../chunk-DZHYSUGY.js';
|
|
8
9
|
import '../chunk-ZA673I3O.js';
|
|
9
|
-
import '../chunk-Q2GP5UDC.js';
|
|
10
10
|
import '../chunk-KWFFIJYX.js';
|
|
11
11
|
export { AccessDeniedError, AlreadyInitializedError, BatchTooLargeError, ContractRevertError, DecryptionFailedError, DeploymentAddressUnavailableError, EncryptionFailedError, FeatureDisabledError, FheHandleNotAllowedError, InsufficientBalanceError, InsufficientFeeError, InsufficientGasFundsError, InvalidArgumentError, InvalidSignatureError, MissingAccountError, MissingClientError, MissingEncryptorError, MissingPublicClientError, MissingWalletClientError, NetworkError, OperatorNotApprovedError, PausedError, ReceiptEventAmbiguousError, ReceiptEventNotFoundError, ReentrancyError, RelayerUnreachableError, SigningFailedError, TokenOpsContractError, TokenOpsSdkError, TokenOpsValidationError, TransferFailedError, UnknownWriteFailureError, UnsupportedChainError, UserDecryptNotAllowedError, UserRejectedSignatureError, WalletChainMismatchError, WalletRejectedError, isTokenOpsSdkError } from '../chunk-QBJ7O2B4.js';
|
|
12
|
+
import '../chunk-Q2GP5UDC.js';
|