@tokenops/sdk 1.5.1 → 1.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (120) hide show
  1. package/CHANGELOG.md +158 -2
  2. package/SECURITY.md +7 -1
  3. package/dist/{chunk-67OV5CX2.cjs → chunk-2RNW4MIJ.cjs} +18 -0
  4. package/dist/{chunk-KLKI352M.cjs → chunk-43RFBQ73.cjs} +29 -29
  5. package/dist/{chunk-ZA673I3O.js → chunk-46T67CE2.js} +1 -1
  6. package/dist/{chunk-6BMP4ICG.js → chunk-4KJ66YRH.js} +61 -3
  7. package/dist/{chunk-JYOTGRSO.cjs → chunk-4ZCXK4VI.cjs} +68 -8
  8. package/dist/{chunk-SG65XWH7.js → chunk-6WSNS3UV.js} +1 -1
  9. package/dist/{chunk-V2PXZVBF.cjs → chunk-7G7UOQV4.cjs} +4 -4
  10. package/dist/{chunk-WENHUPZC.cjs → chunk-AYGRYDBX.cjs} +35 -36
  11. package/dist/{chunk-2NCLOQ56.cjs → chunk-BD4LZBVF.cjs} +85 -9
  12. package/dist/{chunk-5X5WL5CU.cjs → chunk-BK7YIVLK.cjs} +110 -149
  13. package/dist/{chunk-W7IGCOVL.cjs → chunk-CBRL2PJA.cjs} +12 -11
  14. package/dist/{chunk-ORFTDNFZ.js → chunk-CNP4L3GF.js} +4 -4
  15. package/dist/{chunk-QBJ7O2B4.js → chunk-DRSPMIZ7.js} +11 -1
  16. package/dist/{chunk-C7BRZXJA.cjs → chunk-EUKPOXWR.cjs} +15 -16
  17. package/dist/{chunk-YQIBBEFJ.js → chunk-HETNKZEE.js} +1 -1
  18. package/dist/{chunk-ODLTEGHB.js → chunk-KSDSXJ34.js} +1 -1
  19. package/dist/{chunk-TIUKIY5V.cjs → chunk-LBWRFZR3.cjs} +58 -40
  20. package/dist/{chunk-WMACINXO.js → chunk-NFW7AUEX.js} +1 -1
  21. package/dist/{chunk-4WPGQSNT.cjs → chunk-OL6SHN3D.cjs} +3 -3
  22. package/dist/{chunk-AOP6HMPW.js → chunk-PD7ME2BT.js} +75 -2
  23. package/dist/{chunk-2PWNH3UE.js → chunk-QET3Q4JP.js} +65 -9
  24. package/dist/{chunk-XGGTQQFH.js → chunk-QKKBBH7I.js} +2 -2
  25. package/dist/{chunk-6R4KNAPK.js → chunk-S2XD75JM.js} +10 -3
  26. package/dist/{chunk-MCRBVJGZ.cjs → chunk-SPGSO5SO.cjs} +29 -22
  27. package/dist/{chunk-FAXIIH5R.cjs → chunk-SYHNZSZZ.cjs} +3 -3
  28. package/dist/{chunk-IXLO7GO5.js → chunk-TN65XNTI.js} +47 -83
  29. package/dist/chunk-U57COLUE.js +56 -0
  30. package/dist/{chunk-DUZIIRPF.js → chunk-UE5XK2SY.js} +27 -9
  31. package/dist/{chunk-TEBM66WA.cjs → chunk-UJS4N2XM.cjs} +12 -12
  32. package/dist/{chunk-OXTLPTO3.js → chunk-V5D7BHW3.js} +4 -5
  33. package/dist/{chunk-NTZY6IB7.js → chunk-VHSNYUYV.js} +5 -4
  34. package/dist/{chunk-JK4XMMKM.cjs → chunk-VR3FREBX.cjs} +3 -3
  35. package/dist/{chunk-T46YXSBP.cjs → chunk-WO72UBQD.cjs} +11 -11
  36. package/dist/chunk-WOEETTH7.cjs +59 -0
  37. package/dist/{chunk-IJFQ5L4I.js → chunk-WTK6JDSI.js} +4 -5
  38. package/dist/{chunk-PUPKNW3R.cjs → chunk-WUXUWTFW.cjs} +3 -3
  39. package/dist/{chunk-PFXURMBZ.cjs → chunk-YFIWCYHC.cjs} +112 -54
  40. package/dist/{chunk-ZWXJTBZO.js → chunk-YPYCWLYP.js} +1 -1
  41. package/dist/core/addresses.d.ts +1 -1
  42. package/dist/core/errors.d.ts +1 -1
  43. package/dist/fhe/index.cjs +84 -64
  44. package/dist/fhe/index.d.cts +1 -0
  45. package/dist/fhe/index.d.ts +1 -0
  46. package/dist/fhe/index.js +21 -9
  47. package/dist/fhe/mock-erc7984.d.ts +4 -4
  48. package/dist/fhe/operators.d.ts +142 -2
  49. package/dist/fhe/react/index.cjs +21 -8
  50. package/dist/fhe/react/index.d.cts +2 -0
  51. package/dist/fhe/react/index.d.ts +2 -0
  52. package/dist/fhe/react/index.js +8 -3
  53. package/dist/fhe/react/useEnsureOperator.d.ts +56 -0
  54. package/dist/fhe/react/useIsOperator.d.ts +54 -0
  55. package/dist/fhe/sepolia-encryptor-web.d.ts +18 -3
  56. package/dist/fhe-airdrop/advanced/index.cjs +8 -9
  57. package/dist/fhe-airdrop/advanced/index.js +6 -7
  58. package/dist/fhe-airdrop/advanced/react/index.cjs +13 -14
  59. package/dist/fhe-airdrop/advanced/react/index.js +9 -10
  60. package/dist/fhe-airdrop/airdrop.d.ts +7 -0
  61. package/dist/fhe-airdrop/index.cjs +66 -67
  62. package/dist/fhe-airdrop/index.js +7 -8
  63. package/dist/fhe-airdrop/react/index.cjs +148 -137
  64. package/dist/fhe-airdrop/react/index.d.cts +3 -1
  65. package/dist/fhe-airdrop/react/index.d.ts +3 -1
  66. package/dist/fhe-airdrop/react/index.js +16 -14
  67. package/dist/fhe-airdrop/react/useAccessClaimAmount.d.ts +17 -11
  68. package/dist/fhe-airdrop/react/useClaim.d.ts +8 -0
  69. package/dist/fhe-airdrop/react/useSignClaimAuthorization.d.ts +1 -1
  70. package/dist/fhe-airdrop/types.d.ts +14 -3
  71. package/dist/fhe-disperse/errors.d.ts +55 -0
  72. package/dist/fhe-disperse/index.cjs +74 -67
  73. package/dist/fhe-disperse/index.d.cts +1 -1
  74. package/dist/fhe-disperse/index.d.ts +1 -1
  75. package/dist/fhe-disperse/index.js +8 -9
  76. package/dist/fhe-disperse/react/index.cjs +105 -88
  77. package/dist/fhe-disperse/react/index.d.cts +3 -1
  78. package/dist/fhe-disperse/react/index.d.ts +3 -1
  79. package/dist/fhe-disperse/react/index.js +12 -11
  80. package/dist/fhe-vesting/advanced/index.cjs +8 -9
  81. package/dist/fhe-vesting/advanced/index.js +6 -7
  82. package/dist/fhe-vesting/advanced/react/index.cjs +14 -15
  83. package/dist/fhe-vesting/advanced/react/index.js +11 -12
  84. package/dist/fhe-vesting/index.cjs +75 -76
  85. package/dist/fhe-vesting/index.js +9 -10
  86. package/dist/fhe-vesting/manager.d.ts +19 -0
  87. package/dist/fhe-vesting/react/index.cjs +245 -227
  88. package/dist/fhe-vesting/react/index.d.cts +6 -4
  89. package/dist/fhe-vesting/react/index.d.ts +6 -4
  90. package/dist/fhe-vesting/react/index.js +27 -21
  91. package/dist/fhe-vesting/react/useAccessClaimableAmount.d.ts +11 -3
  92. package/dist/fhe-vesting/react/useAccessSettledAmount.d.ts +11 -3
  93. package/dist/fhe-vesting/react/useAccessTotalAllocation.d.ts +11 -3
  94. package/dist/fhe-vesting/react/useAccessVestedAmount.d.ts +11 -3
  95. package/dist/fhe-vesting/react/useAdminGetClaimableAmount.d.ts +1 -1
  96. package/dist/fhe-vesting/react/useAdminGetSettledAmount.d.ts +1 -1
  97. package/dist/fhe-vesting/react/useAdminGetTotalAllocation.d.ts +1 -1
  98. package/dist/fhe-vesting/react/useAdminGetVestedAmount.d.ts +1 -1
  99. package/dist/fhe-vesting/react/useAdminPartialClaim.d.ts +8 -0
  100. package/dist/fhe-vesting/react/useClaim.d.ts +1 -1
  101. package/dist/fhe-vesting/react/useDiscloseHandleToParty.d.ts +1 -1
  102. package/dist/fhe-vesting/react/useManagerDiscloseHandleToParty.d.ts +1 -1
  103. package/dist/fhe-vesting/react/usePartialClaim.d.ts +1 -1
  104. package/dist/fhe-vesting/react/useVestingInfo.d.ts +1 -1
  105. package/dist/fhe-vesting/types.d.ts +12 -1
  106. package/dist/index.cjs +87 -88
  107. package/dist/index.js +2 -3
  108. package/dist/testnet-faucet/index.cjs +55 -56
  109. package/dist/testnet-faucet/index.js +5 -6
  110. package/dist/testnet-faucet/react/index.cjs +53 -54
  111. package/dist/testnet-faucet/react/index.js +7 -8
  112. package/package.json +13 -8
  113. package/dist/chunk-66IHPTOK.cjs +0 -20
  114. package/dist/chunk-KWFFIJYX.js +0 -11
  115. package/dist/fhe-airdrop/react/useAirdropClaim.d.ts +0 -27
  116. package/dist/fhe-airdrop/react/useGetClaimAmount.d.ts +0 -30
  117. package/dist/fhe-vesting/react/useGetClaimableAmount.d.ts +0 -13
  118. package/dist/fhe-vesting/react/useGetSettledAmount.d.ts +0 -14
  119. package/dist/fhe-vesting/react/useGetTotalAllocation.d.ts +0 -13
  120. package/dist/fhe-vesting/react/useGetVestedAmount.d.ts +0 -25
@@ -1,29 +1,29 @@
1
1
  'use strict';
2
2
 
3
- var chunk67OV5CX2_cjs = require('./chunk-67OV5CX2.cjs');
3
+ var chunk2RNW4MIJ_cjs = require('./chunk-2RNW4MIJ.cjs');
4
4
 
5
5
  // src/core/zama-error-mapper.ts
6
6
  function mapZamaError(error, args) {
7
- if (error instanceof chunk67OV5CX2_cjs.TokenOpsSdkError) return error;
7
+ if (error instanceof chunk2RNW4MIJ_cjs.TokenOpsSdkError) return error;
8
8
  const zama = readZamaError(error);
9
9
  if (zama?.code) {
10
10
  switch (zama.code) {
11
11
  case "SIGNING_REJECTED":
12
- return new chunk67OV5CX2_cjs.UserRejectedSignatureError({ ...args, cause: error });
12
+ return new chunk2RNW4MIJ_cjs.UserRejectedSignatureError({ ...args, cause: error });
13
13
  case "SIGNING_FAILED":
14
- return new chunk67OV5CX2_cjs.SigningFailedError({ ...args, cause: error });
14
+ return new chunk2RNW4MIJ_cjs.SigningFailedError({ ...args, cause: error });
15
15
  case "RELAYER_REQUEST_FAILED":
16
- return new chunk67OV5CX2_cjs.RelayerUnreachableError({
16
+ return new chunk2RNW4MIJ_cjs.RelayerUnreachableError({
17
17
  ...args,
18
18
  statusCode: zama.statusCode,
19
19
  cause: error
20
20
  });
21
21
  case "ENCRYPTION_FAILED":
22
- return new chunk67OV5CX2_cjs.EncryptionFailedError({ ...args, cause: error });
22
+ return new chunk2RNW4MIJ_cjs.EncryptionFailedError({ ...args, cause: error });
23
23
  case "DECRYPTION_FAILED":
24
- return new chunk67OV5CX2_cjs.DecryptionFailedError({ ...args, cause: error });
24
+ return new chunk2RNW4MIJ_cjs.DecryptionFailedError({ ...args, cause: error });
25
25
  case "CONFIGURATION":
26
- return new chunk67OV5CX2_cjs.InvalidArgumentError({
26
+ return new chunk2RNW4MIJ_cjs.InvalidArgumentError({
27
27
  method: args.method,
28
28
  argument: "config",
29
29
  reason: "Zama SDK configuration is invalid (chain id, type, or signer state).",
@@ -34,13 +34,13 @@ function mapZamaError(error, args) {
34
34
  const message = readMessage(error);
35
35
  if (message) {
36
36
  if (USER_REJECTION_PATTERNS.some((pat) => pat.test(message))) {
37
- return new chunk67OV5CX2_cjs.UserRejectedSignatureError({ ...args, cause: error });
37
+ return new chunk2RNW4MIJ_cjs.UserRejectedSignatureError({ ...args, cause: error });
38
38
  }
39
39
  if (USER_DECRYPT_NOT_ALLOWED_PATTERNS.some((pat) => pat.test(message))) {
40
- return new chunk67OV5CX2_cjs.UserDecryptNotAllowedError({ method: args.method, cause: error });
40
+ return new chunk2RNW4MIJ_cjs.UserDecryptNotAllowedError({ method: args.method, cause: error });
41
41
  }
42
42
  if (INVALID_INPUT_PATTERNS.some((pat) => pat.test(message))) {
43
- return new chunk67OV5CX2_cjs.InvalidArgumentError({
43
+ return new chunk2RNW4MIJ_cjs.InvalidArgumentError({
44
44
  method: args.method,
45
45
  argument: "input",
46
46
  reason: "encrypted input value rejected by FHE SDK \u2014 see `error.cause` for details",
@@ -48,7 +48,7 @@ function mapZamaError(error, args) {
48
48
  });
49
49
  }
50
50
  }
51
- return args.operation === "encrypt" ? new chunk67OV5CX2_cjs.EncryptionFailedError({ ...args, cause: error }) : new chunk67OV5CX2_cjs.DecryptionFailedError({ ...args, cause: error });
51
+ return args.operation === "encrypt" ? new chunk2RNW4MIJ_cjs.EncryptionFailedError({ ...args, cause: error }) : new chunk2RNW4MIJ_cjs.DecryptionFailedError({ ...args, cause: error });
52
52
  }
53
53
  function readZamaError(err) {
54
54
  if (typeof err !== "object" || err === null) return void 0;
@@ -1,9 +1,8 @@
1
- import { SDK_VERSION, mapContractRevert, isContractRevert } from './chunk-SG65XWH7.js';
2
- import { getFheVestingFactoryAddress } from './chunk-XGGTQQFH.js';
3
- import { normaliseAddress } from './chunk-ZA673I3O.js';
1
+ import { SDK_VERSION, mapContractRevert, isContractRevert } from './chunk-6WSNS3UV.js';
2
+ import { getFheVestingFactoryAddress } from './chunk-QKKBBH7I.js';
3
+ import { normaliseAddress } from './chunk-46T67CE2.js';
4
+ import { DeploymentAddressUnavailableError, TokenOpsSdkError, asTxHash, MissingWalletClientError, MissingAccountError } from './chunk-DRSPMIZ7.js';
4
5
  import { withTelemetry } from './chunk-Q2GP5UDC.js';
5
- import { asTxHash } from './chunk-KWFFIJYX.js';
6
- import { DeploymentAddressUnavailableError, TokenOpsSdkError, MissingWalletClientError, MissingAccountError } from './chunk-QBJ7O2B4.js';
7
6
  import { parseEventLogs } from 'viem';
8
7
 
9
8
  // src/fhe-vesting/abis/factory.ts
@@ -1,7 +1,8 @@
1
- import { createConfidentialVestingManagerClient, resolveEncryptor } from './chunk-IXLO7GO5.js';
2
- import { createConfidentialVestingFactoryClient } from './chunk-OXTLPTO3.js';
3
- import { getFheVestingFactoryAddress } from './chunk-XGGTQQFH.js';
4
- import { DeploymentAddressUnavailableError } from './chunk-QBJ7O2B4.js';
1
+ import { createConfidentialVestingManagerClient } from './chunk-TN65XNTI.js';
2
+ import { resolveEncryptor } from './chunk-PD7ME2BT.js';
3
+ import { createConfidentialVestingFactoryClient } from './chunk-V5D7BHW3.js';
4
+ import { getFheVestingFactoryAddress } from './chunk-QKKBBH7I.js';
5
+ import { DeploymentAddressUnavailableError } from './chunk-DRSPMIZ7.js';
5
6
  import { useMemo, useRef, useEffect } from 'react';
6
7
  import { usePublicClient, useWalletClient } from 'wagmi';
7
8
 
@@ -1,17 +1,17 @@
1
1
  'use strict';
2
2
 
3
- var chunk67OV5CX2_cjs = require('./chunk-67OV5CX2.cjs');
3
+ var chunk2RNW4MIJ_cjs = require('./chunk-2RNW4MIJ.cjs');
4
4
  var viem = require('viem');
5
5
 
6
6
  function normaliseAddress(input) {
7
7
  if (typeof input !== "string") {
8
- throw new chunk67OV5CX2_cjs.TokenOpsValidationError("normaliseAddress: input is not a string", {
8
+ throw new chunk2RNW4MIJ_cjs.TokenOpsValidationError("normaliseAddress: input is not a string", {
9
9
  method: "normaliseAddress",
10
10
  args: { input: typeof input }
11
11
  });
12
12
  }
13
13
  if (!viem.isAddress(input, { strict: false })) {
14
- throw new chunk67OV5CX2_cjs.TokenOpsValidationError(
14
+ throw new chunk2RNW4MIJ_cjs.TokenOpsValidationError(
15
15
  `normaliseAddress: '${input}' is not a valid 0x-prefixed 20-byte hex address`,
16
16
  {
17
17
  method: "normaliseAddress",
@@ -1,9 +1,9 @@
1
1
  'use strict';
2
2
 
3
- var chunkMCRBVJGZ_cjs = require('./chunk-MCRBVJGZ.cjs');
4
- var chunkTIUKIY5V_cjs = require('./chunk-TIUKIY5V.cjs');
5
- var chunkPUPKNW3R_cjs = require('./chunk-PUPKNW3R.cjs');
6
- var chunk67OV5CX2_cjs = require('./chunk-67OV5CX2.cjs');
3
+ var chunkSPGSO5SO_cjs = require('./chunk-SPGSO5SO.cjs');
4
+ var chunkLBWRFZR3_cjs = require('./chunk-LBWRFZR3.cjs');
5
+ var chunkWUXUWTFW_cjs = require('./chunk-WUXUWTFW.cjs');
6
+ var chunk2RNW4MIJ_cjs = require('./chunk-2RNW4MIJ.cjs');
7
7
  var react = require('react');
8
8
  var wagmi = require('wagmi');
9
9
 
@@ -12,7 +12,7 @@ var FHE_AIRDROP_NAMESPACE = "fhe-airdrop";
12
12
  function tryResolveFactoryAddress(override, chainId) {
13
13
  if (override) return override;
14
14
  if (chainId === void 0) return void 0;
15
- return chunkPUPKNW3R_cjs.getFheAirdropFactoryAddress(chainId);
15
+ return chunkWUXUWTFW_cjs.getFheAirdropFactoryAddress(chainId);
16
16
  }
17
17
  function useMemoFactoryClient(opts = {}) {
18
18
  const publicClient = wagmi.usePublicClient({ chainId: opts.chainId });
@@ -25,14 +25,14 @@ function useMemoFactoryClient(opts = {}) {
25
25
  const client = react.useMemo(() => {
26
26
  if (!publicClient) return void 0;
27
27
  if (!resolvedAddress) return void 0;
28
- return chunkTIUKIY5V_cjs.createConfidentialAirdropFactoryClient({
28
+ return chunkLBWRFZR3_cjs.createConfidentialAirdropFactoryClient({
29
29
  publicClient,
30
30
  ...walletClient ? { walletClient } : {},
31
31
  address: resolvedAddress,
32
32
  ...chainId !== void 0 ? { chainId } : {},
33
33
  // Lazy — invoked per-encryption inside the headless client. Picks up
34
34
  // whichever EncryptorSource the consumer last passed in.
35
- encryptor: () => chunkTIUKIY5V_cjs.resolveEncryptor(encryptorSourceRef.current)
35
+ encryptor: () => chunkLBWRFZR3_cjs.resolveEncryptor(encryptorSourceRef.current)
36
36
  });
37
37
  }, [publicClient, walletClient, resolvedAddress, chainId]);
38
38
  return {
@@ -47,16 +47,16 @@ function useMemoFactoryClient(opts = {}) {
47
47
  function computeFactoryResolutionError(override, chainId) {
48
48
  if (override) return void 0;
49
49
  if (chainId === void 0) {
50
- return new chunk67OV5CX2_cjs.DeploymentAddressUnavailableError({
50
+ return new chunk2RNW4MIJ_cjs.DeploymentAddressUnavailableError({
51
51
  reason: "chain-id-missing",
52
52
  product: "fheAirdrop",
53
53
  contract: "confidentialAirdropFactory",
54
54
  clientLabel: "ConfidentialAirdropFactoryClient"
55
55
  });
56
56
  }
57
- const resolved = chunkPUPKNW3R_cjs.getFheAirdropFactoryAddress(chainId);
57
+ const resolved = chunkWUXUWTFW_cjs.getFheAirdropFactoryAddress(chainId);
58
58
  if (!resolved) {
59
- return new chunk67OV5CX2_cjs.DeploymentAddressUnavailableError({
59
+ return new chunk2RNW4MIJ_cjs.DeploymentAddressUnavailableError({
60
60
  reason: "registry-not-deployed",
61
61
  product: "fheAirdrop",
62
62
  contract: "confidentialAirdropFactory",
@@ -73,7 +73,7 @@ function useMemoAirdropClient(opts) {
73
73
  const client = react.useMemo(() => {
74
74
  if (!publicClient) return void 0;
75
75
  if (!opts.address) return void 0;
76
- return chunkMCRBVJGZ_cjs.createConfidentialAirdropClient({
76
+ return chunkSPGSO5SO_cjs.createConfidentialAirdropClient({
77
77
  publicClient,
78
78
  ...walletClient ? { walletClient } : {},
79
79
  address: opts.address,
@@ -0,0 +1,59 @@
1
+ 'use strict';
2
+
3
+ var chunkZQUE2B3Q_cjs = require('./chunk-ZQUE2B3Q.cjs');
4
+ var chunk4ZCXK4VI_cjs = require('./chunk-4ZCXK4VI.cjs');
5
+ var chunk2RNW4MIJ_cjs = require('./chunk-2RNW4MIJ.cjs');
6
+ var reactQuery = require('@tanstack/react-query');
7
+ var wagmi = require('wagmi');
8
+
9
+ function useIsOperator(options = {}) {
10
+ const publicClient = wagmi.usePublicClient({ chainId: options.chainId });
11
+ const { address: connected } = chunkZQUE2B3Q_cjs.useWagmiAccount();
12
+ const chainId = options.chainId ?? publicClient?.chain?.id;
13
+ const holder = options.holder ?? connected;
14
+ const { token, spender, telemetry } = options;
15
+ return reactQuery.useQuery({
16
+ queryKey: [
17
+ "tokenops-sdk",
18
+ "fhe",
19
+ "isOperator",
20
+ chainId ?? null,
21
+ token ? token.toLowerCase() : null,
22
+ holder ? holder.toLowerCase() : null,
23
+ spender ? spender.toLowerCase() : null
24
+ ],
25
+ queryFn: () => chunk4ZCXK4VI_cjs.isOperator({
26
+ publicClient,
27
+ token,
28
+ holder,
29
+ spender,
30
+ ...telemetry ? { telemetry } : {}
31
+ }),
32
+ enabled: !!publicClient && !!token && !!holder && !!spender && options.enabled !== false,
33
+ staleTime: 0
34
+ });
35
+ }
36
+ function useEnsureOperator(options = {}) {
37
+ const publicClient = wagmi.usePublicClient({ chainId: options.chainId });
38
+ const { data: walletClient } = wagmi.useWalletClient({ chainId: options.chainId });
39
+ const telemetry = options.telemetry;
40
+ return reactQuery.useMutation({
41
+ mutationFn: async (vars) => {
42
+ if (!publicClient) throw new chunk2RNW4MIJ_cjs.MissingPublicClientError("useEnsureOperator");
43
+ if (!walletClient) throw new chunk2RNW4MIJ_cjs.MissingWalletClientError("useEnsureOperator");
44
+ return chunk4ZCXK4VI_cjs.ensureOperator({
45
+ publicClient,
46
+ walletClient,
47
+ token: vars.token,
48
+ spender: vars.spender,
49
+ deadline: vars.deadline,
50
+ ...vars.account !== void 0 ? { account: vars.account } : {},
51
+ ...vars.waitForReceipt !== void 0 ? { waitForReceipt: vars.waitForReceipt } : {},
52
+ ...telemetry ? { telemetry } : {}
53
+ });
54
+ }
55
+ });
56
+ }
57
+
58
+ exports.useEnsureOperator = useEnsureOperator;
59
+ exports.useIsOperator = useIsOperator;
@@ -1,9 +1,8 @@
1
- import { SDK_VERSION, isContractRevert, mapContractRevert } from './chunk-SG65XWH7.js';
2
- import { getConfidentialTestTokenAddress, getTestTokenAddress } from './chunk-XGGTQQFH.js';
3
- import { normaliseAddress } from './chunk-ZA673I3O.js';
1
+ import { SDK_VERSION, isContractRevert, mapContractRevert } from './chunk-6WSNS3UV.js';
2
+ import { getConfidentialTestTokenAddress, getTestTokenAddress } from './chunk-QKKBBH7I.js';
3
+ import { normaliseAddress } from './chunk-46T67CE2.js';
4
+ import { TokenOpsSdkError, UnsupportedChainError, DeploymentAddressUnavailableError, asEncryptedHandle, TokenOpsContractError, ReceiptEventNotFoundError, ReceiptEventAmbiguousError, asTxHash, MissingWalletClientError, MissingAccountError, InvalidArgumentError } from './chunk-DRSPMIZ7.js';
4
5
  import { withTelemetry } from './chunk-Q2GP5UDC.js';
5
- import { asEncryptedHandle, asTxHash } from './chunk-KWFFIJYX.js';
6
- import { TokenOpsSdkError, UnsupportedChainError, DeploymentAddressUnavailableError, TokenOpsContractError, ReceiptEventNotFoundError, ReceiptEventAmbiguousError, MissingWalletClientError, MissingAccountError, InvalidArgumentError } from './chunk-QBJ7O2B4.js';
7
6
  import { sepolia } from 'viem/chains';
8
7
  import { parseEventLogs } from 'viem';
9
8
 
@@ -1,12 +1,12 @@
1
1
  'use strict';
2
2
 
3
- var chunk67OV5CX2_cjs = require('./chunk-67OV5CX2.cjs');
3
+ var chunk2RNW4MIJ_cjs = require('./chunk-2RNW4MIJ.cjs');
4
4
  var chains = require('viem/chains');
5
5
 
6
6
  var DEPLOYED_ADDRESSES = {
7
7
  fheVesting: {
8
8
  confidentialVestingFactory: {
9
- [chains.sepolia.id]: "0xA87701CE9A52D43681600583a99c85b50DbE3150"
9
+ [chains.sepolia.id]: "0x059d6Bb8ff9a13E794fe416d4757d7310CdC69ab"
10
10
  // mainnet omitted — not deployed.
11
11
  }
12
12
  },
@@ -50,7 +50,7 @@ function requireDeployedAddress(product, contract, chainId) {
50
50
  const contractEntry = productEntry[contract];
51
51
  const entry = contractEntry?.[chainId];
52
52
  if (entry) return entry;
53
- throw new chunk67OV5CX2_cjs.DeploymentAddressUnavailableError({
53
+ throw new chunk2RNW4MIJ_cjs.DeploymentAddressUnavailableError({
54
54
  reason: entry === null ? "registry-not-deployed" : "registry-unknown-chain",
55
55
  product: String(product),
56
56
  contract: String(contract),