dartsv library Null safety

Support for doing something awesome.

More dartdocs go here.

Classes

Address
This class abstracts away the internals of address encoding and provides a convenient means to both encode and decode information from a bitcoin address.
Block
A block is the largest of the blockchain's building blocks.
BlockHeader
The BlockHeader contains the metadata for the contents of a block, as well as data describing it's place/position in the blockchain.
DataLockBuilder
Ecies
A Class for performing Elliptic Curve Integrated Encryption Scheme operations.
HDPrivateKey
Provides support for Extended Private keys (Hierarchical Deterministic keys) as described in the BIP32 spec.
HDPublicKey
Provides support for Extended Public keys (Hierarchical Deterministic keys) as described in the BIP32 spec.
Interpreter
Bitcoin Script Interpreter
InterpreterStack
Utility class to represent the Script Interpreter Stack.
LockingScriptBuilder
Base class for the Locking Script part of the Script Builder API
MerkleBlock
A merkle block represents a partial/filtered view of the transactions in a block.
Message
Bitcoin Signed Messages
Mnemonic
This class implements the Bip39 spec.
Networks
Utility class used to inject strong typing into the Address class' representation of network and address types.
OpCodes
OpCodes are used as the instruction set of the Bitcoin Script programming language.
P2MSLockBuilder
P2MSUnlockBuilder
P2PKHLockBuilder
P2PKHUnlockBuilder
P2PKLockBuilder
P2PKUnlockBuilder
P2SHLockBuilder
P2SHUnlockBuilder
ScriptChunk
Utility class to represent a parsed 'token' in the encoded script.
ScriptFlags
Flags are used to signal various expected behaviours to the Script Interpreter.
Sighash
Implements the Signature Hash algorithm.
SighashType
Transaction signature flags that determine which portions of a Transaction the signature in the TransactionInput applies to.
SVPrivateKey
Manages an ECDSA private key.
SVPublicKey
Manages an ECDSA public key.
SVScript
Bitcoin has a built-in scripting language. This class allows one to easily move between human-readable instructions and internal hexadecimal representations of bitcoin script.
SVSignature
Sign bitcoin transactions and verify signatures.
Transaction
Transactions are at the heart of this library. It is the primary means by which we interact with the Bitcoin network.
TransactionOutput
Class that represents the output (UTXO) of a transaction.
UnlockingScriptBuilder

Mixins

DataLockMixin
P2MSLockMixin
** P2PMS (multisig) locking Script (output script / scriptPubkey) ***
P2MSUnlockMixin
** P2MS (multisig) unlocking Script (scriptSig / Input script) ***
P2PKHLockMixin
** P2PKH locking Script ***
P2PKHUnlockMixin
** P2PKH unlocking Script (scriptSig / Input script) ***
P2PKLockMixin
P2PKUnlockMixin
P2SHLockMixin
** P2PMS (multisig) locking Script (output script / scriptPubkey) ***
P2SHUnlockMixin
P2SH unlocking Script
ScriptBuilder
ScriptPubkey
ScriptSig

Properties

ALPHABET String
read / write

Functions

calcVarInt(int? length) List<int>
decode(String input) List<int>
decodeBigInt(List<int> bytes) BigInt
Decode a BigInt from bytes in big-endian encoding.
decodeChecked(String input) List<int>
divmod(List<int> number, int firstDigit, int base, int divisor) → dynamic
Divides a number, represented as an array of bytes each containing a single digit in the specified base, by the given divisor. The given number is modified in-place to contain the quotient, and the return value is the remainder.
encode(List<int> encodedInput) Uint8List
Encodes the given bytes as a base58 string (no checksum is appended).
encodeBigInt(BigInt number) Uint8List
Encode a BigInt into bytes using big-endian encoding.
fromScriptNumBuffer(Uint8List buf, bool fRequireMinimal, {int nMaxNumSize = 4}) BigInt
fromSM(Uint8List buf, {Endian endian = Endian.big}) BigInt
getBufferOffset(int count) int?
hash160(List<int> bytes) List<int>
hexToInt32(List<int> hexBuffer) int
hexToInt64(List<int> hexBuffer) int
hexToUint16(List<int> hexBuffer) int
hexToUint32(List<int> hexBuffer) int
hexToUint64(List<int> hexBuffer) BigInt
readVarInt(Uint8List buffer) BigInt
readVarIntNum(ByteDataReader reader) int
ripemd160(List<int> bytes) List<int>
sha1(List<int> bytes) List<int>
sha256(List<int> bytes) List<int>
sha256Twice(List<int> bytes) List<int>
toBuffer(BigInt value, {int size = 0, Endian endian = Endian.big}) List<int>
toScriptNumBuffer(BigInt value) → dynamic
toSM(BigInt value, {Endian endian = Endian.big}) → dynamic
toSMBigEndian(BigInt value) List<int>
varintBufNum(dynamic n) List<int>
varIntWriter(int? length) Uint8List

Enums

AddressType
FeeMethod
KeyType
NetworkAddressType
NetworkType
TransactionOption
When serializing the transaction to hexadecimal it is possible to selectively disable some checks. See Transaction.serialize()
Wordlist
The supported word lists for Bip39 mnemonics

Typedefs

RandomBytes = Uint8List Function(int size)
Byte buffer to represent a random seed

Exceptions / Errors

AddressFormatException
BadChecksumException
BadParameterException
BlockException
DerivationException
IllegalArgumentException
InputScriptException
InterpreterException
InvalidKeyException
InvalidNetworkException
InvalidPathException
InvalidPointException
LockTimeException
MerkleTreeException
ScriptException
SignatureException
TransactionAmountException
TransactionException
TransactionFeeException
UTXOException