@kapa123456789/sdk 0.0.8 → 0.0.9
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/copyPackageJson.d.ts +1 -0
- package/copyPackageJson.js +82 -0
- package/eslint.config.mjs +17 -0
- package/handleCDNWorkers.d.ts +1 -0
- package/handleCDNWorkers.js +88 -0
- package/jest.config.ts +10 -0
- package/package.json +1 -1
- package/project.json +35 -0
- package/src/functions/integrations/swapApi.ts +19 -0
- package/src/functions/utils/getErc20Token.ts +13 -0
- package/src/functions/utils/getFeeStructure.ts +1 -0
- package/src/functions/utils/preProcessing.ts +1 -0
- package/src/functions/utils/refreshBalance.ts +6 -0
- package/src/providers/EthersProviderAdapter.ts +4 -0
- package/src/providers/SolanaProviderAdapter.ts +3 -0
- package/src/providers/TronProviderAdapter.ts +3 -0
- package/src/providers/WagmiProviderAdapter.ts +4 -0
- package/src/providers/prepareEthersHinkal.ts +17 -0
- package/src/providers/prepareSolanaHinkal.ts +23 -0
- package/src/providers/prepareTronHinkal.ts +17 -0
- package/src/providers/prepareWagmiHinkal.ts +16 -0
- package/src/services/Hinkal.ts +372 -0
- package/src/types/IHinkal.ts +193 -0
- package/src/types/IProviderAdapter.ts +1 -0
- package/src/types/balances.types.ts +6 -0
- package/src/types/external-action.types.ts +1 -0
- package/src/types/fee.types.ts +1 -0
- package/src/types/privateTypes.ts +8 -0
- package/src/types/token.types.ts +1 -0
- package/tsconfig.json +23 -0
- package/tsconfig.lib.json +10 -0
- package/tsconfig.spec.json +14 -0
- package/vite.config.ts +141 -0
- package/vite.config.workers.node.ts +44 -0
- package/vite.config.workers.ts +45 -0
- package/_virtual/_rolldown/runtime.cjs +0 -1
- package/_virtual/_rolldown/runtime.mjs +0 -7
- package/common/src/API/API.cjs +0 -1
- package/common/src/API/API.d.ts +0 -135
- package/common/src/API/API.mjs +0 -137
- 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/admin-calls.cjs +0 -1
- package/common/src/API/admin-calls.d.ts +0 -9
- package/common/src/API/admin-calls.mjs +0 -8
- 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/callLifiAPI.cjs +0 -1
- package/common/src/API/callLifiAPI.d.ts +0 -33
- package/common/src/API/callLifiAPI.mjs +0 -8
- package/common/src/API/callMonitor.cjs +0 -1
- package/common/src/API/callMonitor.d.ts +0 -9
- package/common/src/API/callMonitor.mjs +0 -8
- 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/callOkxAPI.cjs +0 -1
- package/common/src/API/callOkxAPI.d.ts +0 -10
- package/common/src/API/callOkxAPI.mjs +0 -10
- 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/callRelayer.cjs +0 -1
- package/common/src/API/callRelayer.d.ts +0 -41
- package/common/src/API/callRelayer.mjs +0 -16
- package/common/src/API/checkRisk.cjs +0 -1
- package/common/src/API/checkRisk.d.ts +0 -1
- package/common/src/API/checkRisk.mjs +0 -3
- package/common/src/API/dashboardAccountCalls.cjs +0 -1
- package/common/src/API/dashboardAccountCalls.d.ts +0 -24
- package/common/src/API/dashboardAccountCalls.mjs +0 -10
- package/common/src/API/dashboardAccountMemberCalls.cjs +0 -1
- package/common/src/API/dashboardAccountMemberCalls.d.ts +0 -34
- package/common/src/API/dashboardAccountMemberCalls.mjs +0 -16
- package/common/src/API/dashboardBalanceCalls.cjs +0 -1
- package/common/src/API/dashboardBalanceCalls.d.ts +0 -12
- package/common/src/API/dashboardBalanceCalls.mjs +0 -13
- package/common/src/API/dashboardContactCalls.cjs +0 -1
- package/common/src/API/dashboardContactCalls.d.ts +0 -9
- package/common/src/API/dashboardContactCalls.mjs +0 -13
- package/common/src/API/dashboardPayoutCalls.cjs +0 -1
- package/common/src/API/dashboardPayoutCalls.d.ts +0 -14
- package/common/src/API/dashboardPayoutCalls.mjs +0 -13
- package/common/src/API/dashboardTransactionCalls.cjs +0 -1
- package/common/src/API/dashboardTransactionCalls.d.ts +0 -3
- package/common/src/API/dashboardTransactionCalls.mjs +0 -10
- 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/enclaveRecipientInfoCalls.cjs +0 -1
- package/common/src/API/enclaveRecipientInfoCalls.d.ts +0 -12
- package/common/src/API/enclaveRecipientInfoCalls.mjs +0 -2
- package/common/src/API/enclaveSignatureCalls.cjs +0 -1
- package/common/src/API/enclaveSignatureCalls.d.ts +0 -10
- package/common/src/API/enclaveSignatureCalls.mjs +0 -15
- package/common/src/API/enclaveUtxoCalls.cjs +0 -1
- package/common/src/API/enclaveUtxoCalls.d.ts +0 -40
- package/common/src/API/enclaveUtxoCalls.mjs +0 -24
- package/common/src/API/fetchCommitmentsCache.cjs +0 -1
- package/common/src/API/fetchCommitmentsCache.d.ts +0 -29
- package/common/src/API/fetchCommitmentsCache.mjs +0 -28
- 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/get-token-data.cjs +0 -1
- package/common/src/API/get-token-data.d.ts +0 -6
- package/common/src/API/get-token-data.mjs +0 -8
- package/common/src/API/get-token-price-chart-data.cjs +0 -1
- package/common/src/API/get-token-price-chart-data.d.ts +0 -16
- package/common/src/API/get-token-price-chart-data.mjs +0 -10
- package/common/src/API/getAnyRecipientInfo.d.ts +0 -1
- package/common/src/API/getCoingeckoPrice.cjs +0 -1
- package/common/src/API/getCoingeckoPrice.d.ts +0 -21
- package/common/src/API/getCoingeckoPrice.mjs +0 -2
- package/common/src/API/getGasEstimates.cjs +0 -1
- package/common/src/API/getGasEstimates.d.ts +0 -10
- package/common/src/API/getGasEstimates.mjs +0 -12
- package/common/src/API/getServerURL.cjs +0 -1
- package/common/src/API/getServerURL.d.ts +0 -7
- package/common/src/API/getServerURL.mjs +0 -14
- package/common/src/API/getTokenPrice.cjs +0 -1
- package/common/src/API/getTokenPrice.d.ts +0 -10
- package/common/src/API/getTokenPrice.mjs +0 -11
- package/common/src/API/getWebsiteURL.cjs +0 -1
- package/common/src/API/getWebsiteURL.d.ts +0 -5
- package/common/src/API/getWebsiteURL.mjs +0 -1
- package/common/src/API/index.cjs +0 -1
- package/common/src/API/index.d.ts +0 -24
- package/common/src/API/index.mjs +0 -24
- package/common/src/API/kycCalls.cjs +0 -1
- package/common/src/API/kycCalls.d.ts +0 -19
- package/common/src/API/kycCalls.mjs +0 -33
- 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/onrampCalls.cjs +0 -1
- package/common/src/API/onrampCalls.d.ts +0 -20
- package/common/src/API/onrampCalls.mjs +0 -11
- package/common/src/API/privacy-score-calls.cjs +0 -1
- package/common/src/API/privacy-score-calls.d.ts +0 -17
- package/common/src/API/privacy-score-calls.mjs +0 -18
- package/common/src/API/privateSendEmailNotificationsCalls.cjs +0 -1
- package/common/src/API/privateSendEmailNotificationsCalls.d.ts +0 -8
- package/common/src/API/privateSendEmailNotificationsCalls.mjs +0 -8
- package/common/src/API/privateSendNonceCalls.cjs +0 -1
- package/common/src/API/privateSendNonceCalls.d.ts +0 -13
- package/common/src/API/privateSendNonceCalls.mjs +0 -15
- package/common/src/API/privateSendRecipientInfoCalls.cjs +0 -1
- package/common/src/API/privateSendRecipientInfoCalls.d.ts +0 -11
- package/common/src/API/privateSendRecipientInfoCalls.mjs +0 -8
- package/common/src/API/proxyAccountsCalls.cjs +0 -1
- package/common/src/API/proxyAccountsCalls.d.ts +0 -6
- package/common/src/API/proxyAccountsCalls.mjs +0 -23
- 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/relayCalls.cjs +0 -1
- package/common/src/API/relayCalls.d.ts +0 -5
- package/common/src/API/relayCalls.mjs +0 -8
- package/common/src/API/resolve-sns.cjs +0 -1
- package/common/src/API/resolve-sns.d.ts +0 -1
- package/common/src/API/resolve-sns.mjs +0 -1
- package/common/src/API/rewardsUserCalls.cjs +0 -1
- package/common/src/API/rewardsUserCalls.d.ts +0 -60
- package/common/src/API/rewardsUserCalls.mjs +0 -16
- package/common/src/API/scheduled-transactions-calls.cjs +0 -1
- package/common/src/API/scheduled-transactions-calls.d.ts +0 -14
- package/common/src/API/scheduled-transactions-calls.mjs +0 -11
- package/common/src/API/seedless-calls.cjs +0 -1
- package/common/src/API/seedless-calls.d.ts +0 -53
- package/common/src/API/seedless-calls.mjs +0 -8
- 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/API/simulate-batch-tx.cjs +0 -1
- package/common/src/API/simulate-batch-tx.d.ts +0 -3
- package/common/src/API/simulate-batch-tx.mjs +0 -11
- package/common/src/API/simulate-transaction.cjs +0 -1
- package/common/src/API/simulate-transaction.d.ts +0 -5
- package/common/src/API/simulate-transaction.mjs +0 -14
- package/common/src/API/snapshot-event-calls.cjs +0 -1
- package/common/src/API/snapshot-event-calls.d.ts +0 -7
- package/common/src/API/snapshot-event-calls.mjs +0 -12
- package/common/src/API/solana-calls.cjs +0 -1
- package/common/src/API/solana-calls.d.ts +0 -38
- package/common/src/API/solana-calls.mjs +0 -8
- package/common/src/API/temporaryWalletCalls.cjs +0 -1
- package/common/src/API/temporaryWalletCalls.d.ts +0 -13
- package/common/src/API/temporaryWalletCalls.mjs +0 -16
- package/common/src/API/tenderly.api.cjs +0 -1
- package/common/src/API/tenderly.api.d.ts +0 -19
- package/common/src/API/tenderly.api.mjs +0 -4
- package/common/src/API/token-calls.cjs +0 -1
- package/common/src/API/token-calls.d.ts +0 -2
- package/common/src/API/token-calls.mjs +0 -12
- package/common/src/API/tronSubsidyCalls.cjs +0 -1
- package/common/src/API/tronSubsidyCalls.d.ts +0 -13
- package/common/src/API/tronSubsidyCalls.mjs +0 -8
- package/common/src/API/weeklyAnalyticCalls.cjs +0 -1
- package/common/src/API/weeklyAnalyticCalls.d.ts +0 -22
- package/common/src/API/weeklyAnalyticCalls.mjs +0 -11
- package/common/src/constants/activity.constants.cjs +0 -1
- package/common/src/constants/activity.constants.d.ts +0 -2
- package/common/src/constants/activity.constants.mjs +0 -4
- package/common/src/constants/addresses.constants.cjs +0 -1
- package/common/src/constants/addresses.constants.d.ts +0 -61
- package/common/src/constants/addresses.constants.mjs +0 -62
- package/common/src/constants/assets.constants.cjs +0 -1
- package/common/src/constants/assets.constants.d.ts +0 -13
- package/common/src/constants/assets.constants.mjs +0 -4
- package/common/src/constants/auth.constants.cjs +0 -1
- package/common/src/constants/auth.constants.d.ts +0 -1
- package/common/src/constants/auth.constants.mjs +0 -4
- package/common/src/constants/backend.constants.d.ts +0 -12
- package/common/src/constants/balance.constants.d.ts +0 -1
- package/common/src/constants/bridging.constants.d.ts +0 -9
- package/common/src/constants/chains.constants.cjs +0 -1
- package/common/src/constants/chains.constants.d.ts +0 -42
- package/common/src/constants/chains.constants.mjs +0 -183
- package/common/src/constants/coingecko.constants.cjs +0 -1
- package/common/src/constants/coingecko.constants.d.ts +0 -39
- package/common/src/constants/coingecko.constants.mjs +0 -6
- package/common/src/constants/contracts.constants.cjs +0 -1
- package/common/src/constants/contracts.constants.d.ts +0 -119
- package/common/src/constants/contracts.constants.mjs +0 -53
- package/common/src/constants/conversion.constants.d.ts +0 -1
- package/common/src/constants/deploy-data/deploy-data-arbMainnet.json.cjs +0 -1
- package/common/src/constants/deploy-data/deploy-data-arbMainnet.json.mjs +0 -4216
- package/common/src/constants/deploy-data/deploy-data-arcTestnet.json.cjs +0 -1
- package/common/src/constants/deploy-data/deploy-data-arcTestnet.json.mjs +0 -4478
- package/common/src/constants/deploy-data/deploy-data-base.json.cjs +0 -1
- package/common/src/constants/deploy-data/deploy-data-base.json.mjs +0 -4228
- package/common/src/constants/deploy-data/deploy-data-ethMainnet.json.cjs +0 -1
- package/common/src/constants/deploy-data/deploy-data-ethMainnet.json.mjs +0 -4230
- package/common/src/constants/deploy-data/deploy-data-localhost.json.cjs +0 -1
- package/common/src/constants/deploy-data/deploy-data-localhost.json.mjs +0 -3087
- package/common/src/constants/deploy-data/deploy-data-optimism.json.cjs +0 -1
- package/common/src/constants/deploy-data/deploy-data-optimism.json.mjs +0 -4228
- package/common/src/constants/deploy-data/deploy-data-polygon.json.cjs +0 -1
- package/common/src/constants/deploy-data/deploy-data-polygon.json.mjs +0 -4228
- package/common/src/constants/deploy-data/deploy-data-solana.json.cjs +0 -1
- package/common/src/constants/deploy-data/deploy-data-solana.json.mjs +0 -7
- package/common/src/constants/deploy-data/deploy-data-tronMainnet.json.cjs +0 -1
- package/common/src/constants/deploy-data/deploy-data-tronMainnet.json.mjs +0 -4267
- package/common/src/constants/deploy-data/deploy-data-tronNile.json.cjs +0 -1
- package/common/src/constants/deploy-data/deploy-data-tronNile.json.mjs +0 -4267
- package/common/src/constants/deploy-data/index.d.ts +0 -11
- package/common/src/constants/events.constants.cjs +0 -1
- package/common/src/constants/events.constants.d.ts +0 -1
- package/common/src/constants/events.constants.mjs +0 -12
- package/common/src/constants/fees.constants.cjs +0 -1
- package/common/src/constants/fees.constants.d.ts +0 -5
- package/common/src/constants/fees.constants.mjs +0 -10
- package/common/src/constants/function-signatures.constants.d.ts +0 -4
- package/common/src/constants/images.constants.d.ts +0 -1
- package/common/src/constants/index.cjs +0 -1
- package/common/src/constants/index.d.ts +0 -37
- package/common/src/constants/index.mjs +0 -34
- package/common/src/constants/kyc.constants.cjs +0 -1
- package/common/src/constants/kyc.constants.d.ts +0 -29
- package/common/src/constants/kyc.constants.mjs +0 -126
- package/common/src/constants/lifi.constants.cjs +0 -1
- package/common/src/constants/lifi.constants.d.ts +0 -3
- package/common/src/constants/lifi.constants.mjs +0 -5
- package/common/src/constants/link.constant.d.ts +0 -1
- package/common/src/constants/mediaUrls.constants.d.ts +0 -42
- package/common/src/constants/mystery-boxes.constants.d.ts +0 -0
- package/common/src/constants/oauthUrls.constants.d.ts +0 -4
- package/common/src/constants/okx.constants.d.ts +0 -2
- package/common/src/constants/pay.constants.d.ts +0 -1
- package/common/src/constants/permit2.constants.cjs +0 -1
- package/common/src/constants/permit2.constants.d.ts +0 -7
- package/common/src/constants/permit2.constants.mjs +0 -10
- package/common/src/constants/presale.constants.cjs +0 -1
- package/common/src/constants/presale.constants.d.ts +0 -87
- package/common/src/constants/presale.constants.mjs +0 -3
- package/common/src/constants/protocol.constants.cjs +0 -1
- package/common/src/constants/protocol.constants.d.ts +0 -60
- package/common/src/constants/protocol.constants.mjs +0 -18
- package/common/src/constants/reorg-depths.constants.cjs +0 -1
- package/common/src/constants/reorg-depths.constants.d.ts +0 -14
- package/common/src/constants/reorg-depths.constants.mjs +0 -17
- package/common/src/constants/rewards.constants.d.ts +0 -17
- package/common/src/constants/save-depths.cjs +0 -1
- package/common/src/constants/save-depths.d.ts +0 -16
- package/common/src/constants/save-depths.mjs +0 -19
- package/common/src/constants/schedule.constants.cjs +0 -1
- package/common/src/constants/schedule.constants.d.ts +0 -2
- package/common/src/constants/schedule.constants.mjs +0 -3
- package/common/src/constants/server.constants.cjs +0 -1
- package/common/src/constants/server.constants.d.ts +0 -139
- package/common/src/constants/server.constants.mjs +0 -133
- 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/constants/token-data/ERC20Registry.cjs +0 -1
- package/common/src/constants/token-data/ERC20Registry.d.ts +0 -3
- package/common/src/constants/token-data/ERC20Registry.mjs +0 -31
- package/common/src/constants/token-data/arbMainnetRegistry.json.cjs +0 -1
- package/common/src/constants/token-data/arbMainnetRegistry.json.mjs +0 -1841
- package/common/src/constants/token-data/arbMainnetRegistryFixed.json.cjs +0 -1
- package/common/src/constants/token-data/arbMainnetRegistryFixed.json.mjs +0 -1841
- package/common/src/constants/token-data/arcTestnetRegistry.json.cjs +0 -1
- package/common/src/constants/token-data/arcTestnetRegistry.json.mjs +0 -435
- package/common/src/constants/token-data/baseRegistry.json.cjs +0 -1
- package/common/src/constants/token-data/baseRegistry.json.mjs +0 -1142
- package/common/src/constants/token-data/baseRegistryFixed.json.cjs +0 -1
- package/common/src/constants/token-data/baseRegistryFixed.json.mjs +0 -1142
- package/common/src/constants/token-data/ethMainnetRegistry.json.cjs +0 -1
- package/common/src/constants/token-data/ethMainnetRegistry.json.mjs +0 -4274
- package/common/src/constants/token-data/ethMainnetRegistryFixed.json.cjs +0 -1
- package/common/src/constants/token-data/ethMainnetRegistryFixed.json.mjs +0 -4274
- package/common/src/constants/token-data/index.cjs +0 -1
- package/common/src/constants/token-data/index.d.ts +0 -1149
- package/common/src/constants/token-data/index.mjs +0 -17
- package/common/src/constants/token-data/localhostRegistry.json.cjs +0 -1
- package/common/src/constants/token-data/localhostRegistry.json.mjs +0 -2758
- package/common/src/constants/token-data/optimismRegistry.json.cjs +0 -1
- package/common/src/constants/token-data/optimismRegistry.json.mjs +0 -709
- package/common/src/constants/token-data/optimismRegistryFixed.json.cjs +0 -1
- package/common/src/constants/token-data/optimismRegistryFixed.json.mjs +0 -709
- package/common/src/constants/token-data/polygonRegistry.json.cjs +0 -1
- package/common/src/constants/token-data/polygonRegistry.json.mjs +0 -2317
- package/common/src/constants/token-data/polygonRegistryFixed.json.cjs +0 -1
- package/common/src/constants/token-data/polygonRegistryFixed.json.mjs +0 -2317
- package/common/src/constants/token-data/solanaLocalnetRegistry.json.cjs +0 -1
- package/common/src/constants/token-data/solanaLocalnetRegistry.json.mjs +0 -17
- package/common/src/constants/token-data/solanaMainnetRegistry.json.cjs +0 -1
- package/common/src/constants/token-data/solanaMainnetRegistry.json.mjs +0 -625
- package/common/src/constants/token-data/tronMainnetRegistry.json.cjs +0 -1
- package/common/src/constants/token-data/tronMainnetRegistry.json.mjs +0 -17
- package/common/src/constants/token-data/tronNileRegistry.json.cjs +0 -1
- package/common/src/constants/token-data/tronNileRegistry.json.mjs +0 -17
- package/common/src/constants/token.limits.constants.cjs +0 -1
- package/common/src/constants/token.limits.constants.d.ts +0 -5
- package/common/src/constants/token.limits.constants.mjs +0 -5
- package/common/src/constants/tokens.constants.cjs +0 -1
- package/common/src/constants/tokens.constants.d.ts +0 -4
- package/common/src/constants/tokens.constants.mjs +0 -3
- package/common/src/constants/tx-confirmation.constants.cjs +0 -1
- package/common/src/constants/tx-confirmation.constants.d.ts +0 -4
- package/common/src/constants/tx-confirmation.constants.mjs +0 -4
- package/common/src/constants/vite.constants.cjs +0 -1
- package/common/src/constants/vite.constants.d.ts +0 -15
- package/common/src/constants/vite.constants.mjs +0 -26
- package/common/src/constants/wallet.constants.d.ts +0 -2
- package/common/src/crypto/babyJub.cjs +0 -1
- package/common/src/crypto/babyJub.d.ts +0 -16
- package/common/src/crypto/babyJub.mjs +0 -12
- package/common/src/crypto/index.cjs +0 -1
- package/common/src/crypto/index.d.ts +0 -3
- package/common/src/crypto/index.mjs +0 -3
- package/common/src/crypto/poseidon.cjs +0 -1
- package/common/src/crypto/poseidon.d.ts +0 -15
- package/common/src/crypto/poseidon.mjs +0 -22
- package/common/src/crypto/preProcessing.cjs +0 -1
- package/common/src/crypto/preProcessing.d.ts +0 -1
- package/common/src/crypto/preProcessing.mjs +0 -15
- package/common/src/data-structures/AccountActions/AccountActions.cjs +0 -1
- package/common/src/data-structures/AccountActions/AccountActions.d.ts +0 -17
- package/common/src/data-structures/AccountActions/AccountActions.mjs +0 -65
- package/common/src/data-structures/AccountActions/index.cjs +0 -1
- package/common/src/data-structures/AccountActions/index.d.ts +0 -1
- package/common/src/data-structures/AccountActions/index.mjs +0 -1
- package/common/src/data-structures/ApprovalDBs/EventsPublicApprovalsDB.d.ts +0 -18
- package/common/src/data-structures/ApprovalDBs/index.d.ts +0 -1
- package/common/src/data-structures/BlockchainEvent/BlockchainEvent.cjs +0 -1
- package/common/src/data-structures/BlockchainEvent/BlockchainEvent.d.ts +0 -14
- package/common/src/data-structures/BlockchainEvent/BlockchainEvent.mjs +0 -41
- package/common/src/data-structures/Hinkal/Hinkal.cjs +0 -1
- package/common/src/data-structures/Hinkal/Hinkal.d.ts +0 -114
- package/common/src/data-structures/Hinkal/Hinkal.mjs +0 -433
- package/common/src/data-structures/Hinkal/HinkalPrivateBalanceController.cjs +0 -1
- package/common/src/data-structures/Hinkal/HinkalPrivateBalanceController.d.ts +0 -19
- package/common/src/data-structures/Hinkal/HinkalPrivateBalanceController.mjs +0 -239
- package/common/src/data-structures/Hinkal/IHinkal.d.ts +0 -102
- package/common/src/data-structures/Hinkal/handleAutoDepositBack.cjs +0 -1
- package/common/src/data-structures/Hinkal/handleAutoDepositBack.d.ts +0 -3
- package/common/src/data-structures/Hinkal/handleAutoDepositBack.mjs +0 -93
- package/common/src/data-structures/Hinkal/hinkalActionReceive.cjs +0 -1
- package/common/src/data-structures/Hinkal/hinkalActionReceive.d.ts +0 -7
- package/common/src/data-structures/Hinkal/hinkalActionReceive.mjs +0 -21
- package/common/src/data-structures/Hinkal/hinkalCheckSolanaTokenRegistry.cjs +0 -1
- package/common/src/data-structures/Hinkal/hinkalCheckSolanaTokenRegistry.d.ts +0 -3
- package/common/src/data-structures/Hinkal/hinkalCheckSolanaTokenRegistry.mjs +0 -15
- package/common/src/data-structures/Hinkal/hinkalCheckTokenRegistry.cjs +0 -1
- package/common/src/data-structures/Hinkal/hinkalCheckTokenRegistry.d.ts +0 -4
- package/common/src/data-structures/Hinkal/hinkalCheckTokenRegistry.mjs +0 -18
- package/common/src/data-structures/Hinkal/hinkalClaimUtxo.cjs +0 -1
- package/common/src/data-structures/Hinkal/hinkalClaimUtxo.d.ts +0 -6
- package/common/src/data-structures/Hinkal/hinkalClaimUtxo.mjs +0 -55
- package/common/src/data-structures/Hinkal/hinkalDeposit.cjs +0 -1
- package/common/src/data-structures/Hinkal/hinkalDeposit.d.ts +0 -4
- package/common/src/data-structures/Hinkal/hinkalDeposit.mjs +0 -65
- package/common/src/data-structures/Hinkal/hinkalDepositAndBridge.cjs +0 -1
- package/common/src/data-structures/Hinkal/hinkalDepositAndBridge.d.ts +0 -4
- package/common/src/data-structures/Hinkal/hinkalDepositAndBridge.mjs +0 -119
- package/common/src/data-structures/Hinkal/hinkalDepositAndWithdraw.cjs +0 -1
- package/common/src/data-structures/Hinkal/hinkalDepositAndWithdraw.d.ts +0 -5
- package/common/src/data-structures/Hinkal/hinkalDepositAndWithdraw.mjs +0 -81
- package/common/src/data-structures/Hinkal/hinkalDepositOnChainUtxos.cjs +0 -1
- package/common/src/data-structures/Hinkal/hinkalDepositOnChainUtxos.d.ts +0 -8
- package/common/src/data-structures/Hinkal/hinkalDepositOnChainUtxos.mjs +0 -76
- package/common/src/data-structures/Hinkal/hinkalGetRecipientInfo.cjs +0 -1
- package/common/src/data-structures/Hinkal/hinkalGetRecipientInfo.d.ts +0 -2
- package/common/src/data-structures/Hinkal/hinkalGetRecipientInfo.mjs +0 -9
- package/common/src/data-structures/Hinkal/hinkalGetZkMeProvider.cjs +0 -1
- package/common/src/data-structures/Hinkal/hinkalGetZkMeProvider.d.ts +0 -28
- package/common/src/data-structures/Hinkal/hinkalGetZkMeProvider.mjs +0 -22
- 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/hinkalPrivateWallet.cjs +0 -1
- package/common/src/data-structures/Hinkal/hinkalPrivateWallet.d.ts +0 -6
- package/common/src/data-structures/Hinkal/hinkalPrivateWallet.mjs +0 -54
- package/common/src/data-structures/Hinkal/hinkalProoflessDeposit.cjs +0 -1
- package/common/src/data-structures/Hinkal/hinkalProoflessDeposit.d.ts +0 -5
- package/common/src/data-structures/Hinkal/hinkalProoflessDeposit.mjs +0 -167
- package/common/src/data-structures/Hinkal/hinkalProxySwap.cjs +0 -1
- package/common/src/data-structures/Hinkal/hinkalProxySwap.d.ts +0 -7
- package/common/src/data-structures/Hinkal/hinkalProxySwap.mjs +0 -24
- package/common/src/data-structures/Hinkal/hinkalProxyToPrivate.cjs +0 -1
- package/common/src/data-structures/Hinkal/hinkalProxyToPrivate.d.ts +0 -6
- package/common/src/data-structures/Hinkal/hinkalProxyToPrivate.mjs +0 -28
- package/common/src/data-structures/Hinkal/hinkalSignSubAccount.cjs +0 -1
- package/common/src/data-structures/Hinkal/hinkalSignSubAccount.d.ts +0 -4
- package/common/src/data-structures/Hinkal/hinkalSignSubAccount.mjs +0 -15
- package/common/src/data-structures/Hinkal/hinkalSolanaClaimUtxo.cjs +0 -1
- package/common/src/data-structures/Hinkal/hinkalSolanaClaimUtxo.d.ts +0 -5
- package/common/src/data-structures/Hinkal/hinkalSolanaClaimUtxo.mjs +0 -97
- package/common/src/data-structures/Hinkal/hinkalSolanaDeposit.cjs +0 -1
- package/common/src/data-structures/Hinkal/hinkalSolanaDeposit.d.ts +0 -7
- package/common/src/data-structures/Hinkal/hinkalSolanaDeposit.mjs +0 -73
- package/common/src/data-structures/Hinkal/hinkalSolanaDepositAndWithdraw.cjs +0 -1
- package/common/src/data-structures/Hinkal/hinkalSolanaDepositAndWithdraw.d.ts +0 -6
- package/common/src/data-structures/Hinkal/hinkalSolanaDepositAndWithdraw.mjs +0 -170
- package/common/src/data-structures/Hinkal/hinkalSolanaProoflessDeposit.cjs +0 -1
- package/common/src/data-structures/Hinkal/hinkalSolanaProoflessDeposit.d.ts +0 -5
- package/common/src/data-structures/Hinkal/hinkalSolanaProoflessDeposit.mjs +0 -21
- package/common/src/data-structures/Hinkal/hinkalSolanaProxySend.cjs +0 -1
- package/common/src/data-structures/Hinkal/hinkalSolanaProxySend.d.ts +0 -6
- package/common/src/data-structures/Hinkal/hinkalSolanaProxySend.mjs +0 -36
- package/common/src/data-structures/Hinkal/hinkalSolanaProxyShield.cjs +0 -1
- package/common/src/data-structures/Hinkal/hinkalSolanaProxyShield.d.ts +0 -6
- package/common/src/data-structures/Hinkal/hinkalSolanaProxyShield.mjs +0 -71
- package/common/src/data-structures/Hinkal/hinkalSolanaProxySwap.cjs +0 -1
- package/common/src/data-structures/Hinkal/hinkalSolanaProxySwap.d.ts +0 -6
- package/common/src/data-structures/Hinkal/hinkalSolanaProxySwap.mjs +0 -81
- package/common/src/data-structures/Hinkal/hinkalSolanaSwap.cjs +0 -1
- package/common/src/data-structures/Hinkal/hinkalSolanaSwap.d.ts +0 -4
- package/common/src/data-structures/Hinkal/hinkalSolanaSwap.mjs +0 -100
- package/common/src/data-structures/Hinkal/hinkalSolanaTransfer.cjs +0 -1
- package/common/src/data-structures/Hinkal/hinkalSolanaTransfer.d.ts +0 -31
- package/common/src/data-structures/Hinkal/hinkalSolanaTransfer.mjs +0 -96
- package/common/src/data-structures/Hinkal/hinkalSolanaWithdraw.cjs +0 -1
- package/common/src/data-structures/Hinkal/hinkalSolanaWithdraw.d.ts +0 -4
- package/common/src/data-structures/Hinkal/hinkalSolanaWithdraw.mjs +0 -81
- package/common/src/data-structures/Hinkal/hinkalSwap.cjs +0 -1
- package/common/src/data-structures/Hinkal/hinkalSwap.d.ts +0 -7
- package/common/src/data-structures/Hinkal/hinkalSwap.mjs +0 -49
- package/common/src/data-structures/Hinkal/hinkalTransfer.cjs +0 -1
- package/common/src/data-structures/Hinkal/hinkalTransfer.d.ts +0 -4
- package/common/src/data-structures/Hinkal/hinkalTransfer.mjs +0 -59
- package/common/src/data-structures/Hinkal/hinkalWithdraw.cjs +0 -1
- package/common/src/data-structures/Hinkal/hinkalWithdraw.d.ts +0 -7
- package/common/src/data-structures/Hinkal/hinkalWithdraw.mjs +0 -64
- package/common/src/data-structures/Hinkal/hinkalWithdrawStuckUtxos.cjs +0 -1
- package/common/src/data-structures/Hinkal/hinkalWithdrawStuckUtxos.d.ts +0 -3
- package/common/src/data-structures/Hinkal/hinkalWithdrawStuckUtxos.mjs +0 -141
- package/common/src/data-structures/Hinkal/index.d.ts +0 -19
- package/common/src/data-structures/Hinkal/resetMerkleTrees.cjs +0 -1
- package/common/src/data-structures/Hinkal/resetMerkleTrees.d.ts +0 -2
- package/common/src/data-structures/Hinkal/resetMerkleTrees.mjs +0 -61
- package/common/src/data-structures/IndexedDB/activity-db.cjs +0 -1
- package/common/src/data-structures/IndexedDB/activity-db.d.ts +0 -14
- package/common/src/data-structures/IndexedDB/activity-db.mjs +0 -109
- package/common/src/data-structures/IndexedDB/balances-db.cjs +0 -1
- package/common/src/data-structures/IndexedDB/balances-db.d.ts +0 -13
- package/common/src/data-structures/IndexedDB/balances-db.mjs +0 -47
- package/common/src/data-structures/IndexedDB/contact-db.cjs +0 -1
- package/common/src/data-structures/IndexedDB/contact-db.d.ts +0 -11
- package/common/src/data-structures/IndexedDB/contact-db.mjs +0 -45
- package/common/src/data-structures/IndexedDB/index.cjs +0 -1
- package/common/src/data-structures/IndexedDB/index.d.ts +0 -8
- package/common/src/data-structures/IndexedDB/index.mjs +0 -8
- package/common/src/data-structures/IndexedDB/key-val-store.cjs +0 -1
- package/common/src/data-structures/IndexedDB/key-val-store.d.ts +0 -6
- package/common/src/data-structures/IndexedDB/key-val-store.mjs +0 -41
- package/common/src/data-structures/IndexedDB/pay-activity-db.cjs +0 -1
- package/common/src/data-structures/IndexedDB/pay-activity-db.d.ts +0 -9
- package/common/src/data-structures/IndexedDB/pay-activity-db.mjs +0 -21
- package/common/src/data-structures/IndexedDB/prices-db.cjs +0 -1
- package/common/src/data-structures/IndexedDB/prices-db.d.ts +0 -9
- package/common/src/data-structures/IndexedDB/prices-db.mjs +0 -54
- package/common/src/data-structures/IndexedDB/private-balances-db.cjs +0 -1
- package/common/src/data-structures/IndexedDB/private-balances-db.d.ts +0 -9
- package/common/src/data-structures/IndexedDB/private-balances-db.mjs +0 -21
- package/common/src/data-structures/IndexedDB/signatures-db.cjs +0 -1
- package/common/src/data-structures/IndexedDB/signatures-db.d.ts +0 -10
- package/common/src/data-structures/IndexedDB/signatures-db.mjs +0 -40
- package/common/src/data-structures/MultiThreadedUtxoUtils/MultiThreadedUtxoUtils.cjs +0 -1
- package/common/src/data-structures/MultiThreadedUtxoUtils/MultiThreadedUtxoUtils.d.ts +0 -20
- package/common/src/data-structures/MultiThreadedUtxoUtils/MultiThreadedUtxoUtils.mjs +0 -73
- package/common/src/data-structures/TokenDBs/AlchemyPublicTokensDB.cjs +0 -1
- package/common/src/data-structures/TokenDBs/AlchemyPublicTokensDB.d.ts +0 -19
- package/common/src/data-structures/TokenDBs/AlchemyPublicTokensDB.mjs +0 -168
- package/common/src/data-structures/TokenDBs/ArcPublicTokensDB.cjs +0 -1
- package/common/src/data-structures/TokenDBs/ArcPublicTokensDB.d.ts +0 -11
- 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.d.ts +0 -19
- package/common/src/data-structures/TokenDBs/EventsPublicTokensDB.mjs +0 -144
- package/common/src/data-structures/TokenDBs/IPublicTokensDB.d.ts +0 -6
- package/common/src/data-structures/TokenDBs/PrivateTokensDB.cjs +0 -1
- package/common/src/data-structures/TokenDBs/PrivateTokensDB.d.ts +0 -11
- package/common/src/data-structures/TokenDBs/PrivateTokensDB.mjs +0 -50
- package/common/src/data-structures/TokenDBs/PublicTokensDB.cjs +0 -1
- package/common/src/data-structures/TokenDBs/PublicTokensDB.d.ts +0 -9
- package/common/src/data-structures/TokenDBs/PublicTokensDB.mjs +0 -29
- package/common/src/data-structures/TokenDBs/index.cjs +0 -1
- package/common/src/data-structures/TokenDBs/index.d.ts +0 -4
- package/common/src/data-structures/TokenDBs/index.mjs +0 -4
- package/common/src/data-structures/TokenDBs/token-visibility-db.cjs +0 -1
- package/common/src/data-structures/TokenDBs/token-visibility-db.d.ts +0 -17
- package/common/src/data-structures/TokenDBs/token-visibility-db.mjs +0 -78
- package/common/src/data-structures/ValueCache/ValueCache.d.ts +0 -10
- package/common/src/data-structures/ValueCache/index.d.ts +0 -1
- package/common/src/data-structures/cacheDevices/AttachableMemoryCacheDevice.cjs +0 -1
- package/common/src/data-structures/cacheDevices/AttachableMemoryCacheDevice.d.ts +0 -8
- package/common/src/data-structures/cacheDevices/AttachableMemoryCacheDevice.mjs +0 -26
- package/common/src/data-structures/cacheDevices/BaseCacheDevice.cjs +0 -1
- package/common/src/data-structures/cacheDevices/BaseCacheDevice.d.ts +0 -11
- package/common/src/data-structures/cacheDevices/BaseCacheDevice.mjs +0 -21
- package/common/src/data-structures/cacheDevices/FileCacheDevice.cjs +0 -1
- package/common/src/data-structures/cacheDevices/FileCacheDevice.d.ts +0 -10
- package/common/src/data-structures/cacheDevices/FileCacheDevice.mjs +0 -40
- package/common/src/data-structures/cacheDevices/LocalStorageCacheDevice.cjs +0 -1
- package/common/src/data-structures/cacheDevices/LocalStorageCacheDevice.d.ts +0 -8
- package/common/src/data-structures/cacheDevices/LocalStorageCacheDevice.mjs +0 -21
- package/common/src/data-structures/cacheDevices/index.cjs +0 -1
- package/common/src/data-structures/cacheDevices/index.d.ts +0 -2
- package/common/src/data-structures/cacheDevices/index.mjs +0 -2
- package/common/src/data-structures/crypto-keys/decodeUTXO.cjs +0 -1
- package/common/src/data-structures/crypto-keys/decodeUTXO.d.ts +0 -26
- package/common/src/data-structures/crypto-keys/decodeUTXO.mjs +0 -75
- package/common/src/data-structures/crypto-keys/encryptDecryptUtxo.cjs +0 -1
- package/common/src/data-structures/crypto-keys/encryptDecryptUtxo.d.ts +0 -18
- package/common/src/data-structures/crypto-keys/encryptDecryptUtxo.mjs +0 -24
- package/common/src/data-structures/crypto-keys/index.cjs +0 -1
- package/common/src/data-structures/crypto-keys/index.d.ts +0 -4
- package/common/src/data-structures/crypto-keys/index.mjs +0 -4
- package/common/src/data-structures/crypto-keys/keyUtils.cjs +0 -1
- package/common/src/data-structures/crypto-keys/keyUtils.d.ts +0 -2
- package/common/src/data-structures/crypto-keys/keyUtils.mjs +0 -8
- package/common/src/data-structures/crypto-keys/keys.cjs +0 -1
- package/common/src/data-structures/crypto-keys/keys.d.ts +0 -87
- package/common/src/data-structures/crypto-keys/keys.mjs +0 -99
- package/common/src/data-structures/custom-token-registry/CustomTokenRegistry.cjs +0 -1
- package/common/src/data-structures/custom-token-registry/CustomTokenRegistry.d.ts +0 -12
- package/common/src/data-structures/custom-token-registry/CustomTokenRegistry.mjs +0 -25
- package/common/src/data-structures/event-service/evm/AbstractAccessTokenSnapshotService.cjs +0 -1
- package/common/src/data-structures/event-service/evm/AbstractAccessTokenSnapshotService.d.ts +0 -35
- package/common/src/data-structures/event-service/evm/AbstractAccessTokenSnapshotService.mjs +0 -75
- package/common/src/data-structures/event-service/evm/AbstractCommitmentsSnapshotService.cjs +0 -1
- package/common/src/data-structures/event-service/evm/AbstractCommitmentsSnapshotService.d.ts +0 -34
- package/common/src/data-structures/event-service/evm/AbstractCommitmentsSnapshotService.mjs +0 -93
- package/common/src/data-structures/event-service/evm/AbstractEventService.cjs +0 -1
- package/common/src/data-structures/event-service/evm/AbstractEventService.d.ts +0 -14
- package/common/src/data-structures/event-service/evm/AbstractEventService.mjs +0 -34
- package/common/src/data-structures/event-service/evm/AbstractNullifierSnapshotService.cjs +0 -1
- package/common/src/data-structures/event-service/evm/AbstractNullifierSnapshotService.d.ts +0 -22
- package/common/src/data-structures/event-service/evm/AbstractNullifierSnapshotService.mjs +0 -43
- package/common/src/data-structures/event-service/evm/AbstractSnapshotService.cjs +0 -1
- package/common/src/data-structures/event-service/evm/AbstractSnapshotService.d.ts +0 -22
- package/common/src/data-structures/event-service/evm/AbstractSnapshotService.mjs +0 -33
- package/common/src/data-structures/event-service/evm/BlockchainEventEmitter.cjs +0 -1
- package/common/src/data-structures/event-service/evm/BlockchainEventEmitter.d.ts +0 -37
- package/common/src/data-structures/event-service/evm/BlockchainEventEmitter.mjs +0 -104
- package/common/src/data-structures/event-service/evm/ClientBlockchainEventEmitter.cjs +0 -1
- package/common/src/data-structures/event-service/evm/ClientBlockchainEventEmitter.d.ts +0 -11
- package/common/src/data-structures/event-service/evm/ClientBlockchainEventEmitter.mjs +0 -21
- package/common/src/data-structures/event-service/evm/PollingBlockchainEventEmitter.cjs +0 -1
- package/common/src/data-structures/event-service/evm/PollingBlockchainEventEmitter.d.ts +0 -6
- package/common/src/data-structures/event-service/evm/PollingBlockchainEventEmitter.mjs +0 -1
- package/common/src/data-structures/event-service/helpers/ClientEventHelper.cjs +0 -1
- package/common/src/data-structures/event-service/helpers/ClientEventHelper.d.ts +0 -10
- package/common/src/data-structures/event-service/helpers/ClientEventHelper.mjs +0 -28
- package/common/src/data-structures/event-service/helpers/PollingEventHelper.d.ts +0 -7
- package/common/src/data-structures/event-service/index.cjs +0 -1
- package/common/src/data-structures/event-service/index.d.ts +0 -16
- package/common/src/data-structures/event-service/index.mjs +0 -16
- package/common/src/data-structures/event-service/solana/AbstractSolanaAccessTokenSnapshotService.cjs +0 -1
- package/common/src/data-structures/event-service/solana/AbstractSolanaAccessTokenSnapshotService.d.ts +0 -35
- package/common/src/data-structures/event-service/solana/AbstractSolanaAccessTokenSnapshotService.mjs +0 -76
- package/common/src/data-structures/event-service/solana/AbstractSolanaCommitmentsSnapshotService.cjs +0 -1
- package/common/src/data-structures/event-service/solana/AbstractSolanaCommitmentsSnapshotService.d.ts +0 -34
- package/common/src/data-structures/event-service/solana/AbstractSolanaCommitmentsSnapshotService.mjs +0 -98
- package/common/src/data-structures/event-service/solana/AbstractSolanaEventService.cjs +0 -1
- package/common/src/data-structures/event-service/solana/AbstractSolanaEventService.d.ts +0 -17
- package/common/src/data-structures/event-service/solana/AbstractSolanaEventService.mjs +0 -39
- package/common/src/data-structures/event-service/solana/AbstractSolanaNullifierSnapshotService.cjs +0 -1
- package/common/src/data-structures/event-service/solana/AbstractSolanaNullifierSnapshotService.d.ts +0 -22
- package/common/src/data-structures/event-service/solana/AbstractSolanaNullifierSnapshotService.mjs +0 -43
- package/common/src/data-structures/event-service/solana/AbstractSolanaSnapshotService.cjs +0 -1
- package/common/src/data-structures/event-service/solana/AbstractSolanaSnapshotService.d.ts +0 -21
- package/common/src/data-structures/event-service/solana/AbstractSolanaSnapshotService.mjs +0 -30
- package/common/src/data-structures/event-service/solana/ClientSolanaBlockchainEventEmitter.cjs +0 -1
- package/common/src/data-structures/event-service/solana/ClientSolanaBlockchainEventEmitter.d.ts +0 -11
- package/common/src/data-structures/event-service/solana/ClientSolanaBlockchainEventEmitter.mjs +0 -22
- package/common/src/data-structures/event-service/solana/PollingSolanaBlockchainEventEmitter.cjs +0 -1
- package/common/src/data-structures/event-service/solana/PollingSolanaBlockchainEventEmitter.d.ts +0 -6
- package/common/src/data-structures/event-service/solana/PollingSolanaBlockchainEventEmitter.mjs +0 -1
- package/common/src/data-structures/event-service/solana/SolanaBlockchainEventEmitter.cjs +0 -1
- package/common/src/data-structures/event-service/solana/SolanaBlockchainEventEmitter.d.ts +0 -42
- package/common/src/data-structures/event-service/solana/SolanaBlockchainEventEmitter.mjs +0 -178
- package/common/src/data-structures/http/BasicHttpClient.cjs +0 -1
- package/common/src/data-structures/http/BasicHttpClient.d.ts +0 -11
- package/common/src/data-structures/http/BasicHttpClient.mjs +0 -25
- package/common/src/data-structures/http/HttpClient.cjs +0 -1
- package/common/src/data-structures/http/HttpClient.d.ts +0 -10
- package/common/src/data-structures/http/HttpClient.mjs +0 -14
- package/common/src/data-structures/http/index.cjs +0 -1
- package/common/src/data-structures/http/index.d.ts +0 -2
- package/common/src/data-structures/http/index.mjs +0 -2
- package/common/src/data-structures/index.d.ts +0 -20
- package/common/src/data-structures/merkle-tree/MerkleTree.cjs +0 -1
- package/common/src/data-structures/merkle-tree/MerkleTree.d.ts +0 -82
- package/common/src/data-structures/merkle-tree/MerkleTree.mjs +0 -116
- package/common/src/data-structures/merkle-tree/MerkleTreeIncompleteError.cjs +0 -1
- package/common/src/data-structures/merkle-tree/MerkleTreeIncompleteError.d.ts +0 -3
- package/common/src/data-structures/merkle-tree/MerkleTreeIncompleteError.mjs +0 -8
- package/common/src/data-structures/merkle-tree/getPatchedAccessTokenMerkleTree.cjs +0 -1
- package/common/src/data-structures/merkle-tree/getPatchedAccessTokenMerkleTree.d.ts +0 -2
- package/common/src/data-structures/merkle-tree/getPatchedAccessTokenMerkleTree.mjs +0 -13
- package/common/src/data-structures/merkle-tree/index.cjs +0 -1
- package/common/src/data-structures/merkle-tree/index.d.ts +0 -3
- package/common/src/data-structures/merkle-tree/index.mjs +0 -3
- package/common/src/data-structures/presale/PresaleContractWrapper.d.ts +0 -23
- package/common/src/data-structures/presale/index.d.ts +0 -1
- package/common/src/data-structures/provider-adapter/IProviderAdapter.d.ts +0 -40
- package/common/src/data-structures/snapshot/SnapshotFetcherService.cjs +0 -1
- package/common/src/data-structures/snapshot/SnapshotFetcherService.d.ts +0 -15
- package/common/src/data-structures/snapshot/SnapshotFetcherService.mjs +0 -37
- package/common/src/data-structures/snapshot/evm-snapshots/ClientAccessTokenSnapshotService.cjs +0 -1
- package/common/src/data-structures/snapshot/evm-snapshots/ClientAccessTokenSnapshotService.d.ts +0 -8
- package/common/src/data-structures/snapshot/evm-snapshots/ClientAccessTokenSnapshotService.mjs +0 -29
- package/common/src/data-structures/snapshot/evm-snapshots/ClientCommitmentsSnapshotService.cjs +0 -1
- package/common/src/data-structures/snapshot/evm-snapshots/ClientCommitmentsSnapshotService.d.ts +0 -8
- package/common/src/data-structures/snapshot/evm-snapshots/ClientCommitmentsSnapshotService.mjs +0 -23
- package/common/src/data-structures/snapshot/evm-snapshots/ClientNullifierSnapshotService.cjs +0 -1
- package/common/src/data-structures/snapshot/evm-snapshots/ClientNullifierSnapshotService.d.ts +0 -8
- package/common/src/data-structures/snapshot/evm-snapshots/ClientNullifierSnapshotService.mjs +0 -21
- package/common/src/data-structures/snapshot/index.cjs +0 -1
- package/common/src/data-structures/snapshot/index.d.ts +0 -7
- package/common/src/data-structures/snapshot/index.mjs +0 -7
- package/common/src/data-structures/snapshot/solana-snapshots/ClientSolanaAccessTokenSnapshotService.cjs +0 -1
- package/common/src/data-structures/snapshot/solana-snapshots/ClientSolanaAccessTokenSnapshotService.d.ts +0 -8
- package/common/src/data-structures/snapshot/solana-snapshots/ClientSolanaAccessTokenSnapshotService.mjs +0 -26
- package/common/src/data-structures/snapshot/solana-snapshots/ClientSolanaCommitmentsSnapshotService.cjs +0 -1
- package/common/src/data-structures/snapshot/solana-snapshots/ClientSolanaCommitmentsSnapshotService.d.ts +0 -8
- package/common/src/data-structures/snapshot/solana-snapshots/ClientSolanaCommitmentsSnapshotService.mjs +0 -23
- package/common/src/data-structures/snapshot/solana-snapshots/ClientSolanaNullifierSnapshotService.cjs +0 -1
- package/common/src/data-structures/snapshot/solana-snapshots/ClientSolanaNullifierSnapshotService.d.ts +0 -8
- package/common/src/data-structures/snapshot/solana-snapshots/ClientSolanaNullifierSnapshotService.mjs +0 -21
- package/common/src/data-structures/token-price-fetcher/TokenChecker.cjs +0 -1
- package/common/src/data-structures/token-price-fetcher/TokenChecker.d.ts +0 -9
- package/common/src/data-structures/token-price-fetcher/TokenChecker.mjs +0 -16
- package/common/src/data-structures/token-price-fetcher/index.d.ts +0 -1
- package/common/src/data-structures/transactions-manager/history/history.types.d.ts +0 -16
- package/common/src/data-structures/transactions-manager/index.d.ts +0 -1
- package/common/src/data-structures/utxo/Utxo.cjs +0 -1
- package/common/src/data-structures/utxo/Utxo.d.ts +0 -63
- package/common/src/data-structures/utxo/Utxo.mjs +0 -112
- package/common/src/error-handling/customErrors/ErrorWithAmount.cjs +0 -1
- package/common/src/error-handling/customErrors/ErrorWithAmount.d.ts +0 -4
- package/common/src/error-handling/customErrors/ErrorWithAmount.mjs +0 -9
- package/common/src/error-handling/customErrors/ErrorWithIndex.d.ts +0 -4
- package/common/src/error-handling/customErrors/ErrorWithTx.cjs +0 -1
- package/common/src/error-handling/customErrors/ErrorWithTx.d.ts +0 -4
- package/common/src/error-handling/customErrors/ErrorWithTx.mjs +0 -9
- package/common/src/error-handling/customErrors/FeeOverTransactionValueError.cjs +0 -1
- package/common/src/error-handling/customErrors/FeeOverTransactionValueError.d.ts +0 -9
- package/common/src/error-handling/customErrors/FeeOverTransactionValueError.mjs +0 -9
- package/common/src/error-handling/customErrors/HttpError.d.ts +0 -4
- package/common/src/error-handling/customErrors/SimulationFailureError.d.ts +0 -10
- package/common/src/error-handling/customErrors/customErrors.helpers.cjs +0 -1
- package/common/src/error-handling/customErrors/customErrors.helpers.d.ts +0 -5
- package/common/src/error-handling/customErrors/customErrors.helpers.mjs +0 -14
- package/common/src/error-handling/customErrors/index.cjs +0 -1
- package/common/src/error-handling/customErrors/index.d.ts +0 -7
- package/common/src/error-handling/customErrors/index.mjs +0 -4
- package/common/src/error-handling/error-codes.constants.cjs +0 -2
- package/common/src/error-handling/error-codes.constants.d.ts +0 -248
- package/common/src/error-handling/error-codes.constants.mjs +0 -240
- package/common/src/error-handling/get-error.message.cjs +0 -1
- package/common/src/error-handling/get-error.message.d.ts +0 -5
- package/common/src/error-handling/get-error.message.mjs +0 -74
- package/common/src/error-handling/index.cjs +0 -1
- package/common/src/error-handling/index.d.ts +0 -6
- package/common/src/error-handling/index.mjs +0 -10
- package/common/src/error-handling/isInsufficientFundsError.cjs +0 -1
- package/common/src/error-handling/isInsufficientFundsError.d.ts +0 -1
- package/common/src/error-handling/isInsufficientFundsError.mjs +0 -16
- package/common/src/error-handling/logError.cjs +0 -1
- package/common/src/error-handling/logError.d.ts +0 -1
- package/common/src/error-handling/logError.mjs +0 -7
- package/common/src/error-handling/logger.cjs +0 -1
- package/common/src/error-handling/logger.d.ts +0 -5
- package/common/src/error-handling/logger.mjs +0 -19
- package/common/src/error-handling/retrySolanaError.cjs +0 -1
- package/common/src/error-handling/retrySolanaError.d.ts +0 -1
- package/common/src/error-handling/retrySolanaError.mjs +0 -4
- package/common/src/error-handling/types.cjs +0 -1
- package/common/src/error-handling/types.d.ts +0 -10
- package/common/src/error-handling/types.mjs +0 -6
- package/common/src/externalABIs/BUSD.d.ts +0 -38
- package/common/src/externalABIs/BabPassport.json.cjs +0 -1
- package/common/src/externalABIs/BabPassport.json.mjs +0 -20
- package/common/src/externalABIs/DAI.d.ts +0 -45
- package/common/src/externalABIs/ERC1155.json.cjs +0 -1
- package/common/src/externalABIs/ERC1155.json.mjs +0 -287
- package/common/src/externalABIs/ERC20.json.cjs +0 -1
- package/common/src/externalABIs/ERC20.json.mjs +0 -257
- package/common/src/externalABIs/ERC721.json.cjs +0 -1
- package/common/src/externalABIs/ERC721.json.mjs +0 -299
- package/common/src/externalABIs/GalxePassport.json.cjs +0 -1
- package/common/src/externalABIs/GalxePassport.json.mjs +0 -37
- 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/SanctionsList.d.ts +0 -35
- package/common/src/externalABIs/USDC.d.ts +0 -28
- package/common/src/externalABIs/USDR.d.ts +0 -28
- package/common/src/externalABIs/USDR3CRV.d.ts +0 -49
- package/common/src/externalABIs/USDT.d.ts +0 -41
- package/common/src/externalABIs/UniswapV2PoolAbi.json.cjs +0 -1
- package/common/src/externalABIs/UniswapV2PoolAbi.json.mjs +0 -78
- package/common/src/externalABIs/WETH.d.ts +0 -38
- package/common/src/externalABIs/amToken.d.ts +0 -28
- package/common/src/externalABIs/index.cjs +0 -1
- package/common/src/externalABIs/index.d.ts +0 -254
- package/common/src/externalABIs/index.mjs +0 -13
- package/common/src/externalABIs/swapAbi.cjs +0 -1
- package/common/src/externalABIs/swapAbi.d.ts +0 -77
- package/common/src/externalABIs/swapAbi.mjs +0 -249
- package/common/src/functions/auto-deposit-back-helpers/get-gas-token-records.cjs +0 -1
- package/common/src/functions/auto-deposit-back-helpers/get-gas-token-records.d.ts +0 -9
- package/common/src/functions/auto-deposit-back-helpers/get-gas-token-records.mjs +0 -24
- package/common/src/functions/auto-deposit-back-helpers/get-tokens-to-deposit-back.cjs +0 -1
- package/common/src/functions/auto-deposit-back-helpers/get-tokens-to-deposit-back.d.ts +0 -3
- package/common/src/functions/auto-deposit-back-helpers/get-tokens-to-deposit-back.mjs +0 -21
- package/common/src/functions/auto-deposit-back-helpers/index.cjs +0 -1
- package/common/src/functions/auto-deposit-back-helpers/index.d.ts +0 -4
- package/common/src/functions/auto-deposit-back-helpers/index.mjs +0 -4
- package/common/src/functions/auto-deposit-back-helpers/select-gas-token.cjs +0 -1
- package/common/src/functions/auto-deposit-back-helpers/select-gas-token.d.ts +0 -13
- package/common/src/functions/auto-deposit-back-helpers/select-gas-token.mjs +0 -34
- package/common/src/functions/auto-deposit-back-helpers/update-hinkal.cjs +0 -1
- package/common/src/functions/auto-deposit-back-helpers/update-hinkal.d.ts +0 -3
- package/common/src/functions/auto-deposit-back-helpers/update-hinkal.mjs +0 -22
- package/common/src/functions/connectors.types.d.ts +0 -22
- package/common/src/functions/index.cjs +0 -1
- package/common/src/functions/index.d.ts +0 -14
- package/common/src/functions/index.mjs +0 -82
- package/common/src/functions/kyc/aiPriseHelper.d.ts +0 -0
- package/common/src/functions/kyc/checkTokenLimitsUSD.cjs +0 -1
- package/common/src/functions/kyc/checkTokenLimitsUSD.d.ts +0 -1
- package/common/src/functions/kyc/checkTokenLimitsUSD.mjs +0 -29
- package/common/src/functions/kyc/index.cjs +0 -1
- package/common/src/functions/kyc/index.d.ts +0 -4
- package/common/src/functions/kyc/index.mjs +0 -4
- package/common/src/functions/kyc/openDefaultPassportWindow.cjs +0 -1
- package/common/src/functions/kyc/openDefaultPassportWindow.d.ts +0 -1
- package/common/src/functions/kyc/openDefaultPassportWindow.mjs +0 -7
- package/common/src/functions/kyc/passportHelper.cjs +0 -1
- package/common/src/functions/kyc/passportHelper.d.ts +0 -3
- package/common/src/functions/kyc/passportHelper.mjs +0 -1
- package/common/src/functions/kyc/zkMeHelper.cjs +0 -1
- package/common/src/functions/kyc/zkMeHelper.d.ts +0 -4
- package/common/src/functions/kyc/zkMeHelper.mjs +0 -42
- package/common/src/functions/pre-transaction/addressTableLookup.cjs +0 -1
- package/common/src/functions/pre-transaction/addressTableLookup.d.ts +0 -4
- package/common/src/functions/pre-transaction/addressTableLookup.mjs +0 -2
- package/common/src/functions/pre-transaction/buildCommitmentValidationData.cjs +0 -1
- package/common/src/functions/pre-transaction/buildCommitmentValidationData.d.ts +0 -4
- package/common/src/functions/pre-transaction/buildCommitmentValidationData.mjs +0 -53
- package/common/src/functions/pre-transaction/calculateSolanaNullifierCount.cjs +0 -1
- package/common/src/functions/pre-transaction/calculateSolanaNullifierCount.d.ts +0 -2
- package/common/src/functions/pre-transaction/calculateSolanaNullifierCount.mjs +0 -5
- package/common/src/functions/pre-transaction/constructAdminData.cjs +0 -1
- package/common/src/functions/pre-transaction/constructAdminData.d.ts +0 -3
- package/common/src/functions/pre-transaction/constructAdminData.mjs +0 -26
- package/common/src/functions/pre-transaction/convert-okx-instructions.cjs +0 -1
- package/common/src/functions/pre-transaction/convert-okx-instructions.d.ts +0 -11
- package/common/src/functions/pre-transaction/convert-okx-instructions.mjs +0 -34
- package/common/src/functions/pre-transaction/ensureAmountChanges.cjs +0 -1
- package/common/src/functions/pre-transaction/ensureAmountChanges.d.ts +0 -2
- package/common/src/functions/pre-transaction/ensureAmountChanges.mjs +0 -10
- package/common/src/functions/pre-transaction/getExternalSwapAddress.cjs +0 -1
- package/common/src/functions/pre-transaction/getExternalSwapAddress.d.ts +0 -2
- package/common/src/functions/pre-transaction/getExternalSwapAddress.mjs +0 -27
- package/common/src/functions/pre-transaction/getFeeStructure.cjs +0 -1
- package/common/src/functions/pre-transaction/getFeeStructure.d.ts +0 -5
- package/common/src/functions/pre-transaction/getFeeStructure.mjs +0 -20
- package/common/src/functions/pre-transaction/getFlatFees.cjs +0 -1
- package/common/src/functions/pre-transaction/getFlatFees.d.ts +0 -11
- package/common/src/functions/pre-transaction/getFlatFees.mjs +0 -4
- package/common/src/functions/pre-transaction/getKycAndSignatureData.cjs +0 -1
- package/common/src/functions/pre-transaction/getKycAndSignatureData.d.ts +0 -5
- package/common/src/functions/pre-transaction/getKycAndSignatureData.mjs +0 -12
- package/common/src/functions/pre-transaction/getSignatureDataForTransact.cjs +0 -1
- package/common/src/functions/pre-transaction/getSignatureDataForTransact.d.ts +0 -3
- package/common/src/functions/pre-transaction/getSignatureDataForTransact.mjs +0 -6
- package/common/src/functions/pre-transaction/getSolanaCalldataHash.cjs +0 -1
- package/common/src/functions/pre-transaction/getSolanaCalldataHash.d.ts +0 -4
- package/common/src/functions/pre-transaction/getSolanaCalldataHash.mjs +0 -38
- package/common/src/functions/pre-transaction/getVolatileTransferAmount.cjs +0 -1
- package/common/src/functions/pre-transaction/getVolatileTransferAmount.d.ts +0 -9
- package/common/src/functions/pre-transaction/getVolatileTransferAmount.mjs +0 -32
- package/common/src/functions/pre-transaction/index.cjs +0 -1
- package/common/src/functions/pre-transaction/index.d.ts +0 -22
- package/common/src/functions/pre-transaction/index.mjs +0 -21
- package/common/src/functions/pre-transaction/initTokenLimitIfNeeded.cjs +0 -1
- package/common/src/functions/pre-transaction/initTokenLimitIfNeeded.d.ts +0 -3
- package/common/src/functions/pre-transaction/initTokenLimitIfNeeded.mjs +0 -3
- 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/merge-with-fee-structure-emporium.cjs +0 -1
- package/common/src/functions/pre-transaction/merge-with-fee-structure-emporium.d.ts +0 -3
- package/common/src/functions/pre-transaction/merge-with-fee-structure-emporium.mjs +0 -16
- package/common/src/functions/pre-transaction/merge-with-fee-structure.cjs +0 -1
- package/common/src/functions/pre-transaction/merge-with-fee-structure.d.ts +0 -2
- package/common/src/functions/pre-transaction/merge-with-fee-structure.mjs +0 -20
- package/common/src/functions/pre-transaction/outputUtxoProcessing.cjs +0 -1
- package/common/src/functions/pre-transaction/outputUtxoProcessing.d.ts +0 -5
- package/common/src/functions/pre-transaction/outputUtxoProcessing.mjs +0 -30
- package/common/src/functions/pre-transaction/process-gas-estimates.cjs +0 -1
- package/common/src/functions/pre-transaction/process-gas-estimates.d.ts +0 -5
- package/common/src/functions/pre-transaction/process-gas-estimates.mjs +0 -25
- 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 -30
- package/common/src/functions/pre-transaction/sendInitNullifiersTransaction.cjs +0 -1
- package/common/src/functions/pre-transaction/sendInitNullifiersTransaction.d.ts +0 -11
- package/common/src/functions/pre-transaction/sendInitNullifiersTransaction.mjs +0 -3
- package/common/src/functions/pre-transaction/sendV0Transaction.cjs +0 -1
- package/common/src/functions/pre-transaction/sendV0Transaction.d.ts +0 -18
- package/common/src/functions/pre-transaction/sendV0Transaction.mjs +0 -81
- package/common/src/functions/pre-transaction/shouldPatchAccessTokenMerkleTree.cjs +0 -1
- package/common/src/functions/pre-transaction/shouldPatchAccessTokenMerkleTree.d.ts +0 -6
- package/common/src/functions/pre-transaction/shouldPatchAccessTokenMerkleTree.mjs +0 -11
- package/common/src/functions/pre-transaction/solana-public-signals.d.ts +0 -20
- package/common/src/functions/pre-transaction/solana.cjs +0 -1
- package/common/src/functions/pre-transaction/solana.d.ts +0 -18
- package/common/src/functions/pre-transaction/solana.mjs +0 -50
- package/common/src/functions/pre-transaction/solanaTransfer.utils.cjs +0 -1
- package/common/src/functions/pre-transaction/solanaTransfer.utils.d.ts +0 -6
- package/common/src/functions/pre-transaction/solanaTransfer.utils.mjs +0 -22
- package/common/src/functions/pre-transaction/store-instructions.cjs +0 -1
- package/common/src/functions/pre-transaction/store-instructions.d.ts +0 -4
- package/common/src/functions/pre-transaction/store-instructions.mjs +0 -2
- package/common/src/functions/pre-transaction/store-proof.cjs +0 -1
- package/common/src/functions/pre-transaction/store-proof.d.ts +0 -7
- package/common/src/functions/pre-transaction/store-proof.mjs +0 -3
- package/common/src/functions/pre-transaction/waitForDepositedUtxosInMerkleTree.cjs +0 -1
- package/common/src/functions/pre-transaction/waitForDepositedUtxosInMerkleTree.d.ts +0 -3
- package/common/src/functions/pre-transaction/waitForDepositedUtxosInMerkleTree.mjs +0 -29
- package/common/src/functions/private-wallet/emporium.helpers.cjs +0 -1
- package/common/src/functions/private-wallet/emporium.helpers.d.ts +0 -37
- package/common/src/functions/private-wallet/emporium.helpers.mjs +0 -129
- package/common/src/functions/private-wallet/emporium.swap.helpers.cjs +0 -1
- package/common/src/functions/private-wallet/emporium.swap.helpers.d.ts +0 -4
- package/common/src/functions/private-wallet/emporium.swap.helpers.mjs +0 -108
- package/common/src/functions/private-wallet/index.cjs +0 -1
- package/common/src/functions/private-wallet/index.d.ts +0 -3
- package/common/src/functions/private-wallet/index.mjs +0 -3
- 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/common.snarkjs.cjs +0 -1
- package/common/src/functions/snarkjs/common.snarkjs.d.ts +0 -28
- package/common/src/functions/snarkjs/common.snarkjs.mjs +0 -89
- package/common/src/functions/snarkjs/constant.cjs +0 -1
- package/common/src/functions/snarkjs/constant.d.ts +0 -425
- package/common/src/functions/snarkjs/constant.mjs +0 -431
- package/common/src/functions/snarkjs/constructEmporiumProof.cjs +0 -1
- package/common/src/functions/snarkjs/constructEmporiumProof.d.ts +0 -13
- package/common/src/functions/snarkjs/constructEmporiumProof.mjs +0 -69
- package/common/src/functions/snarkjs/constructGeneralZkProof.cjs +0 -1
- package/common/src/functions/snarkjs/constructGeneralZkProof.d.ts +0 -13
- package/common/src/functions/snarkjs/constructGeneralZkProof.mjs +0 -54
- package/common/src/functions/snarkjs/constructSolanaZkProof.cjs +0 -1
- package/common/src/functions/snarkjs/constructSolanaZkProof.d.ts +0 -13
- package/common/src/functions/snarkjs/constructSolanaZkProof.mjs +0 -44
- package/common/src/functions/snarkjs/fetchMerkleTreeSiblings.cjs +0 -1
- package/common/src/functions/snarkjs/fetchMerkleTreeSiblings.d.ts +0 -11
- package/common/src/functions/snarkjs/fetchMerkleTreeSiblings.mjs +0 -18
- package/common/src/functions/snarkjs/fetchOnChainRootHashes.cjs +0 -1
- package/common/src/functions/snarkjs/fetchOnChainRootHashes.d.ts +0 -4
- package/common/src/functions/snarkjs/fetchOnChainRootHashes.mjs +0 -37
- package/common/src/functions/snarkjs/generateCircomData.cjs +0 -1
- package/common/src/functions/snarkjs/generateCircomData.d.ts +0 -5
- package/common/src/functions/snarkjs/generateCircomData.mjs +0 -35
- package/common/src/functions/snarkjs/generateZkProof.cjs +0 -1
- package/common/src/functions/snarkjs/generateZkProof.d.ts +0 -5
- package/common/src/functions/snarkjs/generateZkProof.mjs +0 -14
- 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/snarkjs/generateZkProofSelf.cjs +0 -1
- package/common/src/functions/snarkjs/generateZkProofSelf.d.ts +0 -5
- package/common/src/functions/snarkjs/generateZkProofSelf.mjs +0 -25
- package/common/src/functions/snarkjs/getMerkleTreeSiblingsAndRootHashes.cjs +0 -1
- package/common/src/functions/snarkjs/getMerkleTreeSiblingsAndRootHashes.d.ts +0 -23
- package/common/src/functions/snarkjs/getMerkleTreeSiblingsAndRootHashes.mjs +0 -131
- package/common/src/functions/snarkjs/getOriginalSender.cjs +0 -1
- package/common/src/functions/snarkjs/getOriginalSender.d.ts +0 -1
- package/common/src/functions/snarkjs/getOriginalSender.mjs +0 -5
- package/common/src/functions/snarkjs/getZKFiles.cjs +0 -1
- package/common/src/functions/snarkjs/getZKFiles.d.ts +0 -3
- package/common/src/functions/snarkjs/getZKFiles.mjs +0 -7
- package/common/src/functions/snarkjs/index.cjs +0 -1
- package/common/src/functions/snarkjs/index.d.ts +0 -7
- package/common/src/functions/snarkjs/index.mjs +0 -7
- package/common/src/functions/snarkjs/verifyCommitmentValidationData.cjs +0 -1
- package/common/src/functions/snarkjs/verifyCommitmentValidationData.d.ts +0 -4
- package/common/src/functions/snarkjs/verifyCommitmentValidationData.mjs +0 -6
- package/common/src/functions/utils/addresses.cjs +0 -1
- package/common/src/functions/utils/addresses.d.ts +0 -10
- package/common/src/functions/utils/addresses.mjs +0 -28
- package/common/src/functions/utils/amounts.utils.cjs +0 -1
- package/common/src/functions/utils/amounts.utils.d.ts +0 -25
- package/common/src/functions/utils/amounts.utils.mjs +0 -29
- package/common/src/functions/utils/arraysMatch.d.ts +0 -1
- package/common/src/functions/utils/auth.utils.cjs +0 -1
- package/common/src/functions/utils/auth.utils.d.ts +0 -5
- package/common/src/functions/utils/auth.utils.mjs +0 -7
- package/common/src/functions/utils/buildClaimableDepositPlan.cjs +0 -1
- package/common/src/functions/utils/buildClaimableDepositPlan.d.ts +0 -15
- package/common/src/functions/utils/buildClaimableDepositPlan.mjs +0 -3
- package/common/src/functions/utils/bytes32.utils.cjs +0 -1
- package/common/src/functions/utils/bytes32.utils.d.ts +0 -2
- package/common/src/functions/utils/bytes32.utils.mjs +0 -9
- package/common/src/functions/utils/cacheDevice.utils.cjs +0 -1
- package/common/src/functions/utils/cacheDevice.utils.d.ts +0 -3
- package/common/src/functions/utils/cacheDevice.utils.mjs +0 -17
- package/common/src/functions/utils/cacheFunctions.cjs +0 -1
- package/common/src/functions/utils/cacheFunctions.d.ts +0 -20
- package/common/src/functions/utils/cacheFunctions.mjs +0 -25
- package/common/src/functions/utils/caseInsensitive.utils.cjs +0 -1
- package/common/src/functions/utils/caseInsensitive.utils.d.ts +0 -3
- package/common/src/functions/utils/caseInsensitive.utils.mjs +0 -4
- package/common/src/functions/utils/convertEmporiumOpToCallInfo.cjs +0 -1
- package/common/src/functions/utils/convertEmporiumOpToCallInfo.d.ts +0 -2
- package/common/src/functions/utils/convertEmporiumOpToCallInfo.mjs +0 -19
- package/common/src/functions/utils/convertIntegrationProviderToExternalActionId.cjs +0 -1
- package/common/src/functions/utils/convertIntegrationProviderToExternalActionId.d.ts +0 -3
- package/common/src/functions/utils/convertIntegrationProviderToExternalActionId.mjs +0 -4
- package/common/src/functions/utils/create-provider.cjs +0 -1
- package/common/src/functions/utils/create-provider.d.ts +0 -4
- package/common/src/functions/utils/create-provider.mjs +0 -11
- package/common/src/functions/utils/deposit-claimable.utils.cjs +0 -1
- package/common/src/functions/utils/deposit-claimable.utils.d.ts +0 -6
- package/common/src/functions/utils/deposit-claimable.utils.mjs +0 -12
- package/common/src/functions/utils/dispatchBalanceRefreshes.cjs +0 -1
- package/common/src/functions/utils/dispatchBalanceRefreshes.d.ts +0 -4
- package/common/src/functions/utils/dispatchBalanceRefreshes.mjs +0 -4
- package/common/src/functions/utils/enclave-recipient-info-storage.cjs +0 -1
- package/common/src/functions/utils/enclave-recipient-info-storage.d.ts +0 -2
- package/common/src/functions/utils/enclave-recipient-info-storage.mjs +0 -2
- package/common/src/functions/utils/enclave-signature-storage.cjs +0 -1
- package/common/src/functions/utils/enclave-signature-storage.d.ts +0 -2
- package/common/src/functions/utils/enclave-signature-storage.mjs +0 -2
- package/common/src/functions/utils/enclave-utxo-storage.cjs +0 -1
- package/common/src/functions/utils/enclave-utxo-storage.d.ts +0 -6
- package/common/src/functions/utils/enclave-utxo-storage.mjs +0 -4
- package/common/src/functions/utils/encodeTokenWithId.cjs +0 -1
- package/common/src/functions/utils/encodeTokenWithId.d.ts +0 -2
- package/common/src/functions/utils/encodeTokenWithId.mjs +0 -8
- package/common/src/functions/utils/encryptInputForEnclave.cjs +0 -1
- package/common/src/functions/utils/encryptInputForEnclave.d.ts +0 -8
- package/common/src/functions/utils/encryptInputForEnclave.mjs +0 -34
- package/common/src/functions/utils/enum.utils.cjs +0 -1
- package/common/src/functions/utils/enum.utils.d.ts +0 -9
- package/common/src/functions/utils/enum.utils.mjs +0 -12
- package/common/src/functions/utils/erc20tokenFunctions.cjs +0 -1
- package/common/src/functions/utils/erc20tokenFunctions.d.ts +0 -15
- package/common/src/functions/utils/erc20tokenFunctions.mjs +0 -23
- package/common/src/functions/utils/evmNetworkFunctions.cjs +0 -1
- package/common/src/functions/utils/evmNetworkFunctions.d.ts +0 -3
- package/common/src/functions/utils/evmNetworkFunctions.mjs +0 -1
- package/common/src/functions/utils/external-action.utils.cjs +0 -1
- package/common/src/functions/utils/external-action.utils.d.ts +0 -3
- package/common/src/functions/utils/external-action.utils.mjs +0 -6
- package/common/src/functions/utils/fees.utils.cjs +0 -1
- package/common/src/functions/utils/fees.utils.d.ts +0 -5
- package/common/src/functions/utils/fees.utils.mjs +0 -26
- package/common/src/functions/utils/formatter.cjs +0 -1
- package/common/src/functions/utils/formatter.d.ts +0 -1
- package/common/src/functions/utils/formatter.mjs +0 -1
- 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/getBlockExplorerUrl.cjs +0 -1
- package/common/src/functions/utils/getBlockExplorerUrl.d.ts +0 -1
- package/common/src/functions/utils/getBlockExplorerUrl.mjs +0 -1
- package/common/src/functions/utils/getContractAddress.cjs +0 -1
- package/common/src/functions/utils/getContractAddress.d.ts +0 -2
- package/common/src/functions/utils/getContractAddress.mjs +0 -8
- package/common/src/functions/utils/getDataFromTransaction.d.ts +0 -33
- package/common/src/functions/utils/getRecipientInfoFromUserKeys.cjs +0 -1
- package/common/src/functions/utils/getRecipientInfoFromUserKeys.d.ts +0 -2
- package/common/src/functions/utils/getRecipientInfoFromUserKeys.mjs +0 -15
- package/common/src/functions/utils/getSignerFromContract.cjs +0 -1
- package/common/src/functions/utils/getSignerFromContract.d.ts +0 -3
- package/common/src/functions/utils/getSignerFromContract.mjs +0 -13
- package/common/src/functions/utils/getUtxosFromReceipt.utils.cjs +0 -1
- package/common/src/functions/utils/getUtxosFromReceipt.utils.d.ts +0 -6
- package/common/src/functions/utils/getUtxosFromReceipt.utils.mjs +0 -31
- package/common/src/functions/utils/getUtxosFromReceiptSolana.cjs +0 -1
- package/common/src/functions/utils/getUtxosFromReceiptSolana.d.ts +0 -7
- package/common/src/functions/utils/getUtxosFromReceiptSolana.mjs +0 -22
- package/common/src/functions/utils/getWalletGroupKey.utils.d.ts +0 -1
- package/common/src/functions/utils/inLogicMetadata.cjs +0 -1
- package/common/src/functions/utils/inLogicMetadata.d.ts +0 -2
- package/common/src/functions/utils/inLogicMetadata.mjs +0 -1
- package/common/src/functions/utils/index.cjs +0 -1
- package/common/src/functions/utils/index.d.ts +0 -66
- package/common/src/functions/utils/index.mjs +0 -68
- package/common/src/functions/utils/involves-permit2-op.cjs +0 -1
- package/common/src/functions/utils/involves-permit2-op.d.ts +0 -7
- package/common/src/functions/utils/involves-permit2-op.mjs +0 -5
- package/common/src/functions/utils/ipfs.cjs +0 -1
- package/common/src/functions/utils/ipfs.d.ts +0 -8
- package/common/src/functions/utils/ipfs.mjs +0 -1
- package/common/src/functions/utils/is-valid-url.d.ts +0 -1
- package/common/src/functions/utils/lifi.utils.cjs +0 -1
- package/common/src/functions/utils/lifi.utils.d.ts +0 -3
- package/common/src/functions/utils/lifi.utils.mjs +0 -4
- package/common/src/functions/utils/memoize.utils.d.ts +0 -1
- package/common/src/functions/utils/merkleTree.utils.cjs +0 -1
- package/common/src/functions/utils/merkleTree.utils.d.ts +0 -2
- package/common/src/functions/utils/merkleTree.utils.mjs +0 -10
- package/common/src/functions/utils/mutexes.utils.cjs +0 -1
- package/common/src/functions/utils/mutexes.utils.d.ts +0 -2
- package/common/src/functions/utils/mutexes.utils.mjs +0 -5
- package/common/src/functions/utils/networks.utils.cjs +0 -1
- package/common/src/functions/utils/networks.utils.d.ts +0 -1
- package/common/src/functions/utils/networks.utils.mjs +0 -1
- package/common/src/functions/utils/nftTokenFunctions.cjs +0 -1
- package/common/src/functions/utils/nftTokenFunctions.d.ts +0 -2
- package/common/src/functions/utils/nftTokenFunctions.mjs +0 -2
- package/common/src/functions/utils/nickname.utils.d.ts +0 -1
- package/common/src/functions/utils/pay-routing.utils.d.ts +0 -4
- package/common/src/functions/utils/postToOffscreen.cjs +0 -1
- package/common/src/functions/utils/postToOffscreen.d.ts +0 -2
- package/common/src/functions/utils/postToOffscreen.mjs +0 -9
- package/common/src/functions/utils/prepareHinkal.cjs +0 -1
- package/common/src/functions/utils/prepareHinkal.d.ts +0 -11
- package/common/src/functions/utils/prepareHinkal.mjs +0 -7
- package/common/src/functions/utils/process.utils.cjs +0 -1
- package/common/src/functions/utils/process.utils.d.ts +0 -13
- package/common/src/functions/utils/process.utils.mjs +0 -15
- package/common/src/functions/utils/proxyAvatar.utils.d.ts +0 -2
- package/common/src/functions/utils/publicBalance.utils.cjs +0 -1
- package/common/src/functions/utils/publicBalance.utils.d.ts +0 -7
- package/common/src/functions/utils/publicBalance.utils.mjs +0 -36
- package/common/src/functions/utils/reloadPage.cjs +0 -1
- package/common/src/functions/utils/reloadPage.d.ts +0 -1
- package/common/src/functions/utils/reloadPage.mjs +0 -4
- package/common/src/functions/utils/requireEnv.d.ts +0 -1
- package/common/src/functions/utils/resolve-sync.utils.cjs +0 -1
- package/common/src/functions/utils/resolve-sync.utils.d.ts +0 -6
- package/common/src/functions/utils/resolve-sync.utils.mjs +0 -20
- package/common/src/functions/utils/rpc-int-encode.cjs +0 -1
- package/common/src/functions/utils/rpc-int-encode.d.ts +0 -1
- package/common/src/functions/utils/rpc-int-encode.mjs +0 -1
- package/common/src/functions/utils/serialize-utxos.utils.d.ts +0 -3
- package/common/src/functions/utils/serialize.utils.cjs +0 -1
- package/common/src/functions/utils/serialize.utils.d.ts +0 -10
- package/common/src/functions/utils/serialize.utils.mjs +0 -7
- package/common/src/functions/utils/solanaMint.utils.cjs +0 -1
- package/common/src/functions/utils/solanaMint.utils.d.ts +0 -10
- package/common/src/functions/utils/solanaMint.utils.mjs +0 -18
- package/common/src/functions/utils/string.utils.cjs +0 -1
- package/common/src/functions/utils/string.utils.d.ts +0 -16
- package/common/src/functions/utils/string.utils.mjs +0 -18
- package/common/src/functions/utils/time.utils.cjs +0 -1
- package/common/src/functions/utils/time.utils.d.ts +0 -19
- package/common/src/functions/utils/time.utils.mjs +0 -8
- package/common/src/functions/utils/token-check.utils.cjs +0 -1
- package/common/src/functions/utils/token-check.utils.d.ts +0 -5
- package/common/src/functions/utils/token-check.utils.mjs +0 -13
- package/common/src/functions/utils/transfer-claimable.utils.cjs +0 -1
- package/common/src/functions/utils/transfer-claimable.utils.d.ts +0 -9
- package/common/src/functions/utils/transfer-claimable.utils.mjs +0 -12
- package/common/src/functions/utils/trimFieldValues.d.ts +0 -4
- package/common/src/functions/utils/tron.utils.cjs +0 -1
- package/common/src/functions/utils/tron.utils.d.ts +0 -33
- package/common/src/functions/utils/tron.utils.mjs +0 -149
- package/common/src/functions/utils/tronSimulation.utils.cjs +0 -1
- package/common/src/functions/utils/tronSimulation.utils.d.ts +0 -1
- package/common/src/functions/utils/tronSimulation.utils.mjs +0 -25
- package/common/src/functions/utils/tx-confirmation.utils.cjs +0 -1
- package/common/src/functions/utils/tx-confirmation.utils.d.ts +0 -10
- package/common/src/functions/utils/tx-confirmation.utils.mjs +0 -34
- package/common/src/functions/utils/upToDateState.cjs +0 -1
- package/common/src/functions/utils/upToDateState.d.ts +0 -2
- package/common/src/functions/utils/upToDateState.mjs +0 -9
- package/common/src/functions/utils/userAgent.cjs +0 -1
- package/common/src/functions/utils/userAgent.d.ts +0 -1
- package/common/src/functions/utils/userAgent.mjs +0 -3
- package/common/src/functions/utils/validateUsername.d.ts +0 -5
- package/common/src/functions/utils/walletBalances.utils.cjs +0 -1
- package/common/src/functions/utils/walletBalances.utils.d.ts +0 -2
- package/common/src/functions/utils/walletBalances.utils.mjs +0 -1
- package/common/src/functions/web3/EIP-712.cjs +0 -1
- package/common/src/functions/web3/EIP-712.d.ts +0 -23
- package/common/src/functions/web3/EIP-712.mjs +0 -1
- package/common/src/functions/web3/connectors.utils.cjs +0 -1
- package/common/src/functions/web3/connectors.utils.d.ts +0 -7
- package/common/src/functions/web3/connectors.utils.mjs +0 -1
- package/common/src/functions/web3/crypto.d.ts +0 -1
- package/common/src/functions/web3/etherFunctions.cjs +0 -1
- package/common/src/functions/web3/etherFunctions.d.ts +0 -20
- package/common/src/functions/web3/etherFunctions.mjs +0 -21
- package/common/src/functions/web3/events/balanceChangedHandler.cjs +0 -1
- package/common/src/functions/web3/events/balanceChangedHandler.d.ts +0 -5
- package/common/src/functions/web3/events/balanceChangedHandler.mjs +0 -21
- package/common/src/functions/web3/events/getInputUtxoAndBalance.cjs +0 -1
- package/common/src/functions/web3/events/getInputUtxoAndBalance.d.ts +0 -38
- package/common/src/functions/web3/events/getInputUtxoAndBalance.mjs +0 -111
- package/common/src/functions/web3/events/getInputUtxosEnclave.cjs +0 -1
- package/common/src/functions/web3/events/getInputUtxosEnclave.d.ts +0 -8
- package/common/src/functions/web3/events/getInputUtxosEnclave.mjs +0 -52
- package/common/src/functions/web3/events/getShieldedBalance.cjs +0 -1
- package/common/src/functions/web3/events/getShieldedBalance.d.ts +0 -18
- package/common/src/functions/web3/events/getShieldedBalance.mjs +0 -98
- package/common/src/functions/web3/events/getTransactionLogEvents.cjs +0 -1
- package/common/src/functions/web3/events/getTransactionLogEvents.d.ts +0 -13
- package/common/src/functions/web3/events/getTransactionLogEvents.mjs +0 -2
- package/common/src/functions/web3/events/index.cjs +0 -1
- package/common/src/functions/web3/events/index.d.ts +0 -4
- package/common/src/functions/web3/events/index.mjs +0 -4
- package/common/src/functions/web3/fetchSolanaMerkleTreeRootHash.cjs +0 -1
- package/common/src/functions/web3/fetchSolanaMerkleTreeRootHash.d.ts +0 -3
- package/common/src/functions/web3/fetchSolanaMerkleTreeRootHash.mjs +0 -9
- package/common/src/functions/web3/functionCalls/accessTokenCalls.cjs +0 -1
- package/common/src/functions/web3/functionCalls/accessTokenCalls.d.ts +0 -2
- package/common/src/functions/web3/functionCalls/accessTokenCalls.mjs +0 -19
- package/common/src/functions/web3/functionCalls/approveToken.cjs +0 -1
- package/common/src/functions/web3/functionCalls/approveToken.d.ts +0 -4
- package/common/src/functions/web3/functionCalls/approveToken.mjs +0 -113
- package/common/src/functions/web3/functionCalls/approveTokensToHinkal.cjs +0 -1
- package/common/src/functions/web3/functionCalls/approveTokensToHinkal.d.ts +0 -4
- package/common/src/functions/web3/functionCalls/approveTokensToHinkal.mjs +0 -11
- package/common/src/functions/web3/functionCalls/constructBatchCall.cjs +0 -1
- package/common/src/functions/web3/functionCalls/constructBatchCall.d.ts +0 -6
- package/common/src/functions/web3/functionCalls/constructBatchCall.mjs +0 -51
- package/common/src/functions/web3/functionCalls/estimateGasRelayer.d.ts +0 -4
- package/common/src/functions/web3/functionCalls/getRootHash.d.ts +0 -2
- package/common/src/functions/web3/functionCalls/recoverTransactionFromError.cjs +0 -1
- package/common/src/functions/web3/functionCalls/recoverTransactionFromError.d.ts +0 -2
- package/common/src/functions/web3/functionCalls/recoverTransactionFromError.mjs +0 -18
- package/common/src/functions/web3/functionCalls/relayFunctions.d.ts +0 -3
- package/common/src/functions/web3/functionCalls/transactCallDirect.cjs +0 -1
- package/common/src/functions/web3/functionCalls/transactCallDirect.d.ts +0 -6
- package/common/src/functions/web3/functionCalls/transactCallDirect.mjs +0 -60
- package/common/src/functions/web3/functionCalls/transactCallDirectTron.cjs +0 -1
- package/common/src/functions/web3/functionCalls/transactCallDirectTron.d.ts +0 -9
- package/common/src/functions/web3/functionCalls/transactCallDirectTron.mjs +0 -81
- package/common/src/functions/web3/functionCalls/transactCallRelayer.cjs +0 -1
- package/common/src/functions/web3/functionCalls/transactCallRelayer.d.ts +0 -37
- package/common/src/functions/web3/functionCalls/transactCallRelayer.mjs +0 -63
- package/common/src/functions/web3/functionCalls/waitForErc20Approvals.cjs +0 -1
- package/common/src/functions/web3/functionCalls/waitForErc20Approvals.d.ts +0 -11
- package/common/src/functions/web3/functionCalls/waitForErc20Approvals.mjs +0 -41
- package/common/src/functions/web3/getContractMetadata.cjs +0 -1
- package/common/src/functions/web3/getContractMetadata.d.ts +0 -5
- package/common/src/functions/web3/getContractMetadata.mjs +0 -23
- package/common/src/functions/web3/getPublicAddressBalance.cjs +0 -1
- package/common/src/functions/web3/getPublicAddressBalance.d.ts +0 -2
- package/common/src/functions/web3/getPublicAddressBalance.mjs +0 -10
- 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/getTokenHolder.cjs +0 -1
- package/common/src/functions/web3/getTokenHolder.d.ts +0 -1
- package/common/src/functions/web3/getTokenHolder.mjs +0 -7
- package/common/src/functions/web3/index.cjs +0 -1
- package/common/src/functions/web3/index.d.ts +0 -14
- package/common/src/functions/web3/index.mjs +0 -16
- package/common/src/functions/web3/lifiAPI.cjs +0 -1
- package/common/src/functions/web3/lifiAPI.d.ts +0 -6
- package/common/src/functions/web3/lifiAPI.mjs +0 -37
- 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/okxAPI.cjs +0 -1
- package/common/src/functions/web3/okxAPI.d.ts +0 -8
- package/common/src/functions/web3/okxAPI.mjs +0 -33
- 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/runContractFunction.cjs +0 -1
- package/common/src/functions/web3/runContractFunction.d.ts +0 -16
- package/common/src/functions/web3/runContractFunction.mjs +0 -1
- package/common/src/functions/web3/signAndSendSerializedTransaction.cjs +0 -1
- package/common/src/functions/web3/signAndSendSerializedTransaction.d.ts +0 -2
- package/common/src/functions/web3/signAndSendSerializedTransaction.mjs +0 -14
- 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/index.d.ts +0 -9
- package/common/src/mutexes/index.d.ts +0 -1
- package/common/src/mutexes/mutex.cjs +0 -1
- package/common/src/mutexes/mutex.d.ts +0 -2
- package/common/src/mutexes/mutex.mjs +0 -3
- package/common/src/providers/EthersProviderAdapter.cjs +0 -1
- package/common/src/providers/EthersProviderAdapter.d.ts +0 -36
- package/common/src/providers/EthersProviderAdapter.mjs +0 -101
- package/common/src/providers/SolanaProviderAdapter.cjs +0 -1
- package/common/src/providers/SolanaProviderAdapter.d.ts +0 -52
- package/common/src/providers/SolanaProviderAdapter.mjs +0 -147
- package/common/src/providers/TronProviderAdapter.cjs +0 -1
- package/common/src/providers/TronProviderAdapter.d.ts +0 -39
- package/common/src/providers/TronProviderAdapter.mjs +0 -97
- package/common/src/providers/WagmiProviderAdapter.cjs +0 -1
- package/common/src/providers/WagmiProviderAdapter.d.ts +0 -46
- package/common/src/providers/WagmiProviderAdapter.mjs +0 -189
- package/common/src/providers/exportProviers.d.ts +0 -3
- package/common/src/types/API.types.d.ts +0 -25
- package/common/src/types/ICacheDevice.d.ts +0 -5
- package/common/src/types/IMultiThreadedUtxoUtils.d.ts +0 -8
- package/common/src/types/RewardUserEnums.d.ts +0 -11
- package/common/src/types/TransactionSimulator.types.d.ts +0 -16
- package/common/src/types/WeeklyAnalytics.types.d.ts +0 -37
- package/common/src/types/activities.types.cjs +0 -1
- package/common/src/types/activities.types.d.ts +0 -77
- package/common/src/types/activities.types.mjs +0 -10
- package/common/src/types/admin.types.cjs +0 -1
- package/common/src/types/admin.types.d.ts +0 -49
- package/common/src/types/admin.types.mjs +0 -6
- package/common/src/types/all-points.types.d.ts +0 -7
- package/common/src/types/approvals.types.d.ts +0 -41
- package/common/src/types/balances.types.cjs +0 -1
- package/common/src/types/balances.types.d.ts +0 -39
- package/common/src/types/balances.types.mjs +0 -6
- package/common/src/types/big-intable.types.d.ts +0 -3
- package/common/src/types/bridging-tx.types.d.ts +0 -17
- package/common/src/types/brotherhood-user.types.d.ts +0 -11
- package/common/src/types/cache.types.cjs +0 -1
- package/common/src/types/cache.types.d.ts +0 -57
- package/common/src/types/cache.types.mjs +0 -6
- package/common/src/types/chains.types.cjs +0 -1
- package/common/src/types/chains.types.d.ts +0 -10
- package/common/src/types/chains.types.mjs +0 -8
- package/common/src/types/circom-data.types.cjs +0 -1
- package/common/src/types/circom-data.types.d.ts +0 -107
- package/common/src/types/circom-data.types.mjs +0 -10
- package/common/src/types/coingecko.types.d.ts +0 -220
- package/common/src/types/commitments.types.d.ts +0 -42
- package/common/src/types/confirmation-request.types.d.ts +0 -10
- package/common/src/types/connector.types.d.ts +0 -5
- package/common/src/types/contacts.types.d.ts +0 -7
- package/common/src/types/crypto.types.d.ts +0 -8
- package/common/src/types/dashboard-account.d.ts +0 -101
- package/common/src/types/dashboard-payout.types.d.ts +0 -29
- package/common/src/types/dashboard-transaction.types.d.ts +0 -22
- package/common/src/types/eip5792.types.cjs +0 -1
- package/common/src/types/eip5792.types.d.ts +0 -33
- package/common/src/types/eip5792.types.mjs +0 -6
- package/common/src/types/ethereum-network.types.cjs +0 -1
- package/common/src/types/ethereum-network.types.d.ts +0 -65
- package/common/src/types/ethereum-network.types.mjs +0 -6
- package/common/src/types/events.types.cjs +0 -1
- package/common/src/types/events.types.d.ts +0 -6
- package/common/src/types/events.types.mjs +0 -6
- package/common/src/types/external-action.types.cjs +0 -1
- package/common/src/types/external-action.types.d.ts +0 -17
- package/common/src/types/external-action.types.mjs +0 -6
- package/common/src/types/fee.types.cjs +0 -1
- package/common/src/types/fee.types.d.ts +0 -13
- package/common/src/types/fee.types.mjs +0 -6
- package/common/src/types/generatePoints.d.ts +0 -14
- package/common/src/types/hinkal.types.cjs +0 -1
- package/common/src/types/hinkal.types.d.ts +0 -104
- package/common/src/types/hinkal.types.mjs +0 -29
- package/common/src/types/http.types.d.ts +0 -8
- package/common/src/types/index.cjs +0 -1
- package/common/src/types/index.d.ts +0 -60
- package/common/src/types/index.mjs +0 -19
- package/common/src/types/kyc.types.cjs +0 -1
- package/common/src/types/kyc.types.d.ts +0 -41
- package/common/src/types/kyc.types.mjs +0 -10
- package/common/src/types/message.types.d.ts +0 -5
- package/common/src/types/new-rewards.type.cjs +0 -1
- package/common/src/types/new-rewards.type.d.ts +0 -153
- package/common/src/types/new-rewards.type.mjs +0 -10
- package/common/src/types/offscreen.types.cjs +0 -1
- package/common/src/types/offscreen.types.d.ts +0 -9
- package/common/src/types/offscreen.types.mjs +0 -6
- package/common/src/types/okx.types.d.ts +0 -57
- package/common/src/types/onramp.types.d.ts +0 -58
- package/common/src/types/pay-activities.types.d.ts +0 -32
- package/common/src/types/pay-routing.types.d.ts +0 -9
- package/common/src/types/presaleReferral.types.d.ts +0 -4
- package/common/src/types/proxy.types.d.ts +0 -19
- package/common/src/types/referral.types.d.ts +0 -12
- package/common/src/types/remote-proof.types.d.ts +0 -15
- package/common/src/types/rewards.types.d.ts +0 -34
- package/common/src/types/schedule.types.cjs +0 -1
- package/common/src/types/schedule.types.d.ts +0 -7
- package/common/src/types/schedule.types.mjs +0 -6
- package/common/src/types/scheduled-transactions.types.cjs +0 -1
- package/common/src/types/scheduled-transactions.types.d.ts +0 -42
- package/common/src/types/scheduled-transactions.types.mjs +0 -6
- package/common/src/types/session.types.d.ts +0 -13
- package/common/src/types/signature.types.d.ts +0 -10
- package/common/src/types/slippage.types.d.ts +0 -3
- package/common/src/types/snark.types.d.ts +0 -40
- package/common/src/types/solana.types.d.ts +0 -91
- package/common/src/types/tenderly.api.types.d.ts +0 -196
- package/common/src/types/token-prices.types.d.ts +0 -18
- package/common/src/types/token-with-id.types.d.ts +0 -4
- package/common/src/types/token.types.cjs +0 -1
- package/common/src/types/token.types.d.ts +0 -88
- package/common/src/types/token.types.mjs +0 -6
- package/common/src/types/transaction.types.cjs +0 -1
- package/common/src/types/transaction.types.d.ts +0 -161
- package/common/src/types/transaction.types.mjs +0 -6
- package/common/src/types/transactions.types.cjs +0 -1
- package/common/src/types/transactions.types.d.ts +0 -79
- package/common/src/types/transactions.types.mjs +0 -8
- package/common/src/types/tron.types.d.ts +0 -15
- package/common/src/types/wc.types.d.ts +0 -78
- package/common/src/types/with-id.types.d.ts +0 -3
- package/common/src/webworker/WorkerWrapper.cjs +0 -1
- package/common/src/webworker/WorkerWrapper.d.ts +0 -9
- package/common/src/webworker/WorkerWrapper.mjs +0 -22
- package/common/src/webworker/logError-D6lww9H-.js +0 -2
- package/common/src/webworker/package.json +0 -110
- package/common/src/webworker/performTaskWithWorker.cjs +0 -1
- package/common/src/webworker/performTaskWithWorker.d.ts +0 -5
- package/common/src/webworker/performTaskWithWorker.mjs +0 -39
- package/common/src/webworker/snarkjsWorker/snarkjsWorker.types.cjs +0 -1
- package/common/src/webworker/snarkjsWorker/snarkjsWorker.types.d.ts +0 -14
- package/common/src/webworker/snarkjsWorker/snarkjsWorker.types.mjs +0 -6
- package/common/src/webworker/snarkjsWorker/snarkjsWorkerLauncher.d.ts +0 -1
- package/common/src/webworker/snarkjsWorker/snarkjsWorkerLauncher.ts?worker&url.cjs +0 -1
- package/common/src/webworker/snarkjsWorker/snarkjsWorkerLauncher.ts?worker&url.mjs +0 -4
- package/common/src/webworker/snarkjsWorker/snarkjsWorkerLogic.d.ts +0 -2
- package/common/src/webworker/snarkjsWorker/snarkjsWorkerNode.d.ts +0 -0
- package/common/src/webworker/snarkjsWorkerNode.cjs +0 -3
- package/common/src/webworker/utxoWorker/utxoWorker.types.cjs +0 -1
- package/common/src/webworker/utxoWorker/utxoWorker.types.d.ts +0 -31
- package/common/src/webworker/utxoWorker/utxoWorker.types.mjs +0 -6
- package/common/src/webworker/utxoWorker/utxoWorkerLauncher.d.ts +0 -1
- package/common/src/webworker/utxoWorker/utxoWorkerLauncher.ts?worker&url.cjs +0 -1
- package/common/src/webworker/utxoWorker/utxoWorkerLauncher.ts?worker&url.mjs +0 -4
- package/common/src/webworker/utxoWorker/utxoWorkerLogic.d.ts +0 -5
- package/common/src/webworker/utxoWorker/utxoWorkerNode.d.ts +0 -0
- package/common/src/webworker/utxoWorkerNode.cjs +0 -1
- package/common/src/webworker/viteWorkerURL.constant.cjs +0 -21
- package/common/src/webworker/viteWorkerURL.constant.d.ts +0 -9
- package/common/src/webworker/viteWorkerURL.constant.mjs +0 -21
- package/common/src/webworker/worker.registry.cjs +0 -1
- package/common/src/webworker/worker.registry.d.ts +0 -10
- package/common/src/webworker/worker.registry.mjs +0 -10
- package/common/src/webworker/worker.types.d.ts +0 -33
- package/common/src/webworker/workerErrorHandler.d.ts +0 -1
- package/common/src/webworker/workerFactory.cjs +0 -1
- package/common/src/webworker/workerFactory.d.ts +0 -10
- package/common/src/webworker/workerFactory.mjs +0 -28
- package/common/src/webworker/workerProxy-36ykh-KW.js +0 -1
- package/common/src/webworker/workerProxy.d.ts +0 -39
- package/common/src/webworker/workerThreadsPatch.d.ts +0 -1
- package/common/src/webworker/zkProofWorker/zkProofWorker.types.cjs +0 -1
- package/common/src/webworker/zkProofWorker/zkProofWorker.types.d.ts +0 -36
- package/common/src/webworker/zkProofWorker/zkProofWorker.types.mjs +0 -6
- package/common/src/webworker/zkProofWorker/zkProofWorkerLauncher.d.ts +0 -1
- package/common/src/webworker/zkProofWorker/zkProofWorkerLauncher.ts?worker&url.cjs +0 -1
- package/common/src/webworker/zkProofWorker/zkProofWorkerLauncher.ts?worker&url.mjs +0 -4
- package/common/src/webworker/zkProofWorker/zkProofWorkerLogic.d.ts +0 -5
- package/common/src/webworker/zkProofWorker/zkProofWorkerNode.d.ts +0 -0
- package/common/src/webworker/zkProofWorkerNode.cjs +0 -1
- package/functions/index.cjs +0 -1
- package/functions/index.mjs +0 -11
- package/functions/integrations/index.cjs +0 -1
- package/functions/integrations/index.mjs +0 -5
- package/functions/integrations/swapApi.cjs +0 -1
- package/functions/integrations/swapApi.d.ts +0 -9
- package/functions/integrations/swapApi.mjs +0 -12
- package/functions/utils/getErc20Token.cjs +0 -1
- package/functions/utils/getErc20Token.d.ts +0 -2
- package/functions/utils/getErc20Token.mjs +0 -11
- package/functions/utils/getFeeStructure.cjs +0 -1
- package/functions/utils/getFeeStructure.d.ts +0 -1
- package/functions/utils/getFeeStructure.mjs +0 -1
- package/functions/utils/index.cjs +0 -1
- package/functions/utils/index.mjs +0 -6
- package/functions/utils/preProcessing.cjs +0 -1
- package/functions/utils/preProcessing.d.ts +0 -1
- package/functions/utils/preProcessing.mjs +0 -1
- package/functions/utils/refreshBalance.cjs +0 -1
- package/functions/utils/refreshBalance.d.ts +0 -2
- package/functions/utils/refreshBalance.mjs +0 -7
- package/index.cjs +0 -1
- package/index.mjs +0 -16
- package/providers/EthersProviderAdapter.cjs +0 -1
- package/providers/EthersProviderAdapter.d.ts +0 -3
- package/providers/EthersProviderAdapter.mjs +0 -5
- package/providers/SolanaProviderAdapter.cjs +0 -1
- package/providers/SolanaProviderAdapter.d.ts +0 -2
- package/providers/SolanaProviderAdapter.mjs +0 -5
- package/providers/TronProviderAdapter.cjs +0 -1
- package/providers/TronProviderAdapter.d.ts +0 -2
- package/providers/TronProviderAdapter.mjs +0 -5
- package/providers/WagmiProviderAdapter.cjs +0 -1
- package/providers/WagmiProviderAdapter.d.ts +0 -3
- package/providers/WagmiProviderAdapter.mjs +0 -5
- package/providers/prepareEthersHinkal.cjs +0 -1
- package/providers/prepareEthersHinkal.d.ts +0 -4
- package/providers/prepareEthersHinkal.mjs +0 -12
- package/providers/prepareSolanaHinkal.cjs +0 -1
- package/providers/prepareSolanaHinkal.d.ts +0 -4
- package/providers/prepareSolanaHinkal.mjs +0 -13
- package/providers/prepareTronHinkal.cjs +0 -1
- package/providers/prepareTronHinkal.d.ts +0 -4
- package/providers/prepareTronHinkal.mjs +0 -13
- package/providers/prepareWagmiHinkal.cjs +0 -1
- package/providers/prepareWagmiHinkal.d.ts +0 -3
- package/providers/prepareWagmiHinkal.mjs +0 -12
- package/services/Hinkal.cjs +0 -1
- package/services/Hinkal.d.ts +0 -52
- package/services/Hinkal.mjs +0 -144
- package/services/index.cjs +0 -1
- package/services/index.mjs +0 -1
- package/types/IHinkal.d.ts +0 -51
- package/types/IProviderAdapter.d.ts +0 -1
- package/types/balances.types.cjs +0 -1
- package/types/balances.types.d.ts +0 -4
- package/types/balances.types.mjs +0 -2
- package/types/external-action.types.cjs +0 -1
- package/types/external-action.types.d.ts +0 -1
- package/types/external-action.types.mjs +0 -2
- package/types/fee.types.d.ts +0 -1
- package/types/index.cjs +0 -1
- package/types/index.mjs +0 -4
- package/types/privateTypes.d.ts +0 -5
- package/types/token.types.d.ts +0 -1
- /package/{functions/index.d.ts → src/functions/index.ts} +0 -0
- /package/{functions/integrations/index.d.ts → src/functions/integrations/index.ts} +0 -0
- /package/{functions/utils/index.d.ts → src/functions/utils/index.ts} +0 -0
- /package/{index.d.ts → src/index.ts} +0 -0
- /package/{services/index.d.ts → src/services/index.ts} +0 -0
- /package/{types/index.d.ts → src/types/index.ts} +0 -0
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
import { networkRegistry as e } from "../../constants/chains.constants.mjs";
|
|
2
|
-
import { HINKAL_PRIVATE_SEND_VARIABLE_RATE as t, solanaNativeAddress as n } from "../../constants/protocol.constants.mjs";
|
|
3
|
-
import { ExternalActionId as r } from "../../types/external-action.types.mjs";
|
|
4
|
-
import "../../types/index.mjs";
|
|
5
|
-
import { transactionErrorCodes as i } from "../../error-handling/error-codes.constants.mjs";
|
|
6
|
-
import { randomBigInt as a } from "../../functions/web3/etherFunctions.mjs";
|
|
7
|
-
import { getCurrentTimeInSeconds as o } from "../../functions/utils/time.utils.mjs";
|
|
8
|
-
import { Utxo as s } from "../utxo/Utxo.mjs";
|
|
9
|
-
import { isValidPrivateAddress as c } from "../../functions/utils/addresses.mjs";
|
|
10
|
-
import { validateAndGetChainId as l } from "../../functions/utils/token-check.utils.mjs";
|
|
11
|
-
import { addPaddingToUtxos as u } from "../../functions/web3/events/getShieldedBalance.mjs";
|
|
12
|
-
import { outputUtxoProcessing as d } from "../../functions/pre-transaction/outputUtxoProcessing.mjs";
|
|
13
|
-
import { calcEncryptedOutputs as f } from "../../functions/snarkjs/common.snarkjs.mjs";
|
|
14
|
-
import { calculateTotalFee as p } from "../../functions/utils/fees.utils.mjs";
|
|
15
|
-
import { constructAdminData as m } from "../../functions/pre-transaction/constructAdminData.mjs";
|
|
16
|
-
import { ensureAmountChanges as h } from "../../functions/pre-transaction/ensureAmountChanges.mjs";
|
|
17
|
-
import { getFeeStructure as g } from "../../functions/pre-transaction/getFeeStructure.mjs";
|
|
18
|
-
import { buildCommitmentValidationData as _ } from "../../functions/pre-transaction/buildCommitmentValidationData.mjs";
|
|
19
|
-
import "../../functions/pre-transaction/index.mjs";
|
|
20
|
-
import { constructSolanaZkProof as v } from "../../functions/snarkjs/constructSolanaZkProof.mjs";
|
|
21
|
-
import { solanaTransactCallRelayer as y } from "../../functions/web3/functionCalls/transactCallRelayer.mjs";
|
|
22
|
-
import { ethers as b } from "ethers";
|
|
23
|
-
//#region libs/shared/common/src/data-structures/Hinkal/hinkalSolanaTransfer.ts
|
|
24
|
-
var x = async (e, t, n, r, i, a) => {
|
|
25
|
-
let c = (await u(e, t, n, r, 6))[0], l = o().toString(), { outputUtxos: f } = d(e.userKeys, c, r[0], l), [p, m, h] = i.split(",");
|
|
26
|
-
return {
|
|
27
|
-
inputUtxos: c,
|
|
28
|
-
senderOutputUtxos: f,
|
|
29
|
-
recipientUtxo: new s({
|
|
30
|
-
amount: a,
|
|
31
|
-
erc20TokenAddress: c[0].erc20TokenAddress,
|
|
32
|
-
mintAddress: c[0].mintAddress,
|
|
33
|
-
timeStamp: l,
|
|
34
|
-
randomization: BigInt(p),
|
|
35
|
-
stealthAddress: m,
|
|
36
|
-
encryptionKey: h
|
|
37
|
-
})
|
|
38
|
-
};
|
|
39
|
-
}, S = async (o, u, d, y, S, C, w) => {
|
|
40
|
-
if (!c(y)) throw Error(i.RECIPIENT_FORMAT_INCORRECT);
|
|
41
|
-
let T = l(u), E = [...d], { originalDeployer: D, hinkalIdl: O } = e[T].contractData;
|
|
42
|
-
if (!D || !O) throw Error("missing data");
|
|
43
|
-
let { userKeys: k, merkleTreeAccessTokenByChain: A, merkleTreeHinkalByChain: j } = o, M = u.map((e) => e.erc20TokenAddress);
|
|
44
|
-
if (M.length > 1) throw Error("Solana Transfer: Only one mint address is supported");
|
|
45
|
-
let N = C ?? await g(T, S, M, r.Transact, [], 5n);
|
|
46
|
-
N.variableRate ||= t;
|
|
47
|
-
let P = p(-E[0], N), F = -E[0];
|
|
48
|
-
E[0] -= P;
|
|
49
|
-
let [I, L, { inputUtxos: R, senderOutputUtxos: z, recipientUtxo: B }] = await Promise.all([
|
|
50
|
-
o.getRandomRelay(T, !0),
|
|
51
|
-
o.getEthereumAddressByChain(T),
|
|
52
|
-
x(o, T, M, E, y, F)
|
|
53
|
-
]);
|
|
54
|
-
if (!I) throw Error(i.RELAYER_NOT_AVAILABLE);
|
|
55
|
-
let V = z[0], H = s.findCorrectRandomization(a(31), o.userKeys.getShieldedPrivateKey()), U = {
|
|
56
|
-
tokenNumber: M.length,
|
|
57
|
-
nullifierAmount: R.length,
|
|
58
|
-
outputAmount: 2
|
|
59
|
-
}, W = o.getSolanaProgram(O), G = f([[V, B]])[0].map((e) => Array.from(b.getBytes(e)));
|
|
60
|
-
h([R], [z], E);
|
|
61
|
-
let [{ proofAArr: K, proofBArr: q, proofCArr: J, publicInputsArr: Y }, X] = await Promise.all([v(o.generateProofRemotely, D, j[T], A[T], k, W, [M[0]], [R], [[V, B]], H, P, 0n, n, I, U, G, T), _(T, k, M, [R])]), Z = {
|
|
62
|
-
recipient: I,
|
|
63
|
-
mint: M[0] === "11111111111111111111111111111111" ? void 0 : M[0]
|
|
64
|
-
};
|
|
65
|
-
return {
|
|
66
|
-
chainId: T,
|
|
67
|
-
relay: I,
|
|
68
|
-
args: {
|
|
69
|
-
proofAArr: K,
|
|
70
|
-
proofBArr: q,
|
|
71
|
-
proofCArr: J,
|
|
72
|
-
publicInputsArr: Y,
|
|
73
|
-
encryptedOutputs: G,
|
|
74
|
-
relayerFee: P.toString(),
|
|
75
|
-
dimensions: U
|
|
76
|
-
},
|
|
77
|
-
accounts: Z,
|
|
78
|
-
adminData: m(w, T, M, E, L),
|
|
79
|
-
commitmentValidationData: X,
|
|
80
|
-
recipientUtxo: B
|
|
81
|
-
};
|
|
82
|
-
}, C = async (e, t, n, r, i, a, o, s = !1) => {
|
|
83
|
-
if (s) throw Error("onlyGasEstimate is not supported for Solana transfer");
|
|
84
|
-
let c = await S(e, t, n, r, i, a, o);
|
|
85
|
-
return y({
|
|
86
|
-
chainId: c.chainId,
|
|
87
|
-
relayAddress: c.relay,
|
|
88
|
-
functionName: "transfer",
|
|
89
|
-
args: c.args,
|
|
90
|
-
accounts: c.accounts,
|
|
91
|
-
adminData: c.adminData,
|
|
92
|
-
commitmentValidationData: c.commitmentValidationData
|
|
93
|
-
});
|
|
94
|
-
};
|
|
95
|
-
//#endregion
|
|
96
|
-
export { C as hinkalSolanaTransfer };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
require(`../../../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../constants/chains.constants.cjs`);require(`../../constants/protocol.constants.cjs`);const t=require(`../../types/external-action.types.cjs`);require(`../../types/index.cjs`);const n=require(`../../error-handling/error-codes.constants.cjs`),r=require(`../../functions/web3/etherFunctions.cjs`),i=require(`../../functions/utils/time.utils.cjs`),a=require(`../utxo/Utxo.cjs`),o=require(`../../functions/utils/token-check.utils.cjs`),s=require(`../../functions/web3/events/getShieldedBalance.cjs`),c=require(`../../functions/pre-transaction/outputUtxoProcessing.cjs`),l=require(`../../functions/snarkjs/common.snarkjs.cjs`),u=require(`../../functions/utils/fees.utils.cjs`),d=require(`../../functions/pre-transaction/constructAdminData.cjs`),f=require(`../../functions/pre-transaction/ensureAmountChanges.cjs`),p=require(`../../functions/pre-transaction/getFeeStructure.cjs`),m=require(`../../functions/pre-transaction/shouldPatchAccessTokenMerkleTree.cjs`),h=require(`../../functions/pre-transaction/buildCommitmentValidationData.cjs`);require(`../../functions/pre-transaction/index.cjs`),require(`../../constants/index.cjs`);const g=require(`../../functions/snarkjs/constructSolanaZkProof.cjs`),_=require(`../../functions/web3/functionCalls/transactCallRelayer.cjs`);let v=require(`ethers`);var y=async(e,t,n,r)=>{let a=[...await s.addPaddingToUtxos(e,t,n,r,6)][0],o=i.getCurrentTimeInSeconds().toString(),{outputUtxos:l}=c.outputUtxoProcessing(e.userKeys,a,r[0],o);return{inputUtxos:a,outputUtxos:l}},b=async(i,s,c,b,x,S,C)=>{let w=o.validateAndGetChainId(s),T=s.map(e=>e.erc20TokenAddress),{originalDeployer:E,hinkalIdl:D}=e.networkRegistry[w].contractData;if(!E||!D)throw Error(`missing data`);let{userKeys:O,merkleTreeAccessTokenByChain:k,merkleTreeHinkalByChain:A}=i,j=S??await p.getFeeStructure(w,x,T,t.ExternalActionId.Transact),M=u.calculateTotalFee(-c[0],j),N={feeToken:j.feeToken,flatFee:M,variableRate:0n};c[0]-=N.flatFee;let[{patchAccessTokenMerkleTree:P,kycRequired:F,hasAccessToken:I},L,R,{inputUtxos:z,outputUtxos:B}]=await Promise.all([m.shouldPatchAccessTokenMerkleTree(i,w,T,c),i.getEthereumAddressByChain(w),i.getRandomRelay(w,!0),y(i,w,T,c)]);if(!R)throw Error(n.transactionErrorCodes.RELAYER_NOT_AVAILABLE);if(T.length>1)throw Error(`Solana Withdraw: Only one mint address is supported`);let V=a.Utxo.findCorrectRandomization(r.randomBigInt(31),i.userKeys.getShieldedPrivateKey()),H={tokenNumber:T.length,nullifierAmount:z.length,outputAmount:B.length},U=i.getSolanaProgram(D),W=l.calcEncryptedOutputs([B])[0][0],G=Array.from(v.ethers.getBytes(W));f.ensureAmountChanges([z],[B],c);let[{proofAArr:K,proofBArr:q,proofCArr:J,publicInputsArr:Y},X]=await Promise.all([g.constructSolanaZkProof(i.generateProofRemotely,E,A[w],k[w],O,U,[T[0]],[z],[B],V,N.flatFee,N.variableRate,b,R,H,[G],w,P),h.buildCommitmentValidationData(w,O,T,[z])]),Z={recipient:b,mint:T[0]===`11111111111111111111111111111111`?void 0:T[0]},Q={proofAArr:K,proofBArr:q,proofCArr:J,publicInputsArr:Y,encryptedOutputs:[G],relayerFee:N.flatFee.toString(),dimensions:H},$=d.constructAdminData(C,w,T,c,await i.getEthereumAddress());return _.solanaTransactCallRelayer({chainId:w,relayAddress:R,functionName:`transact`,args:Q,accounts:Z,commitmentValidationData:X,solanaAccessTokenData:!I&&F?{ethereumAddress:L,accessKey:O.getAccessKey()}:void 0,adminData:$})};exports.hinkalSolanaWithdraw=b;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { AdminTransactionType, FeeStructure } from '../../types';
|
|
2
|
-
import { IHinkal } from './IHinkal';
|
|
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>;
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import { networkRegistry as e } from "../../constants/chains.constants.mjs";
|
|
2
|
-
import "../../constants/protocol.constants.mjs";
|
|
3
|
-
import { ExternalActionId as t } from "../../types/external-action.types.mjs";
|
|
4
|
-
import "../../types/index.mjs";
|
|
5
|
-
import { transactionErrorCodes as n } from "../../error-handling/error-codes.constants.mjs";
|
|
6
|
-
import { randomBigInt as r } from "../../functions/web3/etherFunctions.mjs";
|
|
7
|
-
import { getCurrentTimeInSeconds as i } from "../../functions/utils/time.utils.mjs";
|
|
8
|
-
import { Utxo as a } from "../utxo/Utxo.mjs";
|
|
9
|
-
import { validateAndGetChainId as o } from "../../functions/utils/token-check.utils.mjs";
|
|
10
|
-
import { addPaddingToUtxos as s } from "../../functions/web3/events/getShieldedBalance.mjs";
|
|
11
|
-
import { outputUtxoProcessing as c } from "../../functions/pre-transaction/outputUtxoProcessing.mjs";
|
|
12
|
-
import { calcEncryptedOutputs as l } from "../../functions/snarkjs/common.snarkjs.mjs";
|
|
13
|
-
import { calculateTotalFee as u } from "../../functions/utils/fees.utils.mjs";
|
|
14
|
-
import { constructAdminData as d } from "../../functions/pre-transaction/constructAdminData.mjs";
|
|
15
|
-
import { ensureAmountChanges as f } from "../../functions/pre-transaction/ensureAmountChanges.mjs";
|
|
16
|
-
import { getFeeStructure as p } from "../../functions/pre-transaction/getFeeStructure.mjs";
|
|
17
|
-
import { shouldPatchAccessTokenMerkleTree as m } from "../../functions/pre-transaction/shouldPatchAccessTokenMerkleTree.mjs";
|
|
18
|
-
import { buildCommitmentValidationData as h } from "../../functions/pre-transaction/buildCommitmentValidationData.mjs";
|
|
19
|
-
import "../../functions/pre-transaction/index.mjs";
|
|
20
|
-
import "../../constants/index.mjs";
|
|
21
|
-
import { constructSolanaZkProof as g } from "../../functions/snarkjs/constructSolanaZkProof.mjs";
|
|
22
|
-
import { solanaTransactCallRelayer as _ } from "../../functions/web3/functionCalls/transactCallRelayer.mjs";
|
|
23
|
-
import { ethers as v } from "ethers";
|
|
24
|
-
//#region libs/shared/common/src/data-structures/Hinkal/hinkalSolanaWithdraw.ts
|
|
25
|
-
var y = async (e, t, n, r) => {
|
|
26
|
-
let a = [...await s(e, t, n, r, 6)][0], o = i().toString(), { outputUtxos: l } = c(e.userKeys, a, r[0], o);
|
|
27
|
-
return {
|
|
28
|
-
inputUtxos: a,
|
|
29
|
-
outputUtxos: l
|
|
30
|
-
};
|
|
31
|
-
}, b = async (i, s, c, b, x, S, C) => {
|
|
32
|
-
let w = o(s), T = s.map((e) => e.erc20TokenAddress), { originalDeployer: E, hinkalIdl: D } = e[w].contractData;
|
|
33
|
-
if (!E || !D) throw Error("missing data");
|
|
34
|
-
let { userKeys: O, merkleTreeAccessTokenByChain: k, merkleTreeHinkalByChain: A } = i, j = S ?? await p(w, x, T, t.Transact), M = u(-c[0], j), N = {
|
|
35
|
-
feeToken: j.feeToken,
|
|
36
|
-
flatFee: M,
|
|
37
|
-
variableRate: 0n
|
|
38
|
-
};
|
|
39
|
-
c[0] -= N.flatFee;
|
|
40
|
-
let [{ patchAccessTokenMerkleTree: P, kycRequired: F, hasAccessToken: I }, L, R, { inputUtxos: z, outputUtxos: B }] = await Promise.all([
|
|
41
|
-
m(i, w, T, c),
|
|
42
|
-
i.getEthereumAddressByChain(w),
|
|
43
|
-
i.getRandomRelay(w, !0),
|
|
44
|
-
y(i, w, T, c)
|
|
45
|
-
]);
|
|
46
|
-
if (!R) throw Error(n.RELAYER_NOT_AVAILABLE);
|
|
47
|
-
if (T.length > 1) throw Error("Solana Withdraw: Only one mint address is supported");
|
|
48
|
-
let V = a.findCorrectRandomization(r(31), i.userKeys.getShieldedPrivateKey()), H = {
|
|
49
|
-
tokenNumber: T.length,
|
|
50
|
-
nullifierAmount: z.length,
|
|
51
|
-
outputAmount: B.length
|
|
52
|
-
}, U = i.getSolanaProgram(D), W = l([B])[0][0], G = Array.from(v.getBytes(W));
|
|
53
|
-
f([z], [B], c);
|
|
54
|
-
let [{ proofAArr: K, proofBArr: q, proofCArr: J, publicInputsArr: Y }, X] = await Promise.all([g(i.generateProofRemotely, E, A[w], k[w], O, U, [T[0]], [z], [B], V, N.flatFee, N.variableRate, b, R, H, [G], w, P), h(w, O, T, [z])]), Z = {
|
|
55
|
-
recipient: b,
|
|
56
|
-
mint: T[0] === "11111111111111111111111111111111" ? void 0 : T[0]
|
|
57
|
-
}, Q = {
|
|
58
|
-
proofAArr: K,
|
|
59
|
-
proofBArr: q,
|
|
60
|
-
proofCArr: J,
|
|
61
|
-
publicInputsArr: Y,
|
|
62
|
-
encryptedOutputs: [G],
|
|
63
|
-
relayerFee: N.flatFee.toString(),
|
|
64
|
-
dimensions: H
|
|
65
|
-
}, $ = d(C, w, T, c, await i.getEthereumAddress());
|
|
66
|
-
return _({
|
|
67
|
-
chainId: w,
|
|
68
|
-
relayAddress: R,
|
|
69
|
-
functionName: "transact",
|
|
70
|
-
args: Q,
|
|
71
|
-
accounts: Z,
|
|
72
|
-
commitmentValidationData: X,
|
|
73
|
-
solanaAccessTokenData: !I && F ? {
|
|
74
|
-
ethereumAddress: L,
|
|
75
|
-
accessKey: O.getAccessKey()
|
|
76
|
-
} : void 0,
|
|
77
|
-
adminData: $
|
|
78
|
-
});
|
|
79
|
-
};
|
|
80
|
-
//#endregion
|
|
81
|
-
export { b as hinkalSolanaWithdraw };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
require(`../../constants/protocol.constants.cjs`);const e=require(`../../types/ethereum-network.types.cjs`),t=require(`../../error-handling/error-codes.constants.cjs`),n=require(`../../functions/utils/time.utils.cjs`),r=require(`../../functions/utils/token-check.utils.cjs`),i=require(`../../functions/web3/events/getShieldedBalance.cjs`),a=require(`../../functions/pre-transaction/outputUtxoProcessing.cjs`),o=require(`../../functions/pre-transaction/constructAdminData.cjs`),s=require(`../../functions/pre-transaction/getFeeStructure.cjs`),c=require(`../../functions/pre-transaction/getKycAndSignatureData.cjs`),l=require(`../../functions/pre-transaction/buildCommitmentValidationData.cjs`);require(`../../functions/pre-transaction/index.cjs`);const u=require(`../../functions/snarkjs/constructGeneralZkProof.cjs`),d=require(`../../functions/web3/functionCalls/transactCallRelayer.cjs`),f=require(`../../functions/pre-transaction/getExternalSwapAddress.cjs`),p=require(`../../functions/pre-transaction/merge-with-fee-structure.cjs`);var m=async(e,t,r,o)=>{let s=[...await i.addPaddingToUtxos(e,t,r,o)],c=[],l=n.getCurrentTimeInSeconds().toString();for(let t=0;t<r.length;t+=1){let{outputUtxos:n}=a.outputUtxoProcessing(e.userKeys,s[t],o[t],l);c.push(n)}return{inputUtxosArray:s,outputUtxosArray:c}},h=async(n,i,a,h,g,_,v,y)=>{let b=r.validateAndGetChainId(i),x=i.map(e=>e.erc20TokenAddress),S=await n.getEthereumAddressByChain(b),C=v??await s.getFeeStructure(b,_,x,h,void 0,35n);p.mergeWithFeeStructure(b,x,a,C);let w={externalActionId:h,externalAddress:f.getExternalSwapAddress(b,h),externalActionMetadata:g},[T,{patchAccessTokenMerkleTree:E,signatureData:D},{inputUtxosArray:O,outputUtxosArray:k}]=await Promise.all([n.getRandomRelay(b,!0),c.getKycAndSignatureData(n,b,x,a,S),m(n,b,x,a)]);if(!T)throw Error(t.transactionErrorCodes.RELAYER_NOT_AVAILABLE);let A=`swapperM${a.length.toString()}x${O[0].length}x1`,j=[!1,!0,!1].slice(0,a.length),[{zkCallData:M,circomData:N,dimData:P},F]=await Promise.all([u.constructZkProof(n.merkleTreeHinkalByChain[b],n.merkleTreeAccessTokenByChain[b],O,k,n.userKeys,A,w.externalActionId,w.externalAddress,w.externalActionMetadata,n.generateProofRemotely,T,b,j,void 0,void 0,E,void 0,C,n.getContractWithFetcher(b,e.ContractType.HinkalHelperContract),D),l.buildCommitmentValidationData(b,n.userKeys,x,O)]);return await d.transactCallRelayer(b,M,P,N,F,void 0,void 0,o.constructAdminData(y,b,x,a,S,i))};exports.hinkalSwap=h;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { ExternalActionId } from '../../types/external-action.types';
|
|
2
|
-
import { IHinkal } from './IHinkal';
|
|
3
|
-
import { FeeStructure } from '../../types/hinkal.types';
|
|
4
|
-
import { ERC20Token } from '../../types/token.types';
|
|
5
|
-
import { AdminTransactionType } from '../../types/admin.types';
|
|
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>;
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import "../../constants/protocol.constants.mjs";
|
|
2
|
-
import { ContractType as e } from "../../types/ethereum-network.types.mjs";
|
|
3
|
-
import { transactionErrorCodes as t } from "../../error-handling/error-codes.constants.mjs";
|
|
4
|
-
import { getCurrentTimeInSeconds as n } from "../../functions/utils/time.utils.mjs";
|
|
5
|
-
import { validateAndGetChainId as r } from "../../functions/utils/token-check.utils.mjs";
|
|
6
|
-
import { addPaddingToUtxos as i } from "../../functions/web3/events/getShieldedBalance.mjs";
|
|
7
|
-
import { outputUtxoProcessing as a } from "../../functions/pre-transaction/outputUtxoProcessing.mjs";
|
|
8
|
-
import { constructAdminData as o } from "../../functions/pre-transaction/constructAdminData.mjs";
|
|
9
|
-
import { getFeeStructure as s } from "../../functions/pre-transaction/getFeeStructure.mjs";
|
|
10
|
-
import { getKycAndSignatureData as c } from "../../functions/pre-transaction/getKycAndSignatureData.mjs";
|
|
11
|
-
import { buildCommitmentValidationData as l } from "../../functions/pre-transaction/buildCommitmentValidationData.mjs";
|
|
12
|
-
import "../../functions/pre-transaction/index.mjs";
|
|
13
|
-
import { constructZkProof as u } from "../../functions/snarkjs/constructGeneralZkProof.mjs";
|
|
14
|
-
import { transactCallRelayer as d } from "../../functions/web3/functionCalls/transactCallRelayer.mjs";
|
|
15
|
-
import { getExternalSwapAddress as f } from "../../functions/pre-transaction/getExternalSwapAddress.mjs";
|
|
16
|
-
import { mergeWithFeeStructure as p } from "../../functions/pre-transaction/merge-with-fee-structure.mjs";
|
|
17
|
-
//#region libs/shared/common/src/data-structures/Hinkal/hinkalSwap.ts
|
|
18
|
-
var m = async (e, t, r, o) => {
|
|
19
|
-
let s = [...await i(e, t, r, o)], c = [], l = n().toString();
|
|
20
|
-
for (let t = 0; t < r.length; t += 1) {
|
|
21
|
-
let { outputUtxos: n } = a(e.userKeys, s[t], o[t], l);
|
|
22
|
-
c.push(n);
|
|
23
|
-
}
|
|
24
|
-
return {
|
|
25
|
-
inputUtxosArray: s,
|
|
26
|
-
outputUtxosArray: c
|
|
27
|
-
};
|
|
28
|
-
}, h = async (n, i, a, h, g, _, v, y) => {
|
|
29
|
-
let b = r(i), x = i.map((e) => e.erc20TokenAddress), S = await n.getEthereumAddressByChain(b), C = v ?? await s(b, _, x, h, void 0, 35n);
|
|
30
|
-
p(b, x, a, C);
|
|
31
|
-
let w = {
|
|
32
|
-
externalActionId: h,
|
|
33
|
-
externalAddress: f(b, h),
|
|
34
|
-
externalActionMetadata: g
|
|
35
|
-
}, [T, { patchAccessTokenMerkleTree: E, signatureData: D }, { inputUtxosArray: O, outputUtxosArray: k }] = await Promise.all([
|
|
36
|
-
n.getRandomRelay(b, !0),
|
|
37
|
-
c(n, b, x, a, S),
|
|
38
|
-
m(n, b, x, a)
|
|
39
|
-
]);
|
|
40
|
-
if (!T) throw Error(t.RELAYER_NOT_AVAILABLE);
|
|
41
|
-
let A = `swapperM${a.length.toString()}x${O[0].length}x1`, j = [
|
|
42
|
-
!1,
|
|
43
|
-
!0,
|
|
44
|
-
!1
|
|
45
|
-
].slice(0, a.length), [{ zkCallData: M, circomData: N, dimData: P }, F] = await Promise.all([u(n.merkleTreeHinkalByChain[b], n.merkleTreeAccessTokenByChain[b], O, k, n.userKeys, A, w.externalActionId, w.externalAddress, w.externalActionMetadata, n.generateProofRemotely, T, b, j, void 0, void 0, E, void 0, C, n.getContractWithFetcher(b, e.HinkalHelperContract), D), l(b, n.userKeys, x, O)]);
|
|
46
|
-
return await d(b, M, P, N, F, void 0, void 0, o(y, b, x, a, S, i));
|
|
47
|
-
};
|
|
48
|
-
//#endregion
|
|
49
|
-
export { h as hinkalSwap };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e=require(`../../constants/chains.constants.cjs`),t=require(`../../constants/protocol.constants.cjs`),n=require(`../../types/ethereum-network.types.cjs`),r=require(`../../types/external-action.types.cjs`);require(`../../types/index.cjs`);const i=require(`../../error-handling/error-codes.constants.cjs`),a=require(`../../functions/utils/time.utils.cjs`),o=require(`../../functions/utils/addresses.cjs`),s=require(`../../functions/utils/tron.utils.cjs`),c=require(`../../functions/utils/token-check.utils.cjs`),l=require(`../../functions/web3/events/getShieldedBalance.cjs`),u=require(`../../functions/pre-transaction/outputUtxoProcessing.cjs`),d=require(`../../functions/utils/fees.utils.cjs`),f=require(`../../functions/pre-transaction/getVolatileTransferAmount.cjs`),p=require(`../../functions/pre-transaction/constructAdminData.cjs`),m=require(`../../functions/pre-transaction/getFeeStructure.cjs`),h=require(`../../functions/pre-transaction/getKycAndSignatureData.cjs`),g=require(`../../functions/pre-transaction/buildCommitmentValidationData.cjs`);require(`../../functions/pre-transaction/index.cjs`);const _=require(`../../functions/snarkjs/constructGeneralZkProof.cjs`),v=require(`../../functions/web3/functionCalls/transactCallRelayer.cjs`),y=require(`../../functions/pre-transaction/merge-with-fee-structure.cjs`);var b=async(e,t,n,r,i,o)=>{let s=[...await l.addPaddingToUtxos(e,t,n,r)],c=[],d=a.getCurrentTimeInSeconds().toString();for(let t=0;t<n.length;t+=1){let{outputUtxos:n}=u.outputUtxoProcessing(e.userKeys,s[t],r[t],d,void 0,!0,i,t===0?o:0n);c.push(n)}return{inputUtxosArray:s,outputUtxosArray:c}},x=async(a,l,u,x,S,C,w)=>{let T=c.validateAndGetChainId(l),E=e.isTronLike(T);if(!o.isValidPrivateAddress(x))throw Error(i.transactionErrorCodes.RECIPIENT_FORMAT_INCORRECT);let D=s.addressToHexFormat(await a.getEthereumAddressByChain(T)),O=l.map(e=>e.erc20TokenAddress),k=await f.modifyVolatileTokenAmountChanges(T,l,u),A=C??await m.getFeeStructure(T,S,O,r.ExternalActionId.Transact,[],5n);A.variableRate||=t.HINKAL_PRIVATE_SEND_VARIABLE_RATE;let j=d.calculateTotalFee(-k[0],A),M=-k[0],N={feeToken:A.feeToken,flatFee:j,variableRate:0n};if(y.mergeWithFeeStructure(T,O,k,N),!l[0])throw Error(`Transfer Action: No Token Found`);let[P,{patchAccessTokenMerkleTree:F,signatureData:I},{inputUtxosArray:L,outputUtxosArray:R}]=await Promise.all([a.getRandomRelay(T,!0),h.getKycAndSignatureData(a,T,O,k,D),b(a,T,O,k,x,M)]);if(!P)throw Error(i.transactionErrorCodes.RELAYER_NOT_AVAILABLE);let z={externalActionId:0n,externalAddress:P,externalActionMetadata:`0x00`},B=`swapperM${k.length}x${L[0].length}x2`,[{zkCallData:V,circomData:H,dimData:U},W]=await Promise.all([_.constructZkProof(a.merkleTreeHinkalByChain[T],a.merkleTreeAccessTokenByChain[T],L,R,a.userKeys,B,z.externalActionId,z.externalAddress,z.externalActionMetadata,a.generateProofRemotely,P,T,void 0,void 0,void 0,F,void 0,N,a.getContractWithFetcher(T,n.ContractType.HinkalHelperContract),I),g.buildCommitmentValidationData(T,a.userKeys,O,L)]),G=await s.reorderZkCallData(E,V,U,H);return await v.transactCallRelayer(T,V,U,H,W,void 0,void 0,p.constructAdminData(w,T,O,k,D),G)};exports.hinkalTransfer=x;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { FeeStructure } from '../../types/hinkal.types';
|
|
2
|
-
import { AdminTransactionType, ERC20Token } from '../../types';
|
|
3
|
-
import { IHinkal } from './IHinkal';
|
|
4
|
-
export declare const hinkalTransfer: (hinkal: IHinkal, erc20Tokens: ERC20Token[], amountChangesBase: bigint[], recipientAddress: string, feeToken?: string, feeStructureOverride?: FeeStructure, action?: AdminTransactionType) => Promise<string>;
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import { isTronLike as e } from "../../constants/chains.constants.mjs";
|
|
2
|
-
import { HINKAL_PRIVATE_SEND_VARIABLE_RATE as t } from "../../constants/protocol.constants.mjs";
|
|
3
|
-
import { ContractType as n } from "../../types/ethereum-network.types.mjs";
|
|
4
|
-
import { ExternalActionId as r } from "../../types/external-action.types.mjs";
|
|
5
|
-
import "../../types/index.mjs";
|
|
6
|
-
import { transactionErrorCodes as i } from "../../error-handling/error-codes.constants.mjs";
|
|
7
|
-
import { getCurrentTimeInSeconds as a } from "../../functions/utils/time.utils.mjs";
|
|
8
|
-
import { isValidPrivateAddress as o } from "../../functions/utils/addresses.mjs";
|
|
9
|
-
import { addressToHexFormat as s, reorderZkCallData as c } from "../../functions/utils/tron.utils.mjs";
|
|
10
|
-
import { validateAndGetChainId as l } from "../../functions/utils/token-check.utils.mjs";
|
|
11
|
-
import { addPaddingToUtxos as u } from "../../functions/web3/events/getShieldedBalance.mjs";
|
|
12
|
-
import { outputUtxoProcessing as d } from "../../functions/pre-transaction/outputUtxoProcessing.mjs";
|
|
13
|
-
import { calculateTotalFee as f } from "../../functions/utils/fees.utils.mjs";
|
|
14
|
-
import { modifyVolatileTokenAmountChanges as p } from "../../functions/pre-transaction/getVolatileTransferAmount.mjs";
|
|
15
|
-
import { constructAdminData as m } from "../../functions/pre-transaction/constructAdminData.mjs";
|
|
16
|
-
import { getFeeStructure as h } from "../../functions/pre-transaction/getFeeStructure.mjs";
|
|
17
|
-
import { getKycAndSignatureData as g } from "../../functions/pre-transaction/getKycAndSignatureData.mjs";
|
|
18
|
-
import { buildCommitmentValidationData as _ } from "../../functions/pre-transaction/buildCommitmentValidationData.mjs";
|
|
19
|
-
import "../../functions/pre-transaction/index.mjs";
|
|
20
|
-
import { constructZkProof as v } from "../../functions/snarkjs/constructGeneralZkProof.mjs";
|
|
21
|
-
import { transactCallRelayer as y } from "../../functions/web3/functionCalls/transactCallRelayer.mjs";
|
|
22
|
-
import { mergeWithFeeStructure as b } from "../../functions/pre-transaction/merge-with-fee-structure.mjs";
|
|
23
|
-
//#region libs/shared/common/src/data-structures/Hinkal/hinkalTransfer.ts
|
|
24
|
-
var x = async (e, t, n, r, i, o) => {
|
|
25
|
-
let s = [...await u(e, t, n, r)], c = [], l = a().toString();
|
|
26
|
-
for (let t = 0; t < n.length; t += 1) {
|
|
27
|
-
let { outputUtxos: n } = d(e.userKeys, s[t], r[t], l, void 0, !0, i, t === 0 ? o : 0n);
|
|
28
|
-
c.push(n);
|
|
29
|
-
}
|
|
30
|
-
return {
|
|
31
|
-
inputUtxosArray: s,
|
|
32
|
-
outputUtxosArray: c
|
|
33
|
-
};
|
|
34
|
-
}, S = async (a, u, d, S, C, w, T) => {
|
|
35
|
-
let E = l(u), D = e(E);
|
|
36
|
-
if (!o(S)) throw Error(i.RECIPIENT_FORMAT_INCORRECT);
|
|
37
|
-
let O = s(await a.getEthereumAddressByChain(E)), k = u.map((e) => e.erc20TokenAddress), A = await p(E, u, d), j = w ?? await h(E, C, k, r.Transact, [], 5n);
|
|
38
|
-
j.variableRate ||= t;
|
|
39
|
-
let M = f(-A[0], j), N = -A[0], P = {
|
|
40
|
-
feeToken: j.feeToken,
|
|
41
|
-
flatFee: M,
|
|
42
|
-
variableRate: 0n
|
|
43
|
-
};
|
|
44
|
-
if (b(E, k, A, P), !u[0]) throw Error("Transfer Action: No Token Found");
|
|
45
|
-
let [F, { patchAccessTokenMerkleTree: I, signatureData: L }, { inputUtxosArray: R, outputUtxosArray: z }] = await Promise.all([
|
|
46
|
-
a.getRandomRelay(E, !0),
|
|
47
|
-
g(a, E, k, A, O),
|
|
48
|
-
x(a, E, k, A, S, N)
|
|
49
|
-
]);
|
|
50
|
-
if (!F) throw Error(i.RELAYER_NOT_AVAILABLE);
|
|
51
|
-
let B = {
|
|
52
|
-
externalActionId: 0n,
|
|
53
|
-
externalAddress: F,
|
|
54
|
-
externalActionMetadata: "0x00"
|
|
55
|
-
}, V = `swapperM${A.length}x${R[0].length}x2`, [{ zkCallData: H, circomData: U, dimData: W }, G] = await Promise.all([v(a.merkleTreeHinkalByChain[E], a.merkleTreeAccessTokenByChain[E], R, z, a.userKeys, V, B.externalActionId, B.externalAddress, B.externalActionMetadata, a.generateProofRemotely, F, E, void 0, void 0, void 0, I, void 0, P, a.getContractWithFetcher(E, n.HinkalHelperContract), L), _(E, a.userKeys, k, R)]), K = await c(D, H, W, U);
|
|
56
|
-
return await y(E, H, W, U, G, void 0, void 0, m(T, E, k, A, O), K);
|
|
57
|
-
};
|
|
58
|
-
//#endregion
|
|
59
|
-
export { S as hinkalTransfer };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e=require(`../../constants/chains.constants.cjs`),t=require(`../../constants/protocol.constants.cjs`),n=require(`../../types/ethereum-network.types.cjs`),r=require(`../../types/external-action.types.cjs`);require(`../../types/index.cjs`);const i=require(`../../error-handling/error-codes.constants.cjs`),a=require(`../../functions/utils/time.utils.cjs`),o=require(`../../functions/utils/tron.utils.cjs`),s=require(`../../functions/utils/token-check.utils.cjs`),c=require(`../../functions/web3/events/getShieldedBalance.cjs`),l=require(`../../functions/pre-transaction/outputUtxoProcessing.cjs`),u=require(`../../functions/utils/fees.utils.cjs`),d=require(`../../functions/pre-transaction/getVolatileTransferAmount.cjs`),f=require(`../../functions/pre-transaction/constructAdminData.cjs`),p=require(`../../functions/pre-transaction/getFeeStructure.cjs`),m=require(`../../functions/pre-transaction/getKycAndSignatureData.cjs`),h=require(`../../functions/pre-transaction/buildCommitmentValidationData.cjs`);require(`../../functions/pre-transaction/index.cjs`);const g=require(`../../functions/snarkjs/constructGeneralZkProof.cjs`),_=require(`../../functions/web3/functionCalls/transactCallDirect.cjs`),v=require(`../../functions/web3/functionCalls/transactCallRelayer.cjs`),y=require(`../../functions/pre-transaction/merge-with-fee-structure.cjs`);var b=async(e,t,n,r)=>{let i=[...await c.addPaddingToUtxos(e,t,n,r)],o=[],s=a.getCurrentTimeInSeconds().toString();for(let t=0;t<n.length;t+=1){let{outputUtxos:n}=l.outputUtxoProcessing(e.userKeys,i[t],r[t],s);o.push(n)}return{inputUtxosArray:i,outputUtxosArray:o}},x=async(a,c,l,x,S,C,w,T)=>{let E=s.validateAndGetChainId(c),D=e.isTronLike(E),O=o.addressToHexFormat(await a.getEthereumAddressByChain(E)),k=c.map(e=>e.erc20TokenAddress),A=await d.modifyVolatileTokenAmountChanges(E,c,l),j;if(!S){let e=w??await p.getFeeStructure(E,C,k,r.ExternalActionId.Transact),t=u.calculateTotalFee(-A[0],e);j={feeToken:e.feeToken,flatFee:t,variableRate:0n},y.mergeWithFeeStructure(E,k,A,j)}let M=c[0];if(!M)throw Error(`Deposit Action: No Token Found`);let N={externalActionId:0n,externalAddress:o.addressToHexFormat(x),externalActionMetadata:`0x00`},[P,{patchAccessTokenMerkleTree:F,signatureData:I},{inputUtxosArray:L,outputUtxosArray:R}]=await Promise.all([a.getRandomRelay(E,!0),m.getKycAndSignatureData(a,E,k,A,O),b(a,E,k,A)]);if(!S&&!P)throw Error(i.transactionErrorCodes.RELAYER_NOT_AVAILABLE);let z=`swapperM${A.length.toString()}x${L[0].length}x1`,[{zkCallData:B,circomData:V,dimData:H},U]=await Promise.all([g.constructZkProof(a.merkleTreeHinkalByChain[E],a.merkleTreeAccessTokenByChain[E],L,R,a.userKeys,z,N.externalActionId,N.externalAddress,N.externalActionMetadata,a.generateProofRemotely,S?t.zeroAddress:P,E,void 0,void 0,void 0,F,void 0,j,a.getContractWithFetcher(E,n.ContractType.HinkalHelperContract),I,S?O:void 0),h.buildCommitmentValidationData(E,a.userKeys,k,L)]),W=await o.reorderZkCallData(D,B,H,V);if(S){if(!M)throw Error(`Withdraw Action: No Token Found`);return await _.transactCallDirect(a,E,A[0],M,B,V,H)}return await v.transactCallRelayer(E,B,H,V,U,void 0,void 0,f.constructAdminData(T,E,k,A,O),W)};exports.hinkalWithdraw=x;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { IHinkal } from './IHinkal';
|
|
2
|
-
import { FeeStructure } from '../../types/hinkal.types';
|
|
3
|
-
import { AdminTransactionType, ERC20Token } from '../../types';
|
|
4
|
-
import { ethers } from 'ethers';
|
|
5
|
-
export declare const hinkalWithdraw: (hinkal: IHinkal, erc20Tokens: ERC20Token[], deltaAmountsBase: bigint[], // should differentiate now: amountChanges is about off-chain utxos
|
|
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>;
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import { isTronLike as e } from "../../constants/chains.constants.mjs";
|
|
2
|
-
import { zeroAddress as t } from "../../constants/protocol.constants.mjs";
|
|
3
|
-
import { ContractType as n } from "../../types/ethereum-network.types.mjs";
|
|
4
|
-
import { ExternalActionId as r } from "../../types/external-action.types.mjs";
|
|
5
|
-
import "../../types/index.mjs";
|
|
6
|
-
import { transactionErrorCodes as i } from "../../error-handling/error-codes.constants.mjs";
|
|
7
|
-
import { getCurrentTimeInSeconds as a } from "../../functions/utils/time.utils.mjs";
|
|
8
|
-
import { addressToHexFormat as o, reorderZkCallData as s } from "../../functions/utils/tron.utils.mjs";
|
|
9
|
-
import { validateAndGetChainId as c } from "../../functions/utils/token-check.utils.mjs";
|
|
10
|
-
import { addPaddingToUtxos as l } from "../../functions/web3/events/getShieldedBalance.mjs";
|
|
11
|
-
import { outputUtxoProcessing as u } from "../../functions/pre-transaction/outputUtxoProcessing.mjs";
|
|
12
|
-
import { calculateTotalFee as d } from "../../functions/utils/fees.utils.mjs";
|
|
13
|
-
import { modifyVolatileTokenAmountChanges as f } from "../../functions/pre-transaction/getVolatileTransferAmount.mjs";
|
|
14
|
-
import { constructAdminData as p } from "../../functions/pre-transaction/constructAdminData.mjs";
|
|
15
|
-
import { getFeeStructure as m } from "../../functions/pre-transaction/getFeeStructure.mjs";
|
|
16
|
-
import { getKycAndSignatureData as h } from "../../functions/pre-transaction/getKycAndSignatureData.mjs";
|
|
17
|
-
import { buildCommitmentValidationData as g } from "../../functions/pre-transaction/buildCommitmentValidationData.mjs";
|
|
18
|
-
import "../../functions/pre-transaction/index.mjs";
|
|
19
|
-
import { constructZkProof as _ } from "../../functions/snarkjs/constructGeneralZkProof.mjs";
|
|
20
|
-
import { transactCallDirect as v } from "../../functions/web3/functionCalls/transactCallDirect.mjs";
|
|
21
|
-
import { transactCallRelayer as y } from "../../functions/web3/functionCalls/transactCallRelayer.mjs";
|
|
22
|
-
import { mergeWithFeeStructure as b } from "../../functions/pre-transaction/merge-with-fee-structure.mjs";
|
|
23
|
-
//#region libs/shared/common/src/data-structures/Hinkal/hinkalWithdraw.ts
|
|
24
|
-
var x = async (e, t, n, r) => {
|
|
25
|
-
let i = [...await l(e, t, n, r)], o = [], s = a().toString();
|
|
26
|
-
for (let t = 0; t < n.length; t += 1) {
|
|
27
|
-
let { outputUtxos: n } = u(e.userKeys, i[t], r[t], s);
|
|
28
|
-
o.push(n);
|
|
29
|
-
}
|
|
30
|
-
return {
|
|
31
|
-
inputUtxosArray: i,
|
|
32
|
-
outputUtxosArray: o
|
|
33
|
-
};
|
|
34
|
-
}, S = async (a, l, u, S, C, w, T, E) => {
|
|
35
|
-
let D = c(l), O = e(D), k = o(await a.getEthereumAddressByChain(D)), A = l.map((e) => e.erc20TokenAddress), j = await f(D, l, u), M;
|
|
36
|
-
if (!C) {
|
|
37
|
-
let e = T ?? await m(D, w, A, r.Transact), t = d(-j[0], e);
|
|
38
|
-
M = {
|
|
39
|
-
feeToken: e.feeToken,
|
|
40
|
-
flatFee: t,
|
|
41
|
-
variableRate: 0n
|
|
42
|
-
}, b(D, A, j, M);
|
|
43
|
-
}
|
|
44
|
-
let N = l[0];
|
|
45
|
-
if (!N) throw Error("Deposit Action: No Token Found");
|
|
46
|
-
let P = {
|
|
47
|
-
externalActionId: 0n,
|
|
48
|
-
externalAddress: o(S),
|
|
49
|
-
externalActionMetadata: "0x00"
|
|
50
|
-
}, [F, { patchAccessTokenMerkleTree: I, signatureData: L }, { inputUtxosArray: R, outputUtxosArray: z }] = await Promise.all([
|
|
51
|
-
a.getRandomRelay(D, !0),
|
|
52
|
-
h(a, D, A, j, k),
|
|
53
|
-
x(a, D, A, j)
|
|
54
|
-
]);
|
|
55
|
-
if (!C && !F) throw Error(i.RELAYER_NOT_AVAILABLE);
|
|
56
|
-
let B = `swapperM${j.length.toString()}x${R[0].length}x1`, [{ zkCallData: V, circomData: H, dimData: U }, W] = await Promise.all([_(a.merkleTreeHinkalByChain[D], a.merkleTreeAccessTokenByChain[D], R, z, a.userKeys, B, P.externalActionId, P.externalAddress, P.externalActionMetadata, a.generateProofRemotely, C ? t : F, D, void 0, void 0, void 0, I, void 0, M, a.getContractWithFetcher(D, n.HinkalHelperContract), L, C ? k : void 0), g(D, a.userKeys, A, R)]), G = await s(O, V, U, H);
|
|
57
|
-
if (C) {
|
|
58
|
-
if (!N) throw Error("Withdraw Action: No Token Found");
|
|
59
|
-
return await v(a, D, j[0], N, V, H, U);
|
|
60
|
-
}
|
|
61
|
-
return await y(D, V, U, H, W, void 0, void 0, p(E, D, A, j, k), G);
|
|
62
|
-
};
|
|
63
|
-
//#endregion
|
|
64
|
-
export { S as hinkalWithdraw };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
require(`../../../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../constants/chains.constants.cjs`);require(`../../constants/protocol.constants.cjs`);const t=require(`../../types/ethereum-network.types.cjs`),n=require(`../../functions/utils/amounts.utils.cjs`),r=require(`../../types/external-action.types.cjs`),i=require(`../../types/admin.types.cjs`);require(`../../types/index.cjs`);const a=require(`../../error-handling/error-codes.constants.cjs`),o=require(`../../functions/web3/etherFunctions.cjs`),s=require(`../../functions/utils/time.utils.cjs`),c=require(`../utxo/Utxo.cjs`),l=require(`../../functions/utils/encodeTokenWithId.cjs`),u=require(`../../functions/utils/tron.utils.cjs`),d=require(`../../functions/web3/events/getInputUtxoAndBalance.cjs`),f=require(`../../functions/utils/token-check.utils.cjs`),p=require(`../../functions/web3/events/getShieldedBalance.cjs`),m=require(`../../functions/pre-transaction/outputUtxoProcessing.cjs`),h=require(`../../functions/snarkjs/common.snarkjs.cjs`),g=require(`../../functions/pre-transaction/constructAdminData.cjs`),_=require(`../../functions/pre-transaction/getFeeStructure.cjs`),v=require(`../../functions/pre-transaction/shouldPatchAccessTokenMerkleTree.cjs`),y=require(`../../functions/pre-transaction/getKycAndSignatureData.cjs`),b=require(`../../functions/pre-transaction/buildCommitmentValidationData.cjs`);require(`../../functions/pre-transaction/index.cjs`);const x=require(`../../constants/tx-confirmation.constants.cjs`),S=require(`../../functions/utils/tx-confirmation.utils.cjs`),C=require(`../../functions/snarkjs/constructGeneralZkProof.cjs`),w=require(`../../functions/snarkjs/constructSolanaZkProof.cjs`),T=require(`../../functions/web3/functionCalls/transactCallRelayer.cjs`),E=require(`../../functions/pre-transaction/merge-with-fee-structure.cjs`);let D=require(`ethers`);var O=async(e,t,n,r)=>{let i=[...await p.addPaddingToUtxos(e,t,n,r,void 0,void 0,!1,!0)],a=[],o=s.getCurrentTimeInSeconds().toString();for(let t=0;t<n.length;t+=1){let{outputUtxos:n}=m.outputUtxoProcessing(e.userKeys,i[t],r[t],o);a.push(n)}return{inputUtxosArray:i,outputUtxosArray:a}},k=async(e,t,n,r)=>{let i=[...await p.addPaddingToUtxos(e,t,n,r,6,void 0,!1,!0)][0],a=s.getCurrentTimeInSeconds().toString(),{outputUtxos:o}=m.outputUtxoProcessing(e.userKeys,i,r[0],a,void 0,!1);return{inputUtxos:i,outputUtxos:o}},A=async(n,o,s,c,l)=>{let d=e.isTronLike(o),f=[s.erc20TokenAddress],p=s.erc20TokenAddress,[m,h,v]=await Promise.all([_.getFeeStructure(o,p,f,r.ExternalActionId.Transact),n.getRandomRelay(o,!0),n.getEthereumAddressByChain(o)]),x=u.addressToHexFormat(v);if(!h)throw Error(a.transactionErrorCodes.RELAYER_NOT_AVAILABLE);let S=u.addressToHexFormat(l),w=c-m.flatFee;if(w<=0n)throw Error(`Insufficient balance to cover fee. Balance: ${c}, Fee: ${m.flatFee}`);let D=[-w];E.mergeWithFeeStructure(o,f,D,m);let k={externalActionId:0n,externalAddress:S,externalActionMetadata:`0x00`},[{patchAccessTokenMerkleTree:A,signatureData:j},{inputUtxosArray:M,outputUtxosArray:N}]=await Promise.all([y.getKycAndSignatureData(n,o,f,D,x),O(n,o,f,D)]),P=`swapperM${D.length.toString()}x${M[0].length}x1`,[{zkCallData:F,circomData:I,dimData:L},R]=await Promise.all([C.constructZkProof(n.merkleTreeHinkalByChain[o],n.merkleTreeAccessTokenByChain[o],M,N,n.userKeys,P,k.externalActionId,k.externalAddress,k.externalActionMetadata,n.generateProofRemotely,h,o,void 0,void 0,void 0,A,void 0,m,n.getContractWithFetcher(o,t.ContractType.HinkalHelperContract),j),b.buildCommitmentValidationData(o,n.userKeys,f,M)]),z=await u.reorderZkCallData(d,F,L,I);return{tx:await T.transactCallRelayer(o,F,L,I,R,void 0,void 0,g.constructAdminData(i.AdminTransactionType.WithdrawOnChainUtxos,o,f,D,x),z),amountToRecipient:w}},j=async(t,n,i,s,l,u)=>{let d=[i.erc20TokenAddress],{originalDeployer:f,hinkalIdl:p}=e.networkRegistry[n].contractData;if(!f||!p)throw Error(`missing data`);let{userKeys:m,merkleTreeAccessTokenByChain:g,merkleTreeHinkalByChain:y}=t,x=i.erc20TokenAddress,[S,C,E]=await Promise.all([_.getFeeStructure(n,x,d,r.ExternalActionId.Transact,void 0,void 0,{mintTo:d[0],recipient:l,nullifierCount:u}),t.getRandomRelay(n,!0),t.getEthereumAddressByChain(n)]);if(!C)throw Error(a.transactionErrorCodes.RELAYER_NOT_AVAILABLE);let O=s-S.flatFee;if(O<=0n)throw Error(`Insufficient balance to cover fee. Balance: ${s}, Fee: ${S.flatFee}`);let A=[-O];A[0]-=S.flatFee;let[{patchAccessTokenMerkleTree:j,kycRequired:M,hasAccessToken:N},{inputUtxos:P,outputUtxos:F}]=await Promise.all([v.shouldPatchAccessTokenMerkleTree(t,n,d,A),k(t,n,d,A)]),I=c.Utxo.findCorrectRandomization(o.randomBigInt(31),t.userKeys.getShieldedPrivateKey()),L={tokenNumber:d.length,nullifierAmount:P.length,outputAmount:F.length},R=t.getSolanaProgram(p),z=h.calcEncryptedOutputs([F])[0][0],B=Array.from(D.ethers.getBytes(z)),[{proofAArr:V,proofBArr:H,proofCArr:U,publicInputsArr:W},G]=await Promise.all([w.constructSolanaZkProof(t.generateProofRemotely,f,y[n],g[n],m,R,[d[0]],[P],[F],I,S.flatFee,S.variableRate,l,C,L,[B],n,j),b.buildCommitmentValidationData(n,m,d,[P])]),K={recipient:l,mint:d[0]===`11111111111111111111111111111111`?void 0:d[0]};return{tx:await T.solanaTransactCallRelayer({chainId:n,relayAddress:C,functionName:`transact`,args:{proofAArr:V,proofBArr:H,proofCArr:U,publicInputsArr:W,encryptedOutputs:[B],relayerFee:S.flatFee.toString(),dimensions:L},accounts:K,commitmentValidationData:G,solanaAccessTokenData:!N&&M?{ethereumAddress:E,accessKey:m.getAccessKey()}:void 0}),amountToRecipient:O}},M=async(t,n,r,i,a,o)=>e.isSolanaLike(n)?j(t,n,r,i,a,o):A(t,n,r,i,a),N=async(e,t,r)=>{let i=[],a=f.validateAndGetChainId([t]),o=l.encodeTokenWithId(a,{erc20TokenAddress:t.erc20TokenAddress,tokenId:0});for(;;){await e.resetMerkleTreesIfNecessary([a]);let s=((await d.getInputUtxoAndBalancePerToken({hinkal:e,sliceIfMore6:!1,useBlockedUtxos:!0,chainId:a,allowRemoteDecryption:e.generateProofRemotely}))?.get(o)??[]).filter(e=>e.amount>0n).sort((e,t)=>Number(t.amount-e.amount)).slice(0,6),c=n.countTotalAmountInUtxos(s);if(!c)break;let{tx:l}=await M(e,a,t,c,r,s.length);await S.waitForTransactionConfirmation(a,l,{solanaCommitment:`finalized`,evmTimeoutMs:x.RELAYER_TX_CONFIRMATION_TIMEOUT}),i.push(l)}return i};exports.hinkalWithdrawStuckUtxos=N;
|
|
@@ -1,141 +0,0 @@
|
|
|
1
|
-
import { isSolanaLike as e, isTronLike as t, networkRegistry as n } from "../../constants/chains.constants.mjs";
|
|
2
|
-
import "../../constants/protocol.constants.mjs";
|
|
3
|
-
import { ContractType as r } from "../../types/ethereum-network.types.mjs";
|
|
4
|
-
import { countTotalAmountInUtxos as i } from "../../functions/utils/amounts.utils.mjs";
|
|
5
|
-
import { ExternalActionId as a } from "../../types/external-action.types.mjs";
|
|
6
|
-
import { AdminTransactionType as o } from "../../types/admin.types.mjs";
|
|
7
|
-
import "../../types/index.mjs";
|
|
8
|
-
import { transactionErrorCodes as s } from "../../error-handling/error-codes.constants.mjs";
|
|
9
|
-
import { randomBigInt as c } from "../../functions/web3/etherFunctions.mjs";
|
|
10
|
-
import { getCurrentTimeInSeconds as l } from "../../functions/utils/time.utils.mjs";
|
|
11
|
-
import { Utxo as u } from "../utxo/Utxo.mjs";
|
|
12
|
-
import { encodeTokenWithId as d } from "../../functions/utils/encodeTokenWithId.mjs";
|
|
13
|
-
import { addressToHexFormat as f, reorderZkCallData as p } from "../../functions/utils/tron.utils.mjs";
|
|
14
|
-
import { getInputUtxoAndBalancePerToken as m } from "../../functions/web3/events/getInputUtxoAndBalance.mjs";
|
|
15
|
-
import { validateAndGetChainId as h } from "../../functions/utils/token-check.utils.mjs";
|
|
16
|
-
import { addPaddingToUtxos as g } from "../../functions/web3/events/getShieldedBalance.mjs";
|
|
17
|
-
import { outputUtxoProcessing as _ } from "../../functions/pre-transaction/outputUtxoProcessing.mjs";
|
|
18
|
-
import { calcEncryptedOutputs as v } from "../../functions/snarkjs/common.snarkjs.mjs";
|
|
19
|
-
import { constructAdminData as y } from "../../functions/pre-transaction/constructAdminData.mjs";
|
|
20
|
-
import { getFeeStructure as b } from "../../functions/pre-transaction/getFeeStructure.mjs";
|
|
21
|
-
import { shouldPatchAccessTokenMerkleTree as x } from "../../functions/pre-transaction/shouldPatchAccessTokenMerkleTree.mjs";
|
|
22
|
-
import { getKycAndSignatureData as S } from "../../functions/pre-transaction/getKycAndSignatureData.mjs";
|
|
23
|
-
import { buildCommitmentValidationData as C } from "../../functions/pre-transaction/buildCommitmentValidationData.mjs";
|
|
24
|
-
import "../../functions/pre-transaction/index.mjs";
|
|
25
|
-
import { RELAYER_TX_CONFIRMATION_TIMEOUT as w } from "../../constants/tx-confirmation.constants.mjs";
|
|
26
|
-
import { waitForTransactionConfirmation as T } from "../../functions/utils/tx-confirmation.utils.mjs";
|
|
27
|
-
import { constructZkProof as E } from "../../functions/snarkjs/constructGeneralZkProof.mjs";
|
|
28
|
-
import { constructSolanaZkProof as D } from "../../functions/snarkjs/constructSolanaZkProof.mjs";
|
|
29
|
-
import { solanaTransactCallRelayer as O, transactCallRelayer as k } from "../../functions/web3/functionCalls/transactCallRelayer.mjs";
|
|
30
|
-
import { mergeWithFeeStructure as A } from "../../functions/pre-transaction/merge-with-fee-structure.mjs";
|
|
31
|
-
import { ethers as j } from "ethers";
|
|
32
|
-
//#region libs/shared/common/src/data-structures/Hinkal/hinkalWithdrawStuckUtxos.ts
|
|
33
|
-
var M = async (e, t, n, r) => {
|
|
34
|
-
let i = [...await g(e, t, n, r, void 0, void 0, !1, !0)], a = [], o = l().toString();
|
|
35
|
-
for (let t = 0; t < n.length; t += 1) {
|
|
36
|
-
let { outputUtxos: n } = _(e.userKeys, i[t], r[t], o);
|
|
37
|
-
a.push(n);
|
|
38
|
-
}
|
|
39
|
-
return {
|
|
40
|
-
inputUtxosArray: i,
|
|
41
|
-
outputUtxosArray: a
|
|
42
|
-
};
|
|
43
|
-
}, N = async (e, t, n, r) => {
|
|
44
|
-
let i = [...await g(e, t, n, r, 6, void 0, !1, !0)][0], a = l().toString(), { outputUtxos: o } = _(e.userKeys, i, r[0], a, void 0, !1);
|
|
45
|
-
return {
|
|
46
|
-
inputUtxos: i,
|
|
47
|
-
outputUtxos: o
|
|
48
|
-
};
|
|
49
|
-
}, P = async (e, n, i, c, l) => {
|
|
50
|
-
let u = t(n), d = [i.erc20TokenAddress], m = i.erc20TokenAddress, [h, g, _] = await Promise.all([
|
|
51
|
-
b(n, m, d, a.Transact),
|
|
52
|
-
e.getRandomRelay(n, !0),
|
|
53
|
-
e.getEthereumAddressByChain(n)
|
|
54
|
-
]), v = f(_);
|
|
55
|
-
if (!g) throw Error(s.RELAYER_NOT_AVAILABLE);
|
|
56
|
-
let x = f(l), w = c - h.flatFee;
|
|
57
|
-
if (w <= 0n) throw Error(`Insufficient balance to cover fee. Balance: ${c}, Fee: ${h.flatFee}`);
|
|
58
|
-
let T = [-w];
|
|
59
|
-
A(n, d, T, h);
|
|
60
|
-
let D = {
|
|
61
|
-
externalActionId: 0n,
|
|
62
|
-
externalAddress: x,
|
|
63
|
-
externalActionMetadata: "0x00"
|
|
64
|
-
}, [{ patchAccessTokenMerkleTree: O, signatureData: j }, { inputUtxosArray: N, outputUtxosArray: P }] = await Promise.all([S(e, n, d, T, v), M(e, n, d, T)]), F = `swapperM${T.length.toString()}x${N[0].length}x1`, [{ zkCallData: I, circomData: L, dimData: R }, z] = await Promise.all([E(e.merkleTreeHinkalByChain[n], e.merkleTreeAccessTokenByChain[n], N, P, e.userKeys, F, D.externalActionId, D.externalAddress, D.externalActionMetadata, e.generateProofRemotely, g, n, void 0, void 0, void 0, O, void 0, h, e.getContractWithFetcher(n, r.HinkalHelperContract), j), C(n, e.userKeys, d, N)]), B = await p(u, I, R, L);
|
|
65
|
-
return {
|
|
66
|
-
tx: await k(n, I, R, L, z, void 0, void 0, y(o.WithdrawOnChainUtxos, n, d, T, v), B),
|
|
67
|
-
amountToRecipient: w
|
|
68
|
-
};
|
|
69
|
-
}, F = async (e, t, r, i, o, l) => {
|
|
70
|
-
let d = [r.erc20TokenAddress], { originalDeployer: f, hinkalIdl: p } = n[t].contractData;
|
|
71
|
-
if (!f || !p) throw Error("missing data");
|
|
72
|
-
let { userKeys: m, merkleTreeAccessTokenByChain: h, merkleTreeHinkalByChain: g } = e, _ = r.erc20TokenAddress, [y, S, w] = await Promise.all([
|
|
73
|
-
b(t, _, d, a.Transact, void 0, void 0, {
|
|
74
|
-
mintTo: d[0],
|
|
75
|
-
recipient: o,
|
|
76
|
-
nullifierCount: l
|
|
77
|
-
}),
|
|
78
|
-
e.getRandomRelay(t, !0),
|
|
79
|
-
e.getEthereumAddressByChain(t)
|
|
80
|
-
]);
|
|
81
|
-
if (!S) throw Error(s.RELAYER_NOT_AVAILABLE);
|
|
82
|
-
let T = i - y.flatFee;
|
|
83
|
-
if (T <= 0n) throw Error(`Insufficient balance to cover fee. Balance: ${i}, Fee: ${y.flatFee}`);
|
|
84
|
-
let E = [-T];
|
|
85
|
-
E[0] -= y.flatFee;
|
|
86
|
-
let [{ patchAccessTokenMerkleTree: k, kycRequired: A, hasAccessToken: M }, { inputUtxos: P, outputUtxos: F }] = await Promise.all([x(e, t, d, E), N(e, t, d, E)]), I = u.findCorrectRandomization(c(31), e.userKeys.getShieldedPrivateKey()), L = {
|
|
87
|
-
tokenNumber: d.length,
|
|
88
|
-
nullifierAmount: P.length,
|
|
89
|
-
outputAmount: F.length
|
|
90
|
-
}, R = e.getSolanaProgram(p), z = v([F])[0][0], B = Array.from(j.getBytes(z)), [{ proofAArr: V, proofBArr: H, proofCArr: U, publicInputsArr: W }, G] = await Promise.all([D(e.generateProofRemotely, f, g[t], h[t], m, R, [d[0]], [P], [F], I, y.flatFee, y.variableRate, o, S, L, [B], t, k), C(t, m, d, [P])]), K = {
|
|
91
|
-
recipient: o,
|
|
92
|
-
mint: d[0] === "11111111111111111111111111111111" ? void 0 : d[0]
|
|
93
|
-
};
|
|
94
|
-
return {
|
|
95
|
-
tx: await O({
|
|
96
|
-
chainId: t,
|
|
97
|
-
relayAddress: S,
|
|
98
|
-
functionName: "transact",
|
|
99
|
-
args: {
|
|
100
|
-
proofAArr: V,
|
|
101
|
-
proofBArr: H,
|
|
102
|
-
proofCArr: U,
|
|
103
|
-
publicInputsArr: W,
|
|
104
|
-
encryptedOutputs: [B],
|
|
105
|
-
relayerFee: y.flatFee.toString(),
|
|
106
|
-
dimensions: L
|
|
107
|
-
},
|
|
108
|
-
accounts: K,
|
|
109
|
-
commitmentValidationData: G,
|
|
110
|
-
solanaAccessTokenData: !M && A ? {
|
|
111
|
-
ethereumAddress: w,
|
|
112
|
-
accessKey: m.getAccessKey()
|
|
113
|
-
} : void 0
|
|
114
|
-
}),
|
|
115
|
-
amountToRecipient: T
|
|
116
|
-
};
|
|
117
|
-
}, I = async (t, n, r, i, a, o) => e(n) ? F(t, n, r, i, a, o) : P(t, n, r, i, a), L = async (e, t, n) => {
|
|
118
|
-
let r = [], a = h([t]), o = d(a, {
|
|
119
|
-
erc20TokenAddress: t.erc20TokenAddress,
|
|
120
|
-
tokenId: 0
|
|
121
|
-
});
|
|
122
|
-
for (;;) {
|
|
123
|
-
await e.resetMerkleTreesIfNecessary([a]);
|
|
124
|
-
let s = ((await m({
|
|
125
|
-
hinkal: e,
|
|
126
|
-
sliceIfMore6: !1,
|
|
127
|
-
useBlockedUtxos: !0,
|
|
128
|
-
chainId: a,
|
|
129
|
-
allowRemoteDecryption: e.generateProofRemotely
|
|
130
|
-
}))?.get(o) ?? []).filter((e) => e.amount > 0n).sort((e, t) => Number(t.amount - e.amount)).slice(0, 6), c = i(s);
|
|
131
|
-
if (!c) break;
|
|
132
|
-
let { tx: l } = await I(e, a, t, c, n, s.length);
|
|
133
|
-
await T(a, l, {
|
|
134
|
-
solanaCommitment: "finalized",
|
|
135
|
-
evmTimeoutMs: w
|
|
136
|
-
}), r.push(l);
|
|
137
|
-
}
|
|
138
|
-
return r;
|
|
139
|
-
};
|
|
140
|
-
//#endregion
|
|
141
|
-
export { L as hinkalWithdrawStuckUtxos };
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
export * from './Hinkal';
|
|
2
|
-
export * from './HinkalPrivateBalanceController';
|
|
3
|
-
export * from './IHinkal';
|
|
4
|
-
export * from './hinkalDeposit';
|
|
5
|
-
export * from './hinkalSwap';
|
|
6
|
-
export * from './hinkalTransfer';
|
|
7
|
-
export * from './hinkalSolanaTransfer';
|
|
8
|
-
export * from './hinkalWithdraw';
|
|
9
|
-
export * from './hinkalPrivateWallet';
|
|
10
|
-
export * from './resetMerkleTrees';
|
|
11
|
-
export * from './hinkalProxySwap';
|
|
12
|
-
export * from './hinkalSolanaProxySwap';
|
|
13
|
-
export * from './hinkalSolanaProxySend';
|
|
14
|
-
export * from './hinkalSolanaProxyShield';
|
|
15
|
-
export * from './hinkalDepositAndWithdraw';
|
|
16
|
-
export * from './hinkalClaimUtxo';
|
|
17
|
-
export * from './hinkalSolanaProoflessDeposit';
|
|
18
|
-
export * from './hinkalSolanaClaimUtxo';
|
|
19
|
-
export * from './hinkalWithdrawStuckUtxos';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
require(`../../../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../constants/chains.constants.cjs`),t=require(`../../types/ethereum-network.types.cjs`),n=require(`../../types/balances.types.cjs`),r=require(`../../types/events.types.cjs`);require(`../../types/index.cjs`);const i=require(`../../functions/utils/getContractAddress.cjs`),a=require(`../../functions/utils/mutexes.utils.cjs`),o=require(`../../functions/utils/create-provider.cjs`),s=require(`../../functions/web3/events/balanceChangedHandler.cjs`),c=require(`../event-service/evm/ClientBlockchainEventEmitter.cjs`),l=require(`../event-service/solana/ClientSolanaBlockchainEventEmitter.cjs`);require(`../event-service/index.cjs`);const u=require(`../snapshot/SnapshotFetcherService.cjs`),d=require(`../snapshot/solana-snapshots/ClientSolanaCommitmentsSnapshotService.cjs`),f=require(`../snapshot/solana-snapshots/ClientSolanaNullifierSnapshotService.cjs`),p=require(`../snapshot/solana-snapshots/ClientSolanaAccessTokenSnapshotService.cjs`),m=require(`../snapshot/evm-snapshots/ClientAccessTokenSnapshotService.cjs`),h=require(`../snapshot/evm-snapshots/ClientCommitmentsSnapshotService.cjs`),g=require(`../snapshot/evm-snapshots/ClientNullifierSnapshotService.cjs`);require(`../snapshot/index.cjs`);let _=require(`@solana/web3.js`);var v=async(v,y)=>{let b=y??v.getSupportedChains();b.forEach(e=>{v.commitmentsSnapshotServiceByChain[e]?.intervalClear(),v.nullifierSnapshotServiceByChain[e]?.intervalClear(),v.accessTokenSnapshotServiceByChain[e]?.intervalClear()});let x=b.map(async y=>{let{maxPageSize:b,fetchRpcUrl:x,contractData:S}=e.networkRegistry[y],C,w;if(e.isSolanaLike(y)){let e=S.hinkalAddress;if(!x||!e)throw Error(`Fetch RPC URL or Solana program ID is not set`);C=new l.ClientSolanaBlockchainEventEmitter(y,o.createCustomSolanaConnection(x),new _.PublicKey(e),0,a.getChainBalanceFetchingMutex(y),b);let t=S.hinkalIdl;t&&C.setIdl(t);let n=new u.SnapshotFetcherService(y,e);v.commitmentsSnapshotServiceByChain[y]=new d.ClientSolanaCommitmentsSnapshotService(C,n),v.nullifierSnapshotServiceByChain[y]=new f.ClientSolanaNullifierSnapshotService(C,n),v.accessTokenSnapshotServiceByChain[y]=new p.ClientSolanaAccessTokenSnapshotService(C,n)}else{let e=v.getContractWithFetcherByChainId(y,t.ContractType.HinkalContract),n=v.getContractWithFetcherByChainId(y,t.ContractType.DepositOnChainUtxos),o=a.getChainBalanceFetchingMutex(y);C=new c.ClientBlockchainEventEmitter(r.EventCategory.MainContractEvents,y,e,0,o,b,n),w=new c.ClientBlockchainEventEmitter(r.EventCategory.AccessTokenContractEvents,y,v.getContractWithFetcherByChainId(y,t.ContractType.AccessTokenContract),0,o,b);let s=new u.SnapshotFetcherService(y,i.getContractAddress(e));v.commitmentsSnapshotServiceByChain[y]=new h.ClientCommitmentsSnapshotService(C,s),v.nullifierSnapshotServiceByChain[y]=new g.ClientNullifierSnapshotService(C,s),v.accessTokenSnapshotServiceByChain[y]=new m.ClientAccessTokenSnapshotService(w,s)}let T=v.commitmentsSnapshotServiceByChain[y],E=v.nullifierSnapshotServiceByChain[y],D=v.accessTokenSnapshotServiceByChain[y];if(!T||!E||!D)throw Error(`Missing snapshot service for chain ${y}`);await Promise.all([T.init(),E.init(),D.init()]),await Promise.all([C.init(),w?.init()]),v.merkleTreeHinkalByChain[y]=T.merkleTree,v.merkleTreeAccessTokenByChain[y]=D.merkleTree,v.nullifiersByChain[y]=E.nullifiers,v.encryptedOutputsByChain[y]=T.encryptedOutputs,C.onEventsProcessed=e=>{e>0&&s.balanceChangedHandler({updateType:n.PrivateBalanceUpdateType.FreshWithoutLoader,updateTokensListBefore:!0,chainIdToUpdate:y})}});await Promise.allSettled(x)};exports.resetMerkleTrees=v;
|