@gurge/sdk 0.3.150 → 0.3.151
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 +43 -29
- package/common/src/API/API.cjs +1 -1
- package/common/src/API/API.d.ts +21 -46
- package/common/src/API/API.mjs +96 -121
- 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.cjs +1 -1
- package/common/src/API/callLifiAPI.d.ts +4 -0
- package/common/src/API/callLifiAPI.mjs +7 -2
- 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 +36 -1
- package/common/src/API/callRelayer.mjs +7 -1
- package/common/src/API/dashboardAccountMemberCalls.cjs +1 -1
- package/common/src/API/dashboardAccountMemberCalls.d.ts +15 -0
- package/common/src/API/dashboardAccountMemberCalls.mjs +5 -2
- package/common/src/API/dashboardPayoutCalls.cjs +1 -1
- package/common/src/API/dashboardPayoutCalls.d.ts +2 -1
- package/common/src/API/dashboardPayoutCalls.mjs +4 -1
- package/common/src/API/dashboardTransactionCalls.cjs +1 -1
- package/common/src/API/dashboardTransactionCalls.d.ts +4 -1
- package/common/src/API/dashboardTransactionCalls.mjs +2 -2
- package/common/src/API/enclaveRecipientInfoCalls.d.ts +0 -2
- package/common/src/API/enclaveSignatureCalls.cjs +1 -1
- package/common/src/API/enclaveSignatureCalls.d.ts +2 -1
- package/common/src/API/enclaveSignatureCalls.mjs +5 -8
- package/common/src/API/enclaveUtxoCalls.cjs +1 -1
- package/common/src/API/enclaveUtxoCalls.d.ts +40 -27
- package/common/src/API/enclaveUtxoCalls.mjs +16 -17
- 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.d.ts +8 -0
- package/common/src/API/getOdosPriceForToken.cjs +1 -0
- package/common/src/API/getOdosPriceForToken.d.ts +1 -0
- package/common/src/API/getOdosPriceForToken.mjs +14 -0
- package/common/src/API/getWebsiteURL.d.ts +1 -3
- package/common/src/API/index.cjs +1 -1
- package/common/src/API/index.d.ts +2 -3
- package/common/src/API/index.mjs +4 -5
- package/common/src/API/payoutNotificationStateCalls.cjs +1 -0
- package/common/src/API/payoutNotificationStateCalls.d.ts +10 -0
- package/common/src/API/payoutNotificationStateCalls.mjs +10 -0
- package/common/src/API/privateSendRecipientInfoCalls.cjs +1 -1
- package/common/src/API/privateSendRecipientInfoCalls.d.ts +3 -6
- package/common/src/API/privateSendRecipientInfoCalls.mjs +12 -6
- package/common/src/API/proxyAccountsCalls.cjs +1 -1
- package/common/src/API/proxyAccountsCalls.d.ts +2 -3
- package/common/src/API/proxyAccountsCalls.mjs +11 -10
- package/common/src/API/rewardsUserCalls.cjs +1 -1
- package/common/src/API/rewardsUserCalls.d.ts +1 -40
- package/common/src/API/rewardsUserCalls.mjs +2 -10
- 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/scheduled-transactions-calls.cjs +1 -1
- package/common/src/API/scheduled-transactions-calls.d.ts +2 -5
- package/common/src/API/scheduled-transactions-calls.mjs +2 -6
- package/common/src/API/solana-nft-assets.d.ts +1 -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 +3 -5
- package/common/src/API/temporaryWalletCalls.mjs +8 -9
- package/common/src/API/tenderly.api.cjs +1 -1
- package/common/src/API/tenderly.api.d.ts +5 -10
- package/common/src/API/tenderly.api.mjs +1 -1
- package/common/src/API/weeklyAnalyticCalls.cjs +1 -1
- package/common/src/API/weeklyAnalyticCalls.d.ts +1 -11
- package/common/src/API/weeklyAnalyticCalls.mjs +2 -5
- package/common/src/constants/addresses.constants.cjs +1 -1
- package/common/src/constants/addresses.constants.d.ts +4 -46
- package/common/src/constants/addresses.constants.mjs +19 -60
- package/common/src/constants/balance.constants.cjs +1 -0
- package/common/src/constants/balance.constants.d.ts +3 -0
- package/common/src/constants/balance.constants.mjs +4 -0
- package/common/src/constants/bridging.constants.cjs +1 -1
- package/common/src/constants/bridging.constants.d.ts +10 -0
- package/common/src/constants/bridging.constants.mjs +2 -1
- package/common/src/constants/chains.constants.cjs +1 -1
- package/common/src/constants/chains.constants.d.ts +21 -19
- package/common/src/constants/chains.constants.mjs +175 -198
- package/common/src/constants/coingecko.constants.cjs +1 -1
- package/common/src/constants/coingecko.constants.d.ts +3 -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 -109
- package/common/src/constants/contracts.constants.mjs +16 -34
- package/common/src/constants/deploy-data/deploy-data-arbMainnet.json.cjs +1 -1
- package/common/src/constants/deploy-data/deploy-data-arbMainnet.json.mjs +8 -9
- package/common/src/constants/deploy-data/deploy-data-arcTestnet.json.cjs +1 -1
- package/common/src/constants/deploy-data/deploy-data-arcTestnet.json.mjs +7 -6
- package/common/src/constants/deploy-data/deploy-data-base.json.cjs +1 -1
- package/common/src/constants/deploy-data/deploy-data-base.json.mjs +8 -9
- package/common/src/constants/deploy-data/deploy-data-bnbMainnet.json.cjs +1 -0
- package/common/src/constants/deploy-data/deploy-data-bnbMainnet.json.mjs +12 -0
- package/common/src/constants/deploy-data/deploy-data-ethMainnet.json.cjs +1 -1
- package/common/src/constants/deploy-data/deploy-data-ethMainnet.json.mjs +8 -9
- package/common/src/constants/deploy-data/deploy-data-localhost.json.cjs +1 -1
- package/common/src/constants/deploy-data/deploy-data-localhost.json.mjs +0 -3
- package/common/src/constants/deploy-data/deploy-data-optimism.json.cjs +1 -1
- package/common/src/constants/deploy-data/deploy-data-optimism.json.mjs +8 -9
- package/common/src/constants/deploy-data/deploy-data-optimismTest.json.cjs +1 -1
- package/common/src/constants/deploy-data/deploy-data-optimismTest.json.mjs +5 -9
- package/common/src/constants/deploy-data/deploy-data-polygon.json.cjs +1 -1
- package/common/src/constants/deploy-data/deploy-data-polygon.json.mjs +8 -9
- package/common/src/constants/deploy-data/deploy-data-sepoliaTestnet.json.cjs +1 -1
- package/common/src/constants/deploy-data/deploy-data-sepoliaTestnet.json.mjs +0 -1
- package/common/src/constants/deploy-data/deploy-data-solana.json.cjs +1 -1
- package/common/src/constants/deploy-data/deploy-data-solana.json.mjs +2 -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 +7 -7
- 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 -4
- 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 -4
- 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 +16 -15
- 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 +36 -45
- 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 +2 -46
- package/common/src/constants/enclaveAuth.constants.d.ts +5 -0
- package/common/src/constants/events.constants.cjs +1 -1
- package/common/src/constants/events.constants.mjs +1 -15
- package/common/src/constants/fees.constants.cjs +1 -1
- package/common/src/constants/fees.constants.mjs +2 -2
- package/common/src/constants/index.cjs +1 -1
- package/common/src/constants/index.d.ts +1 -3
- package/common/src/constants/index.mjs +1 -1
- package/common/src/constants/lifi.constants.cjs +1 -1
- package/common/src/constants/lifi.constants.mjs +6 -3
- package/common/src/constants/mediaUrls.constants.d.ts +0 -1
- package/common/src/constants/okx.constants.d.ts +1 -0
- package/common/src/constants/pay.constants.d.ts +1 -0
- package/common/src/constants/protocol.constants.cjs +2 -1
- package/common/src/constants/protocol.constants.d.ts +22 -12
- package/common/src/constants/protocol.constants.mjs +3 -15
- package/common/src/constants/server.constants.cjs +1 -1
- package/common/src/constants/server.constants.d.ts +14 -36
- package/common/src/constants/server.constants.mjs +19 -49
- package/common/src/constants/tokens.constants.cjs +1 -1
- package/common/src/constants/tokens.constants.d.ts +1 -0
- package/common/src/constants/tokens.constants.mjs +4 -1
- package/common/src/constants/tx-confirmation.constants.cjs +1 -1
- package/common/src/constants/tx-confirmation.constants.d.ts +1 -0
- package/common/src/constants/tx-confirmation.constants.mjs +2 -2
- package/common/src/crypto/ecdh-sealed-keys.cjs +1 -1
- package/common/src/crypto/ecdh-sealed-keys.mjs +17 -2
- package/common/src/crypto/index.cjs +1 -1
- package/common/src/crypto/index.d.ts +0 -1
- package/common/src/crypto/index.mjs +1 -2
- 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 +18 -23
- package/common/src/data-structures/Hinkal/Hinkal.mjs +142 -174
- package/common/src/data-structures/Hinkal/IHinkal.d.ts +18 -24
- package/common/src/data-structures/Hinkal/handleAutoDepositBack.cjs +1 -1
- package/common/src/data-structures/Hinkal/handleAutoDepositBack.d.ts +1 -1
- package/common/src/data-structures/Hinkal/handleAutoDepositBack.mjs +36 -35
- package/common/src/data-structures/Hinkal/hinkalActionReceive.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalActionReceive.mjs +13 -11
- package/common/src/data-structures/Hinkal/hinkalBridgePrivateToPrivate.cjs +1 -0
- package/common/src/data-structures/Hinkal/hinkalBridgePrivateToPrivate.d.ts +6 -0
- package/common/src/data-structures/Hinkal/hinkalBridgePrivateToPrivate.mjs +100 -0
- 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 +40 -50
- package/common/src/data-structures/Hinkal/hinkalDeposit.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalDeposit.d.ts +1 -0
- package/common/src/data-structures/Hinkal/hinkalDeposit.mjs +50 -119
- package/common/src/data-structures/Hinkal/hinkalDepositAndBridge.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalDepositAndBridge.d.ts +2 -2
- package/common/src/data-structures/Hinkal/hinkalDepositAndBridge.mjs +113 -109
- package/common/src/data-structures/Hinkal/hinkalDepositAndWithdraw.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalDepositAndWithdraw.d.ts +3 -2
- package/common/src/data-structures/Hinkal/hinkalDepositAndWithdraw.mjs +98 -64
- 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 +50 -48
- package/common/src/data-structures/Hinkal/hinkalNearDepositAndBridge.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalNearDepositAndBridge.mjs +8 -3
- package/common/src/data-structures/Hinkal/hinkalPalEvmDeposit.d.ts +1 -1
- package/common/src/data-structures/Hinkal/hinkalPalTronDepositPrepare.d.ts +2 -2
- package/common/src/data-structures/Hinkal/hinkalPrivateWallet.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalPrivateWallet.mjs +50 -38
- package/common/src/data-structures/Hinkal/hinkalProoflessDeposit.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalProoflessDeposit.d.ts +2 -3
- package/common/src/data-structures/Hinkal/hinkalProoflessDeposit.mjs +52 -117
- package/common/src/data-structures/Hinkal/hinkalProoflessDeposit.utils.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalProoflessDeposit.utils.d.ts +3 -0
- package/common/src/data-structures/Hinkal/hinkalProoflessDeposit.utils.mjs +26 -32
- package/common/src/data-structures/Hinkal/hinkalProxySend.cjs +1 -0
- package/common/src/data-structures/Hinkal/hinkalProxySend.d.ts +6 -0
- package/common/src/data-structures/Hinkal/hinkalProxySend.mjs +16 -0
- package/common/src/data-structures/Hinkal/hinkalProxySwap.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalProxySwap.d.ts +1 -1
- package/common/src/data-structures/Hinkal/hinkalProxySwap.mjs +13 -12
- package/common/src/data-structures/Hinkal/hinkalProxyToPrivate.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalProxyToPrivate.mjs +19 -17
- 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 +50 -79
- 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 +47 -51
- package/common/src/data-structures/Hinkal/hinkalSolanaDepositAndWithdraw.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalSolanaDepositAndWithdraw.d.ts +8 -4
- package/common/src/data-structures/Hinkal/hinkalSolanaDepositAndWithdraw.mjs +115 -133
- package/common/src/data-structures/Hinkal/hinkalSolanaProoflessDeposit.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalSolanaProoflessDeposit.d.ts +1 -1
- package/common/src/data-structures/Hinkal/hinkalSolanaProoflessDeposit.mjs +16 -12
- 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 +82 -56
- 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 +11 -13
- 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 +32 -0
- package/common/src/data-structures/Hinkal/hinkalSolanaSwap.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalSolanaSwap.mjs +58 -79
- package/common/src/data-structures/Hinkal/hinkalSolanaTransact.cjs +1 -0
- package/common/src/data-structures/Hinkal/hinkalSolanaTransact.d.ts +3 -0
- package/common/src/data-structures/Hinkal/hinkalSolanaTransact.mjs +119 -0
- package/common/src/data-structures/Hinkal/hinkalSolanaTransfer.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalSolanaTransfer.d.ts +2 -30
- package/common/src/data-structures/Hinkal/hinkalSolanaTransfer.mjs +46 -77
- 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 +46 -57
- 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 +32 -32
- package/common/src/data-structures/Hinkal/hinkalTransact.cjs +1 -0
- package/common/src/data-structures/Hinkal/hinkalTransact.d.ts +3 -0
- package/common/src/data-structures/Hinkal/hinkalTransact.mjs +106 -0
- package/common/src/data-structures/Hinkal/hinkalTransfer.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalTransfer.mjs +39 -44
- 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 +38 -49
- package/common/src/data-structures/Hinkal/hinkalWithdrawStuckUtxos.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalWithdrawStuckUtxos.mjs +160 -102
- package/common/src/data-structures/Hinkal/index.d.ts +2 -1
- package/common/src/data-structures/Hinkal/prepareTronDepositToSelf.d.ts +27 -0
- package/common/src/data-structures/Hinkal/resetMerkleTrees.cjs +1 -1
- package/common/src/data-structures/Hinkal/resetMerkleTrees.mjs +7 -6
- package/common/src/data-structures/IndexedDB/activity-db.cjs +1 -1
- package/common/src/data-structures/IndexedDB/activity-db.mjs +34 -34
- package/common/src/data-structures/IndexedDB/contact-db.cjs +1 -1
- package/common/src/data-structures/IndexedDB/contact-db.d.ts +0 -1
- package/common/src/data-structures/IndexedDB/contact-db.mjs +14 -28
- package/common/src/data-structures/IndexedDB/index.cjs +1 -1
- package/common/src/data-structures/IndexedDB/index.d.ts +1 -0
- package/common/src/data-structures/IndexedDB/index.mjs +1 -0
- package/common/src/data-structures/IndexedDB/key-val-store.cjs +1 -1
- package/common/src/data-structures/IndexedDB/key-val-store.d.ts +2 -0
- package/common/src/data-structures/IndexedDB/key-val-store.mjs +14 -0
- package/common/src/data-structures/IndexedDB/pay-activity-db.cjs +1 -1
- package/common/src/data-structures/IndexedDB/pay-activity-db.mjs +43 -1
- package/common/src/data-structures/IndexedDB/private-balances-db.cjs +1 -1
- package/common/src/data-structures/IndexedDB/private-balances-db.d.ts +1 -0
- package/common/src/data-structures/IndexedDB/private-balances-db.mjs +3 -0
- package/common/src/data-structures/IndexedDB/scheduled-transactions-db.cjs +1 -0
- package/common/src/data-structures/IndexedDB/scheduled-transactions-db.d.ts +11 -0
- package/common/src/data-structures/IndexedDB/scheduled-transactions-db.mjs +34 -0
- package/common/src/data-structures/IndexedDB/signatures-db.cjs +1 -1
- package/common/src/data-structures/IndexedDB/signatures-db.mjs +11 -11
- package/common/src/data-structures/MultiThreadedUtxoUtils/MultiThreadedUtxoUtils.cjs +1 -1
- package/common/src/data-structures/MultiThreadedUtxoUtils/MultiThreadedUtxoUtils.d.ts +1 -0
- package/common/src/data-structures/MultiThreadedUtxoUtils/MultiThreadedUtxoUtils.mjs +29 -26
- package/common/src/data-structures/TokenDBs/AlchemyPublicTokensDB.d.ts +0 -1
- package/common/src/data-structures/TokenDBs/PrivateTokensDB.cjs +1 -1
- package/common/src/data-structures/TokenDBs/PrivateTokensDB.mjs +17 -18
- package/common/src/data-structures/TokenDBs/TronPublicTokensDB.d.ts +1 -0
- package/common/src/data-structures/WalletManager/WalletManager.d.ts +1 -0
- package/common/src/data-structures/cacheDevices/BaseCacheDevice.cjs +1 -1
- package/common/src/data-structures/cacheDevices/BaseCacheDevice.d.ts +1 -0
- package/common/src/data-structures/cacheDevices/BaseCacheDevice.mjs +3 -0
- package/common/src/data-structures/cacheDevices/FileCacheDevice.cjs +1 -1
- package/common/src/data-structures/cacheDevices/FileCacheDevice.d.ts +3 -0
- package/common/src/data-structures/cacheDevices/FileCacheDevice.mjs +12 -3
- package/common/src/data-structures/crypto-keys/decodeUTXO.cjs +1 -1
- package/common/src/data-structures/crypto-keys/decodeUTXO.d.ts +9 -9
- package/common/src/data-structures/crypto-keys/decodeUTXO.mjs +11 -71
- package/common/src/data-structures/crypto-keys/encryptDecryptUtxo.cjs +1 -1
- package/common/src/data-structures/crypto-keys/encryptDecryptUtxo.d.ts +2 -3
- package/common/src/data-structures/crypto-keys/encryptDecryptUtxo.mjs +39 -23
- package/common/src/data-structures/crypto-keys/keys.cjs +1 -1
- package/common/src/data-structures/crypto-keys/keys.d.ts +13 -27
- package/common/src/data-structures/crypto-keys/keys.mjs +64 -79
- package/common/src/data-structures/event-service/evm/BlockchainEventEmitter.cjs +1 -1
- package/common/src/data-structures/event-service/evm/BlockchainEventEmitter.d.ts +3 -2
- package/common/src/data-structures/event-service/evm/BlockchainEventEmitter.mjs +46 -38
- package/common/src/data-structures/event-service/evm/ClientBlockchainEventEmitter.cjs +1 -1
- package/common/src/data-structures/event-service/evm/ClientBlockchainEventEmitter.d.ts +1 -1
- package/common/src/data-structures/event-service/evm/ClientBlockchainEventEmitter.mjs +2 -2
- package/common/src/data-structures/event-service/solana/AbstractSolanaCommitmentsSnapshotService.cjs +1 -1
- package/common/src/data-structures/event-service/solana/AbstractSolanaCommitmentsSnapshotService.mjs +27 -23
- package/common/src/data-structures/merkle-tree/MerkleTree.cjs +1 -1
- package/common/src/data-structures/merkle-tree/MerkleTree.d.ts +11 -0
- package/common/src/data-structures/merkle-tree/MerkleTree.mjs +12 -1
- package/common/src/data-structures/private-balances/HinkalPrivateBalanceController.cjs +1 -1
- package/common/src/data-structures/private-balances/HinkalPrivateBalanceController.d.ts +4 -0
- package/common/src/data-structures/private-balances/HinkalPrivateBalanceController.mjs +100 -86
- package/common/src/data-structures/provider-adapter/IProviderAdapter.d.ts +1 -5
- package/common/src/data-structures/token-price-fetcher/TokenChecker.cjs +1 -1
- package/common/src/data-structures/token-price-fetcher/TokenChecker.d.ts +1 -0
- package/common/src/data-structures/token-price-fetcher/TokenChecker.mjs +5 -3
- package/common/src/data-structures/utxo/Utxo.cjs +1 -1
- package/common/src/data-structures/utxo/Utxo.d.ts +1 -4
- package/common/src/data-structures/utxo/Utxo.mjs +7 -17
- package/common/src/error-handling/error-codes.constants.cjs +2 -2
- package/common/src/error-handling/error-codes.constants.d.ts +14 -14
- package/common/src/error-handling/error-codes.constants.mjs +30 -32
- package/common/src/error-handling/get-error.message.cjs +1 -1
- package/common/src/error-handling/get-error.message.mjs +28 -18
- package/common/src/error-handling/index.cjs +1 -1
- package/common/src/error-handling/index.d.ts +1 -0
- package/common/src/error-handling/index.mjs +1 -0
- package/common/src/externalABIs/index.cjs +1 -1
- package/common/src/externalABIs/index.d.ts +1 -113
- package/common/src/externalABIs/index.mjs +2 -6
- package/common/src/functions/auto-deposit-back-helpers/get-gas-token-records.cjs +1 -1
- package/common/src/functions/auto-deposit-back-helpers/get-gas-token-records.mjs +7 -6
- package/common/src/functions/auto-deposit-back-helpers/select-gas-token.cjs +1 -1
- package/common/src/functions/auto-deposit-back-helpers/select-gas-token.mjs +8 -8
- package/common/src/functions/index.cjs +1 -1
- package/common/src/functions/index.d.ts +0 -1
- package/common/src/functions/index.mjs +21 -20
- package/common/src/functions/pre-transaction/buildCommitmentValidationData.cjs +1 -1
- package/common/src/functions/pre-transaction/buildCommitmentValidationData.mjs +36 -38
- package/common/src/functions/pre-transaction/calculateSolanaNullifierCount.cjs +1 -1
- package/common/src/functions/pre-transaction/calculateSolanaNullifierCount.mjs +38 -5
- package/common/src/functions/pre-transaction/ensureAmountChanges.cjs +1 -1
- package/common/src/functions/pre-transaction/ensureAmountChanges.mjs +3 -10
- package/common/src/functions/pre-transaction/getExternalSwapAddress.cjs +1 -1
- package/common/src/functions/pre-transaction/getExternalSwapAddress.mjs +2 -18
- package/common/src/functions/pre-transaction/getSolanaCalldataHash.cjs +1 -1
- package/common/src/functions/pre-transaction/getSolanaCalldataHash.d.ts +1 -1
- package/common/src/functions/pre-transaction/getSolanaCalldataHash.mjs +11 -10
- package/common/src/functions/pre-transaction/getVolatileTransferAmount.cjs +1 -1
- package/common/src/functions/pre-transaction/getVolatileTransferAmount.mjs +1 -1
- package/common/src/functions/pre-transaction/index.cjs +1 -1
- package/common/src/functions/pre-transaction/index.d.ts +2 -2
- package/common/src/functions/pre-transaction/index.mjs +2 -3
- 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/outputUtxoProcessing.cjs +1 -1
- package/common/src/functions/pre-transaction/outputUtxoProcessing.d.ts +2 -1
- package/common/src/functions/pre-transaction/outputUtxoProcessing.mjs +19 -18
- 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/solana-public-signals.d.ts +1 -0
- package/common/src/functions/pre-transaction/solana.cjs +1 -1
- package/common/src/functions/pre-transaction/solana.d.ts +13 -0
- package/common/src/functions/pre-transaction/solana.mjs +46 -21
- 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/pre-transaction/store-proof.cjs +1 -1
- package/common/src/functions/pre-transaction/store-proof.d.ts +1 -1
- package/common/src/functions/pre-transaction/store-proof.mjs +1 -0
- package/common/src/functions/private-wallet/emporium.helpers.cjs +1 -1
- package/common/src/functions/private-wallet/emporium.helpers.d.ts +9 -3
- package/common/src/functions/private-wallet/emporium.helpers.mjs +116 -72
- package/common/src/functions/private-wallet/emporium.swap.helpers.cjs +1 -1
- package/common/src/functions/private-wallet/emporium.swap.helpers.d.ts +0 -1
- package/common/src/functions/private-wallet/emporium.swap.helpers.mjs +38 -80
- package/common/src/functions/private-wallet/index.cjs +1 -1
- package/common/src/functions/private-wallet/index.d.ts +0 -1
- package/common/src/functions/private-wallet/index.mjs +0 -1
- package/common/src/functions/snarkjs/common.snarkjs.cjs +1 -1
- package/common/src/functions/snarkjs/common.snarkjs.d.ts +4 -4
- package/common/src/functions/snarkjs/common.snarkjs.mjs +104 -65
- package/common/src/functions/snarkjs/constant.cjs +1 -1
- package/common/src/functions/snarkjs/constant.d.ts +231 -144
- package/common/src/functions/snarkjs/constant.mjs +231 -145
- 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 +85 -69
- package/common/src/functions/snarkjs/constructSignatureFromMnemonicProofInput.cjs +1 -0
- package/common/src/functions/snarkjs/constructSignatureFromMnemonicProofInput.d.ts +7 -0
- package/common/src/functions/snarkjs/constructSignatureFromMnemonicProofInput.mjs +2 -0
- package/common/src/functions/snarkjs/constructSolanaZkProof.cjs +1 -1
- package/common/src/functions/snarkjs/constructSolanaZkProof.d.ts +4 -1
- package/common/src/functions/snarkjs/constructSolanaZkProof.mjs +62 -61
- package/common/src/functions/snarkjs/constructTxEnclave.cjs +1 -0
- package/common/src/functions/snarkjs/constructTxEnclave.d.ts +34 -0
- package/common/src/functions/snarkjs/constructTxEnclave.mjs +95 -0
- package/common/src/functions/snarkjs/constructTxEnclaveVerify.cjs +1 -0
- package/common/src/functions/snarkjs/constructTxEnclaveVerify.d.ts +5 -0
- package/common/src/functions/snarkjs/constructTxEnclaveVerify.mjs +295 -0
- package/common/src/functions/snarkjs/fetchMerkleTreeSiblings.d.ts +1 -3
- package/common/src/functions/snarkjs/fetchOnChainRootHashes.cjs +1 -1
- package/common/src/functions/snarkjs/fetchOnChainRootHashes.d.ts +1 -0
- package/common/src/functions/snarkjs/fetchOnChainRootHashes.mjs +16 -18
- package/common/src/functions/snarkjs/fetchTronInsertionSiblings.cjs +1 -0
- package/common/src/functions/snarkjs/fetchTronInsertionSiblings.d.ts +7 -0
- package/common/src/functions/snarkjs/fetchTronInsertionSiblings.mjs +13 -0
- package/common/src/functions/snarkjs/generateCircomData.cjs +1 -1
- package/common/src/functions/snarkjs/generateCircomData.d.ts +1 -1
- package/common/src/functions/snarkjs/generateCircomData.mjs +41 -31
- package/common/src/functions/snarkjs/generateMainAndCommitmentZkProof.cjs +1 -1
- package/common/src/functions/snarkjs/generateMainAndCommitmentZkProof.d.ts +1 -1
- package/common/src/functions/snarkjs/generateMainAndCommitmentZkProof.mjs +7 -7
- package/common/src/functions/snarkjs/generateSignatureFromMnemonicProof.cjs +1 -0
- package/common/src/functions/snarkjs/generateSignatureFromMnemonicProof.d.ts +2 -0
- package/common/src/functions/snarkjs/generateSignatureFromMnemonicProof.mjs +3 -0
- package/common/src/functions/snarkjs/generateZkProof.cjs +1 -1
- package/common/src/functions/snarkjs/generateZkProof.d.ts +1 -1
- package/common/src/functions/snarkjs/generateZkProof.mjs +9 -16
- package/common/src/functions/snarkjs/getMerkleTreeSiblingsAndRootHashes.cjs +1 -1
- package/common/src/functions/snarkjs/getMerkleTreeSiblingsAndRootHashes.d.ts +4 -2
- package/common/src/functions/snarkjs/getMerkleTreeSiblingsAndRootHashes.mjs +19 -13
- package/common/src/functions/snarkjs/getZKFiles.cjs +1 -1
- package/common/src/functions/snarkjs/getZKFiles.mjs +9 -3
- package/common/src/functions/snarkjs/index.cjs +1 -1
- package/common/src/functions/snarkjs/index.d.ts +2 -0
- package/common/src/functions/snarkjs/index.mjs +2 -0
- package/common/src/functions/snarkjs/signedMessageHash.cjs +1 -1
- package/common/src/functions/snarkjs/signedMessageHash.d.ts +16 -0
- package/common/src/functions/snarkjs/signedMessageHash.mjs +36 -7
- package/common/src/functions/snarkjs/verifySignedEnclaveResponse.cjs +1 -0
- package/common/src/functions/snarkjs/verifySignedEnclaveResponse.d.ts +1 -0
- package/common/src/functions/snarkjs/verifySignedEnclaveResponse.mjs +11 -0
- package/common/src/functions/utils/addresses.cjs +1 -1
- package/common/src/functions/utils/addresses.d.ts +2 -1
- package/common/src/functions/utils/addresses.mjs +30 -21
- 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 +16 -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.cjs +1 -0
- package/common/src/functions/utils/bridge-claimable.utils.d.ts +15 -0
- package/common/src/functions/utils/bridge-claimable.utils.mjs +3 -0
- package/common/src/functions/utils/bridge-flow.utils.cjs +1 -0
- package/common/src/functions/utils/bridge-flow.utils.d.ts +4 -0
- package/common/src/functions/utils/bridge-flow.utils.mjs +2 -0
- package/common/src/functions/utils/buildClaimableDepositPlan.d.ts +3 -2
- package/common/src/functions/utils/convertEmporiumOpToCallInfo.cjs +1 -1
- package/common/src/functions/utils/convertEmporiumOpToCallInfo.mjs +5 -10
- package/common/src/functions/utils/convertIntegrationProviderToExternalActionId.cjs +1 -1
- package/common/src/functions/utils/convertIntegrationProviderToExternalActionId.mjs +1 -1
- 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 +45 -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 +3 -6
- package/common/src/functions/utils/enclave-recipient-info-storage.cjs +1 -1
- package/common/src/functions/utils/enclave-recipient-info-storage.d.ts +4 -1
- package/common/src/functions/utils/enclave-recipient-info-storage.mjs +1 -0
- package/common/src/functions/utils/enclave-signature-storage.cjs +1 -1
- package/common/src/functions/utils/enclave-signature-storage.d.ts +1 -1
- package/common/src/functions/utils/enclave-signature-storage.mjs +3 -3
- package/common/src/functions/utils/enclave-utxo-storage.cjs +1 -1
- package/common/src/functions/utils/enclave-utxo-storage.d.ts +6 -7
- package/common/src/functions/utils/enclave-utxo-storage.mjs +16 -2
- package/common/src/functions/utils/enclaveSessionSigning.cjs +1 -0
- package/common/src/functions/utils/enclaveSessionSigning.d.ts +16 -0
- package/common/src/functions/utils/enclaveSessionSigning.mjs +2 -0
- package/common/src/functions/utils/encodeTokenWithId.cjs +1 -1
- package/common/src/functions/utils/encodeTokenWithId.d.ts +1 -2
- package/common/src/functions/utils/encodeTokenWithId.mjs +2 -5
- package/common/src/functions/utils/encryptInputForEnclave.cjs +1 -1
- package/common/src/functions/utils/encryptInputForEnclave.d.ts +8 -0
- package/common/src/functions/utils/encryptInputForEnclave.mjs +43 -23
- package/common/src/functions/utils/erc20tokenFunctions.cjs +1 -1
- package/common/src/functions/utils/erc20tokenFunctions.mjs +2 -15
- package/common/src/functions/utils/fees.utils.cjs +1 -1
- package/common/src/functions/utils/fees.utils.d.ts +3 -0
- package/common/src/functions/utils/fees.utils.mjs +42 -29
- package/common/src/functions/utils/formatter.d.ts +2 -0
- package/common/src/functions/utils/getDataFromTransaction.d.ts +4 -3
- package/common/src/functions/utils/getRecipientInfoFromUserKeys.cjs +1 -1
- package/common/src/functions/utils/getRecipientInfoFromUserKeys.mjs +2 -3
- 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 +2 -26
- package/common/src/functions/utils/getUtxosFromReceiptSolana.cjs +1 -1
- package/common/src/functions/utils/getUtxosFromReceiptSolana.mjs +7 -24
- package/common/src/functions/utils/index.cjs +1 -1
- package/common/src/functions/utils/index.d.ts +17 -3
- package/common/src/functions/utils/index.mjs +27 -13
- package/common/src/functions/utils/ipfs.d.ts +2 -3
- package/common/src/functions/utils/legacyKeys.cjs +1 -0
- package/common/src/functions/utils/legacyKeys.d.ts +10 -0
- package/common/src/functions/utils/legacyKeys.mjs +8 -0
- package/common/src/functions/utils/lifi.utils.d.ts +3 -0
- package/common/src/functions/utils/mnemonics.cjs +1 -1
- package/common/src/functions/utils/mnemonics.mjs +4 -6
- 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/networks.utils.d.ts +1 -0
- package/common/src/functions/utils/prepareHinkal.cjs +1 -1
- package/common/src/functions/utils/prepareHinkal.d.ts +1 -3
- package/common/src/functions/utils/prepareHinkal.mjs +2 -1
- package/common/src/functions/utils/process.utils.cjs +1 -1
- package/common/src/functions/utils/process.utils.d.ts +0 -1
- package/common/src/functions/utils/process.utils.mjs +2 -11
- package/common/src/functions/utils/proxyAvatar.utils.cjs +1 -0
- package/common/src/functions/utils/proxyAvatar.utils.mjs +3 -0
- 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 +37 -23
- 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/resolve-domain-address.cjs +1 -0
- package/common/src/functions/utils/resolve-domain-address.d.ts +4 -0
- package/common/src/functions/utils/resolve-domain-address.mjs +3 -0
- package/common/src/functions/utils/serialize-utxos.utils.cjs +1 -1
- package/common/src/functions/utils/serialize-utxos.utils.mjs +6 -4
- 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 -0
- package/common/src/functions/utils/temp-wallet.utils.d.ts +8 -0
- package/common/src/functions/utils/temp-wallet.utils.mjs +43 -0
- package/common/src/functions/utils/temporary-wallet-recovery.utils.cjs +1 -0
- package/common/src/functions/utils/temporary-wallet-recovery.utils.d.ts +7 -0
- package/common/src/functions/utils/temporary-wallet-recovery.utils.mjs +10 -0
- 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 +1 -4
- package/common/src/functions/utils/tron.utils.cjs +1 -1
- package/common/src/functions/utils/tron.utils.d.ts +5 -14
- package/common/src/functions/utils/tron.utils.mjs +89 -152
- 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.d.ts +1 -0
- package/common/src/functions/utils/tx-confirmation.utils.mjs +16 -13
- package/common/src/functions/utils/validateWalletAddress.cjs +1 -0
- package/common/src/functions/utils/validateWalletAddress.d.ts +1 -0
- package/common/src/functions/utils/validateWalletAddress.mjs +2 -0
- package/common/src/functions/utils/voidWallets.utils.cjs +1 -0
- package/common/src/functions/utils/voidWallets.utils.d.ts +4 -0
- package/common/src/functions/utils/voidWallets.utils.mjs +1 -0
- package/common/src/functions/utils/waasStamp.cjs +1 -0
- package/common/src/functions/utils/waasStamp.d.ts +5 -0
- package/common/src/functions/utils/waasStamp.mjs +2 -0
- package/common/src/functions/web3/connectors.utils.d.ts +1 -0
- package/common/src/functions/web3/etherFunctions.d.ts +1 -0
- package/common/src/functions/web3/events/getInputUtxoAndBalance.cjs +1 -1
- package/common/src/functions/web3/events/getInputUtxoAndBalance.d.ts +5 -12
- package/common/src/functions/web3/events/getInputUtxoAndBalance.mjs +50 -61
- package/common/src/functions/web3/events/getInputUtxosEnclave.cjs +1 -1
- package/common/src/functions/web3/events/getInputUtxosEnclave.d.ts +4 -3
- package/common/src/functions/web3/events/getInputUtxosEnclave.mjs +42 -35
- package/common/src/functions/web3/events/getShieldedBalance.cjs +1 -1
- package/common/src/functions/web3/events/getShieldedBalance.d.ts +4 -4
- package/common/src/functions/web3/events/getShieldedBalance.mjs +109 -93
- package/common/src/functions/web3/fetchSolanaMerkleTreeRootHash.cjs +1 -1
- package/common/src/functions/web3/fetchSolanaMerkleTreeRootHash.mjs +9 -6
- package/common/src/functions/web3/functionCalls/approveToken.cjs +1 -1
- package/common/src/functions/web3/functionCalls/approveToken.d.ts +1 -1
- package/common/src/functions/web3/functionCalls/approveToken.mjs +21 -107
- package/common/src/functions/web3/functionCalls/constructBatchCall.cjs +1 -1
- package/common/src/functions/web3/functionCalls/constructBatchCall.d.ts +2 -2
- package/common/src/functions/web3/functionCalls/constructBatchCall.mjs +23 -18
- package/common/src/functions/web3/functionCalls/submitProof.cjs +1 -0
- package/common/src/functions/web3/functionCalls/submitProof.d.ts +5 -0
- package/common/src/functions/web3/functionCalls/submitProof.mjs +26 -0
- package/common/src/functions/web3/functionCalls/transactCallDirectTron.cjs +1 -1
- package/common/src/functions/web3/functionCalls/transactCallDirectTron.d.ts +7 -3
- package/common/src/functions/web3/functionCalls/transactCallDirectTron.mjs +81 -53
- package/common/src/functions/web3/functionCalls/transactCallRelayer.cjs +1 -1
- package/common/src/functions/web3/functionCalls/transactCallRelayer.d.ts +8 -13
- package/common/src/functions/web3/functionCalls/transactCallRelayer.mjs +12 -8
- 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/getTokenHolder.cjs +1 -1
- package/common/src/functions/web3/getTokenHolder.mjs +3 -2
- package/common/src/functions/web3/index.cjs +1 -1
- package/common/src/functions/web3/index.d.ts +1 -4
- package/common/src/functions/web3/index.mjs +1 -4
- package/common/src/functions/web3/lifiAPI.cjs +1 -1
- package/common/src/functions/web3/lifiAPI.mjs +38 -7
- package/common/src/providers/EthersProviderAdapter.cjs +1 -1
- package/common/src/providers/EthersProviderAdapter.d.ts +0 -1
- package/common/src/providers/EthersProviderAdapter.mjs +0 -3
- package/common/src/providers/SolanaProviderAdapter.cjs +1 -1
- package/common/src/providers/SolanaProviderAdapter.d.ts +1 -5
- package/common/src/providers/SolanaProviderAdapter.mjs +4 -11
- package/common/src/providers/TronProviderAdapter.cjs +1 -1
- package/common/src/providers/TronProviderAdapter.d.ts +0 -1
- package/common/src/providers/TronProviderAdapter.mjs +7 -4
- package/common/src/providers/WagmiProviderAdapter.cjs +1 -1
- package/common/src/providers/WagmiProviderAdapter.d.ts +0 -1
- package/common/src/providers/WagmiProviderAdapter.mjs +32 -39
- package/common/src/types/API.types.d.ts +0 -4
- package/common/src/types/WeeklyAnalytics.types.d.ts +1 -26
- package/common/src/types/activities.types.cjs +1 -1
- package/common/src/types/activities.types.d.ts +0 -9
- package/common/src/types/activities.types.mjs +1 -1
- package/common/src/types/admin.types.cjs +1 -1
- package/common/src/types/admin.types.d.ts +4 -1
- package/common/src/types/admin.types.mjs +1 -1
- package/common/src/types/bridging-tx.types.d.ts +26 -3
- package/common/src/types/cache.types.cjs +1 -1
- package/common/src/types/cache.types.d.ts +4 -3
- package/common/src/types/cache.types.mjs +1 -1
- package/common/src/types/circom-data.types.cjs +1 -1
- package/common/src/types/circom-data.types.d.ts +32 -27
- package/common/src/types/circom-data.types.mjs +1 -1
- package/common/src/types/commitments.types.d.ts +2 -0
- package/common/src/types/dashboard-account.d.ts +15 -0
- package/common/src/types/dashboard-payout.types.d.ts +1 -0
- package/common/src/types/dashboard-transaction.types.d.ts +3 -0
- package/common/src/types/enclaveApi.types.d.ts +77 -0
- package/common/src/types/ethereum-network.types.cjs +1 -1
- package/common/src/types/ethereum-network.types.d.ts +13 -29
- package/common/src/types/ethereum-network.types.mjs +1 -1
- package/common/src/types/events.types.d.ts +1 -0
- package/common/src/types/external-action.types.cjs +1 -1
- package/common/src/types/external-action.types.d.ts +4 -7
- package/common/src/types/external-action.types.mjs +1 -1
- package/common/src/types/hinkal.types.cjs +1 -1
- package/common/src/types/hinkal.types.d.ts +12 -29
- package/common/src/types/hinkal.types.mjs +12 -20
- package/common/src/types/index.cjs +1 -1
- package/common/src/types/index.d.ts +6 -5
- package/common/src/types/index.mjs +3 -2
- package/common/src/types/near-intents.types.d.ts +2 -0
- package/common/src/types/new-rewards.type.d.ts +0 -70
- package/common/src/types/offscreen.types.cjs +1 -1
- package/common/src/types/offscreen.types.d.ts +0 -1
- package/common/src/types/offscreen.types.mjs +1 -1
- package/common/src/types/pay-activities.types.d.ts +24 -4
- package/common/src/types/payout-notification.types.d.ts +11 -0
- package/common/src/types/proxy-progress.types.d.ts +5 -0
- package/common/src/types/remote-proof.types.d.ts +5 -6
- package/common/src/types/remote-tx-build.types.d.ts +298 -0
- package/common/src/types/scheduled-transactions.types.d.ts +25 -12
- package/common/src/types/snark.types.d.ts +1 -3
- package/common/src/types/solana-transact.types.cjs +1 -0
- package/common/src/types/solana-transact.types.d.ts +35 -0
- package/common/src/types/solana-transact.types.mjs +6 -0
- package/common/src/types/solana.types.cjs +1 -0
- package/common/src/types/solana.types.d.ts +12 -3
- package/common/src/types/solana.types.mjs +6 -0
- package/common/src/types/temp-wallet.types.d.ts +9 -0
- package/common/src/types/tenderly.api.types.d.ts +70 -0
- package/common/src/types/token.types.cjs +1 -1
- package/common/src/types/token.types.d.ts +10 -0
- package/common/src/types/token.types.mjs +2 -2
- package/common/src/types/transact.types.cjs +1 -0
- package/common/src/types/transact.types.d.ts +53 -0
- package/common/src/types/transact.types.mjs +6 -0
- package/common/src/types/transaction.types.d.ts +0 -1
- package/common/src/types/transactions.types.d.ts +0 -1
- package/common/src/webworker/logError-ScFy7p5w.js +2 -0
- package/common/src/webworker/package.json +26 -25
- 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/utxoWorker.types.d.ts +4 -2
- 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-B_eSl85g.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 +1 -1
- package/internal/swapApi.cjs +1 -1
- package/internal/swapApi.d.ts +3 -3
- package/internal/swapApi.mjs +22 -25
- package/package.json +26 -25
- package/providers/prepareEthersHinkal.cjs +1 -1
- package/providers/prepareEthersHinkal.d.ts +1 -0
- package/providers/prepareEthersHinkal.mjs +2 -2
- package/providers/prepareSolanaHinkal.cjs +1 -1
- package/providers/prepareSolanaHinkal.d.ts +1 -0
- package/providers/prepareSolanaHinkal.mjs +2 -2
- package/providers/prepareTronHinkal.cjs +1 -1
- package/providers/prepareTronHinkal.d.ts +1 -0
- package/providers/prepareTronHinkal.mjs +2 -2
- package/providers/prepareWagmiHinkal.cjs +1 -1
- package/providers/prepareWagmiHinkal.d.ts +1 -0
- package/providers/prepareWagmiHinkal.mjs +2 -2
- package/services/Hinkal.cjs +1 -1
- package/services/Hinkal.d.ts +16 -10
- package/services/Hinkal.mjs +29 -17
- package/types/IHinkal.d.ts +16 -10
- package/types/swap.types.d.ts +3 -20
- package/common/src/API/accessCodeCalls.cjs +0 -1
- package/common/src/API/accessCodeCalls.d.ts +0 -23
- package/common/src/API/accessCodeCalls.mjs +0 -13
- package/common/src/API/brotherhoodCalls.cjs +0 -1
- package/common/src/API/brotherhoodCalls.d.ts +0 -82
- package/common/src/API/brotherhoodCalls.mjs +0 -17
- package/common/src/API/callOdosAPI.cjs +0 -1
- package/common/src/API/callOdosAPI.d.ts +0 -63
- package/common/src/API/callOdosAPI.mjs +0 -18
- package/common/src/API/callOneInchAPI.cjs +0 -1
- package/common/src/API/callOneInchAPI.d.ts +0 -18
- package/common/src/API/callOneInchAPI.mjs +0 -13
- 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/API/generate-trading-points.cjs +0 -1
- package/common/src/API/generate-trading-points.d.ts +0 -27
- package/common/src/API/generate-trading-points.mjs +0 -23
- package/common/src/API/getAnyRecipientInfo.d.ts +0 -1
- package/common/src/API/leaderboardCalls.cjs +0 -1
- package/common/src/API/leaderboardCalls.d.ts +0 -14
- package/common/src/API/leaderboardCalls.mjs +0 -8
- package/common/src/API/referralsCalls.cjs +0 -1
- package/common/src/API/referralsCalls.d.ts +0 -22
- package/common/src/API/referralsCalls.mjs +0 -11
- package/common/src/API/send-telegram-callback.cjs +0 -1
- package/common/src/API/send-telegram-callback.d.ts +0 -7
- package/common/src/API/send-telegram-callback.mjs +0 -11
- package/common/src/constants/mystery-boxes.constants.d.ts +0 -0
- package/common/src/constants/price-impact.constants.d.ts +0 -2
- package/common/src/constants/rewards.constants.d.ts +0 -15
- package/common/src/constants/tasks.constants.cjs +0 -1
- package/common/src/constants/tasks.constants.d.ts +0 -9
- package/common/src/constants/tasks.constants.mjs +0 -124
- package/common/src/crypto/ecdh-dual-path.cjs +0 -1
- package/common/src/crypto/ecdh-dual-path.d.ts +0 -13
- package/common/src/crypto/ecdh-dual-path.mjs +0 -6
- package/common/src/data-structures/Hinkal/hinkalMultiSend.cjs +0 -1
- package/common/src/data-structures/Hinkal/hinkalMultiSend.d.ts +0 -3
- package/common/src/data-structures/Hinkal/hinkalMultiSend.mjs +0 -12
- package/common/src/data-structures/Hinkal/hinkalProoflessDepositViaWrapper.cjs +0 -1
- package/common/src/data-structures/Hinkal/hinkalProoflessDepositViaWrapper.d.ts +0 -6
- package/common/src/data-structures/Hinkal/hinkalProoflessDepositViaWrapper.mjs +0 -128
- package/common/src/data-structures/Hinkal/prepareDepositOnChainUtxosZkProof.cjs +0 -1
- package/common/src/data-structures/Hinkal/prepareDepositOnChainUtxosZkProof.d.ts +0 -22
- package/common/src/data-structures/Hinkal/prepareDepositOnChainUtxosZkProof.mjs +0 -34
- package/common/src/data-structures/TokenDBs/AlchemyPublicTokensDB.cjs +0 -1
- package/common/src/data-structures/TokenDBs/AlchemyPublicTokensDB.mjs +0 -172
- package/common/src/data-structures/TokenDBs/ArcPublicTokensDB.cjs +0 -1
- package/common/src/data-structures/TokenDBs/ArcPublicTokensDB.mjs +0 -94
- package/common/src/data-structures/TokenDBs/EventsPublicTokensDB.cjs +0 -1
- package/common/src/data-structures/TokenDBs/EventsPublicTokensDB.mjs +0 -134
- package/common/src/data-structures/TokenDBs/PublicTokensDB.cjs +0 -1
- package/common/src/data-structures/TokenDBs/PublicTokensDB.mjs +0 -32
- package/common/src/data-structures/TokenDBs/TempoPublicTokensDB.cjs +0 -1
- package/common/src/data-structures/TokenDBs/TempoPublicTokensDB.mjs +0 -41
- package/common/src/data-structures/TokenDBs/TronPublicTokensDB.cjs +0 -1
- package/common/src/data-structures/TokenDBs/TronPublicTokensDB.mjs +0 -47
- package/common/src/data-structures/TokenDBs/index.cjs +0 -1
- package/common/src/data-structures/TokenDBs/index.mjs +0 -6
- package/common/src/externalABIs/IQuoterV2.json.cjs +0 -1
- package/common/src/externalABIs/IQuoterV2.json.mjs +0 -203
- package/common/src/externalABIs/ISwapRouter.json.cjs +0 -1
- package/common/src/externalABIs/ISwapRouter.json.mjs +0 -537
- package/common/src/externalABIs/IUniswapV3Factory.json.cjs +0 -1
- package/common/src/externalABIs/IUniswapV3Factory.json.mjs +0 -188
- package/common/src/externalABIs/IUniswapV3Pool.json.cjs +0 -1
- package/common/src/externalABIs/IUniswapV3Pool.json.mjs +0 -938
- package/common/src/externalABIs/UniswapV2PoolAbi.json.cjs +0 -1
- package/common/src/externalABIs/UniswapV2PoolAbi.json.mjs +0 -78
- package/common/src/functions/pre-transaction/interaction-to-action.cjs +0 -1
- package/common/src/functions/pre-transaction/interaction-to-action.d.ts +0 -2
- package/common/src/functions/pre-transaction/interaction-to-action.mjs +0 -1
- package/common/src/functions/pre-transaction/recipientUtxoProcessing.cjs +0 -1
- package/common/src/functions/pre-transaction/recipientUtxoProcessing.d.ts +0 -3
- package/common/src/functions/pre-transaction/recipientUtxoProcessing.mjs +0 -32
- package/common/src/functions/pre-transaction/waitForDepositedUtxosInMerkleTree.cjs +0 -1
- package/common/src/functions/pre-transaction/waitForDepositedUtxosInMerkleTree.mjs +0 -29
- package/common/src/functions/private-wallet/opProducer.cjs +0 -1
- package/common/src/functions/private-wallet/opProducer.d.ts +0 -5
- package/common/src/functions/private-wallet/opProducer.mjs +0 -3
- package/common/src/functions/snarkjs/generateZkProofEnclave.cjs +0 -1
- package/common/src/functions/snarkjs/generateZkProofEnclave.d.ts +0 -5
- package/common/src/functions/snarkjs/generateZkProofEnclave.mjs +0 -27
- package/common/src/functions/utils/bit.operations.cjs +0 -1
- package/common/src/functions/utils/bit.operations.d.ts +0 -3
- package/common/src/functions/utils/bit.operations.mjs +0 -4
- package/common/src/functions/utils/get-signature-header.cjs +0 -1
- package/common/src/functions/utils/get-signature-header.d.ts +0 -5
- package/common/src/functions/utils/get-signature-header.mjs +0 -4
- package/common/src/functions/utils/ipfs.cjs +0 -1
- package/common/src/functions/utils/ipfs.mjs +0 -1
- package/common/src/functions/utils/reloadPage.cjs +0 -1
- package/common/src/functions/utils/reloadPage.mjs +0 -4
- 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/functions/web3/odosAPI.cjs +0 -1
- package/common/src/functions/web3/odosAPI.d.ts +0 -5
- package/common/src/functions/web3/odosAPI.mjs +0 -35
- package/common/src/functions/web3/oneInchAPI.cjs +0 -1
- package/common/src/functions/web3/oneInchAPI.d.ts +0 -5
- package/common/src/functions/web3/oneInchAPI.mjs +0 -34
- package/common/src/functions/web3/uniswapAPI.cjs +0 -1
- package/common/src/functions/web3/uniswapAPI.d.ts +0 -16
- package/common/src/functions/web3/uniswapAPI.mjs +0 -60
- package/common/src/types/brotherhood-user.types.d.ts +0 -11
- package/common/src/types/crypto.types.d.ts +0 -8
- package/common/src/types/generatePoints.d.ts +0 -14
- package/common/src/types/new-rewards.type.cjs +0 -1
- package/common/src/types/new-rewards.type.mjs +0 -10
- package/common/src/types/referral.types.d.ts +0 -12
- package/common/src/types/rewards.types.d.ts +0 -34
- package/common/src/types/scheduled-transactions.types.cjs +0 -1
- package/common/src/types/scheduled-transactions.types.mjs +0 -6
- package/common/src/types/token-with-id.types.d.ts +0 -4
- package/common/src/webworker/logError-CZYZ3oyV.js +0 -2
- package/common/src/webworker/workerProxy-DPeuP2Mg.js +0 -1
|
@@ -11,8 +11,8 @@ import { fetchOnChainRootHashes as l } from "./fetchOnChainRootHashes.mjs";
|
|
|
11
11
|
var u = async (e, t) => {
|
|
12
12
|
let n = e.getRootHash();
|
|
13
13
|
if (n === void 0) throw Error("Root hash not available from hinkal merkle tree");
|
|
14
|
-
let r;
|
|
15
|
-
return
|
|
14
|
+
let r = e.getIndex() - 1n, i;
|
|
15
|
+
return i = await o({
|
|
16
16
|
type: a.ZKProof,
|
|
17
17
|
payload: {
|
|
18
18
|
type: s.CALC_COMMITMENTS_SIBLING_AND_SIDES,
|
|
@@ -22,16 +22,18 @@ var u = async (e, t) => {
|
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
}), {
|
|
25
|
-
inCommitmentSiblings:
|
|
26
|
-
inCommitmentSiblingSides:
|
|
27
|
-
rootHashHinkal: n
|
|
25
|
+
inCommitmentSiblings: i.inCommitmentSiblings,
|
|
26
|
+
inCommitmentSiblingSides: i.inCommitmentSiblingSides,
|
|
27
|
+
rootHashHinkal: n,
|
|
28
|
+
rootHashHinkalIndex: r
|
|
28
29
|
};
|
|
29
30
|
}, d = async (e, t) => {
|
|
30
31
|
let r = await c(e, t);
|
|
31
32
|
return {
|
|
32
33
|
inCommitmentSiblings: r.inCommitmentSiblings,
|
|
33
34
|
inCommitmentSiblingSides: r.inCommitmentSiblingSides,
|
|
34
|
-
rootHashHinkal: n(r.rootHashHinkal)
|
|
35
|
+
rootHashHinkal: n(r.rootHashHinkal),
|
|
36
|
+
rootHashHinkalIndex: n(r.rootHashHinkalIndex)
|
|
35
37
|
};
|
|
36
38
|
}, f = async (e, t) => {
|
|
37
39
|
if (!t) return !1;
|
|
@@ -43,7 +45,7 @@ var u = async (e, t) => {
|
|
|
43
45
|
} catch {
|
|
44
46
|
return !1;
|
|
45
47
|
}
|
|
46
|
-
}, p = async (e, n, r) => await f(e, r) || t(e) ? u(r, n) : d(e, n), m = async (n, c, u) => {
|
|
48
|
+
}, p = async (e, n, r, i = !1) => i || await f(e, r) || t(e) ? u(r, n) : d(e, n), m = async (n, c, u, d = !1) => {
|
|
47
49
|
if (i(u)) {
|
|
48
50
|
let e = r(u);
|
|
49
51
|
if (t(n)) {
|
|
@@ -51,21 +53,24 @@ var u = async (e, t) => {
|
|
|
51
53
|
if (t === void 0) throw Error("Root hash not available from hinkal merkle tree");
|
|
52
54
|
return {
|
|
53
55
|
...e,
|
|
54
|
-
rootHashHinkal: t
|
|
56
|
+
rootHashHinkal: t,
|
|
57
|
+
rootHashHinkalIndex: c.getIndex() - 1n
|
|
55
58
|
};
|
|
56
59
|
}
|
|
57
|
-
let { hinkalRootHash: i } = await l(n);
|
|
60
|
+
let { hinkalRootHash: i, hinkalRootHashIndex: a } = await l(n);
|
|
58
61
|
return {
|
|
59
62
|
...e,
|
|
60
|
-
rootHashHinkal: i
|
|
63
|
+
rootHashHinkal: i,
|
|
64
|
+
rootHashHinkalIndex: a
|
|
61
65
|
};
|
|
62
66
|
}
|
|
63
67
|
if (e) {
|
|
64
|
-
let { inCommitmentSiblings: e, inCommitmentSiblingSides: t, rootHashHinkal: r } = await p(n, u, c);
|
|
68
|
+
let { inCommitmentSiblings: e, inCommitmentSiblingSides: t, rootHashHinkal: r, rootHashHinkalIndex: i } = await p(n, u, c, d);
|
|
65
69
|
return {
|
|
66
70
|
inCommitmentSiblings: e,
|
|
67
71
|
inCommitmentSiblingSides: t,
|
|
68
72
|
rootHashHinkal: r,
|
|
73
|
+
rootHashHinkalIndex: i,
|
|
69
74
|
inNullifiers: await o({
|
|
70
75
|
type: a.ZKProof,
|
|
71
76
|
payload: {
|
|
@@ -75,7 +80,7 @@ var u = async (e, t) => {
|
|
|
75
80
|
})
|
|
76
81
|
};
|
|
77
82
|
} else {
|
|
78
|
-
let [{ inCommitmentSiblings: e, inCommitmentSiblingSides: t, rootHashHinkal: r },
|
|
83
|
+
let [{ inCommitmentSiblings: e, inCommitmentSiblingSides: t, rootHashHinkal: r, rootHashHinkalIndex: i }, l] = await Promise.all([p(n, u, c, d), o({
|
|
79
84
|
type: a.ZKProof,
|
|
80
85
|
payload: {
|
|
81
86
|
type: s.BUILD_IN_NULLIFIERS,
|
|
@@ -86,7 +91,8 @@ var u = async (e, t) => {
|
|
|
86
91
|
inCommitmentSiblings: e,
|
|
87
92
|
inCommitmentSiblingSides: t,
|
|
88
93
|
rootHashHinkal: r,
|
|
89
|
-
|
|
94
|
+
rootHashHinkalIndex: i,
|
|
95
|
+
inNullifiers: l
|
|
90
96
|
};
|
|
91
97
|
}
|
|
92
98
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require(`../../constants/chains.constants.cjs`),t=require(`../../constants/protocol.constants.cjs`),n=require(`./constant.cjs`);var r=(
|
|
1
|
+
const e=require(`../../constants/chains.constants.cjs`),t=require(`../../constants/protocol.constants.cjs`),n=require(`./constant.cjs`);var r=e=>e===`SignatureFromMnemonic`?t.SIGNATURE_FROM_MNEMONIC_VERSION:`v4`,i=(t,i)=>{let a=r(t);return i===e.chainIds.localhost||i===e.chainIds.solanaLocalnet||i===e.chainIds.tronLocalnet?n.localVerifiers[`${t}${a}Wasm`]:n.prodVerifiers[`${t}${a}Wasm`]},a=(t,i)=>{let a=r(t);return i===e.chainIds.localhost||i===e.chainIds.solanaLocalnet||i===e.chainIds.tronLocalnet?n.localVerifiers[`${t}${a}Zkey`]:n.prodVerifiers[`${t}${a}Zkey`]};exports.getWASMFile=i,exports.getZKeyFile=a;
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
import { chainIds as e } from "../../constants/chains.constants.mjs";
|
|
2
|
-
import {
|
|
2
|
+
import { SIGNATURE_FROM_MNEMONIC_VERSION as t } from "../../constants/protocol.constants.mjs";
|
|
3
3
|
import { localVerifiers as n, prodVerifiers as r } from "./constant.mjs";
|
|
4
4
|
//#region libs/shared/common/src/functions/snarkjs/getZKFiles.ts
|
|
5
|
-
var i = (
|
|
5
|
+
var i = (e) => e === "SignatureFromMnemonic" ? t : "v4", a = (t, a) => {
|
|
6
|
+
let o = i(t);
|
|
7
|
+
return a === e.localhost || a === e.solanaLocalnet || a === e.tronLocalnet ? n[`${t}${o}Wasm`] : r[`${t}${o}Wasm`];
|
|
8
|
+
}, o = (t, a) => {
|
|
9
|
+
let o = i(t);
|
|
10
|
+
return a === e.localhost || a === e.solanaLocalnet || a === e.tronLocalnet ? n[`${t}${o}Zkey`] : r[`${t}${o}Zkey`];
|
|
11
|
+
};
|
|
6
12
|
//#endregion
|
|
7
|
-
export {
|
|
13
|
+
export { a as getWASMFile, o as getZKeyFile };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
require(`./common.snarkjs.cjs`),require(`./signedMessageHash.cjs`),require(`./generateZkProof.cjs`),require(`./generateMainAndCommitmentZkProof.cjs`),require(`./fetchOnChainRootHashes.cjs`),require(`./constructGeneralZkProof.cjs`),require(`./constructSolanaZkProof.cjs`),require(`./verifyCommitmentValidationData.cjs`);
|
|
1
|
+
require(`./common.snarkjs.cjs`),require(`./signedMessageHash.cjs`),require(`./generateZkProof.cjs`),require(`./generateMainAndCommitmentZkProof.cjs`),require(`./fetchOnChainRootHashes.cjs`),require(`./constructGeneralZkProof.cjs`),require(`./constructSolanaZkProof.cjs`),require(`./verifyCommitmentValidationData.cjs`),require(`./constructSignatureFromMnemonicProofInput.cjs`),require(`./generateSignatureFromMnemonicProof.cjs`);
|
|
@@ -6,3 +6,5 @@ export * from './generateMainAndCommitmentZkProof';
|
|
|
6
6
|
export * from './constructSolanaZkProof';
|
|
7
7
|
export * from './fetchOnChainRootHashes';
|
|
8
8
|
export * from './verifyCommitmentValidationData';
|
|
9
|
+
export * from './constructSignatureFromMnemonicProofInput';
|
|
10
|
+
export * from './generateSignatureFromMnemonicProof';
|
|
@@ -6,3 +6,5 @@ import "./fetchOnChainRootHashes.mjs";
|
|
|
6
6
|
import "./constructGeneralZkProof.mjs";
|
|
7
7
|
import "./constructSolanaZkProof.mjs";
|
|
8
8
|
import "./verifyCommitmentValidationData.mjs";
|
|
9
|
+
import "./constructSignatureFromMnemonicProofInput.mjs";
|
|
10
|
+
import "./generateSignatureFromMnemonicProof.mjs";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
require(`../../../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../constants/protocol.constants.cjs`),t=require(`../pre-transaction/solana.cjs`);let n=require(`ethers`),r=require(`@coral-xyz/anchor`);var i=e=>[...new r.BN(e.length).toArray(`be`,8),...e.flatMap(e=>t.encodeToByte32Array(e))],a=t=>BigInt(n.ethers.keccak256(t))%e.CIRCOM_P,o=[`uint256`,`uint256[]`,`uint256[]`,`uint256`,`uint256[]`,`uint256[]`,`uint256`,`uint256`,`uint256`,`uint256`,`uint256`],
|
|
1
|
+
require(`../../../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../constants/protocol.constants.cjs`),t=require(`../pre-transaction/solana.cjs`);let n=require(`ethers`),r=require(`@coral-xyz/anchor`);var i=e=>[...new r.BN(e.length).toArray(`be`,8),...e.flatMap(e=>t.encodeToByte32Array(e))],a=t=>BigInt(n.ethers.keccak256(t))%e.CIRCOM_P,o=[`uint256`,`address`,`uint256`,`uint256[]`,`uint256[]`,`uint256`,`uint256[]`,`uint256[]`,`uint256`,`uint256`],s=[`uint256`,`uint256`,`uint256`,`uint256`],c=[`uint256`,`uint256[]`,`uint256[]`,`uint256`,`uint256[]`,`uint256[]`,`uint256`,`uint256`],l=e=>{let t=n.ethers.keccak256(n.ethers.AbiCoder.defaultAbiCoder().encode(o,[e.chainId,e.verifyingContract,e.rootHashHinkal,e.erc20TokenAddresses.map(e=>n.ethers.getBigInt(e)),e.amountChanges,e.outTimeStamp,e.inNullifiers.flat().map(e=>BigInt(e)),e.outCommitments.flat().map(e=>BigInt(e)),e.calldataHash,e.message])),r=n.ethers.keccak256(n.ethers.AbiCoder.defaultAbiCoder().encode(s,[e.outH1Ax,e.outH1Ay,e.H0Ax,e.H0Ay]));return a(n.ethers.AbiCoder.defaultAbiCoder().encode([`uint256`,`uint256`],[BigInt(t),BigInt(r)]))},u=e=>a(n.ethers.AbiCoder.defaultAbiCoder().encode(c,[e.rootHashHinkal,e.erc20TokenAddresses.map(e=>n.ethers.getBigInt(e)),e.amountChanges,e.outTimeStamp,e.inNullifiers.flat().map(e=>BigInt(e)),e.outCommitments.flat().map(e=>BigInt(e)),e.calldataHash,e.message])),d=r=>{let a=r.inNullifiers.flat().map(e=>BigInt(e)),o=r.outCommitments.flat().map(e=>BigInt(e)),s=[...t.encodeToByte32Array(r.rootHashHinkal),...i(r.mintAccountPart1),...i(r.mintAccountPart2),...i(r.amountChanges),...t.encodeToByte32Array(r.outTimeStamp),...i(a),...i(o),...t.encodeToByte32Array(r.calldataHash),...t.encodeToByte32Array(r.message),...t.encodeToByte32Array(r.swapperAccountAdditionalSeed),...t.encodeToByte32Array(r.outH1Ay),...t.encodeToByte32Array(r.H0Ax),...t.encodeToByte32Array(r.H0Ay)];return BigInt(n.ethers.sha256(new Uint8Array(s)))%e.CIRCOM_P};exports.computeSignedMessageHashEvm=l,exports.computeSignedMessageHashSolana=d,exports.computeSignedMessageHashTron=u;
|
|
@@ -7,9 +7,24 @@ type EvmSignedMessageHashParams = {
|
|
|
7
7
|
outCommitments: string[][];
|
|
8
8
|
calldataHash: bigint;
|
|
9
9
|
message: bigint;
|
|
10
|
+
outH1Ax: bigint;
|
|
10
11
|
outH1Ay: bigint;
|
|
11
12
|
H0Ax: bigint;
|
|
12
13
|
H0Ay: bigint;
|
|
14
|
+
chainId: bigint;
|
|
15
|
+
verifyingContract: string;
|
|
16
|
+
};
|
|
17
|
+
type TronSignedMessageHashParams = {
|
|
18
|
+
rootHashHinkal: bigint;
|
|
19
|
+
erc20TokenAddresses: string[];
|
|
20
|
+
amountChanges: bigint[];
|
|
21
|
+
outTimeStamp: bigint;
|
|
22
|
+
inNullifiers: string[][];
|
|
23
|
+
outCommitments: string[][];
|
|
24
|
+
calldataHash: bigint;
|
|
25
|
+
message: bigint;
|
|
26
|
+
chainId: bigint;
|
|
27
|
+
verifyingContract: string;
|
|
13
28
|
};
|
|
14
29
|
type SolanaSignedMessageHashParams = {
|
|
15
30
|
rootHashHinkal: bigint;
|
|
@@ -27,5 +42,6 @@ type SolanaSignedMessageHashParams = {
|
|
|
27
42
|
H0Ay: bigint;
|
|
28
43
|
};
|
|
29
44
|
export declare const computeSignedMessageHashEvm: (params: EvmSignedMessageHashParams) => bigint;
|
|
45
|
+
export declare const computeSignedMessageHashTron: (params: TronSignedMessageHashParams) => bigint;
|
|
30
46
|
export declare const computeSignedMessageHashSolana: (params: SolanaSignedMessageHashParams) => bigint;
|
|
31
47
|
export {};
|
|
@@ -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,11 +13,41 @@ var i = (e) => [...new r(e.length).toArray("be", 8), ...e.flatMap((e) => t(e))],
|
|
|
11
13
|
"uint256[]",
|
|
12
14
|
"uint256[]",
|
|
13
15
|
"uint256",
|
|
16
|
+
"uint256"
|
|
17
|
+
], s = [
|
|
18
|
+
"uint256",
|
|
19
|
+
"uint256",
|
|
20
|
+
"uint256",
|
|
21
|
+
"uint256"
|
|
22
|
+
], c = [
|
|
14
23
|
"uint256",
|
|
24
|
+
"uint256[]",
|
|
25
|
+
"uint256[]",
|
|
15
26
|
"uint256",
|
|
27
|
+
"uint256[]",
|
|
28
|
+
"uint256[]",
|
|
16
29
|
"uint256",
|
|
17
30
|
"uint256"
|
|
18
|
-
],
|
|
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, [
|
|
19
51
|
e.rootHashHinkal,
|
|
20
52
|
e.erc20TokenAddresses.map((e) => n.getBigInt(e)),
|
|
21
53
|
e.amountChanges,
|
|
@@ -23,11 +55,8 @@ var i = (e) => [...new r(e.length).toArray("be", 8), ...e.flatMap((e) => t(e))],
|
|
|
23
55
|
e.inNullifiers.flat().map((e) => BigInt(e)),
|
|
24
56
|
e.outCommitments.flat().map((e) => BigInt(e)),
|
|
25
57
|
e.calldataHash,
|
|
26
|
-
e.message
|
|
27
|
-
|
|
28
|
-
e.H0Ax,
|
|
29
|
-
e.H0Ay
|
|
30
|
-
])), c = (r) => {
|
|
58
|
+
e.message
|
|
59
|
+
])), d = (r) => {
|
|
31
60
|
let a = r.inNullifiers.flat().map((e) => BigInt(e)), o = r.outCommitments.flat().map((e) => BigInt(e)), s = [
|
|
32
61
|
...t(r.rootHashHinkal),
|
|
33
62
|
...i(r.mintAccountPart1),
|
|
@@ -46,4 +75,4 @@ var i = (e) => [...new r(e.length).toArray("be", 8), ...e.flatMap((e) => t(e))],
|
|
|
46
75
|
return BigInt(n.sha256(new Uint8Array(s))) % e;
|
|
47
76
|
};
|
|
48
77
|
//#endregion
|
|
49
|
-
export {
|
|
78
|
+
export { l as computeSignedMessageHashEvm, d as computeSignedMessageHashSolana, u as computeSignedMessageHashTron };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
require(`../../../../_virtual/_rolldown/runtime.cjs`),require(`../../constants/protocol.constants.cjs`);const e=require(`../utils/caseInsensitive.utils.cjs`);let t=require(`ethers`);var n=(n,r)=>{let i=t.ethers.keccak256(t.ethers.toUtf8Bytes(n));if(!e.caseInsensitiveEqual(t.ethers.recoverAddress(i,r),`0x655C3Aa937530E06A336458D1CF168d297B597A2`))throw Error(`Enclave response signature verification failed: unexpected signer`);return JSON.parse(n)};exports.verifySignedEnclaveResponse=n;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const verifySignedEnclaveResponse: <T>(data: string, signature: string) => T;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import "../../constants/protocol.constants.mjs";
|
|
2
|
+
import { caseInsensitiveEqual as e } from "../utils/caseInsensitive.utils.mjs";
|
|
3
|
+
import { ethers as t } from "ethers";
|
|
4
|
+
//#region libs/shared/common/src/functions/snarkjs/verifySignedEnclaveResponse.ts
|
|
5
|
+
var n = (n, r) => {
|
|
6
|
+
let i = t.keccak256(t.toUtf8Bytes(n));
|
|
7
|
+
if (!e(t.recoverAddress(i, r), "0x655C3Aa937530E06A336458D1CF168d297B597A2")) throw Error("Enclave response signature verification failed: unexpected signer");
|
|
8
|
+
return JSON.parse(n);
|
|
9
|
+
};
|
|
10
|
+
//#endregion
|
|
11
|
+
export { n as verifySignedEnclaveResponse };
|
|
@@ -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`),r=require(`./tron.utils.cjs`);let i=require(`ethers`),a=require(`@solana/web3.js`);require(`tronweb`);var o=[`http://`,`https://`,`/payment/`,`.app/`,`.com/`,`.netlify.`],s=e=>{if(o.some(t=>e.includes(t)))return!1;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(`"`);return!(c||l||u||d)},c=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)}},l=e=>{let[,,,,,t]=e.split(`,`);if(!t)throw Error(`recipientInfo is missing an encryption key`);return t},u=e=>i.ethers.keccak256(i.ethers.toUtf8Bytes(e.toLowerCase())),d=(t,n)=>u(e.isSolanaLike(t)?n:r.addressToHexFormat(n)),f=e=>i.ethers.keccak256(i.ethers.toUtf8Bytes(e)),p=e=>{try{return new a.PublicKey(e).toBase58()===e}catch{return!1}},m=(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=c,exports.getEncryptionKeyFromRecipientInfo=l,exports.hashEthereumAddress=u,exports.hashOwnerAddressForChain=d,exports.hashString=f,exports.isNativePlaceholderAddress=m,exports.isValidPrivateAddress=s,exports.isValidSolanaPublicKey=p;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { StealthAddressStructure } from '../../types/circom-data.types';
|
|
2
2
|
export declare const isValidPrivateAddress: (address: string) => boolean;
|
|
3
|
-
export declare const isValidOldStylePrivateAddress: (address: string) => boolean;
|
|
4
3
|
export declare const constructStealthAddressStructure: (recipientInfo: string) => StealthAddressStructure;
|
|
4
|
+
export declare const getEncryptionKeyFromRecipientInfo: (recipientInfo: string) => string;
|
|
5
5
|
export declare const hashEthereumAddress: (ethereumAddress: string) => string;
|
|
6
|
+
export declare const hashOwnerAddressForChain: (chainId: number, ethereumAddress: string) => string;
|
|
6
7
|
export declare const hashString: (string: string) => string;
|
|
7
8
|
export declare const isValidSolanaPublicKey: (str: string) => boolean;
|
|
8
9
|
export declare const isNativePlaceholderAddress: (address: string, chainId?: number) => boolean;
|
|
@@ -1,32 +1,41 @@
|
|
|
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 { addressToHexFormat as i } from "./tron.utils.mjs";
|
|
5
|
+
import { ethers as a } from "ethers";
|
|
6
|
+
import { PublicKey as o } from "@solana/web3.js";
|
|
5
7
|
import "tronweb";
|
|
6
8
|
//#region libs/shared/common/src/functions/utils/addresses.ts
|
|
7
|
-
var
|
|
9
|
+
var s = [
|
|
8
10
|
"http://",
|
|
9
11
|
"https://",
|
|
10
12
|
"/payment/",
|
|
11
13
|
".app/",
|
|
12
14
|
".com/",
|
|
13
15
|
".netlify."
|
|
14
|
-
],
|
|
15
|
-
if (
|
|
16
|
-
let [n, r, i, a, o] = e.split(","),
|
|
17
|
-
return !(
|
|
18
|
-
},
|
|
19
|
-
|
|
20
|
-
let [n, r, i, a, o] = e.split(","), s = !n || !r || !i || !a || !o, c = r?.substring(0, 2) !== "0x" || i?.substring(0, 2) !== "0x", l = i?.length !== 66 || r?.length > 66 || r?.length < 64, u = e?.includes("\"");
|
|
21
|
-
return !(s || c || l || u);
|
|
22
|
-
}, i = (e) => {
|
|
23
|
-
let [t, n, r, i] = e.split(",");
|
|
16
|
+
], c = (e) => {
|
|
17
|
+
if (s.some((t) => e.includes(t))) return !1;
|
|
18
|
+
let [t, n, r, i, a, o] = e.split(","), c = !t || !o || !n || !r || !i || !a, l = t?.substring(0, 2) !== "0x" || o?.substring(0, 2) !== "0x", u = o?.length !== 66 || t?.length > 66 || t?.length < 64, d = e?.includes("\"");
|
|
19
|
+
return !(c || l || u || d);
|
|
20
|
+
}, l = (e) => {
|
|
21
|
+
let [t, n, r, i, a] = e.split(",");
|
|
24
22
|
return {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
23
|
+
H0x: BigInt(n),
|
|
24
|
+
H0y: BigInt(r),
|
|
25
|
+
H1x: BigInt(i),
|
|
26
|
+
H1y: BigInt(a),
|
|
27
|
+
stealthAddress: BigInt(t)
|
|
29
28
|
};
|
|
30
|
-
},
|
|
29
|
+
}, u = (e) => {
|
|
30
|
+
let [, , , , , t] = e.split(",");
|
|
31
|
+
if (!t) throw Error("recipientInfo is missing an encryption key");
|
|
32
|
+
return t;
|
|
33
|
+
}, d = (e) => a.keccak256(a.toUtf8Bytes(e.toLowerCase())), f = (t, n) => d(e(t) ? n : i(n)), p = (e) => a.keccak256(a.toUtf8Bytes(e)), m = (e) => {
|
|
34
|
+
try {
|
|
35
|
+
return new o(e).toBase58() === e;
|
|
36
|
+
} catch {
|
|
37
|
+
return !1;
|
|
38
|
+
}
|
|
39
|
+
}, h = (i, a) => (i = i.trim(), i ? a === void 0 ? r(i, n) || r(i, "11111111111111111111111111111111") : e(a) ? r(i, t) : r(i, n) : !1);
|
|
31
40
|
//#endregion
|
|
32
|
-
export {
|
|
41
|
+
export { l as constructStealthAddressStructure, u as getEncryptionKeyFromRecipientInfo, d as hashEthereumAddress, f as hashOwnerAddressForChain, p as hashString, h as isNativePlaceholderAddress, c as isValidPrivateAddress, m as isValidSolanaPublicKey };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`../../error-handling/error-codes.constants.cjs`),t=require(`./time.utils.cjs`),n=require(`../../constants/bridging.constants.cjs`),r=require(`./publicBalance.utils.cjs`);var i=async(i,a,o,s,c)=>{let l=s-s*BigInt(Math.round(c*n.SLIPPAGE_SCALING_FACTOR))/BigInt(n.SLIPPAGE_SCALING_FACTOR),u=l>0n?l:1n,d=Date.now()+n.BRIDGE_ARRIVAL_TIMEOUT_MS;for(;Date.now()<d;){let e=await r.getPublicBalanceByTokenAddress(i,a,o);if(e!==null&&e>=u)return e;await t.waitLittle(n.BRIDGE_ARRIVAL_POLL_INTERVAL_MS)}throw Error(`${e.transactionErrorCodes.BRIDGE_ARRIVAL_TIMEOUT} ${a} on chain ${i} within timeout.`)};exports.waitForBridgeArrival=i;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const waitForBridgeArrival: (destChainId: number, tempWalletAddress: string, destTokenAddress: string, expectedAmount: bigint, slippage: number) => Promise<bigint>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { transactionErrorCodes as e } from "../../error-handling/error-codes.constants.mjs";
|
|
2
|
+
import { waitLittle as t } from "./time.utils.mjs";
|
|
3
|
+
import { BRIDGE_ARRIVAL_POLL_INTERVAL_MS as n, BRIDGE_ARRIVAL_TIMEOUT_MS as r, SLIPPAGE_SCALING_FACTOR as i } from "../../constants/bridging.constants.mjs";
|
|
4
|
+
import { getPublicBalanceByTokenAddress as a } from "./publicBalance.utils.mjs";
|
|
5
|
+
//#region libs/shared/common/src/functions/utils/bridge-arrival.utils.ts
|
|
6
|
+
var o = async (o, s, c, l, u) => {
|
|
7
|
+
let d = l - l * BigInt(Math.round(u * i)) / BigInt(i), f = d > 0n ? d : 1n, p = Date.now() + r;
|
|
8
|
+
for (; Date.now() < p;) {
|
|
9
|
+
let e = await a(o, s, c);
|
|
10
|
+
if (e !== null && e >= f) return e;
|
|
11
|
+
await t(n);
|
|
12
|
+
}
|
|
13
|
+
throw Error(`${e.BRIDGE_ARRIVAL_TIMEOUT} ${s} on chain ${o} within timeout.`);
|
|
14
|
+
};
|
|
15
|
+
//#endregion
|
|
16
|
+
export { o 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,o)=>{let{txHash:s,shieldedAmount:c}=await n.hinkalSolanaSponsoredShield(e,t,r,i,a,void 0,o);return{destTxHash:s,shieldedAmount:c}};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, variableRate?: bigint) => 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, o) => {
|
|
17
|
+
let { txHash: s, shieldedAmount: c } = await n(e, t, r, i, a, void 0, o);
|
|
18
|
+
return {
|
|
19
|
+
destTxHash: s,
|
|
20
|
+
shieldedAmount: c
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
//#endregion
|
|
24
|
+
export { i as hinkalSolanaShieldBridged, r as resolveBridgeRecipient };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
require(`../web3/etherFunctions.cjs`),require(`../../error-handling/index.cjs`),require(`./bridge-flow.utils.cjs`);
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { PrivateSendAllocation } from '../../API';
|
|
2
|
+
import { ErrorWithIndex } from '../../error-handling';
|
|
3
|
+
import { IHinkal } from '../../data-structures/Hinkal/IHinkal';
|
|
4
|
+
import { AdminTransactionType } from '../../types/admin.types';
|
|
5
|
+
import { PrivateBridgeResult } from '../../types/bridging-tx.types';
|
|
6
|
+
import { FeeStructure } from '../../types/hinkal.types';
|
|
7
|
+
import { RecipientRequest } from '../../types/pay-routing.types';
|
|
8
|
+
import { ERC20Token } from '../../types/token.types';
|
|
9
|
+
export interface BridgeClaimableResult {
|
|
10
|
+
results: PrivateBridgeResult[];
|
|
11
|
+
sourceTxHashes: string[];
|
|
12
|
+
destTxHashes: string[];
|
|
13
|
+
failedRecipientErrorMessage: ErrorWithIndex | undefined;
|
|
14
|
+
}
|
|
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>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
require(`../../constants/chains.constants.cjs`),require(`../../constants/bridging.constants.cjs`);
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { ERC20Token } from '../../types/token.types';
|
|
2
|
+
export declare const getBridgingSlippagePercent: (amount: string, tokenPriceDollar?: number) => number;
|
|
3
|
+
export declare const getIsBridgeOrSwapFlow: (usePrivateBalance: boolean, sourceToken: ERC20Token | undefined, destinationToken: ERC20Token | undefined) => boolean;
|
|
4
|
+
export declare const getIsConfidentialBridgeOrSwapFlow: (usePrivateBalance: boolean, sourceToken: ERC20Token | undefined, destinationToken: ERC20Token | undefined, publicTransfer?: boolean) => boolean;
|
|
@@ -6,11 +6,12 @@ interface BuildClaimableDepositPlanParams {
|
|
|
6
6
|
recipientAddresses: string[];
|
|
7
7
|
recipientInfos?: Array<string | undefined>;
|
|
8
8
|
nonce: bigint;
|
|
9
|
-
|
|
9
|
+
tokenAddresses: string[];
|
|
10
10
|
}
|
|
11
11
|
export interface ClaimableDepositPlan {
|
|
12
12
|
stealthAddressStructures: StealthAddressStructure[];
|
|
13
|
+
recipientEncryptionKeys: string[];
|
|
13
14
|
fallbackRecipients: FallbackRecipientUtxoPlan[];
|
|
14
15
|
}
|
|
15
|
-
export declare const buildClaimableDepositPlan: ({ userKeys, recipientAmounts, recipientAddresses, recipientInfos, nonce,
|
|
16
|
+
export declare const buildClaimableDepositPlan: ({ userKeys, recipientAmounts, recipientAddresses, recipientInfos, nonce, tokenAddresses, }: BuildClaimableDepositPlanParams) => ClaimableDepositPlan;
|
|
16
17
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
require(`../../../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../constants/chains.constants.cjs`);let t=require(`ethers`);var n=(n,r,i)=>{let{hinkalAddress:a}=e.networkRegistry[i].contractData,o=t.ethers.
|
|
1
|
+
require(`../../../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../constants/chains.constants.cjs`);let t=require(`ethers`);var n=(n,r,i)=>{let{hinkalAddress:a}=e.networkRegistry[i].contractData,[{endpoint:o,invokeWallet:s,value:c,callData:l}]=t.ethers.AbiCoder.defaultAbiCoder().decode([`tuple(address endpoint, bool invokeWallet, uint128 value, bytes callData)`],n);return{from:s?r:a,to:o,value:BigInt(c),calldata:l}};exports.convertEmporiumOpToCallInfo=n;
|
|
@@ -2,17 +2,12 @@ import { networkRegistry as e } from "../../constants/chains.constants.mjs";
|
|
|
2
2
|
import { ethers as t } from "ethers";
|
|
3
3
|
//#region libs/shared/common/src/functions/utils/convertEmporiumOpToCallInfo.ts
|
|
4
4
|
var n = (n, r, i) => {
|
|
5
|
-
let { hinkalAddress: a } = e[i].contractData,
|
|
6
|
-
s,
|
|
7
|
-
o.slice(21, 37),
|
|
8
|
-
c,
|
|
9
|
-
o.slice(37)
|
|
10
|
-
].map((e) => t.hexlify(e));
|
|
5
|
+
let { hinkalAddress: a } = e[i].contractData, [{ endpoint: o, invokeWallet: s, value: c, callData: l }] = t.AbiCoder.defaultAbiCoder().decode(["tuple(address endpoint, bool invokeWallet, uint128 value, bytes callData)"], n);
|
|
11
6
|
return {
|
|
12
|
-
from:
|
|
13
|
-
to:
|
|
14
|
-
value: BigInt(
|
|
15
|
-
calldata:
|
|
7
|
+
from: s ? r : a,
|
|
8
|
+
to: o,
|
|
9
|
+
value: BigInt(c),
|
|
10
|
+
calldata: l
|
|
16
11
|
};
|
|
17
12
|
};
|
|
18
13
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require(`../../types/hinkal.types.cjs`),t=require(`../../types/external-action.types.cjs`);e.IntegrationProvider.
|
|
1
|
+
const e=require(`../../types/hinkal.types.cjs`),t=require(`../../types/external-action.types.cjs`);e.IntegrationProvider.LIFI,t.ExternalActionId.Lifi,e.IntegrationProvider.OKX,t.ExternalActionId.Okx,e.IntegrationProvider.ALL,e.IntegrationProvider.NONE;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { IntegrationProvider as e } from "../../types/hinkal.types.mjs";
|
|
2
2
|
import { ExternalActionId as t } from "../../types/external-action.types.mjs";
|
|
3
|
-
e.
|
|
3
|
+
e.LIFI, t.Lifi, e.OKX, t.Okx, e.ALL, e.NONE;
|
|
4
4
|
//#endregion
|
|
@@ -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`,`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,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,47 @@
|
|
|
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
|
+
"getBalance",
|
|
33
|
+
"getAccountInfo",
|
|
34
|
+
"getTokenAccountBalance"
|
|
35
|
+
]);
|
|
36
|
+
return n._rpcRequest = async (e, t) => {
|
|
37
|
+
if (r) return a(e, t);
|
|
38
|
+
if (o.has(e)) return i(e, t);
|
|
39
|
+
try {
|
|
40
|
+
return await a(e, t);
|
|
41
|
+
} catch {
|
|
42
|
+
return i(e, t);
|
|
43
|
+
}
|
|
44
|
+
}, n;
|
|
45
|
+
};
|
|
10
46
|
//#endregion
|
|
11
|
-
export {
|
|
47
|
+
export { u as createCustomSolanaConnection, l as createJsonRpcProvider };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
require(`../../data-structures/
|
|
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`);
|