API Reference / canonicalEncode · function

Function: canonicalEncode()

function canonicalEncode(value): string;

Canonical JSON: keys sorted, no whitespace, and ONLY integers, strings, booleans, null, arrays, and plain objects. Any non-integer number throws -- that is the enforcement making a canonical digest trustworthy: it proves every quantity in the payload was quantized.

Parameters

ParameterType
valueunknown

Returns

string

Start building

Quickstart →