GitHubAppDocsPlayground
  • Preparing search index...
  • The search index is not available
CCC Docs
  • CCC Docs
  • @ckb-ccc core
  • index
  • ccc
  • mol
  • option

Function option

  • option<Encodable, Decoded>(innerCodec): Codec<Encodable | undefined | null, Decoded | undefined>
  • Option is a dynamic-size type. Serializing an option depends on whether it is empty or not:

    • if it's empty, there is zero bytes (the size is 0).
    • if it's not empty, just serialize the inner item (the size is same as the inner item's size).

    Type Parameters

    • Encodable
    • Decoded

    Parameters

    • innerCodec: CodecLike<Encodable, Decoded>

    Returns Codec<Encodable | undefined | null, Decoded | undefined>

    • Defined in molecule/codec.ts:257

Settings

Member Visibility
GitHubAppDocsPlayground
CCC Docs
  • Loading...

Generated using TypeDoc