Client + config
- Amounts: strings in smallest units (USDC has 6 decimals).
- Namespace:
bridge.spark.stables.
Supported source chains
solana, base, polygon, arbitrum, optimism, ethereum.
Methods
bridge.spark.stables.quote(params)
Request a quote and a chain-specific deposit address.
| Param | Type | Notes |
|---|---|---|
sourceChain | string | Source chain for USDC deposit |
amount | string | Amount in smallest units (USDC 6 decimals) |
userSparkAddress | string | Destination Spark address |
{ quoteId, sourceChain, depositAddress, amountIn, fee, amountOut, expiresAt }
bridge.spark.stables.submit(params)
Submit a transaction hash after sending USDC.
| Param | Type | Notes |
|---|---|---|
quoteId | string | Quote identifier |
txHash | string | Source chain transaction hash |
sourceAddress | string | Source chain sender address |
{ bridgeId, status, message }
bridge.spark.stables.process(id)
Process or poll a bridge transaction by id.
Returns: { bridgeId, status, message?, braleTransferId?, sparkTxHash?, 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 hash |
chain? | string | Source chain (alias: sourceChain) |
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).
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 |
{ bridges, pagination }
Status shapes
Deposit status (after submit):| 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 |
|---|---|---|
type | "quote" | Response discriminator |
id | string | Quote id |
status | "pending" | "expired" | "completed" | Quote lifecycle state |
sourceChain | string | Source chain |
amountIn | string | USDC amount in smallest units |
amountOut | string | USDB amount out |
fee | string | Fee in smallest units |
expiresAt | string | ISO timestamp |
createdAt | string | ISO timestamp |
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 |
failed | Terminal failure; request a new quote |