Documentation Index
Fetch the complete documentation index at: https://flashnet-build.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
client.deposit references one or more existing Spark transfers and credits the resulting EVM balance in a single signed intent. The Spark transfer leg is the caller’s responsibility — client.deposit does not move funds out of the SparkWallet. The single-intent round-trip pattern that does both legs lives on TradingClient.swap({ useAvailableBalance: true }); see Swaps.
Native sats
oracle_pending while the deposit oracle confirms the Spark transfer against the operator DB. Once confirmed and finalized, your EVM-side balance reflects the credit.
The recipient field is optional. If omitted, the deposit credits the EVM address derived from the same identity key. Pass an explicit address when you want to fund a different account.
Spark tokens
Tokens follow the same two-step shape, with two name changes:transferTokens instead of transfer, and the tokenId in the deposit payload is the 32-byte hex form, not bech32m.
SparkToken contract via CREATE2 and credits the balance to your EVM address. Subsequent deposits hit the same contract.
Multiple deposits in one intent
Thedeposits array carries any number of assets, each with its own sparkTransferId. Submit them together when you want them to land atomically:
TradingClient builds on. The pattern is: deposit → execute action → withdraw, all in one signed intent.
Status lifecycle
The response includes asubmissionId and an intentId. The intent moves through:
oracle_pending is where deposit-shaped intents wait for the Spark operator-DB to confirm every transfer id. Most flows can wait for finalized before reading downstream balances. For low-latency UIs, included_pending_finality is enough to update optimistic state. See Intents → Status lifecycle.
Constraints
- Minimum deposit. The gateway advertises an advisory client-side minimum at
getNetworkInfo().minDepositSats. The gateway enforces its own bounds at admission, so a deposit below the advertised minimum may still be rejected. Treat the value as a UI hint, not a contract. - Sub-sat alignment. Native sats deposits must be whole-sat amounts. The contract rejects sub-sat dust.
- Replay protection. Each Spark transfer id can only be applied once.
SparkGateway.usedTransferIdsrecords the binding on first use; a second deposit referencing the same id reverts withTransferAlreadyUsed(). - Expiry. Intents expire after 15 minutes by default. Set
expiresAt(unix ms) for a longer window, up to the gateway’s 24h cap.