bitcoin_base library
library bitcoin_base a comprehensive and versatile Go library for all your Bitcoin transaction needs. offers robust support for various Bitcoin transaction types, including spending transactions, Bitcoin address management, Bitcoin Schnorr signatures, BIP-39 mnemonic phrase generation, hierarchical deterministic (HD) wallet derivation, and Web3 Secret Storage Definition.
Classes
- APIConfig
- ApiProvider
- ApiService
- The ApiService abstract class defines a contract for making HTTP requests.
- BasedUtxoNetwork
- Abstract class representing a base for UTXO-based cryptocurrency networks.
- BCHTransactionBuilder
- BitcoinAddress
- BitcoinFeeRate
- BitcoinOpCodeConst
- ignore_for_file: constant_identifier_names, equal_keys_in_map, non_constant_identifier_names Constants and identifiers used in the Bitcoin-related code.
- BitcoinOutput
- BitcoinOutput represents details about a Bitcoin transaction output, including the recipient address and the value of bitcoins sent to that address.
- BitcoinTransactionBuilder
- BitcoinUtxo
- BitcoinUtxo represents an unspent transaction output (UTXO) on the Bitcoin blockchain. It includes details such as the transaction hash (TxHash), the amount of bitcoins (Value), the output index (Vout), the script type (ScriptType), and the block height at which the UTXO was confirmed (BlockHeight).
- BlockCypherAddressInfo
- BlockCypherTransaction
- BlockCypherTransactionInput
- BlockCypherTransactionOutput
- BlockCypherUtxo
- BtcTransaction
- Represents a Bitcoin transaction
- ControlBlock
- ECPrivate
- Represents an ECDSA private key.
- ECPublic
- LegacyAddress
- MempolUtxo
- MempoolPrevOut
- MempoolStatus
- MempoolTransaction
- MempoolVin
- MempoolVout
- MultiSignatureAddress
- MultiSignatureAddress represents a multi-signature Bitcoin address configuration, including information about the required signers, threshold, the address itself, and the script details used for multi-signature transactions.
- MultiSignatureSigner
- MultiSignatureSigner is an interface that defines methods required for representing signers in a multi-signature scheme. A multi-signature signer typically includes information about their public key and weight within the scheme.
- P2pkAddress
- P2pkhAddress
- P2shAddress
- P2trAddress
- P2wpkhAddress
- P2wshAddress
- Script
- A Script contains just a list of OP_CODES and also knows how to serialize into bytes
- SegwitAddress
- Sequence
- Helps setting up appropriate sequence. Used to provide the sequence to transaction inputs and to scripts.
- TxInput
- A transaction input requires a transaction id of a UTXO and the index of that UTXO.
- TxOutput
- Represents a transaction output.
- TxRef
- TxWitnessInput
- A list of the witness items required to satisfy the locking conditions of a segwit input (aka witness stack).
- UtxoAddressDetails
- UtxoWithAddress
- UtxoWithAddress represents an unspent transaction output (UTXO) along with its associated owner details. It combines information about the UTXO itself (BitcoinUtxo) and the ownership details (UtxoAddressDetails).
Enums
- APIType
- BitcoinAddressType
- BitcoinCashNetwork
-
Enum representing different Bitcoin Cash networks, implementing the
BasedUtxoNetwork
abstract class. - BitcoinFeeRateType
- BitcoinNetwork
-
Enum representing different Bitcoin networks, implementing the
BasedUtxoNetwork
abstract class. - DashNetwork
-
Enum representing different Dash networks, implementing the
BasedUtxoNetwork
abstract class. - DogecoinNetwork
-
Enum representing different Dogecoin networks, implementing the
BasedUtxoNetwork
abstract class. - LitecoinNetwork
-
Enum representing different Litecoin networks, implementing the
BasedUtxoNetwork
abstract class. - ScriptType
- ignore: constant_identifier_names
Extensions
Functions
-
opPushData(
String hexData) → List< int> -
pushInteger(
int integer) → List< int> -
taggedHash(
List< int> data, String tag) → List<int> - Function: taggedHash Description: Computes a tagged hash of the input data with a provided tag. Input:
Typedefs
-
BitcoinSignerCallBack
= String Function(List<
int> trDigest, UtxoWithAddress utxo, String publicKey, int sighash)