Client + config
- Amounts: strings in smallest units (6 decimals).
- Namespace:
bridge.spark.stables.
Direction model
direction=in(default): USDC -> USDB (inbound).direction=out: USDB -> USDC (outbound).
quote requires direction. Other endpoints infer it from ids or tx hashes, but you can pass direction explicitly.
Supported chains
InboundsourceChain and outbound destinationChain support: solana, base, polygon, arbitrum, optimism, ethereum.
Outbound status responses use source_chain: "spark".
Methods
bridge.spark.stables.quote(params)
Request a quote and a direction-specific deposit address.
Returns:
{ quoteId, depositAddress, amountIn, fee, amountOut, expiresAt, sourceChain?, destinationChain?, direction? }
Notes:
- Inbound
depositAddressis an EVM/Solana address for USDC. - Outbound
depositAddressis a Spark address for USDB.
bridge.spark.stables.submit(params)
Submit a transaction hash after sending funds to the deposit address.
Returns:
{ bridgeId, status, message }
bridge.spark.stables.process(id)
Process or poll a bridge transaction by id.
Returns: { bridgeId, status, message?, braleTransferId?, sparkTxHash?, destinationTxHash?, fastFill?, error? }
bridge.spark.stables.status(params)
Fetch a bridge status by id, quote, or tx hash.
Returns:
SparkStablesStatusResponse (deposit status or quote status).
bridge.spark.stables.lookup(query)
Lookup a bridge by any identifier (bridge id, quote id, tx hash, Brale transfer id, Spark tx hash, destination tx hash).
Returns: { matchedBy, bridge }
bridge.spark.stables.history(params)
Fetch bridge history for a Spark address.
Returns:
{ direction, bridges, pagination }
Status shapes
Inbound deposit status (USDC -> USDB):
Outbound withdrawal status (USDB -> USDC):
Quote status (before submit):