@somnia-chain/markets-sdk / index / BridgeLiquidityError
Class: BridgeLiquidityError
Defined in: packages/sdk/src/errors.ts:855
A native bridge route cannot deliver: the destination router holds less than the transfer amount. The SDK refused the transfer, and nothing was sent.
Details
A native route (STT) pays out of the destination router's own balance
instead of minting. When that balance is below the amount, the relayer's
delivery reverts, and the funds stay in escrow on the origin until someone
seeds the router. exchange.bridge.transfer, exchange.ensureFunds and
createOrder(…, { funding: "auto" }) read the router balance first and
throw this error instead of sending.
token,from,to: the route.router: the destination router whose balance was read.amount: raw units the transfer would deliver.available: raw units the router held when the SDK read it.
Gotchas
Retry after the router is seeded, bridge at most available, or fund the
destination another way. The check is a read, not a reservation: another
transfer can still drain the router after the check passes.
Extends
Constructors
Constructor
new BridgeLiquidityError(
fields):BridgeLiquidityError
Defined in: packages/sdk/src/errors.ts:869
Parameters
fields
token
from
number
to
number
router
`0x${string}`
amount
bigint
available
bigint
Returns
BridgeLiquidityError
Overrides
SomniaMarketsError.constructor
Properties
token
readonlytoken:BridgeToken
Defined in: packages/sdk/src/errors.ts:857
The bridged token.
from
readonlyfrom:number
Defined in: packages/sdk/src/errors.ts:859
Origin chain id.
to
readonlyto:number
Defined in: packages/sdk/src/errors.ts:861
Destination chain id.
router
readonlyrouter:`0x${string}`
Defined in: packages/sdk/src/errors.ts:863
The destination router that pays out the delivery.
amount
readonlyamount:bigint
Defined in: packages/sdk/src/errors.ts:865
Raw units the transfer would deliver, in the origin side's decimals (equal to the destination's on every native route).
available
readonlyavailable:bigint
Defined in: packages/sdk/src/errors.ts:867
Raw units the destination router held.