@hinkal/common 0.3.13 → 0.3.14
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 +67 -4
- package/common/src/API/API.cjs +1 -1
- package/common/src/API/API.d.ts +0 -2
- package/common/src/API/API.mjs +92 -94
- package/common/src/API/admin-calls.cjs +1 -1
- package/common/src/API/admin-calls.d.ts +2 -1
- package/common/src/API/admin-calls.mjs +1 -0
- package/common/src/API/evm-token-assets.cjs +1 -1
- package/common/src/API/evm-token-assets.mjs +2 -13
- package/common/src/API/get-token-price-chart-data.cjs +1 -1
- package/common/src/API/get-token-price-chart-data.mjs +2 -2
- package/common/src/API/getTokenPrice.cjs +1 -1
- package/common/src/API/getTokenPrice.mjs +2 -2
- package/common/src/API/index.cjs +1 -1
- package/common/src/API/index.d.ts +1 -0
- package/common/src/API/index.mjs +1 -0
- package/common/src/API/privacy-score-calls.cjs +1 -1
- package/common/src/API/privacy-score-calls.mjs +2 -2
- package/common/src/API/receiveVaultCalls.cjs +1 -1
- package/common/src/API/receiveVaultCalls.d.ts +4 -2
- package/common/src/API/receiveVaultCalls.mjs +8 -4
- package/common/src/constants/chains.constants.cjs +1 -1
- package/common/src/constants/chains.constants.d.ts +2 -0
- package/common/src/constants/chains.constants.mjs +106 -93
- package/common/src/constants/coingecko.constants.cjs +1 -1
- package/common/src/constants/coingecko.constants.d.ts +2 -0
- package/common/src/constants/coingecko.constants.mjs +1 -1
- 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-arcTestnet.json.cjs +1 -1
- package/common/src/constants/deploy-data/deploy-data-arcTestnet.json.mjs +3 -2
- package/common/src/constants/deploy-data/deploy-data-base.json.cjs +1 -1
- package/common/src/constants/deploy-data/deploy-data-base.json.mjs +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-polygon.json.cjs +1 -1
- package/common/src/constants/deploy-data/deploy-data-polygon.json.mjs +2 -1
- package/common/src/constants/deploy-data/deploy-data-solanaDevnet.json.cjs +1 -0
- package/common/src/constants/deploy-data/deploy-data-solanaDevnet.json.mjs +6 -0
- package/common/src/constants/deploy-data/deploy-data-tempo.json.cjs +1 -1
- package/common/src/constants/deploy-data/deploy-data-tempo.json.mjs +2 -1
- package/common/src/constants/deploy-data/deploy-data-tronMainnet.json.cjs +1 -1
- package/common/src/constants/deploy-data/deploy-data-tronMainnet.json.mjs +1 -1
- package/common/src/constants/deploy-data/deploy-data-tronNile.json.cjs +1 -1
- package/common/src/constants/deploy-data/deploy-data-tronNile.json.mjs +1 -1
- package/common/src/constants/deploy-data/index.cjs +1 -1
- package/common/src/constants/deploy-data/index.d.ts +2 -1
- package/common/src/constants/deploy-data/index.mjs +7 -6
- package/common/src/constants/deploy-data/shared-deploy-data-evm.json.cjs +1 -1
- package/common/src/constants/deploy-data/shared-deploy-data-evm.json.mjs +1 -1
- package/common/src/constants/deploy-data/shared-deploy-data-solana.json.cjs +1 -1
- package/common/src/constants/deploy-data/shared-deploy-data-solana.json.mjs +1 -1
- package/common/src/constants/deploy-data/shared-deploy-data-tron.json.cjs +1 -1
- package/common/src/constants/deploy-data/shared-deploy-data-tron.json.mjs +1 -1
- package/common/src/constants/index.cjs +1 -1
- package/common/src/constants/index.mjs +1 -1
- package/common/src/constants/protocol.constants.cjs +2 -2
- package/common/src/constants/protocol.constants.d.ts +0 -2
- package/common/src/constants/protocol.constants.mjs +2 -2
- package/common/src/constants/save-depths.cjs +1 -1
- package/common/src/constants/save-depths.d.ts +1 -0
- package/common/src/constants/save-depths.mjs +1 -0
- package/common/src/constants/server.constants.cjs +1 -1
- package/common/src/constants/server.constants.d.ts +8 -6
- package/common/src/constants/server.constants.mjs +8 -6
- package/common/src/constants/tokens.constants.cjs +1 -1
- package/common/src/constants/tokens.constants.mjs +1 -1
- package/common/src/data-structures/Hinkal/Hinkal.cjs +1 -1
- package/common/src/data-structures/Hinkal/Hinkal.d.ts +4 -4
- package/common/src/data-structures/Hinkal/Hinkal.mjs +37 -37
- package/common/src/data-structures/Hinkal/IHinkal.d.ts +4 -4
- package/common/src/data-structures/Hinkal/handleAutoDepositBack.cjs +1 -1
- package/common/src/data-structures/Hinkal/handleAutoDepositBack.mjs +5 -5
- package/common/src/data-structures/Hinkal/hinkalBridgePrivateToPrivate.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalBridgePrivateToPrivate.mjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalDepositAndBridge.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalDepositAndBridge.mjs +55 -54
- package/common/src/data-structures/Hinkal/hinkalDepositAndWithdraw.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalDepositAndWithdraw.mjs +60 -57
- package/common/src/data-structures/Hinkal/hinkalPrivateWallet.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalPrivateWallet.d.ts +1 -1
- package/common/src/data-structures/Hinkal/hinkalPrivateWallet.mjs +29 -29
- package/common/src/data-structures/Hinkal/hinkalProoflessDeposit.utils.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalProoflessDeposit.utils.mjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalProxySwap.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalProxySwap.mjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalReceiveVaultAccount.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalReceiveVaultAccount.mjs +7 -15
- package/common/src/data-structures/Hinkal/hinkalReceiveVaultCreate.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalReceiveVaultCreate.d.ts +2 -2
- package/common/src/data-structures/Hinkal/hinkalReceiveVaultCreate.mjs +24 -28
- package/common/src/data-structures/Hinkal/hinkalReceiveVaultRecover.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalReceiveVaultRecover.mjs +47 -40
- package/common/src/data-structures/Hinkal/hinkalReceiveVaultSettle.d.ts +1 -1
- package/common/src/data-structures/Hinkal/hinkalSolanaDeposit.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalSolanaDeposit.mjs +22 -42
- package/common/src/data-structures/Hinkal/hinkalSolanaDepositAndWithdraw.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalSolanaDepositAndWithdraw.mjs +72 -70
- package/common/src/data-structures/Hinkal/hinkalSolanaProxySend.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalSolanaProxySend.mjs +9 -9
- package/common/src/data-structures/Hinkal/hinkalSolanaProxyShield.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalSolanaProxyShield.mjs +15 -15
- 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 +47 -45
- package/common/src/data-structures/Hinkal/hinkalSolanaReceiveVault.cjs +1 -0
- package/common/src/data-structures/Hinkal/hinkalSolanaReceiveVault.d.ts +5 -0
- package/common/src/data-structures/Hinkal/hinkalSolanaReceiveVault.mjs +60 -0
- package/common/src/data-structures/Hinkal/hinkalWithdraw.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalWithdraw.mjs +35 -26
- package/common/src/data-structures/Hinkal/index.d.ts +1 -0
- package/common/src/data-structures/Hinkal/resetMerkleTrees.cjs +1 -1
- package/common/src/data-structures/Hinkal/resetMerkleTrees.mjs +13 -13
- package/common/src/error-handling/error-codes.constants.cjs +1 -1
- package/common/src/error-handling/error-codes.constants.d.ts +2 -0
- package/common/src/error-handling/error-codes.constants.mjs +2 -0
- package/common/src/error-handling/get-error.message.cjs +1 -1
- package/common/src/error-handling/get-error.message.mjs +10 -1
- package/common/src/functions/index.cjs +1 -1
- package/common/src/functions/index.mjs +6 -2
- package/common/src/functions/pre-transaction/addressTableLookup.d.ts +1 -0
- package/common/src/functions/pre-transaction/calculateSolanaNullifierCount.cjs +1 -1
- package/common/src/functions/pre-transaction/calculateSolanaNullifierCount.mjs +7 -7
- package/common/src/functions/pre-transaction/constructAdminData.cjs +1 -1
- package/common/src/functions/pre-transaction/constructAdminData.mjs +4 -3
- package/common/src/functions/pre-transaction/sendV0Transaction.cjs +1 -1
- package/common/src/functions/pre-transaction/sendV0Transaction.d.ts +1 -0
- package/common/src/functions/pre-transaction/sendV0Transaction.mjs +22 -2
- package/common/src/functions/private-wallet/emporium.helpers.cjs +1 -1
- package/common/src/functions/private-wallet/emporium.helpers.mjs +15 -15
- package/common/src/functions/snarkjs/fetchOnChainRootHashes.cjs +1 -1
- package/common/src/functions/snarkjs/fetchOnChainRootHashes.mjs +6 -6
- package/common/src/functions/utils/addresses.cjs +1 -1
- package/common/src/functions/utils/addresses.d.ts +4 -0
- package/common/src/functions/utils/addresses.mjs +17 -17
- package/common/src/functions/utils/admin-dimensions.cjs +1 -0
- package/common/src/functions/utils/admin-dimensions.d.ts +4 -0
- package/common/src/functions/utils/admin-dimensions.mjs +206 -0
- package/common/src/functions/utils/create-provider.cjs +1 -1
- package/common/src/functions/utils/create-provider.mjs +5 -1
- package/common/src/functions/utils/fees.utils.cjs +1 -1
- package/common/src/functions/utils/fees.utils.d.ts +2 -0
- package/common/src/functions/utils/fees.utils.mjs +31 -33
- package/common/src/functions/utils/gas-token.utils.cjs +1 -0
- package/common/src/functions/utils/gas-token.utils.d.ts +3 -0
- package/common/src/functions/utils/gas-token.utils.mjs +7 -0
- package/common/src/functions/utils/getUtxosFromReceiptSolana.d.ts +9 -4
- package/common/src/functions/utils/index.cjs +1 -1
- package/common/src/functions/utils/index.d.ts +4 -0
- package/common/src/functions/utils/index.mjs +5 -1
- package/common/src/functions/utils/publicBalance.utils.cjs +1 -1
- package/common/src/functions/utils/publicBalance.utils.mjs +7 -7
- package/common/src/functions/utils/receive-vault-account.utils.cjs +1 -1
- package/common/src/functions/utils/receive-vault-account.utils.d.ts +2 -1
- package/common/src/functions/utils/receive-vault-account.utils.mjs +16 -15
- package/common/src/functions/utils/receive-vault-scan.utils.cjs +1 -1
- package/common/src/functions/utils/receive-vault-scan.utils.mjs +37 -42
- package/common/src/functions/utils/receive-vault-solana.utils.cjs +1 -0
- package/common/src/functions/utils/receive-vault-solana.utils.d.ts +8 -0
- package/common/src/functions/utils/receive-vault-solana.utils.mjs +45 -0
- package/common/src/functions/utils/receive-vault.utils.cjs +2 -2
- package/common/src/functions/utils/receive-vault.utils.d.ts +13 -11
- package/common/src/functions/utils/receive-vault.utils.mjs +97 -82
- package/common/src/functions/utils/token-check.utils.d.ts +1 -0
- package/common/src/functions/utils/wallet-token-discovery.utils.cjs +1 -1
- package/common/src/functions/utils/wallet-token-discovery.utils.d.ts +5 -0
- package/common/src/functions/utils/wallet-token-discovery.utils.mjs +25 -31
- package/common/src/functions/web3/getContractMetadata.cjs +1 -1
- package/common/src/functions/web3/getContractMetadata.mjs +6 -6
- package/common/src/functions/web3/index.cjs +1 -1
- package/common/src/functions/web3/index.mjs +1 -1
- package/common/src/types/admin.types.cjs +1 -1
- package/common/src/types/admin.types.d.ts +64 -9
- package/common/src/types/admin.types.mjs +10 -2
- package/common/src/types/connector.types.d.ts +1 -0
- package/common/src/types/ethereum-network.types.d.ts +1 -0
- package/common/src/types/external-action.types.cjs +1 -1
- package/common/src/types/external-action.types.d.ts +2 -1
- package/common/src/types/external-action.types.mjs +1 -1
- package/common/src/types/receive-vault.types.cjs +1 -1
- package/common/src/types/receive-vault.types.d.ts +15 -20
- package/common/src/types/receive-vault.types.mjs +4 -2
- package/common/src/webworker/{logError-BeXPKuv9.js → logError-C-ej_TX9.js} +1 -1
- package/common/src/webworker/package.json +1 -1
- package/common/src/webworker/snarkjsWorker/snarkjsWorkerLauncher.ts?worker&url.cjs +1 -1
- package/common/src/webworker/snarkjsWorker/snarkjsWorkerLauncher.ts?worker&url.mjs +1 -1
- package/common/src/webworker/snarkjsWorkerNode.cjs +1 -1
- package/common/src/webworker/utxoWorker/utxoWorkerLauncher.ts?worker&url.cjs +1 -1
- package/common/src/webworker/utxoWorker/utxoWorkerLauncher.ts?worker&url.mjs +1 -1
- package/common/src/webworker/utxoWorkerNode.cjs +1 -1
- package/common/src/webworker/viteWorkerURL.constant.cjs +3 -3
- package/common/src/webworker/viteWorkerURL.constant.mjs +3 -3
- package/common/src/webworker/workerProxy-CE-rYA3W.js +1 -0
- package/common/src/webworker/zkProofWorker/zkProofWorkerLauncher.ts?worker&url.cjs +1 -1
- package/common/src/webworker/zkProofWorker/zkProofWorkerLauncher.ts?worker&url.mjs +1 -1
- package/common/src/webworker/zkProofWorkerNode.cjs +1 -1
- package/index.cjs +1 -1
- package/index.mjs +3 -2
- package/internal/monitorConnectedAddress.cjs +1 -1
- package/internal/monitorConnectedAddress.d.ts +1 -1
- package/internal/monitorConnectedAddress.mjs +1 -3
- package/package.json +1 -1
- package/providers/prepareEthersHinkal.cjs +1 -1
- package/providers/prepareEthersHinkal.mjs +1 -1
- package/providers/prepareSolanaHinkal.cjs +1 -1
- package/providers/prepareSolanaHinkal.mjs +1 -1
- package/providers/prepareTronHinkal.cjs +1 -1
- package/providers/prepareTronHinkal.mjs +1 -1
- package/providers/prepareWagmiHinkal.cjs +1 -1
- package/providers/prepareWagmiHinkal.mjs +1 -1
- package/services/Hinkal.cjs +1 -1
- package/services/Hinkal.d.ts +6 -2
- package/services/Hinkal.mjs +74 -51
- package/types/IHinkal.d.ts +6 -1
- package/types/index.cjs +1 -1
- package/types/index.d.ts +1 -0
- package/types/index.mjs +2 -0
- package/types/receive-vault.types.cjs +1 -0
- package/types/receive-vault.types.d.ts +14 -0
- package/types/receive-vault.types.mjs +2 -0
- package/common/src/API/getOdosPriceForToken.cjs +0 -1
- package/common/src/API/getOdosPriceForToken.d.ts +0 -1
- package/common/src/API/getOdosPriceForToken.mjs +0 -14
- package/common/src/webworker/workerProxy-DF35H7vU.js +0 -1
package/README.md
CHANGED
|
@@ -241,6 +241,66 @@ On Solana, use `depositSolana(chainId, erc20Address, amount)`.
|
|
|
241
241
|
|
|
242
242
|
To shield funds for another user's private address, use `depositForOther` (EVM/Tron) or `depositSolanaForOther` (Solana) with their `recipientInfo` string from `getRecipientInfo()`.
|
|
243
243
|
|
|
244
|
+
### Receiving funds to a public deposit address
|
|
245
|
+
|
|
246
|
+
A receive address is a normal public address that shields whatever is sent to it. You hand it out, the sender makes a plain transfer, and a relayer settles the balance into your shielded balance for a fee (a flat fee covering the settlement gas, quoted when the balance is settled, plus 0.25%).
|
|
247
|
+
|
|
248
|
+
The address is derived from your shielded key, so deriving one is free: a CREATE2 address on EVM and Tron, where nothing is deployed until it is settled, and a program-derived address on Solana, where nothing is deployed at all. The relayer must supply the exact recipient the address was derived from, so it can shield your funds or do nothing — it can never redirect them.
|
|
249
|
+
|
|
250
|
+
One address takes every supported token on every chain of its network: the factory address and init code are identical on all EVM chains, so an EVM address is the same everywhere. Tron and Solana are separate networks, each with an address of its own.
|
|
251
|
+
|
|
252
|
+
Available on Solana, and on any EVM or Tron chain with a receive vault factory deployed. Check first:
|
|
253
|
+
|
|
254
|
+
```typescript
|
|
255
|
+
function isReceiveVaultSupported(chainId: number): boolean;
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
A vault address belongs to a network, not one chain. To hand out an address:
|
|
259
|
+
|
|
260
|
+
```typescript
|
|
261
|
+
function createReceiveAddress(network: ReceiveVaultNetwork, forceFresh?: boolean): Promise<ReceiveVaultRecord>;
|
|
262
|
+
```
|
|
263
|
+
|
|
264
|
+
where:
|
|
265
|
+
|
|
266
|
+
- `network` — `ReceiveVaultNetwork.Evm`, `ReceiveVaultNetwork.Tron` or `ReceiveVaultNetwork.Solana`, the network the address is for
|
|
267
|
+
- `forceFresh` — if true, claims a new address instead of returning the one already handed out for that network. Defaults to false
|
|
268
|
+
|
|
269
|
+
The returned `ReceiveVaultRecord` holds `vaultAddress` (the address to hand out, in the chain's native format) plus the terms it was derived from (`index`, `network`, `version`).
|
|
270
|
+
|
|
271
|
+
An address never expires and is reused: calling this again returns the same one until you ask for a fresh one. To list the addresses handed out so far, along with balances the relayer declined to shield:
|
|
272
|
+
|
|
273
|
+
```typescript
|
|
274
|
+
function getReceiveVaultAccount(): Promise<{
|
|
275
|
+
entries: ReceiveVaultRecord[];
|
|
276
|
+
blockedFunds: { record: ReceiveVaultRecord; erc20Address: string; chainId: number; amount: bigint; reason: ReceiveVaultBlockReason }[];
|
|
277
|
+
}>;
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
Records are restored from the shielded key itself, so this works on a fresh device. A fund is blocked when the relayer will not settle it — the sender was flagged, the token cannot be shielded, or the payment could not be attributed (`ReceiveVaultBlockReason`).
|
|
281
|
+
|
|
282
|
+
Blocked funds are never lost: only the address's owner can move them, paying gas from their own wallet.
|
|
283
|
+
|
|
284
|
+
```typescript
|
|
285
|
+
function recoverReceiveVault(
|
|
286
|
+
record: ReceiveVaultRecord,
|
|
287
|
+
erc20Address: string,
|
|
288
|
+
chainId: number,
|
|
289
|
+
recipientAddress: string,
|
|
290
|
+
returnTxData?: boolean,
|
|
291
|
+
): Promise<string | ethers.TransactionRequest | TronWebTypes.Transaction<TronWebTypes.TriggerSmartContract>>;
|
|
292
|
+
```
|
|
293
|
+
|
|
294
|
+
where:
|
|
295
|
+
|
|
296
|
+
- `record` — the record the blocked fund came with
|
|
297
|
+
- `erc20Address` — token to sweep out of the address
|
|
298
|
+
- `chainId` — chain the blocked balance sits on
|
|
299
|
+
- `recipientAddress` — public address to send it to
|
|
300
|
+
- `returnTxData` — if true, returns unsigned transaction data without executing. Defaults to false
|
|
301
|
+
|
|
302
|
+
Resolves to the transaction hash, and the funds land publicly at `recipientAddress`. With `returnTxData`, EVM and Tron return an unsigned transaction object; Solana returns a base64 legacy transaction with the fee payer and a recent blockhash already set, ready to sign and send.
|
|
303
|
+
|
|
244
304
|
### Private Send to Public Address: withdrawing funds from the shielded balance
|
|
245
305
|
|
|
246
306
|
Private Send to Public Address allows you to send tokens from your private, shielded balance directly to any public blockchain address. The sender's identity is not exposed during this transaction. The recipient receives the funds at their public address, where the tokens become visible on-chain. This is useful when you need to interact with public DeFi protocols, send funds to exchanges, or transfer to any public wallet while maintaining privacy for your shielded balance.
|
|
@@ -263,7 +323,7 @@ where:
|
|
|
263
323
|
|
|
264
324
|
- `recipientAddress` — public address that receives the withdrawn funds
|
|
265
325
|
- `isRelayerOff` — when `false`, a relayer handles gas fees; when `true`, the user pays gas directly
|
|
266
|
-
- `feeToken` — optional token
|
|
326
|
+
- `feeToken` — optional address of the token the relayer fee is paid in. Defaults to the chain's native token (the zero address). The fee is deducted from the sender's shielded balance of that token.
|
|
267
327
|
- `feeStructureOverride` — optional custom fee structure
|
|
268
328
|
|
|
269
329
|
### Private Send to Private Address: transfering funds from shielded balance
|
|
@@ -285,12 +345,15 @@ function transfer(
|
|
|
285
345
|
|
|
286
346
|
where:
|
|
287
347
|
|
|
288
|
-
- `recipientAddress` — recipient's private address string from `getRecipientInfo()`. Pass it as-is; do not reformat. It is a comma-separated string with
|
|
348
|
+
- `recipientAddress` — recipient's private address string from `getRecipientInfo()`. Pass it as-is; do not reformat. It is a comma-separated string with six components, in this order:
|
|
289
349
|
- `stealthAddress` — recipient's stealth address (hex, `0x` prefix, 64–66 characters)
|
|
290
350
|
- `H0[0]` — first coordinate of the H0 elliptic-curve point
|
|
291
351
|
- `H0[1]` — second coordinate of the H0 elliptic-curve point
|
|
352
|
+
- `H1[0]` — first coordinate of the H1 elliptic-curve point
|
|
292
353
|
- `H1[1]` — second coordinate of the H1 elliptic-curve point
|
|
293
354
|
- `encryptionKey` — recipient's encryption public key (hex, `0x` prefix, 66 characters)
|
|
355
|
+
- `feeToken` — optional address of the token the relayer fee is paid in. Defaults to the chain's native token (the zero address). The fee is deducted from the sender's shielded balance of that token.
|
|
356
|
+
- `feeStructureOverride` — optional custom fee structure
|
|
294
357
|
|
|
295
358
|
### Private Send from Public to Public addresses
|
|
296
359
|
|
|
@@ -402,7 +465,7 @@ where:
|
|
|
402
465
|
|
|
403
466
|
- `externalActionId` — swap external action to use (`ExternalActionId.Lifi` on EVM, `ExternalActionId.Okx` on Solana)
|
|
404
467
|
- `swapData` — encoded swap parameters for the chosen protocol
|
|
405
|
-
- `feeToken` — optional fee-payment token address
|
|
468
|
+
- `feeToken` — optional fee-payment token address; defaults to the chain's native token (the zero address) and is deducted from the sender's shielded balance of that token
|
|
406
469
|
- `feeStructureOverride` — optional custom fee structure
|
|
407
470
|
|
|
408
471
|
**Getting swap quotes and calldata:**
|
|
@@ -474,7 +537,7 @@ Parameters:
|
|
|
474
537
|
- `deltaAmounts` — token amount changes
|
|
475
538
|
- `onChainCreation` — `true` for tokens received, `false` for tokens spent
|
|
476
539
|
- `ops` — encoded user operations (see below)
|
|
477
|
-
- `feeToken` — optional fee-payment token address
|
|
540
|
+
- `feeToken` — optional fee-payment token address; defaults to the chain's native token (the zero address) and is deducted from the sender's shielded balance of that token
|
|
478
541
|
- `feeStructureOverride` — optional custom fee structure
|
|
479
542
|
|
|
480
543
|
User operations (`ops`) tell the Emporium contract what to execute. Generate them with `emporiumOp`:
|
package/common/src/API/API.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require(`./relayCalls.cjs`),t=require(`./getTokenPrice.cjs`),n=require(`./
|
|
1
|
+
const e=require(`./relayCalls.cjs`),t=require(`./getTokenPrice.cjs`),n=require(`./simulate-transaction.cjs`),r=require(`./simulate-batch-tx.cjs`),i=require(`./token-calls.cjs`),a=require(`./get-token-data.cjs`),o=require(`./proxyAccountsCalls.cjs`),s=require(`./callMonitor.cjs`),c=require(`./callRelayer.cjs`),l=require(`./seedless-calls.cjs`),u=require(`./temporaryWalletCalls.cjs`),d=require(`./onrampCalls.cjs`),f=require(`./get-token-price-chart-data.cjs`),p=require(`./privacy-score-calls.cjs`),m=require(`./privateSendRecipientInfoCalls.cjs`),h=require(`./privateSendNonceCalls.cjs`),g=require(`./snapshot-event-calls.cjs`),_=require(`./privateSendEmailNotificationsCalls.cjs`),v=require(`./tronSubsidyCalls.cjs`),y=require(`./dashboardAccountCalls.cjs`),b=require(`./dashboardContactCalls.cjs`),x=require(`./dashboardPayoutCalls.cjs`),S=require(`./dashboardAccountMemberCalls.cjs`),C=require(`./dashboardBalanceCalls.cjs`),w=require(`./dashboardTransactionCalls.cjs`),T=require(`./payoutNotificationStateCalls.cjs`),E=require(`./enclaveUtxoCalls.cjs`),D=require(`./rewardsUserCalls.cjs`),O=require(`./weeklyAnalyticCalls.cjs`),k=require(`./receiveVaultCalls.cjs`);var A={getTokenPrices:t.getTokenPrices,getTokenPriceChartData:f.getTokenPriceChartData,getTokenPreviousDayPrices:t.getTokenPreviousDayPrices,getIdleRelay:e.getIdleRelay,getUserAnalytics:O.getUserAnalytics,registerReceiveVault:k.registerReceiveVault,fetchReceiveVaultAccount:k.fetchReceiveVaultAccount,updateRewardsUser:D.updateRewardsUser,getRewardsUser:D.getRewardsUser,checkUsernameAvailability:D.checkUsernameAvailability,simulateTransaction:n.simulateTransaction,simulateBatchTx:r.simulateBatchTx,tokensInfoCall:i.tokensInfoCall,getTokenData:a.getTokenData,getBalancesEnclaveCall:E.getBalancesEnclaveCall,storeClaimableKeyEnclaveCall:E.storeClaimableKeyEnclaveCall,getUtxosEnclaveCall:E.getUtxosEnclaveCall,getProxyAccounts:o.getProxyAccounts,updateProxyAccounts:o.updateProxyAccounts,monitor:s.monitor,callRelayerSolanaTransactBatchAPI:c.callRelayerSolanaTransactBatchAPI,callRelayerSolanaSponsoredBuildAPI:c.callRelayerSolanaSponsoredBuildAPI,callRelayerSolanaSponsoredSubmitAPI:c.callRelayerSolanaSponsoredSubmitAPI,seedlessInit:l.seedlessInit,seedlessBackup:l.seedlessBackup,seedlessCheckPassword:l.seedlessCheckPassword,seedlessStatus:l.seedlessStatus,seedlessSalt:l.seedlessSalt,getTemporaryWalletNonces:u.getTemporaryWalletNonces,addTemporaryWalletNonce:u.addTemporaryWalletNonce,encodeMoonPayBuyUrl:d.encodeMoonPayBuyUrl,generateMoonPayQuote:d.generateMoonPayQuote,getPrivateTransactionRatio:p.getPrivateTransactionRatio,savePrivacyScoreAndGetPrivacyRank:p.savePrivacyScoreAndGetPrivacyRank,allocateRecipientInfosEnclaveCall:m.allocateRecipientInfosEnclaveCall,syncPrivateSendNonce:h.syncPrivateSendNonce,reservePrivateSendNonceRange:h.reservePrivateSendNonceRange,getSnapshotServerEvents:g.getSnapshotServerEvents,sendPrivateSendEmailNotifications:_.sendPrivateSendEmailNotifications,checkTronSubsidyEligibility:v.checkTronSubsidyEligibility,recordTronSubsidyUsage:v.recordTronSubsidyUsage,getDashboardAccount:y.getDashboardAccount,updateDashboardAccount:y.updateDashboardAccount,addDashboardContact:b.addDashboardContact,deleteDashboardContact:b.deleteDashboardContact,deleteDashboardAccount:y.deleteDashboardAccount,updateDashboardContact:b.updateDashboardContact,getDashboardContacts:b.getDashboardContacts,updateUserProfile:S.updateUserProfile,sendDashboardInvitationEmail:S.sendDashboardInvitationEmail,resolveInviteRequest:S.resolveInviteRequest,deleteInviteRequest:S.deleteInviteRequest,removeMember:S.removeMember,editMember:S.editMember,createDashboardPayout:x.createDashboardPayout,getDashboardPayouts:x.getDashboardPayouts,syncDashboardBalances:C.syncDashboardBalances,getDashboardBalances:C.getDashboardBalances,changePayoutStatus:x.changePayoutStatus,createDashboardTransactions:w.createDashboardTransactions,getDashboardTransactions:w.getDashboardTransactions,getDashboardScheduledTransactions:w.getDashboardScheduledTransactions,getPayoutNotifications:T.getPayoutNotifications,markPayoutNotificationsRead:T.markPayoutNotificationsRead,dismissPayoutNotification:T.dismissPayoutNotification};exports.API=A;
|
package/common/src/API/API.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { getIdleRelay } from './relayCalls';
|
|
2
2
|
import { getTokenPreviousDayPrices, getTokenPrices } from './getTokenPrice';
|
|
3
|
-
import { getOdosPriceForToken } from './getOdosPriceForToken';
|
|
4
3
|
import { simulateTransaction } from './simulate-transaction';
|
|
5
4
|
import { simulateBatchTx } from './simulate-batch-tx';
|
|
6
5
|
import { tokensInfoCall } from './token-calls';
|
|
@@ -31,7 +30,6 @@ import { getUserAnalytics } from './weeklyAnalyticCalls';
|
|
|
31
30
|
import { fetchReceiveVaultAccount, registerReceiveVault } from './receiveVaultCalls';
|
|
32
31
|
export type IAPI = {
|
|
33
32
|
getTokenPrices: typeof getTokenPrices;
|
|
34
|
-
getOdosPriceForToken: typeof getOdosPriceForToken;
|
|
35
33
|
getTokenPriceChartData: typeof getTokenPriceChartData;
|
|
36
34
|
getTokenPreviousDayPrices: typeof getTokenPreviousDayPrices;
|
|
37
35
|
getIdleRelay: typeof getIdleRelay;
|
package/common/src/API/API.mjs
CHANGED
|
@@ -1,102 +1,100 @@
|
|
|
1
1
|
import { getIdleRelay as e } from "./relayCalls.mjs";
|
|
2
2
|
import { getTokenPreviousDayPrices as t, getTokenPrices as n } from "./getTokenPrice.mjs";
|
|
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 {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import { fetchReceiveVaultAccount as ue, registerReceiveVault as de } from "./receiveVaultCalls.mjs";
|
|
3
|
+
import { simulateTransaction as r } from "./simulate-transaction.mjs";
|
|
4
|
+
import { simulateBatchTx as i } from "./simulate-batch-tx.mjs";
|
|
5
|
+
import { tokensInfoCall as a } from "./token-calls.mjs";
|
|
6
|
+
import { getTokenData as o } from "./get-token-data.mjs";
|
|
7
|
+
import { getProxyAccounts as s, updateProxyAccounts as c } from "./proxyAccountsCalls.mjs";
|
|
8
|
+
import { monitor as l } from "./callMonitor.mjs";
|
|
9
|
+
import { callRelayerSolanaSponsoredBuildAPI as u, callRelayerSolanaSponsoredSubmitAPI as d, callRelayerSolanaTransactBatchAPI as f } from "./callRelayer.mjs";
|
|
10
|
+
import { seedlessBackup as p, seedlessCheckPassword as m, seedlessInit as h, seedlessSalt as g, seedlessStatus as _ } from "./seedless-calls.mjs";
|
|
11
|
+
import { addTemporaryWalletNonce as v, getTemporaryWalletNonces as y } from "./temporaryWalletCalls.mjs";
|
|
12
|
+
import { encodeMoonPayBuyUrl as b, generateMoonPayQuote as x } from "./onrampCalls.mjs";
|
|
13
|
+
import { getTokenPriceChartData as S } from "./get-token-price-chart-data.mjs";
|
|
14
|
+
import { getPrivateTransactionRatio as C, savePrivacyScoreAndGetPrivacyRank as w } from "./privacy-score-calls.mjs";
|
|
15
|
+
import { allocateRecipientInfosEnclaveCall as T } from "./privateSendRecipientInfoCalls.mjs";
|
|
16
|
+
import { reservePrivateSendNonceRange as E, syncPrivateSendNonce as D } from "./privateSendNonceCalls.mjs";
|
|
17
|
+
import { getSnapshotServerEvents as O } from "./snapshot-event-calls.mjs";
|
|
18
|
+
import { sendPrivateSendEmailNotifications as k } from "./privateSendEmailNotificationsCalls.mjs";
|
|
19
|
+
import { checkTronSubsidyEligibility as A, recordTronSubsidyUsage as j } from "./tronSubsidyCalls.mjs";
|
|
20
|
+
import { deleteDashboardAccount as M, getDashboardAccount as N, updateDashboardAccount as P } from "./dashboardAccountCalls.mjs";
|
|
21
|
+
import { addDashboardContact as F, deleteDashboardContact as I, getDashboardContacts as L, updateDashboardContact as R } from "./dashboardContactCalls.mjs";
|
|
22
|
+
import { changePayoutStatus as z, createDashboardPayout as B, getDashboardPayouts as V } from "./dashboardPayoutCalls.mjs";
|
|
23
|
+
import { deleteInviteRequest as H, editMember as U, removeMember as W, resolveInviteRequest as G, sendDashboardInvitationEmail as K, updateUserProfile as q } from "./dashboardAccountMemberCalls.mjs";
|
|
24
|
+
import { getDashboardBalances as J, syncDashboardBalances as Y } from "./dashboardBalanceCalls.mjs";
|
|
25
|
+
import { createDashboardTransactions as X, getDashboardScheduledTransactions as Z, getDashboardTransactions as Q } from "./dashboardTransactionCalls.mjs";
|
|
26
|
+
import { dismissPayoutNotification as $, getPayoutNotifications as ee, markPayoutNotificationsRead as te } from "./payoutNotificationStateCalls.mjs";
|
|
27
|
+
import { getBalancesEnclaveCall as ne, getUtxosEnclaveCall as re, storeClaimableKeyEnclaveCall as ie } from "./enclaveUtxoCalls.mjs";
|
|
28
|
+
import { checkUsernameAvailability as ae, getRewardsUser as oe, updateRewardsUser as se } from "./rewardsUserCalls.mjs";
|
|
29
|
+
import { getUserAnalytics as ce } from "./weeklyAnalyticCalls.mjs";
|
|
30
|
+
import { fetchReceiveVaultAccount as le, registerReceiveVault as ue } from "./receiveVaultCalls.mjs";
|
|
32
31
|
//#region libs/shared/common/src/API/API.ts
|
|
33
|
-
var
|
|
32
|
+
var de = {
|
|
34
33
|
getTokenPrices: n,
|
|
35
|
-
|
|
36
|
-
getTokenPriceChartData: C,
|
|
34
|
+
getTokenPriceChartData: S,
|
|
37
35
|
getTokenPreviousDayPrices: t,
|
|
38
36
|
getIdleRelay: e,
|
|
39
|
-
getUserAnalytics:
|
|
40
|
-
registerReceiveVault:
|
|
41
|
-
fetchReceiveVaultAccount:
|
|
42
|
-
updateRewardsUser:
|
|
43
|
-
getRewardsUser:
|
|
44
|
-
checkUsernameAvailability:
|
|
45
|
-
simulateTransaction:
|
|
46
|
-
simulateBatchTx:
|
|
47
|
-
tokensInfoCall:
|
|
48
|
-
getTokenData:
|
|
49
|
-
getBalancesEnclaveCall:
|
|
50
|
-
storeClaimableKeyEnclaveCall:
|
|
51
|
-
getUtxosEnclaveCall:
|
|
52
|
-
getProxyAccounts:
|
|
53
|
-
updateProxyAccounts:
|
|
54
|
-
monitor:
|
|
55
|
-
callRelayerSolanaTransactBatchAPI:
|
|
56
|
-
callRelayerSolanaSponsoredBuildAPI:
|
|
57
|
-
callRelayerSolanaSponsoredSubmitAPI:
|
|
58
|
-
seedlessInit:
|
|
59
|
-
seedlessBackup:
|
|
60
|
-
seedlessCheckPassword:
|
|
61
|
-
seedlessStatus:
|
|
62
|
-
seedlessSalt:
|
|
63
|
-
getTemporaryWalletNonces:
|
|
64
|
-
addTemporaryWalletNonce:
|
|
65
|
-
encodeMoonPayBuyUrl:
|
|
66
|
-
generateMoonPayQuote:
|
|
67
|
-
getPrivateTransactionRatio:
|
|
68
|
-
savePrivacyScoreAndGetPrivacyRank:
|
|
69
|
-
allocateRecipientInfosEnclaveCall:
|
|
70
|
-
syncPrivateSendNonce:
|
|
71
|
-
reservePrivateSendNonceRange:
|
|
72
|
-
getSnapshotServerEvents:
|
|
73
|
-
sendPrivateSendEmailNotifications:
|
|
74
|
-
checkTronSubsidyEligibility:
|
|
75
|
-
recordTronSubsidyUsage:
|
|
76
|
-
getDashboardAccount:
|
|
77
|
-
updateDashboardAccount:
|
|
78
|
-
addDashboardContact:
|
|
79
|
-
deleteDashboardContact:
|
|
80
|
-
deleteDashboardAccount:
|
|
81
|
-
updateDashboardContact:
|
|
82
|
-
getDashboardContacts:
|
|
83
|
-
updateUserProfile:
|
|
84
|
-
sendDashboardInvitationEmail:
|
|
85
|
-
resolveInviteRequest:
|
|
86
|
-
deleteInviteRequest:
|
|
87
|
-
removeMember:
|
|
88
|
-
editMember:
|
|
89
|
-
createDashboardPayout:
|
|
90
|
-
getDashboardPayouts:
|
|
91
|
-
syncDashboardBalances:
|
|
92
|
-
getDashboardBalances:
|
|
93
|
-
changePayoutStatus:
|
|
94
|
-
createDashboardTransactions:
|
|
95
|
-
getDashboardTransactions:
|
|
96
|
-
getDashboardScheduledTransactions:
|
|
97
|
-
getPayoutNotifications:
|
|
98
|
-
markPayoutNotificationsRead:
|
|
99
|
-
dismissPayoutNotification:
|
|
37
|
+
getUserAnalytics: ce,
|
|
38
|
+
registerReceiveVault: ue,
|
|
39
|
+
fetchReceiveVaultAccount: le,
|
|
40
|
+
updateRewardsUser: se,
|
|
41
|
+
getRewardsUser: oe,
|
|
42
|
+
checkUsernameAvailability: ae,
|
|
43
|
+
simulateTransaction: r,
|
|
44
|
+
simulateBatchTx: i,
|
|
45
|
+
tokensInfoCall: a,
|
|
46
|
+
getTokenData: o,
|
|
47
|
+
getBalancesEnclaveCall: ne,
|
|
48
|
+
storeClaimableKeyEnclaveCall: ie,
|
|
49
|
+
getUtxosEnclaveCall: re,
|
|
50
|
+
getProxyAccounts: s,
|
|
51
|
+
updateProxyAccounts: c,
|
|
52
|
+
monitor: l,
|
|
53
|
+
callRelayerSolanaTransactBatchAPI: f,
|
|
54
|
+
callRelayerSolanaSponsoredBuildAPI: u,
|
|
55
|
+
callRelayerSolanaSponsoredSubmitAPI: d,
|
|
56
|
+
seedlessInit: h,
|
|
57
|
+
seedlessBackup: p,
|
|
58
|
+
seedlessCheckPassword: m,
|
|
59
|
+
seedlessStatus: _,
|
|
60
|
+
seedlessSalt: g,
|
|
61
|
+
getTemporaryWalletNonces: y,
|
|
62
|
+
addTemporaryWalletNonce: v,
|
|
63
|
+
encodeMoonPayBuyUrl: b,
|
|
64
|
+
generateMoonPayQuote: x,
|
|
65
|
+
getPrivateTransactionRatio: C,
|
|
66
|
+
savePrivacyScoreAndGetPrivacyRank: w,
|
|
67
|
+
allocateRecipientInfosEnclaveCall: T,
|
|
68
|
+
syncPrivateSendNonce: D,
|
|
69
|
+
reservePrivateSendNonceRange: E,
|
|
70
|
+
getSnapshotServerEvents: O,
|
|
71
|
+
sendPrivateSendEmailNotifications: k,
|
|
72
|
+
checkTronSubsidyEligibility: A,
|
|
73
|
+
recordTronSubsidyUsage: j,
|
|
74
|
+
getDashboardAccount: N,
|
|
75
|
+
updateDashboardAccount: P,
|
|
76
|
+
addDashboardContact: F,
|
|
77
|
+
deleteDashboardContact: I,
|
|
78
|
+
deleteDashboardAccount: M,
|
|
79
|
+
updateDashboardContact: R,
|
|
80
|
+
getDashboardContacts: L,
|
|
81
|
+
updateUserProfile: q,
|
|
82
|
+
sendDashboardInvitationEmail: K,
|
|
83
|
+
resolveInviteRequest: G,
|
|
84
|
+
deleteInviteRequest: H,
|
|
85
|
+
removeMember: W,
|
|
86
|
+
editMember: U,
|
|
87
|
+
createDashboardPayout: B,
|
|
88
|
+
getDashboardPayouts: V,
|
|
89
|
+
syncDashboardBalances: Y,
|
|
90
|
+
getDashboardBalances: J,
|
|
91
|
+
changePayoutStatus: z,
|
|
92
|
+
createDashboardTransactions: X,
|
|
93
|
+
getDashboardTransactions: Q,
|
|
94
|
+
getDashboardScheduledTransactions: Z,
|
|
95
|
+
getPayoutNotifications: ee,
|
|
96
|
+
markPayoutNotificationsRead: te,
|
|
97
|
+
dismissPayoutNotification: $
|
|
100
98
|
};
|
|
101
99
|
//#endregion
|
|
102
|
-
export {
|
|
100
|
+
export { de as API };
|
|
@@ -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`);var r=r=>{if(r)return n.httpClient.post(`${t.RELAYER_URL}${e.RELAYER_CONFIG.emitTxPublicData}`,{adminData:r})};exports.emitTxPublicData=r;
|
|
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`),require(`../functions/utils/addresses.cjs`);var r=r=>{if(r)return n.httpClient.post(`${t.RELAYER_URL}${e.RELAYER_CONFIG.emitTxPublicData}`,{adminData:r})};exports.emitTxPublicData=r;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { AdminDataType } from '../types/admin.types';
|
|
1
|
+
import { AdminDataType, AdminProduct, OnboardingEventType } from '../types/admin.types';
|
|
2
2
|
export declare const emitTxPublicData: (adminData: AdminDataType | undefined) => Promise<any> | undefined;
|
|
3
|
+
export declare const emitOnboardingEvent: (ethereumAddress: string, product: AdminProduct, eventType: OnboardingEventType, walletName?: string) => Promise<any>;
|
|
3
4
|
export declare const emitReferralTx: (payload: {
|
|
4
5
|
txHash: string;
|
|
5
6
|
ref: string;
|
|
@@ -2,6 +2,7 @@ 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
|
import "../data-structures/http/index.mjs";
|
|
5
|
+
import "../functions/utils/addresses.mjs";
|
|
5
6
|
//#region libs/shared/common/src/API/admin-calls.ts
|
|
6
7
|
var r = (r) => {
|
|
7
8
|
if (r) return n.post(`${t}${e.emitTxPublicData}`, { adminData: r });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
require(`../constants/server.constants.cjs`),require(`./getServerURL.cjs`),require(`../data-structures/http/index.cjs`);
|
|
@@ -1,14 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import { httpClient as n } from "../data-structures/http/HttpClient.mjs";
|
|
1
|
+
import "../constants/server.constants.mjs";
|
|
2
|
+
import "./getServerURL.mjs";
|
|
4
3
|
import "../data-structures/http/index.mjs";
|
|
5
|
-
//#region libs/shared/common/src/API/evm-token-assets.ts
|
|
6
|
-
var r = async (r, i) => {
|
|
7
|
-
let { balances: a } = await n.post(`${t}${e.ROUTES.evmTokenBalances}`, {
|
|
8
|
-
chainId: r,
|
|
9
|
-
walletAddress: i
|
|
10
|
-
});
|
|
11
|
-
return a;
|
|
12
|
-
};
|
|
13
|
-
//#endregion
|
|
14
|
-
export { r as getEvmTokenBalancesFromServer };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require(`../constants/server.constants.cjs`),t=require(`./getServerURL.cjs`),n=require(`../data-structures/http/HttpClient.cjs`);var r=async(r,i)=>await n.httpClient.post(`${t.
|
|
1
|
+
const e=require(`../constants/server.constants.cjs`),t=require(`./getServerURL.cjs`),n=require(`../data-structures/http/HttpClient.cjs`);var r=async(r,i)=>await n.httpClient.post(`${t.DATA_SERVER_URL}${e.DATA_SERVER_CONFIG.getTokenPriceChartData}`,{chainId:r,erc20Address:i});exports.getTokenPriceChartData=r;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { DATA_SERVER_CONFIG as e } from "../constants/server.constants.mjs";
|
|
2
|
+
import { DATA_SERVER_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/get-token-price-chart-data.ts
|
|
5
5
|
var r = async (r, i) => await n.post(`${t}${e.getTokenPriceChartData}`, {
|
|
@@ -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`);var r=async(r,i)=>await n.httpClient.post(`${t.
|
|
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`);var r=async(r,i)=>await n.httpClient.post(`${t.DATA_SERVER_URL}${e.DATA_SERVER_CONFIG.getTokenPrices}`,{erc20Addresses:i,chainId:r}),i=async r=>await n.httpClient.post(`${t.DATA_SERVER_URL}${e.DATA_SERVER_CONFIG.getTokenPreviousDayPrices}`,{uniqueErc20TokensByChain:r});exports.getTokenPreviousDayPrices=i,exports.getTokenPrices=r;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { DATA_SERVER_CONFIG as e } from "../constants/server.constants.mjs";
|
|
2
|
+
import { DATA_SERVER_URL as t } from "./getServerURL.mjs";
|
|
3
3
|
import { httpClient as n } from "../data-structures/http/HttpClient.mjs";
|
|
4
4
|
import "../data-structures/http/index.mjs";
|
|
5
5
|
//#region libs/shared/common/src/API/getTokenPrice.ts
|
package/common/src/API/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
require(`./getServerURL.cjs`),require(`./scheduled-transactions-calls.cjs`),require(`./relayCalls.cjs`),require(`./getTokenPrice.cjs`),require(`./token-calls.cjs`),require(`./callMonitor.cjs`),require(`./callRelayer.cjs`),require(`./seedless-calls.cjs`),require(`./temporaryWalletCalls.cjs`),require(`./privateSendRecipientInfoCalls.cjs`),require(`./privateSendEmailNotificationsCalls.cjs`),require(`./payoutNotificationStateCalls.cjs`),require(`./enclaveUtxoCalls.cjs`),require(`./receiveVaultCalls.cjs`),require(`./API.cjs`),require(`./getGasEstimates.cjs`),require(`./admin-calls.cjs`),require(`./resolve-sns.cjs`),require(`./enclaveRecipientInfoCalls.cjs`),require(`./callNearIntentsAPI.cjs`),require(`./callLifiAPI.cjs`),require(`./getCoingeckoPrice.cjs`),require(`./checkRisk.cjs`),require(`./tenderly.api.cjs`),require(`./getWebsiteURL.cjs`);
|
|
1
|
+
require(`./getServerURL.cjs`),require(`./scheduled-transactions-calls.cjs`),require(`./relayCalls.cjs`),require(`./getTokenPrice.cjs`),require(`./token-calls.cjs`),require(`./callMonitor.cjs`),require(`./callRelayer.cjs`),require(`./seedless-calls.cjs`),require(`./temporaryWalletCalls.cjs`),require(`./get-token-price-chart-data.cjs`),require(`./privateSendRecipientInfoCalls.cjs`),require(`./privateSendEmailNotificationsCalls.cjs`),require(`./payoutNotificationStateCalls.cjs`),require(`./enclaveUtxoCalls.cjs`),require(`./receiveVaultCalls.cjs`),require(`./API.cjs`),require(`./getGasEstimates.cjs`),require(`./admin-calls.cjs`),require(`./resolve-sns.cjs`),require(`./enclaveRecipientInfoCalls.cjs`),require(`./callNearIntentsAPI.cjs`),require(`./callLifiAPI.cjs`),require(`./getCoingeckoPrice.cjs`),require(`./checkRisk.cjs`),require(`./tenderly.api.cjs`),require(`./getWebsiteURL.cjs`);
|
|
@@ -3,6 +3,7 @@ export * from './getCoingeckoPrice';
|
|
|
3
3
|
export * from './callRelayer';
|
|
4
4
|
export * from './getGasEstimates';
|
|
5
5
|
export * from './getTokenPrice';
|
|
6
|
+
export * from './get-token-price-chart-data';
|
|
6
7
|
export * from './checkRisk';
|
|
7
8
|
export * from './callMonitor';
|
|
8
9
|
export * from './relayCalls';
|
package/common/src/API/index.mjs
CHANGED
|
@@ -7,6 +7,7 @@ import "./callMonitor.mjs";
|
|
|
7
7
|
import "./callRelayer.mjs";
|
|
8
8
|
import "./seedless-calls.mjs";
|
|
9
9
|
import "./temporaryWalletCalls.mjs";
|
|
10
|
+
import "./get-token-price-chart-data.mjs";
|
|
10
11
|
import "./privateSendRecipientInfoCalls.mjs";
|
|
11
12
|
import "./privateSendEmailNotificationsCalls.mjs";
|
|
12
13
|
import "./payoutNotificationStateCalls.mjs";
|
|
@@ -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(`../functions/utils/addresses.cjs`);var i=async({ethereumAddress:i})=>{let a=r.hashEthereumAddress(i);return n.httpClient.get(`${t.
|
|
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(`../functions/utils/addresses.cjs`);var i=async({ethereumAddress:i})=>{let a=r.hashEthereumAddress(i);return n.httpClient.get(`${t.DATA_SERVER_URL}${e.DATA_SERVER_CONFIG.getPrivateTransactionsRatio(a)}`)},a=async({ethereumAddress:i,privacyScore:a})=>{let o=r.hashEthereumAddress(i);return n.httpClient.post(`${t.DATA_SERVER_URL}${e.DATA_SERVER_CONFIG.savePrivacyScoreAndGetPrivacyRank}`,{hashedOwner:o,privacyScore:a})};exports.getPrivateTransactionRatio=i,exports.savePrivacyScoreAndGetPrivacyRank=a;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { DATA_SERVER_CONFIG as e } from "../constants/server.constants.mjs";
|
|
2
|
+
import { DATA_SERVER_URL as t } from "./getServerURL.mjs";
|
|
3
3
|
import { httpClient as n } from "../data-structures/http/HttpClient.mjs";
|
|
4
4
|
import "../data-structures/http/index.mjs";
|
|
5
5
|
import { hashEthereumAddress as r } from "../functions/utils/addresses.mjs";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require(`../constants/vite.constants.cjs`),t=require(`../constants/server.constants.cjs`),n=require(`../functions/snarkjs/constant.cjs`)
|
|
1
|
+
const e=require(`../constants/vite.constants.cjs`),t=require(`../constants/server.constants.cjs`),n=require(`../functions/snarkjs/constant.cjs`);require(`../data-structures/http/index.cjs`);const r=require(`../functions/utils/encryptInputForEnclave.cjs`),i=require(`../functions/utils/receive-vault.utils.cjs`);var a=async(a,o,s,c,l,u)=>{let d=await r.enclavePostSealedSigned(`${n.ENCLAVE_URL}${t.API_CONFIG.ROUTES.registerReceiveVault}`,{vaultAddress:a.vaultAddress,network:a.network,index:a.index,deploymentMode:e.deploymentMode,params:i.serializeReceiveVaultParams(o),encryptionKey:s,accountKey:c,encryptedOutput:l,outputSignatures:u});if(!d.success)throw Error(`Failed to register receive vault`);return d.settled},o=async i=>{let a=await r.enclavePostSealedSigned(`${n.ENCLAVE_URL}${t.API_CONFIG.ROUTES.receiveVaultAccount}`,{...i,deploymentMode:e.deploymentMode});return{records:a.records,blocks:a.blocks}},s=async(e,i)=>(await r.enclavePostSealedSigned(`${n.ENCLAVE_URL}${t.API_CONFIG.ROUTES.receiveVaultNextIndex}`,{...e,network:i})).index;exports.fetchReceiveVaultAccount=o,exports.fetchReceiveVaultNextIndex=s,exports.registerReceiveVault=a;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ReceiveVaultAccountProof, ReceiveVaultBlock, ReceiveVaultParams, ReceiveVaultRecord } from '../types/receive-vault.types';
|
|
2
|
-
export declare const registerReceiveVault: (record: ReceiveVaultRecord, params: ReceiveVaultParams, encryptionKey: string, accountKey: string, encryptedOutput: string,
|
|
1
|
+
import { ReceiveVaultAccountProof, ReceiveVaultBlock, ReceiveVaultNetwork, ReceiveVaultOutputSignature, ReceiveVaultParams, ReceiveVaultRecord } from '../types/receive-vault.types';
|
|
2
|
+
export declare const registerReceiveVault: (record: ReceiveVaultRecord, params: ReceiveVaultParams, encryptionKey: string, accountKey: string, encryptedOutput: string, outputSignatures: ReceiveVaultOutputSignature[]) => Promise<boolean>;
|
|
3
3
|
/**
|
|
4
4
|
* The terms of a deposit address live in its CREATE2 salt, so a client that lost them cannot
|
|
5
5
|
* re-derive the address to recover from it. This reads them back for the whole account.
|
|
@@ -8,3 +8,5 @@ export declare const fetchReceiveVaultAccount: (proof: ReceiveVaultAccountProof)
|
|
|
8
8
|
records: ReceiveVaultRecord[];
|
|
9
9
|
blocks: ReceiveVaultBlock[];
|
|
10
10
|
}>;
|
|
11
|
+
export declare const fetchReceiveVaultNextIndex: (proof: ReceiveVaultAccountProof, network: ReceiveVaultNetwork) => Promise<number>;
|
|
12
|
+
export declare const checkReceiveVaultAddress: (vaultAddress: string) => Promise<boolean>;
|
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
import { deploymentMode as e } from "../constants/vite.constants.mjs";
|
|
2
2
|
import { API_CONFIG as t } from "../constants/server.constants.mjs";
|
|
3
3
|
import { ENCLAVE_URL as n } from "../functions/snarkjs/constant.mjs";
|
|
4
|
+
import "../data-structures/http/index.mjs";
|
|
4
5
|
import { enclavePostSealedSigned as r } from "../functions/utils/encryptInputForEnclave.mjs";
|
|
5
6
|
import { serializeReceiveVaultParams as i } from "../functions/utils/receive-vault.utils.mjs";
|
|
6
7
|
//#region libs/shared/common/src/API/receiveVaultCalls.ts
|
|
7
8
|
var a = async (a, o, s, c, l, u) => {
|
|
8
9
|
let d = await r(`${n}${t.ROUTES.registerReceiveVault}`, {
|
|
9
10
|
vaultAddress: a.vaultAddress,
|
|
10
|
-
|
|
11
|
+
network: a.network,
|
|
11
12
|
index: a.index,
|
|
12
13
|
deploymentMode: e,
|
|
13
14
|
params: i(o),
|
|
14
15
|
encryptionKey: s,
|
|
15
16
|
accountKey: c,
|
|
16
17
|
encryptedOutput: l,
|
|
17
|
-
|
|
18
|
+
outputSignatures: u
|
|
18
19
|
});
|
|
19
20
|
if (!d.success) throw Error("Failed to register receive vault");
|
|
20
21
|
return d.settled;
|
|
@@ -27,6 +28,9 @@ var a = async (a, o, s, c, l, u) => {
|
|
|
27
28
|
records: a.records,
|
|
28
29
|
blocks: a.blocks
|
|
29
30
|
};
|
|
30
|
-
}
|
|
31
|
+
}, s = async (e, i) => (await r(`${n}${t.ROUTES.receiveVaultNextIndex}`, {
|
|
32
|
+
...e,
|
|
33
|
+
network: i
|
|
34
|
+
})).index;
|
|
31
35
|
//#endregion
|
|
32
|
-
export { o as fetchReceiveVaultAccount, a as registerReceiveVault };
|
|
36
|
+
export { o as fetchReceiveVaultAccount, s as fetchReceiveVaultNextIndex, a as registerReceiveVault };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require(`../types/chains.types.cjs`),t=require(`./deploy-data/index.cjs`),n=require(`./vite.constants.cjs`);var r={ethMainnet:1,arbMainnet:42161,base:8453,polygon:137,bnbMainnet:56,tempo:4217,arcTestnet:5042002,solanaMainnet:501,tronMainnet:728126428,optimism:10,avalanche:43114,cronos:25,monad:143,plasma:9745,ink:57073,hyperEvm:999,tronNile:3448148188,sepoliaTestnet:11155111,optimismTest:1010,solanaLocalnet:102,tronLocalnet:103,localhost:31337},i=r.ethMainnet,a=e=>[r.localhost,r.tronLocalnet,r.solanaLocalnet].includes(e),o=e=>e?a(e)?i:e:i,s=e=>e===r.optimismTest?r.optimism:e,c=(e,t)=>s(e)===s(t),l={[r.ethMainnet]:{name:`Ethereum`,chainId:r.ethMainnet,rpcUrl:`https://ethereum-rpc.publicnode.com`,wsRpcUrl:`wss://ethereum-rpc.publicnode.com`,supported:!0,contractData:t.ethMainnetData,priority:1,maxPageSize:9e5},[r.arbMainnet]:{name:`Arbitrum`,chainId:r.arbMainnet,rpcUrl:`https://arbitrum-one-rpc.publicnode.com`,wsRpcUrl:`wss://arbitrum-one-rpc.publicnode.com`,supported:!0,contractData:t.arbMainnetData,priority:2,maxPageSize:5e5},[r.base]:{name:`Base`,chainId:r.base,rpcUrl:`https://base-rpc.publicnode.com`,wsRpcUrl:`wss://base-rpc.publicnode.com`,supported:!0,contractData:t.baseData,priority:7,maxPageSize:5e5},[r.polygon]:{name:`Polygon`,chainId:r.polygon,rpcUrl:`https://polygon-bor-rpc.publicnode.com`,wsRpcUrl:`wss://polygon-bor-rpc.publicnode.com`,supported:!0,contractData:t.polygonData,priority:4,maxPageSize:9e5},[r.bnbMainnet]:{name:`BNB Chain`,chainId:r.bnbMainnet,rpcUrl:`https://bsc-rpc.publicnode.com`,wsRpcUrl:`wss://bsc-rpc.publicnode.com`,supported:!0,contractData:t.bnbMainnetData,priority:13,maxPageSize:9e5},[r.tempo]:{name:`Tempo`,chainId:r.tempo,rpcUrl:`https://rpc.tempo.xyz`,supported:!0,priority:12,contractData:t.tempoData,maxPageSize:9999},[r.arcTestnet]:{name:`Arc Testnet`,chainId:r.arcTestnet,rpcUrl:`https://rpc.testnet.arc.network`,supported:!0,contractData:t.arcTestnetData,priority:8,maxPageSize:9999},[r.solanaMainnet]:{name:`Solana`,chainId:r.solanaMainnet,rpcUrl:`https://solana-rpc.publicnode.com`,supported:!0,contractData:t.solanaData,priority:8},[r.tronMainnet]:{name:`Tron`,chainId:r.tronMainnet,rpcUrl:`https://tron-rpc.publicnode.com`,supported:!0,priority:10,contractData:t.tronMainnetData,maxPageSize:5e5},[r.optimism]:{name:`Optimism`,chainId:r.optimism,rpcUrl:`https://optimism-rpc.publicnode.com`,wsRpcUrl:`wss://optimism-rpc.publicnode.com`,supported:!0,contractData:t.optimismData,priority:3,maxPageSize:9e5},[r.avalanche]:{name:`Avalanche`,chainId:r.avalanche,rpcUrl:`https://api.avax.network/ext/bc/C/rpc`,supported:!1,contractData:{},priority:14},[r.cronos]:{name:`Cronos`,chainId:r.cronos,rpcUrl:`https://evm.cronos.org`,supported:!1,contractData:{},priority:15},[r.monad]:{name:`Monad`,chainId:r.monad,rpcUrl:`https://rpc.monad.xyz`,supported:!1,contractData:{},priority:16},[r.plasma]:{name:`Plasma`,chainId:r.plasma,rpcUrl:`https://rpc.plasma.to`,supported:!1,contractData:{},priority:17},[r.ink]:{name:`Ink`,chainId:r.ink,rpcUrl:`https://rpc-gel.inkonchain.com`,supported:!1,contractData:{},priority:18},[r.hyperEvm]:{name:`HyperEVM`,chainId:r.hyperEvm,rpcUrl:`https://rpc.hyperliquid.xyz/evm`,supported:!1,contractData:{},priority:19},[r.tronNile]:{name:`Tron Nile`,chainId:r.tronNile,rpcUrl:`https://nile.trongrid.io`,supported:!0,contractData:t.tronNileData,priority:9,maxPageSize:5e5},[r.sepoliaTestnet]:{name:`Sepolia Testnet`,chainId:r.sepoliaTestnet,rpcUrl:`https://ethereum-sepolia-rpc.publicnode.com`,wsRpcUrl:`wss://ethereum-sepolia-rpc.publicnode.com`,supported:!0,priority:11,contractData:t.sepoliaTestnetData,maxPageSize:9e5},[r.optimismTest]:{name:`Optimism Test`,chainId:r.optimismTest,rpcUrl:`https://optimism-rpc.publicnode.com`,wsRpcUrl:`wss://optimism-rpc.publicnode.com`,supported:!0,contractData:t.optimismTestData,priority:3,maxPageSize:9e5},[r.solanaLocalnet]:{name:`Solana Localnet`,chainId:r.solanaLocalnet,rpcUrl:`http://127.0.0.1:8899`,supported:!0,contractData:t.solanaData,priority:9},[r.tronLocalnet]:{name:`Tron Localnet`,chainId:r.tronLocalnet,rpcUrl:`http://127.0.0.1:9090`,supported:!0,contractData:t.tronNileData,priority:9,maxPageSize:5e5},...(n.isDevelopment,{})},u={name:`Localhost`,chainId:r.localhost,rpcUrl:`http://127.0.0.1:8545`,supported:!0,contractData:t.localhostData,priority:7};n.isDevelopment&&(l[r.localhost]=u),e.EthereumNetworkType.Mainnet,r.polygon,r.arbMainnet,r.ethMainnet,r.bnbMainnet,r.optimism,r.base,r.tronMainnet,r.tempo,r.solanaMainnet,r.avalanche,r.cronos,r.monad,r.plasma,r.ink,r.hyperEvm,e.EthereumNetworkType.Testnet,n.isNotProduction?(r.arcTestnet,r.tronNile,r.sepoliaTestnet,r.optimismTest):(r.arcTestnet,r.sepoliaTestnet),e.EthereumNetworkType.Local,r.localhost,r.solanaLocalnet,r.tronLocalnet;var d=[r.tronNile,r.tronMainnet,r.tronLocalnet],f=[r.solanaMainnet,r.solanaLocalnet],p=e=>f.includes(e),m=e=>d.includes(e),h=e=>e===r.sepoliaTestnet,g=e=>e===r.tempo,_=e=>e===r.arcTestnet,v=n.isNotProduction?r.tronNile:r.tronMainnet,y=r.solanaMainnet,b=[r.ethMainnet,r.base,r.polygon,r.arbMainnet,r.bnbMainnet,r.arcTestnet,y,r.tronMainnet,r.tronNile
|
|
1
|
+
const e=require(`../types/chains.types.cjs`),t=require(`./deploy-data/index.cjs`),n=require(`./vite.constants.cjs`);var r={ethMainnet:1,arbMainnet:42161,base:8453,polygon:137,bnbMainnet:56,tempo:4217,arcTestnet:5042002,solanaMainnet:501,tronMainnet:728126428,optimism:10,avalanche:43114,cronos:25,monad:143,plasma:9745,ink:57073,hyperEvm:999,tronNile:3448148188,solanaDevnet:502,sepoliaTestnet:11155111,optimismTest:1010,solanaLocalnet:102,tronLocalnet:103,localhost:31337},i=r.ethMainnet,a=e=>[r.localhost,r.tronLocalnet,r.solanaLocalnet].includes(e),o=e=>e?a(e)?i:e:i,s=e=>e===r.optimismTest?r.optimism:e,c=(e,t)=>s(e)===s(t),l={[r.ethMainnet]:{name:`Ethereum`,chainId:r.ethMainnet,rpcUrl:`https://ethereum-rpc.publicnode.com`,wsRpcUrl:`wss://ethereum-rpc.publicnode.com`,supported:!0,contractData:t.ethMainnetData,priority:1,maxPageSize:9e5},[r.arbMainnet]:{name:`Arbitrum`,chainId:r.arbMainnet,rpcUrl:`https://arbitrum-one-rpc.publicnode.com`,wsRpcUrl:`wss://arbitrum-one-rpc.publicnode.com`,supported:!0,contractData:t.arbMainnetData,priority:2,maxPageSize:5e5},[r.base]:{name:`Base`,chainId:r.base,rpcUrl:`https://base-rpc.publicnode.com`,wsRpcUrl:`wss://base-rpc.publicnode.com`,supported:!0,contractData:t.baseData,priority:7,maxPageSize:5e5},[r.polygon]:{name:`Polygon`,chainId:r.polygon,rpcUrl:`https://polygon-bor-rpc.publicnode.com`,wsRpcUrl:`wss://polygon-bor-rpc.publicnode.com`,supported:!0,contractData:t.polygonData,priority:4,maxPageSize:9e5},[r.bnbMainnet]:{name:`BNB Chain`,chainId:r.bnbMainnet,rpcUrl:`https://bsc-rpc.publicnode.com`,wsRpcUrl:`wss://bsc-rpc.publicnode.com`,supported:!0,contractData:t.bnbMainnetData,priority:13,maxPageSize:9e5},[r.tempo]:{name:`Tempo`,chainId:r.tempo,rpcUrl:`https://rpc.tempo.xyz`,supported:!0,priority:12,contractData:t.tempoData,maxPageSize:9999},[r.arcTestnet]:{name:`Arc Testnet`,chainId:r.arcTestnet,rpcUrl:`https://rpc.testnet.arc.network`,supported:!0,contractData:t.arcTestnetData,priority:8,maxPageSize:9999},[r.solanaMainnet]:{name:`Solana`,chainId:r.solanaMainnet,rpcUrl:`https://solana-rpc.publicnode.com`,supported:!0,contractData:t.solanaData,priority:8},[r.tronMainnet]:{name:`Tron`,chainId:r.tronMainnet,rpcUrl:`https://tron-rpc.publicnode.com`,supported:!0,priority:10,contractData:t.tronMainnetData,maxPageSize:5e5},[r.optimism]:{name:`Optimism`,chainId:r.optimism,rpcUrl:`https://optimism-rpc.publicnode.com`,wsRpcUrl:`wss://optimism-rpc.publicnode.com`,supported:!0,contractData:t.optimismData,priority:3,maxPageSize:9e5},[r.avalanche]:{name:`Avalanche`,chainId:r.avalanche,rpcUrl:`https://api.avax.network/ext/bc/C/rpc`,supported:!1,contractData:{},priority:14},[r.cronos]:{name:`Cronos`,chainId:r.cronos,rpcUrl:`https://evm.cronos.org`,supported:!1,contractData:{},priority:15},[r.monad]:{name:`Monad`,chainId:r.monad,rpcUrl:`https://rpc.monad.xyz`,supported:!1,contractData:{},priority:16},[r.plasma]:{name:`Plasma`,chainId:r.plasma,rpcUrl:`https://rpc.plasma.to`,supported:!1,contractData:{},priority:17},[r.ink]:{name:`Ink`,chainId:r.ink,rpcUrl:`https://rpc-gel.inkonchain.com`,supported:!1,contractData:{},priority:18},[r.hyperEvm]:{name:`HyperEVM`,chainId:r.hyperEvm,rpcUrl:`https://rpc.hyperliquid.xyz/evm`,supported:!1,contractData:{},priority:19},[r.tronNile]:{name:`Tron Nile`,chainId:r.tronNile,rpcUrl:`https://nile.trongrid.io`,supported:!0,contractData:t.tronNileData,priority:9,maxPageSize:5e5},[r.solanaDevnet]:{name:`Solana Devnet`,chainId:r.solanaDevnet,rpcUrl:`https://api.devnet.solana.com`,supported:!0,contractData:t.solanaDevnetData,priority:9},[r.sepoliaTestnet]:{name:`Sepolia Testnet`,chainId:r.sepoliaTestnet,rpcUrl:`https://ethereum-sepolia-rpc.publicnode.com`,wsRpcUrl:`wss://ethereum-sepolia-rpc.publicnode.com`,supported:!0,priority:11,contractData:t.sepoliaTestnetData,maxPageSize:9e5},[r.optimismTest]:{name:`Optimism Test`,chainId:r.optimismTest,rpcUrl:`https://optimism-rpc.publicnode.com`,wsRpcUrl:`wss://optimism-rpc.publicnode.com`,supported:!0,contractData:t.optimismTestData,priority:3,maxPageSize:9e5},[r.solanaLocalnet]:{name:`Solana Localnet`,chainId:r.solanaLocalnet,rpcUrl:`http://127.0.0.1:8899`,supported:!0,contractData:t.solanaData,priority:9},[r.tronLocalnet]:{name:`Tron Localnet`,chainId:r.tronLocalnet,rpcUrl:`http://127.0.0.1:9090`,supported:!0,contractData:t.tronNileData,priority:9,maxPageSize:5e5},...(n.isDevelopment,{})},u={name:`Localhost`,chainId:r.localhost,rpcUrl:`http://127.0.0.1:8545`,supported:!0,contractData:t.localhostData,priority:7};n.isDevelopment&&(l[r.localhost]=u),e.EthereumNetworkType.Mainnet,r.polygon,r.arbMainnet,r.ethMainnet,r.bnbMainnet,r.optimism,r.base,r.tronMainnet,r.tempo,r.solanaMainnet,r.avalanche,r.cronos,r.monad,r.plasma,r.ink,r.hyperEvm,e.EthereumNetworkType.Testnet,n.isNotProduction?(r.arcTestnet,r.tronNile,r.solanaDevnet,r.sepoliaTestnet,r.optimismTest):(r.arcTestnet,r.sepoliaTestnet),e.EthereumNetworkType.Local,r.localhost,r.solanaLocalnet,r.tronLocalnet;var d=[r.tronNile,r.tronMainnet,r.tronLocalnet],f=[r.solanaMainnet,r.solanaLocalnet,r.solanaDevnet],p=e=>f.includes(e),m=e=>d.includes(e),h=e=>e===r.sepoliaTestnet,g=e=>e===r.tempo,_=e=>e===r.arcTestnet,v=n.isNotProduction?r.tronNile:r.tronMainnet,y=r.solanaMainnet,b=[r.ethMainnet,r.base,r.polygon,r.arbMainnet,r.bnbMainnet,r.arcTestnet,r.tempo,y,r.tronMainnet,r.tronNile];b.filter(e=>![r.arcTestnet,r.tronNile,r.sepoliaTestnet].includes(e));var x=b.filter(e=>!m(e)&&!h(e)&&!g(e)&&!_(e)),S=[...b.filter(e=>!m(e)),v];b.filter(e=>!p(e)&&!m(e));var C=e=>{let t=S.indexOf(v);t!==-1&&(S[t]=e),v=e},w=[r.sepoliaTestnet],T=S.filter(e=>!w.includes(e)),E=e=>p(e)||e===r.tronMainnet,D=b.filter(e=>e!==r.arcTestnet&&!h(e)&&!(m(e)&&e!==r.tronMainnet));D.filter(e=>!m(e));var O=[r.avalanche,r.cronos,r.monad,r.plasma,r.ink,r.hyperEvm],k=[...D,...O];e.NetworkFilterType.Wallet,e.NetworkFilterType.Pay,e.NetworkFilterType.Bridge,e.NetworkFilterType.Dashboard,r.arcTestnet,r.arcTestnet,r.sepoliaTestnet,exports.BRIDGE_DESTINATION_CHAINS=k,exports.BRIDGE_DESTINATION_ONLY_CHAINS=O,exports.BRIDGE_SUPPORTED_CHAINS=D,exports.DASHBOARD_EXCLUDED_CHAIN_IDS=w,exports.DASHBOARD_SUPPORTED_CHAINS=T,exports.FRONT_END_SUPPORTED_CHAINS=S,exports.HINKAL_SUPPORTED_CHAINS=b,exports.SOLANA_CHAIN_IDS=f,exports.TRON_CHAIN_IDS=d,exports.WALLET_SUPPORTED_CHAINS=x,exports.chainIds=r,exports.currentSolanaChainId=y,Object.defineProperty(exports,`currentTronChainId`,{enumerable:!0,get:function(){return v}}),exports.getNonLocalhostChainId=o,exports.getOnchainChainId=s,exports.isArcTestnet=_,exports.isLocalNetwork=a,exports.isNearIntentsBridgeSource=E,exports.isSameOnchainNetwork=c,exports.isSepoliaTestnet=h,exports.isSolanaLike=p,exports.isTempo=g,exports.isTronLike=m,exports.localhostNetwork=i,exports.networkRegistry=l,exports.setHinkalTronChainId=C;
|
|
@@ -22,6 +22,7 @@ export declare const chainIds: {
|
|
|
22
22
|
ink: number;
|
|
23
23
|
hyperEvm: number;
|
|
24
24
|
tronNile: number;
|
|
25
|
+
solanaDevnet: number;
|
|
25
26
|
sepoliaTestnet: number;
|
|
26
27
|
optimismTest: number;
|
|
27
28
|
solanaLocalnet: number;
|
|
@@ -49,6 +50,7 @@ export declare const isSepoliaTestnet: (chainId: number) => boolean;
|
|
|
49
50
|
export declare const isTempo: (chainId: number) => boolean;
|
|
50
51
|
export declare const isBnbMainnet: (chainId: number) => boolean;
|
|
51
52
|
export declare const isArcTestnet: (chainId: number) => boolean;
|
|
53
|
+
export declare const isTestnetChain: (chainId: number) => boolean;
|
|
52
54
|
export declare let currentTronChainId: number;
|
|
53
55
|
export declare const currentSolanaChainId: number;
|
|
54
56
|
export declare const HINKAL_SUPPORTED_CHAINS: number[];
|