LayoutSerializationUtils class
SCALE compact-integer and Bitcoin-style varint codecs used by the layout types.
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
decodeScale(
List< int> bytes, {int offset = 0}) → LayoutDecodeResult<BigInt> -
Decodes a SCALE compact integer at
offset. -
decodeVarint(
List< int> bytes, {int offset = 0}) → LayoutDecodeResult<BigInt> -
Decodes a Bitcoin-style varint at
offset. -
encodeLength(
String length) → List< int> -
SCALE compact-encodes
length(given as a decimal string). -
encodeVarint(
int i) → List< int> -
Encodes
ias a Bitcoin-style varint. -
encodeVarintBigInt(
BigInt value) → List< int> -
Encodes
value(0 to 2^64-1) as a Bitcoin-style varint. -
getDataVarintOffset(
int bytes, {bool sign = false}) → int - Number of bytes a varint value occupies, given its first data byte.
-
getScaleRequiredLength(
int bytes, {bool sign = false}) → int -
Number of bytes a SCALE compact-integer header (starting with
bytes) occupies. -
getVarintLength(
int byte, {bool sign = false}) → int - Number of bytes a varint header occupies, given its first byte.