@hinkal/common 0.2.5 → 0.2.7
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/API/rewardsPointsCalls.cjs +1 -1
- package/API/rewardsPointsCalls.d.ts +3 -3
- package/API/rewardsPointsCalls.mjs +1 -3
- package/constants/deploy-data/deploy-data-optimism.json.cjs +1 -1
- package/constants/deploy-data/deploy-data-optimism.json.mjs +17 -21
- package/constants/server.constants.cjs +1 -1
- package/constants/server.constants.d.ts +3 -3
- package/constants/server.constants.mjs +1 -1
- package/data-structures/Hinkal/Hinkal.cjs +1 -1
- package/data-structures/Hinkal/Hinkal.d.ts +1 -0
- package/data-structures/Hinkal/Hinkal.mjs +30 -26
- package/data-structures/Hinkal/IHinkal.d.ts +1 -0
- package/data-structures/Hinkal/hinkalGetRecipientInfo.cjs +1 -0
- package/data-structures/Hinkal/hinkalGetRecipientInfo.d.ts +2 -0
- package/data-structures/Hinkal/hinkalGetRecipientInfo.mjs +25 -0
- package/data-structures/cacheDevices/LocalStorageCacheDevice.cjs +1 -1
- package/data-structures/cacheDevices/LocalStorageCacheDevice.d.ts +1 -1
- package/data-structures/cacheDevices/LocalStorageCacheDevice.mjs +2 -2
- package/data-structures/custom-token-registry/CustomTokenRegistry.cjs +1 -1
- package/data-structures/custom-token-registry/CustomTokenRegistry.mjs +18 -14
- package/functions/private-wallet/emporium.helpers.cjs +1 -1
- package/functions/private-wallet/emporium.helpers.d.ts +3 -8
- package/functions/private-wallet/emporium.helpers.mjs +11 -23
- package/functions/private-wallet/index.d.ts +0 -1
- package/functions/private-wallet/opProducer.cjs +1 -1
- package/functions/private-wallet/opProducer.mjs +1 -1
- package/functions/protocols/pendle.helpers.cjs +1 -1
- package/functions/protocols/pendle.helpers.mjs +14 -13
- package/functions/utils/cacheDevice.utils.cjs +1 -1
- package/functions/utils/cacheDevice.utils.mjs +8 -8
- package/functions/utils/string.utils.cjs +1 -1
- package/functions/utils/string.utils.d.ts +0 -1
- package/functions/utils/string.utils.mjs +6 -16
- package/index.cjs +1 -1
- package/index.mjs +226 -229
- package/package.json +1 -1
- package/providers/prepareEthersHinkal.cjs +1 -1
- package/providers/prepareEthersHinkal.mjs +3 -2
- package/providers/prepareWagmiHinkal.cjs +1 -1
- package/providers/prepareWagmiHinkal.mjs +3 -2
- package/types/ethereum-network.types.d.ts +0 -2
- package/types/hinkal.types.d.ts +0 -1
- package/types/rewards.types.d.ts +4 -0
- package/webworker/snarkjsWorker/snarkjsWorkerLauncher.cjs +1 -1
- package/webworker/snarkjsWorker/snarkjsWorkerLauncher.mjs +1 -1
- package/functions/private-wallet/smartContractWalletCalculator.cjs +0 -1
- package/functions/private-wallet/smartContractWalletCalculator.d.ts +0 -1
- package/functions/private-wallet/smartContractWalletCalculator.mjs +0 -20
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("ethers");require("circomlibjs-hinkal-fork");require("libsodium-wrappers");const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("ethers");require("circomlibjs-hinkal-fork");require("libsodium-wrappers");const t=require("../data-structures/Hinkal/Hinkal.cjs");require("../constants/chains.constants.cjs");require("../types/circom-data.types.cjs");require("../types/transactions.types.cjs");require("../types/curve.types.cjs");require("../constants/token-data/index.cjs");require("../data-structures/custom-token-registry/CustomTokenRegistry.cjs");require("../constants/vite.constants.cjs");require("axios");require("../constants/coingecko.constants.cjs");require("../constants/contracts.constants.cjs");require("../constants/kyc.constants.cjs");require("../constants/axelar.constants.cjs");require("../constants/rewards.constants.cjs");require("../constants/reorg-depths.constants.cjs");const q=require("../crypto/preProcessing.cjs");require("../functions/utils/external-action.utils.cjs");require("node-forge");require("../functions/web3/events/getShieldedBalance.cjs");require("../data-structures/volatile-helper/VolatileHelper.cjs");require("idb-keyval");const a=require("./EthersProviderAdapter.cjs"),n=async(i,u)=>{await q.preProcessing();const e=new t.Hinkal(u),r=a.default();return r.initSigner?.(i),await e.initProviderAdapter(void 0,r),await e.initUserKeys(),await e.resetMerkle(),e};exports.prepareEthersHinkal=n;
|
|
@@ -7,6 +7,7 @@ import "../types/circom-data.types.mjs";
|
|
|
7
7
|
import "../types/transactions.types.mjs";
|
|
8
8
|
import "../types/curve.types.mjs";
|
|
9
9
|
import "../constants/token-data/index.mjs";
|
|
10
|
+
import "../data-structures/custom-token-registry/CustomTokenRegistry.mjs";
|
|
10
11
|
import "../constants/vite.constants.mjs";
|
|
11
12
|
import "axios";
|
|
12
13
|
import "../constants/coingecko.constants.mjs";
|
|
@@ -22,11 +23,11 @@ import "../functions/web3/events/getShieldedBalance.mjs";
|
|
|
22
23
|
import "../data-structures/volatile-helper/VolatileHelper.mjs";
|
|
23
24
|
import "idb-keyval";
|
|
24
25
|
import e from "./EthersProviderAdapter.mjs";
|
|
25
|
-
const
|
|
26
|
+
const q = async (t, o) => {
|
|
26
27
|
await m();
|
|
27
28
|
const r = new p(o), i = e();
|
|
28
29
|
return i.initSigner?.(t), await r.initProviderAdapter(void 0, i), await r.initUserKeys(), await r.resetMerkle(), r;
|
|
29
30
|
};
|
|
30
31
|
export {
|
|
31
|
-
|
|
32
|
+
q as prepareEthersHinkal
|
|
32
33
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("ethers");require("circomlibjs-hinkal-fork");require("libsodium-wrappers");const a=require("../data-structures/Hinkal/Hinkal.cjs");require("../constants/chains.constants.cjs");require("../types/circom-data.types.cjs");require("../types/transactions.types.cjs");require("../types/curve.types.cjs");require("../constants/token-data/index.cjs");require("../constants/vite.constants.cjs");require("axios");require("../constants/coingecko.constants.cjs");require("../constants/contracts.constants.cjs");require("../constants/kyc.constants.cjs");require("../constants/axelar.constants.cjs");require("../constants/rewards.constants.cjs");require("../constants/reorg-depths.constants.cjs");const q=require("../crypto/preProcessing.cjs");require("../functions/utils/external-action.utils.cjs");require("node-forge");require("../functions/web3/events/getShieldedBalance.cjs");require("../data-structures/volatile-helper/VolatileHelper.cjs");require("idb-keyval");const r=require("./WagmiProviderAdapter.cjs"),t=async(i,u)=>{await q.preProcessing();const e=new a.Hinkal;return r.wagmiProviderAdapter.initConfig(u),await e.initProviderAdapter(i,r.wagmiProviderAdapter),await e.initUserKeys(),await e.resetMerkle(),e};exports.prepareWagmiHinkal=t;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("ethers");require("circomlibjs-hinkal-fork");require("libsodium-wrappers");const a=require("../data-structures/Hinkal/Hinkal.cjs");require("../constants/chains.constants.cjs");require("../types/circom-data.types.cjs");require("../types/transactions.types.cjs");require("../types/curve.types.cjs");require("../constants/token-data/index.cjs");require("../data-structures/custom-token-registry/CustomTokenRegistry.cjs");require("../constants/vite.constants.cjs");require("axios");require("../constants/coingecko.constants.cjs");require("../constants/contracts.constants.cjs");require("../constants/kyc.constants.cjs");require("../constants/axelar.constants.cjs");require("../constants/rewards.constants.cjs");require("../constants/reorg-depths.constants.cjs");const q=require("../crypto/preProcessing.cjs");require("../functions/utils/external-action.utils.cjs");require("node-forge");require("../functions/web3/events/getShieldedBalance.cjs");require("../data-structures/volatile-helper/VolatileHelper.cjs");require("idb-keyval");const r=require("./WagmiProviderAdapter.cjs"),t=async(i,u)=>{await q.preProcessing();const e=new a.Hinkal;return r.wagmiProviderAdapter.initConfig(u),await e.initProviderAdapter(i,r.wagmiProviderAdapter),await e.initUserKeys(),await e.resetMerkle(),e};exports.prepareWagmiHinkal=t;
|
|
@@ -7,6 +7,7 @@ import "../types/circom-data.types.mjs";
|
|
|
7
7
|
import "../types/transactions.types.mjs";
|
|
8
8
|
import "../types/curve.types.mjs";
|
|
9
9
|
import "../constants/token-data/index.mjs";
|
|
10
|
+
import "../data-structures/custom-token-registry/CustomTokenRegistry.mjs";
|
|
10
11
|
import "../constants/vite.constants.mjs";
|
|
11
12
|
import "axios";
|
|
12
13
|
import "../constants/coingecko.constants.mjs";
|
|
@@ -22,11 +23,11 @@ import "../functions/web3/events/getShieldedBalance.mjs";
|
|
|
22
23
|
import "../data-structures/volatile-helper/VolatileHelper.mjs";
|
|
23
24
|
import "idb-keyval";
|
|
24
25
|
import { wagmiProviderAdapter as r } from "./WagmiProviderAdapter.mjs";
|
|
25
|
-
const
|
|
26
|
+
const j = async (t, o) => {
|
|
26
27
|
await m();
|
|
27
28
|
const i = new p();
|
|
28
29
|
return r.initConfig(o), await i.initProviderAdapter(t, r), await i.initUserKeys(), await i.resetMerkle(), i;
|
|
29
30
|
};
|
|
30
31
|
export {
|
|
31
|
-
|
|
32
|
+
j as prepareWagmiHinkal
|
|
32
33
|
};
|
|
@@ -123,8 +123,6 @@ export interface ContractData {
|
|
|
123
123
|
hETHOracleAddress?: string;
|
|
124
124
|
HTokenOracleABI?: ContractInterface;
|
|
125
125
|
emporiumAddress?: string;
|
|
126
|
-
hinkalWalletFactoryAddress?: string;
|
|
127
|
-
hinkalWalletBeaconAddress?: string;
|
|
128
126
|
}
|
|
129
127
|
export interface EthereumNetwork {
|
|
130
128
|
name: string;
|
package/types/hinkal.types.d.ts
CHANGED
package/types/rewards.types.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=""+(typeof document>"u"?require("url").pathToFileURL(__dirname+"/../../assets/snarkjsWorkerLauncher-
|
|
1
|
+
"use strict";const e=""+(typeof document>"u"?require("url").pathToFileURL(__dirname+"/../../assets/snarkjsWorkerLauncher-DS9mXD9U.js").href:new URL("../../assets/snarkjsWorkerLauncher-DS9mXD9U.js",document.currentScript&&document.currentScript.src||document.baseURI).href);module.exports=e;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("ethers"),l=require("../../constants/chains.constants.cjs"),u=async(s,r,t)=>{const o=await new e.ethers.providers.JsonRpcProvider(l.networkRegistry[`${s}`].fetchRpcUrl).getCode(r),n=[t],i=["address"],a=e.utils.defaultAbiCoder.encode(i,n);return o+a.slice(2)},y=async(s,r)=>{const{hinkalWalletFactoryAddress:t,hinkalWalletBeaconAddress:c}=l.networkRegistry[s].contractData;if(!t||!c||!e.utils.isAddress(t))throw new Error(`Invalid deployer address ${t}`);const o=e.utils.hexlify(e.utils.zeroPad(e.utils.arrayify(r),32)),n=`0xff${t.slice(2)}`,i=await u(s,t,c),a=e.utils.keccak256(i),d=e.utils.keccak256(`${n}${o.slice(2)}${a.slice(2)}`);return e.utils.getAddress(`0x${d.slice(-40)}`)};exports.calculateSmartContractWalletAddress=y;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const calculateSmartContractWalletAddress: (chainId: number, salt: number) => Promise<string>;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { utils as e, ethers as f } from "ethers";
|
|
2
|
-
import { networkRegistry as l } from "../../constants/chains.constants.mjs";
|
|
3
|
-
const p = async (s, r, t) => {
|
|
4
|
-
const c = await new f.providers.JsonRpcProvider(l[`${s}`].fetchRpcUrl).getCode(r), d = [t], n = ["address"], a = e.defaultAbiCoder.encode(
|
|
5
|
-
n,
|
|
6
|
-
// Constructor argument types
|
|
7
|
-
d
|
|
8
|
-
// Constructor argument values
|
|
9
|
-
);
|
|
10
|
-
return c + a.slice(2);
|
|
11
|
-
}, C = async (s, r) => {
|
|
12
|
-
const { hinkalWalletFactoryAddress: t, hinkalWalletBeaconAddress: o } = l[s].contractData;
|
|
13
|
-
if (!t || !o || !e.isAddress(t))
|
|
14
|
-
throw new Error(`Invalid deployer address ${t}`);
|
|
15
|
-
const c = e.hexlify(e.zeroPad(e.arrayify(r), 32)), d = `0xff${t.slice(2)}`, n = await p(s, t, o), a = e.keccak256(n), i = e.keccak256(`${d}${c.slice(2)}${a.slice(2)}`);
|
|
16
|
-
return e.getAddress(`0x${i.slice(-40)}`);
|
|
17
|
-
};
|
|
18
|
-
export {
|
|
19
|
-
C as calculateSmartContractWalletAddress
|
|
20
|
-
};
|