validateOffer
validateOffer(
offer,expect):Validation
validateOffer: the checks the quote API runs on a maker offer before handing
it to a user, and that the relay runs on third-party offers. Structure,
network and (when verifyProofs) proofs; a TTL long enough for the wallet step; legs
exactly as quoted (the user pays want USDM in total and nothing else); every fee
output present with the quoted amount and recipient, from its disclosed opening.
Runs on the ledger WASM; crates/ledger-native implements the same checks for the
relay's NIF and the conformance vectors keep them in step.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
offer |
string |
expect |
{ networkId: string; terms: SwapTerms; openings: CoinOpening[]; minRemainingMs: number; now?: Date; verifyProofs?: boolean; } |
expect.networkId |
string |
expect.terms |
SwapTerms |
expect.openings |
CoinOpening[] |
expect.minRemainingMs |
number |
expect.now? |
Date |
expect.verifyProofs? |
boolean |