@hinkal/common 0.3.5 → 0.3.7
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 +1 -0
- package/common/src/API/API.cjs +1 -1
- package/common/src/API/API.d.ts +6 -5
- package/common/src/API/API.mjs +75 -74
- package/common/src/API/admin-calls.cjs +1 -1
- package/common/src/API/admin-calls.d.ts +1 -1
- package/common/src/API/admin-calls.mjs +3 -1
- package/common/src/API/callLifiAPI.d.ts +1 -0
- package/common/src/API/callNearIntentsAPI.cjs +1 -1
- package/common/src/API/callNearIntentsAPI.mjs +2 -2
- package/common/src/API/callRelayer.cjs +1 -1
- package/common/src/API/callRelayer.d.ts +32 -1
- package/common/src/API/callRelayer.mjs +7 -1
- package/common/src/API/enclaveUtxoCalls.cjs +1 -1
- package/common/src/API/enclaveUtxoCalls.d.ts +16 -16
- package/common/src/API/enclaveUtxoCalls.mjs +3 -3
- package/common/src/API/evm-rpc-fallback.cjs +1 -0
- package/common/src/API/evm-rpc-fallback.d.ts +1 -0
- package/common/src/API/evm-rpc-fallback.mjs +17 -0
- package/common/src/API/evm-token-assets.cjs +1 -0
- package/common/src/API/evm-token-assets.d.ts +8 -0
- package/common/src/API/evm-token-assets.mjs +20 -0
- package/common/src/API/index.cjs +1 -1
- package/common/src/API/index.d.ts +1 -0
- package/common/src/API/index.mjs +1 -0
- package/common/src/API/route-config.cjs +1 -0
- package/common/src/API/route-config.d.ts +1 -0
- package/common/src/API/route-config.mjs +26 -0
- package/common/src/API/solana-nft-assets.cjs +1 -0
- package/common/src/API/solana-nft-assets.d.ts +1 -0
- package/common/src/API/solana-nft-assets.mjs +11 -0
- package/common/src/API/solana-priority-fee.cjs +1 -0
- package/common/src/API/solana-priority-fee.d.ts +3 -0
- package/common/src/API/solana-priority-fee.mjs +20 -0
- package/common/src/API/solana-rpc-fallback.cjs +1 -0
- package/common/src/API/solana-rpc-fallback.d.ts +1 -0
- package/common/src/API/solana-rpc-fallback.mjs +13 -0
- package/common/src/API/temporaryWalletCalls.cjs +1 -1
- package/common/src/API/temporaryWalletCalls.d.ts +0 -4
- package/common/src/API/temporaryWalletCalls.mjs +1 -5
- package/common/src/constants/balance.constants.d.ts +2 -0
- package/common/src/constants/bridging.constants.d.ts +1 -0
- package/common/src/constants/chains.constants.cjs +1 -1
- package/common/src/constants/chains.constants.d.ts +0 -3
- package/common/src/constants/chains.constants.mjs +33 -54
- package/common/src/constants/coingecko.constants.cjs +1 -1
- package/common/src/constants/coingecko.constants.mjs +1 -1
- package/common/src/constants/contracts.constants.cjs +1 -1
- package/common/src/constants/contracts.constants.d.ts +1 -0
- package/common/src/constants/contracts.constants.mjs +19 -15
- 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 -2
- package/common/src/constants/deploy-data/deploy-data-arcTestnet.json.cjs +1 -1
- package/common/src/constants/deploy-data/deploy-data-arcTestnet.json.mjs +3 -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 -2
- 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 -2
- 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 -2
- package/common/src/constants/deploy-data/deploy-data-optimism.json.cjs +1 -1
- package/common/src/constants/deploy-data/deploy-data-optimism.json.mjs +7 -6
- 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 -2
- 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 -2
- 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 +18 -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/okx.constants.d.ts +1 -0
- package/common/src/constants/protocol.constants.cjs +2 -2
- package/common/src/constants/protocol.constants.d.ts +4 -1
- package/common/src/constants/protocol.constants.mjs +3 -8
- package/common/src/constants/server.constants.cjs +1 -1
- package/common/src/constants/server.constants.d.ts +7 -2
- package/common/src/constants/server.constants.mjs +8 -3
- package/common/src/constants/vite.constants.cjs +1 -1
- package/common/src/constants/vite.constants.mjs +5 -23
- package/common/src/data-structures/ApprovalDBs/EventsPublicApprovalsDB.d.ts +1 -2
- package/common/src/data-structures/Hinkal/Hinkal.cjs +1 -1
- package/common/src/data-structures/Hinkal/Hinkal.d.ts +4 -4
- package/common/src/data-structures/Hinkal/Hinkal.mjs +39 -39
- package/common/src/data-structures/Hinkal/IHinkal.d.ts +4 -4
- package/common/src/data-structures/Hinkal/hinkalActionReceive.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalActionReceive.mjs +11 -9
- package/common/src/data-structures/Hinkal/hinkalBridgePrivateToPrivate.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalBridgePrivateToPrivate.d.ts +2 -1
- package/common/src/data-structures/Hinkal/hinkalBridgePrivateToPrivate.mjs +81 -90
- package/common/src/data-structures/Hinkal/hinkalClaimUtxo.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalClaimUtxo.d.ts +1 -1
- package/common/src/data-structures/Hinkal/hinkalClaimUtxo.mjs +3 -5
- package/common/src/data-structures/Hinkal/hinkalDepositAndBridge.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalDepositAndBridge.mjs +100 -104
- package/common/src/data-structures/Hinkal/hinkalDepositAndWithdraw.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalDepositAndWithdraw.d.ts +1 -1
- package/common/src/data-structures/Hinkal/hinkalDepositAndWithdraw.mjs +86 -93
- package/common/src/data-structures/Hinkal/hinkalDepositOnChainUtxos.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalDepositOnChainUtxos.d.ts +20 -7
- package/common/src/data-structures/Hinkal/hinkalDepositOnChainUtxos.mjs +51 -39
- package/common/src/data-structures/Hinkal/hinkalPrivateWallet.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalPrivateWallet.mjs +2 -2
- package/common/src/data-structures/Hinkal/hinkalProxyToPrivate.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalProxyToPrivate.mjs +15 -13
- package/common/src/data-structures/Hinkal/hinkalSolanaClaimUtxo.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalSolanaClaimUtxo.d.ts +1 -1
- package/common/src/data-structures/Hinkal/hinkalSolanaClaimUtxo.mjs +3 -5
- package/common/src/data-structures/Hinkal/hinkalSolanaDeposit.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalSolanaDeposit.mjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalSolanaDepositAndWithdraw.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalSolanaDepositAndWithdraw.d.ts +2 -2
- package/common/src/data-structures/Hinkal/hinkalSolanaDepositAndWithdraw.mjs +88 -121
- package/common/src/data-structures/Hinkal/hinkalSolanaProxySend.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalSolanaProxySend.mjs +1 -3
- package/common/src/data-structures/Hinkal/hinkalSolanaProxyShield.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalSolanaProxyShield.d.ts +24 -2
- package/common/src/data-structures/Hinkal/hinkalSolanaProxyShield.mjs +77 -58
- package/common/src/data-structures/Hinkal/hinkalSolanaProxySwap.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalSolanaProxySwap.mjs +1 -3
- package/common/src/data-structures/Hinkal/hinkalSolanaSponsoredProxySend.d.ts +5 -0
- package/common/src/data-structures/Hinkal/hinkalSolanaSponsoredShield.cjs +1 -0
- package/common/src/data-structures/Hinkal/hinkalSolanaSponsoredShield.d.ts +8 -0
- package/common/src/data-structures/Hinkal/hinkalSolanaSponsoredShield.mjs +31 -0
- package/common/src/data-structures/Hinkal/hinkalSolanaTransact.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalSolanaTransact.mjs +44 -42
- package/common/src/data-structures/Hinkal/hinkalSolanaWithdraw.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalSolanaWithdraw.d.ts +1 -1
- package/common/src/data-structures/Hinkal/hinkalSolanaWithdraw.mjs +29 -24
- package/common/src/data-structures/Hinkal/hinkalSwap.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalSwap.d.ts +1 -1
- package/common/src/data-structures/Hinkal/hinkalSwap.mjs +27 -24
- package/common/src/data-structures/Hinkal/hinkalTransact.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalTransact.mjs +73 -56
- package/common/src/data-structures/Hinkal/hinkalWithdraw.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalWithdraw.d.ts +1 -1
- package/common/src/data-structures/Hinkal/hinkalWithdraw.mjs +21 -18
- package/common/src/data-structures/Hinkal/hinkalWithdrawStuckUtxos.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalWithdrawStuckUtxos.mjs +19 -18
- package/common/src/data-structures/Hinkal/index.d.ts +2 -0
- package/common/src/data-structures/Hinkal/resetMerkleTrees.cjs +1 -1
- package/common/src/data-structures/Hinkal/resetMerkleTrees.mjs +2 -2
- package/common/src/data-structures/TokenDBs/AlchemyPublicTokensDB.cjs +1 -1
- package/common/src/data-structures/TokenDBs/AlchemyPublicTokensDB.d.ts +0 -1
- package/common/src/data-structures/TokenDBs/AlchemyPublicTokensDB.mjs +55 -119
- package/common/src/data-structures/crypto-keys/decodeUTXO.cjs +1 -1
- package/common/src/data-structures/crypto-keys/decodeUTXO.mjs +11 -61
- package/common/src/data-structures/event-service/evm/BlockchainEventEmitter.cjs +1 -1
- package/common/src/data-structures/event-service/evm/BlockchainEventEmitter.d.ts +2 -0
- package/common/src/data-structures/event-service/evm/BlockchainEventEmitter.mjs +41 -27
- package/common/src/data-structures/merkle-tree/MerkleTree.cjs +1 -1
- package/common/src/data-structures/merkle-tree/MerkleTree.d.ts +1 -0
- package/common/src/data-structures/merkle-tree/MerkleTree.mjs +3 -0
- package/common/src/error-handling/get-error.message.cjs +1 -1
- package/common/src/error-handling/get-error.message.mjs +1 -4
- package/common/src/functions/index.cjs +1 -1
- package/common/src/functions/index.mjs +9 -6
- package/common/src/functions/pre-transaction/calculateSolanaNullifierCount.cjs +1 -1
- package/common/src/functions/pre-transaction/calculateSolanaNullifierCount.mjs +2 -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 -1
- package/common/src/functions/pre-transaction/merge-with-fee-structure-emporium.cjs +1 -1
- package/common/src/functions/pre-transaction/merge-with-fee-structure-emporium.mjs +2 -2
- package/common/src/functions/pre-transaction/sendV0Transaction.cjs +2 -2
- package/common/src/functions/pre-transaction/sendV0Transaction.d.ts +5 -2
- package/common/src/functions/pre-transaction/sendV0Transaction.mjs +4 -4
- package/common/src/functions/pre-transaction/solanaTransfer.utils.cjs +1 -1
- package/common/src/functions/pre-transaction/solanaTransfer.utils.mjs +16 -15
- package/common/src/functions/pre-transaction/speculativeUtxo.cjs +1 -0
- package/common/src/functions/pre-transaction/speculativeUtxo.d.ts +9 -0
- package/common/src/functions/pre-transaction/speculativeUtxo.mjs +19 -0
- package/common/src/functions/private-wallet/emporium.helpers.cjs +1 -1
- package/common/src/functions/private-wallet/emporium.helpers.d.ts +9 -2
- package/common/src/functions/private-wallet/emporium.helpers.mjs +93 -74
- package/common/src/functions/snarkjs/common.snarkjs.cjs +1 -1
- package/common/src/functions/snarkjs/common.snarkjs.d.ts +1 -0
- package/common/src/functions/snarkjs/common.snarkjs.mjs +36 -32
- package/common/src/functions/snarkjs/constant.cjs +1 -1
- package/common/src/functions/snarkjs/constant.d.ts +48 -0
- package/common/src/functions/snarkjs/constant.mjs +48 -0
- package/common/src/functions/snarkjs/constructGeneralZkProof.cjs +1 -1
- package/common/src/functions/snarkjs/constructGeneralZkProof.d.ts +1 -1
- package/common/src/functions/snarkjs/constructGeneralZkProof.mjs +75 -71
- package/common/src/functions/snarkjs/constructSolanaZkProof.cjs +1 -1
- package/common/src/functions/snarkjs/constructSolanaZkProof.d.ts +1 -1
- package/common/src/functions/snarkjs/constructSolanaZkProof.mjs +27 -27
- package/common/src/functions/snarkjs/constructTxEnclave.cjs +1 -1
- package/common/src/functions/snarkjs/constructTxEnclave.mjs +8 -3
- package/common/src/functions/snarkjs/fetchOnChainRootHashes.cjs +1 -1
- package/common/src/functions/snarkjs/fetchOnChainRootHashes.mjs +10 -21
- package/common/src/functions/snarkjs/getMerkleTreeSiblingsAndRootHashes.cjs +1 -1
- package/common/src/functions/snarkjs/getMerkleTreeSiblingsAndRootHashes.d.ts +2 -2
- package/common/src/functions/snarkjs/getMerkleTreeSiblingsAndRootHashes.mjs +3 -3
- package/common/src/functions/snarkjs/signedMessageHash.cjs +1 -1
- package/common/src/functions/snarkjs/signedMessageHash.d.ts +4 -0
- package/common/src/functions/snarkjs/signedMessageHash.mjs +27 -18
- package/common/src/functions/utils/addresses.cjs +1 -1
- package/common/src/functions/utils/addresses.mjs +19 -12
- package/common/src/functions/utils/bridge-arrival.utils.cjs +1 -0
- package/common/src/functions/utils/bridge-arrival.utils.d.ts +1 -0
- package/common/src/functions/utils/bridge-arrival.utils.mjs +15 -0
- package/common/src/functions/utils/bridge-claimable-utxo.utils.cjs +1 -0
- package/common/src/functions/utils/bridge-claimable-utxo.utils.d.ts +19 -0
- package/common/src/functions/utils/bridge-claimable-utxo.utils.mjs +24 -0
- package/common/src/functions/utils/bridge-claimable.utils.d.ts +2 -3
- package/common/src/functions/utils/create-provider.cjs +1 -1
- package/common/src/functions/utils/create-provider.d.ts +9 -2
- package/common/src/functions/utils/create-provider.mjs +42 -9
- package/common/src/functions/utils/deposit-claimable.utils.cjs +1 -1
- package/common/src/functions/utils/deposit-claimable.utils.d.ts +2 -5
- package/common/src/functions/utils/deposit-claimable.utils.mjs +1 -6
- package/common/src/functions/utils/enclave-utxo-storage.cjs +1 -1
- package/common/src/functions/utils/enclave-utxo-storage.d.ts +4 -8
- package/common/src/functions/utils/enclave-utxo-storage.mjs +13 -2
- 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 +15 -6
- package/common/src/functions/utils/getUtxosFromReceipt.utils.cjs +1 -1
- package/common/src/functions/utils/getUtxosFromReceipt.utils.d.ts +1 -1
- package/common/src/functions/utils/getUtxosFromReceipt.utils.mjs +5 -51
- package/common/src/functions/utils/getUtxosFromReceiptSolana.cjs +1 -1
- package/common/src/functions/utils/getUtxosFromReceiptSolana.mjs +7 -23
- package/common/src/functions/utils/index.cjs +1 -1
- package/common/src/functions/utils/index.d.ts +6 -0
- package/common/src/functions/utils/index.mjs +10 -4
- package/common/src/functions/utils/nearIntents.utils.cjs +1 -1
- package/common/src/functions/utils/nearIntents.utils.mjs +27 -13
- package/common/src/functions/utils/publicBalance.utils.cjs +1 -1
- package/common/src/functions/utils/publicBalance.utils.d.ts +0 -1
- package/common/src/functions/utils/publicBalance.utils.mjs +35 -22
- package/common/src/functions/utils/recovery-balance.utils.cjs +1 -0
- package/common/src/functions/utils/recovery-balance.utils.d.ts +2 -0
- package/common/src/functions/utils/recovery-balance.utils.mjs +1 -0
- package/common/src/functions/utils/solana-program.utils.cjs +1 -0
- package/common/src/functions/utils/solana-program.utils.d.ts +3 -0
- package/common/src/functions/utils/solana-program.utils.mjs +17 -0
- package/common/src/functions/utils/solana-sponsored.utils.cjs +1 -0
- package/common/src/functions/utils/solana-sponsored.utils.d.ts +22 -0
- package/common/src/functions/utils/solana-sponsored.utils.mjs +30 -0
- package/common/src/functions/utils/solanaMint.utils.cjs +1 -1
- package/common/src/functions/utils/solanaMint.utils.d.ts +7 -0
- package/common/src/functions/utils/solanaMint.utils.mjs +18 -8
- package/common/src/functions/utils/sponsored-shield.utils.cjs +1 -0
- package/common/src/functions/utils/sponsored-shield.utils.d.ts +3 -0
- package/common/src/functions/utils/sponsored-shield.utils.mjs +3 -0
- package/common/src/functions/utils/temp-wallet.utils.cjs +1 -1
- package/common/src/functions/utils/temp-wallet.utils.d.ts +5 -4
- package/common/src/functions/utils/temp-wallet.utils.mjs +35 -14
- package/common/src/functions/utils/transfer-claimable.utils.cjs +1 -1
- package/common/src/functions/utils/transfer-claimable.utils.d.ts +1 -2
- package/common/src/functions/utils/transfer-claimable.utils.mjs +2 -5
- package/common/src/functions/utils/tron.utils.cjs +1 -1
- package/common/src/functions/utils/tron.utils.d.ts +2 -2
- package/common/src/functions/utils/tron.utils.mjs +19 -18
- package/common/src/functions/utils/tronSimulation.utils.cjs +1 -1
- package/common/src/functions/utils/tronSimulation.utils.mjs +4 -6
- package/common/src/functions/utils/tx-confirmation.utils.cjs +1 -1
- package/common/src/functions/utils/tx-confirmation.utils.mjs +1 -1
- package/common/src/functions/web3/events/getInputUtxosEnclave.cjs +1 -1
- package/common/src/functions/web3/events/getInputUtxosEnclave.mjs +15 -25
- package/common/src/functions/web3/functionCalls/submitProof.cjs +1 -1
- package/common/src/functions/web3/functionCalls/submitProof.mjs +6 -6
- package/common/src/functions/web3/functionCalls/transactCallRelayer.cjs +1 -1
- package/common/src/functions/web3/functionCalls/transactCallRelayer.d.ts +2 -2
- package/common/src/functions/web3/functionCalls/transactCallRelayer.mjs +8 -6
- package/common/src/functions/web3/getContractMetadata.cjs +1 -1
- package/common/src/functions/web3/getContractMetadata.mjs +1 -1
- package/common/src/functions/web3/getPublicAddressBalance.cjs +1 -1
- package/common/src/functions/web3/getPublicAddressBalance.d.ts +1 -2
- package/common/src/functions/web3/getPublicAddressBalance.mjs +6 -5
- package/common/src/functions/web3/index.cjs +1 -1
- package/common/src/functions/web3/index.d.ts +1 -1
- package/common/src/functions/web3/index.mjs +1 -1
- package/common/src/providers/SolanaProviderAdapter.cjs +1 -1
- package/common/src/providers/SolanaProviderAdapter.mjs +1 -2
- package/common/src/providers/WagmiProviderAdapter.cjs +1 -1
- package/common/src/providers/WagmiProviderAdapter.mjs +35 -38
- package/common/src/types/bridging-tx.types.d.ts +1 -4
- package/common/src/types/cache.types.cjs +1 -1
- package/common/src/types/cache.types.d.ts +0 -1
- package/common/src/types/cache.types.mjs +1 -1
- package/common/src/types/ethereum-network.types.cjs +1 -1
- package/common/src/types/ethereum-network.types.d.ts +9 -7
- 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 +1 -0
- 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 -1
- package/common/src/types/index.mjs +1 -1
- package/common/src/types/pay-activities.types.d.ts +3 -1
- package/common/src/types/remote-tx-build.types.d.ts +23 -0
- package/common/src/types/scheduled-transactions.types.d.ts +4 -12
- package/common/src/types/solana.types.cjs +1 -0
- package/common/src/types/solana.types.d.ts +5 -0
- package/common/src/types/solana.types.mjs +6 -0
- package/common/src/types/temp-wallet.types.d.ts +9 -0
- package/common/src/types/token.types.d.ts +1 -0
- package/common/src/webworker/logError-RKYfeI6h.js +2 -0
- package/common/src/webworker/package.json +21 -19
- 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 +28 -1
- package/common/src/webworker/viteWorkerURL.constant.mjs +27 -13
- package/common/src/webworker/workerProxy-COB7g4Qc.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/package.json +25 -23
- package/services/Hinkal.cjs +1 -1
- package/services/Hinkal.d.ts +2 -2
- package/services/Hinkal.mjs +3 -3
- package/types/IHinkal.d.ts +2 -2
- package/assets/snarkjsWorkerLauncher-SrStwJvX.js +0 -1
- package/assets/snarkjsWorkerLogic-DtIjisbE.js +0 -132
- package/assets/utxoWorkerLauncher-CIBeBAML.js +0 -1
- package/assets/utxoWorkerLogic-C8R4GSaf.js +0 -199
- package/assets/zkProofWorkerLauncher-DfwteloJ.js +0 -1
- package/assets/zkProofWorkerLogic-CY9y6rOV.js +0 -199
- package/common/src/API/deposit-and-withdraw-status-calls.cjs +0 -1
- package/common/src/API/deposit-and-withdraw-status-calls.d.ts +0 -21
- package/common/src/API/deposit-and-withdraw-status-calls.mjs +0 -13
- package/common/src/data-structures/Hinkal/hinkalTronDepositToSelf.cjs +0 -1
- package/common/src/data-structures/Hinkal/hinkalTronDepositToSelf.d.ts +0 -8
- package/common/src/data-structures/Hinkal/hinkalTronDepositToSelf.mjs +0 -30
- package/common/src/data-structures/Hinkal/prepareTronDepositToSelf.cjs +0 -1
- package/common/src/data-structures/Hinkal/prepareTronDepositToSelf.mjs +0 -31
- package/common/src/functions/pre-transaction/waitForDepositedUtxosInMerkleTree.cjs +0 -1
- package/common/src/functions/pre-transaction/waitForDepositedUtxosInMerkleTree.mjs +0 -29
- package/common/src/functions/utils/enum.utils.cjs +0 -1
- package/common/src/functions/utils/enum.utils.mjs +0 -12
- package/common/src/functions/web3/getSolanaPriorityFee.cjs +0 -1
- package/common/src/functions/web3/getSolanaPriorityFee.d.ts +0 -3
- package/common/src/functions/web3/getSolanaPriorityFee.mjs +0 -26
- package/common/src/types/scheduled-transactions.types.cjs +0 -1
- package/common/src/types/scheduled-transactions.types.mjs +0 -6
- package/common/src/webworker/logError-Dex6ch32.js +0 -2
- package/common/src/webworker/workerProxy-BuJUMCQ4.js +0 -1
|
@@ -4,6 +4,8 @@ import { ethers as n } from "ethers";
|
|
|
4
4
|
import { BN as r } from "@coral-xyz/anchor";
|
|
5
5
|
//#region libs/shared/common/src/functions/snarkjs/signedMessageHash.ts
|
|
6
6
|
var i = (e) => [...new r(e.length).toArray("be", 8), ...e.flatMap((e) => t(e))], a = (t) => BigInt(n.keccak256(t)) % e, o = [
|
|
7
|
+
"uint256",
|
|
8
|
+
"address",
|
|
7
9
|
"uint256",
|
|
8
10
|
"uint256[]",
|
|
9
11
|
"uint256[]",
|
|
@@ -11,12 +13,13 @@ var i = (e) => [...new r(e.length).toArray("be", 8), ...e.flatMap((e) => t(e))],
|
|
|
11
13
|
"uint256[]",
|
|
12
14
|
"uint256[]",
|
|
13
15
|
"uint256",
|
|
14
|
-
"uint256"
|
|
16
|
+
"uint256"
|
|
17
|
+
], s = [
|
|
15
18
|
"uint256",
|
|
16
19
|
"uint256",
|
|
17
20
|
"uint256",
|
|
18
21
|
"uint256"
|
|
19
|
-
],
|
|
22
|
+
], c = [
|
|
20
23
|
"uint256",
|
|
21
24
|
"uint256[]",
|
|
22
25
|
"uint256[]",
|
|
@@ -25,20 +28,26 @@ var i = (e) => [...new r(e.length).toArray("be", 8), ...e.flatMap((e) => t(e))],
|
|
|
25
28
|
"uint256[]",
|
|
26
29
|
"uint256",
|
|
27
30
|
"uint256"
|
|
28
|
-
],
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
31
|
+
], l = (e) => {
|
|
32
|
+
let t = n.keccak256(n.AbiCoder.defaultAbiCoder().encode(o, [
|
|
33
|
+
e.chainId,
|
|
34
|
+
e.verifyingContract,
|
|
35
|
+
e.rootHashHinkal,
|
|
36
|
+
e.erc20TokenAddresses.map((e) => n.getBigInt(e)),
|
|
37
|
+
e.amountChanges,
|
|
38
|
+
e.outTimeStamp,
|
|
39
|
+
e.inNullifiers.flat().map((e) => BigInt(e)),
|
|
40
|
+
e.outCommitments.flat().map((e) => BigInt(e)),
|
|
41
|
+
e.calldataHash,
|
|
42
|
+
e.message
|
|
43
|
+
])), r = n.keccak256(n.AbiCoder.defaultAbiCoder().encode(s, [
|
|
44
|
+
e.outH1Ax,
|
|
45
|
+
e.outH1Ay,
|
|
46
|
+
e.H0Ax,
|
|
47
|
+
e.H0Ay
|
|
48
|
+
]));
|
|
49
|
+
return a(n.AbiCoder.defaultAbiCoder().encode(["uint256", "uint256"], [BigInt(t), BigInt(r)]));
|
|
50
|
+
}, u = (e) => a(n.AbiCoder.defaultAbiCoder().encode(c, [
|
|
42
51
|
e.rootHashHinkal,
|
|
43
52
|
e.erc20TokenAddresses.map((e) => n.getBigInt(e)),
|
|
44
53
|
e.amountChanges,
|
|
@@ -47,7 +56,7 @@ var i = (e) => [...new r(e.length).toArray("be", 8), ...e.flatMap((e) => t(e))],
|
|
|
47
56
|
e.outCommitments.flat().map((e) => BigInt(e)),
|
|
48
57
|
e.calldataHash,
|
|
49
58
|
e.message
|
|
50
|
-
])),
|
|
59
|
+
])), d = (r) => {
|
|
51
60
|
let a = r.inNullifiers.flat().map((e) => BigInt(e)), o = r.outCommitments.flat().map((e) => BigInt(e)), s = [
|
|
52
61
|
...t(r.rootHashHinkal),
|
|
53
62
|
...i(r.mintAccountPart1),
|
|
@@ -66,4 +75,4 @@ var i = (e) => [...new r(e.length).toArray("be", 8), ...e.flatMap((e) => t(e))],
|
|
|
66
75
|
return BigInt(n.sha256(new Uint8Array(s))) % e;
|
|
67
76
|
};
|
|
68
77
|
//#endregion
|
|
69
|
-
export {
|
|
78
|
+
export { l as computeSignedMessageHashEvm, d as computeSignedMessageHashSolana, u as computeSignedMessageHashTron };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
require(`../../../../_virtual/_rolldown/runtime.cjs`)
|
|
1
|
+
require(`../../../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../constants/chains.constants.cjs`),t=require(`../../constants/protocol.constants.cjs`),n=require(`./caseInsensitive.utils.cjs`);let r=require(`ethers`),i=require(`@solana/web3.js`);require(`tronweb`);var a=[`http://`,`https://`,`/payment/`,`.app/`,`.com/`,`.netlify.`],o=e=>{if(a.some(t=>e.includes(t)))return!1;let[t,n,r,i,o,s]=e.split(`,`),c=!t||!s||!n||!r||!i||!o,l=t?.substring(0,2)!==`0x`||s?.substring(0,2)!==`0x`,u=s?.length!==66||t?.length>66||t?.length<64,d=e?.includes(`"`);return!(c||l||u||d)},s=e=>{let[t,n,r,i,a]=e.split(`,`);return{H0x:BigInt(n),H0y:BigInt(r),H1x:BigInt(i),H1y:BigInt(a),stealthAddress:BigInt(t)}},c=e=>{let[,,,,,t]=e.split(`,`);if(!t)throw Error(`recipientInfo is missing an encryption key`);return t},l=e=>r.ethers.keccak256(r.ethers.toUtf8Bytes(e.toLowerCase())),u=e=>r.ethers.keccak256(r.ethers.toUtf8Bytes(e)),d=e=>{try{return new i.PublicKey(e).toBase58()===e}catch{return!1}},f=(r,i)=>(r=r.trim(),r?i===void 0?n.caseInsensitiveEqual(r,t.zeroAddress)||n.caseInsensitiveEqual(r,`11111111111111111111111111111111`):e.isSolanaLike(i)?n.caseInsensitiveEqual(r,t.solanaNativeAddress):n.caseInsensitiveEqual(r,t.zeroAddress):!1);exports.constructStealthAddressStructure=s,exports.getEncryptionKeyFromRecipientInfo=c,exports.hashEthereumAddress=l,exports.hashString=u,exports.isNativePlaceholderAddress=f,exports.isValidPrivateAddress=o,exports.isValidSolanaPublicKey=d;
|
|
@@ -1,21 +1,22 @@
|
|
|
1
|
-
import "../../constants/chains.constants.mjs";
|
|
2
|
-
import "../../constants/protocol.constants.mjs";
|
|
3
|
-
import {
|
|
4
|
-
import "
|
|
1
|
+
import { isSolanaLike as e } from "../../constants/chains.constants.mjs";
|
|
2
|
+
import { solanaNativeAddress as t, zeroAddress as n } from "../../constants/protocol.constants.mjs";
|
|
3
|
+
import { caseInsensitiveEqual as r } from "./caseInsensitive.utils.mjs";
|
|
4
|
+
import { ethers as i } from "ethers";
|
|
5
|
+
import { PublicKey as a } from "@solana/web3.js";
|
|
5
6
|
import "tronweb";
|
|
6
7
|
//#region libs/shared/common/src/functions/utils/addresses.ts
|
|
7
|
-
var
|
|
8
|
+
var o = [
|
|
8
9
|
"http://",
|
|
9
10
|
"https://",
|
|
10
11
|
"/payment/",
|
|
11
12
|
".app/",
|
|
12
13
|
".com/",
|
|
13
14
|
".netlify."
|
|
14
|
-
],
|
|
15
|
-
if (
|
|
16
|
-
let [n, r, i, a,
|
|
15
|
+
], s = (e) => {
|
|
16
|
+
if (o.some((t) => e.includes(t))) return !1;
|
|
17
|
+
let [t, n, r, i, a, s] = e.split(","), c = !t || !s || !n || !r || !i || !a, l = t?.substring(0, 2) !== "0x" || s?.substring(0, 2) !== "0x", u = s?.length !== 66 || t?.length > 66 || t?.length < 64, d = e?.includes("\"");
|
|
17
18
|
return !(c || l || u || d);
|
|
18
|
-
},
|
|
19
|
+
}, c = (e) => {
|
|
19
20
|
let [t, n, r, i, a] = e.split(",");
|
|
20
21
|
return {
|
|
21
22
|
H0x: BigInt(n),
|
|
@@ -24,10 +25,16 @@ var t = [
|
|
|
24
25
|
H1y: BigInt(a),
|
|
25
26
|
stealthAddress: BigInt(t)
|
|
26
27
|
};
|
|
27
|
-
},
|
|
28
|
+
}, l = (e) => {
|
|
28
29
|
let [, , , , , t] = e.split(",");
|
|
29
30
|
if (!t) throw Error("recipientInfo is missing an encryption key");
|
|
30
31
|
return t;
|
|
31
|
-
},
|
|
32
|
+
}, u = (e) => i.keccak256(i.toUtf8Bytes(e.toLowerCase())), d = (e) => i.keccak256(i.toUtf8Bytes(e)), f = (e) => {
|
|
33
|
+
try {
|
|
34
|
+
return new a(e).toBase58() === e;
|
|
35
|
+
} catch {
|
|
36
|
+
return !1;
|
|
37
|
+
}
|
|
38
|
+
}, p = (i, a) => (i = i.trim(), i ? a === void 0 ? r(i, n) || r(i, "11111111111111111111111111111111") : e(a) ? r(i, t) : r(i, n) : !1);
|
|
32
39
|
//#endregion
|
|
33
|
-
export {
|
|
40
|
+
export { c as constructStealthAddressStructure, l as getEncryptionKeyFromRecipientInfo, u as hashEthereumAddress, d as hashString, p as isNativePlaceholderAddress, s as isValidPrivateAddress, f as isValidSolanaPublicKey };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`./time.utils.cjs`),t=require(`../../constants/bridging.constants.cjs`),n=require(`./publicBalance.utils.cjs`);var r=async(r,i,a,o,s)=>{let c=o-o*BigInt(Math.round(s*t.SLIPPAGE_SCALING_FACTOR))/BigInt(t.SLIPPAGE_SCALING_FACTOR),l=c>0n?c:1n,u=Date.now()+t.BRIDGE_ARRIVAL_TIMEOUT_MS;for(;Date.now()<u;){let o=await n.getPublicBalanceByTokenAddress(r,i,a);if(o!==null&&o>=l)return o;await e.waitLittle(t.BRIDGE_ARRIVAL_POLL_INTERVAL_MS)}throw Error(`Bridge did not land on destination temp wallet ${i} on chain ${r} within timeout.`)};exports.waitForBridgeArrival=r;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const waitForBridgeArrival: (destChainId: number, tempWalletAddress: string, destTokenAddress: string, expectedAmount: bigint, slippage: number) => Promise<bigint>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { waitLittle as e } from "./time.utils.mjs";
|
|
2
|
+
import { BRIDGE_ARRIVAL_POLL_INTERVAL_MS as t, BRIDGE_ARRIVAL_TIMEOUT_MS as n, SLIPPAGE_SCALING_FACTOR as r } from "../../constants/bridging.constants.mjs";
|
|
3
|
+
import { getPublicBalanceByTokenAddress as i } from "./publicBalance.utils.mjs";
|
|
4
|
+
//#region libs/shared/common/src/functions/utils/bridge-arrival.utils.ts
|
|
5
|
+
var a = async (a, o, s, c, l) => {
|
|
6
|
+
let u = c - c * BigInt(Math.round(l * r)) / BigInt(r), d = u > 0n ? u : 1n, f = Date.now() + n;
|
|
7
|
+
for (; Date.now() < f;) {
|
|
8
|
+
let n = await i(a, o, s);
|
|
9
|
+
if (n !== null && n >= d) return n;
|
|
10
|
+
await e(t);
|
|
11
|
+
}
|
|
12
|
+
throw Error(`Bridge did not land on destination temp wallet ${o} on chain ${a} within timeout.`);
|
|
13
|
+
};
|
|
14
|
+
//#endregion
|
|
15
|
+
export { a as waitForBridgeArrival };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`../../data-structures/crypto-keys/keys.cjs`),t=require(`./getRecipientInfoFromUserKeys.cjs`),n=require(`../../data-structures/Hinkal/hinkalSolanaSponsoredShield.cjs`);var r=(n,r)=>{if(`recipientInfo`in r)return{recipientInfo:r.recipientInfo};let i=n.userKeys.getClaimableSignatureFromNonce(r.claimableNonce),a=new e.UserKeys(i);return{recipientInfo:t.getRecipientInfoFromUserKeys(a),claimable:{signature:i,keys:a,ethAddress:r.recipientEthAddress}}},i=async(e,t,r,i,a)=>{let{txHash:o,shieldedAmount:s}=await n.hinkalSolanaSponsoredShield(e,t,r,i,a);return{destTxHash:o,shieldedAmount:s}};exports.hinkalSolanaShieldBridged=i,exports.resolveBridgeRecipient=r;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { PrivateBridgeRecipient } from '../../types/bridging-tx.types';
|
|
2
|
+
import { SubAccount } from '../../types/proxy.types';
|
|
3
|
+
import { ERC20Token } from '../../types/token.types';
|
|
4
|
+
import { UserKeys } from '../../data-structures/crypto-keys/keys';
|
|
5
|
+
import { IHinkal } from '../../data-structures/Hinkal/IHinkal';
|
|
6
|
+
export type BridgeClaimableRecipient = {
|
|
7
|
+
signature: string;
|
|
8
|
+
ethAddress: string;
|
|
9
|
+
keys: UserKeys;
|
|
10
|
+
};
|
|
11
|
+
export interface BridgeResolvedRecipient {
|
|
12
|
+
recipientInfo: string;
|
|
13
|
+
claimable?: BridgeClaimableRecipient;
|
|
14
|
+
}
|
|
15
|
+
export declare const resolveBridgeRecipient: (hinkal: IHinkal, recipient: PrivateBridgeRecipient) => BridgeResolvedRecipient;
|
|
16
|
+
export declare const hinkalSolanaShieldBridged: (hinkal: IHinkal, token: ERC20Token, tempSubAccount: SubAccount, landedAmount: bigint, recipientInfo: string) => Promise<{
|
|
17
|
+
destTxHash: string;
|
|
18
|
+
shieldedAmount: bigint;
|
|
19
|
+
}>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { UserKeys as e } from "../../data-structures/crypto-keys/keys.mjs";
|
|
2
|
+
import { getRecipientInfoFromUserKeys as t } from "./getRecipientInfoFromUserKeys.mjs";
|
|
3
|
+
import { hinkalSolanaSponsoredShield as n } from "../../data-structures/Hinkal/hinkalSolanaSponsoredShield.mjs";
|
|
4
|
+
//#region libs/shared/common/src/functions/utils/bridge-claimable-utxo.utils.ts
|
|
5
|
+
var r = (n, r) => {
|
|
6
|
+
if ("recipientInfo" in r) return { recipientInfo: r.recipientInfo };
|
|
7
|
+
let i = n.userKeys.getClaimableSignatureFromNonce(r.claimableNonce), a = new e(i);
|
|
8
|
+
return {
|
|
9
|
+
recipientInfo: t(a),
|
|
10
|
+
claimable: {
|
|
11
|
+
signature: i,
|
|
12
|
+
keys: a,
|
|
13
|
+
ethAddress: r.recipientEthAddress
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
}, i = async (e, t, r, i, a) => {
|
|
17
|
+
let { txHash: o, shieldedAmount: s } = await n(e, t, r, i, a);
|
|
18
|
+
return {
|
|
19
|
+
destTxHash: o,
|
|
20
|
+
shieldedAmount: s
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
//#endregion
|
|
24
|
+
export { i as hinkalSolanaShieldBridged, r as resolveBridgeRecipient };
|
|
@@ -3,14 +3,13 @@ import { ErrorWithIndex } from '../../error-handling';
|
|
|
3
3
|
import { IHinkal } from '../../data-structures/Hinkal/IHinkal';
|
|
4
4
|
import { AdminTransactionType } from '../../types/admin.types';
|
|
5
5
|
import { PrivateBridgeResult } from '../../types/bridging-tx.types';
|
|
6
|
+
import { FeeStructure } from '../../types/hinkal.types';
|
|
6
7
|
import { RecipientRequest } from '../../types/pay-routing.types';
|
|
7
|
-
import { PendingEnclaveUtxo } from '../../types/scheduled-transactions.types';
|
|
8
8
|
import { ERC20Token } from '../../types/token.types';
|
|
9
9
|
export interface BridgeClaimableResult {
|
|
10
10
|
results: PrivateBridgeResult[];
|
|
11
|
-
pendingEnclaveUtxos: PendingEnclaveUtxo[];
|
|
12
11
|
sourceTxHashes: string[];
|
|
13
12
|
destTxHashes: string[];
|
|
14
13
|
failedRecipientErrorMessage: ErrorWithIndex | undefined;
|
|
15
14
|
}
|
|
16
|
-
export declare const bridgeClaimableToPrivate: (hinkal: IHinkal, sourceToken: ERC20Token, destToken: ERC20Token, recipients: RecipientRequest[], allocations: PrivateSendAllocation[], baseNonce: bigint, tokenPriceDollar?: number, feeToken?: string, action?: AdminTransactionType) => Promise<BridgeClaimableResult>;
|
|
15
|
+
export declare const bridgeClaimableToPrivate: (hinkal: IHinkal, sourceToken: ERC20Token, destToken: ERC20Token, recipients: RecipientRequest[], allocations: PrivateSendAllocation[], baseNonce: bigint, tokenPriceDollar?: number, feeToken?: string, feeStructureOverride?: FeeStructure, action?: AdminTransactionType) => Promise<BridgeClaimableResult>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
require(`../../../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../constants/chains.constants.cjs`);let
|
|
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`]);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,4 +1,11 @@
|
|
|
1
1
|
import { Commitment, Connection, ConnectionConfig } from '@solana/web3.js';
|
|
2
|
-
import { JsonRpcProvider } from 'ethers';
|
|
3
|
-
|
|
2
|
+
import { JsonRpcProvider, PerformActionRequest } from 'ethers';
|
|
3
|
+
declare class FallbackAwareJsonRpcProvider extends JsonRpcProvider {
|
|
4
|
+
private readonly chainId;
|
|
5
|
+
private readonly isPaidRpc;
|
|
6
|
+
constructor(chainId: number, url: string, network: number);
|
|
7
|
+
_perform(req: PerformActionRequest): Promise<any>;
|
|
8
|
+
}
|
|
9
|
+
export declare const createJsonRpcProvider: (chainId: number) => FallbackAwareJsonRpcProvider;
|
|
4
10
|
export declare const createCustomSolanaConnection: (endpoint: string, commitmentOrConfig?: Commitment | ConnectionConfig) => Connection;
|
|
11
|
+
export {};
|
|
@@ -1,11 +1,44 @@
|
|
|
1
|
-
import { getOnchainChainId as e,
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { getOnchainChainId as e, isTempo as t, isTronLike as n, networkRegistry as r } from "../../constants/chains.constants.mjs";
|
|
2
|
+
import { getSolanaRpcResultFromServer as i } from "../../API/solana-rpc-fallback.mjs";
|
|
3
|
+
import { getEvmRpcResultFromServer as a } from "../../API/evm-rpc-fallback.mjs";
|
|
4
|
+
import { JsonRpcProvider as o } from "ethers";
|
|
5
|
+
import { Connection as s } from "@solana/web3.js";
|
|
4
6
|
//#region libs/shared/common/src/functions/utils/create-provider.ts
|
|
5
|
-
var
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
7
|
+
var c = class extends o {
|
|
8
|
+
isPaidRpc;
|
|
9
|
+
constructor(e, t, n) {
|
|
10
|
+
super(t, n, { staticNetwork: !0 }), this.chainId = e, this.isPaidRpc = t.includes(".g.alchemy.com/");
|
|
11
|
+
}
|
|
12
|
+
async _perform(e) {
|
|
13
|
+
if (this.isPaidRpc || t(this.chainId)) return super._perform(e);
|
|
14
|
+
if (e.method === "getTransactionReceipt") return a(this.chainId, "eth_getTransactionReceipt", [e.hash]);
|
|
15
|
+
if (e.method === "getLogs") return a(this.chainId, "eth_getLogs", [e.filter]);
|
|
16
|
+
try {
|
|
17
|
+
return await super._perform(e);
|
|
18
|
+
} catch (t) {
|
|
19
|
+
let n = this.getRpcRequest(e);
|
|
20
|
+
if (!n) throw t;
|
|
21
|
+
return a(this.chainId, n.method, n.args);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}, l = (t) => {
|
|
25
|
+
let { rpcUrl: i } = r[t];
|
|
26
|
+
return new c(t, n(t) && !i.includes(".g.alchemy.com/") ? `${i}/jsonrpc` : i, e(t));
|
|
27
|
+
}, u = (e, t = "confirmed") => {
|
|
28
|
+
let n = new s(e, t), r = e.includes("helius-rpc.com"), a = n._rpcRequest.bind(n), o = new Set([
|
|
29
|
+
"getLatestBlockhash",
|
|
30
|
+
"getBlockHeight",
|
|
31
|
+
"getTokenAccountsByOwner"
|
|
32
|
+
]);
|
|
33
|
+
return n._rpcRequest = async (e, t) => {
|
|
34
|
+
if (r) return a(e, t);
|
|
35
|
+
if (o.has(e)) return i(e, t);
|
|
36
|
+
try {
|
|
37
|
+
return await a(e, t);
|
|
38
|
+
} catch {
|
|
39
|
+
return i(e, t);
|
|
40
|
+
}
|
|
41
|
+
}, n;
|
|
42
|
+
};
|
|
10
43
|
//#endregion
|
|
11
|
-
export {
|
|
44
|
+
export { u as createCustomSolanaConnection, l as createJsonRpcProvider };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
require(`../../data-structures/crypto-keys/keys.cjs`),require(
|
|
1
|
+
require(`../../data-structures/crypto-keys/keys.cjs`),require(`./token-check.utils.cjs`),require(`../../error-handling/index.cjs`),require(`../../data-structures/Hinkal/hinkalDeposit.cjs`),require(`../../constants/index.cjs`),require(`./enclave-utxo-storage.cjs`),require(`./buildClaimableDepositPlan.cjs`);
|
|
@@ -1,6 +1,3 @@
|
|
|
1
1
|
import { IHinkal } from '../../data-structures/Hinkal/IHinkal';
|
|
2
|
-
import { AdminTransactionType, ERC20Token
|
|
3
|
-
export declare const depositClaimableUtxos: (hinkal: IHinkal, erc20Tokens: ERC20Token[], recipientAmounts: bigint[], recipientAddresses: string[], nonce: bigint, recipientInfos?: Array<string | undefined>, action?: AdminTransactionType) => Promise<
|
|
4
|
-
pendingEnclaveUtxos: PendingEnclaveUtxo[];
|
|
5
|
-
txHash: string;
|
|
6
|
-
}>;
|
|
2
|
+
import { AdminTransactionType, ERC20Token } from '../../types';
|
|
3
|
+
export declare const depositClaimableUtxos: (hinkal: IHinkal, erc20Tokens: ERC20Token[], recipientAmounts: bigint[], recipientAddresses: string[], nonce: bigint, recipientInfos?: Array<string | undefined>, action?: AdminTransactionType) => Promise<string>;
|
|
@@ -1,12 +1,7 @@
|
|
|
1
1
|
import "../../data-structures/crypto-keys/keys.mjs";
|
|
2
|
-
import "../../data-structures/utxo/Utxo.mjs";
|
|
3
|
-
import "./solanaMint.utils.mjs";
|
|
4
2
|
import "./token-check.utils.mjs";
|
|
5
3
|
import "../../error-handling/index.mjs";
|
|
6
|
-
import "../pre-transaction/index.mjs";
|
|
7
4
|
import "../../data-structures/Hinkal/hinkalDeposit.mjs";
|
|
8
5
|
import "../../constants/index.mjs";
|
|
9
|
-
import "./
|
|
10
|
-
import "./getUtxosFromReceipt.utils.mjs";
|
|
11
|
-
import "./getUtxosFromReceiptSolana.mjs";
|
|
6
|
+
import "./enclave-utxo-storage.mjs";
|
|
12
7
|
import "./buildClaimableDepositPlan.mjs";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
require(`../../data-structures/utxo/Utxo.cjs`)
|
|
1
|
+
require(`../../data-structures/utxo/Utxo.cjs`);const e=require(`./encryptInputForEnclave.cjs`),t=require(`../../API/enclaveUtxoCalls.cjs`);require(`../../error-handling/logger.cjs`);var n=async(n,r,i,a,o)=>{let{keyCiphertext:s,inputCiphertext:c}=await e.makeEnclaveHandshakeAndEncryptInput({shieldedPrivateKey:i,senderAddress:n,claimableSignature:o});await t.storeClaimableKeyEnclaveCall(r,c,s,a)};exports.storeClaimableKeyInEnclave=n;
|
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
export
|
|
4
|
-
senderAddress: string;
|
|
5
|
-
claimableSignature?: string;
|
|
6
|
-
};
|
|
7
|
-
export declare const storeUtxoInEnclave: (senderAddress: string, recipientEthAddress: string, utxo: Utxo, chainId: number, claimableSignature?: string) => Promise<void>;
|
|
1
|
+
import { EnclaveClaimableUtxo, Proof, RecoverUtxosResponse } from '../../API/enclaveUtxoCalls';
|
|
2
|
+
export declare const storeClaimableKeyInEnclave: (senderAddress: string, recipientEthAddress: string, shieldedPrivateKey: string, chainId: number, claimableSignature: string) => Promise<void>;
|
|
3
|
+
export declare const markClaimableKeyClaimedInEnclave: (ethAddress: string, signature: string, shieldedPrivateKey: string, claimableSignature: string, senderAddress: string, chainId: number, isSolanaLedger: boolean, txMessageForSolanaLedger?: string) => Promise<void>;
|
|
8
4
|
export declare const getFundRecoveryMessage: (withdrawalAddress: string) => string;
|
|
9
5
|
export declare const recoverUtxosViaEnclave: (signature: string, requestSignature?: string, addressForLoginSignatureVerify?: string, addressForAuthorizationSignatureVerify?: string, ethereumWithdrawalAddress?: string, solanaWithdrawalAddress?: string, mnemonicProof?: Proof) => Promise<RecoverUtxosResponse>;
|
|
10
|
-
export declare const getUtxosFromEnclave: (ethAddress: string, signature: string, chainId: number, isSolanaLedger: boolean, txMessageForSolanaLedger?: string) => Promise<
|
|
6
|
+
export declare const getUtxosFromEnclave: (ethAddress: string, signature: string, chainId: number, isSolanaLedger: boolean, txMessageForSolanaLedger?: string) => Promise<EnclaveClaimableUtxo[]>;
|
|
@@ -1,4 +1,15 @@
|
|
|
1
1
|
import "../../data-structures/utxo/Utxo.mjs";
|
|
2
|
-
import "./encryptInputForEnclave.mjs";
|
|
3
|
-
import "../../API/enclaveUtxoCalls.mjs";
|
|
2
|
+
import { makeEnclaveHandshakeAndEncryptInput as e } from "./encryptInputForEnclave.mjs";
|
|
3
|
+
import { storeClaimableKeyEnclaveCall as t } from "../../API/enclaveUtxoCalls.mjs";
|
|
4
4
|
import "../../error-handling/logger.mjs";
|
|
5
|
+
//#region libs/shared/common/src/functions/utils/enclave-utxo-storage.ts
|
|
6
|
+
var n = async (n, r, i, a, o) => {
|
|
7
|
+
let { keyCiphertext: s, inputCiphertext: c } = await e({
|
|
8
|
+
shieldedPrivateKey: i,
|
|
9
|
+
senderAddress: n,
|
|
10
|
+
claimableSignature: o
|
|
11
|
+
});
|
|
12
|
+
await t(r, c, s, a);
|
|
13
|
+
};
|
|
14
|
+
//#endregion
|
|
15
|
+
export { n as storeClaimableKeyInEnclave };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require(`../../constants/chains.constants.cjs`),t=require(`../../constants/protocol.constants.cjs`),n=require(`../../constants/fees.constants.cjs`),r=require(`./caseInsensitive.utils.cjs`),i=require(`../web3/etherFunctions.cjs`),a=require(`../../API/getTokenPrice.cjs`),o=require(`../../error-handling/logger.cjs`),s=require(`./erc20tokenFunctions.cjs`);var c=async r=>{if(!r)return n.EXTENDED_NON_NATIVE_GAS_COST_TOKEN_SYMBOL_OPTIONS;let i=t.zeroAddress;e.isSolanaLike(r)&&(i=t.solanaNativeAddress),e.isTempo(r)&&(i=n.TEMPO_DEFAULT_GAS_TOKEN_ADDRESS);let a=(await s.getErc20TokenFromAPI(r,i))?.symbol;return e.isSolanaLike(r)&&a?[a]:a&&!n.NON_NATIVE_GAS_COST_TOKEN_SYMBOL_OPTIONS(r).includes(a)?[a,...n.NON_NATIVE_GAS_COST_TOKEN_SYMBOL_OPTIONS(r)]:n.NON_NATIVE_GAS_COST_TOKEN_SYMBOL_OPTIONS(r)},l=(e,t)=>{let r=e*t.variableRate/n.BPS_DENOMINATOR;return t.flatFee+r},u=async(e,t,c,u)=>{let d=await s.getErc20TokenFromAPI(e,u.feeToken),f;if(!d||r.caseInsensitiveEqual(u.feeToken,t.erc20TokenAddress)||u.variableRate===0n)f=l(c,u);else{let r=0n;try{let{prices:o}=await a.getTokenPrices(e,[t.erc20TokenAddress,d.erc20TokenAddress]),[s,l]=o;if(!s||!l)throw Error(`failed to get token prices`);r=i.getAmountInWei(d,(Number(i.getAmountInToken(t,c))*s*Number(u.variableRate)/Number(n.BPS_DENOMINATOR)/l).toFixed(d.decimals))}catch(e){o.Logger.error(`calculateModifiedFeeStructure: failed to price cross-token variable fee, charging gas fee only`,e)}f=u.flatFee+r}return{feeToken:u.feeToken,flatFee:f,variableRate:0n}},d=(e,t)=>{
|
|
1
|
+
const e=require(`../../constants/chains.constants.cjs`),t=require(`../../constants/protocol.constants.cjs`),n=require(`../../constants/fees.constants.cjs`),r=require(`./caseInsensitive.utils.cjs`),i=require(`../web3/etherFunctions.cjs`),a=require(`../../API/getTokenPrice.cjs`),o=require(`../../error-handling/logger.cjs`),s=require(`./erc20tokenFunctions.cjs`);var c=async r=>{if(!r)return n.EXTENDED_NON_NATIVE_GAS_COST_TOKEN_SYMBOL_OPTIONS;let i=t.zeroAddress;e.isSolanaLike(r)&&(i=t.solanaNativeAddress),e.isTempo(r)&&(i=n.TEMPO_DEFAULT_GAS_TOKEN_ADDRESS);let a=(await s.getErc20TokenFromAPI(r,i))?.symbol;return e.isSolanaLike(r)&&a?[a]:a&&!n.NON_NATIVE_GAS_COST_TOKEN_SYMBOL_OPTIONS(r).includes(a)?[a,...n.NON_NATIVE_GAS_COST_TOKEN_SYMBOL_OPTIONS(r)]:n.NON_NATIVE_GAS_COST_TOKEN_SYMBOL_OPTIONS(r)},l=(e,t)=>{let r=e*t.variableRate/n.BPS_DENOMINATOR;return t.flatFee+r},u=async(e,t,c,u)=>{let d=await s.getErc20TokenFromAPI(e,u.feeToken),f;if(!d||r.caseInsensitiveEqual(u.feeToken,t.erc20TokenAddress)||u.variableRate===0n)f=l(c,u);else{let r=0n;try{let{prices:o}=await a.getTokenPrices(e,[t.erc20TokenAddress,d.erc20TokenAddress]),[s,l]=o;if(!s||!l)throw Error(`failed to get token prices`);r=i.getAmountInWei(d,(Number(i.getAmountInToken(t,c))*s*Number(u.variableRate)/Number(n.BPS_DENOMINATOR)/l).toFixed(d.decimals))}catch(e){o.Logger.error(`calculateModifiedFeeStructure: failed to price cross-token variable fee, charging gas fee only`,e)}f=u.flatFee+r}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,t)=>e<=0n||t<=0n?0n:f(e*t,n.BPS_DENOMINATOR);exports.calculateModifiedFeeStructure=u,exports.calculateModifiedFeeStructureForTokens=d,exports.calculateTotalFee=l,exports.calculateVariableFee=p,exports.getGasTokenSymbols=c;
|
|
@@ -3,5 +3,7 @@ import { ERC20Token } from '../../types/token.types';
|
|
|
3
3
|
export declare const getGasTokenSymbols: (chainId: number | undefined) => Promise<string[]>;
|
|
4
4
|
export declare const calculateTotalFee: (amount: bigint, feeStructure: FeeStructure) => bigint;
|
|
5
5
|
export declare const calculateModifiedFeeStructure: (chainId: number, amountToken: ERC20Token, amount: bigint, feeStructure: FeeStructure) => Promise<FeeStructure>;
|
|
6
|
+
export declare const calculateModifiedFeeStructureForTokens: (chainId: number, amountTokens: ERC20Token[], amounts: bigint[], feeStructure: FeeStructure) => Promise<FeeStructure>;
|
|
7
|
+
export declare const calculateVariableFee: (amount: bigint, variableRate: bigint) => bigint;
|
|
6
8
|
export declare const calculateWithdrawalAmount: (amountWithFee: bigint, feeStructure: FeeStructure) => bigint;
|
|
7
9
|
export declare const calculateGrossAmountWithFee: (netAmount: bigint, feeStructure: FeeStructure) => bigint;
|
|
@@ -35,10 +35,19 @@ var m = async (i) => {
|
|
|
35
35
|
flatFee: o,
|
|
36
36
|
variableRate: 0n
|
|
37
37
|
};
|
|
38
|
-
}, _ = (e, t) => {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
};
|
|
38
|
+
}, _ = async (e, t, n, r) => {
|
|
39
|
+
let i = {
|
|
40
|
+
...r,
|
|
41
|
+
flatFee: 0n
|
|
42
|
+
}, a = await Promise.all(t.map((t, r) => g(e, t, n[r] ?? 0n, i)));
|
|
43
|
+
return {
|
|
44
|
+
feeToken: r.feeToken,
|
|
45
|
+
flatFee: a.reduce((e, { flatFee: t }) => e + t, r.flatFee),
|
|
46
|
+
variableRate: 0n
|
|
47
|
+
};
|
|
48
|
+
}, v = (e, t) => {
|
|
49
|
+
let n = e / t;
|
|
50
|
+
return e % t === 0n ? n : n + 1n;
|
|
51
|
+
}, y = (e, t) => e <= 0n || t <= 0n ? 0n : v(e * t, i);
|
|
43
52
|
//#endregion
|
|
44
|
-
export {
|
|
53
|
+
export { g as calculateModifiedFeeStructure, _ as calculateModifiedFeeStructureForTokens, h as calculateTotalFee, y as calculateVariableFee, m as getGasTokenSymbols };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
require(
|
|
1
|
+
require(`../../constants/chains.constants.cjs`),require(`../../data-structures/crypto-keys/keys.cjs`),require(`../../types/index.cjs`),require(`../../data-structures/crypto-keys/encryptDecryptUtxo.cjs`),require(`../web3/getContractMetadata.cjs`),require(`../../data-structures/crypto-keys/decodeUTXO.cjs`),require(`ethers`);
|
|
@@ -2,5 +2,5 @@ import { ethers } from 'ethers';
|
|
|
2
2
|
import { Utxo } from '../../data-structures/utxo/Utxo';
|
|
3
3
|
import { IHinkal } from '../../data-structures/Hinkal/IHinkal';
|
|
4
4
|
export declare const getOnChainUtxosFromReceipt: (receipt: ethers.TransactionReceipt, hinkal: IHinkal, chainId: number, tokenAddress: string) => Utxo[];
|
|
5
|
-
export declare const getUtxosFromReceipt: (receipt: ethers.TransactionReceipt,
|
|
5
|
+
export declare const getUtxosFromReceipt: (receipt: ethers.TransactionReceipt, chainId: number, tokenAddress: string, shieldedPrivateKey: string) => Utxo[];
|
|
6
6
|
export declare const getOutputCommitmentsFromEvmReceipt: (chainId: number, receipt: ethers.TransactionReceipt) => string[];
|
|
@@ -1,53 +1,7 @@
|
|
|
1
1
|
import "../../constants/chains.constants.mjs";
|
|
2
|
-
import
|
|
3
|
-
import { toBigInt as t } from "./amounts.utils.mjs";
|
|
4
|
-
import { UserKeys as n } from "../../data-structures/crypto-keys/keys.mjs";
|
|
5
|
-
import { ContractType as r } from "../../types/ethereum-network.types.mjs";
|
|
2
|
+
import "../../data-structures/crypto-keys/keys.mjs";
|
|
6
3
|
import "../../types/index.mjs";
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
//#region libs/shared/common/src/functions/utils/getUtxosFromReceipt.utils.ts
|
|
12
|
-
var c = (n, i, s, c) => {
|
|
13
|
-
let l = i.getContractWithFetcher(s, r.HinkalContract), u = l.interface, d = i.userKeys.getShieldedPrivateKey(), f = a(l);
|
|
14
|
-
return n.logs.filter((t) => e(t.address, f)).map((n) => {
|
|
15
|
-
try {
|
|
16
|
-
let r = u.parseLog(n);
|
|
17
|
-
if (r?.name === "NewCommitment") {
|
|
18
|
-
let { encryptedOutput: n, index: i } = r.args;
|
|
19
|
-
if (t(i) < 0n) {
|
|
20
|
-
let t = o(n, d, s);
|
|
21
|
-
if (e(t.erc20TokenAddress, c)) return t;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
} catch {
|
|
25
|
-
return null;
|
|
26
|
-
}
|
|
27
|
-
return null;
|
|
28
|
-
}).filter((e) => e !== null);
|
|
29
|
-
}, l = (o, c, l, u, d) => {
|
|
30
|
-
let f = c.getContractWithFetcher(l, r.HinkalContract), p = f.interface;
|
|
31
|
-
return o.logs.filter((t) => e(t.address, a(f))).map((r) => {
|
|
32
|
-
try {
|
|
33
|
-
let a = p.parseLog(r);
|
|
34
|
-
if (a?.name === "NewCommitment") {
|
|
35
|
-
let { encryptedOutput: r, index: o } = a.args;
|
|
36
|
-
if (t(o) >= 0n) {
|
|
37
|
-
let t = new n(void 0, d);
|
|
38
|
-
try {
|
|
39
|
-
let n = i(s.getBytes(r), t);
|
|
40
|
-
if (e(n.erc20TokenAddress, u)) return n;
|
|
41
|
-
} catch {
|
|
42
|
-
return null;
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
return null;
|
|
47
|
-
} catch {
|
|
48
|
-
return null;
|
|
49
|
-
}
|
|
50
|
-
}).filter((e) => e !== null);
|
|
51
|
-
};
|
|
52
|
-
//#endregion
|
|
53
|
-
export { c as getOnChainUtxosFromReceipt, l as getUtxosFromReceipt };
|
|
4
|
+
import "../../data-structures/crypto-keys/encryptDecryptUtxo.mjs";
|
|
5
|
+
import "../web3/getContractMetadata.mjs";
|
|
6
|
+
import "../../data-structures/crypto-keys/decodeUTXO.mjs";
|
|
7
|
+
import "ethers";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
require(
|
|
1
|
+
require(`../../constants/chains.constants.cjs`),require(`../../crypto/poseidon.cjs`),require(`../../data-structures/utxo/Utxo.cjs`),require(`../../data-structures/crypto-keys/encryptDecryptUtxo.cjs`),require(`./bytes32.utils.cjs`),require(`../../data-structures/crypto-keys/decodeUTXO.cjs`),require(`ethers`),require(`@solana/web3.js`),require(`@coral-xyz/anchor`);
|
|
@@ -1,25 +1,9 @@
|
|
|
1
1
|
import "../../constants/chains.constants.mjs";
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import { Utxo as n } from "../../data-structures/utxo/Utxo.mjs";
|
|
2
|
+
import "../../crypto/poseidon.mjs";
|
|
3
|
+
import "../../data-structures/utxo/Utxo.mjs";
|
|
5
4
|
import "../../data-structures/crypto-keys/encryptDecryptUtxo.mjs";
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
//#region libs/shared/common/src/functions/utils/getUtxosFromReceiptSolana.ts
|
|
12
|
-
var l = (l, u, d, f) => [...new c(u.programId, new s(u.idl)).parseLogs(l.meta?.logMessages ?? [])].filter(({ name: t }) => e(t, "newCommitment")).filter(({ data: e }) => i(e.onChainData)).map((e) => {
|
|
13
|
-
let { onChainData: i } = e.data, [s, c, l, u, f, , , p, m] = i.map(r), [, h, g] = i, _ = new o([...h.slice(16), ...g.slice(16)]), v = t(c, l), y = new n({
|
|
14
|
-
amount: s,
|
|
15
|
-
timeStamp: m.toString(),
|
|
16
|
-
nullifyingKey: d.getShieldedPrivateKey(),
|
|
17
|
-
mintAddress: _.toBase58(),
|
|
18
|
-
erc20TokenAddress: v,
|
|
19
|
-
stealthAddress: a.toBeHex(p),
|
|
20
|
-
H0: [u, f]
|
|
21
|
-
});
|
|
22
|
-
return y.getStealthAddress(), y;
|
|
23
|
-
}).filter((t) => e(t.erc20TokenAddress, f));
|
|
24
|
-
//#endregion
|
|
25
|
-
export { l as getOnChainUtxosFromReceiptSolana };
|
|
5
|
+
import "./bytes32.utils.mjs";
|
|
6
|
+
import "../../data-structures/crypto-keys/decodeUTXO.mjs";
|
|
7
|
+
import "ethers";
|
|
8
|
+
import "@solana/web3.js";
|
|
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(`./enclaveHandshakeService.cjs`),require(`./encryptInputForEnclave.cjs`),require(`./solanaMint.utils.cjs`),require(`./serialize-utxos.utils.cjs`),require(`./customEnclaveFunctionsRegister.cjs`),require(`./addresses.cjs`),require(`./tron.utils.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(`./create-provider.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(`../pre-transaction/getExternalSwapAddress.cjs`),require(`../pre-transaction/
|
|
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(`./addresses.cjs`),require(`./tron.utils.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(`./create-provider.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(`../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(`./reloadPage.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(`./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(`./fees.utils.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(`./dispatchBalanceRefreshes.cjs`),require(`./lifi.utils.cjs`),require(`./enclave-recipient-info-storage.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 './encodeTokenWithId';
|
|
19
20
|
export * from './time.utils';
|
|
20
21
|
export * from './cacheDevice.utils';
|
|
21
22
|
export * from './process.utils';
|
|
@@ -39,6 +40,7 @@ export * from './inLogicMetadata';
|
|
|
39
40
|
export * from './networks.utils';
|
|
40
41
|
export * from './is-valid-url';
|
|
41
42
|
export * from './postToOffscreen';
|
|
43
|
+
export * from './solana-program.utils';
|
|
42
44
|
export * from './solanaMint.utils';
|
|
43
45
|
export * from './solanaSendPreflight.utils';
|
|
44
46
|
export * from './prepareHinkal';
|
|
@@ -46,6 +48,7 @@ export * from './bytes32.utils';
|
|
|
46
48
|
export * from './getUtxosFromReceipt.utils';
|
|
47
49
|
export * from './getUtxosFromReceiptSolana';
|
|
48
50
|
export * from './fees.utils';
|
|
51
|
+
export * from './recovery-balance.utils';
|
|
49
52
|
export * from './proxyAvatar.utils';
|
|
50
53
|
export * from './validateUsername';
|
|
51
54
|
export * from './enclave-utxo-storage';
|
|
@@ -61,8 +64,10 @@ export * from './tronSimulation.utils';
|
|
|
61
64
|
export * from './getSignerFromContract';
|
|
62
65
|
export * from './getContractAddress';
|
|
63
66
|
export * from './transfer-claimable.utils';
|
|
67
|
+
export * from './bridge-arrival.utils';
|
|
64
68
|
export * from './bridge-claimable.utils';
|
|
65
69
|
export * from './bridge-flow.utils';
|
|
70
|
+
export * from './solana-sponsored.utils';
|
|
66
71
|
export * from './temp-wallet.utils';
|
|
67
72
|
export * from './auth.utils';
|
|
68
73
|
export * from './getWalletGroupKey.utils';
|
|
@@ -80,3 +85,4 @@ export * from './voidWallets.utils';
|
|
|
80
85
|
export * from './enclaveSessionSigning';
|
|
81
86
|
export * from './validateWalletAddress';
|
|
82
87
|
export * from './waasStamp';
|
|
88
|
+
export * from './sponsored-shield.utils';
|