@hinkal/common 0.3.9 → 0.3.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +26 -10
- package/common/src/API/API.cjs +1 -1
- package/common/src/API/API.d.ts +4 -5
- package/common/src/API/API.mjs +79 -80
- package/common/src/API/callRelayer.d.ts +1 -0
- package/common/src/API/dashboardTransactionCalls.cjs +1 -1
- package/common/src/API/dashboardTransactionCalls.d.ts +4 -1
- package/common/src/API/dashboardTransactionCalls.mjs +2 -2
- package/common/src/API/enclaveRecipientInfoCalls.d.ts +0 -2
- package/common/src/API/enclaveSignatureCalls.cjs +1 -1
- package/common/src/API/enclaveSignatureCalls.d.ts +2 -1
- package/common/src/API/enclaveSignatureCalls.mjs +5 -8
- package/common/src/API/enclaveUtxoCalls.cjs +1 -1
- package/common/src/API/enclaveUtxoCalls.d.ts +12 -8
- package/common/src/API/enclaveUtxoCalls.mjs +17 -20
- package/common/src/API/privateSendRecipientInfoCalls.cjs +1 -1
- package/common/src/API/privateSendRecipientInfoCalls.d.ts +3 -6
- package/common/src/API/privateSendRecipientInfoCalls.mjs +12 -6
- package/common/src/API/scheduled-transactions-calls.cjs +1 -1
- package/common/src/API/scheduled-transactions-calls.d.ts +1 -5
- package/common/src/API/scheduled-transactions-calls.mjs +2 -6
- package/common/src/constants/bridging.constants.cjs +1 -1
- package/common/src/constants/bridging.constants.d.ts +1 -0
- package/common/src/constants/bridging.constants.mjs +1 -1
- package/common/src/constants/chains.constants.cjs +1 -1
- package/common/src/constants/chains.constants.d.ts +18 -17
- package/common/src/constants/chains.constants.mjs +108 -89
- package/common/src/constants/deploy-data/deploy-data-arbMainnet.json.cjs +1 -1
- package/common/src/constants/deploy-data/deploy-data-arbMainnet.json.mjs +2 -1
- package/common/src/constants/deploy-data/deploy-data-base.json.cjs +1 -1
- package/common/src/constants/deploy-data/deploy-data-base.json.mjs +2 -1
- package/common/src/constants/deploy-data/deploy-data-bnbMainnet.json.cjs +1 -1
- package/common/src/constants/deploy-data/deploy-data-bnbMainnet.json.mjs +2 -1
- package/common/src/constants/deploy-data/deploy-data-ethMainnet.json.cjs +1 -1
- package/common/src/constants/deploy-data/deploy-data-ethMainnet.json.mjs +2 -1
- package/common/src/constants/deploy-data/deploy-data-optimism.json.cjs +1 -1
- package/common/src/constants/deploy-data/deploy-data-optimism.json.mjs +2 -1
- package/common/src/constants/deploy-data/deploy-data-polygon.json.cjs +1 -1
- package/common/src/constants/deploy-data/deploy-data-polygon.json.mjs +2 -1
- package/common/src/constants/events.constants.cjs +1 -1
- package/common/src/constants/events.constants.mjs +1 -16
- package/common/src/constants/protocol.constants.cjs +1 -1
- package/common/src/constants/protocol.constants.d.ts +11 -8
- package/common/src/constants/protocol.constants.mjs +1 -1
- package/common/src/constants/server.constants.cjs +1 -1
- package/common/src/constants/server.constants.d.ts +1 -4
- package/common/src/constants/server.constants.mjs +1 -4
- package/common/src/constants/tx-confirmation.constants.cjs +1 -1
- package/common/src/constants/tx-confirmation.constants.d.ts +1 -0
- package/common/src/constants/tx-confirmation.constants.mjs +2 -2
- package/common/src/data-structures/Hinkal/Hinkal.cjs +1 -1
- package/common/src/data-structures/Hinkal/Hinkal.d.ts +8 -10
- package/common/src/data-structures/Hinkal/Hinkal.mjs +132 -160
- package/common/src/data-structures/Hinkal/IHinkal.d.ts +7 -10
- package/common/src/data-structures/Hinkal/handleAutoDepositBack.cjs +1 -1
- package/common/src/data-structures/Hinkal/handleAutoDepositBack.mjs +23 -23
- package/common/src/data-structures/Hinkal/hinkalActionReceive.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalActionReceive.mjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalBridgePrivateToPrivate.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalBridgePrivateToPrivate.mjs +57 -57
- package/common/src/data-structures/Hinkal/hinkalDeposit.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalDeposit.mjs +10 -10
- package/common/src/data-structures/Hinkal/hinkalDepositAndWithdraw.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalDepositAndWithdraw.mjs +19 -19
- package/common/src/data-structures/Hinkal/hinkalNearDepositAndBridge.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalNearDepositAndBridge.mjs +3 -2
- package/common/src/data-structures/Hinkal/hinkalProxySend.cjs +1 -0
- package/common/src/data-structures/Hinkal/hinkalProxySend.d.ts +6 -0
- package/common/src/data-structures/Hinkal/hinkalProxySend.mjs +16 -0
- package/common/src/data-structures/Hinkal/hinkalProxySwap.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalProxySwap.d.ts +1 -1
- package/common/src/data-structures/Hinkal/hinkalProxySwap.mjs +13 -12
- package/common/src/data-structures/Hinkal/hinkalProxyToPrivate.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalProxyToPrivate.mjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalSolanaDepositAndWithdraw.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalSolanaDepositAndWithdraw.mjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalSolanaProxySwap.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalSolanaProxySwap.d.ts +1 -1
- package/common/src/data-structures/Hinkal/hinkalSolanaProxySwap.mjs +9 -9
- package/common/src/data-structures/Hinkal/hinkalSolanaSponsoredShield.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalSolanaSponsoredShield.d.ts +1 -1
- package/common/src/data-structures/Hinkal/hinkalSolanaSponsoredShield.mjs +15 -14
- package/common/src/data-structures/Hinkal/hinkalSolanaSwap.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalSolanaSwap.mjs +44 -47
- package/common/src/data-structures/Hinkal/hinkalSolanaTransact.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalSolanaTransact.mjs +2 -2
- package/common/src/data-structures/Hinkal/hinkalSolanaTransfer.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalSolanaTransfer.mjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalTransact.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalTransact.mjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalTransfer.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalTransfer.mjs +4 -4
- package/common/src/data-structures/Hinkal/hinkalWithdrawStuckUtxos.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalWithdrawStuckUtxos.mjs +101 -94
- package/common/src/data-structures/Hinkal/index.d.ts +0 -1
- package/common/src/data-structures/IndexedDB/activity-db.cjs +1 -1
- package/common/src/data-structures/IndexedDB/activity-db.mjs +34 -34
- package/common/src/data-structures/IndexedDB/index.cjs +1 -1
- package/common/src/data-structures/IndexedDB/index.d.ts +1 -0
- package/common/src/data-structures/IndexedDB/index.mjs +1 -0
- package/common/src/data-structures/IndexedDB/scheduled-transactions-db.cjs +1 -0
- package/common/src/data-structures/IndexedDB/scheduled-transactions-db.d.ts +11 -0
- package/common/src/data-structures/IndexedDB/scheduled-transactions-db.mjs +34 -0
- package/common/src/data-structures/IndexedDB/signatures-db.cjs +1 -1
- package/common/src/data-structures/IndexedDB/signatures-db.mjs +11 -11
- package/common/src/data-structures/MultiThreadedUtxoUtils/MultiThreadedUtxoUtils.cjs +1 -1
- package/common/src/data-structures/MultiThreadedUtxoUtils/MultiThreadedUtxoUtils.d.ts +1 -0
- package/common/src/data-structures/MultiThreadedUtxoUtils/MultiThreadedUtxoUtils.mjs +6 -3
- package/common/src/data-structures/TokenDBs/PrivateTokensDB.cjs +1 -1
- package/common/src/data-structures/TokenDBs/PrivateTokensDB.mjs +18 -19
- package/common/src/data-structures/crypto-keys/keys.cjs +1 -1
- package/common/src/data-structures/crypto-keys/keys.d.ts +1 -0
- package/common/src/data-structures/crypto-keys/keys.mjs +3 -0
- package/common/src/data-structures/event-service/evm/BlockchainEventEmitter.cjs +1 -1
- package/common/src/data-structures/event-service/evm/BlockchainEventEmitter.mjs +11 -11
- package/common/src/data-structures/event-service/helpers/ClientEventHelper.cjs +1 -1
- package/common/src/data-structures/event-service/helpers/ClientEventHelper.mjs +6 -6
- package/common/src/data-structures/private-balances/HinkalPrivateBalanceController.cjs +1 -1
- package/common/src/data-structures/private-balances/HinkalPrivateBalanceController.d.ts +1 -0
- package/common/src/data-structures/private-balances/HinkalPrivateBalanceController.mjs +79 -75
- package/common/src/data-structures/provider-adapter/IProviderAdapter.d.ts +1 -4
- package/common/src/data-structures/token-price-fetcher/TokenChecker.cjs +1 -1
- package/common/src/data-structures/token-price-fetcher/TokenChecker.d.ts +1 -0
- package/common/src/data-structures/token-price-fetcher/TokenChecker.mjs +1 -0
- package/common/src/error-handling/error-codes.constants.cjs +1 -1
- package/common/src/error-handling/error-codes.constants.d.ts +6 -0
- package/common/src/error-handling/error-codes.constants.mjs +10 -4
- package/common/src/functions/auto-deposit-back-helpers/get-gas-token-records.cjs +1 -1
- package/common/src/functions/auto-deposit-back-helpers/get-gas-token-records.mjs +7 -6
- package/common/src/functions/auto-deposit-back-helpers/select-gas-token.cjs +1 -1
- package/common/src/functions/auto-deposit-back-helpers/select-gas-token.mjs +8 -8
- package/common/src/functions/index.cjs +1 -1
- package/common/src/functions/index.mjs +1 -2
- package/common/src/functions/pre-transaction/getVolatileTransferAmount.cjs +1 -1
- package/common/src/functions/pre-transaction/getVolatileTransferAmount.mjs +13 -13
- package/common/src/functions/private-wallet/emporium.helpers.cjs +1 -1
- package/common/src/functions/private-wallet/emporium.helpers.mjs +13 -13
- package/common/src/functions/private-wallet/emporium.swap.helpers.cjs +1 -1
- package/common/src/functions/private-wallet/emporium.swap.helpers.mjs +13 -13
- package/common/src/functions/snarkjs/constructGeneralZkProof.cjs +1 -1
- package/common/src/functions/snarkjs/constructGeneralZkProof.mjs +4 -4
- package/common/src/functions/snarkjs/constructSolanaZkProof.cjs +1 -1
- package/common/src/functions/snarkjs/constructSolanaZkProof.mjs +5 -5
- package/common/src/functions/snarkjs/constructTxEnclave.cjs +1 -1
- package/common/src/functions/snarkjs/constructTxEnclave.d.ts +1 -1
- package/common/src/functions/snarkjs/constructTxEnclave.mjs +61 -133
- package/common/src/functions/snarkjs/constructTxEnclaveVerify.cjs +1 -0
- package/common/src/functions/snarkjs/constructTxEnclaveVerify.d.ts +5 -0
- package/common/src/functions/snarkjs/constructTxEnclaveVerify.mjs +295 -0
- package/common/src/functions/utils/addresses.cjs +1 -1
- package/common/src/functions/utils/addresses.d.ts +1 -0
- package/common/src/functions/utils/addresses.mjs +13 -12
- package/common/src/functions/utils/bridge-arrival.utils.cjs +1 -1
- package/common/src/functions/utils/bridge-arrival.utils.mjs +12 -11
- package/common/src/functions/utils/bridge-claimable-utxo.utils.cjs +1 -1
- package/common/src/functions/utils/bridge-claimable-utxo.utils.d.ts +1 -1
- package/common/src/functions/utils/bridge-claimable-utxo.utils.mjs +4 -4
- package/common/src/functions/utils/create-provider.cjs +1 -1
- package/common/src/functions/utils/create-provider.mjs +4 -1
- package/common/src/functions/utils/enclave-recipient-info-storage.cjs +1 -1
- package/common/src/functions/utils/enclave-recipient-info-storage.d.ts +4 -1
- package/common/src/functions/utils/enclave-recipient-info-storage.mjs +1 -0
- package/common/src/functions/utils/enclave-signature-storage.cjs +1 -1
- package/common/src/functions/utils/enclave-signature-storage.d.ts +1 -1
- package/common/src/functions/utils/enclave-signature-storage.mjs +3 -3
- package/common/src/functions/utils/enclave-utxo-storage.cjs +1 -1
- package/common/src/functions/utils/enclave-utxo-storage.d.ts +3 -3
- package/common/src/functions/utils/enclave-utxo-storage.mjs +8 -5
- package/common/src/functions/utils/encryptInputForEnclave.cjs +1 -1
- package/common/src/functions/utils/encryptInputForEnclave.d.ts +8 -0
- package/common/src/functions/utils/encryptInputForEnclave.mjs +43 -23
- package/common/src/functions/utils/erc20tokenFunctions.cjs +1 -1
- package/common/src/functions/utils/erc20tokenFunctions.mjs +2 -15
- package/common/src/functions/utils/fees.utils.cjs +1 -1
- package/common/src/functions/utils/fees.utils.mjs +6 -6
- package/common/src/functions/utils/index.cjs +1 -1
- package/common/src/functions/utils/index.d.ts +1 -0
- package/common/src/functions/utils/index.mjs +3 -3
- package/common/src/functions/utils/ipfs.d.ts +2 -3
- package/common/src/functions/utils/lifi.utils.d.ts +2 -0
- package/common/src/functions/utils/nearIntents.utils.cjs +1 -1
- package/common/src/functions/utils/nearIntents.utils.mjs +7 -7
- package/common/src/functions/utils/publicBalance.utils.cjs +1 -1
- package/common/src/functions/utils/publicBalance.utils.mjs +10 -10
- package/common/src/functions/utils/temporary-wallet-recovery.utils.cjs +1 -0
- package/common/src/functions/utils/temporary-wallet-recovery.utils.d.ts +7 -0
- package/common/src/functions/utils/temporary-wallet-recovery.utils.mjs +10 -0
- package/common/src/functions/utils/tron.utils.cjs +1 -1
- package/common/src/functions/utils/tron.utils.mjs +16 -29
- package/common/src/functions/utils/tx-confirmation.utils.cjs +1 -1
- package/common/src/functions/utils/tx-confirmation.utils.d.ts +1 -0
- package/common/src/functions/utils/tx-confirmation.utils.mjs +16 -13
- package/common/src/functions/web3/events/getInputUtxoAndBalance.cjs +1 -1
- package/common/src/functions/web3/events/getInputUtxoAndBalance.mjs +5 -5
- package/common/src/functions/web3/events/getInputUtxosEnclave.cjs +1 -1
- package/common/src/functions/web3/events/getInputUtxosEnclave.d.ts +1 -1
- package/common/src/functions/web3/events/getInputUtxosEnclave.mjs +19 -11
- package/common/src/functions/web3/events/getShieldedBalance.cjs +1 -1
- package/common/src/functions/web3/events/getShieldedBalance.d.ts +4 -4
- package/common/src/functions/web3/events/getShieldedBalance.mjs +113 -101
- package/common/src/functions/web3/functionCalls/transactCallDirectTron.cjs +1 -1
- package/common/src/functions/web3/functionCalls/transactCallDirectTron.mjs +16 -16
- package/common/src/providers/SolanaProviderAdapter.cjs +1 -1
- package/common/src/providers/SolanaProviderAdapter.d.ts +1 -4
- package/common/src/providers/SolanaProviderAdapter.mjs +3 -6
- package/common/src/providers/WagmiProviderAdapter.cjs +1 -1
- package/common/src/providers/WagmiProviderAdapter.mjs +5 -5
- package/common/src/types/cache.types.cjs +1 -1
- package/common/src/types/cache.types.d.ts +2 -1
- package/common/src/types/cache.types.mjs +1 -1
- package/common/src/types/enclaveApi.types.d.ts +2 -3
- package/common/src/types/ethereum-network.types.d.ts +1 -0
- package/common/src/types/events.types.d.ts +1 -0
- package/common/src/types/near-intents.types.d.ts +1 -0
- package/common/src/types/remote-proof.types.d.ts +5 -0
- package/common/src/types/remote-tx-build.types.d.ts +37 -4
- package/common/src/types/scheduled-transactions.types.d.ts +18 -0
- package/common/src/types/solana.types.d.ts +0 -3
- package/common/src/webworker/{logError-RKYfeI6h.js → logError-cvFNxc-0.js} +1 -1
- package/common/src/webworker/package.json +1 -2
- package/common/src/webworker/snarkjsWorker/snarkjsWorkerLauncher.ts?worker&url.cjs +1 -1
- package/common/src/webworker/snarkjsWorker/snarkjsWorkerLauncher.ts?worker&url.mjs +1 -1
- package/common/src/webworker/snarkjsWorkerNode.cjs +1 -1
- package/common/src/webworker/utxoWorker/utxoWorker.types.d.ts +4 -2
- package/common/src/webworker/utxoWorker/utxoWorkerLauncher.ts?worker&url.cjs +1 -1
- package/common/src/webworker/utxoWorker/utxoWorkerLauncher.ts?worker&url.mjs +1 -1
- package/common/src/webworker/utxoWorkerNode.cjs +1 -1
- package/common/src/webworker/viteWorkerURL.constant.cjs +3 -3
- package/common/src/webworker/viteWorkerURL.constant.mjs +3 -3
- package/common/src/webworker/workerProxy-BHzCZ9HT.js +1 -0
- package/common/src/webworker/zkProofWorker/zkProofWorkerLauncher.ts?worker&url.cjs +1 -1
- package/common/src/webworker/zkProofWorker/zkProofWorkerLauncher.ts?worker&url.mjs +1 -1
- package/common/src/webworker/zkProofWorkerNode.cjs +1 -1
- package/package.json +1 -2
- package/providers/prepareEthersHinkal.cjs +1 -1
- package/providers/prepareEthersHinkal.d.ts +1 -0
- package/providers/prepareEthersHinkal.mjs +2 -2
- package/providers/prepareSolanaHinkal.cjs +1 -1
- package/providers/prepareSolanaHinkal.d.ts +1 -0
- package/providers/prepareSolanaHinkal.mjs +2 -2
- package/providers/prepareTronHinkal.cjs +1 -1
- package/providers/prepareTronHinkal.d.ts +1 -0
- package/providers/prepareTronHinkal.mjs +2 -2
- package/providers/prepareWagmiHinkal.cjs +1 -1
- package/providers/prepareWagmiHinkal.d.ts +1 -0
- package/providers/prepareWagmiHinkal.mjs +2 -2
- package/services/Hinkal.cjs +1 -1
- package/services/Hinkal.d.ts +8 -2
- package/services/Hinkal.mjs +15 -4
- package/types/IHinkal.d.ts +8 -2
- package/common/src/API/evm-token-assets.cjs +0 -1
- package/common/src/API/evm-token-assets.mjs +0 -20
- package/common/src/API/getAnyRecipientInfo.d.ts +0 -1
- package/common/src/API/solana-nft-assets.cjs +0 -1
- package/common/src/API/solana-nft-assets.mjs +0 -11
- package/common/src/data-structures/Hinkal/hinkalSolanaSponsoredProxySend.d.ts +0 -5
- package/common/src/data-structures/TokenDBs/AlchemyPublicTokensDB.cjs +0 -1
- package/common/src/data-structures/TokenDBs/AlchemyPublicTokensDB.mjs +0 -109
- package/common/src/data-structures/TokenDBs/ArcPublicTokensDB.cjs +0 -1
- package/common/src/data-structures/TokenDBs/ArcPublicTokensDB.mjs +0 -94
- package/common/src/data-structures/TokenDBs/EventsPublicTokensDB.cjs +0 -1
- package/common/src/data-structures/TokenDBs/EventsPublicTokensDB.mjs +0 -134
- package/common/src/data-structures/TokenDBs/PublicTokensDB.cjs +0 -1
- package/common/src/data-structures/TokenDBs/PublicTokensDB.mjs +0 -32
- package/common/src/data-structures/TokenDBs/TempoPublicTokensDB.cjs +0 -1
- package/common/src/data-structures/TokenDBs/TempoPublicTokensDB.mjs +0 -37
- package/common/src/data-structures/TokenDBs/TronPublicTokensDB.cjs +0 -1
- package/common/src/data-structures/TokenDBs/TronPublicTokensDB.mjs +0 -51
- package/common/src/data-structures/TokenDBs/index.cjs +0 -1
- package/common/src/data-structures/TokenDBs/index.mjs +0 -6
- package/common/src/functions/utils/ipfs.cjs +0 -1
- package/common/src/functions/utils/ipfs.mjs +0 -1
- package/common/src/functions/utils/reloadPage.cjs +0 -1
- package/common/src/functions/utils/reloadPage.mjs +0 -4
- package/common/src/webworker/workerProxy-COB7g4Qc.js +0 -1
package/README.md
CHANGED
|
@@ -43,11 +43,12 @@ Initializing the SDK creates a `Hinkal` object that encapsulates:
|
|
|
43
43
|
- Actions the user can perform, such as shielding (depositing), transfers, and swapping
|
|
44
44
|
- Cryptographic keys for privacy-preserving operations
|
|
45
45
|
|
|
46
|
-
Each provider exposes
|
|
46
|
+
Each provider exposes four prepare helpers:
|
|
47
47
|
|
|
48
48
|
- `prepare*Hinkal` — signs the Hinkal login message and initializes user keys (deterministic signers)
|
|
49
49
|
- `prepare*HinkalWithEnclaveSignIn` — signs in through the secure enclave and stabilizes identity for non-deterministic signers (smart contract wallets, some hardware wallets)
|
|
50
50
|
- `prepare*HinkalFromSignature` — initializes user keys from a previously stored signature
|
|
51
|
+
- `prepare*HinkalFromNullifyingKey` — initializes a read-only session from an exported nullifying key (balance viewing only, no signing capability)
|
|
51
52
|
|
|
52
53
|
**ethers.js:**
|
|
53
54
|
|
|
@@ -83,7 +84,7 @@ import { prepareTronHinkal } from '@hinkal/common/providers/prepareTronHinkal';
|
|
|
83
84
|
const hinkal = await prepareTronHinkal(connector, hinkalConfig);
|
|
84
85
|
```
|
|
85
86
|
|
|
86
|
-
The same `WithEnclaveSignIn` and `
|
|
87
|
+
The same `WithEnclaveSignIn`, `FromSignature`, and `FromNullifyingKey` variants are available for each provider (for example, `prepareWagmiHinkalWithEnclaveSignIn`, `prepareSolanaHinkalFromSignature`, `prepareEthersHinkalFromNullifyingKey`).
|
|
87
88
|
|
|
88
89
|
The `hinkalConfig` is defined as follows:
|
|
89
90
|
|
|
@@ -127,18 +128,12 @@ When that happens, a returning user appears as a new account. Funds deposited in
|
|
|
127
128
|
**Manual approach:** if you manage identity yourself, call `storeAndGetInitialSignature` and then either `initUserKeysWithSignature` or `prepare*HinkalFromSignature`:
|
|
128
129
|
|
|
129
130
|
```typescript
|
|
130
|
-
function storeAndGetInitialSignature(
|
|
131
|
-
authSignature: string,
|
|
132
|
-
isSolanaLedger?: boolean,
|
|
133
|
-
txMessageForSolanaLedger?: string,
|
|
134
|
-
): Promise<string>;
|
|
131
|
+
function storeAndGetInitialSignature(authSignature: string): Promise<string>;
|
|
135
132
|
```
|
|
136
133
|
|
|
137
134
|
Parameters:
|
|
138
135
|
|
|
139
|
-
- `authSignature` — signature from the current login session
|
|
140
|
-
- `isSolanaLedger` — set to `true` for a Solana Ledger wallet. Defaults to `false`
|
|
141
|
-
- `txMessageForSolanaLedger` — base64-encoded transaction message used for Solana Ledger authentication. Required when `isSolanaLedger` is `true`
|
|
136
|
+
- `authSignature` — signature from the current login session. For Solana Ledger wallets, sign with `signSolanaLedgerMessage()` first
|
|
142
137
|
|
|
143
138
|
Typical flow with a stored signature:
|
|
144
139
|
|
|
@@ -161,6 +156,27 @@ At rest, only the encrypted signature and encrypted key are stored in the databa
|
|
|
161
156
|
|
|
162
157
|
Requests that fail this check are rejected. The first signature stored for a given address is never replaced. Later logins only use a fresh signature to authenticate retrieval of the original.
|
|
163
158
|
|
|
159
|
+
### Read-only sessions (view keys)
|
|
160
|
+
|
|
161
|
+
A signed-in session can export a nullifying key: a value derived from the login signature that resolves to the same shielded account but cannot authorize spends. Use it to view balances on another device, in a backend job, or anywhere handing out the wallet's signing capability is not acceptable.
|
|
162
|
+
|
|
163
|
+
```typescript
|
|
164
|
+
// on a fully signed-in session
|
|
165
|
+
const nullifyingKey = hinkal.getNullifyingKey();
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
Initialize a separate, read-only session from that key alone, either through a provider helper or directly on an existing `Hinkal` instance:
|
|
169
|
+
|
|
170
|
+
```typescript
|
|
171
|
+
const readOnlyHinkal = await prepareWagmiHinkalFromNullifyingKey(connector, wagmiConfig, nullifyingKey, hinkalConfig);
|
|
172
|
+
// or:
|
|
173
|
+
readOnlyHinkal.initUserKeysWithNullifyingKey(nullifyingKey);
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
A read-only session can fetch balances (`getTotalBalance`, `privateBalancesWithUSD`), decrypt incoming shielded outputs, and call `getRecipientInfo()` to receive funds — everything needed to view holdings. It cannot spend: `transfer`, `withdraw`, `swap`, `actionPrivateWallet`, and every other value-moving call throw, because they require the EdDSA spending key derived from the original wallet signature, which a nullifying key cannot reproduce.
|
|
177
|
+
|
|
178
|
+
Treat an exported nullifying key as sensitive account-specific material, not a public value — hand it out only to contexts you trust with read access to the account's balances and incoming transfers.
|
|
179
|
+
|
|
164
180
|
### Shielded balance
|
|
165
181
|
|
|
166
182
|
Shielded balances are encrypted token holdings stored within the Hinkal protocol. Unlike regular blockchain balances that are publicly visible, shielded balances are hidden from external observers.
|
package/common/src/API/API.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require(`./
|
|
1
|
+
const e=require(`./relayCalls.cjs`),t=require(`./getTokenPrice.cjs`),n=require(`./getOdosPriceForToken.cjs`),r=require(`./simulate-transaction.cjs`),i=require(`./simulate-batch-tx.cjs`),a=require(`./token-calls.cjs`),o=require(`./get-token-data.cjs`),s=require(`./proxyAccountsCalls.cjs`),c=require(`./callMonitor.cjs`),l=require(`./callRelayer.cjs`),u=require(`./seedless-calls.cjs`),d=require(`./temporaryWalletCalls.cjs`),f=require(`./onrampCalls.cjs`),p=require(`./get-token-price-chart-data.cjs`),m=require(`./privacy-score-calls.cjs`),h=require(`./privateSendRecipientInfoCalls.cjs`),g=require(`./privateSendNonceCalls.cjs`),_=require(`./snapshot-event-calls.cjs`),v=require(`./privateSendEmailNotificationsCalls.cjs`),y=require(`./tronSubsidyCalls.cjs`),b=require(`./dashboardAccountCalls.cjs`),x=require(`./dashboardContactCalls.cjs`),S=require(`./dashboardPayoutCalls.cjs`),C=require(`./dashboardAccountMemberCalls.cjs`),w=require(`./dashboardBalanceCalls.cjs`),T=require(`./dashboardTransactionCalls.cjs`),E=require(`./payoutNotificationStateCalls.cjs`),D=require(`./enclaveUtxoCalls.cjs`),O=require(`./rewardsUserCalls.cjs`),k=require(`./weeklyAnalyticCalls.cjs`);var A={getTokenPrices:t.getTokenPrices,getOdosPriceForToken:n.getOdosPriceForToken,getTokenPriceChartData:p.getTokenPriceChartData,getTokenPreviousDayPrices:t.getTokenPreviousDayPrices,getIdleRelay:e.getIdleRelay,getUserAnalytics:k.getUserAnalytics,updateRewardsUser:O.updateRewardsUser,getRewardsUser:O.getRewardsUser,checkUsernameAvailability:O.checkUsernameAvailability,simulateTransaction:r.simulateTransaction,simulateBatchTx:i.simulateBatchTx,tokensInfoCall:a.tokensInfoCall,getTokenData:o.getTokenData,getBalancesEnclaveCall:D.getBalancesEnclaveCall,storeClaimableKeyEnclaveCall:D.storeClaimableKeyEnclaveCall,getUtxosEnclaveCall:D.getUtxosEnclaveCall,getProxyAccounts:s.getProxyAccounts,updateProxyAccounts:s.updateProxyAccounts,monitor:c.monitor,callRelayerSolanaTransactBatchAPI:l.callRelayerSolanaTransactBatchAPI,callRelayerSolanaSponsoredBuildAPI:l.callRelayerSolanaSponsoredBuildAPI,callRelayerSolanaSponsoredSubmitAPI:l.callRelayerSolanaSponsoredSubmitAPI,seedlessInit:u.seedlessInit,seedlessBackup:u.seedlessBackup,seedlessCheckPassword:u.seedlessCheckPassword,seedlessStatus:u.seedlessStatus,seedlessSalt:u.seedlessSalt,getTemporaryWalletNonces:d.getTemporaryWalletNonces,addTemporaryWalletNonce:d.addTemporaryWalletNonce,encodeMoonPayBuyUrl:f.encodeMoonPayBuyUrl,generateMoonPayQuote:f.generateMoonPayQuote,getPrivateTransactionRatio:m.getPrivateTransactionRatio,savePrivacyScoreAndGetPrivacyRank:m.savePrivacyScoreAndGetPrivacyRank,allocateRecipientInfosEnclaveCall:h.allocateRecipientInfosEnclaveCall,syncPrivateSendNonce:g.syncPrivateSendNonce,reservePrivateSendNonceRange:g.reservePrivateSendNonceRange,getSnapshotServerEvents:_.getSnapshotServerEvents,sendPrivateSendEmailNotifications:v.sendPrivateSendEmailNotifications,checkTronSubsidyEligibility:y.checkTronSubsidyEligibility,recordTronSubsidyUsage:y.recordTronSubsidyUsage,getDashboardAccount:b.getDashboardAccount,updateDashboardAccount:b.updateDashboardAccount,addDashboardContact:x.addDashboardContact,deleteDashboardContact:x.deleteDashboardContact,deleteDashboardAccount:b.deleteDashboardAccount,updateDashboardContact:x.updateDashboardContact,getDashboardContacts:x.getDashboardContacts,updateUserProfile:C.updateUserProfile,sendDashboardInvitationEmail:C.sendDashboardInvitationEmail,resolveInviteRequest:C.resolveInviteRequest,deleteInviteRequest:C.deleteInviteRequest,removeMember:C.removeMember,editMember:C.editMember,createDashboardPayout:S.createDashboardPayout,getDashboardPayouts:S.getDashboardPayouts,syncDashboardBalances:w.syncDashboardBalances,getDashboardBalances:w.getDashboardBalances,changePayoutStatus:S.changePayoutStatus,createDashboardTransactions:T.createDashboardTransactions,getDashboardTransactions:T.getDashboardTransactions,getDashboardScheduledTransactions:T.getDashboardScheduledTransactions,getPayoutNotifications:E.getPayoutNotifications,markPayoutNotificationsRead:E.markPayoutNotificationsRead,dismissPayoutNotification:E.dismissPayoutNotification};exports.API=A;
|
package/common/src/API/API.d.ts
CHANGED
|
@@ -9,12 +9,11 @@ import { getProxyAccounts, updateProxyAccounts } from './proxyAccountsCalls';
|
|
|
9
9
|
import { monitor } from './callMonitor';
|
|
10
10
|
import { callRelayerSolanaSponsoredBuildAPI, callRelayerSolanaSponsoredSubmitAPI, callRelayerSolanaTransactBatchAPI } from './callRelayer';
|
|
11
11
|
import { seedlessBackup, seedlessCheckPassword, seedlessInit, seedlessSalt, seedlessStatus } from './seedless-calls';
|
|
12
|
-
import { getScheduledTransactions } from './scheduled-transactions-calls';
|
|
13
12
|
import { addTemporaryWalletNonce, getTemporaryWalletNonces } from './temporaryWalletCalls';
|
|
14
13
|
import { encodeMoonPayBuyUrl, generateMoonPayQuote } from './onrampCalls';
|
|
15
14
|
import { getTokenPriceChartData } from './get-token-price-chart-data';
|
|
16
15
|
import { getPrivateTransactionRatio, savePrivacyScoreAndGetPrivacyRank } from './privacy-score-calls';
|
|
17
|
-
import {
|
|
16
|
+
import { allocateRecipientInfosEnclaveCall } from './privateSendRecipientInfoCalls';
|
|
18
17
|
import { reservePrivateSendNonceRange, syncPrivateSendNonce } from './privateSendNonceCalls';
|
|
19
18
|
import { getSnapshotServerEvents } from './snapshot-event-calls';
|
|
20
19
|
import { sendPrivateSendEmailNotifications } from './privateSendEmailNotificationsCalls';
|
|
@@ -24,7 +23,7 @@ import { addDashboardContact, deleteDashboardContact, getDashboardContacts, upda
|
|
|
24
23
|
import { changePayoutStatus, createDashboardPayout, getDashboardPayouts } from './dashboardPayoutCalls';
|
|
25
24
|
import { deleteInviteRequest, editMember, removeMember, resolveInviteRequest, sendDashboardInvitationEmail, updateUserProfile } from './dashboardAccountMemberCalls';
|
|
26
25
|
import { getDashboardBalances, syncDashboardBalances } from './dashboardBalanceCalls';
|
|
27
|
-
import { createDashboardTransactions, getDashboardTransactions } from './dashboardTransactionCalls';
|
|
26
|
+
import { createDashboardTransactions, getDashboardScheduledTransactions, getDashboardTransactions } from './dashboardTransactionCalls';
|
|
28
27
|
import { dismissPayoutNotification, getPayoutNotifications, markPayoutNotificationsRead } from './payoutNotificationStateCalls';
|
|
29
28
|
import { getBalancesEnclaveCall, getUtxosEnclaveCall, storeClaimableKeyEnclaveCall } from './enclaveUtxoCalls';
|
|
30
29
|
import { checkUsernameAvailability, getRewardsUser, updateRewardsUser } from './rewardsUserCalls';
|
|
@@ -57,14 +56,13 @@ export type IAPI = {
|
|
|
57
56
|
seedlessCheckPassword: typeof seedlessCheckPassword;
|
|
58
57
|
seedlessStatus: typeof seedlessStatus;
|
|
59
58
|
seedlessSalt: typeof seedlessSalt;
|
|
60
|
-
getScheduledTransactions: typeof getScheduledTransactions;
|
|
61
59
|
getTemporaryWalletNonces: typeof getTemporaryWalletNonces;
|
|
62
60
|
addTemporaryWalletNonce: typeof addTemporaryWalletNonce;
|
|
63
61
|
encodeMoonPayBuyUrl: typeof encodeMoonPayBuyUrl;
|
|
64
62
|
generateMoonPayQuote: typeof generateMoonPayQuote;
|
|
65
63
|
getPrivateTransactionRatio: typeof getPrivateTransactionRatio;
|
|
66
64
|
savePrivacyScoreAndGetPrivacyRank: typeof savePrivacyScoreAndGetPrivacyRank;
|
|
67
|
-
|
|
65
|
+
allocateRecipientInfosEnclaveCall: typeof allocateRecipientInfosEnclaveCall;
|
|
68
66
|
syncPrivateSendNonce: typeof syncPrivateSendNonce;
|
|
69
67
|
reservePrivateSendNonceRange: typeof reservePrivateSendNonceRange;
|
|
70
68
|
getSnapshotServerEvents: typeof getSnapshotServerEvents;
|
|
@@ -91,6 +89,7 @@ export type IAPI = {
|
|
|
91
89
|
changePayoutStatus: typeof changePayoutStatus;
|
|
92
90
|
createDashboardTransactions: typeof createDashboardTransactions;
|
|
93
91
|
getDashboardTransactions: typeof getDashboardTransactions;
|
|
92
|
+
getDashboardScheduledTransactions: typeof getDashboardScheduledTransactions;
|
|
94
93
|
getPayoutNotifications: typeof getPayoutNotifications;
|
|
95
94
|
markPayoutNotificationsRead: typeof markPayoutNotificationsRead;
|
|
96
95
|
dismissPayoutNotification: typeof dismissPayoutNotification;
|
package/common/src/API/API.mjs
CHANGED
|
@@ -1,97 +1,96 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import { createDashboardTransactions as Q, getDashboardTransactions as $ } from "./dashboardTransactionCalls.mjs";
|
|
1
|
+
import { getIdleRelay as e } from "./relayCalls.mjs";
|
|
2
|
+
import { getTokenPreviousDayPrices as t, getTokenPrices as n } from "./getTokenPrice.mjs";
|
|
3
|
+
import { getOdosPriceForToken as r } from "./getOdosPriceForToken.mjs";
|
|
4
|
+
import { simulateTransaction as i } from "./simulate-transaction.mjs";
|
|
5
|
+
import { simulateBatchTx as a } from "./simulate-batch-tx.mjs";
|
|
6
|
+
import { tokensInfoCall as o } from "./token-calls.mjs";
|
|
7
|
+
import { getTokenData as s } from "./get-token-data.mjs";
|
|
8
|
+
import { getProxyAccounts as c, updateProxyAccounts as l } from "./proxyAccountsCalls.mjs";
|
|
9
|
+
import { monitor as u } from "./callMonitor.mjs";
|
|
10
|
+
import { callRelayerSolanaSponsoredBuildAPI as d, callRelayerSolanaSponsoredSubmitAPI as f, callRelayerSolanaTransactBatchAPI as p } from "./callRelayer.mjs";
|
|
11
|
+
import { seedlessBackup as m, seedlessCheckPassword as h, seedlessInit as g, seedlessSalt as _, seedlessStatus as v } from "./seedless-calls.mjs";
|
|
12
|
+
import { addTemporaryWalletNonce as y, getTemporaryWalletNonces as b } from "./temporaryWalletCalls.mjs";
|
|
13
|
+
import { encodeMoonPayBuyUrl as x, generateMoonPayQuote as S } from "./onrampCalls.mjs";
|
|
14
|
+
import { getTokenPriceChartData as C } from "./get-token-price-chart-data.mjs";
|
|
15
|
+
import { getPrivateTransactionRatio as w, savePrivacyScoreAndGetPrivacyRank as T } from "./privacy-score-calls.mjs";
|
|
16
|
+
import { allocateRecipientInfosEnclaveCall as E } from "./privateSendRecipientInfoCalls.mjs";
|
|
17
|
+
import { reservePrivateSendNonceRange as D, syncPrivateSendNonce as O } from "./privateSendNonceCalls.mjs";
|
|
18
|
+
import { getSnapshotServerEvents as k } from "./snapshot-event-calls.mjs";
|
|
19
|
+
import { sendPrivateSendEmailNotifications as A } from "./privateSendEmailNotificationsCalls.mjs";
|
|
20
|
+
import { checkTronSubsidyEligibility as j, recordTronSubsidyUsage as M } from "./tronSubsidyCalls.mjs";
|
|
21
|
+
import { deleteDashboardAccount as N, getDashboardAccount as P, updateDashboardAccount as F } from "./dashboardAccountCalls.mjs";
|
|
22
|
+
import { addDashboardContact as I, deleteDashboardContact as L, getDashboardContacts as R, updateDashboardContact as z } from "./dashboardContactCalls.mjs";
|
|
23
|
+
import { changePayoutStatus as B, createDashboardPayout as V, getDashboardPayouts as H } from "./dashboardPayoutCalls.mjs";
|
|
24
|
+
import { deleteInviteRequest as U, editMember as W, removeMember as G, resolveInviteRequest as K, sendDashboardInvitationEmail as q, updateUserProfile as J } from "./dashboardAccountMemberCalls.mjs";
|
|
25
|
+
import { getDashboardBalances as Y, syncDashboardBalances as X } from "./dashboardBalanceCalls.mjs";
|
|
26
|
+
import { createDashboardTransactions as Z, getDashboardScheduledTransactions as Q, getDashboardTransactions as $ } from "./dashboardTransactionCalls.mjs";
|
|
28
27
|
import { dismissPayoutNotification as ee, getPayoutNotifications as te, markPayoutNotificationsRead as ne } from "./payoutNotificationStateCalls.mjs";
|
|
29
28
|
import { getBalancesEnclaveCall as re, getUtxosEnclaveCall as ie, storeClaimableKeyEnclaveCall as ae } from "./enclaveUtxoCalls.mjs";
|
|
30
29
|
import { checkUsernameAvailability as oe, getRewardsUser as se, updateRewardsUser as ce } from "./rewardsUserCalls.mjs";
|
|
31
30
|
import { getUserAnalytics as le } from "./weeklyAnalyticCalls.mjs";
|
|
32
31
|
//#region libs/shared/common/src/API/API.ts
|
|
33
32
|
var ue = {
|
|
34
|
-
getTokenPrices:
|
|
35
|
-
getOdosPriceForToken:
|
|
36
|
-
getTokenPriceChartData:
|
|
37
|
-
getTokenPreviousDayPrices:
|
|
38
|
-
getIdleRelay:
|
|
33
|
+
getTokenPrices: n,
|
|
34
|
+
getOdosPriceForToken: r,
|
|
35
|
+
getTokenPriceChartData: C,
|
|
36
|
+
getTokenPreviousDayPrices: t,
|
|
37
|
+
getIdleRelay: e,
|
|
39
38
|
getUserAnalytics: le,
|
|
40
39
|
updateRewardsUser: ce,
|
|
41
40
|
getRewardsUser: se,
|
|
42
41
|
checkUsernameAvailability: oe,
|
|
43
|
-
simulateTransaction:
|
|
44
|
-
simulateBatchTx:
|
|
45
|
-
tokensInfoCall:
|
|
46
|
-
getTokenData:
|
|
42
|
+
simulateTransaction: i,
|
|
43
|
+
simulateBatchTx: a,
|
|
44
|
+
tokensInfoCall: o,
|
|
45
|
+
getTokenData: s,
|
|
47
46
|
getBalancesEnclaveCall: re,
|
|
48
47
|
storeClaimableKeyEnclaveCall: ae,
|
|
49
48
|
getUtxosEnclaveCall: ie,
|
|
50
|
-
getProxyAccounts:
|
|
51
|
-
updateProxyAccounts:
|
|
52
|
-
monitor:
|
|
53
|
-
callRelayerSolanaTransactBatchAPI:
|
|
54
|
-
callRelayerSolanaSponsoredBuildAPI:
|
|
55
|
-
callRelayerSolanaSponsoredSubmitAPI:
|
|
56
|
-
seedlessInit:
|
|
57
|
-
seedlessBackup:
|
|
58
|
-
seedlessCheckPassword:
|
|
59
|
-
seedlessStatus:
|
|
60
|
-
seedlessSalt:
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
createDashboardTransactions: Q,
|
|
49
|
+
getProxyAccounts: c,
|
|
50
|
+
updateProxyAccounts: l,
|
|
51
|
+
monitor: u,
|
|
52
|
+
callRelayerSolanaTransactBatchAPI: p,
|
|
53
|
+
callRelayerSolanaSponsoredBuildAPI: d,
|
|
54
|
+
callRelayerSolanaSponsoredSubmitAPI: f,
|
|
55
|
+
seedlessInit: g,
|
|
56
|
+
seedlessBackup: m,
|
|
57
|
+
seedlessCheckPassword: h,
|
|
58
|
+
seedlessStatus: v,
|
|
59
|
+
seedlessSalt: _,
|
|
60
|
+
getTemporaryWalletNonces: b,
|
|
61
|
+
addTemporaryWalletNonce: y,
|
|
62
|
+
encodeMoonPayBuyUrl: x,
|
|
63
|
+
generateMoonPayQuote: S,
|
|
64
|
+
getPrivateTransactionRatio: w,
|
|
65
|
+
savePrivacyScoreAndGetPrivacyRank: T,
|
|
66
|
+
allocateRecipientInfosEnclaveCall: E,
|
|
67
|
+
syncPrivateSendNonce: O,
|
|
68
|
+
reservePrivateSendNonceRange: D,
|
|
69
|
+
getSnapshotServerEvents: k,
|
|
70
|
+
sendPrivateSendEmailNotifications: A,
|
|
71
|
+
checkTronSubsidyEligibility: j,
|
|
72
|
+
recordTronSubsidyUsage: M,
|
|
73
|
+
getDashboardAccount: P,
|
|
74
|
+
updateDashboardAccount: F,
|
|
75
|
+
addDashboardContact: I,
|
|
76
|
+
deleteDashboardContact: L,
|
|
77
|
+
deleteDashboardAccount: N,
|
|
78
|
+
updateDashboardContact: z,
|
|
79
|
+
getDashboardContacts: R,
|
|
80
|
+
updateUserProfile: J,
|
|
81
|
+
sendDashboardInvitationEmail: q,
|
|
82
|
+
resolveInviteRequest: K,
|
|
83
|
+
deleteInviteRequest: U,
|
|
84
|
+
removeMember: G,
|
|
85
|
+
editMember: W,
|
|
86
|
+
createDashboardPayout: V,
|
|
87
|
+
getDashboardPayouts: H,
|
|
88
|
+
syncDashboardBalances: X,
|
|
89
|
+
getDashboardBalances: Y,
|
|
90
|
+
changePayoutStatus: B,
|
|
91
|
+
createDashboardTransactions: Z,
|
|
94
92
|
getDashboardTransactions: $,
|
|
93
|
+
getDashboardScheduledTransactions: Q,
|
|
95
94
|
getPayoutNotifications: te,
|
|
96
95
|
markPayoutNotificationsRead: ne,
|
|
97
96
|
dismissPayoutNotification: ee
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require(`../constants/server.constants.cjs`),t=require(`./getServerURL.cjs`),n=require(`../data-structures/http/HttpClient.cjs`);require(`../data-structures/http/index.cjs`);const r=require(`../constants/auth.constants.cjs`),i=require(`../functions/utils/auth.utils.cjs`);var a=async a=>n.httpClient.post(`${t.SERVER_URL}${e.API_CONFIG.ROUTES.createDashboardTransactions}`,{transactions:a},{headers:i.getAuthHeaders(r.HINKAL_DASHBOARD_TOKEN)}),o=async()=>n.httpClient.get(`${t.SERVER_URL}${e.API_CONFIG.ROUTES.getDashboardTransactions}`,{headers:i.getAuthHeaders(r.HINKAL_DASHBOARD_TOKEN)});exports.createDashboardTransactions=a,exports.getDashboardTransactions=o;
|
|
1
|
+
const e=require(`../constants/server.constants.cjs`),t=require(`./getServerURL.cjs`),n=require(`../data-structures/http/HttpClient.cjs`);require(`../data-structures/http/index.cjs`);const r=require(`../constants/auth.constants.cjs`),i=require(`../functions/utils/auth.utils.cjs`);var a=async a=>n.httpClient.post(`${t.SERVER_URL}${e.API_CONFIG.ROUTES.createDashboardTransactions}`,{transactions:a},{headers:i.getAuthHeaders(r.HINKAL_DASHBOARD_TOKEN)}),o=async()=>n.httpClient.get(`${t.SERVER_URL}${e.API_CONFIG.ROUTES.getDashboardTransactions}`,{headers:i.getAuthHeaders(r.HINKAL_DASHBOARD_TOKEN)}),s=async()=>n.httpClient.get(`${t.SERVER_URL}${e.API_CONFIG.ROUTES.getDashboardScheduledTransactions}`,{headers:i.getAuthHeaders(r.HINKAL_DASHBOARD_TOKEN)});exports.createDashboardTransactions=a,exports.getDashboardScheduledTransactions=s,exports.getDashboardTransactions=o;
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
-
import { DashboardTransaction } from '../types';
|
|
1
|
+
import { DashboardTransaction, ScheduledTransactionResponseItem } from '../types';
|
|
2
2
|
export declare const createDashboardTransactions: (transactions: Omit<DashboardTransaction, "hashedDashboardAccountId">[]) => Promise<any>;
|
|
3
3
|
export declare const getDashboardTransactions: () => Promise<any>;
|
|
4
|
+
export declare const getDashboardScheduledTransactions: () => Promise<{
|
|
5
|
+
transactions: ScheduledTransactionResponseItem[];
|
|
6
|
+
}>;
|
|
@@ -5,6 +5,6 @@ import "../data-structures/http/index.mjs";
|
|
|
5
5
|
import { HINKAL_DASHBOARD_TOKEN as r } from "../constants/auth.constants.mjs";
|
|
6
6
|
import { getAuthHeaders as i } from "../functions/utils/auth.utils.mjs";
|
|
7
7
|
//#region libs/shared/common/src/API/dashboardTransactionCalls.ts
|
|
8
|
-
var a = async (a) => n.post(`${t}${e.ROUTES.createDashboardTransactions}`, { transactions: a }, { headers: i(r) }), o = async () => n.get(`${t}${e.ROUTES.getDashboardTransactions}`, { headers: i(r) });
|
|
8
|
+
var a = async (a) => n.post(`${t}${e.ROUTES.createDashboardTransactions}`, { transactions: a }, { headers: i(r) }), o = async () => n.get(`${t}${e.ROUTES.getDashboardTransactions}`, { headers: i(r) }), s = async () => n.get(`${t}${e.ROUTES.getDashboardScheduledTransactions}`, { headers: i(r) });
|
|
9
9
|
//#endregion
|
|
10
|
-
export { a as createDashboardTransactions, o as getDashboardTransactions };
|
|
10
|
+
export { a as createDashboardTransactions, s as getDashboardScheduledTransactions, o as getDashboardTransactions };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require(`../functions/snarkjs/constant.cjs`),t=require(`../
|
|
1
|
+
const e=require(`../functions/snarkjs/constant.cjs`),t=require(`../functions/utils/encryptInputForEnclave.cjs`);var n=async(n,r)=>t.enclavePostSealed(`${e.ENCLAVE_URL}/store-and-get-user-signature`,{ethAddress:n,encryptedSignature:r.inputCiphertext,key:r.keyCiphertext},r.key);exports.storeAndGetSignatureEnclaveCall=n;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { EnclaveHandshake } from '../types/remote-proof.types';
|
|
1
2
|
interface IStoreAndGetSignatureResponse {
|
|
2
3
|
signature: string;
|
|
3
4
|
}
|
|
4
|
-
export declare const storeAndGetSignatureEnclaveCall: (ethAddress: string,
|
|
5
|
+
export declare const storeAndGetSignatureEnclaveCall: (ethAddress: string, handshake: EnclaveHandshake) => Promise<IStoreAndGetSignatureResponse>;
|
|
5
6
|
export {};
|
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
import { ENCLAVE_URL as e } from "../functions/snarkjs/constant.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import "../data-structures/http/index.mjs";
|
|
2
|
+
import { enclavePostSealed as t } from "../functions/utils/encryptInputForEnclave.mjs";
|
|
4
3
|
//#region libs/shared/common/src/API/enclaveSignatureCalls.ts
|
|
5
|
-
var n = async (n, r
|
|
4
|
+
var n = async (n, r) => t(`${e}/store-and-get-user-signature`, {
|
|
6
5
|
ethAddress: n,
|
|
7
|
-
encryptedSignature: r,
|
|
8
|
-
key:
|
|
9
|
-
|
|
10
|
-
txMessageForSolanaLedger: o
|
|
11
|
-
});
|
|
6
|
+
encryptedSignature: r.inputCiphertext,
|
|
7
|
+
key: r.keyCiphertext
|
|
8
|
+
}, r.key);
|
|
12
9
|
//#endregion
|
|
13
10
|
export { n as storeAndGetSignatureEnclaveCall };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require(`../functions/snarkjs/constant.cjs`),t=require(`../data-structures/http/HttpClient.cjs`);require(`../data-structures/http/index.cjs`);
|
|
1
|
+
const e=require(`../functions/snarkjs/constant.cjs`),t=require(`../data-structures/http/HttpClient.cjs`);require(`../data-structures/http/index.cjs`);const n=require(`../functions/utils/encryptInputForEnclave.cjs`);var r=async(t,r,i=!1,a)=>n.enclavePostSealed(`${e.ENCLAVE_URL}/get-user-balances`,{chainIds:t,input:r.inputCiphertext,key:r.keyCiphertext,useBlockedUtxos:i,hashedEthereumAddress:a},r.key),i=async(n,r)=>await t.httpClient.post(`${e.ENCLAVE_URL}/store-claimable-key`,{encryptedMaterial:n,key:r}),a=async(t,r,i)=>n.enclavePostSealed(`${e.ENCLAVE_URL}/get-user-utxos`,{ethAddress:t,encryptedSignature:r.inputCiphertext,key:r.keyCiphertext,chainId:i},r.key);exports.getBalancesEnclaveCall=r,exports.getUtxosEnclaveCall=a,exports.storeClaimableKeyEnclaveCall=i;
|
|
@@ -1,22 +1,26 @@
|
|
|
1
|
-
|
|
1
|
+
import { EnclaveHandshake } from '../types/remote-proof.types';
|
|
2
|
+
export type TokenBalanceEntry = {
|
|
2
3
|
erc20TokenAddress: string;
|
|
3
4
|
amount: string;
|
|
4
5
|
};
|
|
5
|
-
type
|
|
6
|
+
export type ChainBalancesEntry = {
|
|
7
|
+
chainId: number;
|
|
6
8
|
confirmedBalances: TokenBalanceEntry[];
|
|
7
9
|
preConfirmedBalances: TokenBalanceEntry[];
|
|
10
|
+
error?: string;
|
|
8
11
|
};
|
|
9
|
-
|
|
12
|
+
type GetBalancesEnclaveCallResponse = {
|
|
13
|
+
results: ChainBalancesEntry[];
|
|
14
|
+
};
|
|
15
|
+
export declare const getBalancesEnclaveCall: (chainIds: number[], handshake: EnclaveHandshake, useBlockedUtxos?: boolean, hashedEthereumAddress?: string) => Promise<GetBalancesEnclaveCallResponse>;
|
|
10
16
|
export interface StoreClaimableKeyRequest {
|
|
11
|
-
recipientEthAddress: string;
|
|
12
17
|
encryptedMaterial: string;
|
|
13
18
|
key: string;
|
|
14
|
-
chainId: number;
|
|
15
19
|
}
|
|
16
20
|
export interface StoreClaimableKeyResponse {
|
|
17
21
|
status: 'success';
|
|
18
22
|
}
|
|
19
|
-
export declare const storeClaimableKeyEnclaveCall: (
|
|
23
|
+
export declare const storeClaimableKeyEnclaveCall: (encryptedMaterial: string, key: string) => Promise<StoreClaimableKeyResponse>;
|
|
20
24
|
export interface GetUtxosRequest {
|
|
21
25
|
ethAddress: string;
|
|
22
26
|
encryptedSignature: string;
|
|
@@ -47,9 +51,9 @@ export interface Proof {
|
|
|
47
51
|
c: [string, string];
|
|
48
52
|
}
|
|
49
53
|
export declare const recoverUtxosEnclaveCall: (encryptedSignature: string, key: string, addressForLoginSignatureVerify?: string, addressForAuthorizationSignatureVerify?: string, ethereumWithdrawalAddress?: string, solanaWithdrawalAddress?: string, mnemonicProof?: Proof) => Promise<RecoverUtxosResponse>;
|
|
50
|
-
export declare const getUtxosEnclaveCall: (ethAddress: string,
|
|
54
|
+
export declare const getUtxosEnclaveCall: (ethAddress: string, handshake: EnclaveHandshake, chainId: number) => Promise<GetUtxosResponse>;
|
|
51
55
|
export interface MarkClaimableKeyClaimedResponse {
|
|
52
56
|
status: 'success';
|
|
53
57
|
}
|
|
54
|
-
export declare const markClaimableKeyClaimedEnclaveCall: (ethAddress: string, encryptedSignature: string, key: string, encryptedMaterial: string, materialKey: string, chainId: number
|
|
58
|
+
export declare const markClaimableKeyClaimedEnclaveCall: (ethAddress: string, encryptedSignature: string, key: string, encryptedMaterial: string, materialKey: string, chainId: number) => Promise<MarkClaimableKeyClaimedResponse>;
|
|
55
59
|
export {};
|
|
@@ -1,25 +1,22 @@
|
|
|
1
1
|
import { ENCLAVE_URL as e } from "../functions/snarkjs/constant.mjs";
|
|
2
2
|
import { httpClient as t } from "../data-structures/http/HttpClient.mjs";
|
|
3
3
|
import "../data-structures/http/index.mjs";
|
|
4
|
+
import { enclavePostSealed as n } from "../functions/utils/encryptInputForEnclave.mjs";
|
|
4
5
|
//#region libs/shared/common/src/API/enclaveUtxoCalls.ts
|
|
5
|
-
var
|
|
6
|
-
|
|
7
|
-
input:
|
|
8
|
-
key: r,
|
|
9
|
-
useBlockedUtxos:
|
|
10
|
-
hashedEthereumAddress:
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
chainId: a,
|
|
21
|
-
isSolanaLedger: o,
|
|
22
|
-
txMessageForSolanaLedger: s
|
|
23
|
-
});
|
|
6
|
+
var r = async (t, r, i = !1, a) => n(`${e}/get-user-balances`, {
|
|
7
|
+
chainIds: t,
|
|
8
|
+
input: r.inputCiphertext,
|
|
9
|
+
key: r.keyCiphertext,
|
|
10
|
+
useBlockedUtxos: i,
|
|
11
|
+
hashedEthereumAddress: a
|
|
12
|
+
}, r.key), i = async (n, r) => await t.post(`${e}/store-claimable-key`, {
|
|
13
|
+
encryptedMaterial: n,
|
|
14
|
+
key: r
|
|
15
|
+
}), a = async (t, r, i) => n(`${e}/get-user-utxos`, {
|
|
16
|
+
ethAddress: t,
|
|
17
|
+
encryptedSignature: r.inputCiphertext,
|
|
18
|
+
key: r.keyCiphertext,
|
|
19
|
+
chainId: i
|
|
20
|
+
}, r.key);
|
|
24
21
|
//#endregion
|
|
25
|
-
export {
|
|
22
|
+
export { r as getBalancesEnclaveCall, a as getUtxosEnclaveCall, i as storeClaimableKeyEnclaveCall };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require(`../
|
|
1
|
+
const e=require(`../functions/snarkjs/constant.cjs`),t=require(`../functions/utils/encryptInputForEnclave.cjs`);var n=async(n,r)=>{let{keyCiphertext:i,key:a}=await t.makeEnclaveKeyHandshake(),o=await t.enclavePostSealed(`${e.ENCLAVE_URL}/allocate-recipient-infos`,{key:i,recipientAddresses:n,allowStale:r},a);if(!(o.allocations.length===n.length&&o.allocations.every((e,t)=>e.recipientAddress===n[t])))throw Error(`Enclave allocate-recipient-infos response does not match the request sent - refusing to use it`);return o};exports.allocateRecipientInfosEnclaveCall=n;
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
export interface PrivateSendAllocation {
|
|
2
2
|
recipientAddress: string;
|
|
3
|
-
recipientInfo
|
|
3
|
+
recipientInfo?: string;
|
|
4
4
|
}
|
|
5
|
-
export interface
|
|
6
|
-
recipientAddresses: string[];
|
|
7
|
-
}
|
|
8
|
-
export interface AllocatePrivateSendRecipientInfosResponse {
|
|
5
|
+
export interface AllocateRecipientInfosResponse {
|
|
9
6
|
allocations: PrivateSendAllocation[];
|
|
10
7
|
}
|
|
11
|
-
export declare const
|
|
8
|
+
export declare const allocateRecipientInfosEnclaveCall: (recipientAddresses: string[], allowStale: boolean) => Promise<AllocateRecipientInfosResponse>;
|
|
@@ -1,8 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { httpClient as n } from "../data-structures/http/HttpClient.mjs";
|
|
4
|
-
import "../data-structures/http/index.mjs";
|
|
1
|
+
import { ENCLAVE_URL as e } from "../functions/snarkjs/constant.mjs";
|
|
2
|
+
import { enclavePostSealed as t, makeEnclaveKeyHandshake as n } from "../functions/utils/encryptInputForEnclave.mjs";
|
|
5
3
|
//#region libs/shared/common/src/API/privateSendRecipientInfoCalls.ts
|
|
6
|
-
var r = async (r) =>
|
|
4
|
+
var r = async (r, i) => {
|
|
5
|
+
let { keyCiphertext: a, key: o } = await n(), s = await t(`${e}/allocate-recipient-infos`, {
|
|
6
|
+
key: a,
|
|
7
|
+
recipientAddresses: r,
|
|
8
|
+
allowStale: i
|
|
9
|
+
}, o);
|
|
10
|
+
if (!(s.allocations.length === r.length && s.allocations.every((e, t) => e.recipientAddress === r[t]))) throw Error("Enclave allocate-recipient-infos response does not match the request sent - refusing to use it");
|
|
11
|
+
return s;
|
|
12
|
+
};
|
|
7
13
|
//#endregion
|
|
8
|
-
export { r as
|
|
14
|
+
export { r as allocateRecipientInfosEnclaveCall };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require(`../constants/server.constants.cjs`),t=require(`./getServerURL.cjs`),n=require(`../data-structures/http/HttpClient.cjs`);var r=r=>n.httpClient.get(`${t.RELAYER_URL}${e.RELAYER_CONFIG.getScheduledTransactionById(r)}`),i=
|
|
1
|
+
const e=require(`../constants/server.constants.cjs`),t=require(`./getServerURL.cjs`),n=require(`../data-structures/http/HttpClient.cjs`);var r=r=>n.httpClient.get(`${t.RELAYER_URL}${e.RELAYER_CONFIG.getScheduledTransactionById(r)}`),i=r=>n.httpClient.post(`${t.RELAYER_URL}${e.RELAYER_CONFIG.getScheduledTransactionsNullifierIndexes}`,r);exports.getScheduledTransactionById=r,exports.getScheduledTransactionsNullifierIndexes=i;
|
|
@@ -1,15 +1,11 @@
|
|
|
1
|
-
import { ScheduledTransactionItemStatus
|
|
1
|
+
import { ScheduledTransactionItemStatus } from '../types';
|
|
2
2
|
export interface ScheduledTransactionByIdResponse {
|
|
3
3
|
scheduleId: string;
|
|
4
4
|
chainId: number;
|
|
5
5
|
hashedEthereumAddress: string | null;
|
|
6
6
|
transactions: ScheduledTransactionItemStatus[];
|
|
7
7
|
}
|
|
8
|
-
interface ScheduledTransactionResponseInterface {
|
|
9
|
-
transactions: ScheduledTransactionResponseItem[];
|
|
10
|
-
}
|
|
11
8
|
export declare const getScheduledTransactionById: (scheduleId: string) => Promise<ScheduledTransactionByIdResponse>;
|
|
12
|
-
export declare const getScheduledTransactions: (isSolana: boolean, hashedEthereumAddress?: string, hashedDashboardAccountId?: string) => Promise<ScheduledTransactionResponseInterface>;
|
|
13
9
|
interface ScheduledTransactionsNullifierIndexesRequest {
|
|
14
10
|
hashedEthereumAddress: string;
|
|
15
11
|
nullifiers: string[];
|
|
@@ -2,10 +2,6 @@ import { RELAYER_CONFIG as e } from "../constants/server.constants.mjs";
|
|
|
2
2
|
import { RELAYER_URL as t } from "./getServerURL.mjs";
|
|
3
3
|
import { httpClient as n } from "../data-structures/http/HttpClient.mjs";
|
|
4
4
|
//#region libs/shared/common/src/API/scheduled-transactions-calls.ts
|
|
5
|
-
var r = (r) => n.get(`${t}${e.getScheduledTransactionById(r)}`), i = (r
|
|
6
|
-
isSolana: r,
|
|
7
|
-
hashedEthereumAddress: i,
|
|
8
|
-
hashedDashboardAccountId: a
|
|
9
|
-
}), a = (r) => n.post(`${t}${e.getScheduledTransactionsNullifierIndexes}`, r);
|
|
5
|
+
var r = (r) => n.get(`${t}${e.getScheduledTransactionById(r)}`), i = (r) => n.post(`${t}${e.getScheduledTransactionsNullifierIndexes}`, r);
|
|
10
6
|
//#endregion
|
|
11
|
-
export { r as getScheduledTransactionById, i as
|
|
7
|
+
export { r as getScheduledTransactionById, i as getScheduledTransactionsNullifierIndexes };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
require(`./vite.constants.cjs`);const e=require(`./chains.constants.cjs`);require(`./fees.constants.cjs`).TEMPO_USDC_E_ADDRESS.toLowerCase();var t={[e.chainIds.solanaMainnet]:`sol`,[e.chainIds.ethMainnet]:`eth`,[e.chainIds.base]:`base`,[e.chainIds.arbMainnet]:`arb`,[e.chainIds.optimism]:`op`,[e.chainIds.polygon]:`pol`,[e.chainIds.tronMainnet]:`tron`,[e.chainIds.bnbMainnet]:`bsc`,[e.chainIds.avalanche]:`avax`,[e.chainIds.monad]:`monad`,[e.chainIds.plasma]:`plasma`};Object.fromEntries(Object.entries(t).map(([e,t])=>[t,Number(e)]));var n=e=>e in t;e.BRIDGE_DESTINATION_CHAINS.filter(e=>!n(e));var r=1200*1e3;`0`.repeat(64);var i=.7,a=i*.01,o=
|
|
1
|
+
require(`./vite.constants.cjs`);const e=require(`./chains.constants.cjs`);require(`./fees.constants.cjs`).TEMPO_USDC_E_ADDRESS.toLowerCase();var t={[e.chainIds.solanaMainnet]:`sol`,[e.chainIds.ethMainnet]:`eth`,[e.chainIds.base]:`base`,[e.chainIds.arbMainnet]:`arb`,[e.chainIds.optimism]:`op`,[e.chainIds.polygon]:`pol`,[e.chainIds.tronMainnet]:`tron`,[e.chainIds.bnbMainnet]:`bsc`,[e.chainIds.avalanche]:`avax`,[e.chainIds.monad]:`monad`,[e.chainIds.plasma]:`plasma`};Object.fromEntries(Object.entries(t).map(([e,t])=>[t,Number(e)]));var n=e=>e in t;e.BRIDGE_DESTINATION_CHAINS.filter(e=>!n(e));var r=1200*1e3;`0`.repeat(64);var i=.7,a=i*.01,o=300*1e3,s=5*1e3,c=1e6;exports.BRIDGE_ARRIVAL_POLL_INTERVAL_MS=s,exports.BRIDGE_ARRIVAL_TIMEOUT_MS=o,exports.DEFAULT_BRIDGING_SLIPPAGE=i,exports.DEFAULT_BRIDGING_SLIPPAGE_DECIMAL=a,exports.NEAR_BRIDGE_QUOTE_DEADLINE_BUFFER_MS=r,exports.NEAR_INTENTS_BLOCKCHAIN_BY_CHAIN_ID=t,exports.SLIPPAGE_SCALING_FACTOR=c,exports.isNearBridgeSupportedChain=n;
|
|
@@ -30,5 +30,6 @@ export declare const BRIDGE_ARRIVAL_POLL_INTERVAL_MS: number;
|
|
|
30
30
|
export declare const SLIPPAGE_SCALING_FACTOR = 1000000;
|
|
31
31
|
export declare const LIFI_MAX_QUOTE_EXECUTION_DURATION_S = 150;
|
|
32
32
|
export declare const LIFI_MIN_ACCEPTABLE_OUTPUT_RATIO = 0.95;
|
|
33
|
+
export declare const LIFI_MAX_ACCEPTABLE_OUTPUT_RATIO = 2;
|
|
33
34
|
export declare const LIFI_QUOTE_MAX_RETRY_ATTEMPTS = 2;
|
|
34
35
|
export declare const LIFI_QUOTE_DEBOUNCE_MS = 300;
|