@cofhe/sdk 0.7.1 → 0.8.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.
- package/CHANGELOG.md +35 -0
- package/acps/acp.ts +10 -1
- package/acps/index.ts +11 -0
- package/acps/onchain-utils.ts +188 -49
- package/acps/registry.ts +73 -0
- package/acps/test/onchainAccessStatus.test.ts +116 -0
- package/acps/types.ts +16 -0
- package/chains/chains/arbitrum.ts +14 -0
- package/chains/chains/ethereum.ts +14 -0
- package/chains/index.ts +5 -1
- package/chains/test/chains.test.ts +24 -3
- package/core/acps.ts +51 -143
- package/core/client.ts +13 -8
- package/core/clientTypes.ts +29 -4
- package/core/config.ts +25 -1
- package/core/consts.ts +14 -2
- package/core/decrypt/verifyDecryptResult.ts +4 -3
- package/core/encrypt/encryptInputsBuilder.ts +6 -0
- package/core/encrypt/zkPackProveVerify.ts +7 -1
- package/core/error.ts +1 -0
- package/core/fetchKeys.ts +2 -2
- package/core/index.ts +9 -1
- package/core/keyStore.ts +23 -10
- package/core/taskManager.ts +48 -0
- package/core/test/acps.test.ts +91 -1
- package/core/test/client.test.ts +41 -0
- package/core/test/config.test.ts +16 -0
- package/core/test/decrypt.test.ts +11 -4
- package/core/test/encryptInputsBuilder.test.ts +1 -1
- package/core/test/fetchKeys.test.ts +23 -2
- package/core/test/keyStore.test.ts +18 -6
- package/core/test/taskManager.test.ts +57 -0
- package/core/types.ts +8 -0
- package/dist/acps.cjs +314 -35
- package/dist/acps.d.cts +251 -4
- package/dist/acps.d.ts +251 -4
- package/dist/acps.js +2 -2
- package/dist/chains.cjs +26 -0
- package/dist/chains.d.cts +45 -1
- package/dist/chains.d.ts +45 -1
- package/dist/chains.js +1 -1
- package/dist/{chunk-43USWPEH.js → chunk-GGI7Y6AW.js} +59 -264
- package/dist/chunk-KSOV5B4B.js +50 -0
- package/dist/{chunk-ESMZCFJY.js → chunk-NMKMCAI3.js} +4 -2
- package/dist/{chunk-Q7CBWGQX.js → chunk-UJYOBHYA.js} +374 -37
- package/dist/{chunk-N6IDQRRU.js → chunk-UKQAJK4N.js} +25 -1
- package/dist/{clientTypes-BN3nbzYM.d.ts → clientTypes-5YPPR16m.d.ts} +77 -14
- package/dist/{clientTypes-CYZjFznO.d.cts → clientTypes-D3aIXmUp.d.cts} +77 -14
- package/dist/core.cjs +271 -136
- package/dist/core.d.cts +29 -8
- package/dist/core.d.ts +29 -8
- package/dist/core.js +4 -4
- package/dist/node.cjs +266 -136
- package/dist/node.d.cts +2 -2
- package/dist/node.d.ts +2 -2
- package/dist/node.js +5 -5
- package/dist/{acp-Wi6isVQI.d.cts → onchain-utils-CUAK8glx.d.cts} +31 -1
- package/dist/{acp-Wi6isVQI.d.ts → onchain-utils-CUAK8glx.d.ts} +31 -1
- package/dist/web.cjs +360 -150
- package/dist/web.d.cts +49 -3
- package/dist/web.d.ts +49 -3
- package/dist/web.js +51 -20
- package/dist/zkProve.worker.cjs +69 -15
- package/dist/zkProve.worker.js +23 -17
- package/node/storage.ts +2 -2
- package/node/test/inherited.test.ts +5 -1
- package/node/test/storage-memory-fallback.test.ts +47 -0
- package/package.json +5 -3
- package/web/index.ts +100 -26
- package/web/test/countingZkProveWorker.ts +31 -0
- package/web/test/inherited.web.test.ts +5 -1
- package/web/test/mainThreadPool.web.test.ts +174 -0
- package/web/test/threadPoolBenchHelper.ts +140 -0
- package/web/test/threadPoolOff.web.test.ts +17 -0
- package/web/test/threadPoolOn.web.test.ts +80 -0
- package/web/test/workerInitRace.web.test.ts +79 -0
- package/web/tfheThreadPool.ts +140 -0
- package/web/workerManager.ts +4 -2
- package/web/zkProve.worker.ts +42 -17
package/dist/acps.d.ts
CHANGED
|
@@ -1,9 +1,256 @@
|
|
|
1
|
-
import { A as ACP, V as ValidationResult, a as ACPPublic, b as ACPSignaturePrimaryType, E as EIP712Types, c as EIP712Message, S as SerializedACP } from './
|
|
2
|
-
export {
|
|
1
|
+
import { A as ACP, V as ValidationResult, a as ACPPublic, b as ACPSignaturePrimaryType, E as EIP712Types, c as EIP712Message, S as SerializedACP } from './onchain-utils-CUAK8glx.js';
|
|
2
|
+
export { z as ACPAccessStatus, B as ACPHashFields, e as ACPMetadata, t as ACPOf, q as ACPPrivate, x as ACPScope, y as ACPScopeOptions, r as ACPType, i as ACPUtils, m as AclServedAddresses, C as CreateSelfACPOptions, d as CreateSharingACPOptions, h as EIP712Domain, p as EIP712Type, o as EthEncryptedData, D as Expand, G as GenerateSealingKey, I as ImportACPOptions, I as ImportSharedACPOptions, g as IncomingShare, R as RecipientACP, n as SealingKeyPair, v as SelfACP, C as SelfACPOptions, f as SharedACP, w as SharingACP, d as SharingACPOptions, l as clearAclServedAddresses, j as getAclAddress, k as getAclServedAddresses, s as seal, u as unsealWithPrivateKey } from './onchain-utils-CUAK8glx.js';
|
|
3
|
+
import { Hex, AbiParameterToPrimitiveType } from 'viem';
|
|
3
4
|
import { z } from 'zod';
|
|
4
5
|
import * as zustand_middleware from 'zustand/middleware';
|
|
5
6
|
import * as zustand_vanilla from 'zustand/vanilla';
|
|
6
|
-
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* The on-chain sharing pieces: the share registry and revoker ABIs, the registry payload of a
|
|
10
|
+
* sharing ACP and its share id. Exported so an app can send these writes through its own
|
|
11
|
+
* transaction path and still agree with the registry on ids.
|
|
12
|
+
*/
|
|
13
|
+
declare const ACP_REVOKER_ABI: readonly [{
|
|
14
|
+
readonly name: "revokeSingle";
|
|
15
|
+
readonly type: "function";
|
|
16
|
+
readonly stateMutability: "nonpayable";
|
|
17
|
+
readonly inputs: readonly [{
|
|
18
|
+
readonly type: "uint256";
|
|
19
|
+
readonly name: "id";
|
|
20
|
+
}];
|
|
21
|
+
readonly outputs: readonly [];
|
|
22
|
+
}, {
|
|
23
|
+
readonly name: "revokeAllExisting";
|
|
24
|
+
readonly type: "function";
|
|
25
|
+
readonly stateMutability: "nonpayable";
|
|
26
|
+
readonly inputs: readonly [];
|
|
27
|
+
readonly outputs: readonly [];
|
|
28
|
+
}, {
|
|
29
|
+
readonly name: "disabled";
|
|
30
|
+
readonly type: "function";
|
|
31
|
+
readonly stateMutability: "view";
|
|
32
|
+
readonly inputs: readonly [{
|
|
33
|
+
readonly type: "address";
|
|
34
|
+
readonly name: "issuer";
|
|
35
|
+
}, {
|
|
36
|
+
readonly type: "uint256";
|
|
37
|
+
readonly name: "id";
|
|
38
|
+
}];
|
|
39
|
+
readonly outputs: readonly [{
|
|
40
|
+
readonly type: "bool";
|
|
41
|
+
}];
|
|
42
|
+
}];
|
|
43
|
+
declare const ACP_SHARE_REGISTRY_ABI: readonly [{
|
|
44
|
+
readonly name: "share";
|
|
45
|
+
readonly type: "function";
|
|
46
|
+
readonly stateMutability: "nonpayable";
|
|
47
|
+
readonly inputs: readonly [{
|
|
48
|
+
readonly type: "tuple";
|
|
49
|
+
readonly components: readonly [{
|
|
50
|
+
readonly type: "address";
|
|
51
|
+
readonly name: "issuer";
|
|
52
|
+
}, {
|
|
53
|
+
readonly type: "uint64";
|
|
54
|
+
readonly name: "expiration";
|
|
55
|
+
}, {
|
|
56
|
+
readonly type: "address";
|
|
57
|
+
readonly name: "recipient";
|
|
58
|
+
}, {
|
|
59
|
+
readonly type: "uint256";
|
|
60
|
+
readonly name: "revokerData";
|
|
61
|
+
}, {
|
|
62
|
+
readonly type: "address";
|
|
63
|
+
readonly name: "revokerContract";
|
|
64
|
+
}, {
|
|
65
|
+
readonly type: "uint8";
|
|
66
|
+
readonly name: "scope";
|
|
67
|
+
}, {
|
|
68
|
+
readonly type: "address[]";
|
|
69
|
+
readonly name: "contracts";
|
|
70
|
+
}, {
|
|
71
|
+
readonly type: "bytes32[]";
|
|
72
|
+
readonly name: "handles";
|
|
73
|
+
}, {
|
|
74
|
+
readonly type: "bytes32";
|
|
75
|
+
readonly name: "sealingKey";
|
|
76
|
+
}, {
|
|
77
|
+
readonly type: "bytes";
|
|
78
|
+
readonly name: "issuerSignature";
|
|
79
|
+
}, {
|
|
80
|
+
readonly type: "bytes";
|
|
81
|
+
readonly name: "recipientSignature";
|
|
82
|
+
}];
|
|
83
|
+
readonly name: "acp";
|
|
84
|
+
}];
|
|
85
|
+
readonly outputs: readonly [{
|
|
86
|
+
readonly type: "bytes32";
|
|
87
|
+
}];
|
|
88
|
+
}, {
|
|
89
|
+
readonly name: "removeShare";
|
|
90
|
+
readonly type: "function";
|
|
91
|
+
readonly stateMutability: "nonpayable";
|
|
92
|
+
readonly inputs: readonly [{
|
|
93
|
+
readonly type: "bytes32";
|
|
94
|
+
readonly name: "shareId";
|
|
95
|
+
}];
|
|
96
|
+
readonly outputs: readonly [];
|
|
97
|
+
}, {
|
|
98
|
+
readonly name: "sharesFor";
|
|
99
|
+
readonly type: "function";
|
|
100
|
+
readonly stateMutability: "view";
|
|
101
|
+
readonly inputs: readonly [{
|
|
102
|
+
readonly type: "address";
|
|
103
|
+
readonly name: "recipient";
|
|
104
|
+
}];
|
|
105
|
+
readonly outputs: readonly [{
|
|
106
|
+
readonly type: "tuple[]";
|
|
107
|
+
readonly components: readonly [{
|
|
108
|
+
readonly type: "address";
|
|
109
|
+
readonly name: "issuer";
|
|
110
|
+
}, {
|
|
111
|
+
readonly type: "uint64";
|
|
112
|
+
readonly name: "expiration";
|
|
113
|
+
}, {
|
|
114
|
+
readonly type: "address";
|
|
115
|
+
readonly name: "recipient";
|
|
116
|
+
}, {
|
|
117
|
+
readonly type: "uint256";
|
|
118
|
+
readonly name: "revokerData";
|
|
119
|
+
}, {
|
|
120
|
+
readonly type: "address";
|
|
121
|
+
readonly name: "revokerContract";
|
|
122
|
+
}, {
|
|
123
|
+
readonly type: "uint8";
|
|
124
|
+
readonly name: "scope";
|
|
125
|
+
}, {
|
|
126
|
+
readonly type: "address[]";
|
|
127
|
+
readonly name: "contracts";
|
|
128
|
+
}, {
|
|
129
|
+
readonly type: "bytes32[]";
|
|
130
|
+
readonly name: "handles";
|
|
131
|
+
}, {
|
|
132
|
+
readonly type: "bytes32";
|
|
133
|
+
readonly name: "sealingKey";
|
|
134
|
+
}, {
|
|
135
|
+
readonly type: "bytes";
|
|
136
|
+
readonly name: "issuerSignature";
|
|
137
|
+
}, {
|
|
138
|
+
readonly type: "bytes";
|
|
139
|
+
readonly name: "recipientSignature";
|
|
140
|
+
}];
|
|
141
|
+
}];
|
|
142
|
+
}, {
|
|
143
|
+
readonly name: "getShare";
|
|
144
|
+
readonly type: "function";
|
|
145
|
+
readonly stateMutability: "view";
|
|
146
|
+
readonly inputs: readonly [{
|
|
147
|
+
readonly type: "bytes32";
|
|
148
|
+
readonly name: "shareId";
|
|
149
|
+
}];
|
|
150
|
+
readonly outputs: readonly [{
|
|
151
|
+
readonly type: "tuple";
|
|
152
|
+
readonly components: readonly [{
|
|
153
|
+
readonly type: "address";
|
|
154
|
+
readonly name: "issuer";
|
|
155
|
+
}, {
|
|
156
|
+
readonly type: "uint64";
|
|
157
|
+
readonly name: "expiration";
|
|
158
|
+
}, {
|
|
159
|
+
readonly type: "address";
|
|
160
|
+
readonly name: "recipient";
|
|
161
|
+
}, {
|
|
162
|
+
readonly type: "uint256";
|
|
163
|
+
readonly name: "revokerData";
|
|
164
|
+
}, {
|
|
165
|
+
readonly type: "address";
|
|
166
|
+
readonly name: "revokerContract";
|
|
167
|
+
}, {
|
|
168
|
+
readonly type: "uint8";
|
|
169
|
+
readonly name: "scope";
|
|
170
|
+
}, {
|
|
171
|
+
readonly type: "address[]";
|
|
172
|
+
readonly name: "contracts";
|
|
173
|
+
}, {
|
|
174
|
+
readonly type: "bytes32[]";
|
|
175
|
+
readonly name: "handles";
|
|
176
|
+
}, {
|
|
177
|
+
readonly type: "bytes32";
|
|
178
|
+
readonly name: "sealingKey";
|
|
179
|
+
}, {
|
|
180
|
+
readonly type: "bytes";
|
|
181
|
+
readonly name: "issuerSignature";
|
|
182
|
+
}, {
|
|
183
|
+
readonly type: "bytes";
|
|
184
|
+
readonly name: "recipientSignature";
|
|
185
|
+
}];
|
|
186
|
+
}];
|
|
187
|
+
}, {
|
|
188
|
+
readonly name: "isShareValid";
|
|
189
|
+
readonly type: "function";
|
|
190
|
+
readonly stateMutability: "view";
|
|
191
|
+
readonly inputs: readonly [{
|
|
192
|
+
readonly type: "bytes32";
|
|
193
|
+
readonly name: "shareId";
|
|
194
|
+
}];
|
|
195
|
+
readonly outputs: readonly [{
|
|
196
|
+
readonly type: "bool";
|
|
197
|
+
}];
|
|
198
|
+
}];
|
|
199
|
+
declare const ACP_SHARE_TUPLE_ABI: readonly [{
|
|
200
|
+
readonly type: "tuple";
|
|
201
|
+
readonly components: readonly [{
|
|
202
|
+
readonly name: "issuer";
|
|
203
|
+
readonly type: "address";
|
|
204
|
+
}, {
|
|
205
|
+
readonly name: "expiration";
|
|
206
|
+
readonly type: "uint64";
|
|
207
|
+
}, {
|
|
208
|
+
readonly name: "recipient";
|
|
209
|
+
readonly type: "address";
|
|
210
|
+
}, {
|
|
211
|
+
readonly name: "revokerData";
|
|
212
|
+
readonly type: "uint256";
|
|
213
|
+
}, {
|
|
214
|
+
readonly name: "revokerContract";
|
|
215
|
+
readonly type: "address";
|
|
216
|
+
}, {
|
|
217
|
+
readonly name: "scope";
|
|
218
|
+
readonly type: "uint8";
|
|
219
|
+
}, {
|
|
220
|
+
readonly name: "contracts";
|
|
221
|
+
readonly type: "address[]";
|
|
222
|
+
}, {
|
|
223
|
+
readonly name: "handles";
|
|
224
|
+
readonly type: "bytes32[]";
|
|
225
|
+
}, {
|
|
226
|
+
readonly name: "sealingKey";
|
|
227
|
+
readonly type: "bytes32";
|
|
228
|
+
}, {
|
|
229
|
+
readonly name: "issuerSignature";
|
|
230
|
+
readonly type: "bytes";
|
|
231
|
+
}, {
|
|
232
|
+
readonly name: "recipientSignature";
|
|
233
|
+
readonly type: "bytes";
|
|
234
|
+
}];
|
|
235
|
+
}];
|
|
236
|
+
/** The on-chain payload for a sharing ACP: recipient-side fields empty. */
|
|
237
|
+
declare const toChainShare: (acp: ACP) => {
|
|
238
|
+
expiration: bigint;
|
|
239
|
+
revokerData: bigint;
|
|
240
|
+
sealingKey: `0x${string}`;
|
|
241
|
+
recipientSignature: Hex;
|
|
242
|
+
issuer: Hex;
|
|
243
|
+
recipient: Hex;
|
|
244
|
+
revokerContract: Hex;
|
|
245
|
+
scope: number;
|
|
246
|
+
contracts: Hex[];
|
|
247
|
+
handles: Hex[];
|
|
248
|
+
issuerSignature: Hex;
|
|
249
|
+
};
|
|
250
|
+
/** Mirrors the registry's `keccak256(abi.encode(acp))` share id. */
|
|
251
|
+
declare const computeShareId: (acp: ACP) => Hex;
|
|
252
|
+
/** The share id of a registry payload as read back from `sharesFor` / `getShare`. */
|
|
253
|
+
declare const shareIdOfChainShare: (share: AbiParameterToPrimitiveType<(typeof ACP_SHARE_TUPLE_ABI)[0]>) => Hex;
|
|
7
254
|
|
|
8
255
|
declare const addressSchema: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
|
|
9
256
|
declare const addressNotZeroSchema: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
|
|
@@ -477,4 +724,4 @@ declare const acpStore: {
|
|
|
477
724
|
resetStore: () => void;
|
|
478
725
|
};
|
|
479
726
|
|
|
480
|
-
export { ACP, ACPPublic, ACPSignaturePrimaryType, ACP_STORE_DEFAULTS, EIP712Message, EIP712Types, ImportACPOptionsValidator, ImportACPValidator, SelfACPOptionsValidator, SelfACPValidator, SerializedACP, SharingACPOptionsValidator, SharingACPValidator, SignatureTypes, SignatureUtils, ValidationResult, ValidationUtils, _acpStore, acpStore, addressNotZeroSchema, addressSchema, bytesNotEmptySchema, bytesSchema, clearStaleStore, contractsSchema, getACP, getACPs, getActiveACP, getActiveACPHash, getSignatureTypesAndMessage, handlesSchema, removeACP, removeActiveACPHash, resetStore, setACP, setActiveACPHash, validateImportACP, validateImportACPOptions, validateSelfACP, validateSelfACPOptions, validateSharingACP, validateSharingACPOptions };
|
|
727
|
+
export { ACP, ACPPublic, ACPSignaturePrimaryType, ACP_REVOKER_ABI, ACP_SHARE_REGISTRY_ABI, ACP_SHARE_TUPLE_ABI, ACP_STORE_DEFAULTS, EIP712Message, EIP712Types, ImportACPOptionsValidator, ImportACPValidator, SelfACPOptionsValidator, SelfACPValidator, SerializedACP, SharingACPOptionsValidator, SharingACPValidator, SignatureTypes, SignatureUtils, ValidationResult, ValidationUtils, _acpStore, acpStore, addressNotZeroSchema, addressSchema, bytesNotEmptySchema, bytesSchema, clearStaleStore, computeShareId, contractsSchema, getACP, getACPs, getActiveACP, getActiveACPHash, getSignatureTypesAndMessage, handlesSchema, removeACP, removeActiveACPHash, resetStore, setACP, setActiveACPHash, shareIdOfChainShare, toChainShare, validateImportACP, validateImportACPOptions, validateSelfACP, validateSelfACPOptions, validateSharingACP, validateSharingACPOptions };
|
package/dist/acps.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { ACPScope, ACPUtils, ACP_STORE_DEFAULTS, GenerateSealingKey, ImportACPOptionsValidator, ImportACPValidator, SelfACPOptionsValidator, SelfACPValidator, SharingACPOptionsValidator, SharingACPValidator, SignatureTypes, SignatureUtils, ValidationUtils, _acpStore, acpStore, addressNotZeroSchema, addressSchema, bytesNotEmptySchema, bytesSchema, clearStaleStore, contractsSchema, getACP, getACPs, getActiveACP, getActiveACPHash, getSignatureTypesAndMessage, handlesSchema, removeACP, removeActiveACPHash, resetStore, seal, setACP, setActiveACPHash, unsealWithPrivateKey, validateImportACP, validateImportACPOptions, validateSelfACP, validateSelfACPOptions, validateSharingACP, validateSharingACPOptions } from './chunk-
|
|
2
|
-
import './chunk-
|
|
1
|
+
export { ACPScope, ACPUtils, ACP_REVOKER_ABI, ACP_SHARE_REGISTRY_ABI, ACP_SHARE_TUPLE_ABI, ACP_STORE_DEFAULTS, GenerateSealingKey, ImportACPOptionsValidator, ImportACPValidator, SelfACPOptionsValidator, SelfACPValidator, SharingACPOptionsValidator, SharingACPValidator, SignatureTypes, SignatureUtils, ValidationUtils, _acpStore, acpStore, addressNotZeroSchema, addressSchema, bytesNotEmptySchema, bytesSchema, clearAclServedAddresses, clearStaleStore, computeShareId, contractsSchema, getACP, getACPs, getAclAddress, getAclServedAddresses, getActiveACP, getActiveACPHash, getSignatureTypesAndMessage, handlesSchema, removeACP, removeActiveACPHash, resetStore, seal, setACP, setActiveACPHash, shareIdOfChainShare, toChainShare, unsealWithPrivateKey, validateImportACP, validateImportACPOptions, validateSelfACP, validateSelfACPOptions, validateSharingACP, validateSharingACPOptions } from './chunk-UJYOBHYA.js';
|
|
2
|
+
import './chunk-NMKMCAI3.js';
|
package/dist/chains.cjs
CHANGED
|
@@ -61,6 +61,28 @@ var baseSepolia = defineChain({
|
|
|
61
61
|
environment: "TESTNET"
|
|
62
62
|
});
|
|
63
63
|
|
|
64
|
+
// chains/chains/ethereum.ts
|
|
65
|
+
var ethereum = defineChain({
|
|
66
|
+
id: 1,
|
|
67
|
+
name: "Ethereum",
|
|
68
|
+
network: "ethereum",
|
|
69
|
+
coFheUrl: "https://cofhe.mainnet.fhenix.zone",
|
|
70
|
+
verifierUrl: "https://cofhe-vrf.mainnet.fhenix.zone",
|
|
71
|
+
thresholdNetworkUrl: "https://cofhe-tn.mainnet.fhenix.zone",
|
|
72
|
+
environment: "MAINNET"
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
// chains/chains/arbitrum.ts
|
|
76
|
+
var arbitrum = defineChain({
|
|
77
|
+
id: 42161,
|
|
78
|
+
name: "Arbitrum One",
|
|
79
|
+
network: "arbitrum",
|
|
80
|
+
coFheUrl: "https://cofhe.mainnet.fhenix.zone",
|
|
81
|
+
verifierUrl: "https://cofhe-vrf.mainnet.fhenix.zone",
|
|
82
|
+
thresholdNetworkUrl: "https://cofhe-tn.mainnet.fhenix.zone",
|
|
83
|
+
environment: "MAINNET"
|
|
84
|
+
});
|
|
85
|
+
|
|
64
86
|
// chains/chains/hardhat.ts
|
|
65
87
|
var hardhat = defineChain({
|
|
66
88
|
id: 31337,
|
|
@@ -100,6 +122,8 @@ var chains = {
|
|
|
100
122
|
sepolia,
|
|
101
123
|
arbSepolia,
|
|
102
124
|
baseSepolia,
|
|
125
|
+
ethereum,
|
|
126
|
+
arbitrum,
|
|
103
127
|
hardhat,
|
|
104
128
|
localcofhe,
|
|
105
129
|
stagingCofhe
|
|
@@ -114,8 +138,10 @@ var getChainByName = (name) => {
|
|
|
114
138
|
};
|
|
115
139
|
|
|
116
140
|
exports.arbSepolia = arbSepolia;
|
|
141
|
+
exports.arbitrum = arbitrum;
|
|
117
142
|
exports.baseSepolia = baseSepolia;
|
|
118
143
|
exports.chains = chains;
|
|
144
|
+
exports.ethereum = ethereum;
|
|
119
145
|
exports.getChainById = getChainById;
|
|
120
146
|
exports.getChainByName = getChainByName;
|
|
121
147
|
exports.hardhat = hardhat;
|
package/dist/chains.d.cts
CHANGED
|
@@ -41,6 +41,32 @@ declare const baseSepolia: {
|
|
|
41
41
|
environment: "MOCK" | "TESTNET" | "MAINNET";
|
|
42
42
|
};
|
|
43
43
|
|
|
44
|
+
/**
|
|
45
|
+
* Ethereum mainnet chain configuration
|
|
46
|
+
*/
|
|
47
|
+
declare const ethereum: {
|
|
48
|
+
id: number;
|
|
49
|
+
name: string;
|
|
50
|
+
network: string;
|
|
51
|
+
coFheUrl: string;
|
|
52
|
+
verifierUrl: string;
|
|
53
|
+
thresholdNetworkUrl: string;
|
|
54
|
+
environment: "MOCK" | "TESTNET" | "MAINNET";
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Arbitrum One mainnet chain configuration
|
|
59
|
+
*/
|
|
60
|
+
declare const arbitrum: {
|
|
61
|
+
id: number;
|
|
62
|
+
name: string;
|
|
63
|
+
network: string;
|
|
64
|
+
coFheUrl: string;
|
|
65
|
+
verifierUrl: string;
|
|
66
|
+
thresholdNetworkUrl: string;
|
|
67
|
+
environment: "MOCK" | "TESTNET" | "MAINNET";
|
|
68
|
+
};
|
|
69
|
+
|
|
44
70
|
/**
|
|
45
71
|
* Hardhat local development chain configuration
|
|
46
72
|
*/
|
|
@@ -115,6 +141,24 @@ declare const chains: {
|
|
|
115
141
|
thresholdNetworkUrl: string;
|
|
116
142
|
environment: "MOCK" | "TESTNET" | "MAINNET";
|
|
117
143
|
};
|
|
144
|
+
readonly ethereum: {
|
|
145
|
+
id: number;
|
|
146
|
+
name: string;
|
|
147
|
+
network: string;
|
|
148
|
+
coFheUrl: string;
|
|
149
|
+
verifierUrl: string;
|
|
150
|
+
thresholdNetworkUrl: string;
|
|
151
|
+
environment: "MOCK" | "TESTNET" | "MAINNET";
|
|
152
|
+
};
|
|
153
|
+
readonly arbitrum: {
|
|
154
|
+
id: number;
|
|
155
|
+
name: string;
|
|
156
|
+
network: string;
|
|
157
|
+
coFheUrl: string;
|
|
158
|
+
verifierUrl: string;
|
|
159
|
+
thresholdNetworkUrl: string;
|
|
160
|
+
environment: "MOCK" | "TESTNET" | "MAINNET";
|
|
161
|
+
};
|
|
118
162
|
readonly hardhat: {
|
|
119
163
|
id: number;
|
|
120
164
|
name: string;
|
|
@@ -147,4 +191,4 @@ declare const chains: {
|
|
|
147
191
|
declare const getChainById: (chainId: number) => CofheChain | undefined;
|
|
148
192
|
declare const getChainByName: (name: string) => CofheChain | undefined;
|
|
149
193
|
|
|
150
|
-
export { CofheChain, arbSepolia, baseSepolia, chains, getChainById, getChainByName, hardhat, localcofhe, sepolia, stagingCofhe };
|
|
194
|
+
export { CofheChain, arbSepolia, arbitrum, baseSepolia, chains, ethereum, getChainById, getChainByName, hardhat, localcofhe, sepolia, stagingCofhe };
|
package/dist/chains.d.ts
CHANGED
|
@@ -41,6 +41,32 @@ declare const baseSepolia: {
|
|
|
41
41
|
environment: "MOCK" | "TESTNET" | "MAINNET";
|
|
42
42
|
};
|
|
43
43
|
|
|
44
|
+
/**
|
|
45
|
+
* Ethereum mainnet chain configuration
|
|
46
|
+
*/
|
|
47
|
+
declare const ethereum: {
|
|
48
|
+
id: number;
|
|
49
|
+
name: string;
|
|
50
|
+
network: string;
|
|
51
|
+
coFheUrl: string;
|
|
52
|
+
verifierUrl: string;
|
|
53
|
+
thresholdNetworkUrl: string;
|
|
54
|
+
environment: "MOCK" | "TESTNET" | "MAINNET";
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Arbitrum One mainnet chain configuration
|
|
59
|
+
*/
|
|
60
|
+
declare const arbitrum: {
|
|
61
|
+
id: number;
|
|
62
|
+
name: string;
|
|
63
|
+
network: string;
|
|
64
|
+
coFheUrl: string;
|
|
65
|
+
verifierUrl: string;
|
|
66
|
+
thresholdNetworkUrl: string;
|
|
67
|
+
environment: "MOCK" | "TESTNET" | "MAINNET";
|
|
68
|
+
};
|
|
69
|
+
|
|
44
70
|
/**
|
|
45
71
|
* Hardhat local development chain configuration
|
|
46
72
|
*/
|
|
@@ -115,6 +141,24 @@ declare const chains: {
|
|
|
115
141
|
thresholdNetworkUrl: string;
|
|
116
142
|
environment: "MOCK" | "TESTNET" | "MAINNET";
|
|
117
143
|
};
|
|
144
|
+
readonly ethereum: {
|
|
145
|
+
id: number;
|
|
146
|
+
name: string;
|
|
147
|
+
network: string;
|
|
148
|
+
coFheUrl: string;
|
|
149
|
+
verifierUrl: string;
|
|
150
|
+
thresholdNetworkUrl: string;
|
|
151
|
+
environment: "MOCK" | "TESTNET" | "MAINNET";
|
|
152
|
+
};
|
|
153
|
+
readonly arbitrum: {
|
|
154
|
+
id: number;
|
|
155
|
+
name: string;
|
|
156
|
+
network: string;
|
|
157
|
+
coFheUrl: string;
|
|
158
|
+
verifierUrl: string;
|
|
159
|
+
thresholdNetworkUrl: string;
|
|
160
|
+
environment: "MOCK" | "TESTNET" | "MAINNET";
|
|
161
|
+
};
|
|
118
162
|
readonly hardhat: {
|
|
119
163
|
id: number;
|
|
120
164
|
name: string;
|
|
@@ -147,4 +191,4 @@ declare const chains: {
|
|
|
147
191
|
declare const getChainById: (chainId: number) => CofheChain | undefined;
|
|
148
192
|
declare const getChainByName: (name: string) => CofheChain | undefined;
|
|
149
193
|
|
|
150
|
-
export { CofheChain, arbSepolia, baseSepolia, chains, getChainById, getChainByName, hardhat, localcofhe, sepolia, stagingCofhe };
|
|
194
|
+
export { CofheChain, arbSepolia, arbitrum, baseSepolia, chains, ethereum, getChainById, getChainByName, hardhat, localcofhe, sepolia, stagingCofhe };
|
package/dist/chains.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { arbSepolia, baseSepolia, chains, getChainById, getChainByName, hardhat, localcofhe, sepolia, stagingCofhe } from './chunk-
|
|
1
|
+
export { arbSepolia, arbitrum, baseSepolia, chains, ethereum, getChainById, getChainByName, hardhat, localcofhe, sepolia, stagingCofhe } from './chunk-UKQAJK4N.js';
|