Skip to content
docs

RelayRefusal

Defined in: protocol-swap2-relay/src/order.ts:73

code names the check; reason (a Swap2RefusalReason from @anywalletkit/protocol-swap2-core) is the stable classification an app switches on. It is set where the refusal is raised, so one code can carry different reasons (an order deadline too far ahead is policy_refused, one already used up is quote_expired); a malformed request from the caller (a programming error) carries none.

  • Error

new RelayRefusal(code, detail, reason?): RelayRefusal

Defined in: protocol-swap2-relay/src/order.ts:76

RelayRefusalCode

string

Swap2RefusalReason

RelayRefusal

Error.constructor

readonly code: RelayRefusalCode

Defined in: protocol-swap2-relay/src/order.ts:74


readonly optional reason?: Swap2RefusalReason

Defined in: protocol-swap2-relay/src/order.ts:75