@cofhe/sdk 0.1.0 → 0.2.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 +62 -0
- package/adapters/ethers5.test.ts +174 -0
- package/adapters/ethers5.ts +36 -0
- package/adapters/ethers6.test.ts +169 -0
- package/adapters/ethers6.ts +36 -0
- package/adapters/hardhat-node.ts +167 -0
- package/adapters/hardhat.hh2.test.ts +159 -0
- package/adapters/hardhat.ts +36 -0
- package/adapters/index.test.ts +20 -0
- package/adapters/index.ts +5 -0
- package/adapters/smartWallet.ts +99 -0
- package/adapters/test-utils.ts +53 -0
- package/adapters/types.ts +6 -0
- package/adapters/wagmi.test.ts +156 -0
- package/adapters/wagmi.ts +17 -0
- package/chains/chains/arbSepolia.ts +14 -0
- package/chains/chains/baseSepolia.ts +14 -0
- package/chains/chains/hardhat.ts +15 -0
- package/chains/chains/localcofhe.ts +14 -0
- package/chains/chains/sepolia.ts +14 -0
- package/chains/chains.test.ts +50 -0
- package/chains/defineChain.ts +18 -0
- package/chains/index.ts +35 -0
- package/chains/types.ts +32 -0
- package/core/baseBuilder.ts +119 -0
- package/core/client.test.ts +315 -0
- package/core/client.ts +292 -0
- package/core/clientTypes.ts +108 -0
- package/core/config.test.ts +235 -0
- package/core/config.ts +220 -0
- package/core/decrypt/MockQueryDecrypterAbi.ts +129 -0
- package/core/decrypt/cofheMocksSealOutput.ts +57 -0
- package/core/decrypt/decryptHandleBuilder.ts +287 -0
- package/core/decrypt/decryptUtils.ts +28 -0
- package/core/decrypt/tnSealOutputV1.ts +59 -0
- package/core/decrypt/tnSealOutputV2.ts +298 -0
- package/core/encrypt/MockZkVerifierAbi.ts +106 -0
- package/core/encrypt/cofheMocksZkVerifySign.ts +284 -0
- package/core/encrypt/encryptInputsBuilder.test.ts +751 -0
- package/core/encrypt/encryptInputsBuilder.ts +560 -0
- package/core/encrypt/encryptUtils.ts +67 -0
- package/core/encrypt/zkPackProveVerify.ts +335 -0
- package/core/error.ts +168 -0
- package/core/fetchKeys.test.ts +195 -0
- package/core/fetchKeys.ts +144 -0
- package/core/index.ts +89 -0
- package/core/keyStore.test.ts +226 -0
- package/core/keyStore.ts +154 -0
- package/core/permits.test.ts +494 -0
- package/core/permits.ts +200 -0
- package/core/types.ts +398 -0
- package/core/utils.ts +130 -0
- package/dist/adapters.cjs +88 -0
- package/dist/adapters.d.cts +14576 -0
- package/dist/adapters.d.ts +14576 -0
- package/dist/adapters.js +83 -0
- package/dist/chains.cjs +114 -0
- package/dist/chains.d.cts +121 -0
- package/dist/chains.d.ts +121 -0
- package/dist/chains.js +1 -0
- package/dist/chunk-UGBVZNRT.js +818 -0
- package/dist/chunk-WEAZ25JO.js +105 -0
- package/dist/chunk-WGCRJCBR.js +2523 -0
- package/dist/clientTypes-5_1nwtUe.d.cts +914 -0
- package/dist/clientTypes-Es7fyi65.d.ts +914 -0
- package/dist/core.cjs +3414 -0
- package/dist/core.d.cts +111 -0
- package/dist/core.d.ts +111 -0
- package/dist/core.js +3 -0
- package/dist/node.cjs +3286 -0
- package/dist/node.d.cts +22 -0
- package/dist/node.d.ts +22 -0
- package/dist/node.js +91 -0
- package/dist/permit-fUSe6KKq.d.cts +349 -0
- package/dist/permit-fUSe6KKq.d.ts +349 -0
- package/dist/permits.cjs +871 -0
- package/dist/permits.d.cts +1045 -0
- package/dist/permits.d.ts +1045 -0
- package/dist/permits.js +1 -0
- package/dist/types-KImPrEIe.d.cts +48 -0
- package/dist/types-KImPrEIe.d.ts +48 -0
- package/dist/web.cjs +3478 -0
- package/dist/web.d.cts +38 -0
- package/dist/web.d.ts +38 -0
- package/dist/web.js +240 -0
- package/dist/zkProve.worker.cjs +93 -0
- package/dist/zkProve.worker.d.cts +2 -0
- package/dist/zkProve.worker.d.ts +2 -0
- package/dist/zkProve.worker.js +91 -0
- package/node/client.test.ts +147 -0
- package/node/config.test.ts +68 -0
- package/node/encryptInputs.test.ts +155 -0
- package/node/index.ts +97 -0
- package/node/storage.ts +51 -0
- package/package.json +27 -15
- package/permits/index.ts +68 -0
- package/permits/localstorage.test.ts +117 -0
- package/permits/permit.test.ts +477 -0
- package/permits/permit.ts +405 -0
- package/permits/sealing.test.ts +84 -0
- package/permits/sealing.ts +131 -0
- package/permits/signature.ts +79 -0
- package/permits/store.test.ts +128 -0
- package/permits/store.ts +166 -0
- package/permits/test-utils.ts +20 -0
- package/permits/types.ts +191 -0
- package/permits/utils.ts +62 -0
- package/permits/validation.test.ts +288 -0
- package/permits/validation.ts +369 -0
- package/web/client.web.test.ts +147 -0
- package/web/config.web.test.ts +69 -0
- package/web/encryptInputs.web.test.ts +172 -0
- package/web/index.ts +161 -0
- package/web/storage.ts +34 -0
- package/web/worker.builder.web.test.ts +148 -0
- package/web/worker.config.web.test.ts +329 -0
- package/web/worker.output.web.test.ts +84 -0
- package/web/workerManager.test.ts +80 -0
- package/web/workerManager.ts +214 -0
- package/web/workerManager.web.test.ts +114 -0
- package/web/zkProve.worker.ts +133 -0
package/dist/adapters.js
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { custom, createPublicClient, createWalletClient } from 'viem';
|
|
2
|
+
import { privateKeyToAccount } from 'viem/accounts';
|
|
3
|
+
|
|
4
|
+
// adapters/ethers5.ts
|
|
5
|
+
async function Ethers5Adapter(provider, signer) {
|
|
6
|
+
const transport = provider && "send" in provider && typeof provider.send === "function" ? (
|
|
7
|
+
// @ts-ignore - ethers5 provider.send is not typed
|
|
8
|
+
custom({ request: ({ method, params }) => provider.send(method, params ?? []) })
|
|
9
|
+
) : (() => {
|
|
10
|
+
throw new Error("Provider does not support EIP-1193 interface");
|
|
11
|
+
})();
|
|
12
|
+
const address = await signer.getAddress();
|
|
13
|
+
let account;
|
|
14
|
+
if ("privateKey" in signer && typeof signer.privateKey === "string") {
|
|
15
|
+
account = privateKeyToAccount(signer.privateKey);
|
|
16
|
+
} else if (provider && typeof provider.send === "function") {
|
|
17
|
+
account = address;
|
|
18
|
+
} else {
|
|
19
|
+
throw new Error("Signer does not expose a private key and no injected wallet is available.");
|
|
20
|
+
}
|
|
21
|
+
const publicClient = createPublicClient({ transport });
|
|
22
|
+
const walletClient = createWalletClient({ transport, account });
|
|
23
|
+
return { publicClient, walletClient };
|
|
24
|
+
}
|
|
25
|
+
async function Ethers6Adapter(provider, signer) {
|
|
26
|
+
const transport = provider && "send" in provider && typeof provider.send === "function" ? (
|
|
27
|
+
// @ts-ignore - ethers6 provider.send is not typed
|
|
28
|
+
custom({ request: ({ method, params }) => provider.send(method, params ?? []) })
|
|
29
|
+
) : (() => {
|
|
30
|
+
throw new Error("Provider does not support EIP-1193 interface");
|
|
31
|
+
})();
|
|
32
|
+
const address = await signer.getAddress();
|
|
33
|
+
let account;
|
|
34
|
+
if ("privateKey" in signer && typeof signer.privateKey === "string") {
|
|
35
|
+
account = privateKeyToAccount(signer.privateKey);
|
|
36
|
+
} else if (provider && typeof provider.send === "function") {
|
|
37
|
+
account = address;
|
|
38
|
+
} else {
|
|
39
|
+
throw new Error("Signer does not expose a private key and no injected wallet is available.");
|
|
40
|
+
}
|
|
41
|
+
const publicClient = createPublicClient({ transport });
|
|
42
|
+
const walletClient = createWalletClient({ transport, account });
|
|
43
|
+
return { publicClient, walletClient };
|
|
44
|
+
}
|
|
45
|
+
async function WagmiAdapter(walletClient, publicClient) {
|
|
46
|
+
if (!walletClient) {
|
|
47
|
+
throw new Error("WalletClient is required");
|
|
48
|
+
}
|
|
49
|
+
if (!publicClient) {
|
|
50
|
+
throw new Error("PublicClient is required");
|
|
51
|
+
}
|
|
52
|
+
return {
|
|
53
|
+
publicClient,
|
|
54
|
+
walletClient
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
async function HardhatSignerAdapter(signer) {
|
|
58
|
+
const provider = signer.provider;
|
|
59
|
+
if (!provider) {
|
|
60
|
+
throw new Error("Signer must have a provider");
|
|
61
|
+
}
|
|
62
|
+
const transport = custom({
|
|
63
|
+
request: async ({ method, params }) => {
|
|
64
|
+
if ("request" in provider && typeof provider.request === "function") {
|
|
65
|
+
return await provider.request({ method, params });
|
|
66
|
+
} else if ("send" in provider && typeof provider.send === "function") {
|
|
67
|
+
return await provider.send(
|
|
68
|
+
method,
|
|
69
|
+
params || []
|
|
70
|
+
);
|
|
71
|
+
} else {
|
|
72
|
+
throw new Error("Provider does not support EIP-1193 request method");
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
const address = await signer.getAddress();
|
|
77
|
+
const account = address;
|
|
78
|
+
const publicClient = createPublicClient({ transport });
|
|
79
|
+
const walletClient = createWalletClient({ transport, account });
|
|
80
|
+
return { publicClient, walletClient };
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export { Ethers5Adapter, Ethers6Adapter, HardhatSignerAdapter, WagmiAdapter };
|
package/dist/chains.cjs
ADDED
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var zod = require('zod');
|
|
4
|
+
|
|
5
|
+
// chains/types.ts
|
|
6
|
+
var EnvironmentSchema = zod.z.enum(["MOCK", "TESTNET", "MAINNET"]);
|
|
7
|
+
var CofheChainSchema = zod.z.object({
|
|
8
|
+
/** Chain ID */
|
|
9
|
+
id: zod.z.number().int().positive(),
|
|
10
|
+
/** Human-readable chain name */
|
|
11
|
+
name: zod.z.string().min(1),
|
|
12
|
+
/** Network identifier */
|
|
13
|
+
network: zod.z.string().min(1),
|
|
14
|
+
/** coFhe service URL */
|
|
15
|
+
coFheUrl: zod.z.string().url(),
|
|
16
|
+
/** Verifier service URL */
|
|
17
|
+
verifierUrl: zod.z.string().url(),
|
|
18
|
+
/** Threshold network service URL */
|
|
19
|
+
thresholdNetworkUrl: zod.z.string().url(),
|
|
20
|
+
/** Environment type */
|
|
21
|
+
environment: EnvironmentSchema
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
// chains/defineChain.ts
|
|
25
|
+
function defineChain(chainConfig) {
|
|
26
|
+
const result = CofheChainSchema.safeParse(chainConfig);
|
|
27
|
+
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(", ")}`);
|
|
30
|
+
}
|
|
31
|
+
return result.data;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
// chains/chains/sepolia.ts
|
|
35
|
+
var sepolia = defineChain({
|
|
36
|
+
id: 11155111,
|
|
37
|
+
name: "Sepolia",
|
|
38
|
+
network: "sepolia",
|
|
39
|
+
coFheUrl: "https://testnet-cofhe.fhenix.zone",
|
|
40
|
+
verifierUrl: "https://testnet-cofhe-vrf.fhenix.zone",
|
|
41
|
+
thresholdNetworkUrl: "https://testnet-cofhe-tn.fhenix.zone",
|
|
42
|
+
environment: "TESTNET"
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
// chains/chains/arbSepolia.ts
|
|
46
|
+
var arbSepolia = defineChain({
|
|
47
|
+
id: 421614,
|
|
48
|
+
name: "Arbitrum Sepolia",
|
|
49
|
+
network: "arb-sepolia",
|
|
50
|
+
coFheUrl: "https://testnet-cofhe.fhenix.zone",
|
|
51
|
+
verifierUrl: "https://testnet-cofhe-vrf.fhenix.zone",
|
|
52
|
+
thresholdNetworkUrl: "https://testnet-cofhe-tn.fhenix.zone",
|
|
53
|
+
environment: "TESTNET"
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
// chains/chains/baseSepolia.ts
|
|
57
|
+
var baseSepolia = defineChain({
|
|
58
|
+
id: 84532,
|
|
59
|
+
name: "Base Sepolia",
|
|
60
|
+
network: "base-sepolia",
|
|
61
|
+
coFheUrl: "https://testnet-cofhe.fhenix.zone",
|
|
62
|
+
verifierUrl: "https://testnet-cofhe-vrf.fhenix.zone",
|
|
63
|
+
thresholdNetworkUrl: "https://testnet-cofhe-tn.fhenix.zone",
|
|
64
|
+
environment: "TESTNET"
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
// chains/chains/hardhat.ts
|
|
68
|
+
var hardhat = defineChain({
|
|
69
|
+
id: 31337,
|
|
70
|
+
name: "Hardhat",
|
|
71
|
+
network: "localhost",
|
|
72
|
+
// These are unused in the mock environment
|
|
73
|
+
coFheUrl: "http://127.0.0.1:8448",
|
|
74
|
+
verifierUrl: "http://127.0.0.1:3001",
|
|
75
|
+
thresholdNetworkUrl: "http://127.0.0.1:3000",
|
|
76
|
+
environment: "MOCK"
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
// chains/chains/localcofhe.ts
|
|
80
|
+
var localcofhe = defineChain({
|
|
81
|
+
id: 420105,
|
|
82
|
+
name: "Local Cofhe",
|
|
83
|
+
network: "localhost",
|
|
84
|
+
coFheUrl: "http://127.0.0.1:9448",
|
|
85
|
+
verifierUrl: "http://127.0.0.1:3001",
|
|
86
|
+
thresholdNetworkUrl: "http://127.0.0.1:3000",
|
|
87
|
+
environment: "TESTNET"
|
|
88
|
+
});
|
|
89
|
+
|
|
90
|
+
// chains/index.ts
|
|
91
|
+
var chains = {
|
|
92
|
+
sepolia,
|
|
93
|
+
arbSepolia,
|
|
94
|
+
baseSepolia,
|
|
95
|
+
hardhat,
|
|
96
|
+
localcofhe
|
|
97
|
+
};
|
|
98
|
+
var getChainById = (chainId) => {
|
|
99
|
+
return Object.values(chains).find((chain) => chain.id === chainId);
|
|
100
|
+
};
|
|
101
|
+
var getChainByName = (name) => {
|
|
102
|
+
return Object.values(chains).find(
|
|
103
|
+
(chain) => chain.name.toLowerCase() === name.toLowerCase() || chain.network.toLowerCase() === name.toLowerCase()
|
|
104
|
+
);
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
exports.arbSepolia = arbSepolia;
|
|
108
|
+
exports.baseSepolia = baseSepolia;
|
|
109
|
+
exports.chains = chains;
|
|
110
|
+
exports.getChainById = getChainById;
|
|
111
|
+
exports.getChainByName = getChainByName;
|
|
112
|
+
exports.hardhat = hardhat;
|
|
113
|
+
exports.localcofhe = localcofhe;
|
|
114
|
+
exports.sepolia = sepolia;
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import { C as CofheChain } from './types-KImPrEIe.cjs';
|
|
2
|
+
export { E as Environment } from './types-KImPrEIe.cjs';
|
|
3
|
+
import 'zod';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Sepolia testnet chain configuration
|
|
7
|
+
*/
|
|
8
|
+
declare const sepolia: {
|
|
9
|
+
name: string;
|
|
10
|
+
id: number;
|
|
11
|
+
network: string;
|
|
12
|
+
coFheUrl: string;
|
|
13
|
+
verifierUrl: string;
|
|
14
|
+
thresholdNetworkUrl: string;
|
|
15
|
+
environment: "MOCK" | "TESTNET" | "MAINNET";
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Arbitrum Sepolia testnet chain configuration
|
|
20
|
+
*/
|
|
21
|
+
declare const arbSepolia: {
|
|
22
|
+
name: string;
|
|
23
|
+
id: number;
|
|
24
|
+
network: string;
|
|
25
|
+
coFheUrl: string;
|
|
26
|
+
verifierUrl: string;
|
|
27
|
+
thresholdNetworkUrl: string;
|
|
28
|
+
environment: "MOCK" | "TESTNET" | "MAINNET";
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Base Sepolia testnet chain configuration
|
|
33
|
+
*/
|
|
34
|
+
declare const baseSepolia: {
|
|
35
|
+
name: string;
|
|
36
|
+
id: number;
|
|
37
|
+
network: string;
|
|
38
|
+
coFheUrl: string;
|
|
39
|
+
verifierUrl: string;
|
|
40
|
+
thresholdNetworkUrl: string;
|
|
41
|
+
environment: "MOCK" | "TESTNET" | "MAINNET";
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Hardhat local development chain configuration
|
|
46
|
+
*/
|
|
47
|
+
declare const hardhat: {
|
|
48
|
+
name: string;
|
|
49
|
+
id: number;
|
|
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: {
|
|
61
|
+
name: string;
|
|
62
|
+
id: number;
|
|
63
|
+
network: string;
|
|
64
|
+
coFheUrl: string;
|
|
65
|
+
verifierUrl: string;
|
|
66
|
+
thresholdNetworkUrl: string;
|
|
67
|
+
environment: "MOCK" | "TESTNET" | "MAINNET";
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
declare const chains: {
|
|
71
|
+
readonly sepolia: {
|
|
72
|
+
name: string;
|
|
73
|
+
id: number;
|
|
74
|
+
network: string;
|
|
75
|
+
coFheUrl: string;
|
|
76
|
+
verifierUrl: string;
|
|
77
|
+
thresholdNetworkUrl: string;
|
|
78
|
+
environment: "MOCK" | "TESTNET" | "MAINNET";
|
|
79
|
+
};
|
|
80
|
+
readonly arbSepolia: {
|
|
81
|
+
name: string;
|
|
82
|
+
id: number;
|
|
83
|
+
network: string;
|
|
84
|
+
coFheUrl: string;
|
|
85
|
+
verifierUrl: string;
|
|
86
|
+
thresholdNetworkUrl: string;
|
|
87
|
+
environment: "MOCK" | "TESTNET" | "MAINNET";
|
|
88
|
+
};
|
|
89
|
+
readonly baseSepolia: {
|
|
90
|
+
name: string;
|
|
91
|
+
id: number;
|
|
92
|
+
network: string;
|
|
93
|
+
coFheUrl: string;
|
|
94
|
+
verifierUrl: string;
|
|
95
|
+
thresholdNetworkUrl: string;
|
|
96
|
+
environment: "MOCK" | "TESTNET" | "MAINNET";
|
|
97
|
+
};
|
|
98
|
+
readonly hardhat: {
|
|
99
|
+
name: string;
|
|
100
|
+
id: number;
|
|
101
|
+
network: string;
|
|
102
|
+
coFheUrl: string;
|
|
103
|
+
verifierUrl: string;
|
|
104
|
+
thresholdNetworkUrl: string;
|
|
105
|
+
environment: "MOCK" | "TESTNET" | "MAINNET";
|
|
106
|
+
};
|
|
107
|
+
readonly localcofhe: {
|
|
108
|
+
name: string;
|
|
109
|
+
id: number;
|
|
110
|
+
network: string;
|
|
111
|
+
coFheUrl: string;
|
|
112
|
+
verifierUrl: string;
|
|
113
|
+
thresholdNetworkUrl: string;
|
|
114
|
+
environment: "MOCK" | "TESTNET" | "MAINNET";
|
|
115
|
+
};
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
declare const getChainById: (chainId: number) => CofheChain | undefined;
|
|
119
|
+
declare const getChainByName: (name: string) => CofheChain | undefined;
|
|
120
|
+
|
|
121
|
+
export { CofheChain, arbSepolia, baseSepolia, chains, getChainById, getChainByName, hardhat, localcofhe, sepolia };
|
package/dist/chains.d.ts
ADDED
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import { C as CofheChain } from './types-KImPrEIe.js';
|
|
2
|
+
export { E as Environment } from './types-KImPrEIe.js';
|
|
3
|
+
import 'zod';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Sepolia testnet chain configuration
|
|
7
|
+
*/
|
|
8
|
+
declare const sepolia: {
|
|
9
|
+
name: string;
|
|
10
|
+
id: number;
|
|
11
|
+
network: string;
|
|
12
|
+
coFheUrl: string;
|
|
13
|
+
verifierUrl: string;
|
|
14
|
+
thresholdNetworkUrl: string;
|
|
15
|
+
environment: "MOCK" | "TESTNET" | "MAINNET";
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Arbitrum Sepolia testnet chain configuration
|
|
20
|
+
*/
|
|
21
|
+
declare const arbSepolia: {
|
|
22
|
+
name: string;
|
|
23
|
+
id: number;
|
|
24
|
+
network: string;
|
|
25
|
+
coFheUrl: string;
|
|
26
|
+
verifierUrl: string;
|
|
27
|
+
thresholdNetworkUrl: string;
|
|
28
|
+
environment: "MOCK" | "TESTNET" | "MAINNET";
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Base Sepolia testnet chain configuration
|
|
33
|
+
*/
|
|
34
|
+
declare const baseSepolia: {
|
|
35
|
+
name: string;
|
|
36
|
+
id: number;
|
|
37
|
+
network: string;
|
|
38
|
+
coFheUrl: string;
|
|
39
|
+
verifierUrl: string;
|
|
40
|
+
thresholdNetworkUrl: string;
|
|
41
|
+
environment: "MOCK" | "TESTNET" | "MAINNET";
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Hardhat local development chain configuration
|
|
46
|
+
*/
|
|
47
|
+
declare const hardhat: {
|
|
48
|
+
name: string;
|
|
49
|
+
id: number;
|
|
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: {
|
|
61
|
+
name: string;
|
|
62
|
+
id: number;
|
|
63
|
+
network: string;
|
|
64
|
+
coFheUrl: string;
|
|
65
|
+
verifierUrl: string;
|
|
66
|
+
thresholdNetworkUrl: string;
|
|
67
|
+
environment: "MOCK" | "TESTNET" | "MAINNET";
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
declare const chains: {
|
|
71
|
+
readonly sepolia: {
|
|
72
|
+
name: string;
|
|
73
|
+
id: number;
|
|
74
|
+
network: string;
|
|
75
|
+
coFheUrl: string;
|
|
76
|
+
verifierUrl: string;
|
|
77
|
+
thresholdNetworkUrl: string;
|
|
78
|
+
environment: "MOCK" | "TESTNET" | "MAINNET";
|
|
79
|
+
};
|
|
80
|
+
readonly arbSepolia: {
|
|
81
|
+
name: string;
|
|
82
|
+
id: number;
|
|
83
|
+
network: string;
|
|
84
|
+
coFheUrl: string;
|
|
85
|
+
verifierUrl: string;
|
|
86
|
+
thresholdNetworkUrl: string;
|
|
87
|
+
environment: "MOCK" | "TESTNET" | "MAINNET";
|
|
88
|
+
};
|
|
89
|
+
readonly baseSepolia: {
|
|
90
|
+
name: string;
|
|
91
|
+
id: number;
|
|
92
|
+
network: string;
|
|
93
|
+
coFheUrl: string;
|
|
94
|
+
verifierUrl: string;
|
|
95
|
+
thresholdNetworkUrl: string;
|
|
96
|
+
environment: "MOCK" | "TESTNET" | "MAINNET";
|
|
97
|
+
};
|
|
98
|
+
readonly hardhat: {
|
|
99
|
+
name: string;
|
|
100
|
+
id: number;
|
|
101
|
+
network: string;
|
|
102
|
+
coFheUrl: string;
|
|
103
|
+
verifierUrl: string;
|
|
104
|
+
thresholdNetworkUrl: string;
|
|
105
|
+
environment: "MOCK" | "TESTNET" | "MAINNET";
|
|
106
|
+
};
|
|
107
|
+
readonly localcofhe: {
|
|
108
|
+
name: string;
|
|
109
|
+
id: number;
|
|
110
|
+
network: string;
|
|
111
|
+
coFheUrl: string;
|
|
112
|
+
verifierUrl: string;
|
|
113
|
+
thresholdNetworkUrl: string;
|
|
114
|
+
environment: "MOCK" | "TESTNET" | "MAINNET";
|
|
115
|
+
};
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
declare const getChainById: (chainId: number) => CofheChain | undefined;
|
|
119
|
+
declare const getChainByName: (name: string) => CofheChain | undefined;
|
|
120
|
+
|
|
121
|
+
export { CofheChain, arbSepolia, baseSepolia, chains, getChainById, getChainByName, hardhat, localcofhe, sepolia };
|
package/dist/chains.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { arbSepolia, baseSepolia, chains, getChainById, getChainByName, hardhat, localcofhe, sepolia } from './chunk-WEAZ25JO.js';
|