@zama-fhe/relayer-sdk 0.3.0-6 → 0.3.0-8
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/bundle/relayer-sdk-js.js +24 -11
- package/bundle/relayer-sdk-js.umd.cjs +7 -7
- package/bundle.d.ts +1 -0
- package/lib/node.cjs +14 -1
- package/lib/node.d.ts +2 -0
- package/lib/node.js +14 -2
- package/lib/web.d.ts +2 -0
- package/lib/web.js +14 -2
- package/package.json +1 -1
package/bundle.d.ts
CHANGED
package/lib/node.cjs
CHANGED
|
@@ -1402,6 +1402,18 @@ const generateKeypair = () => {
|
|
|
1402
1402
|
};
|
|
1403
1403
|
|
|
1404
1404
|
global.fetch = fetchRetry(global.fetch, { retries: 5, retryDelay: 500 });
|
|
1405
|
+
const MainnetConfig = {
|
|
1406
|
+
aclContractAddress: '0xcA2E8f1F656CD25C01F05d0b243Ab1ecd4a8ffb6',
|
|
1407
|
+
kmsContractAddress: '0x77627828a55156b04Ac0DC0eb30467f1a552BB03',
|
|
1408
|
+
inputVerifierContractAddress: '0xCe0FC2e05CFff1B719EFF7169f7D80Af770c8EA2',
|
|
1409
|
+
verifyingContractAddressDecryption: '0x0f6024a97684f7d90ddb0fAAD79cB15F2C888D24',
|
|
1410
|
+
verifyingContractAddressInputVerification: '0xcB1bB072f38bdAF0F328CdEf1Fc6eDa1DF029287',
|
|
1411
|
+
chainId: 1,
|
|
1412
|
+
gatewayChainId: 261131,
|
|
1413
|
+
network: 'https://ethereum-rpc.publicnode.com',
|
|
1414
|
+
relayerUrl: 'https://relayer.mainnet.zama.org',
|
|
1415
|
+
};
|
|
1416
|
+
Object.freeze(MainnetConfig);
|
|
1405
1417
|
const SepoliaConfig = {
|
|
1406
1418
|
// ACL_CONTRACT_ADDRESS (FHEVM Host chain)
|
|
1407
1419
|
aclContractAddress: '0xf0Ffdc93b7E186bC2f8CB3dAA75D86d1930A433D',
|
|
@@ -1452,7 +1464,7 @@ const createInstance = async (config) => {
|
|
|
1452
1464
|
const coprocessorSigners = await getCoprocessorSigners(provider, config);
|
|
1453
1465
|
const thresholdCoprocessorSigners = await getCoprocessorSignersThreshold(provider, config);
|
|
1454
1466
|
return {
|
|
1455
|
-
createEncryptedInput: createRelayerEncryptedInput(aclContractAddress, verifyingContractAddressInputVerification, chainId, gatewayChainId, cleanURL(config.relayerUrl), publicKeyData.publicKey, publicParamsData, coprocessorSigners, thresholdCoprocessorSigners),
|
|
1467
|
+
createEncryptedInput: createRelayerEncryptedInput(aclContractAddress, verifyingContractAddressInputVerification, chainId, gatewayChainId, cleanURL(config.relayerUrl), publicKeyData.publicKey, publicParamsData, coprocessorSigners, thresholdCoprocessorSigners, auth && { auth }),
|
|
1456
1468
|
generateKeypair,
|
|
1457
1469
|
createEIP712: createEIP712(verifyingContractAddressDecryption, chainId),
|
|
1458
1470
|
publicDecrypt: publicDecryptRequest(kmsSigners, thresholdKMSSigners, gatewayChainId, verifyingContractAddressDecryption, aclContractAddress, cleanURL(config.relayerUrl), provider, auth && { auth }),
|
|
@@ -1496,6 +1508,7 @@ global.TFHE = TFHEPkg__namespace;
|
|
|
1496
1508
|
global.TKMS = TKMSPkg__namespace;
|
|
1497
1509
|
|
|
1498
1510
|
exports.ENCRYPTION_TYPES = ENCRYPTION_TYPES;
|
|
1511
|
+
exports.MainnetConfig = MainnetConfig;
|
|
1499
1512
|
exports.SepoliaConfig = SepoliaConfig;
|
|
1500
1513
|
exports.createEIP712 = createEIP712;
|
|
1501
1514
|
exports.createInstance = createInstance;
|
package/lib/node.d.ts
CHANGED
|
@@ -186,6 +186,8 @@ export declare type HandleContractPair = {
|
|
|
186
186
|
contractAddress: string;
|
|
187
187
|
};
|
|
188
188
|
|
|
189
|
+
export declare const MainnetConfig: FhevmInstanceConfig;
|
|
190
|
+
|
|
189
191
|
export declare type PublicDecryptResults = {
|
|
190
192
|
clearValues: ClearValues;
|
|
191
193
|
abiEncodedClearValues: `0x${string}`;
|
package/lib/node.js
CHANGED
|
@@ -1381,6 +1381,18 @@ const generateKeypair = () => {
|
|
|
1381
1381
|
};
|
|
1382
1382
|
|
|
1383
1383
|
global.fetch = fetchRetry(global.fetch, { retries: 5, retryDelay: 500 });
|
|
1384
|
+
const MainnetConfig = {
|
|
1385
|
+
aclContractAddress: '0xcA2E8f1F656CD25C01F05d0b243Ab1ecd4a8ffb6',
|
|
1386
|
+
kmsContractAddress: '0x77627828a55156b04Ac0DC0eb30467f1a552BB03',
|
|
1387
|
+
inputVerifierContractAddress: '0xCe0FC2e05CFff1B719EFF7169f7D80Af770c8EA2',
|
|
1388
|
+
verifyingContractAddressDecryption: '0x0f6024a97684f7d90ddb0fAAD79cB15F2C888D24',
|
|
1389
|
+
verifyingContractAddressInputVerification: '0xcB1bB072f38bdAF0F328CdEf1Fc6eDa1DF029287',
|
|
1390
|
+
chainId: 1,
|
|
1391
|
+
gatewayChainId: 261131,
|
|
1392
|
+
network: 'https://ethereum-rpc.publicnode.com',
|
|
1393
|
+
relayerUrl: 'https://relayer.mainnet.zama.org',
|
|
1394
|
+
};
|
|
1395
|
+
Object.freeze(MainnetConfig);
|
|
1384
1396
|
const SepoliaConfig = {
|
|
1385
1397
|
// ACL_CONTRACT_ADDRESS (FHEVM Host chain)
|
|
1386
1398
|
aclContractAddress: '0xf0Ffdc93b7E186bC2f8CB3dAA75D86d1930A433D',
|
|
@@ -1431,7 +1443,7 @@ const createInstance = async (config) => {
|
|
|
1431
1443
|
const coprocessorSigners = await getCoprocessorSigners(provider, config);
|
|
1432
1444
|
const thresholdCoprocessorSigners = await getCoprocessorSignersThreshold(provider, config);
|
|
1433
1445
|
return {
|
|
1434
|
-
createEncryptedInput: createRelayerEncryptedInput(aclContractAddress, verifyingContractAddressInputVerification, chainId, gatewayChainId, cleanURL(config.relayerUrl), publicKeyData.publicKey, publicParamsData, coprocessorSigners, thresholdCoprocessorSigners),
|
|
1446
|
+
createEncryptedInput: createRelayerEncryptedInput(aclContractAddress, verifyingContractAddressInputVerification, chainId, gatewayChainId, cleanURL(config.relayerUrl), publicKeyData.publicKey, publicParamsData, coprocessorSigners, thresholdCoprocessorSigners, auth && { auth }),
|
|
1435
1447
|
generateKeypair,
|
|
1436
1448
|
createEIP712: createEIP712(verifyingContractAddressDecryption, chainId),
|
|
1437
1449
|
publicDecrypt: publicDecryptRequest(kmsSigners, thresholdKMSSigners, gatewayChainId, verifyingContractAddressDecryption, aclContractAddress, cleanURL(config.relayerUrl), provider, auth && { auth }),
|
|
@@ -1474,4 +1486,4 @@ const createTfhePublicKey = () => {
|
|
|
1474
1486
|
global.TFHE = TFHEPkg;
|
|
1475
1487
|
global.TKMS = TKMSPkg;
|
|
1476
1488
|
|
|
1477
|
-
export { ENCRYPTION_TYPES, SepoliaConfig, createEIP712, createInstance, createTfheKeypair, createTfhePublicKey, generateKeypair, getErrorCauseCode, getErrorCauseStatus };
|
|
1489
|
+
export { ENCRYPTION_TYPES, MainnetConfig, SepoliaConfig, createEIP712, createInstance, createTfheKeypair, createTfhePublicKey, generateKeypair, getErrorCauseCode, getErrorCauseStatus };
|
package/lib/web.d.ts
CHANGED
|
@@ -185,6 +185,8 @@ export declare const initSDK: ({ tfheParams, kmsParams, thread, }?: {
|
|
|
185
185
|
|
|
186
186
|
export { KMSInput }
|
|
187
187
|
|
|
188
|
+
export declare const MainnetConfig: FhevmInstanceConfig;
|
|
189
|
+
|
|
188
190
|
export declare type PublicDecryptResults = {
|
|
189
191
|
clearValues: ClearValues;
|
|
190
192
|
abiEncodedClearValues: `0x${string}`;
|
package/lib/web.js
CHANGED
|
@@ -17628,6 +17628,18 @@ const generateKeypair = () => {
|
|
|
17628
17628
|
};
|
|
17629
17629
|
|
|
17630
17630
|
global.fetch = fetchRetry(global.fetch, { retries: 5, retryDelay: 500 });
|
|
17631
|
+
const MainnetConfig = {
|
|
17632
|
+
aclContractAddress: '0xcA2E8f1F656CD25C01F05d0b243Ab1ecd4a8ffb6',
|
|
17633
|
+
kmsContractAddress: '0x77627828a55156b04Ac0DC0eb30467f1a552BB03',
|
|
17634
|
+
inputVerifierContractAddress: '0xCe0FC2e05CFff1B719EFF7169f7D80Af770c8EA2',
|
|
17635
|
+
verifyingContractAddressDecryption: '0x0f6024a97684f7d90ddb0fAAD79cB15F2C888D24',
|
|
17636
|
+
verifyingContractAddressInputVerification: '0xcB1bB072f38bdAF0F328CdEf1Fc6eDa1DF029287',
|
|
17637
|
+
chainId: 1,
|
|
17638
|
+
gatewayChainId: 261131,
|
|
17639
|
+
network: 'https://ethereum-rpc.publicnode.com',
|
|
17640
|
+
relayerUrl: 'https://relayer.mainnet.zama.org',
|
|
17641
|
+
};
|
|
17642
|
+
Object.freeze(MainnetConfig);
|
|
17631
17643
|
const SepoliaConfig = {
|
|
17632
17644
|
// ACL_CONTRACT_ADDRESS (FHEVM Host chain)
|
|
17633
17645
|
aclContractAddress: '0xf0Ffdc93b7E186bC2f8CB3dAA75D86d1930A433D',
|
|
@@ -17678,7 +17690,7 @@ const createInstance = async (config) => {
|
|
|
17678
17690
|
const coprocessorSigners = await getCoprocessorSigners(provider, config);
|
|
17679
17691
|
const thresholdCoprocessorSigners = await getCoprocessorSignersThreshold(provider, config);
|
|
17680
17692
|
return {
|
|
17681
|
-
createEncryptedInput: createRelayerEncryptedInput(aclContractAddress, verifyingContractAddressInputVerification, chainId, gatewayChainId, cleanURL(config.relayerUrl), publicKeyData.publicKey, publicParamsData, coprocessorSigners, thresholdCoprocessorSigners),
|
|
17693
|
+
createEncryptedInput: createRelayerEncryptedInput(aclContractAddress, verifyingContractAddressInputVerification, chainId, gatewayChainId, cleanURL(config.relayerUrl), publicKeyData.publicKey, publicParamsData, coprocessorSigners, thresholdCoprocessorSigners, auth && { auth }),
|
|
17682
17694
|
generateKeypair,
|
|
17683
17695
|
createEIP712: createEIP712(verifyingContractAddressDecryption, chainId),
|
|
17684
17696
|
publicDecrypt: publicDecryptRequest(kmsSigners, thresholdKMSSigners, gatewayChainId, verifyingContractAddressDecryption, aclContractAddress, cleanURL(config.relayerUrl), provider, auth && { auth }),
|
|
@@ -17747,4 +17759,4 @@ window.TKMS = {
|
|
|
17747
17759
|
ml_kem_pke_get_pk,
|
|
17748
17760
|
};
|
|
17749
17761
|
|
|
17750
|
-
export { ENCRYPTION_TYPES, SepoliaConfig, createEIP712, createInstance, generateKeypair, getErrorCauseCode, getErrorCauseStatus, initSDK };
|
|
17762
|
+
export { ENCRYPTION_TYPES, MainnetConfig, SepoliaConfig, createEIP712, createInstance, generateKeypair, getErrorCauseCode, getErrorCauseStatus, initSDK };
|