Polkadot Apps
    Preparing search index...
    • Encode a value as a JSON-serialized data payload for a statement.

      Serializes the value as JSON and encodes to UTF-8 bytes. Throws StatementDataTooLargeError if the result exceeds MAX_STATEMENT_SIZE bytes.

      Type Parameters

      • T

        The type of value being encoded.

      Parameters

      • value: T

        The value to serialize.

      Returns Uint8Array

      UTF-8 encoded JSON bytes.

      If the encoded data exceeds 512 bytes.