Function: assertCanonicalV2Dto
assertCanonicalV2Dto(
method,dto):void
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
| Parameter | Type |
|---|---|
method | V2WriteMethod |
dto | Record<string, unknown> |
v2 write method
Returns
void
Throws
GSwapSDKError INVALID_DTO or DTO_NOT_CANONICAL.
invalid dto not canonical