@somnia-chain/markets-sdk


@somnia-chain/markets-sdk / index / BridgeDeliveryTimeoutError

Class: BridgeDeliveryTimeoutError

Defined in: packages/sdk/src/errors.ts:917

A bridge transfer was sent, but its message was not delivered on the destination within the delivery timeout. The funds are in flight, not lost.

Details

exchange.ensureFunds and createOrder(…, { funding: "auto" }) throw this error. exchange.bridge.transfer does not throw it: it resolves with delivered: false and the same messageId.

  • messageId: the Hyperlane message id, decoded from the origin receipt.
  • bridgeHash: the origin transaction that dispatched the message.
  • token, from, to: the route.
  • amount: raw units sent, in the origin side's decimals.

Gotchas

Do not send the transfer again before you check the message. Call delivered(messageId) on the destination chain's Mailbox (the mailbox of getBridgeNetwork(to)). When it returns false, the message can still land. A second transfer moves the funds twice. A later ensureFunds or auto-funded order on the same exchange does this for you: it waits for the pending message and sends no new leg for it.

Extends

Constructors

Constructor

new BridgeDeliveryTimeoutError(fields): BridgeDeliveryTimeoutError

Defined in: packages/sdk/src/errors.ts:931

Parameters

fields
messageId

`0x${string}`

bridgeHash

`0x${string}`

from

number

to

number

token

BridgeToken

amount

bigint

Returns

BridgeDeliveryTimeoutError

Overrides

SomniaMarketsError.constructor

Properties

messageId

readonly messageId: `0x${string}`

Defined in: packages/sdk/src/errors.ts:919

The Hyperlane message id of the transfer.


bridgeHash

readonly bridgeHash: `0x${string}`

Defined in: packages/sdk/src/errors.ts:921

Hash of the origin transaction that dispatched the message.


from

readonly from: number

Defined in: packages/sdk/src/errors.ts:923

Origin chain id.


to

readonly to: number

Defined in: packages/sdk/src/errors.ts:925

Destination chain id.


token

readonly token: BridgeToken

Defined in: packages/sdk/src/errors.ts:927

The bridged token.


amount

readonly amount: bigint

Defined in: packages/sdk/src/errors.ts:929

Raw units sent, in the origin side's decimals.