VarInt class

VarInt (a.k.a. Compact Size)

A varInt is a varible sized integer, and it is a format that is unique to bitcoin, and used throughout bitcoin to represent the length of binary data in a compact format that can take up as little as 1 byte or as much as 9 bytes.

Constructors

VarInt({List<int>? buf})
VarInt.fromBn(BigIntX bn)
factory
VarInt.fromBuffer(List<int> buf)
factory
VarInt.fromJSON(String str)
factory
VarInt.fromNumber(int n)
factory

Properties

buf List<int>?
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

fromBn(BigIntX bn) VarInt
fromBr(Br br) VarInt
fromBuffer(List<int> buf) VarInt
fromJSON(String str) VarInt
fromNumber(int n) VarInt
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toBn() BigIntX
toBuffer() List<int>?
toJSON() String
toNumber() int?
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited