encoding/encoding
library
Classes
-
ASCIIDecoder
-
Decodes ASCII bytes to a Dart String - one character per byte, since
every ASCII byte maps directly to a single UTF-16 code unit.
-
ASCIIEncoder
-
Encodes a Dart String to ASCII bytes - one byte per character, since
every valid ASCII character is already a single UTF-16 code unit
<= 0x7F.
-
B64Decoder
-
-
B64DecodingInfo
-
-
B64Encoder
-
-
Base32Alphabet
-
-
Base32Decoder
-
A utility class for decoding Base32 encoded strings into bytes.
-
Base32Encoder
-
A utility class for encoding strings and bytes into Base32 format.
-
Base58Const
-
Fixed constants for Base58 (Bitcoin-style) encoding.
-
Base58Decoder
-
Decodes Base58 strings back into bytes.
-
Base58Encoder
-
Encodes bytes into a Base58 string.
-
Base58Utils
-
Checksum helper shared by the encode/decode-with-checksum methods below.
-
Base58XmrConst
-
Block sizing constants for Monero's Base58 variant.
-
Base58XmrDecoder
-
Decodes strings produced by Base58XmrEncoder.
-
Base58XmrEncoder
-
Encodes bytes using Monero's block-based Base58 variant.
-
BaseInteger<T>
-
Shared contract for fixed-width integer layouts (IntegerLayout, BigIntLayout).
-
BaseLazyStructLayoutBuilder<T, SOURCE, R extends LayoutRepository>
-
Shared contract for a field whose layout is resolved lazily.
-
BchBech32Const
-
-
BchBech32Decoder
-
-
BchBech32Encoder
-
-
Bech32BaseConst
-
Constants for Bech32 encoding/decoding.
-
Bech32BaseUtils
-
Bit-packing between 8-bit bytes and Bech32's 5-bit groups.
-
Bech32Const
-
-
Bech32Decoder
-
-
Bech32DecoderBase
-
-
Bech32Encoder
-
-
Bech32EncoderBase
-
Shared string framing:
hrp + separator + data-as-charset-chars +
checksum-as-charset-chars.
-
Bech32Utils
-
-
BigIntLayout
-
Fixed-width BigInt layout, for widths beyond what a Dart int holds.
-
BitSequenceLayout
-
Compact-length-prefixed bit sequence; the wire length is a bit count
while the payload is stored byte-aligned.
-
CborBase64Types
-
An enum representing different types of base64 encoding used in CBOR.
-
CborBaseUrlValue
-
A class representing a CBOR (Concise Binary Object Representation) Base-URL value.
-
CborBigFloatValue
-
A class representing a CBOR (Concise Binary Object Representation) BigFloat value.
-
CborBigIntValue
-
A class representing a CBOR (Concise Binary Object Representation) Bigint value.
-
CborBooleanValue
-
A class representing a CBOR (Concise Binary Object Representation) boolean value.
-
CborBytes<T>
-
-
CborBytesValue
-
A class representing a CBOR (Concise Binary Object Representation) bytes value.
-
CborDecimalFracValue
-
A class representing a CBOR (Concise Binary Object Representation) Decimal value.
-
CborDynamicBytesValue
-
A class representing a CBOR (Concise Binary Object Representation) bytes value with indefinite tag.
-
CborEpochFloatValue
-
A class representing a CBOR (Concise Binary Object Representation) epoch float DateTime value.
-
CborEpochIntValue
-
A class representing a CBOR (Concise Binary Object Representation) epoch int DateTime value.
-
CborFloatValue
-
A class representing a CBOR (Concise Binary Object Representation) float value.
-
CborIndefiniteStringValue
-
A class representing a CBOR (Concise Binary Object Representation) string value with indefinite tag length.
-
CborIntValue
-
A class representing a CBOR (Concise Binary Object Representation) int value.
-
CborIterableObject<T extends Iterable<CborObject<Object?>>>
-
Iterable
-
CborListValue<T extends CborObject<Object?>>
-
A class representing a CBOR (Concise Binary Object Representation) List value.
-
CborMapValue<K extends CborObject<Object?>, V extends CborObject<Object?>>
-
A class representing a CBOR (Concise Binary Object Representation) Map value.
-
CborMimeValue
-
A class representing a CBOR (Concise Binary Object Representation) mime value.
-
CborNullValue
-
A class representing a CBOR (Concise Binary Object Representation) null value.
-
CborNumeric<T>
-
-
CborObject<T extends Object?>
-
An abstract class representing a CBOR (Concise Binary Object Representation) object.
CBOR objects can hold various data types and optional tags, providing a flexible way
to represent structured data in a compact binary format.
-
CborRegexpValue
-
A class representing a CBOR (Concise Binary Object Representation) Regex value.
-
CborSafeIntValue
-
A class representing a CBOR (Concise Binary Object Representation) int (64-bit) value.
-
CborSerializable<T extends CborObject<Object?>>
-
Mixin for classes that can be serialized to CBOR.
-
CborSetValue<T extends CborObject<Object?>>
-
A class representing a CBOR (Concise Binary Object Representation) Set value.
-
CborString<T>
-
A class representing a CBOR (Concise Binary Object Representation) String value.
-
CborStringDateValue
-
A class representing a CBOR (Concise Binary Object Representation) String DateTime value.
-
CborStringValue
-
A class representing a CBOR (Concise Binary Object Representation) string value.
-
CborTagSerializable
-
-
CborTagValue<T extends CborObject<Object?>>
-
A class representing a CBOR (Concise Binary Object Representation) tag value.
-
CborUndefinedValue
-
A class representing a CBOR (Concise Binary Object Representation) undefined value.
-
CborUriValue
-
A class representing a CBOR (Concise Binary Object Representation) uri value.
-
CompactBigIntLayout
-
SCALE compact-encoded big integer, validated against layout's width.
-
CompactBytes
-
Compact-length-prefixed raw byte blob.
-
CompactIntLayout
-
SCALE compact-encoded integer, validated against layout's width.
-
CompactLengthPrefixedLayout<T>
-
Base for
[compact length][payload]-encoded values. Subclasses only
need to convert between raw payload bytes and T, plus how the wire
length value maps to a payload byte count (see BitSequenceLayout).
-
CompactOffsetLayout
-
Offset layout that delegates to a compact-encoded CompactIntLayout.
-
ConstantLayout<T>
-
A layout that always decodes/encodes to a fixed value and takes no bytes.
-
ConvLayout<A, B>
-
Bidirectional mapping between a wire shape
B and a domain type A.
-
COptionLayout<T>
-
Rust
COption<T>: a 1-byte discriminator (0 = none, 1 = some) followed
by layout when present.
-
CustomLayout<T, D>
-
Wraps layout with an encoder/decoder pair to expose it as a
different domain type
D.
-
DecodeTaggedValue<IDENTIFIER extends SerializationIdentifier>
-
-
DefaultProtoJsonConfig
-
-
DerCodec
-
-
DerNode
-
-
DerReader
-
-
DerTag
-
-
DerUtils
-
-
DoubleCoder
-
Utility class for encoding and decoding double values.
-
DoubleLayout
-
Fixed-width floating point layout (32 or 64 bit).
-
DynamicBytesLayout
-
Self-delimiting bytes: discriminator-encoded length prefix + payload.
Not every variable-length field uses this — a trailing field can just
run to the end of the buffer (see RemainderListLayout in array.dart) —
so check the actual field's encoding before assuming a length prefix.
-
DynamicSizeLayout<T>
-
Length-prefixed payload: a discriminator-encoded byte count followed
by exactly that many bytes decoded through inner. The inner layout is
bounded to just that byte range, so remainder-based inner layouts stop
at the right place instead of reading into whatever follows.
-
EmptyLayout<R>
-
-
ExternalLayout
-
Base type for layouts whose span/position is resolved externally.
-
ExternalOffsetLayout
-
An ExternalLayout with a size that is only known once decoded.
-
F4Jumble
-
Implements the F4Jumble transformation and its inverse.
-
FloatCoder
-
Utility class for encoding and decoding float values.
-
GreedyCount
-
Consumes every remaining byte as
elementSpan-sized elements.
-
HexCodec
-
-
IntegerLayout
-
Fixed-width integer layout, up to 7 bytes wide.
-
IProtoMessage<T extends ProtoJsonConfig>
-
-
JsonBinary
-
Marks raw bytes that should be written back out as a JSON string where
each byte is one UTF-16 code unit (0..255) — the same shape malformed
binary-in-a-string payloads normally arrive in. Only used on the
encode side; decode returns a plain
List<int> for malformed strings
(see JsonDecodeOptions.badStringAsBinary). Wrap a decoded List<int>
in JsonBinary(...) if you need to round-trip it back out losslessly.
Like BigInt, this is only handled specially when you pass a non-null
options and no toEncodable — see the library doc comment above.
-
JsonCodec
-
-
JsonDecodeOptions
-
-
JsonEncodeOptions
-
-
Layout<T>
-
Base contract every layout implements: byte span plus decode/encode.
-
LayoutByteReader
-
Read-only cursor over an immutable byte buffer used by layout decoders.
-
LayoutByteWriter
-
A utility class for writing layout bytes dynamically.
-
LayoutConst
-
Factory methods for every layout type: the primary entry point for
building layouts without calling each type's constructor directly.
-
LayoutDecodeResult<T>
-
Result of a decode: the value plus how many bytes it consumed.
-
LayoutRepository
-
Marker base for the user-supplied context object threaded through lazy
layout builders (see LazyStructLayoutBuilder, LazyMsgPackMapLayoutBuilder).
-
LayoutSerializable
-
Mixin for objects that can be serialized/deserialized via a Layout.
-
LayoutSerializationUtils
-
SCALE compact-integer and Bitcoin-style varint codecs used by the layout types.
-
LazyLayout<T>
-
Layout that resolves lazily, letting self-referential layouts be built.
-
LazyMsgPackMapLayoutBuilder<K, V, R extends LayoutRepository>
-
A map value field whose layout is resolved lazily, keyed by
K.
-
LazyStructLayout<R extends LayoutRepository>
-
Like StructLayout, but each field's layout is resolved lazily via
LazyStructLayoutBuilder, so later fields can depend on earlier results.
-
LazyStructLayoutBuilder<T, R extends LayoutRepository>
-
A field of a LazyStructLayout, with its layout resolved lazily and
optional decode/encode finalization hooks.
-
LazyUnion
-
Like Union, but variant layouts are resolved lazily via LazyVariantModel.
-
LazyVariantLayout
-
A single variant within a containing LazyUnion.
-
LazyVariantModel<T>
-
Describes one variant of a LazyUnion: its lazily-resolved layout and
how its discriminator index is determined.
-
LEB128U32OffsetLayout
-
Offset layout for an unsigned 32-bit LEB128-encoded length.
-
LEBBigIntegerLayout
-
LEB128-encoded BigInt, zig-zag encoded when validator is signed.
-
LEBIntegerLayout
-
LEB128-encoded integer, zig-zag encoded when validator is signed.
-
MapEntryLayout
-
Layout for a single key/value pair, used to build map layouts.
-
MsgPackAnyLayout
-
A MessagePack layout for schema-less / unknown dynamic type decoding and encoding.
-
MsgPackArrayLayout<T>
-
MessagePack array (fixarray/array16/array32) of elementLayout elements.
-
MsgPackBigIntLayout
-
MessagePack integer decoded/encoded as a BigInt (all forms, including
magnitudes beyond a Dart int).
-
MsgPackBinaryLayout
-
MessagePack binary blob (bin8/bin16/bin32), optionally of a fixedLength.
-
MsgPackBoolLayout
-
MessagePack
bool.
-
MsgPackConst
-
MessagePack format tag bytes and shared length-header helpers.
-
MsgPackEncodeOption<T>
-
Gate deciding whether a value should be emitted at all when encoding.
-
MsgPackEncodeOptionDefault<T>
-
Default encode gate: always emits the value.
-
MsgPackExtLayout
-
MessagePack extension type (fixext 1/2/4/8/16, ext8/16/32).
-
MsgPackExtValue
-
A MessagePack extension value: an application-defined type tag plus data.
-
MsgPackFixedKeyDynamicLazyValueMapLayout<K, V, R extends LayoutRepository>
-
MessagePack map with a fixed key layout, whose value layout is chosen
per-decoded-key from valueLayouts.
-
MsgPackFixedKeyFixedLazyValueMapLayout<K, V, R extends LayoutRepository>
-
MessagePack map with a fixed key layout and a single shared value layout.
-
MsgPackFloatLayout
-
MessagePack 32- or 64-bit float.
-
MsgPackIntLayout
-
MessagePack integer, decoded/encoded across the fixint/uint8-64/int8-64 forms.
-
MsgPackMapLayout<K, V>
-
MessagePack map (fixmap/map16/map32) of keyLayout/valueLayout pairs.
-
MsgPackNilLayout
-
MessagePack
nil.
-
MsgPackStringLayout
-
MessagePack UTF-8 string (fixstr/str8/str16/str32).
-
MsgPackTimestampLayout
-
MessagePack timestamp extension (ext type -1; 32/64/96-bit forms).
-
NatLayout
-
LEB128-style unsigned natural number (no upper bound).
-
NoneLayout<T>
-
A layout with no data: always decodes to
null, writes nothing.
-
ObjSeqLayout<R>
-
Sequence of fields concatenated in order, mapped to/from a domain type
R via build/unbuild instead of a Map — the natural shape for a
generated encoding of an annotated class.
-
OffsetLayout
-
Delegates to layout at a fixed byte offset from wherever it's decoded.
-
Oids
-
-
OptionalLayout<T>
-
A discriminator-flagged value: noneFlag means absent, someFlag
means layout follows.
-
PaddingLayout<T>
-
Transparent wrapper that reports layout's span as its own, used to
mark a field whose absence is tolerated (e.g. trailing struct padding).
-
ProtoBufferDecodedField<T>
-
-
ProtoBufferDecoder
-
-
ProtoBufferDecoderResult
-
-
ProtoBufferEncoder
-
-
ProtoEnumVariant
-
-
ProtoFieldConfig
-
-
ProtoGoogleAny
-
Protocol Buffers - Google's data interchange format
Copyright 2008 Google Inc. All rights reserved.
https://developers.google.com/protocol-buffers/
-
ProtoGoogleDuration
-
google.protobuf.Duration runtime.
-
ProtoGoogleEmpty
-
google.protobuf.Empty runtime. Canonical JSON mapping is {}.
-
ProtoGoogleFieldMask
-
google.protobuf.FieldMask runtime.
-
ProtoGoogleListValue
-
google.protobuf.ListValue: repeated Value values = 1.
-
ProtoGoogleRpcStatus
-
google.rpc.Status runtime (used by sui.rpc.v2 error responses).
-
ProtoGoogleStruct
-
google.protobuf.Struct: map<string, Value> fields = 1.
Canonical JSON mapping is the raw object itself.
-
ProtoGoogleTimestamp
-
google.protobuf.Timestamp runtime (see also the generated SuiTimestamp
shape in sui-apis consumers).
-
ProtoGoogleValue
-
google.protobuf.Value: a dynamically typed JSON-like value.
Canonical JSON mapping is the raw value itself.
-
ProtoJsonConfig
-
-
ProtoMessageConfig
-
-
ProtoOption
-
-
ProtoOptionBool
-
-
ProtoOptionDouble
-
-
ProtoOptionHttp
-
-
ProtoOptionInt
-
-
ProtoOptionMap
-
-
ProtoOptionNull
-
-
ProtoOptionString
-
-
ProtoUtils
-
-
RawBytesLayout
-
Raw byte blob of a fixed size or a size resolved via an ExternalLayout.
-
RawTailLayout
-
Consumes/writes every remaining byte in the buffer.
-
RemainderListLayout<T>
-
Repeats element until the buffer is exhausted, with no count/length
prefix — e.g. how a Tezos operation list fills the rest of a message.
-
RequestLayoutParams<T, SOURCE, R extends LayoutRepository>
-
Context passed to a lazy layout builder when it's asked to resolve its
layout. encodeValue is only ever set (and required) when encoding.
-
Secp256k1Pkcs8Key
-
-
Secp256k1Sec1Key
-
-
Secp256r1Pkcs8Key
-
-
Secp256r1Sec1Key
-
-
SegwitBech32Const
-
-
SegwitBech32Decoder
-
-
SegwitBech32Encoder
-
-
SequenceLayout<T>
-
A contiguous sequence of elementLayout, either a fixed/derived count
or, when count is null, decoded until the buffer is exhausted.
-
SerializationIdentifier
-
identifiers from 11000
-
SS58Decoder
-
Decodes SS58 address strings back into their format and data bytes.
-
SS58Encoder
-
Encodes raw account bytes into an SS58 address string.
-
StructLayout
-
A contiguous sequence of named fields, decoded/encoded into a
Map<String, dynamic> in declaration order.
-
TaggedUnionLayout<T>
-
A tagged union of cases, where tagLayout reads/writes the tag and
tagFor picks the case to encode a given
T value with.
-
TupleLayout
-
Fixed-order list of heterogeneous layouts, concatenated end to end.
-
Union
-
A tagged union: discriminator selects which registered VariantLayout
decodes/encodes the rest of the data.
-
UnionCase<T>
-
One tag/layout pair in a TaggedUnionLayout.
-
UTF8Decoder
-
Decodes UTF-8 bytes to a Dart String.
-
UTF8Encoder
-
Encodes a Dart String (UTF-16) to UTF-8 bytes.
-
VariantDeserializeResult
-
Represents the result of deserializing a variant type.
-
VariantLayout
-
A single variant within a containing union, tagged by variant.
-
VariantLayoutSerializable
-
Mixin for variant types that support layout-based serialization.
-
VarintIntLayout
-
Varint-encoded integer, validated against layout's width.
-
VarintOffsetLayout
-
Offset layout that delegates to a varint-encoded VarintIntLayout.
-
WrappedIntOffsetLayout<L extends Layout<int>>
-
Base for offset layouts that just delegate int decode/encode/span to a
wrapped layout (see CompactOffsetLayout, VarintOffsetLayout).
-
XDRBytesLayout
-
XDR byte blob: layout payload padded to a 4-byte boundary.
-
ZarithIntLayout
-
Zarith signed integer ("Z"): first byte carries a sign bit (0x40) and
6 magnitude bits, subsequent bytes carry 7 magnitude bits each, all
but the last byte have the continuation bit (0x80) set.
Typedefs
-
BaseIntiger<T>
= BaseInteger<T>
-
Deprecated alias kept for compatibility; use BaseInteger instead.
-
CbCborKeyMapper<K>
= K Function(CborObject<Object?>)
-
-
CbGetEnumIndex
= int Function(Map<String, dynamic> source)
-
-
CbGetLayoutSpan
= List<int> Function(int)
-
-
CbLayoutFunc<T>
= Layout<T> Function({String? property})
-
-
CbLazyStructLayoutFunc<T, R extends LayoutRepository>
= Layout<T>? Function(String? property, RequestLayoutParams<T, Map<String, dynamic>, R> params)
-
-
CbMsgPackLayoutFunc<K, V, R extends LayoutRepository>
= Layout<V>? Function(String? property, RequestLayoutParams<V, Map<K, V>, R> params)
-
-
CbNormalizeLayoutResult
= Map<String, dynamic> Function(Map<String, dynamic> result, int variant)
-
-
CbOnFinalizeDecode<T, R extends LayoutRepository>
= dynamic Function(T layoutResult, Map<String, dynamic> structResult, R? repository)
-
-
CbOnFinalizeEncode<T, R extends LayoutRepository>
= void Function(T source, Map<String, dynamic> structSource, R? repository)
-
-
CbWrappedLayoutDecoder<T, D>
= D Function(T value)
-
-
CbWrappedLayoutEncoder<T, D>
= T Function(D source)
-