@hinkal/common 0.3.5 → 0.3.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/common/src/API/API.cjs +1 -1
- package/common/src/API/API.d.ts +6 -5
- package/common/src/API/API.mjs +75 -74
- package/common/src/API/admin-calls.cjs +1 -1
- package/common/src/API/admin-calls.d.ts +1 -1
- package/common/src/API/admin-calls.mjs +3 -1
- package/common/src/API/callLifiAPI.d.ts +1 -0
- package/common/src/API/callNearIntentsAPI.cjs +1 -1
- package/common/src/API/callNearIntentsAPI.mjs +2 -2
- package/common/src/API/callRelayer.cjs +1 -1
- package/common/src/API/callRelayer.d.ts +32 -1
- package/common/src/API/callRelayer.mjs +7 -1
- package/common/src/API/enclaveUtxoCalls.cjs +1 -1
- package/common/src/API/enclaveUtxoCalls.d.ts +16 -16
- package/common/src/API/enclaveUtxoCalls.mjs +3 -3
- package/common/src/API/evm-rpc-fallback.cjs +1 -0
- package/common/src/API/evm-rpc-fallback.d.ts +1 -0
- package/common/src/API/evm-rpc-fallback.mjs +17 -0
- package/common/src/API/evm-token-assets.cjs +1 -0
- package/common/src/API/evm-token-assets.d.ts +8 -0
- package/common/src/API/evm-token-assets.mjs +20 -0
- package/common/src/API/index.cjs +1 -1
- package/common/src/API/index.d.ts +1 -0
- package/common/src/API/index.mjs +1 -0
- package/common/src/API/route-config.cjs +1 -0
- package/common/src/API/route-config.d.ts +1 -0
- package/common/src/API/route-config.mjs +26 -0
- package/common/src/API/solana-nft-assets.cjs +1 -0
- package/common/src/API/solana-nft-assets.d.ts +1 -0
- package/common/src/API/solana-nft-assets.mjs +11 -0
- package/common/src/API/solana-priority-fee.cjs +1 -0
- package/common/src/API/solana-priority-fee.d.ts +3 -0
- package/common/src/API/solana-priority-fee.mjs +20 -0
- package/common/src/API/solana-rpc-fallback.cjs +1 -0
- package/common/src/API/solana-rpc-fallback.d.ts +1 -0
- package/common/src/API/solana-rpc-fallback.mjs +13 -0
- package/common/src/API/temporaryWalletCalls.cjs +1 -1
- package/common/src/API/temporaryWalletCalls.d.ts +0 -4
- package/common/src/API/temporaryWalletCalls.mjs +1 -5
- package/common/src/constants/balance.constants.d.ts +2 -0
- package/common/src/constants/bridging.constants.d.ts +1 -0
- package/common/src/constants/chains.constants.cjs +1 -1
- package/common/src/constants/chains.constants.d.ts +0 -3
- package/common/src/constants/chains.constants.mjs +33 -54
- package/common/src/constants/coingecko.constants.cjs +1 -1
- package/common/src/constants/coingecko.constants.mjs +1 -1
- package/common/src/constants/contracts.constants.cjs +1 -1
- package/common/src/constants/contracts.constants.d.ts +1 -0
- package/common/src/constants/contracts.constants.mjs +19 -15
- package/common/src/constants/deploy-data/deploy-data-arbMainnet.json.cjs +1 -1
- package/common/src/constants/deploy-data/deploy-data-arbMainnet.json.mjs +3 -2
- package/common/src/constants/deploy-data/deploy-data-arcTestnet.json.cjs +1 -1
- package/common/src/constants/deploy-data/deploy-data-arcTestnet.json.mjs +3 -2
- package/common/src/constants/deploy-data/deploy-data-base.json.cjs +1 -1
- package/common/src/constants/deploy-data/deploy-data-base.json.mjs +3 -2
- package/common/src/constants/deploy-data/deploy-data-bnbMainnet.json.cjs +1 -1
- package/common/src/constants/deploy-data/deploy-data-bnbMainnet.json.mjs +3 -2
- package/common/src/constants/deploy-data/deploy-data-ethMainnet.json.cjs +1 -1
- package/common/src/constants/deploy-data/deploy-data-ethMainnet.json.mjs +3 -2
- package/common/src/constants/deploy-data/deploy-data-optimism.json.cjs +1 -1
- package/common/src/constants/deploy-data/deploy-data-optimism.json.mjs +7 -6
- package/common/src/constants/deploy-data/deploy-data-polygon.json.cjs +1 -1
- package/common/src/constants/deploy-data/deploy-data-polygon.json.mjs +3 -2
- package/common/src/constants/deploy-data/deploy-data-tempo.json.cjs +1 -1
- package/common/src/constants/deploy-data/deploy-data-tempo.json.mjs +3 -2
- package/common/src/constants/deploy-data/shared-deploy-data-evm.json.cjs +1 -1
- package/common/src/constants/deploy-data/shared-deploy-data-evm.json.mjs +18 -1
- package/common/src/constants/deploy-data/shared-deploy-data-solana.json.cjs +1 -1
- package/common/src/constants/deploy-data/shared-deploy-data-solana.json.mjs +1 -1
- package/common/src/constants/okx.constants.d.ts +1 -0
- package/common/src/constants/protocol.constants.cjs +2 -2
- package/common/src/constants/protocol.constants.d.ts +4 -1
- package/common/src/constants/protocol.constants.mjs +3 -8
- package/common/src/constants/server.constants.cjs +1 -1
- package/common/src/constants/server.constants.d.ts +7 -2
- package/common/src/constants/server.constants.mjs +8 -3
- package/common/src/constants/vite.constants.cjs +1 -1
- package/common/src/constants/vite.constants.mjs +5 -23
- package/common/src/data-structures/ApprovalDBs/EventsPublicApprovalsDB.d.ts +1 -2
- package/common/src/data-structures/Hinkal/Hinkal.cjs +1 -1
- package/common/src/data-structures/Hinkal/Hinkal.d.ts +4 -4
- package/common/src/data-structures/Hinkal/Hinkal.mjs +39 -39
- package/common/src/data-structures/Hinkal/IHinkal.d.ts +4 -4
- package/common/src/data-structures/Hinkal/hinkalActionReceive.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalActionReceive.mjs +11 -9
- package/common/src/data-structures/Hinkal/hinkalBridgePrivateToPrivate.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalBridgePrivateToPrivate.d.ts +2 -1
- package/common/src/data-structures/Hinkal/hinkalBridgePrivateToPrivate.mjs +81 -90
- package/common/src/data-structures/Hinkal/hinkalClaimUtxo.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalClaimUtxo.d.ts +1 -1
- package/common/src/data-structures/Hinkal/hinkalClaimUtxo.mjs +3 -5
- package/common/src/data-structures/Hinkal/hinkalDepositAndBridge.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalDepositAndBridge.mjs +100 -104
- package/common/src/data-structures/Hinkal/hinkalDepositAndWithdraw.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalDepositAndWithdraw.d.ts +1 -1
- package/common/src/data-structures/Hinkal/hinkalDepositAndWithdraw.mjs +86 -93
- package/common/src/data-structures/Hinkal/hinkalDepositOnChainUtxos.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalDepositOnChainUtxos.d.ts +20 -7
- package/common/src/data-structures/Hinkal/hinkalDepositOnChainUtxos.mjs +51 -39
- package/common/src/data-structures/Hinkal/hinkalPrivateWallet.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalPrivateWallet.mjs +2 -2
- package/common/src/data-structures/Hinkal/hinkalProxyToPrivate.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalProxyToPrivate.mjs +15 -13
- package/common/src/data-structures/Hinkal/hinkalSolanaClaimUtxo.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalSolanaClaimUtxo.d.ts +1 -1
- package/common/src/data-structures/Hinkal/hinkalSolanaClaimUtxo.mjs +3 -5
- package/common/src/data-structures/Hinkal/hinkalSolanaDeposit.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalSolanaDeposit.mjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalSolanaDepositAndWithdraw.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalSolanaDepositAndWithdraw.d.ts +2 -2
- package/common/src/data-structures/Hinkal/hinkalSolanaDepositAndWithdraw.mjs +88 -121
- package/common/src/data-structures/Hinkal/hinkalSolanaProxySend.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalSolanaProxySend.mjs +1 -3
- package/common/src/data-structures/Hinkal/hinkalSolanaProxyShield.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalSolanaProxyShield.d.ts +24 -2
- package/common/src/data-structures/Hinkal/hinkalSolanaProxyShield.mjs +77 -58
- package/common/src/data-structures/Hinkal/hinkalSolanaProxySwap.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalSolanaProxySwap.mjs +1 -3
- package/common/src/data-structures/Hinkal/hinkalSolanaSponsoredProxySend.d.ts +5 -0
- package/common/src/data-structures/Hinkal/hinkalSolanaSponsoredShield.cjs +1 -0
- package/common/src/data-structures/Hinkal/hinkalSolanaSponsoredShield.d.ts +8 -0
- package/common/src/data-structures/Hinkal/hinkalSolanaSponsoredShield.mjs +31 -0
- package/common/src/data-structures/Hinkal/hinkalSolanaTransact.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalSolanaTransact.mjs +44 -42
- package/common/src/data-structures/Hinkal/hinkalSolanaWithdraw.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalSolanaWithdraw.d.ts +1 -1
- package/common/src/data-structures/Hinkal/hinkalSolanaWithdraw.mjs +29 -24
- package/common/src/data-structures/Hinkal/hinkalSwap.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalSwap.d.ts +1 -1
- package/common/src/data-structures/Hinkal/hinkalSwap.mjs +27 -24
- package/common/src/data-structures/Hinkal/hinkalTransact.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalTransact.mjs +73 -56
- package/common/src/data-structures/Hinkal/hinkalWithdraw.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalWithdraw.d.ts +1 -1
- package/common/src/data-structures/Hinkal/hinkalWithdraw.mjs +21 -18
- package/common/src/data-structures/Hinkal/hinkalWithdrawStuckUtxos.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalWithdrawStuckUtxos.mjs +19 -18
- package/common/src/data-structures/Hinkal/index.d.ts +2 -0
- package/common/src/data-structures/Hinkal/resetMerkleTrees.cjs +1 -1
- package/common/src/data-structures/Hinkal/resetMerkleTrees.mjs +2 -2
- package/common/src/data-structures/TokenDBs/AlchemyPublicTokensDB.cjs +1 -1
- package/common/src/data-structures/TokenDBs/AlchemyPublicTokensDB.d.ts +0 -1
- package/common/src/data-structures/TokenDBs/AlchemyPublicTokensDB.mjs +55 -119
- package/common/src/data-structures/crypto-keys/decodeUTXO.cjs +1 -1
- package/common/src/data-structures/crypto-keys/decodeUTXO.mjs +11 -61
- package/common/src/data-structures/event-service/evm/BlockchainEventEmitter.cjs +1 -1
- package/common/src/data-structures/event-service/evm/BlockchainEventEmitter.d.ts +2 -0
- package/common/src/data-structures/event-service/evm/BlockchainEventEmitter.mjs +41 -27
- package/common/src/data-structures/merkle-tree/MerkleTree.cjs +1 -1
- package/common/src/data-structures/merkle-tree/MerkleTree.d.ts +1 -0
- package/common/src/data-structures/merkle-tree/MerkleTree.mjs +3 -0
- package/common/src/error-handling/get-error.message.cjs +1 -1
- package/common/src/error-handling/get-error.message.mjs +1 -4
- package/common/src/functions/index.cjs +1 -1
- package/common/src/functions/index.mjs +9 -6
- package/common/src/functions/pre-transaction/calculateSolanaNullifierCount.cjs +1 -1
- package/common/src/functions/pre-transaction/calculateSolanaNullifierCount.mjs +2 -3
- package/common/src/functions/pre-transaction/index.cjs +1 -1
- package/common/src/functions/pre-transaction/index.d.ts +1 -0
- package/common/src/functions/pre-transaction/index.mjs +1 -1
- package/common/src/functions/pre-transaction/merge-with-fee-structure-emporium.cjs +1 -1
- package/common/src/functions/pre-transaction/merge-with-fee-structure-emporium.mjs +2 -2
- package/common/src/functions/pre-transaction/sendV0Transaction.cjs +2 -2
- package/common/src/functions/pre-transaction/sendV0Transaction.d.ts +5 -2
- package/common/src/functions/pre-transaction/sendV0Transaction.mjs +4 -4
- package/common/src/functions/pre-transaction/solanaTransfer.utils.cjs +1 -1
- package/common/src/functions/pre-transaction/solanaTransfer.utils.mjs +16 -15
- package/common/src/functions/pre-transaction/speculativeUtxo.cjs +1 -0
- package/common/src/functions/pre-transaction/speculativeUtxo.d.ts +9 -0
- package/common/src/functions/pre-transaction/speculativeUtxo.mjs +19 -0
- package/common/src/functions/private-wallet/emporium.helpers.cjs +1 -1
- package/common/src/functions/private-wallet/emporium.helpers.d.ts +9 -2
- package/common/src/functions/private-wallet/emporium.helpers.mjs +93 -74
- package/common/src/functions/snarkjs/common.snarkjs.cjs +1 -1
- package/common/src/functions/snarkjs/common.snarkjs.d.ts +1 -0
- package/common/src/functions/snarkjs/common.snarkjs.mjs +36 -32
- package/common/src/functions/snarkjs/constant.cjs +1 -1
- package/common/src/functions/snarkjs/constant.d.ts +48 -0
- package/common/src/functions/snarkjs/constant.mjs +48 -0
- package/common/src/functions/snarkjs/constructGeneralZkProof.cjs +1 -1
- package/common/src/functions/snarkjs/constructGeneralZkProof.d.ts +1 -1
- package/common/src/functions/snarkjs/constructGeneralZkProof.mjs +75 -71
- package/common/src/functions/snarkjs/constructSolanaZkProof.cjs +1 -1
- package/common/src/functions/snarkjs/constructSolanaZkProof.d.ts +1 -1
- package/common/src/functions/snarkjs/constructSolanaZkProof.mjs +27 -27
- package/common/src/functions/snarkjs/constructTxEnclave.cjs +1 -1
- package/common/src/functions/snarkjs/constructTxEnclave.mjs +8 -3
- package/common/src/functions/snarkjs/fetchOnChainRootHashes.cjs +1 -1
- package/common/src/functions/snarkjs/fetchOnChainRootHashes.mjs +10 -21
- package/common/src/functions/snarkjs/getMerkleTreeSiblingsAndRootHashes.cjs +1 -1
- package/common/src/functions/snarkjs/getMerkleTreeSiblingsAndRootHashes.d.ts +2 -2
- package/common/src/functions/snarkjs/getMerkleTreeSiblingsAndRootHashes.mjs +3 -3
- package/common/src/functions/snarkjs/signedMessageHash.cjs +1 -1
- package/common/src/functions/snarkjs/signedMessageHash.d.ts +4 -0
- package/common/src/functions/snarkjs/signedMessageHash.mjs +27 -18
- package/common/src/functions/utils/addresses.cjs +1 -1
- package/common/src/functions/utils/addresses.mjs +19 -12
- package/common/src/functions/utils/bridge-arrival.utils.cjs +1 -0
- package/common/src/functions/utils/bridge-arrival.utils.d.ts +1 -0
- package/common/src/functions/utils/bridge-arrival.utils.mjs +15 -0
- package/common/src/functions/utils/bridge-claimable-utxo.utils.cjs +1 -0
- package/common/src/functions/utils/bridge-claimable-utxo.utils.d.ts +19 -0
- package/common/src/functions/utils/bridge-claimable-utxo.utils.mjs +24 -0
- package/common/src/functions/utils/bridge-claimable.utils.d.ts +2 -3
- package/common/src/functions/utils/create-provider.cjs +1 -1
- package/common/src/functions/utils/create-provider.d.ts +9 -2
- package/common/src/functions/utils/create-provider.mjs +42 -9
- package/common/src/functions/utils/deposit-claimable.utils.cjs +1 -1
- package/common/src/functions/utils/deposit-claimable.utils.d.ts +2 -5
- package/common/src/functions/utils/deposit-claimable.utils.mjs +1 -6
- package/common/src/functions/utils/enclave-utxo-storage.cjs +1 -1
- package/common/src/functions/utils/enclave-utxo-storage.d.ts +4 -8
- package/common/src/functions/utils/enclave-utxo-storage.mjs +13 -2
- package/common/src/functions/utils/fees.utils.cjs +1 -1
- package/common/src/functions/utils/fees.utils.d.ts +2 -0
- package/common/src/functions/utils/fees.utils.mjs +15 -6
- package/common/src/functions/utils/getUtxosFromReceipt.utils.cjs +1 -1
- package/common/src/functions/utils/getUtxosFromReceipt.utils.d.ts +1 -1
- package/common/src/functions/utils/getUtxosFromReceipt.utils.mjs +5 -51
- package/common/src/functions/utils/getUtxosFromReceiptSolana.cjs +1 -1
- package/common/src/functions/utils/getUtxosFromReceiptSolana.mjs +7 -23
- package/common/src/functions/utils/index.cjs +1 -1
- package/common/src/functions/utils/index.d.ts +6 -0
- package/common/src/functions/utils/index.mjs +10 -4
- package/common/src/functions/utils/nearIntents.utils.cjs +1 -1
- package/common/src/functions/utils/nearIntents.utils.mjs +27 -13
- package/common/src/functions/utils/publicBalance.utils.cjs +1 -1
- package/common/src/functions/utils/publicBalance.utils.d.ts +0 -1
- package/common/src/functions/utils/publicBalance.utils.mjs +35 -22
- package/common/src/functions/utils/recovery-balance.utils.cjs +1 -0
- package/common/src/functions/utils/recovery-balance.utils.d.ts +2 -0
- package/common/src/functions/utils/recovery-balance.utils.mjs +1 -0
- package/common/src/functions/utils/solana-program.utils.cjs +1 -0
- package/common/src/functions/utils/solana-program.utils.d.ts +3 -0
- package/common/src/functions/utils/solana-program.utils.mjs +17 -0
- package/common/src/functions/utils/solana-sponsored.utils.cjs +1 -0
- package/common/src/functions/utils/solana-sponsored.utils.d.ts +22 -0
- package/common/src/functions/utils/solana-sponsored.utils.mjs +30 -0
- package/common/src/functions/utils/solanaMint.utils.cjs +1 -1
- package/common/src/functions/utils/solanaMint.utils.d.ts +7 -0
- package/common/src/functions/utils/solanaMint.utils.mjs +18 -8
- package/common/src/functions/utils/sponsored-shield.utils.cjs +1 -0
- package/common/src/functions/utils/sponsored-shield.utils.d.ts +3 -0
- package/common/src/functions/utils/sponsored-shield.utils.mjs +3 -0
- package/common/src/functions/utils/temp-wallet.utils.cjs +1 -1
- package/common/src/functions/utils/temp-wallet.utils.d.ts +5 -4
- package/common/src/functions/utils/temp-wallet.utils.mjs +35 -14
- package/common/src/functions/utils/transfer-claimable.utils.cjs +1 -1
- package/common/src/functions/utils/transfer-claimable.utils.d.ts +1 -2
- package/common/src/functions/utils/transfer-claimable.utils.mjs +2 -5
- package/common/src/functions/utils/tron.utils.cjs +1 -1
- package/common/src/functions/utils/tron.utils.d.ts +2 -2
- package/common/src/functions/utils/tron.utils.mjs +19 -18
- package/common/src/functions/utils/tronSimulation.utils.cjs +1 -1
- package/common/src/functions/utils/tronSimulation.utils.mjs +4 -6
- package/common/src/functions/utils/tx-confirmation.utils.cjs +1 -1
- package/common/src/functions/utils/tx-confirmation.utils.mjs +1 -1
- package/common/src/functions/web3/events/getInputUtxosEnclave.cjs +1 -1
- package/common/src/functions/web3/events/getInputUtxosEnclave.mjs +15 -25
- package/common/src/functions/web3/functionCalls/submitProof.cjs +1 -1
- package/common/src/functions/web3/functionCalls/submitProof.mjs +6 -6
- package/common/src/functions/web3/functionCalls/transactCallRelayer.cjs +1 -1
- package/common/src/functions/web3/functionCalls/transactCallRelayer.d.ts +2 -2
- package/common/src/functions/web3/functionCalls/transactCallRelayer.mjs +8 -6
- package/common/src/functions/web3/getContractMetadata.cjs +1 -1
- package/common/src/functions/web3/getContractMetadata.mjs +1 -1
- package/common/src/functions/web3/getPublicAddressBalance.cjs +1 -1
- package/common/src/functions/web3/getPublicAddressBalance.d.ts +1 -2
- package/common/src/functions/web3/getPublicAddressBalance.mjs +6 -5
- package/common/src/functions/web3/index.cjs +1 -1
- package/common/src/functions/web3/index.d.ts +1 -1
- package/common/src/functions/web3/index.mjs +1 -1
- package/common/src/providers/SolanaProviderAdapter.cjs +1 -1
- package/common/src/providers/SolanaProviderAdapter.mjs +1 -2
- package/common/src/providers/WagmiProviderAdapter.cjs +1 -1
- package/common/src/providers/WagmiProviderAdapter.mjs +35 -38
- package/common/src/types/bridging-tx.types.d.ts +1 -4
- package/common/src/types/cache.types.cjs +1 -1
- package/common/src/types/cache.types.d.ts +0 -1
- package/common/src/types/cache.types.mjs +1 -1
- package/common/src/types/ethereum-network.types.cjs +1 -1
- package/common/src/types/ethereum-network.types.d.ts +9 -7
- package/common/src/types/ethereum-network.types.mjs +1 -1
- package/common/src/types/external-action.types.cjs +1 -1
- package/common/src/types/external-action.types.d.ts +1 -0
- package/common/src/types/external-action.types.mjs +1 -1
- package/common/src/types/index.cjs +1 -1
- package/common/src/types/index.d.ts +1 -1
- package/common/src/types/index.mjs +1 -1
- package/common/src/types/pay-activities.types.d.ts +3 -1
- package/common/src/types/remote-tx-build.types.d.ts +23 -0
- package/common/src/types/scheduled-transactions.types.d.ts +4 -12
- package/common/src/types/solana.types.cjs +1 -0
- package/common/src/types/solana.types.d.ts +5 -0
- package/common/src/types/solana.types.mjs +6 -0
- package/common/src/types/temp-wallet.types.d.ts +9 -0
- package/common/src/types/token.types.d.ts +1 -0
- package/common/src/webworker/logError-RKYfeI6h.js +2 -0
- package/common/src/webworker/package.json +21 -19
- package/common/src/webworker/snarkjsWorker/snarkjsWorkerLauncher.ts?worker&url.cjs +1 -1
- package/common/src/webworker/snarkjsWorker/snarkjsWorkerLauncher.ts?worker&url.mjs +1 -1
- package/common/src/webworker/snarkjsWorkerNode.cjs +1 -1
- package/common/src/webworker/utxoWorker/utxoWorkerLauncher.ts?worker&url.cjs +1 -1
- package/common/src/webworker/utxoWorker/utxoWorkerLauncher.ts?worker&url.mjs +1 -1
- package/common/src/webworker/utxoWorkerNode.cjs +1 -1
- package/common/src/webworker/viteWorkerURL.constant.cjs +28 -1
- package/common/src/webworker/viteWorkerURL.constant.mjs +27 -13
- package/common/src/webworker/workerProxy-COB7g4Qc.js +1 -0
- package/common/src/webworker/zkProofWorker/zkProofWorkerLauncher.ts?worker&url.cjs +1 -1
- package/common/src/webworker/zkProofWorker/zkProofWorkerLauncher.ts?worker&url.mjs +1 -1
- package/common/src/webworker/zkProofWorkerNode.cjs +1 -1
- package/package.json +25 -23
- package/services/Hinkal.cjs +1 -1
- package/services/Hinkal.d.ts +2 -2
- package/services/Hinkal.mjs +3 -3
- package/types/IHinkal.d.ts +2 -2
- package/assets/snarkjsWorkerLauncher-SrStwJvX.js +0 -1
- package/assets/snarkjsWorkerLogic-DtIjisbE.js +0 -132
- package/assets/utxoWorkerLauncher-CIBeBAML.js +0 -1
- package/assets/utxoWorkerLogic-C8R4GSaf.js +0 -199
- package/assets/zkProofWorkerLauncher-DfwteloJ.js +0 -1
- package/assets/zkProofWorkerLogic-CY9y6rOV.js +0 -199
- package/common/src/API/deposit-and-withdraw-status-calls.cjs +0 -1
- package/common/src/API/deposit-and-withdraw-status-calls.d.ts +0 -21
- package/common/src/API/deposit-and-withdraw-status-calls.mjs +0 -13
- package/common/src/data-structures/Hinkal/hinkalTronDepositToSelf.cjs +0 -1
- package/common/src/data-structures/Hinkal/hinkalTronDepositToSelf.d.ts +0 -8
- package/common/src/data-structures/Hinkal/hinkalTronDepositToSelf.mjs +0 -30
- package/common/src/data-structures/Hinkal/prepareTronDepositToSelf.cjs +0 -1
- package/common/src/data-structures/Hinkal/prepareTronDepositToSelf.mjs +0 -31
- package/common/src/functions/pre-transaction/waitForDepositedUtxosInMerkleTree.cjs +0 -1
- package/common/src/functions/pre-transaction/waitForDepositedUtxosInMerkleTree.mjs +0 -29
- package/common/src/functions/utils/enum.utils.cjs +0 -1
- package/common/src/functions/utils/enum.utils.mjs +0 -12
- package/common/src/functions/web3/getSolanaPriorityFee.cjs +0 -1
- package/common/src/functions/web3/getSolanaPriorityFee.d.ts +0 -3
- package/common/src/functions/web3/getSolanaPriorityFee.mjs +0 -26
- package/common/src/types/scheduled-transactions.types.cjs +0 -1
- package/common/src/types/scheduled-transactions.types.mjs +0 -6
- package/common/src/webworker/logError-Dex6ch32.js +0 -2
- package/common/src/webworker/workerProxy-BuJUMCQ4.js +0 -1
|
@@ -3,56 +3,57 @@ import { addPaddingToUtxos as t } from "../../functions/web3/events/getShieldedB
|
|
|
3
3
|
import { buildOutputUtxos as n } from "../../functions/pre-transaction/outputUtxoProcessing.mjs";
|
|
4
4
|
import { buildOutCommitments as r } from "../../functions/snarkjs/common.snarkjs.mjs";
|
|
5
5
|
import { collectInputCommitments as i, finalizeSolanaTxEnclaveCall as a, finalizeSolanaTxEnclaveCallRelay as o, prepareSolanaTxEnclaveCall as s } from "../../functions/snarkjs/constructTxEnclave.mjs";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
6
|
+
import { speculativeMerkleTree as c } from "../../functions/pre-transaction/speculativeUtxo.mjs";
|
|
7
|
+
import { solanaTransactCallRelayer as l } from "../../functions/web3/functionCalls/transactCallRelayer.mjs";
|
|
8
|
+
import { constructSolanaZkProof as u } from "../../functions/snarkjs/constructSolanaZkProof.mjs";
|
|
9
|
+
import { ethers as d } from "ethers";
|
|
10
|
+
import { PublicKey as f } from "@solana/web3.js";
|
|
10
11
|
//#region libs/shared/common/src/data-structures/Hinkal/hinkalSolanaTransact.ts
|
|
11
|
-
var
|
|
12
|
+
var p = (e = []) => e.map(({ accountIndexes: e, data: t, programIndex: n }) => ({
|
|
12
13
|
accountIndexes: Buffer.from(e),
|
|
13
14
|
data: Buffer.from(t),
|
|
14
15
|
programIndex: n
|
|
15
|
-
})),
|
|
16
|
-
pubkey: new
|
|
16
|
+
})), m = (e = []) => e.map(({ pubkey: e, isSigner: t, isWritable: n }) => ({
|
|
17
|
+
pubkey: new f(e),
|
|
17
18
|
isSigner: t,
|
|
18
19
|
isWritable: n
|
|
19
|
-
})),
|
|
20
|
+
})), h = async (e, n) => {
|
|
20
21
|
let { inputUtxos: r, chainId: i, mintAddresses: a, amountChanges: o, useBlockedUtxos: s } = n;
|
|
21
22
|
return r || [...await t(e, i, a, o, void 0, void 0, s)];
|
|
22
|
-
},
|
|
23
|
+
}, g = (e, t, r) => {
|
|
23
24
|
let { amountChanges: i, recipientAddress: a, recipientAmounts: o } = e;
|
|
24
25
|
return n(t, r, i, a === void 0 ? void 0 : [a], a === void 0 ? void 0 : [o ?? []]);
|
|
25
|
-
},
|
|
26
|
-
let { chainId: i, mintAddresses: a, relayAddress: o, recipient: s, relayerFee:
|
|
26
|
+
}, _ = async (e, t, n) => {
|
|
27
|
+
let { chainId: i, mintAddresses: a, relayAddress: o, recipient: s, relayerFee: l, variableRate: f, functionName: _, hinkalInstructions: v, remainingAccounts: y, swapperAccountSalt: b, onChainCreation: x, speculative: S } = t, C = await h(e, t), w = g(t, n, C), T = e.merkleTreeHinkalByChain[i], E = S ? c(T, C, S.pendingLeaves) : T, D = {
|
|
27
28
|
tokenNumber: a.length,
|
|
28
|
-
nullifierAmount:
|
|
29
|
-
outputAmount:
|
|
30
|
-
}, { proofAArr:
|
|
29
|
+
nullifierAmount: C[0].length,
|
|
30
|
+
outputAmount: w[0].length
|
|
31
|
+
}, { proofAArr: O, proofBArr: k, proofCArr: A, publicInputsArr: j, commitmentValidationData: M, rootHashHinkalIndex: N, encryptedOutputs: P, onChainEncryptedOutput: F } = await u(E, n, a, C, w, l ?? 0n, f ?? 0n, s, o, D, x, i, p(v), m(y), b, E !== T);
|
|
31
32
|
return {
|
|
32
33
|
args: {
|
|
33
|
-
proofAArr:
|
|
34
|
-
proofBArr:
|
|
35
|
-
proofCArr:
|
|
36
|
-
publicInputsArr:
|
|
37
|
-
encryptedOutputs:
|
|
38
|
-
relayerFee: (
|
|
39
|
-
...
|
|
40
|
-
variableRate: (
|
|
41
|
-
onChainEncryptedOutput:
|
|
42
|
-
onChainCreation:
|
|
43
|
-
hinkalInstructions:
|
|
34
|
+
proofAArr: O,
|
|
35
|
+
proofBArr: k,
|
|
36
|
+
proofCArr: A,
|
|
37
|
+
publicInputsArr: j,
|
|
38
|
+
encryptedOutputs: P,
|
|
39
|
+
relayerFee: (l ?? 0n).toString(),
|
|
40
|
+
..._ === "swap" ? {
|
|
41
|
+
variableRate: (f ?? 0n).toString(),
|
|
42
|
+
onChainEncryptedOutput: F,
|
|
43
|
+
onChainCreation: x ?? [],
|
|
44
|
+
hinkalInstructions: v ?? []
|
|
44
45
|
} : {},
|
|
45
|
-
dimensions:
|
|
46
|
-
rootHashIndex:
|
|
46
|
+
dimensions: D,
|
|
47
|
+
rootHashIndex: N.toString()
|
|
47
48
|
},
|
|
48
|
-
commitmentValidationData:
|
|
49
|
+
commitmentValidationData: M,
|
|
49
50
|
notes: {
|
|
50
|
-
inputNullifiers:
|
|
51
|
-
outCommitments: r(
|
|
52
|
-
encryptedOutputs:
|
|
51
|
+
inputNullifiers: C.flat().filter((e) => e.amount > 0n).map((e) => e.getNullifier()),
|
|
52
|
+
outCommitments: r(w).flat(),
|
|
53
|
+
encryptedOutputs: P.map((e) => d.hexlify(new Uint8Array(e)))
|
|
53
54
|
}
|
|
54
55
|
};
|
|
55
|
-
},
|
|
56
|
+
}, v = async (e, t, n) => {
|
|
56
57
|
let { inputUtxos: r } = t, { jobId: a, signedMessageHash: o } = await s(e, {
|
|
57
58
|
chainId: t.chainId,
|
|
58
59
|
mintAddresses: t.mintAddresses,
|
|
@@ -74,7 +75,8 @@ var f = (e = []) => e.map(({ accountIndexes: e, data: t, programIndex: n }) => (
|
|
|
74
75
|
displayRecipient: t.displayRecipient,
|
|
75
76
|
useBlockedUtxos: t.useBlockedUtxos,
|
|
76
77
|
messageSeed: t.messageSeed,
|
|
77
|
-
inputCommitments: i(r)
|
|
78
|
+
inputCommitments: t.speculative ? void 0 : i(r),
|
|
79
|
+
speculative: t.speculative
|
|
78
80
|
}, n), { R8: c, S: l } = n.signEddsa(BigInt(o));
|
|
79
81
|
return {
|
|
80
82
|
jobId: a,
|
|
@@ -83,10 +85,10 @@ var f = (e = []) => e.map(({ accountIndexes: e, data: t, programIndex: n }) => (
|
|
|
83
85
|
S: l
|
|
84
86
|
}
|
|
85
87
|
};
|
|
86
|
-
},
|
|
88
|
+
}, y = (t, n) => {
|
|
87
89
|
let { chainId: r, relayAddress: i, functionName: a, accounts: o, submit: s } = t;
|
|
88
90
|
if (s.mode !== e.Relayer) throw Error("hinkalSolanaTransact: relayer submit expected");
|
|
89
|
-
return
|
|
91
|
+
return l({
|
|
90
92
|
chainId: r,
|
|
91
93
|
relayAddress: i,
|
|
92
94
|
functionName: a,
|
|
@@ -95,23 +97,23 @@ var f = (e = []) => e.map(({ accountIndexes: e, data: t, programIndex: n }) => (
|
|
|
95
97
|
commitmentValidationData: n.commitmentValidationData,
|
|
96
98
|
adminData: s.adminData
|
|
97
99
|
});
|
|
98
|
-
},
|
|
100
|
+
}, b = async (t, n) => {
|
|
99
101
|
if (t.submit.mode !== e.Relayer) return n;
|
|
100
|
-
let r = await
|
|
102
|
+
let r = await y(t, n);
|
|
101
103
|
return n.notes && t.onTxSubmitLocally?.(n.notes), r;
|
|
102
|
-
},
|
|
104
|
+
}, x = async (t, n) => {
|
|
103
105
|
if (n.userKeys && !n.inputUtxos) throw Error("hinkalSolanaTransact: userKeys requires explicit inputUtxos");
|
|
104
106
|
let r = n.userKeys ?? t.userKeys, { chainId: i, submit: s } = n;
|
|
105
107
|
if (t.generateProofRemotely) {
|
|
106
|
-
let { jobId: c, eddsaSignature: l } = await
|
|
108
|
+
let { jobId: c, eddsaSignature: l } = await v(t, n, r);
|
|
107
109
|
if (s.mode === e.Relayer) return o(c, l, i, { adminData: s.adminData });
|
|
108
110
|
let { solanaArgs: u, commitmentValidationData: d } = await a(c, l);
|
|
109
|
-
return
|
|
111
|
+
return b(n, {
|
|
110
112
|
args: u,
|
|
111
113
|
commitmentValidationData: d
|
|
112
114
|
});
|
|
113
115
|
}
|
|
114
|
-
return
|
|
116
|
+
return b(n, await _(t, n, r));
|
|
115
117
|
};
|
|
116
118
|
//#endregion
|
|
117
|
-
export {
|
|
119
|
+
export { x as hinkalSolanaTransact };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require(`../../constants/chains.constants.cjs`);require(`../../constants/protocol.constants.cjs`);const t=require(`../../error-handling/error-codes.constants.cjs`),n=require(`../../types/external-action.types.cjs`),r=require(`../../types/solana-transact.types.cjs`);require(`../../types/index.cjs`);const i=require(`../../functions/utils/token-check.utils.cjs`),a=require(`../../functions/pre-transaction/constructAdminData.cjs`),o=require(`../../functions/pre-transaction/calculateSolanaNullifierCount.cjs`),s=require(`../../functions/pre-transaction/getFeeStructure.cjs`);require(`../../functions/pre-transaction/index.cjs`),require(`../../constants/index.cjs`);const c=require(`../../functions/utils/fees.utils.cjs`),l=require(`./hinkalSolanaTransact.cjs`);var u=async(u,d,f,p,m,h,g)=>{let
|
|
1
|
+
const e=require(`../../constants/chains.constants.cjs`);require(`../../constants/protocol.constants.cjs`);const t=require(`../../error-handling/error-codes.constants.cjs`),n=require(`../../types/external-action.types.cjs`),r=require(`../../types/solana-transact.types.cjs`);require(`../../types/index.cjs`);const i=require(`../../functions/utils/token-check.utils.cjs`),a=require(`../../functions/pre-transaction/constructAdminData.cjs`),o=require(`../../functions/pre-transaction/calculateSolanaNullifierCount.cjs`),s=require(`../../functions/pre-transaction/getFeeStructure.cjs`);require(`../../functions/pre-transaction/index.cjs`),require(`../../constants/index.cjs`);const c=require(`../../functions/utils/fees.utils.cjs`),l=require(`./hinkalSolanaTransact.cjs`);var u=async(u,d,f,p,m,h,g,_)=>{let v=i.validateAndGetChainId(d),y=d.map(e=>e.erc20TokenAddress),b=d[0];if(!b)throw Error(`Solana Withdraw: No Token Found`);let{originalDeployer:x}=e.networkRegistry[v].contractData;if(!x)throw Error(`missing data`);let S=m??y[0],C={mintTo:y[0],recipient:p,nullifierCount:await o.calculateSolanaNullifierCount(u,v,y,f)},w=h??await s.getFeeStructure(v,S,y,n.ExternalActionId.Transact,[],g,C);h&&g!==void 0&&(w={...w,variableRate:g});let T=await c.calculateModifiedFeeStructure(v,b,-f[0],w);f[0]-=T.flatFee;let[E,D]=await Promise.all([u.getRandomRelay(v,!0),u.getEthereumAddress()]);if(!E)throw Error(t.transactionErrorCodes.RELAYER_NOT_AVAILABLE);if(y.length>1)throw Error(`Solana Withdraw: Only one mint address is supported`);let O={recipient:p,mint:y[0]===`11111111111111111111111111111111`?void 0:y[0]},k=a.constructAdminData(_,v,y,f,D);return l.hinkalSolanaTransact(u,{chainId:v,mintAddresses:y,amountChanges:f,relayAddress:E,recipient:p,signer:E,functionName:`transact`,accounts:O,relayerFee:T.flatFee,variableRate:T.variableRate,submit:{mode:r.SolanaSubmitMode.Relayer,adminData:k}})};exports.hinkalSolanaWithdraw=u;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { AdminTransactionType, FeeStructure } from '../../types';
|
|
2
2
|
import { IHinkal } from './IHinkal';
|
|
3
3
|
import { ERC20Token } from '../../types/token.types';
|
|
4
|
-
export declare const hinkalSolanaWithdraw: (hinkal: IHinkal, erc20Tokens: ERC20Token[], amountChanges: bigint[], recipientAddress: string, feeToken?: string, feeStructureOverride?: FeeStructure, action?: AdminTransactionType) => Promise<string>;
|
|
4
|
+
export declare const hinkalSolanaWithdraw: (hinkal: IHinkal, erc20Tokens: ERC20Token[], amountChanges: bigint[], recipientAddress: string, feeToken?: string, feeStructureOverride?: FeeStructure, variableRateOverride?: bigint, action?: AdminTransactionType) => Promise<string>;
|
|
@@ -13,38 +13,43 @@ import "../../constants/index.mjs";
|
|
|
13
13
|
import { calculateModifiedFeeStructure as c } from "../../functions/utils/fees.utils.mjs";
|
|
14
14
|
import { hinkalSolanaTransact as l } from "./hinkalSolanaTransact.mjs";
|
|
15
15
|
//#region libs/shared/common/src/data-structures/Hinkal/hinkalSolanaWithdraw.ts
|
|
16
|
-
var u = async (u, d, f, p, m, h, g) => {
|
|
17
|
-
let
|
|
18
|
-
if (!
|
|
19
|
-
let { originalDeployer:
|
|
20
|
-
if (!
|
|
21
|
-
let
|
|
22
|
-
mintTo:
|
|
16
|
+
var u = async (u, d, f, p, m, h, g, _) => {
|
|
17
|
+
let v = i(d), y = d.map((e) => e.erc20TokenAddress), b = d[0];
|
|
18
|
+
if (!b) throw Error("Solana Withdraw: No Token Found");
|
|
19
|
+
let { originalDeployer: x } = e[v].contractData;
|
|
20
|
+
if (!x) throw Error("missing data");
|
|
21
|
+
let S = m ?? y[0], C = {
|
|
22
|
+
mintTo: y[0],
|
|
23
23
|
recipient: p,
|
|
24
|
-
nullifierCount: await o(u,
|
|
25
|
-
},
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
let
|
|
24
|
+
nullifierCount: await o(u, v, y, f)
|
|
25
|
+
}, w = h ?? await s(v, S, y, n.Transact, [], g, C);
|
|
26
|
+
h && g !== void 0 && (w = {
|
|
27
|
+
...w,
|
|
28
|
+
variableRate: g
|
|
29
|
+
});
|
|
30
|
+
let T = await c(v, b, -f[0], w);
|
|
31
|
+
f[0] -= T.flatFee;
|
|
32
|
+
let [E, D] = await Promise.all([u.getRandomRelay(v, !0), u.getEthereumAddress()]);
|
|
33
|
+
if (!E) throw Error(t.RELAYER_NOT_AVAILABLE);
|
|
34
|
+
if (y.length > 1) throw Error("Solana Withdraw: Only one mint address is supported");
|
|
35
|
+
let O = {
|
|
31
36
|
recipient: p,
|
|
32
|
-
mint:
|
|
33
|
-
},
|
|
37
|
+
mint: y[0] === "11111111111111111111111111111111" ? void 0 : y[0]
|
|
38
|
+
}, k = a(_, v, y, f, D);
|
|
34
39
|
return l(u, {
|
|
35
|
-
chainId:
|
|
36
|
-
mintAddresses:
|
|
40
|
+
chainId: v,
|
|
41
|
+
mintAddresses: y,
|
|
37
42
|
amountChanges: f,
|
|
38
|
-
relayAddress:
|
|
43
|
+
relayAddress: E,
|
|
39
44
|
recipient: p,
|
|
40
|
-
signer:
|
|
45
|
+
signer: E,
|
|
41
46
|
functionName: "transact",
|
|
42
|
-
accounts:
|
|
43
|
-
relayerFee:
|
|
44
|
-
variableRate:
|
|
47
|
+
accounts: O,
|
|
48
|
+
relayerFee: T.flatFee,
|
|
49
|
+
variableRate: T.variableRate,
|
|
45
50
|
submit: {
|
|
46
51
|
mode: r.Relayer,
|
|
47
|
-
adminData:
|
|
52
|
+
adminData: k
|
|
48
53
|
}
|
|
49
54
|
});
|
|
50
55
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
require(`../../constants/protocol.constants.cjs`);const e=require(`../../error-handling/error-codes.constants.cjs`),t=require(`../../types/transact.types.cjs`),n=require(`../../functions/utils/token-check.utils.cjs`),r=require(`../../functions/pre-transaction/constructAdminData.cjs`),
|
|
1
|
+
require(`../../constants/protocol.constants.cjs`);const e=require(`../../error-handling/error-codes.constants.cjs`),t=require(`../../types/transact.types.cjs`),n=require(`../../functions/utils/token-check.utils.cjs`),r=require(`../../functions/snarkjs/common.snarkjs.cjs`),i=require(`../../functions/pre-transaction/constructAdminData.cjs`),a=require(`../../functions/pre-transaction/getFeeStructure.cjs`),o=require(`../../functions/pre-transaction/getExternalSwapAddress.cjs`);require(`../../functions/pre-transaction/index.cjs`);const s=require(`./hinkalTransact.cjs`),c=require(`../../constants/bridging.constants.cjs`),l=require(`../../functions/pre-transaction/merge-with-fee-structure.cjs`);var u=async(u,d,f,p,m,h,g,_=c.DEFAULT_BRIDGING_SLIPPAGE,v)=>{let y=n.validateAndGetChainId(d),b=d.map(e=>e.erc20TokenAddress),x=await u.getEthereumAddressByChain(y),S=g??await a.getFeeStructure(y,h,b,p,void 0,35n);await l.mergeWithFeeStructure(y,b,f,S);let C=o.getExternalSwapAddress(y,p),w=[!1,!0,!1].slice(0,f.length),T=await u.getRandomRelay(y,!0);if(!T)throw Error(e.transactionErrorCodes.RELAYER_NOT_AVAILABLE);let E=i.constructAdminData(v,y,b,f,x,d),D=r.buildSwapSlippageValues(f,_);return f.length>1&&(f[1]=0n),s.hinkalTransact(u,{chainId:y,erc20Addresses:b,amountChanges:f,externalAddress:C,externalActionId:p,externalActionMetadata:m,onChainCreation:w,feeStructure:S,relay:T,slippageValues:D,submit:{mode:t.SubmitMode.Relayer,adminData:E}})};exports.hinkalSwap=u;
|
|
@@ -4,4 +4,4 @@ import { FeeStructure } from '../../types/hinkal.types';
|
|
|
4
4
|
import { ERC20Token } from '../../types/token.types';
|
|
5
5
|
import { AdminTransactionType } from '../../types/admin.types';
|
|
6
6
|
export declare const hinkalSwap: (hinkal: IHinkal, erc20tokens: ERC20Token[], deltaAmounts: bigint[], externalActionId: ExternalActionId, data: string, // call data used to call the router contracts.
|
|
7
|
-
feeToken?: string, feeStructureOverride?: FeeStructure, action?: AdminTransactionType) => Promise<string>;
|
|
7
|
+
feeToken?: string, feeStructureOverride?: FeeStructure, slippagePercentage?: number, action?: AdminTransactionType) => Promise<string>;
|
|
@@ -2,38 +2,41 @@ import "../../constants/protocol.constants.mjs";
|
|
|
2
2
|
import { transactionErrorCodes as e } from "../../error-handling/error-codes.constants.mjs";
|
|
3
3
|
import { SubmitMode as t } from "../../types/transact.types.mjs";
|
|
4
4
|
import { validateAndGetChainId as n } from "../../functions/utils/token-check.utils.mjs";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
5
|
+
import { buildSwapSlippageValues as r } from "../../functions/snarkjs/common.snarkjs.mjs";
|
|
6
|
+
import { constructAdminData as i } from "../../functions/pre-transaction/constructAdminData.mjs";
|
|
7
|
+
import { getFeeStructure as a } from "../../functions/pre-transaction/getFeeStructure.mjs";
|
|
8
|
+
import { getExternalSwapAddress as o } from "../../functions/pre-transaction/getExternalSwapAddress.mjs";
|
|
8
9
|
import "../../functions/pre-transaction/index.mjs";
|
|
9
|
-
import { hinkalTransact as
|
|
10
|
-
import {
|
|
10
|
+
import { hinkalTransact as s } from "./hinkalTransact.mjs";
|
|
11
|
+
import { DEFAULT_BRIDGING_SLIPPAGE as c } from "../../constants/bridging.constants.mjs";
|
|
12
|
+
import { mergeWithFeeStructure as l } from "../../functions/pre-transaction/merge-with-fee-structure.mjs";
|
|
11
13
|
//#region libs/shared/common/src/data-structures/Hinkal/hinkalSwap.ts
|
|
12
|
-
var
|
|
13
|
-
let
|
|
14
|
-
await
|
|
15
|
-
let
|
|
14
|
+
var u = async (u, d, f, p, m, h, g, _ = c, v) => {
|
|
15
|
+
let y = n(d), b = d.map((e) => e.erc20TokenAddress), x = await u.getEthereumAddressByChain(y), S = g ?? await a(y, h, b, p, void 0, 35n);
|
|
16
|
+
await l(y, b, f, S);
|
|
17
|
+
let C = o(y, p), w = [
|
|
16
18
|
!1,
|
|
17
19
|
!0,
|
|
18
20
|
!1
|
|
19
|
-
].slice(0,
|
|
20
|
-
if (!
|
|
21
|
-
let
|
|
22
|
-
return
|
|
23
|
-
chainId:
|
|
24
|
-
erc20Addresses:
|
|
25
|
-
amountChanges:
|
|
26
|
-
externalAddress:
|
|
27
|
-
externalActionId:
|
|
28
|
-
externalActionMetadata:
|
|
29
|
-
onChainCreation:
|
|
30
|
-
feeStructure:
|
|
31
|
-
relay:
|
|
21
|
+
].slice(0, f.length), T = await u.getRandomRelay(y, !0);
|
|
22
|
+
if (!T) throw Error(e.RELAYER_NOT_AVAILABLE);
|
|
23
|
+
let E = i(v, y, b, f, x, d), D = r(f, _);
|
|
24
|
+
return f.length > 1 && (f[1] = 0n), s(u, {
|
|
25
|
+
chainId: y,
|
|
26
|
+
erc20Addresses: b,
|
|
27
|
+
amountChanges: f,
|
|
28
|
+
externalAddress: C,
|
|
29
|
+
externalActionId: p,
|
|
30
|
+
externalActionMetadata: m,
|
|
31
|
+
onChainCreation: w,
|
|
32
|
+
feeStructure: S,
|
|
33
|
+
relay: T,
|
|
34
|
+
slippageValues: D,
|
|
32
35
|
submit: {
|
|
33
36
|
mode: t.Relayer,
|
|
34
|
-
adminData:
|
|
37
|
+
adminData: E
|
|
35
38
|
}
|
|
36
39
|
});
|
|
37
40
|
};
|
|
38
41
|
//#endregion
|
|
39
|
-
export {
|
|
42
|
+
export { u as hinkalSwap };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require(`../../constants/
|
|
1
|
+
const e=require(`../../constants/chains.constants.cjs`),t=require(`../../constants/protocol.constants.cjs`),n=require(`../../types/hinkal.types.cjs`),r=require(`../utxo/Utxo.cjs`),i=require(`../../types/transact.types.cjs`),a=require(`../../functions/web3/events/getShieldedBalance.cjs`),o=require(`../../functions/pre-transaction/outputUtxoProcessing.cjs`),s=require(`../../functions/snarkjs/common.snarkjs.cjs`),c=require(`../../functions/snarkjs/constructTxEnclave.cjs`),l=require(`../../functions/pre-transaction/speculativeUtxo.cjs`),u=require(`../../functions/snarkjs/constructGeneralZkProof.cjs`),d=require(`../../functions/web3/functionCalls/submitProof.cjs`);var f=2,p=6,m=(e,t)=>{let n=Math.max(...t.map(e=>e.length))<=f?f:p;return t.map(t=>{let i=t[0];if(!i)throw Error(`hinkalTransact: inputUtxos must contain at least one note per token`);let a=[...t];for(;a.length<n;)a.push(new r.Utxo({amount:0n,erc20TokenAddress:i.erc20TokenAddress,mintAddress:i.mintAddress,nullifyingKey:e.getShieldedPrivateKey(),spendingPublicKey:e.getSpendingKeyPair().pubSpendingBJJPoint}));return a})},h=(e,t,n)=>{if(t.length!==1||t[0].length!==1)throw Error(`selfOutputAmounts only supports a single token with a single self-output`);let i=t[0][0],a=n.reduce((e,t)=>e+t,0n);if(a!==i.amount)throw Error(`selfOutputAmounts sum to ${a}, expected ${i.amount}`);return[n.map(t=>new r.Utxo({amount:t,erc20TokenAddress:i.erc20TokenAddress,mintAddress:i.mintAddress,nullifyingKey:e.getShieldedPrivateKey(),timeStamp:i.timeStamp,spendingPublicKey:e.getSpendingKeyPair().pubSpendingBJJPoint}))]},g=async(e,r,i)=>{let{chainId:s,erc20Addresses:c,amountChanges:d,externalAddress:f,externalActionId:p,externalActionMetadata:g,feeStructure:_,relay:v,onChainCreation:y,recipientAddress:b,recipientAmounts:x,useBlockedUtxos:S,inputUtxos:C,forceEmptyUtxos:w,originalSender:T,subAccountPrivateKey:E,emporiumOps:D,createBlockedUtxos:O,selfOutputAmounts:k,speculative:A,slippageValues:j}=r,M=C?m(i,C):[...await a.addPaddingToUtxos(e,s,c,d,void 0,w,S)],N=o.buildOutputUtxos(i,M,d,b,x),P=k?h(i,N,k):N,F=e.merkleTreeHinkalByChain[s],I=A?l.speculativeMerkleTree(F,M,A.pendingLeaves):F,{zkCallData:L,circomData:R,dimData:z,commitmentValidationData:B}=await u.constructZkProof(I,M,P,i,p??0n,f,D??g??`0x00`,_??n.zeroFeeStructure,v??t.zeroAddress,s,y,void 0,T,E,void 0,O,I!==F,j);return{zkCallData:L,circomData:R,dimData:z,commitmentValidationData:B}},_=async(t,n,r)=>{let{chainId:i,erc20Addresses:a,externalAddress:o,amountChanges:s,relay:l,feeStructure:u,externalActionId:d,externalActionMetadata:f,onChainCreation:p,recipientAddress:m,recipientAmounts:h,useBlockedUtxos:g,createBlockedUtxos:_,skipLock:v,selfOutputAmounts:y,forceEmptyUtxos:b,messageSeed:x,inputUtxos:S,originalSender:C,speculative:w,slippageValues:T}=n,{jobId:E,signedMessageHash:D}=await c.prepareTxEnclaveCall(t,{chainId:i,hinkalAddress:e.networkRegistry[i].contractData.hinkalAddress,erc20Addresses:a,externalAddress:o,originalSender:C,amountChanges:s,relay:l,feeStructure:u,externalActionId:d,externalActionMetadata:f,onChainCreation:p,recipientAddress:m,recipientAmounts:h,useBlockedUtxos:g,createBlockedUtxos:_,skipLock:v,selfOutputAmounts:y,forceEmptyUtxos:b,messageSeed:x,inputCommitments:w?void 0:c.collectInputCommitments(S),speculative:w,slippageValues:T},r),{R8:O,S:k}=r.signEddsa(BigInt(D));return{jobId:E,eddsaSignature:{R8:O,S:k}}},v=async(e,t,n)=>{let r=await d.submitProof(e,t,n);return t.submit.mode!==i.SubmitMode.ProofOnly&&t.onTxSubmitLocally?.(n.circomData),r},y=async(e,t)=>{if(t.userKeys&&!t.inputUtxos)throw Error(`hinkalTransact: userKeys requires explicit inputUtxos`);let n=t.userKeys??e.userKeys,{chainId:r,submit:a}=t;if(e.generateProofRemotely){let{jobId:o,eddsaSignature:l}=await _(e,t,n);if(a.mode===i.SubmitMode.Relayer)return c.finalizeTxEnclaveCallRelay(o,l,r,{adminData:a.adminData,authorizationData:a.authorizationData,withUniswapWorkAround:a.withUniswapWorkAround});let{zkCallData:u,circomData:d,dimData:f,commitmentValidationData:p,tronProofSignature:m}=await c.finalizeTxEnclaveCall(o,l);return v(e,t,{zkCallData:u,circomData:s.deserializeCircomData(d),dimData:f,commitmentValidationData:p,tronProofSignature:m})}return v(e,t,await g(e,t,n))};exports.hinkalTransact=y;
|
|
@@ -1,21 +1,23 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
1
|
+
import { networkRegistry as e } from "../../constants/chains.constants.mjs";
|
|
2
|
+
import { zeroAddress as t } from "../../constants/protocol.constants.mjs";
|
|
3
|
+
import { zeroFeeStructure as n } from "../../types/hinkal.types.mjs";
|
|
4
|
+
import { Utxo as r } from "../utxo/Utxo.mjs";
|
|
5
|
+
import { SubmitMode as i } from "../../types/transact.types.mjs";
|
|
6
|
+
import { addPaddingToUtxos as a } from "../../functions/web3/events/getShieldedBalance.mjs";
|
|
7
|
+
import { buildOutputUtxos as o } from "../../functions/pre-transaction/outputUtxoProcessing.mjs";
|
|
8
|
+
import { deserializeCircomData as s } from "../../functions/snarkjs/common.snarkjs.mjs";
|
|
9
|
+
import { collectInputCommitments as c, finalizeTxEnclaveCall as l, finalizeTxEnclaveCallRelay as u, prepareTxEnclaveCall as d } from "../../functions/snarkjs/constructTxEnclave.mjs";
|
|
10
|
+
import { speculativeMerkleTree as f } from "../../functions/pre-transaction/speculativeUtxo.mjs";
|
|
11
|
+
import { constructZkProof as p } from "../../functions/snarkjs/constructGeneralZkProof.mjs";
|
|
12
|
+
import { submitProof as m } from "../../functions/web3/functionCalls/submitProof.mjs";
|
|
11
13
|
//#region libs/shared/common/src/data-structures/Hinkal/hinkalTransact.ts
|
|
12
|
-
var
|
|
13
|
-
let
|
|
14
|
+
var h = 2, g = 6, _ = (e, t) => {
|
|
15
|
+
let n = Math.max(...t.map((e) => e.length)) <= h ? h : g;
|
|
14
16
|
return t.map((t) => {
|
|
15
17
|
let i = t[0];
|
|
16
18
|
if (!i) throw Error("hinkalTransact: inputUtxos must contain at least one note per token");
|
|
17
19
|
let a = [...t];
|
|
18
|
-
for (; a.length <
|
|
20
|
+
for (; a.length < n;) a.push(new r({
|
|
19
21
|
amount: 0n,
|
|
20
22
|
erc20TokenAddress: i.erc20TokenAddress,
|
|
21
23
|
mintAddress: i.mintAddress,
|
|
@@ -24,66 +26,81 @@ var p = 2, m = 6, h = (e, t) => {
|
|
|
24
26
|
}));
|
|
25
27
|
return a;
|
|
26
28
|
});
|
|
27
|
-
},
|
|
28
|
-
|
|
29
|
+
}, v = (e, t, n) => {
|
|
30
|
+
if (t.length !== 1 || t[0].length !== 1) throw Error("selfOutputAmounts only supports a single token with a single self-output");
|
|
31
|
+
let i = t[0][0], a = n.reduce((e, t) => e + t, 0n);
|
|
32
|
+
if (a !== i.amount) throw Error(`selfOutputAmounts sum to ${a}, expected ${i.amount}`);
|
|
33
|
+
return [n.map((t) => new r({
|
|
34
|
+
amount: t,
|
|
35
|
+
erc20TokenAddress: i.erc20TokenAddress,
|
|
36
|
+
mintAddress: i.mintAddress,
|
|
37
|
+
nullifyingKey: e.getShieldedPrivateKey(),
|
|
38
|
+
timeStamp: i.timeStamp,
|
|
39
|
+
spendingPublicKey: e.getSpendingKeyPair().pubSpendingBJJPoint
|
|
40
|
+
}))];
|
|
41
|
+
}, y = async (e, r, i) => {
|
|
42
|
+
let { chainId: s, erc20Addresses: c, amountChanges: l, externalAddress: u, externalActionId: d, externalActionMetadata: m, feeStructure: h, relay: g, onChainCreation: y, recipientAddress: b, recipientAmounts: x, useBlockedUtxos: S, inputUtxos: C, forceEmptyUtxos: w, originalSender: T, subAccountPrivateKey: E, emporiumOps: D, createBlockedUtxos: O, selfOutputAmounts: k, speculative: A, slippageValues: j } = r, M = C ? _(i, C) : [...await a(e, s, c, l, void 0, w, S)], N = o(i, M, l, b, x), P = k ? v(i, N, k) : N, F = e.merkleTreeHinkalByChain[s], I = A ? f(F, M, A.pendingLeaves) : F, { zkCallData: L, circomData: R, dimData: z, commitmentValidationData: B } = await p(I, M, P, i, d ?? 0n, u, D ?? m ?? "0x00", h ?? n, g ?? t, s, y, void 0, T, E, void 0, O, I !== F, j);
|
|
29
43
|
return {
|
|
30
|
-
zkCallData:
|
|
31
|
-
circomData:
|
|
32
|
-
dimData:
|
|
33
|
-
commitmentValidationData:
|
|
44
|
+
zkCallData: L,
|
|
45
|
+
circomData: R,
|
|
46
|
+
dimData: z,
|
|
47
|
+
commitmentValidationData: B
|
|
34
48
|
};
|
|
35
|
-
},
|
|
36
|
-
let { chainId:
|
|
37
|
-
chainId:
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
49
|
+
}, b = async (t, n, r) => {
|
|
50
|
+
let { chainId: i, erc20Addresses: a, externalAddress: o, amountChanges: s, relay: l, feeStructure: u, externalActionId: f, externalActionMetadata: p, onChainCreation: m, recipientAddress: h, recipientAmounts: g, useBlockedUtxos: _, createBlockedUtxos: v, skipLock: y, selfOutputAmounts: b, forceEmptyUtxos: x, messageSeed: S, inputUtxos: C, originalSender: w, speculative: T, slippageValues: E } = n, { jobId: D, signedMessageHash: O } = await d(t, {
|
|
51
|
+
chainId: i,
|
|
52
|
+
hinkalAddress: e[i].contractData.hinkalAddress,
|
|
53
|
+
erc20Addresses: a,
|
|
54
|
+
externalAddress: o,
|
|
55
|
+
originalSender: w,
|
|
56
|
+
amountChanges: s,
|
|
57
|
+
relay: l,
|
|
58
|
+
feeStructure: u,
|
|
59
|
+
externalActionId: f,
|
|
60
|
+
externalActionMetadata: p,
|
|
61
|
+
onChainCreation: m,
|
|
62
|
+
recipientAddress: h,
|
|
63
|
+
recipientAmounts: g,
|
|
64
|
+
useBlockedUtxos: _,
|
|
65
|
+
createBlockedUtxos: v,
|
|
66
|
+
skipLock: y,
|
|
67
|
+
selfOutputAmounts: b,
|
|
68
|
+
forceEmptyUtxos: x,
|
|
69
|
+
messageSeed: S,
|
|
70
|
+
inputCommitments: T ? void 0 : c(C),
|
|
71
|
+
speculative: T,
|
|
72
|
+
slippageValues: E
|
|
73
|
+
}, r), { R8: k, S: A } = r.signEddsa(BigInt(O));
|
|
57
74
|
return {
|
|
58
|
-
jobId:
|
|
75
|
+
jobId: D,
|
|
59
76
|
eddsaSignature: {
|
|
60
|
-
R8:
|
|
61
|
-
S:
|
|
77
|
+
R8: k,
|
|
78
|
+
S: A
|
|
62
79
|
}
|
|
63
80
|
};
|
|
64
|
-
},
|
|
65
|
-
let
|
|
66
|
-
return t.submit.mode !==
|
|
67
|
-
},
|
|
81
|
+
}, x = async (e, t, n) => {
|
|
82
|
+
let r = await m(e, t, n);
|
|
83
|
+
return t.submit.mode !== i.ProofOnly && t.onTxSubmitLocally?.(n.circomData), r;
|
|
84
|
+
}, S = async (e, t) => {
|
|
68
85
|
if (t.userKeys && !t.inputUtxos) throw Error("hinkalTransact: userKeys requires explicit inputUtxos");
|
|
69
|
-
let n = t.userKeys ?? e.userKeys, { chainId:
|
|
86
|
+
let n = t.userKeys ?? e.userKeys, { chainId: r, submit: a } = t;
|
|
70
87
|
if (e.generateProofRemotely) {
|
|
71
|
-
let { jobId:
|
|
72
|
-
if (a.mode ===
|
|
88
|
+
let { jobId: o, eddsaSignature: c } = await b(e, t, n);
|
|
89
|
+
if (a.mode === i.Relayer) return u(o, c, r, {
|
|
73
90
|
adminData: a.adminData,
|
|
74
91
|
authorizationData: a.authorizationData,
|
|
75
92
|
withUniswapWorkAround: a.withUniswapWorkAround
|
|
76
93
|
});
|
|
77
|
-
let { zkCallData: d, circomData: f, dimData: p, commitmentValidationData: m, tronProofSignature: h } = await
|
|
78
|
-
return
|
|
94
|
+
let { zkCallData: d, circomData: f, dimData: p, commitmentValidationData: m, tronProofSignature: h } = await l(o, c);
|
|
95
|
+
return x(e, t, {
|
|
79
96
|
zkCallData: d,
|
|
80
|
-
circomData:
|
|
97
|
+
circomData: s(f),
|
|
81
98
|
dimData: p,
|
|
82
99
|
commitmentValidationData: m,
|
|
83
100
|
tronProofSignature: h
|
|
84
101
|
});
|
|
85
102
|
}
|
|
86
|
-
return
|
|
103
|
+
return x(e, t, await y(e, t, n));
|
|
87
104
|
};
|
|
88
105
|
//#endregion
|
|
89
|
-
export {
|
|
106
|
+
export { S as hinkalTransact };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require(`../../error-handling/error-codes.constants.cjs`),t=require(`../../functions/utils/tron.utils.cjs`),n=require(`../../types/external-action.types.cjs`),r=require(`../../types/transact.types.cjs`),i=require(`../../functions/utils/token-check.utils.cjs`),a=require(`../../functions/pre-transaction/getVolatileTransferAmount.cjs`),o=require(`../../functions/pre-transaction/constructAdminData.cjs`),s=require(`../../functions/pre-transaction/getFeeStructure.cjs`);require(`../../functions/pre-transaction/index.cjs`);const c=require(`./hinkalTransact.cjs`),l=require(`../../functions/pre-transaction/merge-with-fee-structure.cjs`);var u=async(u,d,f,p,m,h,g,_)=>{let
|
|
1
|
+
const e=require(`../../error-handling/error-codes.constants.cjs`),t=require(`../../functions/utils/tron.utils.cjs`),n=require(`../../types/external-action.types.cjs`),r=require(`../../types/transact.types.cjs`),i=require(`../../functions/utils/token-check.utils.cjs`),a=require(`../../functions/pre-transaction/getVolatileTransferAmount.cjs`),o=require(`../../functions/pre-transaction/constructAdminData.cjs`),s=require(`../../functions/pre-transaction/getFeeStructure.cjs`);require(`../../functions/pre-transaction/index.cjs`);const c=require(`./hinkalTransact.cjs`),l=require(`../../functions/pre-transaction/merge-with-fee-structure.cjs`);var u=async(u,d,f,p,m,h,g,_,v)=>{let y=i.validateAndGetChainId(d),b=t.addressToHexFormat(await u.getEthereumAddressByChain(y)),x=d.map(e=>e.erc20TokenAddress),S=await a.modifyVolatileTokenAmountChanges(y,d,f),C=d[0];if(!C)throw Error(`Withdraw Action: No Token Found`);let w;m||(w=g??await s.getFeeStructure(y,h,x,n.ExternalActionId.Transact,[],_),g&&_!==void 0&&(w={...w,variableRate:_}),await l.mergeWithFeeStructure(y,x,S,w));let T=m?void 0:await u.getRandomRelay(y,!0);if(!m&&!T)throw Error(e.transactionErrorCodes.RELAYER_NOT_AVAILABLE);let E=m?{mode:r.SubmitMode.Self,erc20Tokens:[C],approvalAmounts:[S[0]]}:{mode:r.SubmitMode.Relayer,adminData:o.constructAdminData(v,y,x,S,b)};return c.hinkalTransact(u,{chainId:y,erc20Addresses:x,amountChanges:S,externalAddress:t.addressToHexFormat(p),feeStructure:w,relay:T,originalSender:m?b:void 0,submit:E})};exports.hinkalWithdraw=u;
|
|
@@ -4,4 +4,4 @@ import { AdminTransactionType, ERC20Token } from '../../types';
|
|
|
4
4
|
import { ethers } from 'ethers';
|
|
5
5
|
export declare const hinkalWithdraw: (hinkal: IHinkal, erc20Tokens: ERC20Token[], deltaAmountsBase: bigint[], // should differentiate now: amountChanges is about off-chain utxos
|
|
6
6
|
recipientAddress: string, // for Tron this address may be passed as base58
|
|
7
|
-
isRelayerOff: boolean, feeToken?: string, feeStructureOverride?: FeeStructure, action?: AdminTransactionType) => Promise<ethers.TransactionResponse | string>;
|
|
7
|
+
isRelayerOff: boolean, feeToken?: string, feeStructureOverride?: FeeStructure, variableRateOverride?: bigint, action?: AdminTransactionType) => Promise<ethers.TransactionResponse | string>;
|
|
@@ -10,30 +10,33 @@ import "../../functions/pre-transaction/index.mjs";
|
|
|
10
10
|
import { hinkalTransact as c } from "./hinkalTransact.mjs";
|
|
11
11
|
import { mergeWithFeeStructure as l } from "../../functions/pre-transaction/merge-with-fee-structure.mjs";
|
|
12
12
|
//#region libs/shared/common/src/data-structures/Hinkal/hinkalWithdraw.ts
|
|
13
|
-
var u = async (u, d, f, p, m, h, g, _) => {
|
|
14
|
-
let
|
|
15
|
-
if (!
|
|
16
|
-
let
|
|
17
|
-
m || (
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
13
|
+
var u = async (u, d, f, p, m, h, g, _, v) => {
|
|
14
|
+
let y = i(d), b = t(await u.getEthereumAddressByChain(y)), x = d.map((e) => e.erc20TokenAddress), S = await a(y, d, f), C = d[0];
|
|
15
|
+
if (!C) throw Error("Withdraw Action: No Token Found");
|
|
16
|
+
let w;
|
|
17
|
+
m || (w = g ?? await s(y, h, x, n.Transact, [], _), g && _ !== void 0 && (w = {
|
|
18
|
+
...w,
|
|
19
|
+
variableRate: _
|
|
20
|
+
}), await l(y, x, S, w));
|
|
21
|
+
let T = m ? void 0 : await u.getRandomRelay(y, !0);
|
|
22
|
+
if (!m && !T) throw Error(e.RELAYER_NOT_AVAILABLE);
|
|
23
|
+
let E = m ? {
|
|
21
24
|
mode: r.Self,
|
|
22
|
-
erc20Tokens: [
|
|
23
|
-
approvalAmounts: [
|
|
25
|
+
erc20Tokens: [C],
|
|
26
|
+
approvalAmounts: [S[0]]
|
|
24
27
|
} : {
|
|
25
28
|
mode: r.Relayer,
|
|
26
|
-
adminData: o(
|
|
29
|
+
adminData: o(v, y, x, S, b)
|
|
27
30
|
};
|
|
28
31
|
return c(u, {
|
|
29
|
-
chainId:
|
|
30
|
-
erc20Addresses:
|
|
31
|
-
amountChanges:
|
|
32
|
+
chainId: y,
|
|
33
|
+
erc20Addresses: x,
|
|
34
|
+
amountChanges: S,
|
|
32
35
|
externalAddress: t(p),
|
|
33
|
-
feeStructure:
|
|
34
|
-
relay:
|
|
35
|
-
originalSender: m ?
|
|
36
|
-
submit:
|
|
36
|
+
feeStructure: w,
|
|
37
|
+
relay: T,
|
|
38
|
+
originalSender: m ? b : void 0,
|
|
39
|
+
submit: E
|
|
37
40
|
});
|
|
38
41
|
};
|
|
39
42
|
//#endregion
|