@hinkal/common 0.1.62 → 0.1.64
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/data-structures/Hinkal/Hinkal.cjs +1 -1
- package/data-structures/Hinkal/Hinkal.d.ts +7 -5
- package/data-structures/Hinkal/Hinkal.mjs +22 -17
- package/data-structures/Hinkal/IHinkal.d.ts +5 -3
- package/data-structures/cacheDevices/BaseCacheDevice.cjs +1 -0
- package/data-structures/cacheDevices/BaseCacheDevice.d.ts +8 -0
- package/data-structures/cacheDevices/BaseCacheDevice.mjs +12 -0
- package/data-structures/cacheDevices/FileCacheDevice.cjs +1 -0
- package/data-structures/cacheDevices/FileCacheDevice.d.ts +8 -0
- package/data-structures/cacheDevices/FileCacheDevice.mjs +36 -0
- package/data-structures/cacheDevices/LocalStorageCacheDevice.cjs +1 -0
- package/data-structures/cacheDevices/LocalStorageCacheDevice.d.ts +7 -0
- package/data-structures/cacheDevices/LocalStorageCacheDevice.mjs +16 -0
- package/data-structures/cacheDevices/index.d.ts +2 -0
- package/data-structures/index.d.ts +1 -0
- package/functions/utils/cacheDevice.utils.cjs +1 -0
- package/functions/utils/cacheDevice.utils.d.ts +2 -0
- package/functions/utils/cacheDevice.utils.mjs +20 -0
- package/functions/utils/cacheFunctions.cjs +1 -1
- package/functions/utils/cacheFunctions.d.ts +4 -3
- package/functions/utils/cacheFunctions.mjs +31 -33
- package/functions/utils/index.d.ts +1 -0
- package/index.cjs +1 -1
- package/index.mjs +387 -380
- package/package.json +1 -1
- package/providers/prepareEthersHinkal.cjs +1 -1
- package/providers/prepareEthersHinkal.d.ts +3 -2
- package/providers/prepareEthersHinkal.mjs +6 -6
- package/providers/prepareWagmiv1Hinkal.cjs +1 -1
- package/providers/prepareWagmiv1Hinkal.d.ts +2 -1
- package/providers/prepareWagmiv1Hinkal.mjs +8 -8
- package/types/ICacheDevice.d.ts +4 -0
- package/types/hinkal.types.d.ts +10 -0
- package/types/index.d.ts +1 -0
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 u=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 q=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"),a=async(i,t)=>{await q.preProcessing();const e=new u.Hinkal(t);return r.ethersProvierAdapter.initSigner?.(i),await e.initProviderAdapter(void 0,r.ethersProvierAdapter),await e.initUserKeys(),await e.resetMerkle(),e};exports.prepareEthersHinkal=a;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
import { Signer } from 'ethers';
|
|
1
|
+
import { type Signer } from 'ethers';
|
|
2
2
|
import { Hinkal } from '../data-structures';
|
|
3
|
-
|
|
3
|
+
import { type HinkalConfig } from '../types/hinkal.types';
|
|
4
|
+
export declare const prepareEthersHinkal: (signer: Signer, hinkalConfig?: HinkalConfig) => Promise<Hinkal<unknown>>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "ethers";
|
|
2
2
|
import "circomlibjs-hinkal-fork";
|
|
3
3
|
import "libsodium-wrappers";
|
|
4
|
-
import { Hinkal as
|
|
4
|
+
import { Hinkal as p } from "../data-structures/Hinkal/Hinkal.mjs";
|
|
5
5
|
import "../constants/chains.constants.mjs";
|
|
6
6
|
import "../types/circom-data.types.mjs";
|
|
7
7
|
import "../types/transactions.types.mjs";
|
|
@@ -15,17 +15,17 @@ import "../constants/kyc.constants.mjs";
|
|
|
15
15
|
import "../constants/axelar.constants.mjs";
|
|
16
16
|
import "../constants/rewards.constants.mjs";
|
|
17
17
|
import "../constants/reorg-depths.constants.mjs";
|
|
18
|
-
import { preProcessing as
|
|
18
|
+
import { preProcessing as m } from "../crypto/preProcessing.mjs";
|
|
19
19
|
import "../functions/utils/external-action.utils.mjs";
|
|
20
20
|
import "../functions/web3/events/getShieldedBalance.mjs";
|
|
21
21
|
import "../data-structures/volatile-helper/VolatileHelper.mjs";
|
|
22
22
|
import "idb-keyval";
|
|
23
23
|
import { ethersProvierAdapter as i } from "./EthersProviderAdapter.mjs";
|
|
24
|
-
const
|
|
25
|
-
await
|
|
26
|
-
const r = new o
|
|
24
|
+
const U = async (t, o) => {
|
|
25
|
+
await m();
|
|
26
|
+
const r = new p(o);
|
|
27
27
|
return i.initSigner?.(t), await r.initProviderAdapter(void 0, i), await r.initUserKeys(), await r.resetMerkle(), r;
|
|
28
28
|
};
|
|
29
29
|
export {
|
|
30
|
-
|
|
30
|
+
U as prepareEthersHinkal
|
|
31
31
|
};
|
|
@@ -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 u=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 a=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 t=require("./Wagmiv1ProviderAdapter.cjs"),q=async(r,i)=>{await a.preProcessing();const e=new u.Hinkal(i);return await e.initProviderAdapter(r,t.wagmiv1ProvierAdapter),await e.initUserKeys(),await e.resetMerkle(),e};exports.prepareWagmiv1EthersHinkal=q;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { Hinkal } from '../data-structures';
|
|
2
2
|
import { type Connector } from 'wagmi';
|
|
3
|
-
|
|
3
|
+
import { type HinkalConfig } from '../types/hinkal.types';
|
|
4
|
+
export declare const prepareWagmiv1EthersHinkal: (connector: Connector, hinkalConfig?: HinkalConfig) => Promise<Hinkal<Connector>>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "ethers";
|
|
2
2
|
import "circomlibjs-hinkal-fork";
|
|
3
3
|
import "libsodium-wrappers";
|
|
4
|
-
import { Hinkal as
|
|
4
|
+
import { Hinkal as o } from "../data-structures/Hinkal/Hinkal.mjs";
|
|
5
5
|
import "../constants/chains.constants.mjs";
|
|
6
6
|
import "../types/circom-data.types.mjs";
|
|
7
7
|
import "../types/transactions.types.mjs";
|
|
@@ -15,17 +15,17 @@ import "../constants/kyc.constants.mjs";
|
|
|
15
15
|
import "../constants/axelar.constants.mjs";
|
|
16
16
|
import "../constants/rewards.constants.mjs";
|
|
17
17
|
import "../constants/reorg-depths.constants.mjs";
|
|
18
|
-
import { preProcessing as
|
|
18
|
+
import { preProcessing as p } from "../crypto/preProcessing.mjs";
|
|
19
19
|
import "../functions/utils/external-action.utils.mjs";
|
|
20
20
|
import "../functions/web3/events/getShieldedBalance.mjs";
|
|
21
21
|
import "../data-structures/volatile-helper/VolatileHelper.mjs";
|
|
22
22
|
import "idb-keyval";
|
|
23
|
-
import { wagmiv1ProvierAdapter as
|
|
24
|
-
const W = async (i) => {
|
|
25
|
-
await
|
|
26
|
-
const r = new t
|
|
27
|
-
return await r.initProviderAdapter(i,
|
|
23
|
+
import { wagmiv1ProvierAdapter as m } from "./Wagmiv1ProviderAdapter.mjs";
|
|
24
|
+
const W = async (i, t) => {
|
|
25
|
+
await p();
|
|
26
|
+
const r = new o(t);
|
|
27
|
+
return await r.initProviderAdapter(i, m), await r.initUserKeys(), await r.resetMerkle(), r;
|
|
28
28
|
};
|
|
29
29
|
export {
|
|
30
|
-
W as
|
|
30
|
+
W as prepareWagmiv1EthersHinkal
|
|
31
31
|
};
|
package/types/hinkal.types.d.ts
CHANGED
|
@@ -1,4 +1,14 @@
|
|
|
1
1
|
import { ExternalActionId } from './external-action.types';
|
|
2
|
+
/**
|
|
3
|
+
* Configuration options for the Hinkal system.
|
|
4
|
+
*/
|
|
5
|
+
export type HinkalConfig = {
|
|
6
|
+
/**
|
|
7
|
+
* Path to the cache file used for storing temporary data.
|
|
8
|
+
* It should be a valid file path string.
|
|
9
|
+
*/
|
|
10
|
+
cacheFilePath?: string;
|
|
11
|
+
};
|
|
2
12
|
export declare enum EventType {
|
|
3
13
|
BalanceChange = "BalanceChange",
|
|
4
14
|
NetworkChange = "NetworkChange",
|