Skip to main content

Client + config

import { BridgeSDK } from "@satsterminal-sdk/bridge";
// or via suite: const { bridge } = createClient({ apiKey, bridge: true });

const bridge = new BridgeSDK({ apiKey, baseUrl }); // baseUrl optional; defaults to core API
  • 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.
ParamTypeNotes
sourceChainstringSource chain for USDC deposit
amountstringAmount in smallest units (USDC 6 decimals)
userSparkAddressstringDestination Spark address
Returns: { quoteId, sourceChain, depositAddress, amountIn, fee, amountOut, expiresAt }

bridge.spark.stables.submit(params)

Submit a transaction hash after sending USDC.
ParamTypeNotes
quoteIdstringQuote identifier
txHashstringSource chain transaction hash
sourceAddressstringSource chain sender address
Returns: { 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.
ParamTypeNotes
id?stringBridge id
quoteId?stringQuote id
txHash?stringSource chain tx hash
chain?stringSource chain (alias: sourceChain)
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). Returns: { matchedBy, bridge }

bridge.spark.stables.history(params)

Fetch bridge history for a Spark address.
ParamTypeNotes
addressstringSpark address
status?stringFilter by status
limit?numberPagination limit
offset?numberPagination offset
Returns: { bridges, pagination }

Status shapes

Deposit status (after submit):
FieldTypeNotes
idstringBridge id
quote_idstringQuote id
status"processing" | "confirming" | "minting" | "completed" | "failed"Bridge lifecycle state
tx_hashstringSource chain tx hash
source_chainstringSource chain
amount_instringUSDC amount in smallest units
amount_outstringUSDB amount out
feestringFee in smallest units
spark_addressstringDestination Spark address
brale_transfer_idstring | nullBrale transfer id
spark_tx_hashstring | nullSpark transaction hash
errorstring | nullError message
created_atstringISO timestamp
completed_atstring | nullISO timestamp
Quote status (before submit):
FieldTypeNotes
type"quote"Response discriminator
idstringQuote id
status"pending" | "expired" | "completed"Quote lifecycle state
sourceChainstringSource chain
amountInstringUSDC amount in smallest units
amountOutstringUSDB amount out
feestringFee in smallest units
expiresAtstringISO timestamp
createdAtstringISO timestamp

Status reference

StatusMeaning
processingDeposit submitted, waiting for verification
confirmingTx found, waiting for chain confirmations
mintingBrale transfer in progress
completedUSDB sent to Spark
failedTerminal failure; request a new quote