@cofhe/sdk 0.1.1 → 0.2.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.
Files changed (107) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/adapters/ethers6.ts +28 -28
  3. package/adapters/hardhat.ts +0 -1
  4. package/adapters/index.test.ts +14 -19
  5. package/adapters/smartWallet.ts +81 -73
  6. package/adapters/test-utils.ts +45 -45
  7. package/adapters/types.ts +3 -3
  8. package/chains/chains/localcofhe.ts +14 -0
  9. package/chains/chains.test.ts +2 -1
  10. package/chains/defineChain.ts +2 -2
  11. package/chains/index.ts +3 -1
  12. package/chains/types.ts +3 -3
  13. package/core/baseBuilder.ts +30 -49
  14. package/core/client.test.ts +200 -72
  15. package/core/client.ts +152 -148
  16. package/core/clientTypes.ts +114 -0
  17. package/core/config.test.ts +30 -11
  18. package/core/config.ts +26 -13
  19. package/core/consts.ts +18 -0
  20. package/core/decrypt/cofheMocksSealOutput.ts +2 -4
  21. package/core/decrypt/decryptHandleBuilder.ts +51 -45
  22. package/core/decrypt/{tnSealOutput.ts → tnSealOutputV1.ts} +1 -1
  23. package/core/decrypt/tnSealOutputV2.ts +298 -0
  24. package/core/encrypt/cofheMocksZkVerifySign.ts +15 -16
  25. package/core/encrypt/encryptInputsBuilder.test.ts +132 -116
  26. package/core/encrypt/encryptInputsBuilder.ts +159 -111
  27. package/core/encrypt/encryptUtils.ts +6 -3
  28. package/core/encrypt/zkPackProveVerify.ts +70 -8
  29. package/core/error.ts +0 -2
  30. package/core/fetchKeys.test.ts +1 -18
  31. package/core/fetchKeys.ts +0 -26
  32. package/core/index.ts +37 -17
  33. package/core/keyStore.ts +65 -38
  34. package/core/permits.test.ts +255 -4
  35. package/core/permits.ts +83 -18
  36. package/core/types.ts +198 -152
  37. package/core/utils.ts +43 -1
  38. package/dist/adapters.d.cts +38 -20
  39. package/dist/adapters.d.ts +38 -20
  40. package/dist/chains.cjs +18 -8
  41. package/dist/chains.d.cts +31 -9
  42. package/dist/chains.d.ts +31 -9
  43. package/dist/chains.js +1 -1
  44. package/dist/{chunk-KFGPTJ6X.js → chunk-I5WFEYXX.js} +1768 -1526
  45. package/dist/{chunk-LU7BMUUT.js → chunk-R3B5TMVX.js} +330 -197
  46. package/dist/{chunk-GZCQQYVI.js → chunk-TBLR7NNE.js} +18 -9
  47. package/dist/{types-PhwGgQvs.d.ts → clientTypes-RqkgkV2i.d.ts} +331 -429
  48. package/dist/{types-bB7wLj0q.d.cts → clientTypes-e4filDzK.d.cts} +331 -429
  49. package/dist/core.cjs +3000 -2625
  50. package/dist/core.d.cts +113 -7
  51. package/dist/core.d.ts +113 -7
  52. package/dist/core.js +3 -3
  53. package/dist/node.cjs +2851 -2526
  54. package/dist/node.d.cts +4 -4
  55. package/dist/node.d.ts +4 -4
  56. package/dist/node.js +4 -3
  57. package/dist/{permit-S9CnI6MF.d.cts → permit-MZ502UBl.d.cts} +54 -41
  58. package/dist/{permit-S9CnI6MF.d.ts → permit-MZ502UBl.d.ts} +54 -41
  59. package/dist/permits.cjs +328 -195
  60. package/dist/permits.d.cts +113 -825
  61. package/dist/permits.d.ts +113 -825
  62. package/dist/permits.js +1 -1
  63. package/dist/types-YiAC4gig.d.cts +33 -0
  64. package/dist/types-YiAC4gig.d.ts +33 -0
  65. package/dist/web.cjs +3067 -2527
  66. package/dist/web.d.cts +22 -6
  67. package/dist/web.d.ts +22 -6
  68. package/dist/web.js +185 -9
  69. package/dist/zkProve.worker.cjs +93 -0
  70. package/dist/zkProve.worker.d.cts +2 -0
  71. package/dist/zkProve.worker.d.ts +2 -0
  72. package/dist/zkProve.worker.js +91 -0
  73. package/node/client.test.ts +20 -25
  74. package/node/encryptInputs.test.ts +18 -38
  75. package/node/index.ts +1 -0
  76. package/package.json +15 -15
  77. package/permits/index.ts +1 -0
  78. package/permits/localstorage.test.ts +9 -14
  79. package/permits/onchain-utils.ts +221 -0
  80. package/permits/permit.test.ts +76 -27
  81. package/permits/permit.ts +58 -95
  82. package/permits/sealing.test.ts +3 -3
  83. package/permits/sealing.ts +2 -2
  84. package/permits/store.test.ts +10 -50
  85. package/permits/store.ts +9 -21
  86. package/permits/test-utils.ts +11 -3
  87. package/permits/types.ts +39 -9
  88. package/permits/utils.ts +0 -5
  89. package/permits/validation.test.ts +29 -32
  90. package/permits/validation.ts +114 -176
  91. package/web/client.web.test.ts +20 -25
  92. package/web/config.web.test.ts +0 -2
  93. package/web/encryptInputs.web.test.ts +31 -54
  94. package/web/index.ts +65 -1
  95. package/web/storage.ts +19 -5
  96. package/web/worker.builder.web.test.ts +148 -0
  97. package/web/worker.config.web.test.ts +329 -0
  98. package/web/worker.output.web.test.ts +84 -0
  99. package/web/workerManager.test.ts +80 -0
  100. package/web/workerManager.ts +214 -0
  101. package/web/workerManager.web.test.ts +114 -0
  102. package/web/zkProve.worker.ts +133 -0
  103. package/core/result.test.ts +0 -180
  104. package/core/result.ts +0 -67
  105. package/core/test-utils.ts +0 -45
  106. package/dist/types-KImPrEIe.d.cts +0 -48
  107. package/dist/types-KImPrEIe.d.ts +0 -48
@@ -78,12 +78,12 @@ declare function WagmiAdapter(walletClient: WalletClient, publicClient: PublicCl
78
78
  gas: bigint;
79
79
  nonce: number;
80
80
  value: bigint;
81
- maxFeePerBlobGas?: undefined;
81
+ blobVersionedHashes?: undefined;
82
82
  gasPrice: bigint;
83
+ maxFeePerBlobGas?: undefined;
83
84
  maxFeePerGas?: undefined;
84
85
  maxPriorityFeePerGas?: undefined;
85
86
  accessList?: undefined;
86
- blobVersionedHashes?: undefined;
87
87
  authorizationList?: undefined;
88
88
  hash: viem.Hash;
89
89
  r: viem.Hex;
@@ -103,12 +103,12 @@ declare function WagmiAdapter(walletClient: WalletClient, publicClient: PublicCl
103
103
  gas: bigint;
104
104
  nonce: number;
105
105
  value: bigint;
106
- maxFeePerBlobGas?: undefined;
106
+ blobVersionedHashes?: undefined;
107
107
  gasPrice: bigint;
108
+ maxFeePerBlobGas?: undefined;
108
109
  maxFeePerGas?: undefined;
109
110
  maxPriorityFeePerGas?: undefined;
110
111
  accessList: viem.AccessList;
111
- blobVersionedHashes?: undefined;
112
112
  authorizationList?: undefined;
113
113
  hash: viem.Hash;
114
114
  r: viem.Hex;
@@ -128,12 +128,12 @@ declare function WagmiAdapter(walletClient: WalletClient, publicClient: PublicCl
128
128
  gas: bigint;
129
129
  nonce: number;
130
130
  value: bigint;
131
- maxFeePerBlobGas?: undefined;
131
+ blobVersionedHashes?: undefined;
132
132
  gasPrice?: undefined;
133
+ maxFeePerBlobGas?: undefined;
133
134
  maxFeePerGas: bigint;
134
135
  maxPriorityFeePerGas: bigint;
135
136
  accessList: viem.AccessList;
136
- blobVersionedHashes?: undefined;
137
137
  authorizationList?: undefined;
138
138
  hash: viem.Hash;
139
139
  r: viem.Hex;
@@ -153,12 +153,12 @@ declare function WagmiAdapter(walletClient: WalletClient, publicClient: PublicCl
153
153
  gas: bigint;
154
154
  nonce: number;
155
155
  value: bigint;
156
- maxFeePerBlobGas: bigint;
156
+ blobVersionedHashes: readonly viem.Hex[];
157
157
  gasPrice?: undefined;
158
+ maxFeePerBlobGas: bigint;
158
159
  maxFeePerGas: bigint;
159
160
  maxPriorityFeePerGas: bigint;
160
161
  accessList: viem.AccessList;
161
- blobVersionedHashes: readonly viem.Hex[];
162
162
  authorizationList?: undefined;
163
163
  hash: viem.Hash;
164
164
  r: viem.Hex;
@@ -178,12 +178,12 @@ declare function WagmiAdapter(walletClient: WalletClient, publicClient: PublicCl
178
178
  gas: bigint;
179
179
  nonce: number;
180
180
  value: bigint;
181
- maxFeePerBlobGas?: undefined;
181
+ blobVersionedHashes?: undefined;
182
182
  gasPrice?: undefined;
183
+ maxFeePerBlobGas?: undefined;
183
184
  maxFeePerGas: bigint;
184
185
  maxPriorityFeePerGas: bigint;
185
186
  accessList: viem.AccessList;
186
- blobVersionedHashes?: undefined;
187
187
  authorizationList: viem.SignedAuthorizationList;
188
188
  hash: viem.Hash;
189
189
  r: viem.Hex;
@@ -228,12 +228,12 @@ declare function WagmiAdapter(walletClient: WalletClient, publicClient: PublicCl
228
228
  gas: bigint;
229
229
  nonce: number;
230
230
  value: bigint;
231
- maxFeePerBlobGas?: undefined;
231
+ blobVersionedHashes?: undefined;
232
232
  gasPrice: bigint;
233
+ maxFeePerBlobGas?: undefined;
233
234
  maxFeePerGas?: undefined;
234
235
  maxPriorityFeePerGas?: undefined;
235
236
  accessList?: undefined;
236
- blobVersionedHashes?: undefined;
237
237
  authorizationList?: undefined;
238
238
  hash: viem.Hash;
239
239
  r: viem.Hex;
@@ -253,12 +253,12 @@ declare function WagmiAdapter(walletClient: WalletClient, publicClient: PublicCl
253
253
  gas: bigint;
254
254
  nonce: number;
255
255
  value: bigint;
256
- maxFeePerBlobGas?: undefined;
256
+ blobVersionedHashes?: undefined;
257
257
  gasPrice: bigint;
258
+ maxFeePerBlobGas?: undefined;
258
259
  maxFeePerGas?: undefined;
259
260
  maxPriorityFeePerGas?: undefined;
260
261
  accessList: viem.AccessList;
261
- blobVersionedHashes?: undefined;
262
262
  authorizationList?: undefined;
263
263
  hash: viem.Hash;
264
264
  r: viem.Hex;
@@ -278,12 +278,12 @@ declare function WagmiAdapter(walletClient: WalletClient, publicClient: PublicCl
278
278
  gas: bigint;
279
279
  nonce: number;
280
280
  value: bigint;
281
- maxFeePerBlobGas?: undefined;
281
+ blobVersionedHashes?: undefined;
282
282
  gasPrice?: undefined;
283
+ maxFeePerBlobGas?: undefined;
283
284
  maxFeePerGas: bigint;
284
285
  maxPriorityFeePerGas: bigint;
285
286
  accessList: viem.AccessList;
286
- blobVersionedHashes?: undefined;
287
287
  authorizationList?: undefined;
288
288
  hash: viem.Hash;
289
289
  r: viem.Hex;
@@ -303,12 +303,12 @@ declare function WagmiAdapter(walletClient: WalletClient, publicClient: PublicCl
303
303
  gas: bigint;
304
304
  nonce: number;
305
305
  value: bigint;
306
- maxFeePerBlobGas: bigint;
306
+ blobVersionedHashes: readonly viem.Hex[];
307
307
  gasPrice?: undefined;
308
+ maxFeePerBlobGas: bigint;
308
309
  maxFeePerGas: bigint;
309
310
  maxPriorityFeePerGas: bigint;
310
311
  accessList: viem.AccessList;
311
- blobVersionedHashes: readonly viem.Hex[];
312
312
  authorizationList?: undefined;
313
313
  hash: viem.Hash;
314
314
  r: viem.Hex;
@@ -328,12 +328,12 @@ declare function WagmiAdapter(walletClient: WalletClient, publicClient: PublicCl
328
328
  gas: bigint;
329
329
  nonce: number;
330
330
  value: bigint;
331
- maxFeePerBlobGas?: undefined;
331
+ blobVersionedHashes?: undefined;
332
332
  gasPrice?: undefined;
333
+ maxFeePerBlobGas?: undefined;
333
334
  maxFeePerGas: bigint;
334
335
  maxPriorityFeePerGas: bigint;
335
336
  accessList: viem.AccessList;
336
- blobVersionedHashes?: undefined;
337
337
  authorizationList: viem.SignedAuthorizationList;
338
338
  hash: viem.Hash;
339
339
  r: viem.Hex;
@@ -6858,6 +6858,7 @@ declare function WagmiAdapter(walletClient: WalletClient, publicClient: PublicCl
6858
6858
  }, (request["parameters"] extends readonly viem.PrepareTransactionRequestParameterType[] ? request["parameters"][number] : "type" | "gas" | "nonce" | "blobVersionedHashes" | "fees" | "chainId") extends infer T_8 ? T_8 extends (request["parameters"] extends readonly viem.PrepareTransactionRequestParameterType[] ? request["parameters"][number] : "type" | "gas" | "nonce" | "blobVersionedHashes" | "fees" | "chainId") ? T_8 extends "fees" ? "gasPrice" | "maxFeePerGas" | "maxPriorityFeePerGas" : T_8 : never : never> & (unknown extends request["kzg"] ? {} : Pick<request, "kzg">))[K]; } : never>;
6859
6859
  readContract: <const abi extends viem.Abi | readonly unknown[], functionName extends viem.ContractFunctionName<abi, "pure" | "view">, const args extends viem.ContractFunctionArgs<abi, "pure" | "view", functionName>>(args: viem.ReadContractParameters<abi, functionName, args>) => Promise<viem.ReadContractReturnType<abi, functionName, args>>;
6860
6860
  sendRawTransaction: (args: viem.SendRawTransactionParameters) => Promise<viem.SendRawTransactionReturnType>;
6861
+ sendRawTransactionSync: (args: viem.SendRawTransactionSyncParameters) => Promise<viem.TransactionReceipt>;
6861
6862
  simulate: <const calls extends readonly unknown[]>(args: viem.SimulateBlocksParameters<calls>) => Promise<viem.SimulateBlocksReturnType<calls>>;
6862
6863
  simulateBlocks: <const calls extends readonly unknown[]>(args: viem.SimulateBlocksParameters<calls>) => Promise<viem.SimulateBlocksReturnType<calls>>;
6863
6864
  simulateCalls: <const calls extends readonly unknown[]>(args: viem.SimulateCallsParameters<calls>) => Promise<viem.SimulateCallsReturnType<calls>>;
@@ -13425,8 +13426,24 @@ declare function WagmiAdapter(walletClient: WalletClient, publicClient: PublicCl
13425
13426
  } | undefined;
13426
13427
  id: string;
13427
13428
  }>;
13429
+ sendCallsSync: <const calls extends readonly unknown[], chainOverride extends viem.Chain | undefined = undefined>(parameters: viem.SendCallsSyncParameters<viem.Chain | undefined, viem.Account | undefined, chainOverride, calls>) => Promise<{
13430
+ id: string;
13431
+ atomic: boolean;
13432
+ capabilities?: {
13433
+ [key: string]: any;
13434
+ } | {
13435
+ [x: string]: any;
13436
+ } | undefined;
13437
+ chainId: number;
13438
+ receipts?: viem.WalletCallReceipt<bigint, "success" | "reverted">[] | undefined;
13439
+ version: string;
13440
+ statusCode: number;
13441
+ status: "pending" | "success" | "failure" | undefined;
13442
+ }>;
13428
13443
  sendRawTransaction: (args: viem.SendRawTransactionParameters) => Promise<viem.SendRawTransactionReturnType>;
13444
+ sendRawTransactionSync: (args: viem.SendRawTransactionSyncParameters) => Promise<viem.TransactionReceipt>;
13429
13445
  sendTransaction: <const request extends viem.SendTransactionRequest<viem.Chain | undefined, chainOverride>, chainOverride extends viem.Chain | undefined = undefined>(args: viem.SendTransactionParameters<viem.Chain | undefined, viem.Account | undefined, chainOverride, request>) => Promise<viem.SendTransactionReturnType>;
13446
+ sendTransactionSync: <const request extends viem.SendTransactionSyncRequest<viem.Chain | undefined, chainOverride>, chainOverride extends viem.Chain | undefined = undefined>(args: viem.SendTransactionSyncParameters<viem.Chain | undefined, viem.Account | undefined, chainOverride, request>) => Promise<viem.SendTransactionSyncReturnType>;
13430
13447
  showCallsStatus: (parameters: viem.ShowCallsStatusParameters) => Promise<viem.ShowCallsStatusReturnType>;
13431
13448
  signAuthorization: (parameters: viem.SignAuthorizationParameters<viem.Account | undefined>) => Promise<viem.SignAuthorizationReturnType>;
13432
13449
  signMessage: (args: viem.SignMessageParameters<viem.Account | undefined>) => Promise<viem.SignMessageReturnType>;
@@ -14534,6 +14551,7 @@ declare function WagmiAdapter(walletClient: WalletClient, publicClient: PublicCl
14534
14551
  waitForCallsStatus: (parameters: viem.WaitForCallsStatusParameters) => Promise<viem.WaitForCallsStatusReturnType>;
14535
14552
  watchAsset: (args: viem.WatchAssetParameters) => Promise<viem.WatchAssetReturnType>;
14536
14553
  writeContract: <const abi extends viem.Abi | readonly unknown[], functionName extends viem.ContractFunctionName<abi, "nonpayable" | "payable">, args_1 extends viem.ContractFunctionArgs<abi, "nonpayable" | "payable", functionName>, chainOverride extends viem.Chain | undefined = undefined>(args: viem.WriteContractParameters<abi, functionName, args_1, viem.Chain | undefined, viem.Account | undefined, chainOverride>) => Promise<viem.WriteContractReturnType>;
14554
+ writeContractSync: <const abi extends viem.Abi | readonly unknown[], functionName extends viem.ContractFunctionName<abi, "nonpayable" | "payable">, args_1 extends viem.ContractFunctionArgs<abi, "nonpayable" | "payable", functionName>, chainOverride extends viem.Chain | undefined = undefined>(args: viem.WriteContractSyncParameters<abi, functionName, args_1, viem.Chain | undefined, viem.Account | undefined, chainOverride>) => Promise<viem.WriteContractSyncReturnType>;
14537
14555
  extend: <const client extends {
14538
14556
  [x: string]: unknown;
14539
14557
  account?: undefined;
package/dist/chains.cjs CHANGED
@@ -12,21 +12,18 @@ var CofheChainSchema = zod.z.object({
12
12
  /** Network identifier */
13
13
  network: zod.z.string().min(1),
14
14
  /** coFhe service URL */
15
- coFheUrl: zod.z.string().url(),
15
+ coFheUrl: zod.z.url(),
16
16
  /** Verifier service URL */
17
- verifierUrl: zod.z.string().url(),
17
+ verifierUrl: zod.z.url(),
18
18
  /** Threshold network service URL */
19
- thresholdNetworkUrl: zod.z.string().url(),
19
+ thresholdNetworkUrl: zod.z.url(),
20
20
  /** Environment type */
21
21
  environment: EnvironmentSchema
22
22
  });
23
-
24
- // chains/defineChain.ts
25
23
  function defineChain(chainConfig) {
26
24
  const result = CofheChainSchema.safeParse(chainConfig);
27
25
  if (!result.success) {
28
- const errorMessages = result.error.errors.map((err) => `${err.path.join(".")}: ${err.message}`);
29
- throw new Error(`Invalid chain configuration: ${errorMessages.join(", ")}`);
26
+ throw new Error(`Invalid chain configuration: ${zod.z.prettifyError(result.error)}`, { cause: result.error });
30
27
  }
31
28
  return result.data;
32
29
  }
@@ -76,12 +73,24 @@ var hardhat = defineChain({
76
73
  environment: "MOCK"
77
74
  });
78
75
 
76
+ // chains/chains/localcofhe.ts
77
+ var localcofhe = defineChain({
78
+ id: 420105,
79
+ name: "Local Cofhe",
80
+ network: "localhost",
81
+ coFheUrl: "http://127.0.0.1:9448",
82
+ verifierUrl: "http://127.0.0.1:3001",
83
+ thresholdNetworkUrl: "http://127.0.0.1:3000",
84
+ environment: "TESTNET"
85
+ });
86
+
79
87
  // chains/index.ts
80
88
  var chains = {
81
89
  sepolia,
82
90
  arbSepolia,
83
91
  baseSepolia,
84
- hardhat
92
+ hardhat,
93
+ localcofhe
85
94
  };
86
95
  var getChainById = (chainId) => {
87
96
  return Object.values(chains).find((chain) => chain.id === chainId);
@@ -98,4 +107,5 @@ exports.chains = chains;
98
107
  exports.getChainById = getChainById;
99
108
  exports.getChainByName = getChainByName;
100
109
  exports.hardhat = hardhat;
110
+ exports.localcofhe = localcofhe;
101
111
  exports.sepolia = sepolia;
package/dist/chains.d.cts CHANGED
@@ -1,13 +1,13 @@
1
- import { C as CofheChain } from './types-KImPrEIe.cjs';
2
- export { E as Environment } from './types-KImPrEIe.cjs';
1
+ import { C as CofheChain } from './types-YiAC4gig.cjs';
2
+ export { E as Environment } from './types-YiAC4gig.cjs';
3
3
  import 'zod';
4
4
 
5
5
  /**
6
6
  * Sepolia testnet chain configuration
7
7
  */
8
8
  declare const sepolia: {
9
- name: string;
10
9
  id: number;
10
+ name: string;
11
11
  network: string;
12
12
  coFheUrl: string;
13
13
  verifierUrl: string;
@@ -19,8 +19,8 @@ declare const sepolia: {
19
19
  * Arbitrum Sepolia testnet chain configuration
20
20
  */
21
21
  declare const arbSepolia: {
22
- name: string;
23
22
  id: number;
23
+ name: string;
24
24
  network: string;
25
25
  coFheUrl: string;
26
26
  verifierUrl: string;
@@ -32,8 +32,8 @@ declare const arbSepolia: {
32
32
  * Base Sepolia testnet chain configuration
33
33
  */
34
34
  declare const baseSepolia: {
35
- name: string;
36
35
  id: number;
36
+ name: string;
37
37
  network: string;
38
38
  coFheUrl: string;
39
39
  verifierUrl: string;
@@ -45,8 +45,21 @@ declare const baseSepolia: {
45
45
  * Hardhat local development chain configuration
46
46
  */
47
47
  declare const hardhat: {
48
+ id: number;
48
49
  name: string;
50
+ network: string;
51
+ coFheUrl: string;
52
+ verifierUrl: string;
53
+ thresholdNetworkUrl: string;
54
+ environment: "MOCK" | "TESTNET" | "MAINNET";
55
+ };
56
+
57
+ /**
58
+ * Localcofhe chain configuration
59
+ */
60
+ declare const localcofhe: {
49
61
  id: number;
62
+ name: string;
50
63
  network: string;
51
64
  coFheUrl: string;
52
65
  verifierUrl: string;
@@ -56,8 +69,8 @@ declare const hardhat: {
56
69
 
57
70
  declare const chains: {
58
71
  readonly sepolia: {
59
- name: string;
60
72
  id: number;
73
+ name: string;
61
74
  network: string;
62
75
  coFheUrl: string;
63
76
  verifierUrl: string;
@@ -65,8 +78,8 @@ declare const chains: {
65
78
  environment: "MOCK" | "TESTNET" | "MAINNET";
66
79
  };
67
80
  readonly arbSepolia: {
68
- name: string;
69
81
  id: number;
82
+ name: string;
70
83
  network: string;
71
84
  coFheUrl: string;
72
85
  verifierUrl: string;
@@ -74,8 +87,8 @@ declare const chains: {
74
87
  environment: "MOCK" | "TESTNET" | "MAINNET";
75
88
  };
76
89
  readonly baseSepolia: {
77
- name: string;
78
90
  id: number;
91
+ name: string;
79
92
  network: string;
80
93
  coFheUrl: string;
81
94
  verifierUrl: string;
@@ -83,8 +96,17 @@ declare const chains: {
83
96
  environment: "MOCK" | "TESTNET" | "MAINNET";
84
97
  };
85
98
  readonly hardhat: {
99
+ id: number;
86
100
  name: string;
101
+ network: string;
102
+ coFheUrl: string;
103
+ verifierUrl: string;
104
+ thresholdNetworkUrl: string;
105
+ environment: "MOCK" | "TESTNET" | "MAINNET";
106
+ };
107
+ readonly localcofhe: {
87
108
  id: number;
109
+ name: string;
88
110
  network: string;
89
111
  coFheUrl: string;
90
112
  verifierUrl: string;
@@ -96,4 +118,4 @@ declare const chains: {
96
118
  declare const getChainById: (chainId: number) => CofheChain | undefined;
97
119
  declare const getChainByName: (name: string) => CofheChain | undefined;
98
120
 
99
- export { CofheChain, arbSepolia, baseSepolia, chains, getChainById, getChainByName, hardhat, sepolia };
121
+ export { CofheChain, arbSepolia, baseSepolia, chains, getChainById, getChainByName, hardhat, localcofhe, sepolia };
package/dist/chains.d.ts CHANGED
@@ -1,13 +1,13 @@
1
- import { C as CofheChain } from './types-KImPrEIe.js';
2
- export { E as Environment } from './types-KImPrEIe.js';
1
+ import { C as CofheChain } from './types-YiAC4gig.js';
2
+ export { E as Environment } from './types-YiAC4gig.js';
3
3
  import 'zod';
4
4
 
5
5
  /**
6
6
  * Sepolia testnet chain configuration
7
7
  */
8
8
  declare const sepolia: {
9
- name: string;
10
9
  id: number;
10
+ name: string;
11
11
  network: string;
12
12
  coFheUrl: string;
13
13
  verifierUrl: string;
@@ -19,8 +19,8 @@ declare const sepolia: {
19
19
  * Arbitrum Sepolia testnet chain configuration
20
20
  */
21
21
  declare const arbSepolia: {
22
- name: string;
23
22
  id: number;
23
+ name: string;
24
24
  network: string;
25
25
  coFheUrl: string;
26
26
  verifierUrl: string;
@@ -32,8 +32,8 @@ declare const arbSepolia: {
32
32
  * Base Sepolia testnet chain configuration
33
33
  */
34
34
  declare const baseSepolia: {
35
- name: string;
36
35
  id: number;
36
+ name: string;
37
37
  network: string;
38
38
  coFheUrl: string;
39
39
  verifierUrl: string;
@@ -45,8 +45,21 @@ declare const baseSepolia: {
45
45
  * Hardhat local development chain configuration
46
46
  */
47
47
  declare const hardhat: {
48
+ id: number;
48
49
  name: string;
50
+ network: string;
51
+ coFheUrl: string;
52
+ verifierUrl: string;
53
+ thresholdNetworkUrl: string;
54
+ environment: "MOCK" | "TESTNET" | "MAINNET";
55
+ };
56
+
57
+ /**
58
+ * Localcofhe chain configuration
59
+ */
60
+ declare const localcofhe: {
49
61
  id: number;
62
+ name: string;
50
63
  network: string;
51
64
  coFheUrl: string;
52
65
  verifierUrl: string;
@@ -56,8 +69,8 @@ declare const hardhat: {
56
69
 
57
70
  declare const chains: {
58
71
  readonly sepolia: {
59
- name: string;
60
72
  id: number;
73
+ name: string;
61
74
  network: string;
62
75
  coFheUrl: string;
63
76
  verifierUrl: string;
@@ -65,8 +78,8 @@ declare const chains: {
65
78
  environment: "MOCK" | "TESTNET" | "MAINNET";
66
79
  };
67
80
  readonly arbSepolia: {
68
- name: string;
69
81
  id: number;
82
+ name: string;
70
83
  network: string;
71
84
  coFheUrl: string;
72
85
  verifierUrl: string;
@@ -74,8 +87,8 @@ declare const chains: {
74
87
  environment: "MOCK" | "TESTNET" | "MAINNET";
75
88
  };
76
89
  readonly baseSepolia: {
77
- name: string;
78
90
  id: number;
91
+ name: string;
79
92
  network: string;
80
93
  coFheUrl: string;
81
94
  verifierUrl: string;
@@ -83,8 +96,17 @@ declare const chains: {
83
96
  environment: "MOCK" | "TESTNET" | "MAINNET";
84
97
  };
85
98
  readonly hardhat: {
99
+ id: number;
86
100
  name: string;
101
+ network: string;
102
+ coFheUrl: string;
103
+ verifierUrl: string;
104
+ thresholdNetworkUrl: string;
105
+ environment: "MOCK" | "TESTNET" | "MAINNET";
106
+ };
107
+ readonly localcofhe: {
87
108
  id: number;
109
+ name: string;
88
110
  network: string;
89
111
  coFheUrl: string;
90
112
  verifierUrl: string;
@@ -96,4 +118,4 @@ declare const chains: {
96
118
  declare const getChainById: (chainId: number) => CofheChain | undefined;
97
119
  declare const getChainByName: (name: string) => CofheChain | undefined;
98
120
 
99
- export { CofheChain, arbSepolia, baseSepolia, chains, getChainById, getChainByName, hardhat, sepolia };
121
+ export { CofheChain, arbSepolia, baseSepolia, chains, getChainById, getChainByName, hardhat, localcofhe, sepolia };
package/dist/chains.js CHANGED
@@ -1 +1 @@
1
- export { arbSepolia, baseSepolia, chains, getChainById, getChainByName, hardhat, sepolia } from './chunk-GZCQQYVI.js';
1
+ export { arbSepolia, baseSepolia, chains, getChainById, getChainByName, hardhat, localcofhe, sepolia } from './chunk-TBLR7NNE.js';