Function: readShadowSubmitOutcome()
gSwap SDK 2.0.0-rc.4 / readShadowSubmitOutcome
Function: readShadowSubmitOutcome()
Call Signature
readShadowSubmitOutcome(
method,signedBody,result):ShadowSubmitOutcome
Defined in: packages/gswap-sdk/dist/index.d.ts:1366
Normalizes a shadow write's raw answer. For 'RequestTrade' the result is a
ShadowSubmitOutcome, whose success always has queued; any other method may also be a
ShadowSyncSuccess (no queued).
A 2xx envelope with error === false is a success when it is a queued RequestTrade that
acknowledges the EXACT signed uniqueKey, or a synchronous (mode: 'sync') liquidity write.
Everything else is classified as a failure from the status and the body's code.
Parameters
method
"RequestTrade"
signedBody
Record<string, unknown>
result
Returns
Throws
GSwapSDKError SHADOW_NOT_QUEUED when a RequestTrade success does not queue the
signed uniqueKey (a synchronous or mismatched answer must never be accepted as a swap).
Call Signature
readShadowSubmitOutcome(
method,signedBody,result):ShadowSubmitOutcome|ShadowSyncSuccess
Defined in: packages/gswap-sdk/dist/index.d.ts:1367
Normalizes a shadow write's raw answer. For 'RequestTrade' the result is a
ShadowSubmitOutcome, whose success always has queued; any other method may also be a
ShadowSyncSuccess (no queued).
A 2xx envelope with error === false is a success when it is a queued RequestTrade that
acknowledges the EXACT signed uniqueKey, or a synchronous (mode: 'sync') liquidity write.
Everything else is classified as a failure from the status and the body's code.
Parameters
method
string
signedBody
Record<string, unknown>
result
Returns
ShadowSubmitOutcome | ShadowSyncSuccess
Throws
GSwapSDKError SHADOW_NOT_QUEUED when a RequestTrade success does not queue the
signed uniqueKey (a synchronous or mismatched answer must never be accepted as a swap).