@hinkal/common 0.2.19 → 0.2.21
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/API.cjs +1 -1
- package/API/API.d.ts +6 -1
- package/API/API.mjs +48 -41
- package/API/enclaveCalls.cjs +1 -1
- package/API/enclaveCalls.mjs +5 -4
- package/API/index.d.ts +1 -0
- package/API/proxyAccountsCalls.cjs +1 -1
- package/API/proxyAccountsCalls.d.ts +7 -2
- package/API/proxyAccountsCalls.mjs +26 -20
- package/API/temporaryWalletCalls.cjs +1 -0
- package/API/temporaryWalletCalls.d.ts +13 -0
- package/API/temporaryWalletCalls.mjs +20 -0
- package/API/unspent-utxos-calls.cjs +1 -1
- package/API/unspent-utxos-calls.d.ts +1 -1
- package/API/unspent-utxos-calls.mjs +16 -14
- package/README.md +36 -13
- package/constants/chains.constants.cjs +1 -1
- package/constants/chains.constants.d.ts +1 -1
- package/constants/chains.constants.mjs +69 -51
- package/constants/deploy-data/deploy-data-solana.json.cjs +1 -1
- package/constants/deploy-data/deploy-data-solana.json.mjs +28 -2
- package/constants/kyc.constants.cjs +1 -1
- package/constants/kyc.constants.mjs +39 -40
- package/constants/mediaUrls.constants.cjs +1 -1
- package/constants/mediaUrls.constants.d.ts +1 -0
- package/constants/mediaUrls.constants.mjs +2 -1
- package/constants/server.constants.cjs +1 -1
- package/constants/server.constants.d.ts +6 -1
- package/constants/server.constants.mjs +37 -32
- package/constants/token-data/polygonRegistry.json.cjs +1 -1
- package/constants/token-data/polygonRegistry.json.mjs +4 -4
- package/constants/token-data/polygonRegistryFixed.json.cjs +1 -1
- package/constants/token-data/polygonRegistryFixed.json.mjs +4 -4
- package/data-structures/AccountActions/AccountActions.cjs +1 -0
- package/data-structures/AccountActions/AccountActions.d.ts +18 -0
- package/data-structures/AccountActions/AccountActions.mjs +78 -0
- package/data-structures/AccountActions/index.d.ts +1 -0
- package/data-structures/ApprovalDBs/EventsPublicApprovalsDB.cjs +1 -1
- package/data-structures/ApprovalDBs/EventsPublicApprovalsDB.mjs +68 -71
- package/data-structures/BlockchainEvent/BlockchainEvent.cjs +1 -0
- package/data-structures/BlockchainEvent/BlockchainEvent.d.ts +14 -0
- package/data-structures/BlockchainEvent/BlockchainEvent.mjs +41 -0
- package/data-structures/Hinkal/Hinkal.cjs +1 -1
- package/data-structures/Hinkal/Hinkal.d.ts +14 -8
- package/data-structures/Hinkal/Hinkal.mjs +215 -179
- package/data-structures/Hinkal/IHinkal.d.ts +9 -6
- package/data-structures/Hinkal/handleAutoDepositBack.cjs +1 -1
- package/data-structures/Hinkal/handleAutoDepositBack.mjs +47 -48
- package/data-structures/Hinkal/hinkalActionReceive.cjs +1 -1
- package/data-structures/Hinkal/hinkalActionReceive.mjs +25 -22
- package/data-structures/Hinkal/hinkalCheckTokenRegistry.cjs +1 -1
- package/data-structures/Hinkal/hinkalCheckTokenRegistry.mjs +12 -12
- package/data-structures/Hinkal/hinkalDeposit.cjs +1 -1
- package/data-structures/Hinkal/hinkalDeposit.mjs +63 -63
- package/data-structures/Hinkal/hinkalDepositAndWithdraw.cjs +1 -1
- package/data-structures/Hinkal/hinkalDepositAndWithdraw.mjs +60 -147
- package/data-structures/Hinkal/hinkalDepositOnChainUtxos.cjs +1 -0
- package/data-structures/Hinkal/hinkalDepositOnChainUtxos.d.ts +4 -0
- package/data-structures/Hinkal/hinkalDepositOnChainUtxos.mjs +103 -0
- package/data-structures/Hinkal/hinkalDepostAndBridge.cjs +1 -0
- package/data-structures/Hinkal/hinkalDepostAndBridge.d.ts +4 -0
- package/data-structures/Hinkal/hinkalDepostAndBridge.mjs +214 -0
- package/data-structures/Hinkal/hinkalGetZkMeProvider.cjs +1 -1
- package/data-structures/Hinkal/hinkalGetZkMeProvider.mjs +4 -4
- package/data-structures/Hinkal/hinkalPrivateWallet.cjs +1 -1
- package/data-structures/Hinkal/hinkalPrivateWallet.d.ts +2 -2
- package/data-structures/Hinkal/hinkalPrivateWallet.mjs +103 -99
- package/data-structures/Hinkal/hinkalProxySwap.cjs +1 -1
- package/data-structures/Hinkal/hinkalProxySwap.mjs +44 -41
- package/data-structures/Hinkal/hinkalProxyToPrivate.cjs +1 -1
- package/data-structures/Hinkal/hinkalProxyToPrivate.mjs +31 -28
- package/data-structures/Hinkal/hinkalSignSubAccount.cjs +1 -1
- package/data-structures/Hinkal/hinkalSignSubAccount.mjs +16 -13
- package/data-structures/Hinkal/hinkalSolanaDeposit.cjs +1 -1
- package/data-structures/Hinkal/hinkalSolanaDeposit.mjs +34 -34
- package/data-structures/Hinkal/hinkalSolanaDepositAndWithdraw.cjs +1 -1
- package/data-structures/Hinkal/hinkalSolanaDepositAndWithdraw.mjs +67 -65
- package/data-structures/Hinkal/hinkalSolanaProxySend.cjs +1 -1
- package/data-structures/Hinkal/hinkalSolanaProxySend.mjs +35 -32
- package/data-structures/Hinkal/hinkalSolanaProxyShield.cjs +1 -1
- package/data-structures/Hinkal/hinkalSolanaProxyShield.mjs +59 -56
- package/data-structures/Hinkal/hinkalSolanaProxySwap.cjs +1 -1
- package/data-structures/Hinkal/hinkalSolanaProxySwap.mjs +35 -32
- package/data-structures/Hinkal/hinkalSolanaSwap.cjs +1 -1
- package/data-structures/Hinkal/hinkalSolanaSwap.mjs +10 -10
- package/data-structures/Hinkal/hinkalSolanaWithdraw.cjs +1 -1
- package/data-structures/Hinkal/hinkalSolanaWithdraw.mjs +25 -25
- package/data-structures/Hinkal/hinkalSwap.cjs +1 -1
- package/data-structures/Hinkal/hinkalSwap.mjs +34 -30
- package/data-structures/Hinkal/hinkalTransfer.cjs +1 -1
- package/data-structures/Hinkal/hinkalTransfer.mjs +43 -39
- package/data-structures/Hinkal/hinkalWithdraw.cjs +1 -1
- package/data-structures/Hinkal/hinkalWithdraw.mjs +47 -43
- package/data-structures/Hinkal/hinkalWithdrawStuckUtxos.cjs +1 -1
- package/data-structures/Hinkal/hinkalWithdrawStuckUtxos.mjs +50 -46
- package/data-structures/Hinkal/resetMerkleTrees.cjs +1 -1
- package/data-structures/Hinkal/resetMerkleTrees.mjs +36 -34
- package/data-structures/IndexedDB/activity-db.cjs +1 -1
- package/data-structures/IndexedDB/activity-db.d.ts +1 -0
- package/data-structures/IndexedDB/activity-db.mjs +86 -70
- package/data-structures/IndexedDB/balances-db.cjs +1 -1
- package/data-structures/IndexedDB/balances-db.mjs +33 -30
- package/data-structures/IndexedDB/contact-db.cjs +1 -1
- package/data-structures/IndexedDB/contact-db.mjs +9 -6
- package/data-structures/PublicBalance/PublicBalanceWatcher.cjs +1 -0
- package/data-structures/PublicBalance/PublicBalanceWatcher.d.ts +20 -0
- package/data-structures/PublicBalance/PublicBalanceWatcher.mjs +124 -0
- package/data-structures/PublicBalance/SolanaPublicBalancerWatcher.cjs +1 -0
- package/data-structures/PublicBalance/SolanaPublicBalancerWatcher.d.ts +15 -0
- package/data-structures/PublicBalance/SolanaPublicBalancerWatcher.mjs +64 -0
- package/data-structures/PublicBalance/index.d.ts +2 -0
- package/data-structures/TokenDBs/EventsPublicTokensDB.cjs +1 -1
- package/data-structures/TokenDBs/EventsPublicTokensDB.mjs +77 -78
- package/data-structures/crypto-keys/keys.cjs +1 -1
- package/data-structures/crypto-keys/keys.d.ts +0 -11
- package/data-structures/crypto-keys/keys.mjs +47 -107
- package/data-structures/event-service/evm/AbstractAccessTokenSnapshotService.cjs +1 -1
- package/data-structures/event-service/evm/AbstractAccessTokenSnapshotService.d.ts +3 -2
- package/data-structures/event-service/evm/AbstractAccessTokenSnapshotService.mjs +9 -9
- package/data-structures/event-service/evm/AbstractApprovalsSnapshotService.cjs +1 -1
- package/data-structures/event-service/evm/AbstractApprovalsSnapshotService.d.ts +3 -2
- package/data-structures/event-service/evm/AbstractApprovalsSnapshotService.mjs +5 -5
- package/data-structures/event-service/evm/AbstractCommitmentsSnapshotService.cjs +1 -1
- package/data-structures/event-service/evm/AbstractCommitmentsSnapshotService.d.ts +3 -2
- package/data-structures/event-service/evm/AbstractCommitmentsSnapshotService.mjs +6 -6
- package/data-structures/event-service/evm/AbstractEventService.cjs +1 -1
- package/data-structures/event-service/evm/AbstractEventService.d.ts +3 -2
- package/data-structures/event-service/evm/AbstractEventService.mjs +16 -19
- package/data-structures/event-service/evm/AbstractNullifierSnapshotService.cjs +1 -1
- package/data-structures/event-service/evm/AbstractNullifierSnapshotService.d.ts +3 -3
- package/data-structures/event-service/evm/AbstractNullifierSnapshotService.mjs +6 -5
- package/data-structures/event-service/evm/AbstractSnapshotService.d.ts +1 -1
- package/data-structures/event-service/evm/BlockchainEventEmitter.cjs +1 -1
- package/data-structures/event-service/evm/BlockchainEventEmitter.d.ts +7 -4
- package/data-structures/event-service/evm/BlockchainEventEmitter.mjs +35 -34
- package/data-structures/event-service/evm/ClientBlockchainEventEmitter.cjs +1 -0
- package/data-structures/event-service/evm/ClientBlockchainEventEmitter.d.ts +11 -0
- package/data-structures/event-service/evm/ClientBlockchainEventEmitter.mjs +21 -0
- package/data-structures/event-service/evm/PollingBlockchainEventEmitter.cjs +1 -0
- package/data-structures/event-service/evm/PollingBlockchainEventEmitter.d.ts +6 -0
- package/data-structures/event-service/evm/PollingBlockchainEventEmitter.mjs +16 -0
- package/data-structures/event-service/helpers/ClientEventHelper.cjs +1 -0
- package/data-structures/event-service/helpers/ClientEventHelper.d.ts +11 -0
- package/data-structures/event-service/helpers/ClientEventHelper.mjs +26 -0
- package/data-structures/event-service/helpers/PollingEventHelper.cjs +1 -0
- package/data-structures/event-service/helpers/PollingEventHelper.d.ts +5 -0
- package/data-structures/event-service/helpers/PollingEventHelper.mjs +14 -0
- package/data-structures/event-service/index.d.ts +4 -0
- package/data-structures/event-service/solana/AbstractSolanaAccessTokenSnapshotService.cjs +1 -1
- package/data-structures/event-service/solana/AbstractSolanaAccessTokenSnapshotService.d.ts +3 -2
- package/data-structures/event-service/solana/AbstractSolanaAccessTokenSnapshotService.mjs +6 -6
- package/data-structures/event-service/solana/AbstractSolanaCommitmentsSnapshotService.cjs +1 -1
- package/data-structures/event-service/solana/AbstractSolanaCommitmentsSnapshotService.d.ts +4 -3
- package/data-structures/event-service/solana/AbstractSolanaCommitmentsSnapshotService.mjs +8 -8
- package/data-structures/event-service/solana/AbstractSolanaEventService.cjs +1 -1
- package/data-structures/event-service/solana/AbstractSolanaEventService.d.ts +3 -10
- package/data-structures/event-service/solana/AbstractSolanaEventService.mjs +5 -5
- package/data-structures/event-service/solana/AbstractSolanaNullifierSnapshotService.cjs +1 -1
- package/data-structures/event-service/solana/AbstractSolanaNullifierSnapshotService.d.ts +3 -2
- package/data-structures/event-service/solana/AbstractSolanaNullifierSnapshotService.mjs +1 -1
- package/data-structures/event-service/solana/AbstractSolanaSnapshotService.d.ts +1 -1
- package/data-structures/event-service/solana/ClientSolanaBlockchainEventEmitter.cjs +1 -0
- package/data-structures/event-service/solana/ClientSolanaBlockchainEventEmitter.d.ts +11 -0
- package/data-structures/event-service/solana/ClientSolanaBlockchainEventEmitter.mjs +22 -0
- package/data-structures/event-service/solana/PollingSolanaBlockchainEventEmitter.cjs +1 -0
- package/data-structures/event-service/solana/PollingSolanaBlockchainEventEmitter.d.ts +6 -0
- package/data-structures/event-service/solana/PollingSolanaBlockchainEventEmitter.mjs +16 -0
- package/data-structures/event-service/solana/SolanaBlockchainEventEmitter.cjs +1 -1
- package/data-structures/event-service/solana/SolanaBlockchainEventEmitter.d.ts +8 -14
- package/data-structures/event-service/solana/SolanaBlockchainEventEmitter.mjs +68 -67
- package/data-structures/index.d.ts +3 -0
- package/data-structures/snapshot/evm-snapshots/ClientAccessTokenSnapshotService.cjs +1 -1
- package/data-structures/snapshot/evm-snapshots/ClientAccessTokenSnapshotService.mjs +5 -2
- package/data-structures/snapshot/evm-snapshots/ClientApprovalsSnapshotService.cjs +1 -1
- package/data-structures/snapshot/evm-snapshots/ClientApprovalsSnapshotService.mjs +5 -2
- package/data-structures/snapshot/evm-snapshots/ClientCommitmentsSnapshotService.cjs +1 -1
- package/data-structures/snapshot/evm-snapshots/ClientCommitmentsSnapshotService.mjs +5 -2
- package/data-structures/snapshot/evm-snapshots/ClientNullifierSnapshotService.cjs +1 -1
- package/data-structures/snapshot/evm-snapshots/ClientNullifierSnapshotService.mjs +5 -2
- package/data-structures/snapshot/solana-snapshots/ClientSolanaAccessTokenSnapshotService.cjs +1 -1
- package/data-structures/snapshot/solana-snapshots/ClientSolanaAccessTokenSnapshotService.mjs +5 -2
- package/data-structures/snapshot/solana-snapshots/ClientSolanaCommitmentsSnapshotService.cjs +1 -1
- package/data-structures/snapshot/solana-snapshots/ClientSolanaCommitmentsSnapshotService.mjs +5 -2
- package/data-structures/snapshot/solana-snapshots/ClientSolanaNullifierSnapshotService.cjs +1 -1
- package/data-structures/snapshot/solana-snapshots/ClientSolanaNullifierSnapshotService.mjs +5 -2
- package/data-structures/utxo/Utxo.cjs +1 -1
- package/data-structures/utxo/Utxo.d.ts +1 -0
- package/data-structures/utxo/Utxo.mjs +18 -4
- package/error-handling/error-codes.constants.cjs +1 -1
- package/error-handling/error-codes.constants.mjs +2 -2
- package/functions/pre-transaction/getSolanaCalldataHash.cjs +1 -1
- package/functions/pre-transaction/getSolanaCalldataHash.mjs +22 -22
- package/functions/pre-transaction/sendV0Transaction.cjs +1 -1
- package/functions/pre-transaction/sendV0Transaction.mjs +53 -50
- package/functions/pre-transaction/solana.cjs +1 -1
- package/functions/pre-transaction/solana.mjs +93 -93
- package/functions/private-wallet/emporium.helpers.cjs +1 -1
- package/functions/private-wallet/emporium.helpers.d.ts +3 -2
- package/functions/private-wallet/emporium.helpers.mjs +118 -93
- package/functions/snarkjs/constructEmporiumProof.cjs +1 -1
- package/functions/snarkjs/constructEmporiumProof.d.ts +1 -2
- package/functions/snarkjs/constructEmporiumProof.mjs +89 -89
- package/functions/snarkjs/constructSolanaZkProof.cjs +1 -1
- package/functions/snarkjs/constructSolanaZkProof.mjs +6 -2
- package/functions/utils/bytes32.utils.cjs +1 -1
- package/functions/utils/bytes32.utils.mjs +8 -7
- package/functions/utils/create-provider.cjs +1 -1
- package/functions/utils/create-provider.d.ts +1 -1
- package/functions/utils/create-provider.mjs +13 -9
- package/functions/utils/index.d.ts +0 -1
- package/functions/utils/prepareHinkal.cjs +1 -1
- package/functions/utils/prepareHinkal.d.ts +6 -7
- package/functions/utils/prepareHinkal.mjs +45 -53
- package/functions/utils/publicBalance.utils.cjs +1 -1
- package/functions/utils/publicBalance.utils.mjs +49 -54
- package/functions/utils/socket.utils.cjs +1 -0
- package/functions/utils/socket.utils.d.ts +1 -0
- package/functions/utils/socket.utils.mjs +12 -0
- package/functions/utils/string.utils.cjs +1 -1
- package/functions/utils/string.utils.d.ts +1 -0
- package/functions/utils/string.utils.mjs +18 -14
- package/functions/utils/walletBalances.utils.cjs +1 -1
- package/functions/utils/walletBalances.utils.d.ts +1 -1
- package/functions/utils/walletBalances.utils.mjs +4 -4
- package/functions/web3/crypto.cjs +1 -0
- package/functions/web3/crypto.d.ts +1 -0
- package/functions/web3/crypto.mjs +7 -0
- package/functions/web3/events/getApprovedBalance.cjs +1 -1
- package/functions/web3/events/getApprovedBalance.mjs +14 -14
- package/functions/web3/events/getInputUtxoAndBalance.cjs +1 -1
- package/functions/web3/events/getInputUtxoAndBalance.mjs +61 -59
- package/functions/web3/events/getTransactionLogEvents.cjs +1 -1
- package/functions/web3/events/getTransactionLogEvents.mjs +32 -32
- package/functions/web3/fetchSolanaMerkleTreeRootHash.cjs +1 -1
- package/functions/web3/fetchSolanaMerkleTreeRootHash.mjs +6 -3
- package/functions/web3/functionCalls/approveToken.cjs +1 -1
- package/functions/web3/functionCalls/approveToken.mjs +17 -17
- package/functions/web3/functionCalls/transactCallDirect.cjs +1 -1
- package/functions/web3/functionCalls/transactCallDirect.mjs +16 -16
- package/functions/web3/functionCalls/transactCallRelayer.cjs +1 -1
- package/functions/web3/functionCalls/transactCallRelayer.mjs +13 -11
- package/functions/web3/getContractMetadata.cjs +1 -1
- package/functions/web3/getContractMetadata.mjs +17 -22
- package/functions/web3/getTokenHolder.cjs +1 -1
- package/functions/web3/getTokenHolder.mjs +20 -20
- package/functions/web3/index.d.ts +1 -0
- package/index.cjs +1 -1
- package/index.mjs +913 -890
- package/package.json +3 -2
- package/providers/EthersProviderAdapter.cjs +1 -1
- package/providers/EthersProviderAdapter.mjs +2 -5
- package/providers/prepareEthersHinkal.cjs +1 -1
- package/providers/prepareEthersHinkal.mjs +11 -4
- package/providers/prepareWagmiHinkal.cjs +1 -1
- package/providers/prepareWagmiHinkal.mjs +11 -4
- package/types/activities.types.d.ts +2 -0
- package/types/bridging-tx.types.d.ts +17 -0
- package/types/cache.types.cjs +1 -1
- package/types/cache.types.d.ts +5 -1
- package/types/cache.types.mjs +1 -1
- package/types/ethereum-network.types.d.ts +1 -0
- package/types/events.types.cjs +1 -0
- package/types/events.types.d.ts +9 -0
- package/types/events.types.mjs +5 -0
- package/types/index.d.ts +2 -0
- package/types/proxy.types.d.ts +11 -4
- package/types/sandbox.types.d.ts +2 -0
- package/types/solana.types.d.ts +8 -0
- package/types/token.types.d.ts +5 -0
- package/webworker/snarkjsWorker/snarkjsWorkerLauncher.cjs +1 -1
- package/webworker/snarkjsWorker/snarkjsWorkerLauncher.mjs +1 -1
- package/webworker/utxoWorker/utxoWorkerLauncher.cjs +1 -1
- package/webworker/utxoWorker/utxoWorkerLauncher.mjs +1 -1
- package/webworker/zkProofWorker/zkProofWorkerLauncher.cjs +1 -1
- package/webworker/zkProofWorker/zkProofWorkerLauncher.mjs +1 -1
- package/functions/kyc/authentoHelper.cjs +0 -1
- package/functions/kyc/authentoHelper.d.ts +0 -12
- package/functions/kyc/authentoHelper.mjs +0 -30
- package/functions/utils/get-hinkal-approvals.cjs +0 -1
- package/functions/utils/get-hinkal-approvals.d.ts +0 -3
- package/functions/utils/get-hinkal-approvals.mjs +0 -38
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hinkal/common",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.21",
|
|
4
4
|
"homepage": "hinkal.io",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Hinkal Protocol"
|
|
@@ -71,7 +71,8 @@
|
|
|
71
71
|
"process": "0.11.10",
|
|
72
72
|
"ua-parser-js": "^1.0.37",
|
|
73
73
|
"uuid": "^9.0.1",
|
|
74
|
-
"node-forge": "^1.3.1"
|
|
74
|
+
"node-forge": "^1.3.1",
|
|
75
|
+
"socket.io-client": "^4.8.3"
|
|
75
76
|
},
|
|
76
77
|
"peerDependencies": {
|
|
77
78
|
"wagmi": "2.13.3",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const s=require("../constants/chains.constants.cjs"),n=require("../error-handling/error-codes.constants.cjs"),o=require("ethers"),a=require("../functions/web3/getContractMetadata.cjs"),c=require("../functions/utils/create-provider.cjs");class i{signer;chainId;fetchProviders={};chainEventListener;constructor(){s.WALLET_SUPPORTED_CHAINS.forEach(r=>{
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const s=require("../constants/chains.constants.cjs"),n=require("../error-handling/error-codes.constants.cjs"),o=require("ethers"),a=require("../functions/web3/getContractMetadata.cjs"),c=require("../functions/utils/create-provider.cjs");class i{signer;chainId;fetchProviders={};chainEventListener;constructor(){s.WALLET_SUPPORTED_CHAINS.forEach(r=>{s.isSolanaLike(r)||(this.fetchProviders[r]=c.createCustomRpcProvider(r))})}initConnector(){}initSigner(r){this.signer=r}async init(r){if(r&&(this.chainId=r),!this.chainId)throw Error("No Chain Id In Provider Adapter")}async disconnectFromConnector(){}async connectToConnector(){return 0}async waitForTransaction(r,e,t){if((await this.fetchProviders[r]?.waitForTransaction(e,t))?.status)return!0;throw Error(n.transactionErrorCodes.TRANSACTION_NOT_CONFIRMED)}async signMessage(r){if(!this.signer)throw new Error("IllegalState: no signer");const e=await this.signer.signMessage(r);if(!e)throw new Error(n.transactionErrorCodes.SIGNING_FAILED);if(e.includes("error"))throw new Error(n.transactionErrorCodes.SIGNATURE_UNSUPPORTED_PERSONAL_SIGN);return e}async signTypedData(r,e,t){return this.signer._signTypedData(r,e,t)}async switchNetwork(r){const e=this.fetchProviders[r.chainId];if(!e)throw new Error("switchNetwork illegal state: no provider");this.signer=this.signer?.connect(e),this.chainEventListener?.onChainChanged(r.chainId)}async getAddress(){if(!this.signer)throw new Error("IllegalState: no signer");const r=await this.signer.getAddress();if(!r)throw new Error("IllegalState");return o.utils.getAddress(r)}setChainEventListener(r){this.chainEventListener=r}onAccountChanged(){return this.init()}onChainChanged(r){return this.init(r)}release(){this.removeListeners()}removeListeners(){this.chainEventListener=void 0}getContract(r,e,t=void 0){return a.getContract(e,r,t)}getContractWithSigner(r,e,t=void 0){if(!this.signer)throw new Error("IllegalState: no signer");return this.getContract(r,e,t).connect(this.signer)}getContractWithFetcher(r,e,t=void 0){if(!this.fetchProviders[r])throw new Error("fetchProvider not initialized");return this.getContract(r,e,t).connect(this.fetchProviders[r])}async sendTransaction(r){if(!this.signer)throw new Error("IllegalState: no signer");return await this.signer.sendTransaction(r)}async connectAndPatchProvider(){if(!this.signer)throw new Error("IllegalState: no signer");return await this.signer.getChainId()}isPermitterAvailable(){return!1}async getGasPrice(r){const e=await this.fetchProviders[r]?.getGasPrice();if(!e)throw Error("Could not fetch gas price in getGasPrice");return e.toBigInt()}}const h=new i,d=()=>new i;exports.EthersProviderAdapter=i;exports.default=d;exports.ethersProvierAdapter=h;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { WALLET_SUPPORTED_CHAINS as s,
|
|
1
|
+
import { WALLET_SUPPORTED_CHAINS as s, isSolanaLike as o } from "../constants/chains.constants.mjs";
|
|
2
2
|
import { transactionErrorCodes as i } from "../error-handling/error-codes.constants.mjs";
|
|
3
3
|
import { utils as a } from "ethers";
|
|
4
4
|
import { getContract as c } from "../functions/web3/getContractMetadata.mjs";
|
|
@@ -10,10 +10,7 @@ class n {
|
|
|
10
10
|
chainEventListener;
|
|
11
11
|
constructor() {
|
|
12
12
|
s.forEach((r) => {
|
|
13
|
-
|
|
14
|
-
if (!t)
|
|
15
|
-
throw Error("No Fetch RPC URL In Provider Adapter");
|
|
16
|
-
this.fetchProviders[r] = h(t);
|
|
13
|
+
o(r) || (this.fetchProviders[r] = h(r));
|
|
17
14
|
});
|
|
18
15
|
}
|
|
19
16
|
initConnector() {
|
|
@@ -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("../constants/vite.constants.cjs");require("../types/circom-data.types.cjs");require("node-forge");require("../data-structures/http/HttpClient.cjs");require("axios");require("../constants/token-data/index.cjs");require("idb-keyval");require("../functions/utils/convertIntegrationProviderToExternalActionId.cjs");require("../types/transactions.types.cjs");require("../types/activities.types.cjs");require("../constants/server.constants.cjs");require("../API/getServerURL.cjs");require("@coral-xyz/anchor");require("@solana/spl-token");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("../functions/utils/userAgent.cjs");require("multiformats");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("../constants/vite.constants.cjs");require("../types/circom-data.types.cjs");require("node-forge");require("../data-structures/http/HttpClient.cjs");require("axios");require("../constants/token-data/index.cjs");require("idb-keyval");require("../functions/utils/convertIntegrationProviderToExternalActionId.cjs");require("../types/transactions.types.cjs");require("../types/activities.types.cjs");require("../constants/server.constants.cjs");require("../API/getServerURL.cjs");require("@coral-xyz/anchor");require("@solana/spl-token");require("ethers-v6h");require("tweetnacl");require("bs58");require("buffer");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("../functions/utils/userAgent.cjs");require("multiformats");require("../API/enclaveCalls.cjs");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("socket.io-client");require("../data-structures/PublicBalance/PublicBalanceWatcher.cjs");require("../data-structures/PublicBalance/SolanaPublicBalancerWatcher.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;
|
|
@@ -20,6 +20,10 @@ import "../constants/server.constants.mjs";
|
|
|
20
20
|
import "../API/getServerURL.mjs";
|
|
21
21
|
import "@coral-xyz/anchor";
|
|
22
22
|
import "@solana/spl-token";
|
|
23
|
+
import "ethers-v6h";
|
|
24
|
+
import "tweetnacl";
|
|
25
|
+
import "bs58";
|
|
26
|
+
import "buffer";
|
|
23
27
|
import "../constants/contracts.constants.mjs";
|
|
24
28
|
import "../constants/kyc.constants.mjs";
|
|
25
29
|
import "../constants/coingecko.constants.mjs";
|
|
@@ -32,19 +36,22 @@ import "../constants/tasks.constants.mjs";
|
|
|
32
36
|
import "../constants/events.constants.mjs";
|
|
33
37
|
import "../functions/utils/userAgent.mjs";
|
|
34
38
|
import "multiformats";
|
|
39
|
+
import "../API/enclaveCalls.mjs";
|
|
35
40
|
import "async-mutex";
|
|
36
|
-
import "../API/tenderly.api.mjs";
|
|
37
41
|
import { preProcessing as m } from "../crypto/preProcessing.mjs";
|
|
38
42
|
import e from "./EthersProviderAdapter.mjs";
|
|
39
|
-
import "
|
|
43
|
+
import "../functions/web3/events/getInputUtxoAndBalance.mjs";
|
|
40
44
|
import "../functions/web3/events/getApprovedBalance.mjs";
|
|
41
45
|
import "../functions/web3/getTokenHolder.mjs";
|
|
42
46
|
import "../constants/save-depths.mjs";
|
|
43
|
-
|
|
47
|
+
import "socket.io-client";
|
|
48
|
+
import "../data-structures/PublicBalance/PublicBalanceWatcher.mjs";
|
|
49
|
+
import "../data-structures/PublicBalance/SolanaPublicBalancerWatcher.mjs";
|
|
50
|
+
const tr = async (t, o) => {
|
|
44
51
|
await m();
|
|
45
52
|
const r = new p(o), i = e();
|
|
46
53
|
return i.initSigner?.(t), await r.initProviderAdapter(void 0, i), await r.initUserKeys(), await r.resetMerkle(), r;
|
|
47
54
|
};
|
|
48
55
|
export {
|
|
49
|
-
|
|
56
|
+
tr as prepareEthersHinkal
|
|
50
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("../constants/vite.constants.cjs");require("../types/circom-data.types.cjs");require("node-forge");require("../data-structures/http/HttpClient.cjs");require("axios");require("../constants/token-data/index.cjs");require("idb-keyval");require("../functions/utils/convertIntegrationProviderToExternalActionId.cjs");require("../types/transactions.types.cjs");require("../types/activities.types.cjs");require("../constants/server.constants.cjs");require("../API/getServerURL.cjs");require("@coral-xyz/anchor");require("@solana/spl-token");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("../functions/utils/userAgent.cjs");require("multiformats");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("../constants/vite.constants.cjs");require("../types/circom-data.types.cjs");require("node-forge");require("../data-structures/http/HttpClient.cjs");require("axios");require("../constants/token-data/index.cjs");require("idb-keyval");require("../functions/utils/convertIntegrationProviderToExternalActionId.cjs");require("../types/transactions.types.cjs");require("../types/activities.types.cjs");require("../constants/server.constants.cjs");require("../API/getServerURL.cjs");require("@coral-xyz/anchor");require("@solana/spl-token");require("ethers-v6h");require("tweetnacl");require("bs58");require("buffer");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("../functions/utils/userAgent.cjs");require("multiformats");require("../API/enclaveCalls.cjs");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("socket.io-client");require("../data-structures/PublicBalance/PublicBalanceWatcher.cjs");require("../data-structures/PublicBalance/SolanaPublicBalancerWatcher.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;
|
|
@@ -20,6 +20,10 @@ import "../constants/server.constants.mjs";
|
|
|
20
20
|
import "../API/getServerURL.mjs";
|
|
21
21
|
import "@coral-xyz/anchor";
|
|
22
22
|
import "@solana/spl-token";
|
|
23
|
+
import "ethers-v6h";
|
|
24
|
+
import "tweetnacl";
|
|
25
|
+
import "bs58";
|
|
26
|
+
import "buffer";
|
|
23
27
|
import "../constants/contracts.constants.mjs";
|
|
24
28
|
import "../constants/kyc.constants.mjs";
|
|
25
29
|
import "../constants/coingecko.constants.mjs";
|
|
@@ -32,20 +36,23 @@ import "../constants/tasks.constants.mjs";
|
|
|
32
36
|
import "../constants/events.constants.mjs";
|
|
33
37
|
import "../functions/utils/userAgent.mjs";
|
|
34
38
|
import "multiformats";
|
|
39
|
+
import "../API/enclaveCalls.mjs";
|
|
35
40
|
import "async-mutex";
|
|
36
|
-
import "../API/tenderly.api.mjs";
|
|
37
41
|
import { preProcessing as m } from "../crypto/preProcessing.mjs";
|
|
38
42
|
import "./EthersProviderAdapter.mjs";
|
|
39
|
-
import "
|
|
43
|
+
import "../functions/web3/events/getInputUtxoAndBalance.mjs";
|
|
40
44
|
import "../functions/web3/events/getApprovedBalance.mjs";
|
|
41
45
|
import "../functions/web3/getTokenHolder.mjs";
|
|
42
46
|
import "../constants/save-depths.mjs";
|
|
47
|
+
import "socket.io-client";
|
|
48
|
+
import "../data-structures/PublicBalance/PublicBalanceWatcher.mjs";
|
|
49
|
+
import "../data-structures/PublicBalance/SolanaPublicBalancerWatcher.mjs";
|
|
43
50
|
import { wagmiProviderAdapter as r } from "./WagmiProviderAdapter.mjs";
|
|
44
|
-
const
|
|
51
|
+
const ti = async (t, o) => {
|
|
45
52
|
await m();
|
|
46
53
|
const i = new p();
|
|
47
54
|
return r.initConfig(o), await i.initProviderAdapter(t, r), await i.initUserKeys(), await i.resetMerkle(), i;
|
|
48
55
|
};
|
|
49
56
|
export {
|
|
50
|
-
|
|
57
|
+
ti as prepareWagmiHinkal
|
|
51
58
|
};
|
|
@@ -54,6 +54,7 @@ export interface ActivityAddRequest {
|
|
|
54
54
|
gas?: BigNumber;
|
|
55
55
|
gasPrice?: BigNumber;
|
|
56
56
|
gasInDollar?: string;
|
|
57
|
+
extraNativeTokenFee?: string;
|
|
57
58
|
tokensReceive?: TokenAmountInfo[];
|
|
58
59
|
tokensSpend?: TokenAmountInfo[];
|
|
59
60
|
tokensApprove?: TokenAmountInfo[];
|
|
@@ -63,6 +64,7 @@ export interface ActivityAddRequest {
|
|
|
63
64
|
dappUrl?: string;
|
|
64
65
|
dappName?: string;
|
|
65
66
|
integrationProvider?: IntegrationProvider;
|
|
67
|
+
knownPartialSignature?: string;
|
|
66
68
|
}
|
|
67
69
|
export interface Activity extends ActivityAddRequest {
|
|
68
70
|
id: string;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Utxo } from '../data-structures/utxo/Utxo';
|
|
2
|
+
import { TemporarySubAccount } from './proxy.types';
|
|
3
|
+
export interface BridgeQuote {
|
|
4
|
+
calldata: string;
|
|
5
|
+
expectedAmount: bigint;
|
|
6
|
+
nativeFee: bigint;
|
|
7
|
+
}
|
|
8
|
+
export interface BridgeRecipient {
|
|
9
|
+
recipientAddress: string;
|
|
10
|
+
bridgeAmount: bigint;
|
|
11
|
+
quote: BridgeQuote;
|
|
12
|
+
temporarySubAccount: TemporarySubAccount;
|
|
13
|
+
}
|
|
14
|
+
export interface BridgeRecipientUtxo extends BridgeRecipient {
|
|
15
|
+
utxo: Utxo;
|
|
16
|
+
nativeUtxo?: Utxo;
|
|
17
|
+
}
|
package/types/cache.types.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var E=(_=>(_.LAST_IGNORED_DEPOSIT_BALANCE_1K="lastIgnoredDepositBalance1K",_.LAST_IGNORED_DEPOSIT_BALANCE_10K="lastIgnoredDepositBalance10K",_.LAST_IGNORED_DEPOSIT_SCAM_TOKENS="lastIgnoredDepositScamTokens",_.LAST_IGNORED_DEPOSIT_TRANSACTIONS="lastIgnoredDepositTransactions",_.LOCAL_STORAGE_KEY_USER_ANALYTICS_CONSENT="userAnalyticsConsentPref",_.PASSWORD_HASH="passwordHash",_.LAST_ADDRESS="lastAddress",_.AUTO_LOCK_TIME="autoLockTime",_.TOKEN_REGISTRY="tokenRegistry",_.IS_BALANCE_HIDDEN="isBalanceHidden",_.SANDBOX_TRANSACTION_STATUS="sandboxTransactionStatus",_.SELECTED_SUB_ACCOUNT_ADDRESS="selectedSubAccountAddress",_.GENERATE_PROOF_REMOTELY="generateProofRemotely",_.IS_RELAYER_OFF="isRelayerOff",_.ONBOARDING_SHOWN="onboardingShown",_.GAS_COST_TOKEN="gasCostToken",_.PRIVATE_TOKENS="privateTokens",_.ALCHEMY_PUBLIC_TOKENS="alchemyPublicTokens",_.EVENTS_PUBLIC_TOKENS="eventsPublicTokens",_.ARC_PUBLIC_TOKENS="arcPublicTokens",_.PUBLIC_TOKENS_LAST_PROCESSED_BLOCKS="publicTokensLastProcessedBlocks",_.ACCEPTED_TERMS_OF_SERVICES="acceptedTermsOfServices",_.SLIPPAGE_PERCENTAGE="slippagePercentage",_.IS_SLIPPAGE_PERCENTAGE_CUSTOM="isSlippagePercentageCustom",_.MNEMONIC_PHRASE="mnemonicPhrase",_.SOURCE_MNEMONIC_PHRASE="sourceMnemonicPhrase",_.SELECTED_WALLET_ENVIRONMENT="selectedWalletEnvironment",_.IS_TOOLTIPS_ON="isTooltipsOn",_.CONNECTED_ADDRESS="connectedAddress",_.CONNECTED_SOLANA_ADDRESS="connectedSolanaAddress",_.CONNECTED_SESSIONS="connectedSessions",_.TX_ACTIVITY="tx-activity",_.IS_TOR_ROUTING_ON="isTorRoutingOn",_.EVENTS_PUBLIC_APPROVALS="eventsPublicApprovals",_.PUBLIC_APPROVALS_LAST_PROCESSED_BLOCKS="publicApprovalsLastProcessedBlocks",_.ACTIVE_SUB_ACCOUNT="activeSubAccount",_.SIGNED_MESSAGES="signedMessages",_.AUTO_SHIELD_IS_ON="autoShieldIsOn",_.MAX_GAS_IN_DOLLAR="maxGasInDollar",_.PENDING_SOLANA_SIGNATURES="pendingSolanaSignatures",_.ONBOARDING_TEMPORARY_PASSWORD="onboardingTemporaryPassword",_.STORAGE_KEY_LAST_SEEN_VERSION="hinkalLastSeenVersion",_.X_REFERRAL_LAST_CLICK="xReferralLastClick",_.HINKAL_GOOGLE_SESSION="hinkalGoogleSession",_.IS_CREATE_NEW_PUBLIC_WALLET_ON="isCreateNewPublicWalletOn",_.ANNOUNCEMENT_BANNER_LAST_CLOSED="announcementBannerLastClosed",_))(E||{});exports.StorageKeys=E;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var E=(_=>(_.LAST_IGNORED_DEPOSIT_BALANCE_1K="lastIgnoredDepositBalance1K",_.LAST_IGNORED_DEPOSIT_BALANCE_10K="lastIgnoredDepositBalance10K",_.LAST_IGNORED_DEPOSIT_SCAM_TOKENS="lastIgnoredDepositScamTokens",_.LAST_IGNORED_DEPOSIT_TRANSACTIONS="lastIgnoredDepositTransactions",_.LOCAL_STORAGE_KEY_USER_ANALYTICS_CONSENT="userAnalyticsConsentPref",_.PASSWORD_HASH="passwordHash",_.LAST_ADDRESS="lastAddress",_.AUTO_LOCK_TIME="autoLockTime",_.TOKEN_REGISTRY="tokenRegistry",_.IS_BALANCE_HIDDEN="isBalanceHidden",_.SANDBOX_TRANSACTION_STATUS="sandboxTransactionStatus",_.SELECTED_SUB_ACCOUNT_ADDRESS="selectedSubAccountAddress",_.GENERATE_PROOF_REMOTELY="generateProofRemotely",_.IS_RELAYER_OFF="isRelayerOff",_.ONBOARDING_SHOWN="onboardingShown",_.GAS_COST_TOKEN="gasCostToken",_.PRIVATE_TOKENS="privateTokens",_.ALCHEMY_PUBLIC_TOKENS="alchemyPublicTokens",_.EVENTS_PUBLIC_TOKENS="eventsPublicTokens",_.ARC_PUBLIC_TOKENS="arcPublicTokens",_.PUBLIC_TOKENS_LAST_PROCESSED_BLOCKS="publicTokensLastProcessedBlocks",_.ACCEPTED_TERMS_OF_SERVICES="acceptedTermsOfServices",_.SLIPPAGE_PERCENTAGE="slippagePercentage",_.IS_SLIPPAGE_PERCENTAGE_CUSTOM="isSlippagePercentageCustom",_.MNEMONIC_PHRASE="mnemonicPhrase",_.SOURCE_MNEMONIC_PHRASE="sourceMnemonicPhrase",_.SELECTED_WALLET_ENVIRONMENT="selectedWalletEnvironment",_.IS_TOOLTIPS_ON="isTooltipsOn",_.CONNECTED_ADDRESS="connectedAddress",_.CONNECTED_SOLANA_ADDRESS="connectedSolanaAddress",_.CONNECTED_SESSIONS="connectedSessions",_.TX_ACTIVITY="tx-activity",_.IS_TOR_ROUTING_ON="isTorRoutingOn",_.EVENTS_PUBLIC_APPROVALS="eventsPublicApprovals",_.PUBLIC_APPROVALS_LAST_PROCESSED_BLOCKS="publicApprovalsLastProcessedBlocks",_.ACTIVE_SUB_ACCOUNT="activeSubAccount",_.SIGNED_MESSAGES="signedMessages",_.AUTO_SHIELD_IS_ON="autoShieldIsOn",_.MAX_GAS_IN_DOLLAR="maxGasInDollar",_.PENDING_SOLANA_SIGNATURES="pendingSolanaSignatures",_.ONBOARDING_TEMPORARY_PASSWORD="onboardingTemporaryPassword",_.STORAGE_KEY_LAST_SEEN_VERSION="hinkalLastSeenVersion",_.X_REFERRAL_LAST_CLICK="xReferralLastClick",_.HINKAL_GOOGLE_SESSION="hinkalGoogleSession",_.IS_CREATE_NEW_PUBLIC_WALLET_ON="isCreateNewPublicWalletOn",_.DISGUISED_AS_METAMASK_HOSTS="disguisedAsMetamaskHosts",_.ANNOUNCEMENT_BANNER_LAST_CLOSED="announcementBannerLastClosed",_.CHAIN_ID_FILTER="chainIdFilter",_.SIGNATURE="signature",_.PUBLIC_ACCOUNT_DETAILS="publicAccountDetails",_))(E||{});exports.StorageKeys=E;
|
package/types/cache.types.d.ts
CHANGED
|
@@ -44,5 +44,9 @@ export declare enum StorageKeys {
|
|
|
44
44
|
X_REFERRAL_LAST_CLICK = "xReferralLastClick",
|
|
45
45
|
HINKAL_GOOGLE_SESSION = "hinkalGoogleSession",
|
|
46
46
|
IS_CREATE_NEW_PUBLIC_WALLET_ON = "isCreateNewPublicWalletOn",
|
|
47
|
-
|
|
47
|
+
DISGUISED_AS_METAMASK_HOSTS = "disguisedAsMetamaskHosts",
|
|
48
|
+
ANNOUNCEMENT_BANNER_LAST_CLOSED = "announcementBannerLastClosed",
|
|
49
|
+
CHAIN_ID_FILTER = "chainIdFilter",
|
|
50
|
+
SIGNATURE = "signature",
|
|
51
|
+
PUBLIC_ACCOUNT_DETAILS = "publicAccountDetails"
|
|
48
52
|
}
|
package/types/cache.types.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var E = /* @__PURE__ */ ((_) => (_.LAST_IGNORED_DEPOSIT_BALANCE_1K = "lastIgnoredDepositBalance1K", _.LAST_IGNORED_DEPOSIT_BALANCE_10K = "lastIgnoredDepositBalance10K", _.LAST_IGNORED_DEPOSIT_SCAM_TOKENS = "lastIgnoredDepositScamTokens", _.LAST_IGNORED_DEPOSIT_TRANSACTIONS = "lastIgnoredDepositTransactions", _.LOCAL_STORAGE_KEY_USER_ANALYTICS_CONSENT = "userAnalyticsConsentPref", _.PASSWORD_HASH = "passwordHash", _.LAST_ADDRESS = "lastAddress", _.AUTO_LOCK_TIME = "autoLockTime", _.TOKEN_REGISTRY = "tokenRegistry", _.IS_BALANCE_HIDDEN = "isBalanceHidden", _.SANDBOX_TRANSACTION_STATUS = "sandboxTransactionStatus", _.SELECTED_SUB_ACCOUNT_ADDRESS = "selectedSubAccountAddress", _.GENERATE_PROOF_REMOTELY = "generateProofRemotely", _.IS_RELAYER_OFF = "isRelayerOff", _.ONBOARDING_SHOWN = "onboardingShown", _.GAS_COST_TOKEN = "gasCostToken", _.PRIVATE_TOKENS = "privateTokens", _.ALCHEMY_PUBLIC_TOKENS = "alchemyPublicTokens", _.EVENTS_PUBLIC_TOKENS = "eventsPublicTokens", _.ARC_PUBLIC_TOKENS = "arcPublicTokens", _.PUBLIC_TOKENS_LAST_PROCESSED_BLOCKS = "publicTokensLastProcessedBlocks", _.ACCEPTED_TERMS_OF_SERVICES = "acceptedTermsOfServices", _.SLIPPAGE_PERCENTAGE = "slippagePercentage", _.IS_SLIPPAGE_PERCENTAGE_CUSTOM = "isSlippagePercentageCustom", _.MNEMONIC_PHRASE = "mnemonicPhrase", _.SOURCE_MNEMONIC_PHRASE = "sourceMnemonicPhrase", _.SELECTED_WALLET_ENVIRONMENT = "selectedWalletEnvironment", _.IS_TOOLTIPS_ON = "isTooltipsOn", _.CONNECTED_ADDRESS = "connectedAddress", _.CONNECTED_SOLANA_ADDRESS = "connectedSolanaAddress", _.CONNECTED_SESSIONS = "connectedSessions", _.TX_ACTIVITY = "tx-activity", _.IS_TOR_ROUTING_ON = "isTorRoutingOn", _.EVENTS_PUBLIC_APPROVALS = "eventsPublicApprovals", _.PUBLIC_APPROVALS_LAST_PROCESSED_BLOCKS = "publicApprovalsLastProcessedBlocks", _.ACTIVE_SUB_ACCOUNT = "activeSubAccount", _.SIGNED_MESSAGES = "signedMessages", _.AUTO_SHIELD_IS_ON = "autoShieldIsOn", _.MAX_GAS_IN_DOLLAR = "maxGasInDollar", _.PENDING_SOLANA_SIGNATURES = "pendingSolanaSignatures", _.ONBOARDING_TEMPORARY_PASSWORD = "onboardingTemporaryPassword", _.STORAGE_KEY_LAST_SEEN_VERSION = "hinkalLastSeenVersion", _.X_REFERRAL_LAST_CLICK = "xReferralLastClick", _.HINKAL_GOOGLE_SESSION = "hinkalGoogleSession", _.IS_CREATE_NEW_PUBLIC_WALLET_ON = "isCreateNewPublicWalletOn", _.ANNOUNCEMENT_BANNER_LAST_CLOSED = "announcementBannerLastClosed", _))(E || {});
|
|
1
|
+
var E = /* @__PURE__ */ ((_) => (_.LAST_IGNORED_DEPOSIT_BALANCE_1K = "lastIgnoredDepositBalance1K", _.LAST_IGNORED_DEPOSIT_BALANCE_10K = "lastIgnoredDepositBalance10K", _.LAST_IGNORED_DEPOSIT_SCAM_TOKENS = "lastIgnoredDepositScamTokens", _.LAST_IGNORED_DEPOSIT_TRANSACTIONS = "lastIgnoredDepositTransactions", _.LOCAL_STORAGE_KEY_USER_ANALYTICS_CONSENT = "userAnalyticsConsentPref", _.PASSWORD_HASH = "passwordHash", _.LAST_ADDRESS = "lastAddress", _.AUTO_LOCK_TIME = "autoLockTime", _.TOKEN_REGISTRY = "tokenRegistry", _.IS_BALANCE_HIDDEN = "isBalanceHidden", _.SANDBOX_TRANSACTION_STATUS = "sandboxTransactionStatus", _.SELECTED_SUB_ACCOUNT_ADDRESS = "selectedSubAccountAddress", _.GENERATE_PROOF_REMOTELY = "generateProofRemotely", _.IS_RELAYER_OFF = "isRelayerOff", _.ONBOARDING_SHOWN = "onboardingShown", _.GAS_COST_TOKEN = "gasCostToken", _.PRIVATE_TOKENS = "privateTokens", _.ALCHEMY_PUBLIC_TOKENS = "alchemyPublicTokens", _.EVENTS_PUBLIC_TOKENS = "eventsPublicTokens", _.ARC_PUBLIC_TOKENS = "arcPublicTokens", _.PUBLIC_TOKENS_LAST_PROCESSED_BLOCKS = "publicTokensLastProcessedBlocks", _.ACCEPTED_TERMS_OF_SERVICES = "acceptedTermsOfServices", _.SLIPPAGE_PERCENTAGE = "slippagePercentage", _.IS_SLIPPAGE_PERCENTAGE_CUSTOM = "isSlippagePercentageCustom", _.MNEMONIC_PHRASE = "mnemonicPhrase", _.SOURCE_MNEMONIC_PHRASE = "sourceMnemonicPhrase", _.SELECTED_WALLET_ENVIRONMENT = "selectedWalletEnvironment", _.IS_TOOLTIPS_ON = "isTooltipsOn", _.CONNECTED_ADDRESS = "connectedAddress", _.CONNECTED_SOLANA_ADDRESS = "connectedSolanaAddress", _.CONNECTED_SESSIONS = "connectedSessions", _.TX_ACTIVITY = "tx-activity", _.IS_TOR_ROUTING_ON = "isTorRoutingOn", _.EVENTS_PUBLIC_APPROVALS = "eventsPublicApprovals", _.PUBLIC_APPROVALS_LAST_PROCESSED_BLOCKS = "publicApprovalsLastProcessedBlocks", _.ACTIVE_SUB_ACCOUNT = "activeSubAccount", _.SIGNED_MESSAGES = "signedMessages", _.AUTO_SHIELD_IS_ON = "autoShieldIsOn", _.MAX_GAS_IN_DOLLAR = "maxGasInDollar", _.PENDING_SOLANA_SIGNATURES = "pendingSolanaSignatures", _.ONBOARDING_TEMPORARY_PASSWORD = "onboardingTemporaryPassword", _.STORAGE_KEY_LAST_SEEN_VERSION = "hinkalLastSeenVersion", _.X_REFERRAL_LAST_CLICK = "xReferralLastClick", _.HINKAL_GOOGLE_SESSION = "hinkalGoogleSession", _.IS_CREATE_NEW_PUBLIC_WALLET_ON = "isCreateNewPublicWalletOn", _.DISGUISED_AS_METAMASK_HOSTS = "disguisedAsMetamaskHosts", _.ANNOUNCEMENT_BANNER_LAST_CLOSED = "announcementBannerLastClosed", _.CHAIN_ID_FILTER = "chainIdFilter", _.SIGNATURE = "signature", _.PUBLIC_ACCOUNT_DETAILS = "publicAccountDetails", _))(E || {});
|
|
2
2
|
export {
|
|
3
3
|
E as StorageKeys
|
|
4
4
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var e=(t=>(t.NewBlockchainEvents="NewBlockchainEvents",t))(e||{}),n=(t=>(t.MainContractEvents="MainContractEvents",t.AccessTokenContractEvents="AccessTokenContractEvents",t))(n||{});exports.EventCategory=n;exports.SocketIOEvents=e;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { BlockchainEvent } from '../data-structures/BlockchainEvent/BlockchainEvent';
|
|
2
|
+
export type EventProcessorFunction = (events: BlockchainEvent[]) => Promise<number> | number;
|
|
3
|
+
export declare enum SocketIOEvents {
|
|
4
|
+
NewBlockchainEvents = "NewBlockchainEvents"
|
|
5
|
+
}
|
|
6
|
+
export declare enum EventCategory {
|
|
7
|
+
MainContractEvents = "MainContractEvents",
|
|
8
|
+
AccessTokenContractEvents = "AccessTokenContractEvents"
|
|
9
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
var t = /* @__PURE__ */ ((n) => (n.NewBlockchainEvents = "NewBlockchainEvents", n))(t || {}), e = /* @__PURE__ */ ((n) => (n.MainContractEvents = "MainContractEvents", n.AccessTokenContractEvents = "AccessTokenContractEvents", n))(e || {});
|
|
2
|
+
export {
|
|
3
|
+
e as EventCategory,
|
|
4
|
+
t as SocketIOEvents
|
|
5
|
+
};
|
package/types/index.d.ts
CHANGED
package/types/proxy.types.d.ts
CHANGED
|
@@ -1,11 +1,18 @@
|
|
|
1
1
|
export type SubAccount = {
|
|
2
2
|
index: number | null;
|
|
3
|
-
ethAddress
|
|
4
|
-
solanaAddress
|
|
3
|
+
ethAddress?: string;
|
|
4
|
+
solanaAddress?: string;
|
|
5
5
|
name: string;
|
|
6
6
|
createdAt: string;
|
|
7
7
|
isHidden: boolean;
|
|
8
|
-
|
|
8
|
+
isFavorite: boolean;
|
|
9
|
+
privateKey?: string;
|
|
10
|
+
solanaPrivateKey?: string;
|
|
9
11
|
isImported: boolean;
|
|
10
12
|
};
|
|
11
|
-
export type SubAccountLight = Omit<SubAccount, 'privateKey' | 'isImported'>;
|
|
13
|
+
export type SubAccountLight = Omit<SubAccount, 'privateKey' | 'solanaPrivateKey' | 'isImported'>;
|
|
14
|
+
export type TemporarySubAccount = {
|
|
15
|
+
index: number;
|
|
16
|
+
ethAddress: string;
|
|
17
|
+
privateKey: string;
|
|
18
|
+
};
|
package/types/sandbox.types.d.ts
CHANGED
|
@@ -113,6 +113,7 @@ export interface SwapTokensRequest {
|
|
|
113
113
|
feeStructure?: FeeStructure;
|
|
114
114
|
bridgedToken?: ERC20Token;
|
|
115
115
|
bridgedTokenAmount?: bigint;
|
|
116
|
+
extraNativeTokenFee?: bigint;
|
|
116
117
|
}
|
|
117
118
|
export interface ProxySwapTokensRequest {
|
|
118
119
|
type: SandboxRequestType.ProxySwapTokens;
|
|
@@ -129,6 +130,7 @@ export interface ProxySwapTokensRequest {
|
|
|
129
130
|
feeStructure?: FeeStructure;
|
|
130
131
|
bridgedToken?: ERC20Token;
|
|
131
132
|
bridgedTokenAmount?: bigint;
|
|
133
|
+
extraNativeTokenFee?: bigint;
|
|
132
134
|
autoDepositBack?: boolean;
|
|
133
135
|
maxGasInDollar?: string;
|
|
134
136
|
}
|
package/types/solana.types.d.ts
CHANGED
|
@@ -2,6 +2,14 @@ import { PublicKey, Transaction, VersionedTransaction } from '@solana/web3.js';
|
|
|
2
2
|
import { DimDataType } from './circom-data.types';
|
|
3
3
|
import { OKXAccount } from './okx.types';
|
|
4
4
|
import { AdminDataType } from './admin.types';
|
|
5
|
+
export interface SolanaEvent {
|
|
6
|
+
signature: string;
|
|
7
|
+
slot: number;
|
|
8
|
+
blockTime: number;
|
|
9
|
+
programId: PublicKey;
|
|
10
|
+
data: any;
|
|
11
|
+
eventName: string;
|
|
12
|
+
}
|
|
5
13
|
export type SolanaWallet = {
|
|
6
14
|
publicKey: PublicKey;
|
|
7
15
|
signTransaction<T extends Transaction | VersionedTransaction>(tx: T): Promise<T>;
|
package/types/token.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-Be5av2bX.js").href:new URL("../../assets/snarkjsWorkerLauncher-Be5av2bX.js",document.currentScript&&document.currentScript.src||document.baseURI).href);module.exports=e;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=""+(typeof document>"u"?require("url").pathToFileURL(__dirname+"/../../assets/utxoWorkerLauncher-
|
|
1
|
+
"use strict";const e=""+(typeof document>"u"?require("url").pathToFileURL(__dirname+"/../../assets/utxoWorkerLauncher-C9K_yMfB.js").href:new URL("../../assets/utxoWorkerLauncher-C9K_yMfB.js",document.currentScript&&document.currentScript.src||document.baseURI).href);module.exports=e;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=""+(typeof document>"u"?require("url").pathToFileURL(__dirname+"/../../assets/zkProofWorkerLauncher-
|
|
1
|
+
"use strict";const e=""+(typeof document>"u"?require("url").pathToFileURL(__dirname+"/../../assets/zkProofWorkerLauncher-Bbz8Z-5R.js").href:new URL("../../assets/zkProofWorkerLauncher-Bbz8Z-5R.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 u=require("uuid"),g=require("./openDefaultPassportWindow.cjs"),t={verifyMessageText:"Sign this message to prove your ownership of this address and proceed with the identity verification process.",domainName:"Hinkal",type:{Message:[{name:"content",type:"string"},{name:"for",type:"string"},{name:"timestamp",type:"string"},{name:"nonce",type:"string"}]}},l=async(n,r,a)=>{try{const{domainName:e,type:i}=t,s=u.v4(),o=Date.now().toString(),c={name:e},d={content:t.verifyMessageText,for:e,timestamp:o,nonce:s},p=await n.signTypedData(c,i,d),m=await n.getEthereumAddress(),y=`${a}verify/${e}?address=${m}&ts=${o}&nonce=${s}&signature=${p}&levelType=BASIC`;g.openDefaultPassportWindow(y,r,700,510)}catch(e){console.error("authentoHelper error: ",e)}};exports.AUTHENTO=t;exports.authentoKycHandler=l;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { IHinkal } from '../../data-structures/Hinkal/IHinkal';
|
|
2
|
-
export declare const AUTHENTO: {
|
|
3
|
-
verifyMessageText: string;
|
|
4
|
-
domainName: string;
|
|
5
|
-
type: {
|
|
6
|
-
Message: {
|
|
7
|
-
name: string;
|
|
8
|
-
type: string;
|
|
9
|
-
}[];
|
|
10
|
-
};
|
|
11
|
-
};
|
|
12
|
-
export declare const authentoKycHandler: (hinkal: IHinkal, shortName: string, onboardURL: string) => Promise<void>;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { v4 as g } from "uuid";
|
|
2
|
-
import { openDefaultPassportWindow as f } from "./openDefaultPassportWindow.mjs";
|
|
3
|
-
const o = {
|
|
4
|
-
verifyMessageText: "Sign this message to prove your ownership of this address and proceed with the identity verification process.",
|
|
5
|
-
domainName: "Hinkal",
|
|
6
|
-
type: {
|
|
7
|
-
Message: [
|
|
8
|
-
{ name: "content", type: "string" },
|
|
9
|
-
{ name: "for", type: "string" },
|
|
10
|
-
{ name: "timestamp", type: "string" },
|
|
11
|
-
{ name: "nonce", type: "string" }
|
|
12
|
-
]
|
|
13
|
-
}
|
|
14
|
-
}, l = async (t, r, a) => {
|
|
15
|
-
try {
|
|
16
|
-
const { domainName: e, type: i } = o, n = g(), s = Date.now().toString(), c = { name: e }, m = {
|
|
17
|
-
content: o.verifyMessageText,
|
|
18
|
-
for: e,
|
|
19
|
-
timestamp: s,
|
|
20
|
-
nonce: n
|
|
21
|
-
}, p = await t.signTypedData(c, i, m), d = await t.getEthereumAddress(), y = `${a}verify/${e}?address=${d}&ts=${s}&nonce=${n}&signature=${p}&levelType=BASIC`;
|
|
22
|
-
f(y, r, 700, 510);
|
|
23
|
-
} catch (e) {
|
|
24
|
-
console.error("authentoHelper error: ", e);
|
|
25
|
-
}
|
|
26
|
-
};
|
|
27
|
-
export {
|
|
28
|
-
o as AUTHENTO,
|
|
29
|
-
l as authentoKycHandler
|
|
30
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../../API/getServerURL.cjs");require("axios");require("../../constants/coingecko.constants.cjs");require("../../constants/server.constants.cjs");require("../../data-structures/http/HttpClient.cjs");const a=require("../../API/API.cjs");require("../../API/tenderly.api.cjs");require("../../constants/token-data/index.cjs");require("../../constants/chains.constants.cjs");require("../../constants/contracts.constants.cjs");require("../../constants/kyc.constants.cjs");require("../../constants/vite.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");const l=async(s,n)=>{const r=s.getApprovedUtxos(n);if(r.length===0)return[];const o=[...new Set(r.map(e=>e.tokenAddress.toLowerCase()))],i=(await a.API.tokensInfoCall(n,o)).filter(e=>!!e),u=new Map(i.map(e=>[e.erc20TokenAddress.toLowerCase(),e]));return r.map(e=>{const t=u.get(e.tokenAddress.toLowerCase());return t?{token:t,spenderAddress:e.interactionAddress,allowance:e.amount}:null}).filter(e=>e!==null&&e.allowance>0n)};exports.getHinkalApprovals=l;
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import "../../API/getServerURL.mjs";
|
|
2
|
-
import "axios";
|
|
3
|
-
import "../../constants/coingecko.constants.mjs";
|
|
4
|
-
import "../../constants/server.constants.mjs";
|
|
5
|
-
import "../../data-structures/http/HttpClient.mjs";
|
|
6
|
-
import { API as m } from "../../API/API.mjs";
|
|
7
|
-
import "../../API/tenderly.api.mjs";
|
|
8
|
-
import "../../constants/token-data/index.mjs";
|
|
9
|
-
import "../../constants/chains.constants.mjs";
|
|
10
|
-
import "../../constants/contracts.constants.mjs";
|
|
11
|
-
import "../../constants/kyc.constants.mjs";
|
|
12
|
-
import "../../constants/vite.constants.mjs";
|
|
13
|
-
import "../../constants/reorg-depths.constants.mjs";
|
|
14
|
-
import "../../constants/addresses.constants.mjs";
|
|
15
|
-
import "../../constants/token.limits.constants.mjs";
|
|
16
|
-
import "../../constants/presale.constants.mjs";
|
|
17
|
-
import "../../constants/activity.constants.mjs";
|
|
18
|
-
import "../../constants/tasks.constants.mjs";
|
|
19
|
-
import "../../constants/events.constants.mjs";
|
|
20
|
-
const H = async (n, r) => {
|
|
21
|
-
const t = n.getApprovedUtxos(r);
|
|
22
|
-
if (t.length === 0)
|
|
23
|
-
return [];
|
|
24
|
-
const p = [...new Set(t.map((o) => o.tokenAddress.toLowerCase()))], s = (await m.tokensInfoCall(r, p)).filter(
|
|
25
|
-
(o) => !!o
|
|
26
|
-
), i = new Map(s.map((o) => [o.erc20TokenAddress.toLowerCase(), o]));
|
|
27
|
-
return t.map((o) => {
|
|
28
|
-
const e = i.get(o.tokenAddress.toLowerCase());
|
|
29
|
-
return e ? {
|
|
30
|
-
token: e,
|
|
31
|
-
spenderAddress: o.interactionAddress,
|
|
32
|
-
allowance: o.amount
|
|
33
|
-
} : null;
|
|
34
|
-
}).filter((o) => o !== null && o.allowance > 0n);
|
|
35
|
-
};
|
|
36
|
-
export {
|
|
37
|
-
H as getHinkalApprovals
|
|
38
|
-
};
|