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.
| Param | Type | Notes |
|---|---|---|
direction? | "in" | "out" | Default "in"; use "out" for outbound quotes |
sourceChain? | string | Required for inbound quotes |
destinationChain? | string | Required for outbound quotes |
destinationAddress? | string | Required for outbound quotes |
amount | string | Amount in smallest units (6 decimals) |
userSparkAddress | string | Spark address |
{ 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.
| Param | Type | Notes |
|---|---|---|
quoteId | string | Quote identifier |
txHash | string | Source chain tx (inbound) or Spark tx (outbound) |
sourceAddress | string | Sender address on the deposit chain |
direction? | "in" | "out" | Optional explicit direction |
{ 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.
| Param | Type | Notes |
|---|---|---|
id? | string | Bridge id |
quoteId? | string | Quote id |
txHash? | string | Source chain tx (inbound) or Spark tx (outbound) |
chain? | string | Source chain (alias: sourceChain, inbound only) |
direction? | "in" | "out" | Optional explicit direction |
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.
| Param | Type | Notes |
|---|---|---|
address | string | Spark address |
status? | string | Filter by status |
limit? | number | Pagination limit |
offset? | number | Pagination offset |
direction? | "in" | "out" | Optional filter; omit for both |
{ direction, bridges, pagination }
Status shapes
Inbound deposit status (USDC -> USDB):| Field | Type | Notes | |
|---|---|---|---|
id | string | Bridge id | |
quote_id | string | Quote id | |
status | "processing" | "confirming" | "minting" | "completed" | "failed" | Bridge lifecycle state | |
tx_hash | string | Source chain tx hash | |
source_chain | string | Source chain | |
amount_in | string | USDC amount in smallest units | |
amount_out | string | USDB amount out | |
fee | string | Fee in smallest units | |
spark_address | string | Destination Spark address | |
brale_transfer_id | `string | null` | Brale transfer id |
spark_tx_hash | `string | null` | Spark transaction hash |
error | `string | null` | Error message |
created_at | string | ISO timestamp | |
completed_at | `string | null` | ISO timestamp |
| Field | Type | Notes | |
|---|---|---|---|
id | string | Bridge id | |
quote_id | string | Quote id | |
status | "processing" | "confirming" | "minting" | "completed" | "failed" | Bridge lifecycle state | |
tx_hash | string | Spark tx hash | |
source_chain | "spark" | Source chain | |
destination_chain | string | Destination chain | |
destination_address | string | Destination address | |
amount_in | string | USDB amount in smallest units | |
amount_out | string | USDC amount out | |
fee | string | Fee in smallest units | |
spark_address | string | Source Spark address | |
brale_transfer_id | `string | null` | Brale transfer id |
destination_tx_hash | `string | null` | Destination chain tx hash |
error | `string | null` | Error message |
created_at | string | ISO timestamp | |
completed_at | `string | null` | ISO timestamp |
| Field | Type | Notes |
|---|---|---|
type | "quote" | Response discriminator |
id | string | Quote id |
status | "pending" | "expired" | "completed" | Quote lifecycle state |
sourceChain | string | Source chain ("spark" for outbound) |
destinationChain? | string | Destination chain for outbound quotes |
amountIn | string | Amount in smallest units |
amountOut | string | Amount out in smallest units |
fee | string | Fee in smallest units |
expiresAt | string | ISO timestamp |
createdAt | string | ISO timestamp |
direction? | "in" | "out" | Optional direction indicator |
Status reference
| Status | Meaning |
|---|---|
processing | Deposit submitted, waiting for verification |
confirming | Tx found, waiting for chain confirmations |
minting | Brale transfer in progress |
completed | USDB sent to Spark (inbound) or USDC sent to destination chain (outbound) |
failed | Terminal failure; request a new quote |