@tokenops/sdk 1.6.0 → 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 +48 -8
- package/CONTRIBUTING.md +4 -2
- package/README.md +146 -90
- package/SUPPORT.md +47 -0
- package/dist/{chunk-HETNKZEE.js → chunk-335Z2W67.js} +1 -1
- package/dist/{chunk-BD4LZBVF.cjs → chunk-3QHNYEQD.cjs} +18 -17
- package/dist/chunk-456VDDA3.js +370 -0
- package/dist/{chunk-6WSNS3UV.js → chunk-4RAAATVY.js} +2 -4
- package/dist/{chunk-4KJ66YRH.js → chunk-4TSDNZQ3.js} +2 -2
- package/dist/{chunk-WUXUWTFW.cjs → chunk-5576FRT3.cjs} +31 -7
- package/dist/chunk-66IHPTOK.cjs +20 -0
- package/dist/{chunk-2RNW4MIJ.cjs → chunk-67OV5CX2.cjs} +0 -18
- package/dist/{chunk-PD7ME2BT.js → chunk-6GNR22OV.js} +2 -1
- package/dist/{chunk-VHSNYUYV.js → chunk-6NAVMWZQ.js} +5 -5
- package/dist/{chunk-EUKPOXWR.cjs → chunk-6PXXGACR.cjs} +17 -15
- package/dist/{chunk-WTK6JDSI.js → chunk-74QFZ5MK.js} +6 -4
- package/dist/{chunk-WOEETTH7.cjs → chunk-7AFPOE7N.cjs} +6 -6
- package/dist/{chunk-U57COLUE.js → chunk-AXIPOR3C.js} +2 -2
- package/dist/chunk-CTED3MTR.cjs +380 -0
- package/dist/{chunk-QKKBBH7I.js → chunk-DZHYSUGY.js} +28 -7
- package/dist/{chunk-V5D7BHW3.js → chunk-EAJ7SYHE.js} +6 -4
- package/dist/{chunk-SYHNZSZZ.cjs → chunk-FAXIIH5R.cjs} +3 -3
- package/dist/{chunk-7G7UOQV4.cjs → chunk-FGEB7RMY.cjs} +4 -4
- package/dist/chunk-GKKDAW44.js +8823 -0
- package/dist/{chunk-QET3Q4JP.js → chunk-H5POPGOZ.js} +8 -6
- package/dist/{chunk-VR3FREBX.cjs → chunk-JK4XMMKM.cjs} +3 -3
- package/dist/{chunk-CBRL2PJA.cjs → chunk-JQYC66TO.cjs} +12 -12
- package/dist/{chunk-YFIWCYHC.cjs → chunk-JZLGCTGK.cjs} +56 -54
- package/dist/{chunk-4ZCXK4VI.cjs → chunk-KFRDLKMA.cjs} +14 -14
- package/dist/chunk-KWFFIJYX.js +11 -0
- package/dist/chunk-M4IT6DNJ.cjs +608 -0
- package/dist/{chunk-43RFBQ73.cjs → chunk-MVDQMV25.cjs} +29 -32
- 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-DRSPMIZ7.js → chunk-QBJ7O2B4.js} +1 -11
- package/dist/{chunk-UJS4N2XM.cjs → chunk-TEBM66WA.cjs} +12 -12
- package/dist/{chunk-TN65XNTI.js → chunk-TWT3STIX.js} +8 -6
- package/dist/chunk-UG5RKLU2.cjs +6 -0
- package/dist/chunk-VP2B4WM2.js +154 -0
- package/dist/{chunk-BK7YIVLK.cjs → chunk-WJLECC22.cjs} +75 -73
- package/dist/{chunk-NFW7AUEX.js → chunk-WMACINXO.js} +1 -1
- package/dist/{chunk-AYGRYDBX.cjs → chunk-XAYGD4E4.cjs} +37 -35
- package/dist/{chunk-46T67CE2.js → chunk-ZA673I3O.js} +1 -1
- package/dist/{chunk-YPYCWLYP.js → chunk-ZWXJTBZO.js} +1 -1
- package/dist/core/addresses.d.ts +14 -2
- 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 +64 -63
- package/dist/fhe/index.js +7 -6
- package/dist/fhe/operators.d.ts +22 -5
- package/dist/fhe/react/index.cjs +13 -12
- package/dist/fhe/react/index.js +6 -5
- 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 +11 -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 +3 -8
- package/dist/fhe-airdrop/advanced/react/index.cjs +37 -50
- 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 +36 -50
- 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 +1131 -74
- package/dist/fhe-airdrop/index.d.cts +46 -8
- package/dist/fhe-airdrop/index.d.ts +46 -8
- package/dist/fhe-airdrop/index.js +931 -8
- 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 +399 -459
- package/dist/fhe-airdrop/react/index.d.cts +53 -74
- package/dist/fhe-airdrop/react/index.d.ts +53 -74
- package/dist/fhe-airdrop/react/index.js +261 -374
- 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 +67 -65
- package/dist/fhe-disperse/index.cjs +70 -68
- package/dist/fhe-disperse/index.js +10 -8
- package/dist/fhe-disperse/react/index.cjs +94 -92
- package/dist/fhe-disperse/react/index.js +13 -11
- package/dist/fhe-vesting/advanced/index.cjs +10 -8
- package/dist/fhe-vesting/advanced/index.js +8 -6
- package/dist/fhe-vesting/advanced/react/index.cjs +16 -14
- package/dist/fhe-vesting/advanced/react/index.js +13 -11
- package/dist/fhe-vesting/index.cjs +74 -72
- package/dist/fhe-vesting/index.js +11 -9
- package/dist/fhe-vesting/react/index.cjs +228 -226
- package/dist/fhe-vesting/react/index.js +15 -13
- package/dist/index.cjs +100 -87
- package/dist/index.js +3 -2
- package/dist/testnet-faucet/index.cjs +57 -55
- package/dist/testnet-faucet/index.js +7 -5
- package/dist/testnet-faucet/react/index.cjs +55 -53
- package/dist/testnet-faucet/react/index.js +9 -7
- package/package.json +6 -2
- package/dist/chunk-CNP4L3GF.js +0 -105
- package/dist/chunk-KSDSXJ34.js +0 -41
- package/dist/chunk-LBWRFZR3.cjs +0 -1681
- package/dist/chunk-OL6SHN3D.cjs +0 -44
- package/dist/chunk-S2XD75JM.js +0 -1637
- package/dist/chunk-SPGSO5SO.cjs +0 -1644
- package/dist/chunk-UE5XK2SY.js +0 -1673
- package/dist/chunk-WO72UBQD.cjs +0 -109
- 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 -317
- package/dist/fhe-airdrop/react/useAccessClaimAmount.d.ts +0 -37
- package/dist/fhe-airdrop/react/useAirdropCanExtendClaimWindow.d.ts +0 -7
- 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 -39
- 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/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
|
@@ -1,27 +1,227 @@
|
|
|
1
|
-
import type { Address } from "viem";
|
|
1
|
+
import type { Address, Hex } from "viem";
|
|
2
2
|
import { TokenOpsSdkError } from "../core/errors.js";
|
|
3
|
+
import type { RevertNameMapper } from "../core/revert-mapper.js";
|
|
3
4
|
/**
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
5
|
+
* A Merkle campaign's per-account claim state (`claimedAmount`) sits at an
|
|
6
|
+
* ERC-7201 namespaced slot that a previous revision of the contract typed
|
|
7
|
+
* differently. Namespaced slots are derived from the namespace string, not
|
|
8
|
+
* from the field's type, so the retype keeps the same address: an in-place
|
|
9
|
+
* UUPS upgrade across that change hands existing storage to code that reads it
|
|
10
|
+
* as the new type, which reinterprets every account's settled claim total and
|
|
11
|
+
* can re-open claims that were already paid.
|
|
12
|
+
*
|
|
13
|
+
* A fresh deployment is unaffected - there is no prior storage to
|
|
14
|
+
* reinterpret. The constraint the SDK enforces is narrow and static: `mode:
|
|
15
|
+
* "uups"` is refused for Merkle campaigns at create time, so no Merkle
|
|
16
|
+
* instance the SDK creates can ever be upgraded across the boundary. Clone
|
|
17
|
+
* mode is unaffected, and ECDSA campaigns are unaffected in either mode (their
|
|
18
|
+
* storage lives in a different namespace and was not retyped).
|
|
19
|
+
*
|
|
20
|
+
* The refusal does not depend on the factory's `defaultUpgradeable` policy,
|
|
21
|
+
* which is mutable admin state and could permit UUPS at any time.
|
|
22
|
+
*
|
|
23
|
+
* @alpha
|
|
24
|
+
*/
|
|
25
|
+
export declare class MerkleUupsUnsupportedError extends TokenOpsSdkError {
|
|
26
|
+
readonly name = "MerkleUupsUnsupportedError";
|
|
27
|
+
readonly context: {
|
|
28
|
+
constraint: "merkle-uups-storage-retype";
|
|
29
|
+
};
|
|
30
|
+
constructor(options?: {
|
|
31
|
+
cause?: unknown;
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* `claimAndUnwrap` routes the claim straight into the wrapper's `unwrap`,
|
|
36
|
+
* which burns from the airdrop instance's own pooled `ERC7984ERC20Wrapper`
|
|
37
|
+
* balance rather than from any per-claimant sub-balance — the instance holds
|
|
38
|
+
* one aggregate confidential balance, not a ledger of individual
|
|
39
|
+
* entitlements. The wrapper's burn succeeds or fails as a whole against that
|
|
40
|
+
* POOL balance, so the amount it actually delivers is bounded by what the
|
|
41
|
+
* pool holds, not by the claimant's own outstanding amount.
|
|
42
|
+
*
|
|
43
|
+
* Under a stock `ERC7984ERC20Wrapper` that bound is exact: burn succeeds for
|
|
44
|
+
* the full requested amount whenever the pool can cover it. A wrapper
|
|
45
|
+
* composed with transfer hooks, or one wrapping a fee-on-transfer underlying
|
|
46
|
+
* token, can make the amount actually released diverge from what the
|
|
47
|
+
* airdrop's own accounting assumed, so a claimant can end up credited against
|
|
48
|
+
* pool balance that was never theirs.
|
|
49
|
+
*
|
|
50
|
+
* Thrown by `assertStockWrapper` (`guards.ts`) when `unwrappable: true` is
|
|
51
|
+
* requested for a token that doesn't probe as a recognised stock wrapper, and
|
|
52
|
+
* reused here for the on-chain `TokenNotAWrapper` revert (the same
|
|
53
|
+
* mechanism, caught on-chain instead of pre-flight).
|
|
54
|
+
*
|
|
55
|
+
* @alpha
|
|
56
|
+
*/
|
|
57
|
+
export declare class NonStockWrapperError extends TokenOpsSdkError {
|
|
58
|
+
readonly name = "NonStockWrapperError";
|
|
59
|
+
readonly context: {
|
|
60
|
+
constraint: "wrapper-unwrap-pool-bound";
|
|
61
|
+
token?: Address;
|
|
62
|
+
};
|
|
63
|
+
constructor(args?: {
|
|
64
|
+
token?: Address;
|
|
65
|
+
cause?: unknown;
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* The two campaign variants, as used to label a prediction guard's context.
|
|
70
|
+
*
|
|
71
|
+
* @alpha
|
|
72
|
+
*/
|
|
73
|
+
export type AirdropVariant = "ecdsa" | "merkle";
|
|
74
|
+
/**
|
|
75
|
+
* A `create*` was about to be sent for a `(variant, mode, deployer, userSalt)`
|
|
76
|
+
* tuple whose predicted address already holds code.
|
|
77
|
+
*
|
|
78
|
+
* The factory's prediction oracles commit to `(implementation, mode, deployer,
|
|
79
|
+
* userSalt)` and nothing else - the params struct is accepted and ignored
|
|
80
|
+
* (`predictECDSAAirdropAddress` does not even name its params argument). Two
|
|
81
|
+
* campaigns therefore collide on one address however different their token,
|
|
82
|
+
* window, signer or root, and the contracts' own default salt label
|
|
83
|
+
* (`airdrop.<type>.<token>.<caller>`) collides on the second campaign a caller
|
|
84
|
+
* runs for the same token. Thrown before the transaction is sent so the caller
|
|
85
|
+
* gets a named cause rather than a `SaltAlreadyUsed` revert or, worse, a
|
|
86
|
+
* `FailedDeployment` from the proxy factory.
|
|
87
|
+
*
|
|
88
|
+
* @alpha
|
|
89
|
+
*/
|
|
90
|
+
export declare class SaltCollisionError extends TokenOpsSdkError {
|
|
91
|
+
readonly name = "SaltCollisionError";
|
|
92
|
+
readonly context: {
|
|
93
|
+
method: string;
|
|
94
|
+
variant: AirdropVariant;
|
|
95
|
+
mode: string;
|
|
96
|
+
deployer: Address;
|
|
97
|
+
userSalt: Hex;
|
|
98
|
+
predictedAddress: Address;
|
|
99
|
+
};
|
|
100
|
+
constructor(args: {
|
|
101
|
+
method: string;
|
|
102
|
+
variant: AirdropVariant;
|
|
103
|
+
mode: string;
|
|
104
|
+
deployer: Address;
|
|
105
|
+
userSalt: Hex;
|
|
106
|
+
predictedAddress: Address;
|
|
107
|
+
cause?: unknown;
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* The factory's init-code hash for a variant changed between the moment an
|
|
112
|
+
* address was predicted and the moment the prediction was about to be used.
|
|
113
|
+
*
|
|
114
|
+
* The hash tracks the factory's implementation pointer, so a change means
|
|
115
|
+
* `setEcdsaImplementation` / `setMerkleImplementation` landed in the window.
|
|
116
|
+
* The predicted address is then stale: a Merkle campaign's every ciphertext is
|
|
117
|
+
* bound to an address the create will no longer produce, and on an
|
|
118
|
+
* immutable-root instance there is no on-chain repair. Rebuild against a fresh
|
|
119
|
+
* prediction.
|
|
120
|
+
*
|
|
121
|
+
* @alpha
|
|
122
|
+
*/
|
|
123
|
+
export declare class PredictionDriftError extends TokenOpsSdkError {
|
|
124
|
+
readonly name = "PredictionDriftError";
|
|
125
|
+
readonly context: {
|
|
126
|
+
method: string;
|
|
127
|
+
variant: AirdropVariant;
|
|
128
|
+
initCodeHashBefore: Hex;
|
|
129
|
+
initCodeHashAfter: Hex;
|
|
130
|
+
predictedAddress?: Address;
|
|
131
|
+
};
|
|
132
|
+
constructor(args: {
|
|
133
|
+
method: string;
|
|
134
|
+
variant: AirdropVariant;
|
|
135
|
+
initCodeHashBefore: Hex;
|
|
136
|
+
initCodeHashAfter: Hex;
|
|
137
|
+
predictedAddress?: Address;
|
|
138
|
+
cause?: unknown;
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* Factory `create*` reverted with `UpgradeabilityNotAllowed`: the creator's effective upgradeability policy is off.
|
|
143
|
+
*
|
|
144
|
+
* @alpha
|
|
145
|
+
*/
|
|
146
|
+
export declare class UpgradeabilityNotAllowedError extends TokenOpsSdkError {
|
|
147
|
+
readonly name = "UpgradeabilityNotAllowedError";
|
|
148
|
+
readonly context: {
|
|
149
|
+
method?: string;
|
|
150
|
+
contractAddress?: Address;
|
|
151
|
+
creator?: Address;
|
|
152
|
+
};
|
|
153
|
+
constructor(args: {
|
|
154
|
+
creator?: Address;
|
|
155
|
+
method?: string;
|
|
156
|
+
contractAddress?: Address;
|
|
157
|
+
cause?: unknown;
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* `planInstanceRoleSplit` (`roles.ts`, Task 13) refuses to plan a
|
|
162
|
+
* `FEE_COLLECTOR_ROLE` grant: the role is its own role-admin (not
|
|
163
|
+
* `DEFAULT_ADMIN_ROLE`), so a grant issued from the caller's admin role would
|
|
164
|
+
* simply fail on-chain with `AccessControlUnauthorizedAccount`. An existing
|
|
165
|
+
* `FEE_COLLECTOR_ROLE` holder must call `grantRole` directly.
|
|
166
|
+
*
|
|
167
|
+
* @alpha
|
|
168
|
+
*/
|
|
169
|
+
export declare class FeeCollectorSelfAdministeredError extends TokenOpsSdkError {
|
|
170
|
+
readonly name = "FeeCollectorSelfAdministeredError";
|
|
171
|
+
readonly context: {
|
|
172
|
+
requestedGrantee?: Address;
|
|
173
|
+
};
|
|
174
|
+
constructor(args?: {
|
|
175
|
+
requestedGrantee?: Address;
|
|
176
|
+
cause?: unknown;
|
|
177
|
+
});
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* ECDSA claim reverted with `DedupIdAlreadyClaimed`: this `dedupId`'s slot was already consumed under `PerDedupId`/`Both`.
|
|
181
|
+
*
|
|
182
|
+
* @alpha
|
|
183
|
+
*/
|
|
184
|
+
export declare class DedupIdConsumedError extends TokenOpsSdkError {
|
|
185
|
+
readonly name = "DedupIdConsumedError";
|
|
186
|
+
readonly context: {
|
|
187
|
+
method: string;
|
|
188
|
+
contractAddress: Address;
|
|
189
|
+
dedupId?: Hex;
|
|
190
|
+
};
|
|
191
|
+
constructor(args: {
|
|
192
|
+
method: string;
|
|
193
|
+
contractAddress: Address;
|
|
194
|
+
dedupId?: Hex;
|
|
195
|
+
cause?: unknown;
|
|
196
|
+
});
|
|
197
|
+
}
|
|
198
|
+
/**
|
|
199
|
+
* A claim was already settled for this replay-protection dimension.
|
|
200
|
+
* `replayGuard` names which on-chain guard fired: `"address"` for ECDSA
|
|
201
|
+
* `AddressAlreadyClaimed` (the `PerAddress`/`Both` dedup slot), `"signature"`
|
|
202
|
+
* for `SignatureAlreadyUsed` (the EIP-712 digest replay guard, which is the
|
|
203
|
+
* ONLY guard active under `DedupMode.None`).
|
|
204
|
+
*
|
|
205
|
+
* @alpha
|
|
7
206
|
*/
|
|
8
207
|
export declare class AlreadyClaimedError extends TokenOpsSdkError {
|
|
9
208
|
readonly name = "AlreadyClaimedError";
|
|
10
209
|
readonly context: {
|
|
11
210
|
method: string;
|
|
12
211
|
contractAddress: Address;
|
|
13
|
-
|
|
212
|
+
replayGuard: "address" | "signature";
|
|
14
213
|
};
|
|
15
214
|
constructor(args: {
|
|
16
215
|
method: string;
|
|
17
216
|
contractAddress: Address;
|
|
18
|
-
|
|
217
|
+
replayGuard: "address" | "signature";
|
|
19
218
|
cause?: unknown;
|
|
20
219
|
});
|
|
21
220
|
}
|
|
22
221
|
/**
|
|
23
|
-
*
|
|
24
|
-
*
|
|
222
|
+
* Claim reverted with `ClaimNotStarted`: `block.timestamp` is still before the instance's `startTime`.
|
|
223
|
+
*
|
|
224
|
+
* @alpha
|
|
25
225
|
*/
|
|
26
226
|
export declare class ClaimNotStartedError extends TokenOpsSdkError {
|
|
27
227
|
readonly name = "ClaimNotStartedError";
|
|
@@ -29,19 +229,46 @@ export declare class ClaimNotStartedError extends TokenOpsSdkError {
|
|
|
29
229
|
method: string;
|
|
30
230
|
contractAddress: Address;
|
|
31
231
|
/** Unix seconds. Multiply by 1000 for `new Date(...)`. */
|
|
32
|
-
|
|
232
|
+
startTime?: number;
|
|
233
|
+
currentTime?: number;
|
|
234
|
+
};
|
|
235
|
+
constructor(args: {
|
|
236
|
+
method: string;
|
|
237
|
+
contractAddress: Address;
|
|
238
|
+
startTime?: number;
|
|
239
|
+
currentTime?: number;
|
|
240
|
+
cause?: unknown;
|
|
241
|
+
});
|
|
242
|
+
}
|
|
243
|
+
/**
|
|
244
|
+
* ECDSA claim reverted with `SignatureExpired`: `block.timestamp` is past the signature's `deadline`.
|
|
245
|
+
* Deliberately distinct from `InvalidSignatureError` — that class's message directs a developer to check
|
|
246
|
+
* `SIGNER_ROLE` membership, which is the wrong fix here and discards both decoded revert arguments. The fix
|
|
247
|
+
* for this error is always to re-sign with a later `deadline` via `signClaimAuthorization`.
|
|
248
|
+
*
|
|
249
|
+
* @alpha
|
|
250
|
+
*/
|
|
251
|
+
export declare class SignatureExpiredError extends TokenOpsSdkError {
|
|
252
|
+
readonly name = "SignatureExpiredError";
|
|
253
|
+
readonly context: {
|
|
254
|
+
method: string;
|
|
255
|
+
contractAddress: Address;
|
|
256
|
+
/** Unix seconds — the signature's expiry, chosen by whoever called `signClaimAuthorization`. */
|
|
257
|
+
deadline?: bigint;
|
|
258
|
+
currentTime?: bigint;
|
|
33
259
|
};
|
|
34
260
|
constructor(args: {
|
|
35
261
|
method: string;
|
|
36
262
|
contractAddress: Address;
|
|
37
|
-
|
|
263
|
+
deadline?: bigint;
|
|
264
|
+
currentTime?: bigint;
|
|
38
265
|
cause?: unknown;
|
|
39
266
|
});
|
|
40
267
|
}
|
|
41
268
|
/**
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
269
|
+
* Claim reverted with `ClaimWindowFinished`: `block.timestamp` is past the instance's `endTime` (end is inclusive on-chain).
|
|
270
|
+
*
|
|
271
|
+
* @alpha
|
|
45
272
|
*/
|
|
46
273
|
export declare class ClaimWindowClosedError extends TokenOpsSdkError {
|
|
47
274
|
readonly name = "ClaimWindowClosedError";
|
|
@@ -49,12 +276,15 @@ export declare class ClaimWindowClosedError extends TokenOpsSdkError {
|
|
|
49
276
|
method: string;
|
|
50
277
|
contractAddress: Address;
|
|
51
278
|
/** Unix seconds. Multiply by 1000 for `new Date(...)`. */
|
|
52
|
-
|
|
279
|
+
endTime?: number;
|
|
280
|
+
currentTime?: number;
|
|
53
281
|
};
|
|
54
282
|
constructor(args: {
|
|
55
283
|
method: string;
|
|
56
284
|
contractAddress: Address;
|
|
57
|
-
|
|
285
|
+
endTime?: number;
|
|
286
|
+
currentTime?: number;
|
|
58
287
|
cause?: unknown;
|
|
59
288
|
});
|
|
60
289
|
}
|
|
290
|
+
export declare const airdropProductMapper: RevertNameMapper;
|