Function: assertCanonicalV2Dto()
gSwap SDK 2.0.0-rc.4 / assertCanonicalV2Dto
Function: assertCanonicalV2Dto()
assertCanonicalV2Dto(
method,dto):void
Defined in: packages/gswap-sdk/dist/index.d.ts:3920
Asserts that dto is EXACTLY what the builder of method produces for its own fields — the
same fields, canonical decimal text, builder key order, nothing extra (no signature). The
submit* methods use it so that what an app showed a user (a DTO it built) is byte for byte
what gets signed; a DTO edited by hand, or built elsewhere, is refused rather than signed.
Parameters
method
dto
Record<string, unknown>
Returns
void
Throws
GSwapSDKError INVALID_DTO or DTO_NOT_CANONICAL.