@zendfi/sdk 0.8.1 → 0.8.2
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/dist/index.js +14 -6
- package/dist/index.mjs +14 -6
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2424,15 +2424,23 @@ async function encryptKeypairWithLit(keypair, options) {
|
|
|
2424
2424
|
console.log(`[Lit] Connected to ${network}`);
|
|
2425
2425
|
}
|
|
2426
2426
|
try {
|
|
2427
|
-
const
|
|
2427
|
+
const evmContractConditions = [
|
|
2428
2428
|
{
|
|
2429
2429
|
contractAddress: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
|
|
2430
2430
|
// USDC on Ethereum
|
|
2431
|
-
|
|
2431
|
+
functionName: "balanceOf",
|
|
2432
|
+
functionParams: [":userAddress"],
|
|
2433
|
+
functionAbi: {
|
|
2434
|
+
constant: true,
|
|
2435
|
+
inputs: [{ name: "account", type: "address" }],
|
|
2436
|
+
name: "balanceOf",
|
|
2437
|
+
outputs: [{ name: "", type: "uint256" }],
|
|
2438
|
+
stateMutability: "view",
|
|
2439
|
+
type: "function"
|
|
2440
|
+
},
|
|
2432
2441
|
chain: "ethereum",
|
|
2433
|
-
method: "balanceOf",
|
|
2434
|
-
parameters: [":userAddress"],
|
|
2435
2442
|
returnValueTest: {
|
|
2443
|
+
key: "",
|
|
2436
2444
|
comparator: ">=",
|
|
2437
2445
|
value: "0"
|
|
2438
2446
|
}
|
|
@@ -2440,10 +2448,10 @@ async function encryptKeypairWithLit(keypair, options) {
|
|
|
2440
2448
|
];
|
|
2441
2449
|
const dataToEncrypt = keypair.secretKey;
|
|
2442
2450
|
if (debug) {
|
|
2443
|
-
console.log("[Lit] Encrypting keypair bytes...");
|
|
2451
|
+
console.log("[Lit] Encrypting keypair bytes with evmContractConditions...");
|
|
2444
2452
|
}
|
|
2445
2453
|
const encryptResult = await litClient.encrypt({
|
|
2446
|
-
|
|
2454
|
+
evmContractConditions,
|
|
2447
2455
|
dataToEncrypt
|
|
2448
2456
|
});
|
|
2449
2457
|
if (debug) {
|
package/dist/index.mjs
CHANGED
|
@@ -1957,15 +1957,23 @@ async function encryptKeypairWithLit(keypair, options) {
|
|
|
1957
1957
|
console.log(`[Lit] Connected to ${network}`);
|
|
1958
1958
|
}
|
|
1959
1959
|
try {
|
|
1960
|
-
const
|
|
1960
|
+
const evmContractConditions = [
|
|
1961
1961
|
{
|
|
1962
1962
|
contractAddress: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
|
|
1963
1963
|
// USDC on Ethereum
|
|
1964
|
-
|
|
1964
|
+
functionName: "balanceOf",
|
|
1965
|
+
functionParams: [":userAddress"],
|
|
1966
|
+
functionAbi: {
|
|
1967
|
+
constant: true,
|
|
1968
|
+
inputs: [{ name: "account", type: "address" }],
|
|
1969
|
+
name: "balanceOf",
|
|
1970
|
+
outputs: [{ name: "", type: "uint256" }],
|
|
1971
|
+
stateMutability: "view",
|
|
1972
|
+
type: "function"
|
|
1973
|
+
},
|
|
1965
1974
|
chain: "ethereum",
|
|
1966
|
-
method: "balanceOf",
|
|
1967
|
-
parameters: [":userAddress"],
|
|
1968
1975
|
returnValueTest: {
|
|
1976
|
+
key: "",
|
|
1969
1977
|
comparator: ">=",
|
|
1970
1978
|
value: "0"
|
|
1971
1979
|
}
|
|
@@ -1973,10 +1981,10 @@ async function encryptKeypairWithLit(keypair, options) {
|
|
|
1973
1981
|
];
|
|
1974
1982
|
const dataToEncrypt = keypair.secretKey;
|
|
1975
1983
|
if (debug) {
|
|
1976
|
-
console.log("[Lit] Encrypting keypair bytes...");
|
|
1984
|
+
console.log("[Lit] Encrypting keypair bytes with evmContractConditions...");
|
|
1977
1985
|
}
|
|
1978
1986
|
const encryptResult = await litClient.encrypt({
|
|
1979
|
-
|
|
1987
|
+
evmContractConditions,
|
|
1980
1988
|
dataToEncrypt
|
|
1981
1989
|
});
|
|
1982
1990
|
if (debug) {
|