h_test_1 0.0.18 → 0.0.19
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/resetMerkleTrees.cjs +1 -1
- package/data-structures/Hinkal/resetMerkleTrees.mjs +2 -3
- package/data-structures/event-service/evm/BlockchainEventEmitter.cjs +1 -1
- package/data-structures/event-service/evm/BlockchainEventEmitter.mjs +1 -1
- package/data-structures/snapshot/evm-snapshots/ClientAccessTokenSnapshotService.cjs +1 -1
- package/data-structures/snapshot/evm-snapshots/ClientAccessTokenSnapshotService.mjs +2 -3
- package/data-structures/snapshot/evm-snapshots/ClientApprovalsSnapshotService.cjs +1 -1
- package/data-structures/snapshot/evm-snapshots/ClientApprovalsSnapshotService.mjs +6 -7
- package/data-structures/snapshot/evm-snapshots/ClientCommitmentsSnapshotService.cjs +1 -1
- package/data-structures/snapshot/evm-snapshots/ClientCommitmentsSnapshotService.mjs +2 -3
- package/data-structures/snapshot/evm-snapshots/ClientNullifierSnapshotService.cjs +1 -1
- package/data-structures/snapshot/evm-snapshots/ClientNullifierSnapshotService.mjs +2 -3
- package/data-structures/snapshot/solana-snapshots/ClientSolanaAccessTokenSnapshotService.cjs +1 -1
- package/data-structures/snapshot/solana-snapshots/ClientSolanaAccessTokenSnapshotService.mjs +2 -3
- package/data-structures/snapshot/solana-snapshots/ClientSolanaCommitmentsSnapshotService.cjs +1 -1
- package/data-structures/snapshot/solana-snapshots/ClientSolanaCommitmentsSnapshotService.mjs +2 -3
- package/data-structures/snapshot/solana-snapshots/ClientSolanaNullifierSnapshotService.cjs +1 -1
- package/data-structures/snapshot/solana-snapshots/ClientSolanaNullifierSnapshotService.mjs +2 -3
- package/package.json +1 -1
- package/providers/prepareEthersHinkal.cjs +1 -1
- package/providers/prepareEthersHinkal.mjs +2 -3
- package/providers/prepareWagmiHinkal.cjs +1 -1
- package/providers/prepareWagmiHinkal.mjs +2 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const q=require("../../constants/chains.constants.cjs");require("../../types/circom-data.types.cjs");const u=require("../../types/ethereum-network.types.cjs");require("../../types/activities.types.cjs");const A=require("../../types/balances.types.cjs"),T=require("../../types/events.types.cjs");require("ethers");require("circomlibjs-hinkal-fork");require("libsodium-wrappers");require("process");require("buffer");require("../../constants/vite.constants.cjs");require("../../error-handling/error-codes.constants.cjs");require("../../constants/save-depths.cjs");require("../../constants/reorg-depths.constants.cjs");const g=require("../event-service/evm/ClientBlockchainEventEmitter.cjs");require("@coral-xyz/anchor");const P=require("../event-service/solana/ClientSolanaBlockchainEventEmitter.cjs"),k=require("@solana/web3.js");require("../crypto-keys/keys.cjs");const M=require("../../functions/web3/events/balanceChangedCustomHandler.cjs"),w=require("../snapshot/SnapshotFetcherService.cjs"),x=require("../snapshot/solana-snapshots/ClientSolanaCommitmentsSnapshotService.cjs"),b=require("../snapshot/solana-snapshots/ClientSolanaNullifierSnapshotService.cjs"),U=require("../snapshot/solana-snapshots/ClientSolanaAccessTokenSnapshotService.cjs"),_=require("../snapshot/evm-snapshots/ClientAccessTokenSnapshotService.cjs"),N=require("../snapshot/evm-snapshots/ClientCommitmentsSnapshotService.cjs"),O=require("../snapshot/evm-snapshots/ClientNullifierSnapshotService.cjs"),R=require("../snapshot/evm-snapshots/ClientApprovalsSnapshotService.cjs"),H=require("../../functions/utils/create-provider.cjs"),f=require("../../functions/utils/mutexes.utils.cjs"),L=require("../../functions/utils/getContractAddress.cjs"),W=async(t,E)=>{const m=E??t.getSupportedChains();m.forEach(e=>{t.commitmentsSnapshotServiceByChain[e]?.intervalClear(),t.nullifierSnapshotServiceByChain[e]?.intervalClear(),t.accessTokenSnapshotServiceByChain[e]?.intervalClear(),t.approvalsSnapshotServiceByChain[e]?.intervalClear()});const F=m.map(async e=>{const{maxPageSize:a,fetchRpcUrl:h,contractData:y}=q.networkRegistry[e];let r,c;if(q.isSolanaLike(e)){const n=y.hinkalAddress;if(!h||!n)throw new Error("Fetch RPC URL or Solana program ID is not set");const C=H.createCustomSolanaConnection(h),i=new k.PublicKey(n),s=f.getChainBalanceFetchingMutex(e);r=new P.ClientSolanaBlockchainEventEmitter(e,C,i,0,s,a);const B=y.hinkalIdl;B&&r.setIdl(B);const v=new w.SnapshotFetcherService(e,n);t.commitmentsSnapshotServiceByChain[e]=new x.ClientSolanaCommitmentsSnapshotService(r,v),t.nullifierSnapshotServiceByChain[e]=new b.ClientSolanaNullifierSnapshotService(r,v),t.accessTokenSnapshotServiceByChain[e]=new U.ClientSolanaAccessTokenSnapshotService(r,v),t.approvalsSnapshotServiceByChain[e]=void 0}else{const n=t.getContractWithFetcherByChainId(e,u.ContractType.HinkalContract),C=t.getContractWithFetcherByChainId(e,u.ContractType.DepositOnChainUtxos),i=f.getChainBalanceFetchingMutex(e);r=new g.ClientBlockchainEventEmitter(T.EventCategory.MainContractEvents,e,n,0,i,a,C),c=new g.ClientBlockchainEventEmitter(T.EventCategory.AccessTokenContractEvents,e,t.getContractWithFetcherByChainId(e,u.ContractType.AccessTokenContract),0,i,a);const s=new w.SnapshotFetcherService(e,L.getContractAddress(n));t.commitmentsSnapshotServiceByChain[e]=new N.ClientCommitmentsSnapshotService(r,s),t.nullifierSnapshotServiceByChain[e]=new O.ClientNullifierSnapshotService(r,s),t.accessTokenSnapshotServiceByChain[e]=new _.ClientAccessTokenSnapshotService(c,s),t.approvalsSnapshotServiceByChain[e]=new R.ClientApprovalsSnapshotService(r,s)}const o=t.commitmentsSnapshotServiceByChain[e],l=t.nullifierSnapshotServiceByChain[e],S=t.accessTokenSnapshotServiceByChain[e],p=t.approvalsSnapshotServiceByChain[e];if(!o||!l||!S)throw new Error(`Missing snapshot service for chain ${e}`);await Promise.all([o.init(),l.init(),S.init(),p?.init()]),await Promise.all([r.init(),c?.init()]),t.merkleTreeHinkalByChain[e]=o.merkleTree,t.merkleTreeAccessTokenByChain[e]=S.merkleTree,t.nullifiersByChain[e]=l.nullifiers,t.encryptedOutputsByChain[e]=o.encryptedOutputs,p&&(t.approvalsByChain[e]=p.approvals),r.onEventsProcessed=n=>{n>0&&M.balanceChangedCustomHandler({updateType:A.PrivateBalanceUpdateType.FreshWithoutLoader,updateTokensListBefore:!0,chainIdToUpdate:e})}});await Promise.allSettled(F)};exports.resetMerkleTrees=W;
|
|
@@ -13,7 +13,6 @@ import "../../constants/vite.constants.mjs";
|
|
|
13
13
|
import "../../error-handling/error-codes.constants.mjs";
|
|
14
14
|
import "../../constants/save-depths.mjs";
|
|
15
15
|
import "../../constants/reorg-depths.constants.mjs";
|
|
16
|
-
import "@hinkal/common/functions";
|
|
17
16
|
import { ClientBlockchainEventEmitter as T } from "../event-service/evm/ClientBlockchainEventEmitter.mjs";
|
|
18
17
|
import "@coral-xyz/anchor";
|
|
19
18
|
import { ClientSolanaBlockchainEventEmitter as M } from "../event-service/solana/ClientSolanaBlockchainEventEmitter.mjs";
|
|
@@ -31,7 +30,7 @@ import { ClientApprovalsSnapshotService as b } from "../snapshot/evm-snapshots/C
|
|
|
31
30
|
import { createCustomSolanaConnection as K } from "../../functions/utils/create-provider.mjs";
|
|
32
31
|
import { getChainBalanceFetchingMutex as g } from "../../functions/utils/mutexes.utils.mjs";
|
|
33
32
|
import { getContractAddress as N } from "../../functions/utils/getContractAddress.mjs";
|
|
34
|
-
const
|
|
33
|
+
const he = async (t, E) => {
|
|
35
34
|
const f = E ?? t.getSupportedChains();
|
|
36
35
|
f.forEach((e) => {
|
|
37
36
|
t.commitmentsSnapshotServiceByChain[e]?.intervalClear(), t.nullifierSnapshotServiceByChain[e]?.intervalClear(), t.accessTokenSnapshotServiceByChain[e]?.intervalClear(), t.approvalsSnapshotServiceByChain[e]?.intervalClear();
|
|
@@ -120,5 +119,5 @@ const ue = async (t, E) => {
|
|
|
120
119
|
await Promise.allSettled(F);
|
|
121
120
|
};
|
|
122
121
|
export {
|
|
123
|
-
|
|
122
|
+
he as resetMerkleTrees
|
|
124
123
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("ethers"),u=require("../../../constants/reorg-depths.constants.cjs"),v=require("../../../error-handling/logger.cjs"),c=require("../../../functions/utils/resolve-sync.utils.cjs"),g=require("../../BlockchainEvent/BlockchainEvent.cjs"),h=require("
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("ethers"),u=require("../../../constants/reorg-depths.constants.cjs"),v=require("../../../error-handling/logger.cjs"),c=require("../../../functions/utils/resolve-sync.utils.cjs"),g=require("../../BlockchainEvent/BlockchainEvent.cjs"),h=require("../../../functions/utils/getSignerFromContract.cjs");class d{RETRY_MIN_PAGE_SIZE=100;MAX_RETRIES=20;_chainId;contract;depositOnChainUtxosContract;_latestBlockNumber;_initialBlockNumber;onEventsProcessed;eventProcessors=new Set;maxPageSize;_isReady=!1;isServer;inProgress;eventsFetchingMutex;constructor(t,s,r,e,i,n,a){this.contract=s,this.depositOnChainUtxosContract=a,this._chainId=t,this._initialBlockNumber=r,this.maxPageSize=n,this.isServer=e,this.inProgress=!1,this.eventsFetchingMutex=i}get latestBlockNumber(){return this._latestBlockNumber??this._initialBlockNumber}get chainId(){return this._chainId}get isReady(){return this._isReady}syncFromAtMost(t){(this._latestBlockNumber===void 0||t<this._latestBlockNumber)&&(this._latestBlockNumber=t)}advanceLatestBlockNumber(t){const s=this._latestBlockNumber??this._initialBlockNumber;t>s&&(this._latestBlockNumber=t)}intervalClear(){this._isReady=!1,this.eventProcessors=new Set,this.clear()}async init(){if(this._isReady)throw new Error("Already initialized");this._isReady=!0,await this.retrieveEvents(this.latestBlockNumber+1),this.startUpdateListener()}requireReady(){if(!this._isReady)throw new Error("Not ready")}async getEventsForSingleContract(t,s,r,e=0){try{return(await t.queryFilter("*",s,r)).filter(i=>i instanceof l.ethers.EventLog)}catch(i){if(e<this.MAX_RETRIES&&r-s>this.RETRY_MIN_PAGE_SIZE){const n=Math.floor((s+r)/2),a=await this.getEventsForSingleContract(t,s,n,e+1),o=await this.getEventsForSingleContract(t,n+1,r,e+1);return[...a,...o]}throw i}}addEventProcessorFunction(t){if(this._isReady)throw new Error("Can't add event processor after event emitter initialized");this.eventProcessors.add(t)}async getEventsInRange(t,s){const r=[],e=c.getSequence(t,s,this.maxPageSize);await c.resolveSync(e.map(({from:n,to:a})=>async()=>{const o=await this.getEventsForSingleContract(this.contract,n,a);r.push(...o)}));const i=this.depositOnChainUtxosContract;return i&&await c.resolveSync(e.map(({from:n,to:a})=>async()=>{const o=await this.getEventsForSingleContract(i,n,a);r.push(...o)})),r.map(n=>g.BlockchainEvent.fromEthers(n))}async getLastBlockNumberForEventRequest(){const t=await h.getProviderFromContract(this.contract).getBlockNumber();if(!this.isServer)return t;const{chainId:s}=await h.getProviderFromContract(this.contract).getNetwork();return Math.max(this.latestBlockNumber,t-u.blockReorgDepth[Number(s)]+1)}async retrieveEvents(t,s=!1){return this.requireReady(),await this.eventsFetchingMutex.runExclusive(async()=>{try{if(this.inProgress&&!s)return!1;this.inProgress=!0;const e=await this.getLastBlockNumberForEventRequest();if(e<t)return this.inProgress=!1,!1;const i=await this.getEventsInRange(t,e);return await this.processEvents(i),this._latestBlockNumber=e,this.inProgress=!1,!0}catch(e){return v.Logger.error("retrieveEvents error",e),this.inProgress=!1,!1}})}async processEvents(t){const r=(await Promise.all([...this.eventProcessors].map(e=>e(t)))).reduce((e,i)=>e+i,0);this.onEventsProcessed?.(r)}}exports.BlockchainEventEmitter=d;
|
|
@@ -3,7 +3,7 @@ import { blockReorgDepth as u } from "../../../constants/reorg-depths.constants.
|
|
|
3
3
|
import { Logger as v } from "../../../error-handling/logger.mjs";
|
|
4
4
|
import { getSequence as d, resolveSync as c } from "../../../functions/utils/resolve-sync.utils.mjs";
|
|
5
5
|
import { BlockchainEvent as m } from "../../BlockchainEvent/BlockchainEvent.mjs";
|
|
6
|
-
import { getProviderFromContract as h } from "
|
|
6
|
+
import { getProviderFromContract as h } from "../../../functions/utils/getSignerFromContract.mjs";
|
|
7
7
|
class k {
|
|
8
8
|
RETRY_MIN_PAGE_SIZE = 100;
|
|
9
9
|
MAX_RETRIES = 20;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("../../../functions/utils/getContractAddress.cjs"),c=require("../../../functions/utils/getSignerFromContract.cjs"),i=require("../../event-service/evm/AbstractAccessTokenSnapshotService.cjs");require("ethers");require("circomlibjs-hinkal-fork");require("libsodium-wrappers");require("process");require("buffer");require("../../../constants/vite.constants.cjs");require("../../../error-handling/error-codes.constants.cjs");require("../../../constants/save-depths.cjs");require("../../../constants/reorg-depths.constants.cjs");require("../../../API/getServerURL.cjs");require("../../../constants/server.constants.cjs");require("../../http/HttpClient.cjs");require("axios");require("../../../constants/chains.constants.cjs");require("../../../API/enclaveUtxoCalls.cjs");require("@solana/web3.js");require("tronweb");require("@coral-xyz/anchor");require("../../crypto-keys/keys.cjs");const o=require("../SnapshotFetcherService.cjs");class a extends i.AbstractAccessTokenSnapshotService{snapshotsService;constructor(e,s){super(e),this.snapshotsService=s}async fetchSnapshot(){const{contract:e}=this.blockchainEventEmitter,{chainId:s}=await c.getProviderFromContract(e).getNetwork(),t=Number(s);this.snapshotsService||(this.snapshotsService=new o.SnapshotFetcherService(t,n.getContractAddress(e)));const r=await this.snapshotsService.getAccessTokens();if(r.accessTokenContractAddress!==n.getContractAddress(e)||r.chainId!==t)throw Error("Commitment Snapshot: incorrect contract or chain id");return{latestBlockNumber:r.latestBlockNumber,merkleTree:r.merkleTree,senderAddresses:r.senderAddresses,senderAddressIndexMap:r.senderAddressIndexMap}}persistSnapshot(e){return Promise.resolve()}}exports.ClientAccessTokenSnapshotService=a;
|
|
@@ -10,7 +10,6 @@ import "../../../constants/vite.constants.mjs";
|
|
|
10
10
|
import "../../../error-handling/error-codes.constants.mjs";
|
|
11
11
|
import "../../../constants/save-depths.mjs";
|
|
12
12
|
import "../../../constants/reorg-depths.constants.mjs";
|
|
13
|
-
import "@hinkal/common/functions";
|
|
14
13
|
import "../../../API/getServerURL.mjs";
|
|
15
14
|
import "../../../constants/server.constants.mjs";
|
|
16
15
|
import "../../http/HttpClient.mjs";
|
|
@@ -22,7 +21,7 @@ import "tronweb";
|
|
|
22
21
|
import "@coral-xyz/anchor";
|
|
23
22
|
import "../../crypto-keys/keys.mjs";
|
|
24
23
|
import { SnapshotFetcherService as c } from "../SnapshotFetcherService.mjs";
|
|
25
|
-
class
|
|
24
|
+
class P extends n {
|
|
26
25
|
snapshotsService;
|
|
27
26
|
constructor(t, r) {
|
|
28
27
|
super(t), this.snapshotsService = r;
|
|
@@ -45,5 +44,5 @@ class y extends n {
|
|
|
45
44
|
}
|
|
46
45
|
}
|
|
47
46
|
export {
|
|
48
|
-
|
|
47
|
+
P as ClientAccessTokenSnapshotService
|
|
49
48
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("ethers");require("circomlibjs-hinkal-fork");require("libsodium-wrappers");require("process");require("buffer");require("../../../constants/vite.constants.cjs");require("../../../error-handling/error-codes.constants.cjs");require("../../../constants/save-depths.cjs");const a=require("../../event-service/evm/AbstractApprovalsSnapshotService.cjs");require("../../../constants/reorg-depths.constants.cjs");require("
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("ethers");require("circomlibjs-hinkal-fork");require("libsodium-wrappers");require("process");require("buffer");require("../../../constants/vite.constants.cjs");require("../../../error-handling/error-codes.constants.cjs");require("../../../constants/save-depths.cjs");const a=require("../../event-service/evm/AbstractApprovalsSnapshotService.cjs");require("../../../constants/reorg-depths.constants.cjs");const i=require("../../../functions/utils/getSignerFromContract.cjs");require("../../../API/getServerURL.cjs");require("../../../constants/server.constants.cjs");require("../../http/HttpClient.cjs");require("axios");require("../../../constants/chains.constants.cjs");require("../../../API/enclaveUtxoCalls.cjs");require("@solana/web3.js");require("tronweb");require("@coral-xyz/anchor");require("../../crypto-keys/keys.cjs");const o=require("../../../functions/utils/getContractAddress.cjs");class n extends a.AbstractApprovalsSnapshotService{snapshotsService;constructor(r,t){super(r),this.snapshotsService=t}async fetchSnapshot(){const{contract:r}=this.blockchainEventEmitter,{chainId:t}=await i.getProviderFromContract(r).getNetwork(),s=Number(t),e=await this.snapshotsService.getApprovals();if(!e)return{latestBlockNumber:0,approvals:{},events:[]};if(e.hinkalAddress!==o.getContractAddress(r)||e.chainId!==s)throw Error("approvalsSnapshotData Snapshot: incorrect contract or chain id");return{latestBlockNumber:e.latestBlockNumber,approvals:e.approvals,events:e.events}}persistSnapshot(r){return Promise.resolve()}}exports.ClientApprovalsSnapshotService=n;
|
|
@@ -8,7 +8,7 @@ import "../../../error-handling/error-codes.constants.mjs";
|
|
|
8
8
|
import "../../../constants/save-depths.mjs";
|
|
9
9
|
import { AbstractApprovalsSnapshotService as p } from "../../event-service/evm/AbstractApprovalsSnapshotService.mjs";
|
|
10
10
|
import "../../../constants/reorg-depths.constants.mjs";
|
|
11
|
-
import "
|
|
11
|
+
import { getProviderFromContract as i } from "../../../functions/utils/getSignerFromContract.mjs";
|
|
12
12
|
import "../../../API/getServerURL.mjs";
|
|
13
13
|
import "../../../constants/server.constants.mjs";
|
|
14
14
|
import "../../http/HttpClient.mjs";
|
|
@@ -19,22 +19,21 @@ import "@solana/web3.js";
|
|
|
19
19
|
import "tronweb";
|
|
20
20
|
import "@coral-xyz/anchor";
|
|
21
21
|
import "../../crypto-keys/keys.mjs";
|
|
22
|
-
import { getContractAddress as
|
|
23
|
-
|
|
24
|
-
class y extends p {
|
|
22
|
+
import { getContractAddress as a } from "../../../functions/utils/getContractAddress.mjs";
|
|
23
|
+
class P extends p {
|
|
25
24
|
snapshotsService;
|
|
26
25
|
constructor(r, o) {
|
|
27
26
|
super(r), this.snapshotsService = o;
|
|
28
27
|
}
|
|
29
28
|
async fetchSnapshot() {
|
|
30
|
-
const { contract: r } = this.blockchainEventEmitter, { chainId: o } = await
|
|
29
|
+
const { contract: r } = this.blockchainEventEmitter, { chainId: o } = await i(r).getNetwork(), s = Number(o), t = await this.snapshotsService.getApprovals();
|
|
31
30
|
if (!t)
|
|
32
31
|
return {
|
|
33
32
|
latestBlockNumber: 0,
|
|
34
33
|
approvals: {},
|
|
35
34
|
events: []
|
|
36
35
|
};
|
|
37
|
-
if (t.hinkalAddress !==
|
|
36
|
+
if (t.hinkalAddress !== a(r) || t.chainId !== s)
|
|
38
37
|
throw Error("approvalsSnapshotData Snapshot: incorrect contract or chain id");
|
|
39
38
|
return {
|
|
40
39
|
latestBlockNumber: t.latestBlockNumber,
|
|
@@ -47,5 +46,5 @@ class y extends p {
|
|
|
47
46
|
}
|
|
48
47
|
}
|
|
49
48
|
export {
|
|
50
|
-
|
|
49
|
+
P as ClientApprovalsSnapshotService
|
|
51
50
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("ethers");require("circomlibjs-hinkal-fork");require("libsodium-wrappers");require("process");require("buffer");require("../../../constants/vite.constants.cjs");require("../../../error-handling/error-codes.constants.cjs");require("../../../constants/save-depths.cjs");const t=require("../../event-service/evm/AbstractCommitmentsSnapshotService.cjs");require("../../../constants/reorg-depths.constants.cjs");require("
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("ethers");require("circomlibjs-hinkal-fork");require("libsodium-wrappers");require("process");require("buffer");require("../../../constants/vite.constants.cjs");require("../../../error-handling/error-codes.constants.cjs");require("../../../constants/save-depths.cjs");const t=require("../../event-service/evm/AbstractCommitmentsSnapshotService.cjs");require("../../../constants/reorg-depths.constants.cjs");require("../../../API/getServerURL.cjs");require("../../../constants/server.constants.cjs");require("../../http/HttpClient.cjs");require("axios");require("../../../constants/chains.constants.cjs");require("../../../API/enclaveUtxoCalls.cjs");require("@solana/web3.js");require("tronweb");require("@coral-xyz/anchor");require("../../crypto-keys/keys.cjs");class s extends t.AbstractCommitmentsSnapshotService{snapshotsService;constructor(e,r){super(e),this.snapshotsService=r}async fetchSnapshot(){const e=await this.snapshotsService.getCommitments();return{latestBlockNumber:e.latestBlockNumber,merkleTree:e.merkleTree,encryptedOutputs:e.encryptedOutputs,encryptedOutputsByCommitment:e.encryptedOutputsByCommitment}}persistSnapshot(e){return Promise.resolve()}}exports.ClientCommitmentsSnapshotService=s;
|
|
@@ -8,7 +8,6 @@ import "../../../error-handling/error-codes.constants.mjs";
|
|
|
8
8
|
import "../../../constants/save-depths.mjs";
|
|
9
9
|
import { AbstractCommitmentsSnapshotService as r } from "../../event-service/evm/AbstractCommitmentsSnapshotService.mjs";
|
|
10
10
|
import "../../../constants/reorg-depths.constants.mjs";
|
|
11
|
-
import "@hinkal/common/functions";
|
|
12
11
|
import "../../../API/getServerURL.mjs";
|
|
13
12
|
import "../../../constants/server.constants.mjs";
|
|
14
13
|
import "../../http/HttpClient.mjs";
|
|
@@ -19,7 +18,7 @@ import "@solana/web3.js";
|
|
|
19
18
|
import "tronweb";
|
|
20
19
|
import "@coral-xyz/anchor";
|
|
21
20
|
import "../../crypto-keys/keys.mjs";
|
|
22
|
-
class
|
|
21
|
+
class x extends r {
|
|
23
22
|
snapshotsService;
|
|
24
23
|
constructor(t, e) {
|
|
25
24
|
super(t), this.snapshotsService = e;
|
|
@@ -38,5 +37,5 @@ class N extends r {
|
|
|
38
37
|
}
|
|
39
38
|
}
|
|
40
39
|
export {
|
|
41
|
-
|
|
40
|
+
x as ClientCommitmentsSnapshotService
|
|
42
41
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("ethers");require("circomlibjs-hinkal-fork");require("libsodium-wrappers");require("process");require("buffer");require("../../../constants/vite.constants.cjs");require("../../../error-handling/error-codes.constants.cjs");require("../../../constants/save-depths.cjs");const i=require("../../event-service/evm/AbstractNullifierSnapshotService.cjs");require("../../../constants/reorg-depths.constants.cjs");require("
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("ethers");require("circomlibjs-hinkal-fork");require("libsodium-wrappers");require("process");require("buffer");require("../../../constants/vite.constants.cjs");require("../../../error-handling/error-codes.constants.cjs");require("../../../constants/save-depths.cjs");const i=require("../../event-service/evm/AbstractNullifierSnapshotService.cjs");require("../../../constants/reorg-depths.constants.cjs");require("../../../API/getServerURL.cjs");require("../../../constants/server.constants.cjs");require("../../http/HttpClient.cjs");require("axios");require("../../../constants/chains.constants.cjs");require("../../../API/enclaveUtxoCalls.cjs");require("@solana/web3.js");require("tronweb");require("@coral-xyz/anchor");require("../../crypto-keys/keys.cjs");class s extends i.AbstractNullifierSnapshotService{snapshotsService;constructor(e,r){super(e),this.snapshotsService=r}async fetchSnapshot(){const e=await this.snapshotsService.getNullifiers();return{latestBlockNumber:e.latestBlockNumber,nullifiers:e.nullifiers}}persistSnapshot(e){return Promise.resolve()}}exports.ClientNullifierSnapshotService=s;
|
|
@@ -8,7 +8,6 @@ import "../../../error-handling/error-codes.constants.mjs";
|
|
|
8
8
|
import "../../../constants/save-depths.mjs";
|
|
9
9
|
import { AbstractNullifierSnapshotService as i } from "../../event-service/evm/AbstractNullifierSnapshotService.mjs";
|
|
10
10
|
import "../../../constants/reorg-depths.constants.mjs";
|
|
11
|
-
import "@hinkal/common/functions";
|
|
12
11
|
import "../../../API/getServerURL.mjs";
|
|
13
12
|
import "../../../constants/server.constants.mjs";
|
|
14
13
|
import "../../http/HttpClient.mjs";
|
|
@@ -19,7 +18,7 @@ import "@solana/web3.js";
|
|
|
19
18
|
import "tronweb";
|
|
20
19
|
import "@coral-xyz/anchor";
|
|
21
20
|
import "../../crypto-keys/keys.mjs";
|
|
22
|
-
class
|
|
21
|
+
class w extends i {
|
|
23
22
|
snapshotsService;
|
|
24
23
|
constructor(t, r) {
|
|
25
24
|
super(t), this.snapshotsService = r;
|
|
@@ -36,5 +35,5 @@ class y extends i {
|
|
|
36
35
|
}
|
|
37
36
|
}
|
|
38
37
|
export {
|
|
39
|
-
|
|
38
|
+
w as ClientNullifierSnapshotService
|
|
40
39
|
};
|
package/data-structures/snapshot/solana-snapshots/ClientSolanaAccessTokenSnapshotService.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("ethers");require("circomlibjs-hinkal-fork");require("libsodium-wrappers");require("process");require("buffer");require("../../../constants/vite.constants.cjs");require("../../../error-handling/error-codes.constants.cjs");require("../../../constants/save-depths.cjs");require("../../../constants/reorg-depths.constants.cjs");require("
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("ethers");require("circomlibjs-hinkal-fork");require("libsodium-wrappers");require("process");require("buffer");require("../../../constants/vite.constants.cjs");require("../../../error-handling/error-codes.constants.cjs");require("../../../constants/save-depths.cjs");require("../../../constants/reorg-depths.constants.cjs");require("../../../API/getServerURL.cjs");require("../../../constants/server.constants.cjs");require("../../http/HttpClient.cjs");require("axios");require("../../../constants/chains.constants.cjs");require("../../../API/enclaveUtxoCalls.cjs");require("@solana/web3.js");require("tronweb");require("@coral-xyz/anchor");require("../../crypto-keys/keys.cjs");const s=require("../../event-service/solana/AbstractSolanaAccessTokenSnapshotService.cjs"),t=require("../SnapshotFetcherService.cjs");class i extends s.AbstractSolanaAccessTokenSnapshotService{snapshotsService;constructor(r,e){super(r),this.snapshotsService=e}async fetchSnapshot(){const{chainId:r}=this.solanaBlockchainEventEmitter;this.snapshotsService||(this.snapshotsService=new t.SnapshotFetcherService(r,this.solanaBlockchainEventEmitter.programId.toString()));const e=await this.snapshotsService.getAccessTokens();return{latestBlockNumber:e.latestBlockNumber,merkleTree:e.merkleTree,senderAddresses:e.senderAddresses,senderAddressIndexMap:e.senderAddressIndexMap}}persistSnapshot(r){return Promise.resolve()}}exports.ClientSolanaAccessTokenSnapshotService=i;
|
package/data-structures/snapshot/solana-snapshots/ClientSolanaAccessTokenSnapshotService.mjs
CHANGED
|
@@ -7,7 +7,6 @@ import "../../../constants/vite.constants.mjs";
|
|
|
7
7
|
import "../../../error-handling/error-codes.constants.mjs";
|
|
8
8
|
import "../../../constants/save-depths.mjs";
|
|
9
9
|
import "../../../constants/reorg-depths.constants.mjs";
|
|
10
|
-
import "@hinkal/common/functions";
|
|
11
10
|
import "../../../API/getServerURL.mjs";
|
|
12
11
|
import "../../../constants/server.constants.mjs";
|
|
13
12
|
import "../../http/HttpClient.mjs";
|
|
@@ -20,7 +19,7 @@ import "@coral-xyz/anchor";
|
|
|
20
19
|
import "../../crypto-keys/keys.mjs";
|
|
21
20
|
import { AbstractSolanaAccessTokenSnapshotService as t } from "../../event-service/solana/AbstractSolanaAccessTokenSnapshotService.mjs";
|
|
22
21
|
import { SnapshotFetcherService as r } from "../SnapshotFetcherService.mjs";
|
|
23
|
-
class
|
|
22
|
+
class g extends t {
|
|
24
23
|
snapshotsService;
|
|
25
24
|
constructor(s, e) {
|
|
26
25
|
super(s), this.snapshotsService = e;
|
|
@@ -44,5 +43,5 @@ class w extends t {
|
|
|
44
43
|
}
|
|
45
44
|
}
|
|
46
45
|
export {
|
|
47
|
-
|
|
46
|
+
g as ClientSolanaAccessTokenSnapshotService
|
|
48
47
|
};
|
package/data-structures/snapshot/solana-snapshots/ClientSolanaCommitmentsSnapshotService.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("ethers");require("circomlibjs-hinkal-fork");require("libsodium-wrappers");require("process");require("buffer");require("../../../constants/vite.constants.cjs");require("../../../error-handling/error-codes.constants.cjs");require("../../../constants/save-depths.cjs");require("../../../constants/reorg-depths.constants.cjs");require("
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("ethers");require("circomlibjs-hinkal-fork");require("libsodium-wrappers");require("process");require("buffer");require("../../../constants/vite.constants.cjs");require("../../../error-handling/error-codes.constants.cjs");require("../../../constants/save-depths.cjs");require("../../../constants/reorg-depths.constants.cjs");require("../../../API/getServerURL.cjs");require("../../../constants/server.constants.cjs");require("../../http/HttpClient.cjs");require("axios");require("../../../constants/chains.constants.cjs");require("../../../API/enclaveUtxoCalls.cjs");require("@solana/web3.js");require("tronweb");require("@coral-xyz/anchor");const t=require("../../event-service/solana/AbstractSolanaCommitmentsSnapshotService.cjs");class s extends t.AbstractSolanaCommitmentsSnapshotService{snapshotsService;constructor(e,r){super(e),this.snapshotsService=r}async fetchSnapshot(){const e=await this.snapshotsService.getCommitments();return{latestBlockNumber:e.latestBlockNumber,merkleTree:e.merkleTree,encryptedOutputs:e.encryptedOutputs,encryptedOutputsByCommitment:e.encryptedOutputsByCommitment}}persistSnapshot(e){return Promise.resolve()}}exports.ClientSolanaCommitmentsSnapshotService=s;
|
package/data-structures/snapshot/solana-snapshots/ClientSolanaCommitmentsSnapshotService.mjs
CHANGED
|
@@ -7,7 +7,6 @@ import "../../../constants/vite.constants.mjs";
|
|
|
7
7
|
import "../../../error-handling/error-codes.constants.mjs";
|
|
8
8
|
import "../../../constants/save-depths.mjs";
|
|
9
9
|
import "../../../constants/reorg-depths.constants.mjs";
|
|
10
|
-
import "@hinkal/common/functions";
|
|
11
10
|
import "../../../API/getServerURL.mjs";
|
|
12
11
|
import "../../../constants/server.constants.mjs";
|
|
13
12
|
import "../../http/HttpClient.mjs";
|
|
@@ -18,7 +17,7 @@ import "@solana/web3.js";
|
|
|
18
17
|
import "tronweb";
|
|
19
18
|
import "@coral-xyz/anchor";
|
|
20
19
|
import { AbstractSolanaCommitmentsSnapshotService as r } from "../../event-service/solana/AbstractSolanaCommitmentsSnapshotService.mjs";
|
|
21
|
-
class
|
|
20
|
+
class f extends r {
|
|
22
21
|
snapshotsService;
|
|
23
22
|
constructor(t, e) {
|
|
24
23
|
super(t), this.snapshotsService = e;
|
|
@@ -37,5 +36,5 @@ class x extends r {
|
|
|
37
36
|
}
|
|
38
37
|
}
|
|
39
38
|
export {
|
|
40
|
-
|
|
39
|
+
f as ClientSolanaCommitmentsSnapshotService
|
|
41
40
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("ethers");require("circomlibjs-hinkal-fork");require("libsodium-wrappers");require("process");require("buffer");require("../../../constants/vite.constants.cjs");require("../../../error-handling/error-codes.constants.cjs");require("../../../constants/save-depths.cjs");require("../../../constants/reorg-depths.constants.cjs");require("
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("ethers");require("circomlibjs-hinkal-fork");require("libsodium-wrappers");require("process");require("buffer");require("../../../constants/vite.constants.cjs");require("../../../error-handling/error-codes.constants.cjs");require("../../../constants/save-depths.cjs");require("../../../constants/reorg-depths.constants.cjs");require("../../../API/getServerURL.cjs");require("../../../constants/server.constants.cjs");require("../../http/HttpClient.cjs");require("axios");require("../../../constants/chains.constants.cjs");require("../../../API/enclaveUtxoCalls.cjs");require("@solana/web3.js");require("tronweb");require("@coral-xyz/anchor");const i=require("../../event-service/solana/AbstractSolanaNullifierSnapshotService.cjs");require("../../crypto-keys/keys.cjs");class s extends i.AbstractSolanaNullifierSnapshotService{snapshotsService;constructor(e,r){super(e),this.snapshotsService=r}async fetchSnapshot(){const e=await this.snapshotsService.getNullifiers();return{latestBlockNumber:e.latestBlockNumber,nullifiers:e.nullifiers}}persistSnapshot(e){return Promise.resolve()}}exports.ClientSolanaNullifierSnapshotService=s;
|
|
@@ -7,7 +7,6 @@ import "../../../constants/vite.constants.mjs";
|
|
|
7
7
|
import "../../../error-handling/error-codes.constants.mjs";
|
|
8
8
|
import "../../../constants/save-depths.mjs";
|
|
9
9
|
import "../../../constants/reorg-depths.constants.mjs";
|
|
10
|
-
import "@hinkal/common/functions";
|
|
11
10
|
import "../../../API/getServerURL.mjs";
|
|
12
11
|
import "../../../constants/server.constants.mjs";
|
|
13
12
|
import "../../http/HttpClient.mjs";
|
|
@@ -19,7 +18,7 @@ import "tronweb";
|
|
|
19
18
|
import "@coral-xyz/anchor";
|
|
20
19
|
import { AbstractSolanaNullifierSnapshotService as i } from "../../event-service/solana/AbstractSolanaNullifierSnapshotService.mjs";
|
|
21
20
|
import "../../crypto-keys/keys.mjs";
|
|
22
|
-
class
|
|
21
|
+
class w extends i {
|
|
23
22
|
snapshotsService;
|
|
24
23
|
constructor(t, r) {
|
|
25
24
|
super(t), this.snapshotsService = r;
|
|
@@ -36,5 +35,5 @@ class y extends i {
|
|
|
36
35
|
}
|
|
37
36
|
}
|
|
38
37
|
export {
|
|
39
|
-
|
|
38
|
+
w as ClientSolanaNullifierSnapshotService
|
|
40
39
|
};
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("ethers");require("@solana/web3.js");require("circomlibjs-hinkal-fork");require("../constants/chains.constants.cjs");require("../error-handling/error-codes.constants.cjs");require("../data-structures/crypto-keys/keys.cjs");require("libsodium-wrappers");const q=require("../data-structures/Hinkal/Hinkal.cjs");require("../types/circom-data.types.cjs");require("../constants/vite.constants.cjs");require("node-forge");require("../data-structures/http/HttpClient.cjs");require("axios");require("../constants/token-data/index.cjs");require("../constants/tokens.constants.cjs");require("idb-keyval");require("../functions/utils/convertIntegrationProviderToExternalActionId.cjs");require("../types/activities.types.cjs");require("../constants/server.constants.cjs");require("../API/getServerURL.cjs");require("tronweb");require("@coral-xyz/anchor");require("@solana/spl-token");require("tweetnacl");require("bs58");require("buffer");require("lodash");require("../API/enclaveUtxoCalls.cjs");require("../constants/contracts.constants.cjs");require("../constants/kyc.constants.cjs");require("../constants/coingecko.constants.cjs");require("../constants/reorg-depths.constants.cjs");require("../constants/addresses.constants.cjs");require("../constants/token.limits.constants.cjs");require("../constants/presale.constants.cjs");require("../constants/activity.constants.cjs");require("../constants/tasks.constants.cjs");require("../constants/events.constants.cjs");require("../constants/schedule.constants.cjs");require("../functions/utils/userAgent.cjs");require("multiformats");require("async-mutex");const t=require("../crypto/preProcessing.cjs"),a=require("./EthersProviderAdapter.cjs");require("../functions/web3/events/getInputUtxoAndBalance.cjs");require("../functions/web3/events/getApprovedBalance.cjs");require("../functions/web3/getTokenHolder.cjs");require("../constants/save-depths.cjs");require("
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("ethers");require("@solana/web3.js");require("circomlibjs-hinkal-fork");require("../constants/chains.constants.cjs");require("../error-handling/error-codes.constants.cjs");require("../data-structures/crypto-keys/keys.cjs");require("libsodium-wrappers");const q=require("../data-structures/Hinkal/Hinkal.cjs");require("../types/circom-data.types.cjs");require("../constants/vite.constants.cjs");require("node-forge");require("../data-structures/http/HttpClient.cjs");require("axios");require("../constants/token-data/index.cjs");require("../constants/tokens.constants.cjs");require("idb-keyval");require("../functions/utils/convertIntegrationProviderToExternalActionId.cjs");require("../types/activities.types.cjs");require("../constants/server.constants.cjs");require("../API/getServerURL.cjs");require("tronweb");require("@coral-xyz/anchor");require("@solana/spl-token");require("tweetnacl");require("bs58");require("buffer");require("lodash");require("../API/enclaveUtxoCalls.cjs");require("../constants/contracts.constants.cjs");require("../constants/kyc.constants.cjs");require("../constants/coingecko.constants.cjs");require("../constants/reorg-depths.constants.cjs");require("../constants/addresses.constants.cjs");require("../constants/token.limits.constants.cjs");require("../constants/presale.constants.cjs");require("../constants/activity.constants.cjs");require("../constants/tasks.constants.cjs");require("../constants/events.constants.cjs");require("../constants/schedule.constants.cjs");require("../functions/utils/userAgent.cjs");require("multiformats");require("async-mutex");const t=require("../crypto/preProcessing.cjs"),a=require("./EthersProviderAdapter.cjs");require("../functions/web3/events/getInputUtxoAndBalance.cjs");require("../functions/web3/events/getApprovedBalance.cjs");require("../functions/web3/getTokenHolder.cjs");require("../constants/save-depths.cjs");require("../API/tenderly.api.cjs");const n=async(i,u)=>{await t.preProcessing();const e=new q.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;
|
|
@@ -46,13 +46,12 @@ import "../functions/web3/events/getInputUtxoAndBalance.mjs";
|
|
|
46
46
|
import "../functions/web3/events/getApprovedBalance.mjs";
|
|
47
47
|
import "../functions/web3/getTokenHolder.mjs";
|
|
48
48
|
import "../constants/save-depths.mjs";
|
|
49
|
-
import "@hinkal/common/functions";
|
|
50
49
|
import "../API/tenderly.api.mjs";
|
|
51
|
-
const
|
|
50
|
+
const tr = async (t, o) => {
|
|
52
51
|
await m();
|
|
53
52
|
const r = new p(o), i = e();
|
|
54
53
|
return i.initSigner?.(t), await r.initProviderAdapter(void 0, i), await r.initUserKeys(), await r.resetMerkle(), r;
|
|
55
54
|
};
|
|
56
55
|
export {
|
|
57
|
-
|
|
56
|
+
tr as prepareEthersHinkal
|
|
58
57
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("ethers");require("@solana/web3.js");require("circomlibjs-hinkal-fork");require("../constants/chains.constants.cjs");require("../error-handling/error-codes.constants.cjs");require("../data-structures/crypto-keys/keys.cjs");require("libsodium-wrappers");const q=require("../data-structures/Hinkal/Hinkal.cjs");require("../types/circom-data.types.cjs");require("../constants/vite.constants.cjs");require("node-forge");require("../data-structures/http/HttpClient.cjs");require("axios");require("../constants/token-data/index.cjs");require("../constants/tokens.constants.cjs");require("idb-keyval");require("../functions/utils/convertIntegrationProviderToExternalActionId.cjs");require("../types/activities.types.cjs");require("../constants/server.constants.cjs");require("../API/getServerURL.cjs");require("tronweb");require("@coral-xyz/anchor");require("@solana/spl-token");require("tweetnacl");require("bs58");require("buffer");require("lodash");require("../API/enclaveUtxoCalls.cjs");require("../constants/contracts.constants.cjs");require("../constants/kyc.constants.cjs");require("../constants/coingecko.constants.cjs");require("../constants/reorg-depths.constants.cjs");require("../constants/addresses.constants.cjs");require("../constants/token.limits.constants.cjs");require("../constants/presale.constants.cjs");require("../constants/activity.constants.cjs");require("../constants/tasks.constants.cjs");require("../constants/events.constants.cjs");require("../constants/schedule.constants.cjs");require("../functions/utils/userAgent.cjs");require("multiformats");require("async-mutex");const a=require("../crypto/preProcessing.cjs");require("./EthersProviderAdapter.cjs");require("../functions/web3/events/getInputUtxoAndBalance.cjs");require("../functions/web3/events/getApprovedBalance.cjs");require("../functions/web3/getTokenHolder.cjs");require("../constants/save-depths.cjs");require("
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("ethers");require("@solana/web3.js");require("circomlibjs-hinkal-fork");require("../constants/chains.constants.cjs");require("../error-handling/error-codes.constants.cjs");require("../data-structures/crypto-keys/keys.cjs");require("libsodium-wrappers");const q=require("../data-structures/Hinkal/Hinkal.cjs");require("../types/circom-data.types.cjs");require("../constants/vite.constants.cjs");require("node-forge");require("../data-structures/http/HttpClient.cjs");require("axios");require("../constants/token-data/index.cjs");require("../constants/tokens.constants.cjs");require("idb-keyval");require("../functions/utils/convertIntegrationProviderToExternalActionId.cjs");require("../types/activities.types.cjs");require("../constants/server.constants.cjs");require("../API/getServerURL.cjs");require("tronweb");require("@coral-xyz/anchor");require("@solana/spl-token");require("tweetnacl");require("bs58");require("buffer");require("lodash");require("../API/enclaveUtxoCalls.cjs");require("../constants/contracts.constants.cjs");require("../constants/kyc.constants.cjs");require("../constants/coingecko.constants.cjs");require("../constants/reorg-depths.constants.cjs");require("../constants/addresses.constants.cjs");require("../constants/token.limits.constants.cjs");require("../constants/presale.constants.cjs");require("../constants/activity.constants.cjs");require("../constants/tasks.constants.cjs");require("../constants/events.constants.cjs");require("../constants/schedule.constants.cjs");require("../functions/utils/userAgent.cjs");require("multiformats");require("async-mutex");const a=require("../crypto/preProcessing.cjs");require("./EthersProviderAdapter.cjs");require("../functions/web3/events/getInputUtxoAndBalance.cjs");require("../functions/web3/events/getApprovedBalance.cjs");require("../functions/web3/getTokenHolder.cjs");require("../constants/save-depths.cjs");require("../API/tenderly.api.cjs");const r=require("./WagmiProviderAdapter.cjs"),t=async(i,u)=>{await a.preProcessing();const e=new q.Hinkal;return r.wagmiProviderAdapter.initConfig(u),await e.initProviderAdapter(i,r.wagmiProviderAdapter),await e.initUserKeys(),await e.resetMerkle(),e};exports.prepareWagmiHinkal=t;
|
|
@@ -46,14 +46,13 @@ import "../functions/web3/events/getInputUtxoAndBalance.mjs";
|
|
|
46
46
|
import "../functions/web3/events/getApprovedBalance.mjs";
|
|
47
47
|
import "../functions/web3/getTokenHolder.mjs";
|
|
48
48
|
import "../constants/save-depths.mjs";
|
|
49
|
-
import "@hinkal/common/functions";
|
|
50
49
|
import "../API/tenderly.api.mjs";
|
|
51
50
|
import { wagmiProviderAdapter as r } from "./WagmiProviderAdapter.mjs";
|
|
52
|
-
const
|
|
51
|
+
const ti = async (t, o) => {
|
|
53
52
|
await m();
|
|
54
53
|
const i = new p();
|
|
55
54
|
return r.initConfig(o), await i.initProviderAdapter(t, r), await i.initUserKeys(), await i.resetMerkle(), i;
|
|
56
55
|
};
|
|
57
56
|
export {
|
|
58
|
-
|
|
57
|
+
ti as prepareWagmiHinkal
|
|
59
58
|
};
|