@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/relayer-sdk-js.js
CHANGED
|
@@ -31702,12 +31702,12 @@ function Cg(n) {
|
|
|
31702
31702
|
if (n instanceof Error && typeof n.cause == "object" && n.cause !== null)
|
|
31703
31703
|
return n.cause;
|
|
31704
31704
|
}
|
|
31705
|
-
function
|
|
31705
|
+
function KA(n) {
|
|
31706
31706
|
const t = Cg(n);
|
|
31707
31707
|
if (!(!t || !("code" in t) || !t.code) && typeof t.code == "string")
|
|
31708
31708
|
return t.code;
|
|
31709
31709
|
}
|
|
31710
|
-
function
|
|
31710
|
+
function WA(n) {
|
|
31711
31711
|
const t = Cg(n);
|
|
31712
31712
|
if (!(!t || !("status" in t) || t.status === void 0) && typeof t.status == "number")
|
|
31713
31713
|
return t.status;
|
|
@@ -32569,7 +32569,19 @@ const MA = (n, t, e, r, i, o, a, u) => async (_, l) => {
|
|
|
32569
32569
|
};
|
|
32570
32570
|
};
|
|
32571
32571
|
as.fetch = O2(as.fetch, { retries: 5, retryDelay: 500 });
|
|
32572
|
-
const
|
|
32572
|
+
const HA = {
|
|
32573
|
+
aclContractAddress: "0xcA2E8f1F656CD25C01F05d0b243Ab1ecd4a8ffb6",
|
|
32574
|
+
kmsContractAddress: "0x77627828a55156b04Ac0DC0eb30467f1a552BB03",
|
|
32575
|
+
inputVerifierContractAddress: "0xCe0FC2e05CFff1B719EFF7169f7D80Af770c8EA2",
|
|
32576
|
+
verifyingContractAddressDecryption: "0x0f6024a97684f7d90ddb0fAAD79cB15F2C888D24",
|
|
32577
|
+
verifyingContractAddressInputVerification: "0xcB1bB072f38bdAF0F328CdEf1Fc6eDa1DF029287",
|
|
32578
|
+
chainId: 1,
|
|
32579
|
+
gatewayChainId: 261131,
|
|
32580
|
+
network: "https://ethereum-rpc.publicnode.com",
|
|
32581
|
+
relayerUrl: "https://relayer.mainnet.zama.org"
|
|
32582
|
+
};
|
|
32583
|
+
Object.freeze(HA);
|
|
32584
|
+
const JA = {
|
|
32573
32585
|
// ACL_CONTRACT_ADDRESS (FHEVM Host chain)
|
|
32574
32586
|
aclContractAddress: "0xf0Ffdc93b7E186bC2f8CB3dAA75D86d1930A433D",
|
|
32575
32587
|
// KMS_VERIFIER_CONTRACT_ADDRESS (FHEVM Host chain)
|
|
@@ -32588,7 +32600,7 @@ const WA = {
|
|
|
32588
32600
|
network: "https://ethereum-sepolia-rpc.publicnode.com",
|
|
32589
32601
|
// Relayer URL
|
|
32590
32602
|
relayerUrl: "https://relayer.testnet.zama.org"
|
|
32591
|
-
},
|
|
32603
|
+
}, $A = async (n) => {
|
|
32592
32604
|
const { verifyingContractAddressDecryption: t, verifyingContractAddressInputVerification: e, publicKey: r, kmsContractAddress: i, aclContractAddress: o, gatewayChainId: a, auth: u } = n;
|
|
32593
32605
|
if (!i || !qe(i))
|
|
32594
32606
|
throw new Error("KMS contract address is not valid or empty");
|
|
@@ -32605,7 +32617,7 @@ const WA = {
|
|
|
32605
32617
|
throw new Error("No network has been provided!");
|
|
32606
32618
|
const l = await fA(_, n), f = await lA(n), g = await hA(n), y = await pA(_, n), v = await dA(_, n), F = await wA(_, n), k = await gA(_, n);
|
|
32607
32619
|
return {
|
|
32608
|
-
createEncryptedInput: OA(o, e, l, a, Us(n.relayerUrl), f.publicKey, g, F, k),
|
|
32620
|
+
createEncryptedInput: OA(o, e, l, a, Us(n.relayerUrl), f.publicKey, g, F, k, u && { auth: u }),
|
|
32609
32621
|
generateKeypair: GA,
|
|
32610
32622
|
createEIP712: jA(t, l),
|
|
32611
32623
|
publicDecrypt: MA(y, v, a, t, o, Us(n.relayerUrl), _, u && { auth: u }),
|
|
@@ -32621,7 +32633,7 @@ const WA = {
|
|
|
32621
32633
|
};
|
|
32622
32634
|
};
|
|
32623
32635
|
let ud = !1;
|
|
32624
|
-
const
|
|
32636
|
+
const YA = async ({ tfheParams: n, kmsParams: t, thread: e } = {}) => (e == null && (e = navigator.hardwareConcurrency), await T2() || (console.warn(`This browser does not support threads. Verify that your server returns correct headers:
|
|
32625
32637
|
`, `'Cross-Origin-Opener-Policy': 'same-origin'
|
|
32626
32638
|
`, "'Cross-Origin-Embedder-Policy': 'require-corp'"), e = void 0), ud || (await io({ module_or_path: n }), await g_({
|
|
32627
32639
|
module_or_path: t
|
|
@@ -32649,11 +32661,12 @@ window.TKMS = {
|
|
|
32649
32661
|
};
|
|
32650
32662
|
export {
|
|
32651
32663
|
RA as ENCRYPTION_TYPES,
|
|
32652
|
-
|
|
32664
|
+
HA as MainnetConfig,
|
|
32665
|
+
JA as SepoliaConfig,
|
|
32653
32666
|
jA as createEIP712,
|
|
32654
|
-
|
|
32667
|
+
$A as createInstance,
|
|
32655
32668
|
GA as generateKeypair,
|
|
32656
|
-
|
|
32657
|
-
|
|
32658
|
-
|
|
32669
|
+
KA as getErrorCauseCode,
|
|
32670
|
+
WA as getErrorCauseStatus,
|
|
32671
|
+
YA as initSDK
|
|
32659
32672
|
};
|