@hinkal/common 0.1.4 → 0.1.6
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/functions/protocols/pendle.helpers.cjs +1 -1
- package/functions/protocols/pendle.helpers.mjs +11 -10
- package/functions/utils/cacheFunctions.cjs +1 -1
- package/functions/utils/cacheFunctions.mjs +1 -1
- package/package.json +5 -4
- package/providers/Wagmiv1ProviderAdapter.d.ts +1 -1
- package/providers/prepareEthersHinkal.cjs +1 -1
- package/providers/prepareEthersHinkal.mjs +3 -2
- package/providers/prepareWagmiv1Hinkal.cjs +1 -1
- package/providers/prepareWagmiv1Hinkal.d.ts +1 -1
- package/providers/prepareWagmiv1Hinkal.mjs +3 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../../constants/chains.constants.cjs");require("../../constants/vite.constants.cjs");require("../../constants/contracts.constants.cjs");require("../../constants/kyc.constants.cjs");const o=require("../../constants/server.constants.cjs");require("../../constants/coingecko.constants.cjs");require("../../constants/axelar.constants.cjs");require("../../constants/rewards.constants.cjs");require("../../constants/reorg-depths.constants.cjs");const i=require("../utils/caseInsensitive.utils.cjs");require("../../types/circom-data.types.cjs");const s=require("../../types/hinkal.types.cjs");require("../../types/transactions.types.cjs");const n=require("../../types/pendle.types.cjs");require("../../types/curve.types.cjs");require("ethers");require("circomlibjs");require("../../data-structures/crypto-keys/keys.cjs");require("../utils/external-action.utils.cjs");const c=require("../utils/erc20tokenFunctions.cjs");require("../utils/convertIntegrationProviderToExternalActionId.cjs");require("axios");require("../utils/userAgent.cjs");require("../../data-structures/custom-token-registry/CustomTokenRegistry.cjs");require("../../data-structures/volatile-helper/VolatileHelper.cjs");const T=require("../utils/enum.utils.cjs");function P(e){if(!e)return;const r=c.getERC20Token(e.address,e.chainId);if(!r?.isVolatile)return r?.symbol.toLowerCase()==="weth"&&console.log("token:",r),r}function w(e,r){if(!e||!r)return;let t;switch(r){case n.PendleAssetType.YT:t=e?.yt;break;case n.PendleAssetType.PT:t=e?.pt;break;case n.PendleAssetType.PENDLE_LP:t=e?.lp;break;case n.PendleAssetType.SY:t=e?.sy;break;default:t=void 0;break}return t}const F=(e,r,t)=>{if(i.caseInsensitiveEqual(e.yt.address,t.erc20TokenAddress))return n.PendleSwapType.SwapExactTokenForYt;if(i.caseInsensitiveEqual(e.pt.address,t.erc20TokenAddress))return n.PendleSwapType.SwapExactTokenForPt;if(i.caseInsensitiveEqual(e.yt.address,r.erc20TokenAddress))return n.PendleSwapType.SwapExactYtForToken;if(i.caseInsensitiveEqual(e.pt.address,r.erc20TokenAddress))return n.PendleSwapType.SwapExactPtForToken},k=e=>{let r;switch(e){case n.PendleSwapType.SwapExactTokenForYt:r=o.API_CONFIG.ROUTES.pendleSwapExactTokenForYT;break;case n.PendleSwapType.SwapExactTokenForPt:r=o.API_CONFIG.ROUTES.pendleSwapExactTokenForPt;break;case n.PendleSwapType.SwapExactYtForToken:r=o.API_CONFIG.ROUTES.pendleSwapExactYtForToken;break;case n.PendleSwapType.SwapExactPtForToken:r=o.API_CONFIG.ROUTES.pendleSwapExactPtForToken;break;default:throw new Error("Cant determine Pendle Swap Type Api Route")}return r},q=(e,r,t,a)=>{if(!T.isInEnum(s.PendleAction,e))throw new Error("getTokenIndexForPendleFlatFee: Invalid Pendle Action");if(a)return t.findIndex(d=>d.toLowerCase()===a?.toLowerCase());const l=r.findIndex(d=>d>0n),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../../constants/chains.constants.cjs");require("../../constants/vite.constants.cjs");require("../../constants/contracts.constants.cjs");require("../../constants/kyc.constants.cjs");const o=require("../../constants/server.constants.cjs");require("../../constants/coingecko.constants.cjs");require("../../constants/axelar.constants.cjs");require("../../constants/rewards.constants.cjs");require("../../constants/reorg-depths.constants.cjs");const i=require("../utils/caseInsensitive.utils.cjs");require("../../types/circom-data.types.cjs");const s=require("../../types/hinkal.types.cjs");require("../../types/transactions.types.cjs");const n=require("../../types/pendle.types.cjs");require("../../types/curve.types.cjs");require("ethers");require("circomlibjs");require("../../data-structures/crypto-keys/keys.cjs");require("idb-keyval");require("../utils/external-action.utils.cjs");const c=require("../utils/erc20tokenFunctions.cjs");require("../utils/convertIntegrationProviderToExternalActionId.cjs");require("axios");require("../utils/userAgent.cjs");require("../../data-structures/custom-token-registry/CustomTokenRegistry.cjs");require("../../data-structures/volatile-helper/VolatileHelper.cjs");const T=require("../utils/enum.utils.cjs");function P(e){if(!e)return;const r=c.getERC20Token(e.address,e.chainId);if(!r?.isVolatile)return r?.symbol.toLowerCase()==="weth"&&console.log("token:",r),r}function w(e,r){if(!e||!r)return;let t;switch(r){case n.PendleAssetType.YT:t=e?.yt;break;case n.PendleAssetType.PT:t=e?.pt;break;case n.PendleAssetType.PENDLE_LP:t=e?.lp;break;case n.PendleAssetType.SY:t=e?.sy;break;default:t=void 0;break}return t}const F=(e,r,t)=>{if(i.caseInsensitiveEqual(e.yt.address,t.erc20TokenAddress))return n.PendleSwapType.SwapExactTokenForYt;if(i.caseInsensitiveEqual(e.pt.address,t.erc20TokenAddress))return n.PendleSwapType.SwapExactTokenForPt;if(i.caseInsensitiveEqual(e.yt.address,r.erc20TokenAddress))return n.PendleSwapType.SwapExactYtForToken;if(i.caseInsensitiveEqual(e.pt.address,r.erc20TokenAddress))return n.PendleSwapType.SwapExactPtForToken},k=e=>{let r;switch(e){case n.PendleSwapType.SwapExactTokenForYt:r=o.API_CONFIG.ROUTES.pendleSwapExactTokenForYT;break;case n.PendleSwapType.SwapExactTokenForPt:r=o.API_CONFIG.ROUTES.pendleSwapExactTokenForPt;break;case n.PendleSwapType.SwapExactYtForToken:r=o.API_CONFIG.ROUTES.pendleSwapExactYtForToken;break;case n.PendleSwapType.SwapExactPtForToken:r=o.API_CONFIG.ROUTES.pendleSwapExactPtForToken;break;default:throw new Error("Cant determine Pendle Swap Type Api Route")}return r},q=(e,r,t,a)=>{if(!T.isInEnum(s.PendleAction,e))throw new Error("getTokenIndexForPendleFlatFee: Invalid Pendle Action");if(a)return t.findIndex(d=>d.toLowerCase()===a?.toLowerCase());const l=r.findIndex(d=>d>0n),p=r.length-1;if(r[p]<=0n)throw new Error("getTokenIndexForPendleFlatFee: Last token in amountChange is not > 0");let u=l;return(e===s.PendleAction.Mint||e===s.PendleAction.Redeem||e===s.PendleAction.PoolRemove)&&(u=l),u};exports.determinePendleSwapType=F;exports.determinePendleSwapTypeApiRoute=k;exports.erc20TokenFromPendleAsset=P;exports.getAssetTypeFromPendleMarket=w;exports.getTokenIndexForPendleFlatFee=q;
|
|
@@ -16,6 +16,7 @@ import "../../types/curve.types.mjs";
|
|
|
16
16
|
import "ethers";
|
|
17
17
|
import "circomlibjs";
|
|
18
18
|
import "../../data-structures/crypto-keys/keys.mjs";
|
|
19
|
+
import "idb-keyval";
|
|
19
20
|
import "../utils/external-action.utils.mjs";
|
|
20
21
|
import { getERC20Token as T } from "../utils/erc20tokenFunctions.mjs";
|
|
21
22
|
import "../utils/convertIntegrationProviderToExternalActionId.mjs";
|
|
@@ -24,14 +25,14 @@ import "../utils/userAgent.mjs";
|
|
|
24
25
|
import "../../data-structures/custom-token-registry/CustomTokenRegistry.mjs";
|
|
25
26
|
import "../../data-structures/volatile-helper/VolatileHelper.mjs";
|
|
26
27
|
import { isInEnum as w } from "../utils/enum.utils.mjs";
|
|
27
|
-
function
|
|
28
|
+
function V(e) {
|
|
28
29
|
if (!e)
|
|
29
30
|
return;
|
|
30
31
|
const r = T(e.address, e.chainId);
|
|
31
32
|
if (!r?.isVolatile)
|
|
32
33
|
return r?.symbol.toLowerCase() === "weth" && console.log("token:", r), r;
|
|
33
34
|
}
|
|
34
|
-
function
|
|
35
|
+
function j(e, r) {
|
|
35
36
|
if (!e || !r)
|
|
36
37
|
return;
|
|
37
38
|
let o;
|
|
@@ -54,7 +55,7 @@ function V(e, r) {
|
|
|
54
55
|
}
|
|
55
56
|
return o;
|
|
56
57
|
}
|
|
57
|
-
const
|
|
58
|
+
const z = (e, r, o) => {
|
|
58
59
|
if (i(e.yt.address, o.erc20TokenAddress))
|
|
59
60
|
return t.SwapExactTokenForYt;
|
|
60
61
|
if (i(e.pt.address, o.erc20TokenAddress))
|
|
@@ -63,7 +64,7 @@ const j = (e, r, o) => {
|
|
|
63
64
|
return t.SwapExactYtForToken;
|
|
64
65
|
if (i(e.pt.address, r.erc20TokenAddress))
|
|
65
66
|
return t.SwapExactPtForToken;
|
|
66
|
-
},
|
|
67
|
+
}, H = (e) => {
|
|
67
68
|
let r;
|
|
68
69
|
switch (e) {
|
|
69
70
|
case t.SwapExactTokenForYt:
|
|
@@ -82,7 +83,7 @@ const j = (e, r, o) => {
|
|
|
82
83
|
throw new Error("Cant determine Pendle Swap Type Api Route");
|
|
83
84
|
}
|
|
84
85
|
return r;
|
|
85
|
-
},
|
|
86
|
+
}, J = (e, r, o, s) => {
|
|
86
87
|
if (!w(p, e))
|
|
87
88
|
throw new Error("getTokenIndexForPendleFlatFee: Invalid Pendle Action");
|
|
88
89
|
if (s)
|
|
@@ -96,9 +97,9 @@ const j = (e, r, o) => {
|
|
|
96
97
|
return (e === p.Mint || e === p.Redeem || e === p.PoolRemove) && (c = l), c;
|
|
97
98
|
};
|
|
98
99
|
export {
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
100
|
+
z as determinePendleSwapType,
|
|
101
|
+
H as determinePendleSwapTypeApiRoute,
|
|
102
|
+
V as erc20TokenFromPendleAsset,
|
|
103
|
+
j as getAssetTypeFromPendleMarket,
|
|
104
|
+
J as getTokenIndexForPendleFlatFee
|
|
104
105
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("../../error-handling/logError.cjs"),C=require("./getDataFromTransaction.cjs"),S=require("idb-keyval"),u={encryptedOutputs:[],lastOutput:""},h=(e,t)=>{const r=e.substring(0,25),s=t.substring(0,25);return{shortPublicKey:r,shortHinkalAddress:s}},d=new Map,T=(e,t,r)=>{if(!e||!t||!r)throw Error("GetHinkalCache: incorrect arguments");const{shortPublicKey:s,shortHinkalAddress:a}=h(t,r);return JSON.parse(typeof localStorage<"u"?localStorage.getItem(`hinkalCache-${e}-${s}-${a}`)??JSON.stringify(u):d.get(`hinkalCache-${e}-${s}-${a}`)??JSON.stringify(u))},f=(e,t,r,s)=>{if(!t||!r||!s)throw Error("SetHinkalCache: incorrect arguments");const{shortPublicKey:a,shortHinkalAddress:o}=h(r,s);typeof localStorage<"u"?localStorage.setItem(`hinkalCache-${t}-${a}-${o}`,JSON.stringify(e)):d.set(`hinkalCache-${t}-${a}-${o}`,JSON.stringify(e))},H=(e,t,r)=>{f(u,e,t,r)},x=(e,t,r)=>`txsCache-${e}-${t}-${r}`,m=async(e,t,r,s,a)=>{if(!t||!r||!s)throw Error("saveTxsCache: incorrect arguments");const{shortPublicKey:o,shortHinkalAddress:c}=h(r,s),l=C.serializeDecodedTxs(e);y.logError("saveTxsCache before saving",{serializedTxs:l});const n=x(t,o,c),i=JSON.stringify({serializedTxs:l,lastHash:a});try{await S.set(n,i)}catch{localStorage.setItem(n,i)}},$={serializedTxs:[],lastHash:""},k=async(e,t,r)=>{if(!e||!t||!r)throw Error("loadTxsCache: incorrect arguments");const{shortPublicKey:s,shortHinkalAddress:a}=h(t,r),o=x(e,s,a);let c;try{const g=await S.get(o);if(!g)throw new Error("Empty indexedDB cache");c=g}catch{c=localStorage.getItem(o)}const{serializedTxs:l,lastHash:n}=JSON.parse(c??JSON.stringify($)),i=l.map(g=>C.deserializeDecodedTxs(g));return y.logError("loadTxsCache ",{decodedTxs:i,lastHash:n}),{decodedTxs:i,lastHash:n===""?void 0:n}};exports.getHinkalCache=T;exports.loadTxsCache=k;exports.resetCache=H;exports.saveTxsCache=m;exports.setHinkalCache=f;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { logError as f } from "../../error-handling/logError.mjs";
|
|
2
2
|
import { serializeDecodedTxs as m, deserializeDecodedTxs as S } from "./getDataFromTransaction.mjs";
|
|
3
|
-
import { set as p, get as x } from "
|
|
3
|
+
import { set as p, get as x } from "idb-keyval";
|
|
4
4
|
const y = {
|
|
5
5
|
encryptedOutputs: [],
|
|
6
6
|
lastOutput: ""
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hinkal/common",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.6",
|
|
4
4
|
"homepage": "hinkal.pro",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Hinkal Protocol"
|
|
@@ -28,9 +28,9 @@
|
|
|
28
28
|
"import": "./providers/prepareEthersHinkal.mjs",
|
|
29
29
|
"require": "./providers/prepareEthersHinkal.cjs"
|
|
30
30
|
},
|
|
31
|
-
"./providers/
|
|
32
|
-
"import": "./providers/
|
|
33
|
-
"require": "./providers/
|
|
31
|
+
"./providers/prepareWagmiv1Hinkal": {
|
|
32
|
+
"import": "./providers/prepareWagmiv1Hinkal.mjs",
|
|
33
|
+
"require": "./providers/prepareWagmiv1Hinkal.cjs"
|
|
34
34
|
}
|
|
35
35
|
},
|
|
36
36
|
"scripts": {
|
|
@@ -53,6 +53,7 @@
|
|
|
53
53
|
"circomlibjs": "^0.1.7",
|
|
54
54
|
"dotenv": "^16.4.5",
|
|
55
55
|
"ethers": "5.5.1",
|
|
56
|
+
"idb-keyval": "6.2.1",
|
|
56
57
|
"snarkjs": "0.7.5",
|
|
57
58
|
"libsodium-wrappers": "^0.7.10",
|
|
58
59
|
"ua-parser-js": "^1.0.37",
|
|
@@ -19,7 +19,7 @@ export declare class Wagmiv1ProviderAdapter implements IProviderAdapter<Connecto
|
|
|
19
19
|
signMessage(message: string): Promise<string>;
|
|
20
20
|
signTypedData(domain: ethers.TypedDataDomain, types: Record<string, ethers.TypedDataField[]>, value: Record<string, unknown>): Promise<string>;
|
|
21
21
|
getSelectedNetwork: () => EthereumNetwork | undefined;
|
|
22
|
-
switchNetwork(network: EthereumNetwork): Promise<import("
|
|
22
|
+
switchNetwork(network: EthereumNetwork): Promise<import("wagmi/actions").SwitchNetworkResult>;
|
|
23
23
|
private createFetchProvider;
|
|
24
24
|
getAddress(): Promise<string>;
|
|
25
25
|
setChainEventListener(chainEventListener: ChainEventListener): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("ethers");require("circomlibjs");require("../data-structures/crypto-keys/keys.cjs");require("../data-structures/crypto-keys/encryptDecryptUtxo.cjs");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("../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 u=require("../crypto/preProcessing.cjs");require("../functions/utils/external-action.utils.cjs");require("../functions/web3/events/getShieldedBalance.cjs");require("../data-structures/volatile-helper/VolatileHelper.cjs");const r=require("./EthersProviderAdapter.cjs"),q=async i=>{await u.preProcessing();const e=new t.Hinkal;return r.ethersProvierAdapter.initSigner?.(i),await e.initProviderAdapter(void 0,r.ethersProvierAdapter),await e.initUserKeys(),await e.resetMerkle(),e};exports.prepareEthersHinkal=q;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("ethers");require("circomlibjs");require("../data-structures/crypto-keys/keys.cjs");require("../data-structures/crypto-keys/encryptDecryptUtxo.cjs");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("../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 u=require("../crypto/preProcessing.cjs");require("../functions/utils/external-action.utils.cjs");require("../functions/web3/events/getShieldedBalance.cjs");require("../data-structures/volatile-helper/VolatileHelper.cjs");require("idb-keyval");const r=require("./EthersProviderAdapter.cjs"),q=async i=>{await u.preProcessing();const e=new t.Hinkal;return r.ethersProvierAdapter.initSigner?.(i),await e.initProviderAdapter(void 0,r.ethersProvierAdapter),await e.initUserKeys(),await e.resetMerkle(),e};exports.prepareEthersHinkal=q;
|
|
@@ -20,12 +20,13 @@ import { preProcessing as p } from "../crypto/preProcessing.mjs";
|
|
|
20
20
|
import "../functions/utils/external-action.utils.mjs";
|
|
21
21
|
import "../functions/web3/events/getShieldedBalance.mjs";
|
|
22
22
|
import "../data-structures/volatile-helper/VolatileHelper.mjs";
|
|
23
|
+
import "idb-keyval";
|
|
23
24
|
import { ethersProvierAdapter as i } from "./EthersProviderAdapter.mjs";
|
|
24
|
-
const
|
|
25
|
+
const U = async (t) => {
|
|
25
26
|
await p();
|
|
26
27
|
const r = new o();
|
|
27
28
|
return i.initSigner?.(t), await r.initProviderAdapter(void 0, i), await r.initUserKeys(), await r.resetMerkle(), r;
|
|
28
29
|
};
|
|
29
30
|
export {
|
|
30
|
-
|
|
31
|
+
U as prepareEthersHinkal
|
|
31
32
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("ethers");require("circomlibjs");require("../data-structures/crypto-keys/keys.cjs");require("../data-structures/crypto-keys/encryptDecryptUtxo.cjs");const i=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("../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 u=require("../crypto/preProcessing.cjs");require("../functions/utils/external-action.utils.cjs");require("../functions/web3/events/getShieldedBalance.cjs");require("../data-structures/volatile-helper/VolatileHelper.cjs");const a=require("./Wagmiv1ProviderAdapter.cjs"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("ethers");require("circomlibjs");require("../data-structures/crypto-keys/keys.cjs");require("../data-structures/crypto-keys/encryptDecryptUtxo.cjs");const i=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("../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 u=require("../crypto/preProcessing.cjs");require("../functions/utils/external-action.utils.cjs");require("../functions/web3/events/getShieldedBalance.cjs");require("../data-structures/volatile-helper/VolatileHelper.cjs");require("idb-keyval");const a=require("./Wagmiv1ProviderAdapter.cjs"),q=async r=>{await u.preProcessing();const e=new i.Hinkal;return await e.initProviderAdapter(r,a.wagmiv1ProvierAdapter),await e.initUserKeys(),await e.resetMerkle(),e};exports.prepareWagmiv1Hinkal=q;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { Hinkal } from '../data-structures';
|
|
2
2
|
import { type Connector } from 'wagmi';
|
|
3
|
-
export declare const
|
|
3
|
+
export declare const prepareWagmiv1Hinkal: (connector: Connector) => Promise<Hinkal<unknown>>;
|
|
@@ -20,12 +20,13 @@ import { preProcessing as o } from "../crypto/preProcessing.mjs";
|
|
|
20
20
|
import "../functions/utils/external-action.utils.mjs";
|
|
21
21
|
import "../functions/web3/events/getShieldedBalance.mjs";
|
|
22
22
|
import "../data-structures/volatile-helper/VolatileHelper.mjs";
|
|
23
|
+
import "idb-keyval";
|
|
23
24
|
import { wagmiv1ProvierAdapter as p } from "./Wagmiv1ProviderAdapter.mjs";
|
|
24
|
-
const
|
|
25
|
+
const b = async (i) => {
|
|
25
26
|
await o();
|
|
26
27
|
const r = new t();
|
|
27
28
|
return await r.initProviderAdapter(i, p), await r.initUserKeys(), await r.resetMerkle(), r;
|
|
28
29
|
};
|
|
29
30
|
export {
|
|
30
|
-
|
|
31
|
+
b as prepareWagmiv1Hinkal
|
|
31
32
|
};
|