@hinkal/common 0.3.12 → 0.3.14
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/README.md +67 -4
- package/common/src/API/API.cjs +1 -1
- package/common/src/API/API.d.ts +3 -2
- package/common/src/API/API.mjs +92 -91
- package/common/src/API/admin-calls.cjs +1 -1
- package/common/src/API/admin-calls.d.ts +2 -1
- package/common/src/API/admin-calls.mjs +1 -0
- package/common/src/API/evm-token-assets.cjs +1 -0
- package/common/src/API/evm-token-assets.mjs +3 -0
- package/common/src/API/get-token-price-chart-data.cjs +1 -1
- package/common/src/API/get-token-price-chart-data.mjs +2 -2
- package/common/src/API/getTokenPrice.cjs +1 -1
- package/common/src/API/getTokenPrice.mjs +2 -2
- package/common/src/API/index.cjs +1 -1
- package/common/src/API/index.d.ts +2 -0
- package/common/src/API/index.mjs +2 -0
- package/common/src/API/privacy-score-calls.cjs +1 -1
- package/common/src/API/privacy-score-calls.mjs +2 -2
- package/common/src/API/receiveVaultCalls.cjs +1 -0
- package/common/src/API/receiveVaultCalls.d.ts +12 -0
- package/common/src/API/receiveVaultCalls.mjs +36 -0
- package/common/src/constants/chains.constants.cjs +1 -1
- package/common/src/constants/chains.constants.d.ts +2 -0
- package/common/src/constants/chains.constants.mjs +106 -93
- package/common/src/constants/coingecko.constants.cjs +1 -1
- package/common/src/constants/coingecko.constants.d.ts +2 -0
- package/common/src/constants/coingecko.constants.mjs +1 -1
- package/common/src/constants/contracts.constants.cjs +1 -1
- package/common/src/constants/contracts.constants.mjs +5 -1
- package/common/src/constants/deploy-data/deploy-data-arbMainnet.json.cjs +1 -1
- package/common/src/constants/deploy-data/deploy-data-arbMainnet.json.mjs +3 -1
- package/common/src/constants/deploy-data/deploy-data-arcTestnet.json.cjs +1 -1
- package/common/src/constants/deploy-data/deploy-data-arcTestnet.json.mjs +4 -2
- package/common/src/constants/deploy-data/deploy-data-base.json.cjs +1 -1
- package/common/src/constants/deploy-data/deploy-data-base.json.mjs +3 -1
- package/common/src/constants/deploy-data/deploy-data-bnbMainnet.json.cjs +1 -1
- package/common/src/constants/deploy-data/deploy-data-bnbMainnet.json.mjs +3 -1
- package/common/src/constants/deploy-data/deploy-data-ethMainnet.json.cjs +1 -1
- package/common/src/constants/deploy-data/deploy-data-ethMainnet.json.mjs +3 -1
- package/common/src/constants/deploy-data/deploy-data-localhost.json.cjs +1 -1
- package/common/src/constants/deploy-data/deploy-data-localhost.json.mjs +2 -1
- package/common/src/constants/deploy-data/deploy-data-optimism.json.cjs +1 -1
- package/common/src/constants/deploy-data/deploy-data-optimism.json.mjs +2 -1
- package/common/src/constants/deploy-data/deploy-data-optimismTest.json.cjs +1 -1
- package/common/src/constants/deploy-data/deploy-data-optimismTest.json.mjs +2 -1
- package/common/src/constants/deploy-data/deploy-data-polygon.json.cjs +1 -1
- package/common/src/constants/deploy-data/deploy-data-polygon.json.mjs +3 -1
- package/common/src/constants/deploy-data/deploy-data-sepoliaTestnet.json.cjs +1 -1
- package/common/src/constants/deploy-data/deploy-data-sepoliaTestnet.json.mjs +2 -1
- package/common/src/constants/deploy-data/deploy-data-solanaDevnet.json.cjs +1 -0
- package/common/src/constants/deploy-data/deploy-data-solanaDevnet.json.mjs +6 -0
- package/common/src/constants/deploy-data/deploy-data-tempo.json.cjs +1 -1
- package/common/src/constants/deploy-data/deploy-data-tempo.json.mjs +3 -1
- package/common/src/constants/deploy-data/deploy-data-tronMainnet.json.cjs +1 -1
- package/common/src/constants/deploy-data/deploy-data-tronMainnet.json.mjs +2 -1
- package/common/src/constants/deploy-data/deploy-data-tronNile.json.cjs +1 -1
- package/common/src/constants/deploy-data/deploy-data-tronNile.json.mjs +2 -1
- package/common/src/constants/deploy-data/index.cjs +1 -1
- package/common/src/constants/deploy-data/index.d.ts +2 -1
- package/common/src/constants/deploy-data/index.mjs +7 -6
- package/common/src/constants/deploy-data/shared-deploy-data-evm.json.cjs +1 -1
- package/common/src/constants/deploy-data/shared-deploy-data-evm.json.mjs +2 -1
- package/common/src/constants/deploy-data/shared-deploy-data-solana.json.cjs +1 -1
- package/common/src/constants/deploy-data/shared-deploy-data-solana.json.mjs +1 -1
- package/common/src/constants/deploy-data/shared-deploy-data-tron.json.cjs +1 -1
- package/common/src/constants/deploy-data/shared-deploy-data-tron.json.mjs +3 -2
- package/common/src/constants/events.constants.d.ts +1 -0
- package/common/src/constants/index.cjs +1 -1
- package/common/src/constants/index.mjs +1 -1
- package/common/src/constants/protocol.constants.cjs +2 -2
- package/common/src/constants/protocol.constants.d.ts +4 -0
- package/common/src/constants/protocol.constants.mjs +2 -2
- package/common/src/constants/save-depths.cjs +1 -1
- package/common/src/constants/save-depths.d.ts +1 -0
- package/common/src/constants/save-depths.mjs +1 -0
- package/common/src/constants/server.constants.cjs +1 -1
- package/common/src/constants/server.constants.d.ts +13 -6
- package/common/src/constants/server.constants.mjs +13 -6
- package/common/src/constants/tokens.constants.cjs +1 -1
- package/common/src/constants/tokens.constants.mjs +1 -1
- package/common/src/data-structures/Hinkal/Hinkal.cjs +1 -1
- package/common/src/data-structures/Hinkal/Hinkal.d.ts +8 -4
- package/common/src/data-structures/Hinkal/Hinkal.mjs +85 -73
- package/common/src/data-structures/Hinkal/IHinkal.d.ts +8 -4
- package/common/src/data-structures/Hinkal/handleAutoDepositBack.cjs +1 -1
- package/common/src/data-structures/Hinkal/handleAutoDepositBack.mjs +14 -14
- package/common/src/data-structures/Hinkal/hinkalActionReceive.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalActionReceive.mjs +4 -4
- package/common/src/data-structures/Hinkal/hinkalBridgePrivateToPrivate.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalBridgePrivateToPrivate.mjs +24 -24
- package/common/src/data-structures/Hinkal/hinkalDepositAndBridge.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalDepositAndBridge.mjs +72 -71
- package/common/src/data-structures/Hinkal/hinkalDepositAndWithdraw.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalDepositAndWithdraw.mjs +64 -61
- package/common/src/data-structures/Hinkal/hinkalPrivateWallet.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalPrivateWallet.d.ts +1 -1
- package/common/src/data-structures/Hinkal/hinkalPrivateWallet.mjs +29 -29
- package/common/src/data-structures/Hinkal/hinkalProoflessDeposit.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalProoflessDeposit.d.ts +1 -1
- package/common/src/data-structures/Hinkal/hinkalProoflessDeposit.mjs +22 -22
- package/common/src/data-structures/Hinkal/hinkalProoflessDeposit.utils.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalProoflessDeposit.utils.mjs +8 -8
- package/common/src/data-structures/Hinkal/hinkalProxySwap.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalProxySwap.mjs +6 -6
- package/common/src/data-structures/Hinkal/hinkalProxyToPrivate.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalProxyToPrivate.mjs +4 -4
- package/common/src/data-structures/Hinkal/hinkalReceiveVaultAccount.cjs +1 -0
- package/common/src/data-structures/Hinkal/hinkalReceiveVaultAccount.d.ts +3 -0
- package/common/src/data-structures/Hinkal/hinkalReceiveVaultAccount.mjs +12 -0
- package/common/src/data-structures/Hinkal/hinkalReceiveVaultCreate.cjs +1 -0
- package/common/src/data-structures/Hinkal/hinkalReceiveVaultCreate.d.ts +3 -0
- package/common/src/data-structures/Hinkal/hinkalReceiveVaultCreate.mjs +29 -0
- package/common/src/data-structures/Hinkal/hinkalReceiveVaultRecover.cjs +1 -0
- package/common/src/data-structures/Hinkal/hinkalReceiveVaultRecover.d.ts +5 -0
- package/common/src/data-structures/Hinkal/hinkalReceiveVaultRecover.mjs +66 -0
- package/common/src/data-structures/Hinkal/hinkalReceiveVaultSettle.cjs +1 -0
- package/common/src/data-structures/Hinkal/hinkalReceiveVaultSettle.d.ts +6 -0
- package/common/src/data-structures/Hinkal/hinkalReceiveVaultSettle.mjs +8 -0
- package/common/src/data-structures/Hinkal/hinkalSolanaDeposit.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalSolanaDeposit.d.ts +2 -2
- package/common/src/data-structures/Hinkal/hinkalSolanaDeposit.mjs +54 -62
- package/common/src/data-structures/Hinkal/hinkalSolanaDepositAndWithdraw.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalSolanaDepositAndWithdraw.mjs +72 -70
- package/common/src/data-structures/Hinkal/hinkalSolanaProxySend.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalSolanaProxySend.mjs +9 -9
- package/common/src/data-structures/Hinkal/hinkalSolanaProxyShield.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalSolanaProxyShield.mjs +20 -20
- package/common/src/data-structures/Hinkal/hinkalSolanaProxySwap.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalSolanaProxySwap.d.ts +1 -1
- package/common/src/data-structures/Hinkal/hinkalSolanaProxySwap.mjs +49 -47
- package/common/src/data-structures/Hinkal/hinkalSolanaReceiveVault.cjs +1 -0
- package/common/src/data-structures/Hinkal/hinkalSolanaReceiveVault.d.ts +5 -0
- package/common/src/data-structures/Hinkal/hinkalSolanaReceiveVault.mjs +60 -0
- package/common/src/data-structures/Hinkal/hinkalSolanaTransfer.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalSolanaTransfer.mjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalSolanaWithdraw.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalSolanaWithdraw.mjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalTransact.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalTransact.mjs +7 -6
- package/common/src/data-structures/Hinkal/hinkalTransfer.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalTransfer.mjs +4 -4
- package/common/src/data-structures/Hinkal/hinkalWithdraw.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalWithdraw.mjs +35 -26
- package/common/src/data-structures/Hinkal/index.d.ts +5 -0
- package/common/src/data-structures/Hinkal/resetMerkleTrees.cjs +1 -1
- package/common/src/data-structures/Hinkal/resetMerkleTrees.mjs +13 -13
- package/common/src/data-structures/TokenDBs/AlchemyPublicTokensDB.d.ts +0 -3
- package/common/src/data-structures/TokenDBs/EventsPublicTokensDB.d.ts +0 -1
- package/common/src/data-structures/TokenDBs/TronPublicTokensDB.d.ts +0 -2
- package/common/src/data-structures/crypto-keys/index.cjs +1 -1
- package/common/src/data-structures/crypto-keys/index.mjs +1 -1
- package/common/src/error-handling/error-codes.constants.cjs +1 -1
- package/common/src/error-handling/error-codes.constants.d.ts +6 -0
- package/common/src/error-handling/error-codes.constants.mjs +7 -2
- package/common/src/error-handling/get-error.message.cjs +1 -1
- package/common/src/error-handling/get-error.message.mjs +59 -49
- package/common/src/functions/index.cjs +1 -1
- package/common/src/functions/index.mjs +8 -3
- package/common/src/functions/pre-transaction/addressTableLookup.d.ts +1 -0
- package/common/src/functions/pre-transaction/build-proofless-deposit-fee.cjs +1 -0
- package/common/src/functions/pre-transaction/build-proofless-deposit-fee.d.ts +4 -0
- package/common/src/functions/pre-transaction/build-proofless-deposit-fee.mjs +3 -0
- package/common/src/functions/pre-transaction/calculateSolanaNullifierCount.cjs +1 -1
- package/common/src/functions/pre-transaction/calculateSolanaNullifierCount.mjs +7 -7
- package/common/src/functions/pre-transaction/constructAdminData.cjs +1 -1
- package/common/src/functions/pre-transaction/constructAdminData.mjs +4 -3
- package/common/src/functions/pre-transaction/index.cjs +1 -1
- package/common/src/functions/pre-transaction/index.d.ts +1 -0
- package/common/src/functions/pre-transaction/index.mjs +1 -0
- package/common/src/functions/pre-transaction/sendV0Transaction.cjs +1 -1
- package/common/src/functions/pre-transaction/sendV0Transaction.d.ts +1 -0
- package/common/src/functions/pre-transaction/sendV0Transaction.mjs +22 -2
- package/common/src/functions/private-wallet/emporium.helpers.cjs +1 -1
- package/common/src/functions/private-wallet/emporium.helpers.mjs +15 -15
- package/common/src/functions/snarkjs/constructTxEnclaveVerify.cjs +1 -1
- package/common/src/functions/snarkjs/constructTxEnclaveVerify.mjs +2 -1
- package/common/src/functions/snarkjs/fetchOnChainRootHashes.cjs +1 -1
- package/common/src/functions/snarkjs/fetchOnChainRootHashes.mjs +6 -6
- package/common/src/functions/utils/abi.utils.cjs +1 -1
- package/common/src/functions/utils/abi.utils.mjs +4 -1
- package/common/src/functions/utils/addresses.cjs +1 -1
- package/common/src/functions/utils/addresses.d.ts +4 -0
- package/common/src/functions/utils/addresses.mjs +17 -17
- package/common/src/functions/utils/admin-dimensions.cjs +1 -0
- package/common/src/functions/utils/admin-dimensions.d.ts +4 -0
- package/common/src/functions/utils/admin-dimensions.mjs +206 -0
- package/common/src/functions/utils/create-provider.cjs +1 -1
- package/common/src/functions/utils/create-provider.mjs +5 -1
- package/common/src/functions/utils/encryptInputForEnclave.cjs +1 -1
- package/common/src/functions/utils/encryptInputForEnclave.d.ts +2 -1
- package/common/src/functions/utils/encryptInputForEnclave.mjs +1 -1
- package/common/src/functions/utils/erc20tokenFunctions.cjs +1 -1
- package/common/src/functions/utils/erc20tokenFunctions.mjs +11 -11
- package/common/src/functions/utils/fees.utils.cjs +1 -1
- package/common/src/functions/utils/fees.utils.d.ts +2 -0
- package/common/src/functions/utils/fees.utils.mjs +31 -33
- package/common/src/functions/utils/gas-token.utils.cjs +1 -0
- package/common/src/functions/utils/gas-token.utils.d.ts +3 -0
- package/common/src/functions/utils/gas-token.utils.mjs +7 -0
- package/common/src/functions/utils/getSignerFromContract.cjs +1 -1
- package/common/src/functions/utils/getSignerFromContract.d.ts +1 -1
- package/common/src/functions/utils/getSignerFromContract.mjs +2 -2
- package/common/src/functions/utils/getUtxosFromReceipt.utils.cjs +1 -1
- package/common/src/functions/utils/getUtxosFromReceipt.utils.mjs +1 -1
- package/common/src/functions/utils/getUtxosFromReceiptSolana.cjs +1 -1
- package/common/src/functions/utils/getUtxosFromReceiptSolana.d.ts +9 -4
- package/common/src/functions/utils/getUtxosFromReceiptSolana.mjs +1 -1
- package/common/src/functions/utils/index.cjs +1 -1
- package/common/src/functions/utils/index.d.ts +5 -0
- package/common/src/functions/utils/index.mjs +7 -2
- package/common/src/functions/utils/isSigner.cjs +1 -0
- package/common/src/functions/utils/isSigner.d.ts +2 -0
- package/common/src/functions/utils/isSigner.mjs +7 -0
- package/common/src/functions/utils/publicBalance.utils.cjs +1 -1
- package/common/src/functions/utils/publicBalance.utils.mjs +7 -7
- package/common/src/functions/utils/receive-vault-account.utils.cjs +1 -0
- package/common/src/functions/utils/receive-vault-account.utils.d.ts +9 -0
- package/common/src/functions/utils/receive-vault-account.utils.mjs +24 -0
- package/common/src/functions/utils/receive-vault-scan.utils.cjs +1 -0
- package/common/src/functions/utils/receive-vault-scan.utils.d.ts +2 -0
- package/common/src/functions/utils/receive-vault-scan.utils.mjs +55 -0
- package/common/src/functions/utils/receive-vault-solana.utils.cjs +1 -0
- package/common/src/functions/utils/receive-vault-solana.utils.d.ts +8 -0
- package/common/src/functions/utils/receive-vault-solana.utils.mjs +45 -0
- package/common/src/functions/utils/receive-vault.utils.cjs +2 -0
- package/common/src/functions/utils/receive-vault.utils.d.ts +31 -0
- package/common/src/functions/utils/receive-vault.utils.mjs +166 -0
- package/common/src/functions/utils/string.utils.cjs +1 -1
- package/common/src/functions/utils/string.utils.mjs +12 -4
- package/common/src/functions/utils/temporary-wallet-recovery.utils.cjs +1 -1
- package/common/src/functions/utils/temporary-wallet-recovery.utils.mjs +1 -1
- package/common/src/functions/utils/token-check.utils.d.ts +1 -0
- package/common/src/functions/utils/transfer-claimable.utils.cjs +1 -1
- package/common/src/functions/utils/transfer-claimable.utils.mjs +1 -1
- package/common/src/functions/utils/wallet-token-discovery.utils.cjs +1 -0
- package/common/src/functions/utils/wallet-token-discovery.utils.d.ts +9 -0
- package/common/src/functions/utils/wallet-token-discovery.utils.mjs +30 -0
- package/common/src/functions/web3/functionCalls/transactCallDirect.cjs +1 -1
- package/common/src/functions/web3/functionCalls/transactCallDirect.mjs +11 -11
- package/common/src/functions/web3/getContractMetadata.cjs +1 -1
- package/common/src/functions/web3/getContractMetadata.mjs +6 -6
- package/common/src/functions/web3/index.cjs +1 -1
- package/common/src/functions/web3/index.mjs +1 -1
- package/common/src/types/admin.types.cjs +1 -1
- package/common/src/types/admin.types.d.ts +64 -9
- package/common/src/types/admin.types.mjs +10 -2
- package/common/src/types/connector.types.d.ts +1 -0
- package/common/src/types/ethereum-network.types.cjs +1 -1
- package/common/src/types/ethereum-network.types.d.ts +5 -1
- package/common/src/types/ethereum-network.types.mjs +1 -1
- package/common/src/types/external-action.types.cjs +1 -1
- package/common/src/types/external-action.types.d.ts +3 -1
- package/common/src/types/external-action.types.mjs +1 -1
- package/common/src/types/index.cjs +1 -1
- package/common/src/types/index.d.ts +1 -0
- package/common/src/types/index.mjs +1 -0
- package/common/src/types/receive-vault.types.cjs +1 -0
- package/common/src/types/receive-vault.types.d.ts +63 -0
- package/common/src/types/receive-vault.types.mjs +8 -0
- package/common/src/types/remote-tx-build.types.d.ts +5 -0
- package/common/src/webworker/{logError-cvFNxc-0.js → logError-C-ej_TX9.js} +1 -1
- package/common/src/webworker/package.json +10 -1
- package/common/src/webworker/snarkjsWorker/snarkjsWorkerLauncher.ts?worker&url.cjs +1 -1
- package/common/src/webworker/snarkjsWorker/snarkjsWorkerLauncher.ts?worker&url.mjs +1 -1
- package/common/src/webworker/snarkjsWorkerNode.cjs +1 -1
- package/common/src/webworker/utxoWorker/utxoWorkerLauncher.ts?worker&url.cjs +1 -1
- package/common/src/webworker/utxoWorker/utxoWorkerLauncher.ts?worker&url.mjs +1 -1
- package/common/src/webworker/utxoWorkerNode.cjs +1 -1
- package/common/src/webworker/viteWorkerURL.constant.cjs +3 -3
- package/common/src/webworker/viteWorkerURL.constant.mjs +3 -3
- package/common/src/webworker/workerProxy-CE-rYA3W.js +1 -0
- package/common/src/webworker/zkProofWorker/zkProofWorkerLauncher.ts?worker&url.cjs +1 -1
- package/common/src/webworker/zkProofWorker/zkProofWorkerLauncher.ts?worker&url.mjs +1 -1
- package/common/src/webworker/zkProofWorkerNode.cjs +1 -1
- package/index.cjs +1 -1
- package/index.mjs +3 -2
- package/internal/monitorConnectedAddress.cjs +1 -1
- package/internal/monitorConnectedAddress.d.ts +1 -1
- package/internal/monitorConnectedAddress.mjs +1 -3
- package/package.json +10 -1
- package/providers/prepareEthersHinkal.cjs +1 -1
- package/providers/prepareEthersHinkal.mjs +1 -1
- package/providers/prepareSolanaHinkal.cjs +1 -1
- package/providers/prepareSolanaHinkal.mjs +1 -1
- package/providers/prepareTronHinkal.cjs +1 -1
- package/providers/prepareTronHinkal.mjs +1 -1
- package/providers/prepareWagmiHinkal.cjs +1 -1
- package/providers/prepareWagmiHinkal.mjs +1 -1
- package/services/Hinkal.cjs +1 -1
- package/services/Hinkal.d.ts +7 -3
- package/services/Hinkal.mjs +74 -51
- package/types/IHinkal.d.ts +7 -2
- package/types/index.cjs +1 -1
- package/types/index.d.ts +1 -0
- package/types/index.mjs +2 -0
- package/types/receive-vault.types.cjs +1 -0
- package/types/receive-vault.types.d.ts +14 -0
- package/types/receive-vault.types.mjs +2 -0
- package/common/src/API/getOdosPriceForToken.cjs +0 -1
- package/common/src/API/getOdosPriceForToken.d.ts +0 -1
- package/common/src/API/getOdosPriceForToken.mjs +0 -14
- package/common/src/webworker/workerProxy-BHzCZ9HT.js +0 -1
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
import { AdminActivity as e, AdminPrivacyFlow as t, AdminProduct as n, AdminRoute as r, AdminTransactionType as i } from "../../types/admin.types.mjs";
|
|
2
|
+
//#region libs/shared/common/src/functions/utils/admin-dimensions.ts
|
|
3
|
+
var { Transfer: a, Swap: o, Other: s } = e, { PublicToPublic: c, PublicToPrivate: l, PrivateToPrivate: u, PrivateToPublic: d } = t, { SameChain: f, CrossChain: p } = r, { Wallet: m, Pay: h, Prime: g } = n, _ = {
|
|
4
|
+
[i.Shield]: {
|
|
5
|
+
product: m,
|
|
6
|
+
activity: a,
|
|
7
|
+
privacyFlow: l,
|
|
8
|
+
route: f
|
|
9
|
+
},
|
|
10
|
+
[i.PublicToPublicSend]: {
|
|
11
|
+
product: m,
|
|
12
|
+
activity: a,
|
|
13
|
+
privacyFlow: c,
|
|
14
|
+
route: f
|
|
15
|
+
},
|
|
16
|
+
[i.PublicToPrivateSend]: {
|
|
17
|
+
product: m,
|
|
18
|
+
activity: a,
|
|
19
|
+
privacyFlow: l,
|
|
20
|
+
route: f
|
|
21
|
+
},
|
|
22
|
+
[i.PublicToPublicBridgeSend]: {
|
|
23
|
+
product: m,
|
|
24
|
+
activity: a,
|
|
25
|
+
privacyFlow: c,
|
|
26
|
+
route: p
|
|
27
|
+
},
|
|
28
|
+
[i.PublicSwap]: {
|
|
29
|
+
product: m,
|
|
30
|
+
activity: o,
|
|
31
|
+
privacyFlow: c,
|
|
32
|
+
route: f
|
|
33
|
+
},
|
|
34
|
+
[i.PublicBridgeSwap]: {
|
|
35
|
+
product: m,
|
|
36
|
+
activity: o,
|
|
37
|
+
privacyFlow: c,
|
|
38
|
+
route: p
|
|
39
|
+
},
|
|
40
|
+
[i.Unshield]: {
|
|
41
|
+
product: m,
|
|
42
|
+
activity: a,
|
|
43
|
+
privacyFlow: d,
|
|
44
|
+
route: f
|
|
45
|
+
},
|
|
46
|
+
[i.PrivateSwap]: {
|
|
47
|
+
product: m,
|
|
48
|
+
activity: o,
|
|
49
|
+
privacyFlow: u,
|
|
50
|
+
route: f
|
|
51
|
+
},
|
|
52
|
+
[i.PrivateToPrivateSend]: {
|
|
53
|
+
product: m,
|
|
54
|
+
activity: a,
|
|
55
|
+
privacyFlow: u,
|
|
56
|
+
route: f
|
|
57
|
+
},
|
|
58
|
+
[i.PrivateToPublicSend]: {
|
|
59
|
+
product: m,
|
|
60
|
+
activity: a,
|
|
61
|
+
privacyFlow: d,
|
|
62
|
+
route: f
|
|
63
|
+
},
|
|
64
|
+
[i.AutoShield]: {
|
|
65
|
+
product: m,
|
|
66
|
+
activity: a,
|
|
67
|
+
privacyFlow: l,
|
|
68
|
+
route: f
|
|
69
|
+
},
|
|
70
|
+
[i.PaymentLink]: {
|
|
71
|
+
product: h,
|
|
72
|
+
activity: a,
|
|
73
|
+
privacyFlow: l,
|
|
74
|
+
route: f
|
|
75
|
+
},
|
|
76
|
+
[i.PublicDappTransaction]: {
|
|
77
|
+
product: m,
|
|
78
|
+
activity: s,
|
|
79
|
+
privacyFlow: c,
|
|
80
|
+
route: f
|
|
81
|
+
},
|
|
82
|
+
[i.PayShield]: {
|
|
83
|
+
product: h,
|
|
84
|
+
activity: a,
|
|
85
|
+
privacyFlow: l,
|
|
86
|
+
route: f
|
|
87
|
+
},
|
|
88
|
+
[i.PayPublicToPublicSend]: {
|
|
89
|
+
product: h,
|
|
90
|
+
activity: a,
|
|
91
|
+
privacyFlow: c,
|
|
92
|
+
route: f
|
|
93
|
+
},
|
|
94
|
+
[i.PayPublicToPrivateSend]: {
|
|
95
|
+
product: h,
|
|
96
|
+
activity: a,
|
|
97
|
+
privacyFlow: l,
|
|
98
|
+
route: f
|
|
99
|
+
},
|
|
100
|
+
[i.PayPublicToPublicBridgeSend]: {
|
|
101
|
+
product: h,
|
|
102
|
+
activity: a,
|
|
103
|
+
privacyFlow: c,
|
|
104
|
+
route: p
|
|
105
|
+
},
|
|
106
|
+
[i.PayPublicSwap]: {
|
|
107
|
+
product: h,
|
|
108
|
+
activity: o,
|
|
109
|
+
privacyFlow: c,
|
|
110
|
+
route: f
|
|
111
|
+
},
|
|
112
|
+
[i.PayPublicBridgeSwap]: {
|
|
113
|
+
product: h,
|
|
114
|
+
activity: o,
|
|
115
|
+
privacyFlow: c,
|
|
116
|
+
route: p
|
|
117
|
+
},
|
|
118
|
+
[i.PayUnshield]: {
|
|
119
|
+
product: h,
|
|
120
|
+
activity: a,
|
|
121
|
+
privacyFlow: d,
|
|
122
|
+
route: f
|
|
123
|
+
},
|
|
124
|
+
[i.PayPrivateToPrivateSend]: {
|
|
125
|
+
product: h,
|
|
126
|
+
activity: a,
|
|
127
|
+
privacyFlow: u,
|
|
128
|
+
route: f
|
|
129
|
+
},
|
|
130
|
+
[i.PayPrivateToPublicSend]: {
|
|
131
|
+
product: h,
|
|
132
|
+
activity: a,
|
|
133
|
+
privacyFlow: d,
|
|
134
|
+
route: f
|
|
135
|
+
},
|
|
136
|
+
[i.PayPrivateToPrivateBridgeSend]: {
|
|
137
|
+
product: h,
|
|
138
|
+
activity: a,
|
|
139
|
+
privacyFlow: u,
|
|
140
|
+
route: p
|
|
141
|
+
},
|
|
142
|
+
[i.PayPrivateSwap]: {
|
|
143
|
+
product: h,
|
|
144
|
+
activity: o,
|
|
145
|
+
privacyFlow: u,
|
|
146
|
+
route: f
|
|
147
|
+
},
|
|
148
|
+
[i.PayPrivateBridgeSwap]: {
|
|
149
|
+
product: h,
|
|
150
|
+
activity: o,
|
|
151
|
+
privacyFlow: u,
|
|
152
|
+
route: p
|
|
153
|
+
},
|
|
154
|
+
[i.PrimeShield]: {
|
|
155
|
+
product: g,
|
|
156
|
+
activity: a,
|
|
157
|
+
privacyFlow: l,
|
|
158
|
+
route: f
|
|
159
|
+
},
|
|
160
|
+
[i.PrimePublicToPrivateSend]: {
|
|
161
|
+
product: g,
|
|
162
|
+
activity: a,
|
|
163
|
+
privacyFlow: l,
|
|
164
|
+
route: f
|
|
165
|
+
},
|
|
166
|
+
[i.PrimePublicToPublicSend]: {
|
|
167
|
+
product: g,
|
|
168
|
+
activity: a,
|
|
169
|
+
privacyFlow: c,
|
|
170
|
+
route: f
|
|
171
|
+
},
|
|
172
|
+
[i.PrimePublicToPublicBridgeSend]: {
|
|
173
|
+
product: g,
|
|
174
|
+
activity: a,
|
|
175
|
+
privacyFlow: c,
|
|
176
|
+
route: p
|
|
177
|
+
},
|
|
178
|
+
[i.PrimeUnshield]: {
|
|
179
|
+
product: g,
|
|
180
|
+
activity: a,
|
|
181
|
+
privacyFlow: d,
|
|
182
|
+
route: f
|
|
183
|
+
},
|
|
184
|
+
[i.PrimePrivateToPrivateSend]: {
|
|
185
|
+
product: g,
|
|
186
|
+
activity: a,
|
|
187
|
+
privacyFlow: u,
|
|
188
|
+
route: f
|
|
189
|
+
},
|
|
190
|
+
[i.PrimePrivateToPublicSend]: {
|
|
191
|
+
product: g,
|
|
192
|
+
activity: a,
|
|
193
|
+
privacyFlow: d,
|
|
194
|
+
route: f
|
|
195
|
+
},
|
|
196
|
+
[i.PrimePrivateToPrivateBridgeSend]: {
|
|
197
|
+
product: g,
|
|
198
|
+
activity: a,
|
|
199
|
+
privacyFlow: u,
|
|
200
|
+
route: p
|
|
201
|
+
}
|
|
202
|
+
}, v = (e) => _[e], y = (e, t, n) => {
|
|
203
|
+
if (!(!e || v(e)?.activity !== o)) return n ? [t[0], n] : t;
|
|
204
|
+
};
|
|
205
|
+
//#endregion
|
|
206
|
+
export { v as resolveAdminDimensions, y as resolveSwapPairTokens };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
require(`../../../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../constants/chains.constants.cjs`),t=require(`../../API/solana-rpc-fallback.cjs`),n=require(`../../API/evm-rpc-fallback.cjs`);let r=require(`ethers`),i=require(`@solana/web3.js`);var a=class extends r.JsonRpcProvider{isPaidRpc;constructor(e,t,n){super(t,n,{staticNetwork:!0}),this.chainId=e,this.isPaidRpc=t.includes(`.g.alchemy.com/`)}async _perform(t){if(this.isPaidRpc||e.isTempo(this.chainId))return super._perform(t);if(t.method===`getTransactionReceipt`)return n.getEvmRpcResultFromServer(this.chainId,`eth_getTransactionReceipt`,[t.hash]);if(t.method===`getLogs`)return n.getEvmRpcResultFromServer(this.chainId,`eth_getLogs`,[t.filter]);try{return await super._perform(t)}catch(e){let r=this.getRpcRequest(t);if(!r)throw e;return n.getEvmRpcResultFromServer(this.chainId,r.method,r.args)}}},o=t=>{let{rpcUrl:n}=e.networkRegistry[t];return new a(t,e.isTronLike(t)&&!n.includes(`.g.alchemy.com/`)?`${n}/jsonrpc`:n,e.getOnchainChainId(t))},s=(e,n=`confirmed`)=>{let r=new i.Connection(e,n),a=e.includes(`helius-rpc.com`),o=r._rpcRequest.bind(r),s=new Set([`getLatestBlockhash`,`getBlockHeight`,`getTokenAccountsByOwner`,`getBalance`,`getAccountInfo`,`getTokenAccountBalance`]);return r._rpcRequest=async(e,n)=>{if(a)return o(e,n);if(s.has(e))return t.getSolanaRpcResultFromServer(e,n);try{return await o(e,n)}catch{return t.getSolanaRpcResultFromServer(e,n)}},r};exports.createCustomSolanaConnection=s,exports.createJsonRpcProvider=o;
|
|
1
|
+
require(`../../../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../constants/chains.constants.cjs`),t=require(`../../API/solana-rpc-fallback.cjs`),n=require(`../../API/evm-rpc-fallback.cjs`);let r=require(`ethers`),i=require(`@solana/web3.js`);var a=class extends r.JsonRpcProvider{isPaidRpc;constructor(e,t,n){super(t,n,{staticNetwork:!0}),this.chainId=e,this.isPaidRpc=t.includes(`.g.alchemy.com/`)}async _perform(t){if(this.isPaidRpc||e.isTempo(this.chainId))return super._perform(t);if(t.method===`getTransactionReceipt`)return n.getEvmRpcResultFromServer(this.chainId,`eth_getTransactionReceipt`,[t.hash]);if(t.method===`getLogs`)return n.getEvmRpcResultFromServer(this.chainId,`eth_getLogs`,[t.filter]);try{return await super._perform(t)}catch(e){let r=this.getRpcRequest(t);if(!r)throw e;return n.getEvmRpcResultFromServer(this.chainId,r.method,r.args)}}},o=t=>{let{rpcUrl:n}=e.networkRegistry[t];return new a(t,e.isTronLike(t)&&!n.includes(`.g.alchemy.com/`)?`${n}/jsonrpc`:n,e.getOnchainChainId(t))},s=(e,n=`confirmed`)=>{let r=new i.Connection(e,n),a=e.includes(`helius-rpc.com`)||e.includes(`devnet.solana.com`)||[`localhost`,`127.0.0.1`,`[::1]`].includes(new URL(e).hostname),o=r._rpcRequest.bind(r),s=new Set([`getLatestBlockhash`,`getBlockHeight`,`getTokenAccountsByOwner`,`getBalance`,`getAccountInfo`,`getTokenAccountBalance`]);return r._rpcRequest=async(e,n)=>{if(a)return o(e,n);if(s.has(e))return t.getSolanaRpcResultFromServer(e,n);try{return await o(e,n)}catch{return t.getSolanaRpcResultFromServer(e,n)}},r};exports.createCustomSolanaConnection=s,exports.createJsonRpcProvider=o;
|
|
@@ -25,7 +25,11 @@ var c = class extends o {
|
|
|
25
25
|
let { rpcUrl: i } = r[t];
|
|
26
26
|
return new c(t, n(t) && !i.includes(".g.alchemy.com/") ? `${i}/jsonrpc` : i, e(t));
|
|
27
27
|
}, u = (e, t = "confirmed") => {
|
|
28
|
-
let n = new s(e, t), r = e.includes("helius-rpc.com")
|
|
28
|
+
let n = new s(e, t), r = e.includes("helius-rpc.com") || e.includes("devnet.solana.com") || [
|
|
29
|
+
"localhost",
|
|
30
|
+
"127.0.0.1",
|
|
31
|
+
"[::1]"
|
|
32
|
+
].includes(new URL(e).hostname), a = n._rpcRequest.bind(n), o = new Set([
|
|
29
33
|
"getLatestBlockhash",
|
|
30
34
|
"getBlockHeight",
|
|
31
35
|
"getTokenAccountsByOwner",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require(`../../../../_virtual/_rolldown/runtime.cjs`),t=require(`./serialize.utils.cjs`),n=require(`../../data-structures/http/HttpClient.cjs`);require(`../../data-structures/http/index.cjs`);const r=require(`./enclaveHandshakeService.cjs`),i=require(`../snarkjs/verifySignedEnclaveResponse.cjs`);let a=require(`ethers`),o=require(`libsodium-wrappers`);o=e.__toESM(o);let s=require(`node-forge`);s=e.__toESM(s);var c=e=>typeof e==`bigint`||typeof e==`number`?e.toString():e,l=e=>s.util.hexToBytes(e.replace(`0x`,``)),u=e=>{let t=structuredClone(e);return Object.entries(t).forEach(([e,n])=>{t[e]=c(n),Array.isArray(n)&&(Array.isArray(n[0])?t[e]=n.map(e=>e.map(c)):t[e]=n.map(c))}),t},d=(e,t)=>{let n=s.util.decode64(e),r=s.asn1.fromDer(s.util.createBuffer(n)),i=s.pki.publicKeyFromAsn1(r),a=s.util.binary.raw.encode(t),o=i.encrypt(a,`RSA-OAEP`,{md:s.md.sha1.create(),mgf1:{md:s.md.sha1.create()}});return s.util.encode64(o)},f=(e,t)=>{let n=o.default.randombytes_buf(o.default.crypto_secretbox_NONCEBYTES),r=o.default.crypto_secretbox_easy(t,n,e),i=l(a.ethers.hexlify(n)+a.ethers.hexlify(r).slice(2));return s.util.encode64(i)},p=(e,t)=>{let n=o.default.randombytes_buf(o.default.crypto_secretbox_KEYBYTES);return{keyCiphertext:d(t,n),inputCiphertext:f(n,e),key:n}},m=(e,n)=>{let r=typeof e==`string`?e:t.safeJsonStringify(u(e));return p(new TextEncoder().encode(r),n)},h=async e=>m(e,await r.enclaveHandshakeService.getPublicKey()),g=async e=>p(e,await r.enclaveHandshakeService.getPublicKey()),_=async()=>{let e=await r.enclaveHandshakeService.getPublicKey(),t=o.default.randombytes_buf(o.default.crypto_secretbox_KEYBYTES);return{keyCiphertext:d(e,t),key:t}},v=(e,t)=>{if(!e||typeof e!=`object`||!(`encrypted`in e))throw Error(`Enclave answered in plaintext - refusing an unencrypted response`);let n=o.default.from_base64(e.encrypted,o.default.base64_variants.ORIGINAL),r=n.slice(0,o.default.crypto_secretbox_NONCEBYTES),i=n.slice(o.default.crypto_secretbox_NONCEBYTES),a=o.default.crypto_secretbox_open_easy(i,r,t);return JSON.parse(new TextDecoder().decode(a))},y=async(e,t,r)=>v(await n.httpClient.post(e,t),r),b=async(e,t)=>{let{keyCiphertext:r,inputCiphertext:a,key:o}=await h(t),{data:s,signature:c}=v(await n.httpClient.post(e,{key:r,inputs:a}),o);return i.verifySignedEnclaveResponse(s,c)};exports.enclavePostSealed=y,exports.enclavePostSealedSigned=b,exports.makeEnclaveHandshakeAndEncryptInput=h,exports.makeEnclaveHandshakeAndEncryptUint8Array=g,exports.makeEnclaveKeyHandshake=_;
|
|
1
|
+
const e=require(`../../../../_virtual/_rolldown/runtime.cjs`),t=require(`./serialize.utils.cjs`),n=require(`../../data-structures/http/HttpClient.cjs`);require(`../../data-structures/http/index.cjs`);const r=require(`./enclaveHandshakeService.cjs`),i=require(`../snarkjs/verifySignedEnclaveResponse.cjs`);let a=require(`ethers`),o=require(`libsodium-wrappers`);o=e.__toESM(o);let s=require(`node-forge`);s=e.__toESM(s);var c=e=>typeof e==`bigint`||typeof e==`number`?e.toString():e,l=e=>s.util.hexToBytes(e.replace(`0x`,``)),u=e=>{let t=structuredClone(e);return Object.entries(t).forEach(([e,n])=>{t[e]=c(n),Array.isArray(n)&&(Array.isArray(n[0])?t[e]=n.map(e=>e.map(c)):t[e]=n.map(c))}),t},d=(e,t)=>{let n=s.util.decode64(e),r=s.asn1.fromDer(s.util.createBuffer(n)),i=s.pki.publicKeyFromAsn1(r),a=s.util.binary.raw.encode(t),o=i.encrypt(a,`RSA-OAEP`,{md:s.md.sha1.create(),mgf1:{md:s.md.sha1.create()}});return s.util.encode64(o)},f=(e,t)=>{let n=o.default.randombytes_buf(o.default.crypto_secretbox_NONCEBYTES),r=o.default.crypto_secretbox_easy(t,n,e),i=l(a.ethers.hexlify(n)+a.ethers.hexlify(r).slice(2));return s.util.encode64(i)},p=(e,t)=>{let n=o.default.randombytes_buf(o.default.crypto_secretbox_KEYBYTES);return{keyCiphertext:d(t,n),inputCiphertext:f(n,e),key:n}},m=(e,n)=>{let r=typeof e==`string`?e:t.safeJsonStringify(u(e));return p(new TextEncoder().encode(r),n)},h=async e=>m(e,await r.enclaveHandshakeService.getPublicKey()),g=async e=>p(e,await r.enclaveHandshakeService.getPublicKey()),_=async()=>{let e=await r.enclaveHandshakeService.getPublicKey(),t=o.default.randombytes_buf(o.default.crypto_secretbox_KEYBYTES);return{keyCiphertext:d(e,t),key:t}},v=(e,t)=>{if(!e||typeof e!=`object`||!(`encrypted`in e))throw Error(`Enclave answered in plaintext - refusing an unencrypted response`);let n=o.default.from_base64(e.encrypted,o.default.base64_variants.ORIGINAL),r=n.slice(0,o.default.crypto_secretbox_NONCEBYTES),i=n.slice(o.default.crypto_secretbox_NONCEBYTES),a=o.default.crypto_secretbox_open_easy(i,r,t);return JSON.parse(new TextDecoder().decode(a))},y=async(e,t,r,i)=>v(await n.httpClient.post(e,t,i),r),b=async(e,t)=>{let{keyCiphertext:r,inputCiphertext:a,key:o}=await h(t),{data:s,signature:c}=v(await n.httpClient.post(e,{key:r,inputs:a}),o);return i.verifySignedEnclaveResponse(s,c)};exports.enclavePostSealed=y,exports.enclavePostSealedSigned=b,exports.makeEnclaveHandshakeAndEncryptInput=h,exports.makeEnclaveHandshakeAndEncryptUint8Array=g,exports.makeEnclaveKeyHandshake=_;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { AxiosRequestConfig } from 'axios';
|
|
1
2
|
export declare const makeEnclaveHandshakeAndEncryptInput: (input: any) => Promise<{
|
|
2
3
|
keyCiphertext: string;
|
|
3
4
|
inputCiphertext: string;
|
|
@@ -12,5 +13,5 @@ export declare const makeEnclaveKeyHandshake: () => Promise<{
|
|
|
12
13
|
keyCiphertext: string;
|
|
13
14
|
key: Uint8Array;
|
|
14
15
|
}>;
|
|
15
|
-
export declare const enclavePostSealed: <T>(url: string, body: Record<string, unknown>, key: Uint8Array) => Promise<T>;
|
|
16
|
+
export declare const enclavePostSealed: <T>(url: string, body: Record<string, unknown>, key: Uint8Array, config?: AxiosRequestConfig) => Promise<T>;
|
|
16
17
|
export declare const enclavePostSealedSigned: <T>(url: string, payload: unknown) => Promise<T>;
|
|
@@ -41,7 +41,7 @@ var s = (e) => typeof e == "bigint" || typeof e == "number" ? e.toString() : e,
|
|
|
41
41
|
if (!e || typeof e != "object" || !("encrypted" in e)) throw Error("Enclave answered in plaintext - refusing an unencrypted response");
|
|
42
42
|
let n = a.from_base64(e.encrypted, a.base64_variants.ORIGINAL), r = n.slice(0, a.crypto_secretbox_NONCEBYTES), i = n.slice(a.crypto_secretbox_NONCEBYTES), o = a.crypto_secretbox_open_easy(i, r, t);
|
|
43
43
|
return JSON.parse(new TextDecoder().decode(o));
|
|
44
|
-
}, v = async (e, n, r) => _(await t.post(e, n), r), y = async (e, n) => {
|
|
44
|
+
}, v = async (e, n, r, i) => _(await t.post(e, n, i), r), y = async (e, n) => {
|
|
45
45
|
let { keyCiphertext: i, inputCiphertext: a, key: o } = await m(n), { data: s, signature: c } = _(await t.post(e, {
|
|
46
46
|
key: i,
|
|
47
47
|
inputs: a
|
|
@@ -1 +1 @@
|
|
|
1
|
-
require(`../../constants/chains.constants.cjs`)
|
|
1
|
+
const e=require(`../../constants/chains.constants.cjs`),t=require(`../../constants/protocol.constants.cjs`);require(`../web3/etherFunctions.cjs`);const n=require(`../../API/token-calls.cjs`);require(`../../constants/tokens.constants.cjs`);var r=async(e,t)=>{let[r]=await n.tokensInfoCall(e,[t]);return r},i=async(e,t)=>t.length===0?[]:n.tokensInfoCall(e,t),a=async(e,t)=>{let n=await r(e,t);if(!n)throw Error(`Token not found: ${t} on chain ${e}`);return n},o=async(e,t)=>{if(t.length===0)return[];let n=await i(e,t);return t.map((t,r)=>{let i=n[r];if(!i)throw Error(`Token not found: ${t} on chain ${e}`);return i})},s=async e=>await n.getTokensForChainCall(e),c=async(e,t)=>await n.getTokensBySymbolsCall(t,e),l=e=>e.nftTokenType===t.TokenType.ERC721||e.nftTokenType===t.TokenType.ERC1155||e.nftTokenType===t.TokenType.MetaplexNFT||e.nftTokenType===t.TokenType.Token2022NFT||e.nftTokenType===t.TokenType.CompressedNFT,u=n=>n.chainId===e.chainIds.arcTestnet&&n.erc20TokenAddress===t.zeroAddress;exports.getErc20TokenFromAPI=r,exports.getErc20TokensBySymbolsFromAPI=c,exports.getErc20TokensForChainAPI=s,exports.getErc20TokensFromAPI=i,exports.isArcNativeToken=u,exports.isNFTToken=l,exports.resolveErc20Token=a,exports.resolveErc20Tokens=o;
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import "../../constants/chains.constants.mjs";
|
|
2
|
-
import { TokenType as
|
|
1
|
+
import { chainIds as e } from "../../constants/chains.constants.mjs";
|
|
2
|
+
import { TokenType as t, zeroAddress as n } from "../../constants/protocol.constants.mjs";
|
|
3
3
|
import "../web3/etherFunctions.mjs";
|
|
4
|
-
import { getTokensBySymbolsCall as
|
|
4
|
+
import { getTokensBySymbolsCall as r, getTokensForChainCall as i, tokensInfoCall as a } from "../../API/token-calls.mjs";
|
|
5
5
|
import "../../constants/tokens.constants.mjs";
|
|
6
6
|
//#region libs/shared/common/src/functions/utils/erc20tokenFunctions.ts
|
|
7
|
-
var
|
|
8
|
-
let [n] = await
|
|
7
|
+
var o = async (e, t) => {
|
|
8
|
+
let [n] = await a(e, [t]);
|
|
9
9
|
return n;
|
|
10
|
-
},
|
|
11
|
-
let n = await
|
|
10
|
+
}, s = async (e, t) => t.length === 0 ? [] : a(e, t), c = async (e, t) => {
|
|
11
|
+
let n = await o(e, t);
|
|
12
12
|
if (!n) throw Error(`Token not found: ${t} on chain ${e}`);
|
|
13
13
|
return n;
|
|
14
|
-
},
|
|
14
|
+
}, l = async (e, t) => {
|
|
15
15
|
if (t.length === 0) return [];
|
|
16
|
-
let n = await
|
|
16
|
+
let n = await s(e, t);
|
|
17
17
|
return t.map((t, r) => {
|
|
18
18
|
let i = n[r];
|
|
19
19
|
if (!i) throw Error(`Token not found: ${t} on chain ${e}`);
|
|
20
20
|
return i;
|
|
21
21
|
});
|
|
22
|
-
},
|
|
22
|
+
}, u = async (e) => await i(e), d = async (e, t) => await r(t, e), f = (e) => e.nftTokenType === t.ERC721 || e.nftTokenType === t.ERC1155 || e.nftTokenType === t.MetaplexNFT || e.nftTokenType === t.Token2022NFT || e.nftTokenType === t.CompressedNFT, p = (t) => t.chainId === e.arcTestnet && t.erc20TokenAddress === n;
|
|
23
23
|
//#endregion
|
|
24
|
-
export {
|
|
24
|
+
export { o as getErc20TokenFromAPI, d as getErc20TokensBySymbolsFromAPI, u as getErc20TokensForChainAPI, s as getErc20TokensFromAPI, p as isArcNativeToken, f as isNFTToken, c as resolveErc20Token, l as resolveErc20Tokens };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require(`../../constants/chains.constants.cjs`),t=require(`../../constants/
|
|
1
|
+
const e=require(`../../constants/chains.constants.cjs`),t=require(`../../constants/fees.constants.cjs`),n=require(`./caseInsensitive.utils.cjs`),r=require(`../web3/etherFunctions.cjs`),i=require(`../../error-handling/logger.cjs`),a=require(`../../API/getTokenPrice.cjs`),o=require(`./erc20tokenFunctions.cjs`),s=require(`./gas-token.utils.cjs`);var c=async n=>{if(!n)return t.EXTENDED_NON_NATIVE_GAS_COST_TOKEN_SYMBOL_OPTIONS;let r=(await o.getErc20TokenFromAPI(n,s.getGasTokenAddress(n)))?.symbol;return e.isSolanaLike(n)&&r?[r]:r&&!t.NON_NATIVE_GAS_COST_TOKEN_SYMBOL_OPTIONS(n).includes(r)?[r,...t.NON_NATIVE_GAS_COST_TOKEN_SYMBOL_OPTIONS(n)]:t.NON_NATIVE_GAS_COST_TOKEN_SYMBOL_OPTIONS(n)},l=(e,n)=>{let r=e*n.variableRate/t.BPS_DENOMINATOR;return n.flatFee+r},u=async(e,s,c,u)=>{let d=await o.getErc20TokenFromAPI(e,u.feeToken),f;if(!d||n.caseInsensitiveEqual(u.feeToken,s.erc20TokenAddress)&&s.chainId===e||u.variableRate===0n)f=l(c,u);else{let n=0n;try{let[i,o]=s.chainId===e?(await a.getTokenPrices(e,[s.erc20TokenAddress,d.erc20TokenAddress])).prices:await Promise.all([(await a.getTokenPrices(s.chainId,[s.erc20TokenAddress])).prices[0],(await a.getTokenPrices(e,[d.erc20TokenAddress])).prices[0]]);if(!i||!o)throw Error(`failed to get token prices`);n=r.getAmountInWei(d,(Number(r.getAmountInToken(s,c))*i*Number(u.variableRate)/Number(t.BPS_DENOMINATOR)/o).toFixed(d.decimals))}catch(e){i.Logger.error(`error calculating modified fee structure`,e)}f=u.flatFee+n}return{feeToken:u.feeToken,flatFee:f,variableRate:0n}},d=async(e,t,n,r)=>{let i={...r,flatFee:0n},a=await Promise.all(t.map((t,r)=>u(e,t,n[r]??0n,i)));return{feeToken:r.feeToken,flatFee:a.reduce((e,{flatFee:t})=>e+t,r.flatFee),variableRate:0n}},f=(e,t)=>{let n=e/t;return e%t===0n?n:n+1n},p=(e,n)=>e<=0n||n<=0n?0n:f(e*n,t.BPS_DENOMINATOR),m=(e,n)=>e<=0n||n<=0n?0n:f(e*n,t.BPS_DENOMINATOR-n),h=(e,t)=>e.map(e=>e+m(e,t.variableRate)+t.flatFee);exports.calculateGrossUtxoAmounts=h,exports.calculateModifiedFeeStructure=u,exports.calculateModifiedFeeStructureForTokens=d,exports.calculateTotalFee=l,exports.calculateVariableFee=p,exports.calculateVariableFeeGrossUp=m,exports.getGasTokenSymbols=c;
|
|
@@ -7,3 +7,5 @@ export declare const calculateModifiedFeeStructureForTokens: (chainId: number, a
|
|
|
7
7
|
export declare const calculateVariableFee: (amount: bigint, variableRate: bigint) => bigint;
|
|
8
8
|
export declare const calculateWithdrawalAmount: (amountWithFee: bigint, feeStructure: FeeStructure) => bigint;
|
|
9
9
|
export declare const calculateGrossAmountWithFee: (netAmount: bigint, feeStructure: FeeStructure) => bigint;
|
|
10
|
+
export declare const calculateVariableFeeGrossUp: (netAmount: bigint, variableRate: bigint) => bigint;
|
|
11
|
+
export declare const calculateGrossUtxoAmounts: (recipientAmounts: bigint[], feeStructure: FeeStructure) => bigint[];
|
|
@@ -1,53 +1,51 @@
|
|
|
1
|
-
import { isSolanaLike as e
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
1
|
+
import { isSolanaLike as e } from "../../constants/chains.constants.mjs";
|
|
2
|
+
import { BPS_DENOMINATOR as t, EXTENDED_NON_NATIVE_GAS_COST_TOKEN_SYMBOL_OPTIONS as n, NON_NATIVE_GAS_COST_TOKEN_SYMBOL_OPTIONS as r } from "../../constants/fees.constants.mjs";
|
|
3
|
+
import { caseInsensitiveEqual as i } from "./caseInsensitive.utils.mjs";
|
|
4
|
+
import { getAmountInToken as a, getAmountInWei as o } from "../web3/etherFunctions.mjs";
|
|
5
|
+
import { Logger as s } from "../../error-handling/logger.mjs";
|
|
6
|
+
import { getTokenPrices as c } from "../../API/getTokenPrice.mjs";
|
|
7
|
+
import { getErc20TokenFromAPI as l } from "./erc20tokenFunctions.mjs";
|
|
8
|
+
import { getGasTokenAddress as u } from "./gas-token.utils.mjs";
|
|
9
9
|
//#region libs/shared/common/src/functions/utils/fees.utils.ts
|
|
10
|
-
var
|
|
11
|
-
if (!
|
|
12
|
-
let
|
|
13
|
-
e(
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
let a = await p(e, r.feeToken), o;
|
|
21
|
-
if (!a || c(r.feeToken, t.erc20TokenAddress) || r.variableRate === 0n) o = h(n, r);
|
|
10
|
+
var d = async (t) => {
|
|
11
|
+
if (!t) return n;
|
|
12
|
+
let i = (await l(t, u(t)))?.symbol;
|
|
13
|
+
return e(t) && i ? [i] : i && !r(t).includes(i) ? [i, ...r(t)] : r(t);
|
|
14
|
+
}, f = (e, n) => {
|
|
15
|
+
let r = e * n.variableRate / t;
|
|
16
|
+
return n.flatFee + r;
|
|
17
|
+
}, p = async (e, n, r, u) => {
|
|
18
|
+
let d = await l(e, u.feeToken), p;
|
|
19
|
+
if (!d || i(u.feeToken, n.erc20TokenAddress) && n.chainId === e || u.variableRate === 0n) p = f(r, u);
|
|
22
20
|
else {
|
|
23
|
-
let
|
|
21
|
+
let i = 0n;
|
|
24
22
|
try {
|
|
25
|
-
let [
|
|
26
|
-
if (!
|
|
27
|
-
|
|
23
|
+
let [s, l] = n.chainId === e ? (await c(e, [n.erc20TokenAddress, d.erc20TokenAddress])).prices : await Promise.all([(await c(n.chainId, [n.erc20TokenAddress])).prices[0], (await c(e, [d.erc20TokenAddress])).prices[0]]);
|
|
24
|
+
if (!s || !l) throw Error("failed to get token prices");
|
|
25
|
+
i = o(d, (Number(a(n, r)) * s * Number(u.variableRate) / Number(t) / l).toFixed(d.decimals));
|
|
28
26
|
} catch (e) {
|
|
29
|
-
|
|
27
|
+
s.error("error calculating modified fee structure", e);
|
|
30
28
|
}
|
|
31
|
-
|
|
29
|
+
p = u.flatFee + i;
|
|
32
30
|
}
|
|
33
31
|
return {
|
|
34
|
-
feeToken:
|
|
35
|
-
flatFee:
|
|
32
|
+
feeToken: u.feeToken,
|
|
33
|
+
flatFee: p,
|
|
36
34
|
variableRate: 0n
|
|
37
35
|
};
|
|
38
|
-
},
|
|
36
|
+
}, m = async (e, t, n, r) => {
|
|
39
37
|
let i = {
|
|
40
38
|
...r,
|
|
41
39
|
flatFee: 0n
|
|
42
|
-
}, a = await Promise.all(t.map((t, r) =>
|
|
40
|
+
}, a = await Promise.all(t.map((t, r) => p(e, t, n[r] ?? 0n, i)));
|
|
43
41
|
return {
|
|
44
42
|
feeToken: r.feeToken,
|
|
45
43
|
flatFee: a.reduce((e, { flatFee: t }) => e + t, r.flatFee),
|
|
46
44
|
variableRate: 0n
|
|
47
45
|
};
|
|
48
|
-
},
|
|
46
|
+
}, h = (e, t) => {
|
|
49
47
|
let n = e / t;
|
|
50
48
|
return e % t === 0n ? n : n + 1n;
|
|
51
|
-
},
|
|
49
|
+
}, g = (e, n) => e <= 0n || n <= 0n ? 0n : h(e * n, t), _ = (e, n) => e <= 0n || n <= 0n ? 0n : h(e * n, t - n), v = (e, t) => e.map((e) => e + _(e, t.variableRate) + t.flatFee);
|
|
52
50
|
//#endregion
|
|
53
|
-
export {
|
|
51
|
+
export { v as calculateGrossUtxoAmounts, p as calculateModifiedFeeStructure, m as calculateModifiedFeeStructureForTokens, f as calculateTotalFee, g as calculateVariableFee, _ as calculateVariableFeeGrossUp, d as getGasTokenSymbols };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`../../constants/chains.constants.cjs`),t=require(`../../constants/protocol.constants.cjs`),n=require(`../../constants/fees.constants.cjs`);var r=r=>e.isSolanaLike(r)?t.solanaNativeAddress:e.isTempo(r)?n.TEMPO_DEFAULT_GAS_TOKEN_ADDRESS:e.isArcTestnet(r)?t.ARC_TESTNET_USDC_ADDRESS:t.zeroAddress;exports.getGasTokenAddress=r;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { isArcTestnet as e, isSolanaLike as t, isTempo as n } from "../../constants/chains.constants.mjs";
|
|
2
|
+
import { ARC_TESTNET_USDC_ADDRESS as r, solanaNativeAddress as i, zeroAddress as a } from "../../constants/protocol.constants.mjs";
|
|
3
|
+
import { TEMPO_DEFAULT_GAS_TOKEN_ADDRESS as o } from "../../constants/fees.constants.mjs";
|
|
4
|
+
//#region libs/shared/common/src/functions/utils/gas-token.utils.ts
|
|
5
|
+
var s = (s) => t(s) ? i : n(s) ? o : e(s) ? r : a;
|
|
6
|
+
//#endregion
|
|
7
|
+
export { s as getGasTokenAddress };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const e=require(`./isSigner.cjs`);var t=t=>{let{runner:n}=t;if(!e.isSigner(n))throw Error(`expected signer`);return n},n=e=>{let{runner:t}=e;if(!t)throw Error(`expected provider`);return t.provider??t};exports.getProviderFromContract=n,exports.getSignerFromContract=t;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { ethers } from 'ethers';
|
|
2
|
-
export declare const getSignerFromContract: (contract: ethers.Contract) => ethers.
|
|
2
|
+
export declare const getSignerFromContract: (contract: ethers.Contract) => ethers.Signer;
|
|
3
3
|
export declare const getProviderFromContract: (contract: ethers.Contract) => ethers.Provider;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { isSigner as e } from "./isSigner.mjs";
|
|
2
2
|
//#region libs/shared/common/src/functions/utils/getSignerFromContract.ts
|
|
3
3
|
var t = (t) => {
|
|
4
4
|
let { runner: n } = t;
|
|
5
|
-
if (!(n
|
|
5
|
+
if (!e(n)) throw Error("expected signer");
|
|
6
6
|
return n;
|
|
7
7
|
}, n = (e) => {
|
|
8
8
|
let { runner: t } = e;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
require(`../../constants/chains.constants.cjs`),require(`../../data-structures/crypto-keys/keys.cjs`),require(`../../types/index.cjs`),require(`../../data-structures/crypto-keys/
|
|
1
|
+
require(`../../constants/chains.constants.cjs`),require(`../../data-structures/crypto-keys/keys.cjs`),require(`../../types/index.cjs`),require(`../../data-structures/crypto-keys/decodeUTXO.cjs`),require(`../../data-structures/crypto-keys/encryptDecryptUtxo.cjs`),require(`../web3/getContractMetadata.cjs`),require(`ethers`);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "../../constants/chains.constants.mjs";
|
|
2
2
|
import "../../data-structures/crypto-keys/keys.mjs";
|
|
3
3
|
import "../../types/index.mjs";
|
|
4
|
+
import "../../data-structures/crypto-keys/decodeUTXO.mjs";
|
|
4
5
|
import "../../data-structures/crypto-keys/encryptDecryptUtxo.mjs";
|
|
5
6
|
import "../web3/getContractMetadata.mjs";
|
|
6
|
-
import "../../data-structures/crypto-keys/decodeUTXO.mjs";
|
|
7
7
|
import "ethers";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
require(`../../constants/chains.constants.cjs`),require(`../../crypto/poseidon.cjs`),require(`../../data-structures/utxo/Utxo.cjs`),require(`../../data-structures/crypto-keys/
|
|
1
|
+
require(`../../constants/chains.constants.cjs`),require(`../../crypto/poseidon.cjs`),require(`../../data-structures/utxo/Utxo.cjs`),require(`../../data-structures/crypto-keys/decodeUTXO.cjs`),require(`../../data-structures/crypto-keys/encryptDecryptUtxo.cjs`),require(`./bytes32.utils.cjs`),require(`ethers`),require(`@solana/web3.js`),require(`@coral-xyz/anchor`);
|
|
@@ -1,7 +1,12 @@
|
|
|
1
|
-
import { TransactionResponse, VersionedTransactionResponse } from '@solana/web3.js';
|
|
1
|
+
import { PublicKey, TransactionResponse, VersionedTransactionResponse } from '@solana/web3.js';
|
|
2
2
|
import { Utxo } from '../../data-structures/utxo/Utxo';
|
|
3
|
-
import {
|
|
3
|
+
import { Idl } from '@coral-xyz/anchor';
|
|
4
4
|
import { UserKeys } from '../../data-structures/crypto-keys/keys';
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
type SolanaProgramMetadata = {
|
|
6
|
+
programId: PublicKey;
|
|
7
|
+
idl: Idl;
|
|
8
|
+
};
|
|
9
|
+
export declare const getOnChainUtxosFromReceiptSolana: (tx: VersionedTransactionResponse | TransactionResponse, hinkalProgram: SolanaProgramMetadata, userKeys: UserKeys, tokenAddress: string) => Utxo[];
|
|
10
|
+
export declare const getUtxosFromReceiptSolana: (tx: VersionedTransactionResponse | TransactionResponse, hinkalProgram: SolanaProgramMetadata, userKeys: UserKeys, tokenAddress: string) => Utxo[];
|
|
7
11
|
export declare const getOutputCommitmentsFromSolanaReceipt: (chainId: number, tx: VersionedTransactionResponse | TransactionResponse) => string[];
|
|
12
|
+
export {};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import "../../constants/chains.constants.mjs";
|
|
2
2
|
import "../../crypto/poseidon.mjs";
|
|
3
3
|
import "../../data-structures/utxo/Utxo.mjs";
|
|
4
|
+
import "../../data-structures/crypto-keys/decodeUTXO.mjs";
|
|
4
5
|
import "../../data-structures/crypto-keys/encryptDecryptUtxo.mjs";
|
|
5
6
|
import "./bytes32.utils.mjs";
|
|
6
|
-
import "../../data-structures/crypto-keys/decodeUTXO.mjs";
|
|
7
7
|
import "ethers";
|
|
8
8
|
import "@solana/web3.js";
|
|
9
9
|
import "@coral-xyz/anchor";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
require(`./abi.utils.cjs`),require(`./serialize.utils.cjs`),require(`./caseInsensitive.utils.cjs`),require(`./amounts.utils.cjs`),require(`./time.utils.cjs`),require(`./upToDateState.cjs`),require(`./cacheFunctions.cjs`),require(`./encodeTokenWithId.cjs`),require(`./enclaveHandshakeService.cjs`),require(`./encryptInputForEnclave.cjs`),require(`./solanaMint.utils.cjs`),require(`./serialize-utxos.utils.cjs`),require(`./customEnclaveFunctionsRegister.cjs`),require(`./tron.utils.cjs`),require(`./addresses.cjs`),require(`./legacyKeys.cjs`),require(`./auth.utils.cjs`),require(`./string.utils.cjs`),require(`./token-check.utils.cjs`),require(`./map.utils.cjs`),require(`./mutexes.utils.cjs`),require(`./erc20tokenFunctions.cjs`),require(`../pre-transaction/outputUtxoProcessing.cjs`),require(`./external-action.utils.cjs`),require(`../pre-transaction/solana.cjs`),require(`../pre-transaction/process-gas-estimates.cjs`),require(`../pre-transaction/getVolatileTransferAmount.cjs`),require(`../pre-transaction/constructAdminData.cjs`),require(
|
|
1
|
+
require(`./abi.utils.cjs`),require(`./serialize.utils.cjs`),require(`./caseInsensitive.utils.cjs`),require(`./amounts.utils.cjs`),require(`./time.utils.cjs`),require(`./upToDateState.cjs`),require(`./cacheFunctions.cjs`),require(`./encodeTokenWithId.cjs`),require(`./enclaveHandshakeService.cjs`),require(`./encryptInputForEnclave.cjs`),require(`./solanaMint.utils.cjs`),require(`./serialize-utxos.utils.cjs`),require(`./customEnclaveFunctionsRegister.cjs`),require(`./tron.utils.cjs`),require(`./addresses.cjs`),require(`./legacyKeys.cjs`),require(`./auth.utils.cjs`),require(`./create-provider.cjs`),require(`./receive-vault-solana.utils.cjs`),require(`./receive-vault.utils.cjs`),require(`./string.utils.cjs`),require(`./token-check.utils.cjs`),require(`./map.utils.cjs`),require(`./mutexes.utils.cjs`),require(`./erc20tokenFunctions.cjs`),require(`../pre-transaction/outputUtxoProcessing.cjs`),require(`./external-action.utils.cjs`),require(`../pre-transaction/solana.cjs`),require(`../pre-transaction/process-gas-estimates.cjs`),require(`../pre-transaction/getVolatileTransferAmount.cjs`),require(`../pre-transaction/constructAdminData.cjs`),require(`../pre-transaction/calculateSolanaNullifierCount.cjs`),require(`../pre-transaction/convert-okx-instructions.cjs`),require(`./process.utils.cjs`),require(`../pre-transaction/sendV0Transaction.cjs`),require(`./bytes32.utils.cjs`),require(`../pre-transaction/getFeeStructure.cjs`),require(`./gas-token.utils.cjs`),require(`./fees.utils.cjs`),require(`../pre-transaction/getExternalSwapAddress.cjs`),require(`../pre-transaction/speculativeUtxo.cjs`),require(`../pre-transaction/buildCommitmentValidationData.cjs`),require(`../pre-transaction/index.cjs`),require(`./solana-program.utils.cjs`),require(`./getContractAddress.cjs`),require(`./getSignerFromContract.cjs`),require(`./tronSimulation.utils.cjs`),require(`./resolve-domain-address.cjs`),require(`./resolve-sync.utils.cjs`),require(`./convertIntegrationProviderToExternalActionId.cjs`),require(`./evmNetworkFunctions.cjs`),require(`./userAgent.cjs`),require(`./admin-dimensions.cjs`),require(`./cacheDevice.utils.cjs`),require(`./getBlockExplorerUrl.cjs`),require(`./involves-permit2-op.cjs`),require(`./convertEmporiumOpToCallInfo.cjs`),require(`./getRecipientInfoFromUserKeys.cjs`),require(`./publicBalance.utils.cjs`),require(`./rpc-int-encode.cjs`),require(`./walletBalances.utils.cjs`),require(`./wallet-token-discovery.utils.cjs`),require(`./nftTokenFunctions.cjs`),require(`./inLogicMetadata.cjs`),require(`./networks.utils.cjs`),require(`./postToOffscreen.cjs`),require(`./solanaSendPreflight.utils.cjs`),require(`./voidWallets.utils.cjs`),require(`./prepareHinkal.cjs`),require(`./getUtxosFromReceipt.utils.cjs`),require(`./getUtxosFromReceiptSolana.cjs`),require(`./recovery-balance.utils.cjs`),require(`./proxyAvatar.utils.cjs`),require(`./enclave-utxo-storage.cjs`),require(`./enclave-signature-storage.cjs`),require(`./tx-confirmation.utils.cjs`),require(`./buildClaimableDepositPlan.cjs`),require(`./deposit-claimable.utils.cjs`),require(`./formatter.cjs`),require(`./transfer-claimable.utils.cjs`),require(`./bridge-arrival.utils.cjs`),require(`./bridge-flow.utils.cjs`),require(`./bridge-claimable.utils.cjs`),require(`./solana-sponsored.utils.cjs`),require(`./temp-wallet.utils.cjs`),require(`./enclave-recipient-info-storage.cjs`),require(`./temporary-wallet-recovery.utils.cjs`),require(`./dispatchBalanceRefreshes.cjs`),require(`./lifi.utils.cjs`),require(`./solana-memo.cjs`),require(`./mnemonics.cjs`),require(`./nearIntents.utils.cjs`),require(`./enclaveSessionSigning.cjs`),require(`./validateWalletAddress.cjs`),require(`./waasStamp.cjs`),require(`./sponsored-shield.utils.cjs`);
|
|
@@ -16,6 +16,7 @@ export * from './reloadPage';
|
|
|
16
16
|
export * from './string.utils';
|
|
17
17
|
export * from './nickname.utils';
|
|
18
18
|
export * from './caseInsensitive.utils';
|
|
19
|
+
export * from './admin-dimensions';
|
|
19
20
|
export * from './encodeTokenWithId';
|
|
20
21
|
export * from './time.utils';
|
|
21
22
|
export * from './cacheDevice.utils';
|
|
@@ -26,6 +27,8 @@ export * from './upToDateState';
|
|
|
26
27
|
export * from './serialize.utils';
|
|
27
28
|
export * from './convertEmporiumOpToCallInfo';
|
|
28
29
|
export * from './getRecipientInfoFromUserKeys';
|
|
30
|
+
export * from './receive-vault-solana.utils';
|
|
31
|
+
export * from './receive-vault.utils';
|
|
29
32
|
export * from './publicBalance.utils';
|
|
30
33
|
export * from './rpc-int-encode';
|
|
31
34
|
export * from './token-check.utils';
|
|
@@ -33,6 +36,7 @@ export * from './arraysMatch';
|
|
|
33
36
|
export * from './addresses';
|
|
34
37
|
export * from './trimFieldValues';
|
|
35
38
|
export * from './walletBalances.utils';
|
|
39
|
+
export * from './wallet-token-discovery.utils';
|
|
36
40
|
export * from './mutexes.utils';
|
|
37
41
|
export * from './map.utils';
|
|
38
42
|
export * from './nftTokenFunctions';
|
|
@@ -48,6 +52,7 @@ export * from './bytes32.utils';
|
|
|
48
52
|
export * from './getUtxosFromReceipt.utils';
|
|
49
53
|
export * from './getUtxosFromReceiptSolana';
|
|
50
54
|
export * from './fees.utils';
|
|
55
|
+
export * from './gas-token.utils';
|
|
51
56
|
export * from './recovery-balance.utils';
|
|
52
57
|
export * from './proxyAvatar.utils';
|
|
53
58
|
export * from './validateUsername';
|
|
@@ -15,6 +15,9 @@ import "./tron.utils.mjs";
|
|
|
15
15
|
import "./addresses.mjs";
|
|
16
16
|
import "./legacyKeys.mjs";
|
|
17
17
|
import "./auth.utils.mjs";
|
|
18
|
+
import "./create-provider.mjs";
|
|
19
|
+
import "./receive-vault-solana.utils.mjs";
|
|
20
|
+
import "./receive-vault.utils.mjs";
|
|
18
21
|
import "./string.utils.mjs";
|
|
19
22
|
import "./token-check.utils.mjs";
|
|
20
23
|
import "./map.utils.mjs";
|
|
@@ -26,13 +29,14 @@ import "../pre-transaction/solana.mjs";
|
|
|
26
29
|
import "../pre-transaction/process-gas-estimates.mjs";
|
|
27
30
|
import "../pre-transaction/getVolatileTransferAmount.mjs";
|
|
28
31
|
import "../pre-transaction/constructAdminData.mjs";
|
|
29
|
-
import "./create-provider.mjs";
|
|
30
32
|
import "../pre-transaction/calculateSolanaNullifierCount.mjs";
|
|
31
33
|
import "../pre-transaction/convert-okx-instructions.mjs";
|
|
32
34
|
import "./process.utils.mjs";
|
|
33
35
|
import "../pre-transaction/sendV0Transaction.mjs";
|
|
34
36
|
import "./bytes32.utils.mjs";
|
|
35
37
|
import "../pre-transaction/getFeeStructure.mjs";
|
|
38
|
+
import "./gas-token.utils.mjs";
|
|
39
|
+
import "./fees.utils.mjs";
|
|
36
40
|
import "../pre-transaction/getExternalSwapAddress.mjs";
|
|
37
41
|
import "../pre-transaction/speculativeUtxo.mjs";
|
|
38
42
|
import "../pre-transaction/buildCommitmentValidationData.mjs";
|
|
@@ -46,6 +50,7 @@ import "./resolve-sync.utils.mjs";
|
|
|
46
50
|
import "./convertIntegrationProviderToExternalActionId.mjs";
|
|
47
51
|
import "./evmNetworkFunctions.mjs";
|
|
48
52
|
import "./userAgent.mjs";
|
|
53
|
+
import "./admin-dimensions.mjs";
|
|
49
54
|
import "./cacheDevice.utils.mjs";
|
|
50
55
|
import "./getBlockExplorerUrl.mjs";
|
|
51
56
|
import "./involves-permit2-op.mjs";
|
|
@@ -54,6 +59,7 @@ import "./getRecipientInfoFromUserKeys.mjs";
|
|
|
54
59
|
import "./publicBalance.utils.mjs";
|
|
55
60
|
import "./rpc-int-encode.mjs";
|
|
56
61
|
import "./walletBalances.utils.mjs";
|
|
62
|
+
import "./wallet-token-discovery.utils.mjs";
|
|
57
63
|
import "./nftTokenFunctions.mjs";
|
|
58
64
|
import "./inLogicMetadata.mjs";
|
|
59
65
|
import "./networks.utils.mjs";
|
|
@@ -63,7 +69,6 @@ import "./voidWallets.utils.mjs";
|
|
|
63
69
|
import "./prepareHinkal.mjs";
|
|
64
70
|
import "./getUtxosFromReceipt.utils.mjs";
|
|
65
71
|
import "./getUtxosFromReceiptSolana.mjs";
|
|
66
|
-
import "./fees.utils.mjs";
|
|
67
72
|
import "./recovery-balance.utils.mjs";
|
|
68
73
|
import "./proxyAvatar.utils.mjs";
|
|
69
74
|
import "./enclave-utxo-storage.mjs";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=e=>{let t=e;return typeof t?.getAddress==`function`&&typeof t?.sendTransaction==`function`};exports.isSigner=e;
|