bitcoin_base library

Classes

BaseBitcoinOpcode
BasedBitcoinTransacationBuilder
BasedUtxoNetwork
Abstract class representing a base for UTXO-based cryptocurrency networks.
BCHBaseOutput
BCMR
Bitcoin Cash Metadata Registries Script to convert uris and content hash to bitcoin output script
Bip68Const
Bip68Decoded
Bip68Sequence
BipOrTaprootKeyDerivationRequest
Represents a BIP32 or Taproot key derivation request in a PSBT transaction. This class combines PsbtInputBip32Derivation and PsbtInputTaprootBip32Derivation into a unified structure.
BitcoinAddress
A concrete implementation of BitcoinNetworkAddress for Bitcoin network.
BitcoinAddressType
BitcoinAddressUtils
Utility class for working with Bitcoin addresses and related operations.
BitcoinBaseAddress
BitcoinBaseOutput
Abstract base class representing a generic Bitcoin output.
BitcoinBurnableOutput
Represents a burnable output, specifically related to BitcoinTokenOutput for burning Cash Tokens. It is essential to use ForkedTransactionBuilder to validate inputs and outputs before spending.
BitcoinCashAddress
A concrete implementation of BitcoinNetworkAddress for Bitcoin cash network.
BitcoinFeeRate
BitcoinNetworkAddress<T extends BasedUtxoNetwork>
An abstract class representing a forked address for a specific network.
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.
BitcoinProvider<SERVICE extends IServiceProvider<BaseServiceRequestParams, BaseGRPCServiceRequestParams>>
BitcoinRequestDetails
BitcoinScriptOutput
Represents a custom script-based Bitcoin output, implementing BitcoinBaseOutput.
BitcoinScriptUtils
BitcoinSpendableBaseOutput
Abstract class representing a spendable Bitcoin output, extending BitcoinBaseOutput.
BitcoinSVAddress
A concrete implementation of BitcoinNetworkAddress for bitcoinSV network.
BitcoinTokenOutput
BitcoinTokenOutput represents details about a Bitcoin cash transaction with cash token output, including the recipient address, token and the value of bitcoins sent to that address.
BitcoinTransactionBuilder
A versatile transaction builder designed to support various plugin-supported networks other than Bitcoin Cash (BCH) and Bitcoin SV (BSV). Implements BasedBitcoinTransacationBuilder interface for creating and validating transactions across different Bitcoin-based networks.
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
BlockCypherChainInfo
BlockCypherRequest<RESULT, RESPONSE>
Abstract class representing an Electrum request with generic result and response types.
BlockCypherRequestDetails
BlockCypherRequestGetAccountTransactions
BlockCypherRequestGetAccountUtxos
BlockCypherRequestGetBlockHashByHeight
BlockCypherRequestGetNetworkFeeRate
BlockCypherRequestGetRawTransaction
BlockCypherRequestGetTransaction
BlockCypherRequestLatestBlockHeight
BlockCypherRequestSendRawTransaction
BlockCypherTransaction
BlockCypherTransactionInput
BlockCypherTransactionOutput
BlockCypherUtxo
BtcApiConst
BtcTransaction
Represents a Bitcoin transaction
BtcUtils
CashToken
CashTokenCapability
The CashTokenCapability class represents different capabilities associated with a Cash Token.
CashTokenUtils
Constants and utility methods for working with Cash Tokens.
ChainHistory
ChainSnapshot
A snapshot of the metadata for a particular chain/network at a specific time. This allows for registries to provide similar metadata for each chain's native currency unit (name, description, symbol, icon, etc.) as can be provided for other registered tokens.
DashAddress
A concrete implementation of BitcoinNetworkAddress for Dash network.
DogeAddress
A concrete implementation of BitcoinNetworkAddress for Doge network.
ECPrivate
Represents an ECDSA private key.
ECPublic
ElectraProtocolAddress
A concrete implementation of BitcoinNetworkAddress for Electra protocol network.
ElectrumGetMerkleResponse
ElectrumHeaderSubscribeResponse
ElectrumRequest<RESULT, RESPONSE>
Abstract class representing an Electrum request with generic result and response types.
ElectrumRequestAddPeer
A newly-started server uses this call to get itself into other servers’ peers lists. It should not be used by wallet clients. https://electrumx-spesmilo.readthedocs.io/en/latest/protocol-methods.html
ElectrumRequestBlockHeader
Return the block header at the given height. https://electrumx-spesmilo.readthedocs.io/en/latest/protocol-methods.html
ElectrumRequestBlockHeaders
Return a concatenated chunk of block headers from the main chain. https://electrumx-spesmilo.readthedocs.io/en/latest/protocol-methods.html
ElectrumRequestBroadCastTransaction
Broadcast a transaction to the network. https://electrumx-spesmilo.readthedocs.io/en/latest/protocol-methods.html
ElectrumRequestDetails
ElectrumRequestDonationAddress
Return a server donation address. https://electrumx-spesmilo.readthedocs.io/en/latest/protocol-methods.html
ElectrumRequestEstimateFee
Return the estimated transaction fee per kilobyte for a transaction to be confirmed within a certain number of blocks. https://electrumx-spesmilo.readthedocs.io/en/latest/protocol-methods.html
ElectrumRequestGetFeeHistogram
Return a histogram of the fee rates paid by transactions in the memory pool, weighted by transaction size. https://electrumx-spesmilo.readthedocs.io/en/latest/protocol-methods.html
ElectrumRequestGetMerkle
Return the merkle branch to a confirmed transaction given its hash and height. https://electrumx-spesmilo.readthedocs.io/en/latest/protocol-methods.html
ElectrumRequestGetRawTransaction
Return a raw transaction. https://electrumx-spesmilo.readthedocs.io/en/latest/protocol-methods.html
ElectrumRequestGetScriptHashBalance
Return the confirmed and unconfirmed balances of a script hash. https://electrumx-spesmilo.readthedocs.io/en/latest/protocol-methods.html
ElectrumRequestGetTransaction
Return a raw transaction. https://electrumx-spesmilo.readthedocs.io/en/latest/protocol-methods.html
ElectrumRequestGetValueProof
Returns a name resolution proof, suitable for low-latency (single round-trip) resolution. https://electrumx-spesmilo.readthedocs.io/en/latest/protocol-methods.html
ElectrumRequestGetVerboseTransaction
Return a raw transaction. https://electrumx-spesmilo.readthedocs.io/en/latest/protocol-methods.html
ElectrumRequestHeaderSubscribe
Subscribe to receive block headers when a new block is found. https://electrumx-spesmilo.readthedocs.io/en/latest/protocol-methods.html
ElectrumRequestIdFromPos
Return a transaction hash and optionally a merkle proof, given a block height and a position in the block. https://electrumx-spesmilo.readthedocs.io/en/latest/protocol-methods.html
ElectrumRequestMasternodeAnnounceBroadcast
Pass through the masternode announce message to be broadcast by the daemon. Whenever a masternode comes online or a client is syncing, they will send this message which describes the masternode entry and how to validate messages from it. https://electrumx-spesmilo.readthedocs.io/en/latest/protocol-methods.html
ElectrumRequestMasternodeList
Returns the list of masternodes. https://electrumx-spesmilo.readthedocs.io/en/latest/protocol-methods.html
ElectrumRequestMasternodeSubscribe
Returns the status of masternode. https://electrumx-spesmilo.readthedocs.io/en/latest/protocol-methods.html
ElectrumRequestMethods
ELECTRUM Protocol Methods
ElectrumRequestPing
Ping the server to ensure it is responding, and to keep the session alive. The server may disconnect clients that have sent no requests for roughly 10 minutes. https://electrumx-spesmilo.readthedocs.io/en/latest/protocol-methods.html
ElectrumRequestProtXDiff
Returns a diff between two deterministic masternode lists. The result also contains proof data.. https://electrumx-spesmilo.readthedocs.io/en/latest/protocol-methods.html
ElectrumRequestProtXInfo
Returns detailed information about a deterministic masternode. https://electrumx-spesmilo.readthedocs.io/en/latest/protocol-methods.html
ElectrumRequestRelayFee
Return the minimum fee a low-priority transaction must pay in order to be accepted to the daemon’s memory pool. https://electrumx-spesmilo.readthedocs.io/en/latest/protocol-methods.html
ElectrumRequestScriptHashGetHistory
Return the confirmed and unconfirmed history of a script hash. https://electrumx-spesmilo.readthedocs.io/en/latest/protocol-methods.html
ElectrumRequestScriptHashGetMempool
Return the unconfirmed transactions of a script hash. https://electrumx-spesmilo.readthedocs.io/en/latest/protocol-methods.html
ElectrumRequestScriptHashListUnspent
Return an ordered list of UTXOs sent to a script hash. https://electrumx-spesmilo.readthedocs.io/en/latest/protocol-methods.html
ElectrumRequestScriptHashSubscribe
Subscribe to a script hash. https://electrumx-spesmilo.readthedocs.io/en/latest/protocol-methods.html
ElectrumRequestScriptHashUnSubscribe
Unsubscribe from a script hash, preventing future notifications if its status changes. https://electrumx-spesmilo.readthedocs.io/en/latest/protocol-methods.html
ElectrumRequestServerBanner
Return a banner to be shown in the Electrum console. https://electrumx-spesmilo.readthedocs.io/en/latest/protocol-methods.html
ElectrumRequestServerFeatures
Return a list of features and services supported by the server. https://electrumx-spesmilo.readthedocs.io/en/latest/protocol-methods.html
ElectrumRequestServerPeersSubscribe
Return a list of peer servers. Despite the name this is not a subscription and the server must send no notifications.. https://electrumx-spesmilo.readthedocs.io/en/latest/protocol-methods.html
ElectrumRequestVersion
Identify the client to the server and negotiate the protocol version. Only the first server.version() message is accepted. https://electrumx-spesmilo.readthedocs.io/en/latest/protocol-methods.html
ElectrumUtxo
ElectrumVerbosTxResponse
Extensions
A mapping of extension identifiers to extension definitions. Extensions may be widely standardized or application-specific, and extension definitions must be either:
ForkedTransactionBuilder
A transaction builder specifically designed for the Bitcoin Cash (BCH) and Bitcoin SV (BSV) networks. Implements BasedBitcoinTransacationBuilder interface for creating and validating transactions.
IdentityHistory
IdentitySnapshot
A snapshot of the metadata for a particular identity at a specific time.
LegacyAddress
LitecoinAddress
A concrete implementation of BitcoinNetworkAddress for Litecoin network.
MempolUtxo
MempoolPrevOut
MempoolRequest<RESULT, RESPONSE>
Abstract class representing an Electrum request with generic result and response types.
MempoolRequestDetails
MempoolRequestGetAccountTransactions
MempoolRequestGetAccountUtxos
MempoolRequestGetBlockHashByHeight
MempoolRequestGetNetworkFeeRate
MempoolRequestGetRawTransaction
MempoolRequestGetTransaction
MempoolRequestLatestBlockHeight
MempoolRequestSendRawTransaction
MempoolStatus
MempoolTransaction
MempoolVin
MempoolVout
MessagePrefixes
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.
Musig2Signer
A signer class for MuSig2, handling key aggregation, nonce generation, signing, and partial signature aggregation.
NftCategory
A definition specifying the non-fungible token information for a token category.
NftCategoryField
A definition specifying a field that can be encoded in non-fungible tokens of a token category.
NftCategoryFieldType
NftType
A definition for one type of NFT within a token category.
OffChainRegistryIdentity
P2pkAddress
P2pkhAddress
P2shAddress
P2trAddress
P2trMultiSignatureAddress
P2trMultiSignatureSigner
P2wpkhAddress
P2wshAddress
ParsableNftCollection
Interpretation information for a collection of parsable NFTs, a collection in which each NFT may include additional metadata fields beyond a sequential identifier within its on-chain commitment. Note that ParsableNftCollections differ from SequentialNftCollections in that parsable collections require a parsing bytecode with which to inspect each NFT commitment: the type of each NFT is indexed by the hex-encoded contents the bottom item on the altstack following the evaluation of the parsing bytecode.
Parse
PepeAddress
A concrete implementation of BitcoinNetworkAddress for Pepecoin network.
Psbt
Represents a full PSBT (Partially Signed Bitcoin Transaction)
PsbtBtcMusig2Signer
PsbtBtcSigner<SIGNINGRESPONSE extends SignInputResponse, DIGEST extends PsbtSignInputDigest>
PsbtBuilder
PsbtBuilderImpl
PsbtBuilderV0
PsbtBuilderV2
PsbtDefaultSigner
PsbtFinalizeInput
Represents the finalized script signature and witness data for a PSBT input.
PsbtFinalizeParams
PsbtFinalizeResponse
PsbtGlobal
Represents the global section of a PSBT (Partially Signed Bitcoin Transaction).
PsbtGlobalData
PsbtGlobalExtendedPublicKey
PsbtGlobalFallbackLocktime
PsbtGlobalInputCount
PsbtGlobalOutputCount
PsbtGlobalProprietaryUseType
PsbtGlobalPSBTVersionNumber
PsbtGlobalSilentPaymentGlobalDLEQProof
PsbtGlobalSilentPaymentGlobalECDHShare
PsbtGlobalTransactionModifiableFlags
PsbtGlobalTransactionVersion
PsbtGlobalUnknow
PsbtGlobalUnsignedTransaction
PsbtInput
Represents the input section of a PSBT (Partially Signed Bitcoin Transaction).
PsbtInputBip32DerivationPath
PsbtInputData
PsbtInputDataSignature
PsbtInputFinalizedScriptSig
PsbtInputFinalizedScriptWitness
PsbtInputHash160
PsbtInputHash256
PsbtInputMuSig2ParticipantPartialSignature
PsbtInputMuSig2ParticipantPublicKeys
PsbtInputMuSig2PublicNonce
PsbtInputNonWitnessUtxo
PsbtInputPartialSig
PsbtInputPorCommitments
The UTF-8 encoded commitment message string for the proof-of-reserves. See BIP 127 for more information.
PsbtInputPreviousTXID
PsbtInputProprietaryUseType
PsbtInputRedeemScript
The redeemScript for this input if it has one.
PsbtInputRequiredHeightBasedLockTime
PsbtInputRequiredTimeBasedLockTime
PsbtInputRipemd160
PsbtInputSequenceNumber
PsbtInputSha256
PsbtInputSigHash
PsbtInputSighashInfo
PsbtInputSilentPaymentInputDLEQProof
PsbtInputSilentPaymentInputECDHShare
PsbtInputSpentOutputIndex
32 bit little endian integer representing the index of the output being spent in the transaction with the txid of PSBT_IN_PREVIOUS_TXID.
PsbtInputTaprootInternalKey
PsbtInputTaprootKeyBip32DerivationPath
PsbtInputTaprootKeySpendSignature
The 64 or 65 byte Schnorr signature for key path spending a Taproot output. Finalizers should remove this field after PSBT_IN_FINAL_SCRIPTWITNESS is constructed.
PsbtInputTaprootLeafScript
The script for this leaf as would be provided in the witness stack followed by the single byte leaf version. Note that the leaves included in this field should be those that the signers of this input are expected to be able to sign for. Finalizers should remove this field after PSBT_IN_FINAL_SCRIPTWITNESS is constructed.
PsbtInputTaprootMerkleRoot
PsbtInputTaprootScriptSpendSignature
PsbtInputUnknow
PsbtInputWitnessScript
PsbtInputWitnessUtxo
PsbtKey
PsbtKeyPair
Represents a PSBT key-value pair
PsbtMusig2DefaultSigner
PsbtMusig2SigningInputDigest
PsbtOutput
Represents the output section of a PSBT (Partially Signed Bitcoin Transaction).
PsbtOutputAmount
PsbtOutputBip32DerivationPath
PsbtOutputBIP353DNSSECProof
PsbtOutputData
PsbtOutputMuSig2ParticipantPublicKeys
PsbtOutputProprietaryUseType
PsbtOutputRedeemScript
PsbtOutputScript
PsbtOutputSilentPaymentData
PsbtOutputSilentPaymentLabel
PsbtOutputTaprootInternalKey
PsbtOutputTaprootKeyBip32DerivationPath
PsbtOutputTaprootTree
PsbtOutputUnknow
PsbtOutputWitnessScript
PsbtSignerParams
PsbtSignerResponse
PsbtSigningInputDigest
PsbtSigningResponse
PsbtSignInputDigest
PsbtTransactionInput
PsbtTransactionOutput
PsbtUtils
PsbtUtxo
PsbtValue
Registry
RegistryTimestampKeyedValues<T extends IdentitySnapshot>
Script
SegwitAddress
Sequence
Helps setting up appropriate sequence. Used to provide the sequence to transaction inputs and to scripts.
SequentialNftCollection
Interpretation information for a collection of sequential NFTs, a collection in which each NFT includes only a sequential identifier within its on-chain commitment. Note that SequentialNftCollections differ from ParsableNftCollections in that sequential collections lack a parsing bytecode with which to inspect each NFT commitment: the type of each NFT is indexed by the full contents its commitment (interpreted as a positive VM integer in user interfaces).
SignInputResponse
Tag
Tags allow registries to classify and group identities by a variety of characteristics. Tags are standardized within a registry and may represent either labels applied by that registry or designations by external authorities (certification, membership, ownership, etc.) that are tracked by that registry.
TapLeafMerkleProof
TaprootBranch
Represents an internal node (Merkle branch) in the Taproot tree.
TaprootControlBlock
TaprootLeaf
Represents a Taproot script leaf node (a script inside a Taproot tree).
TaprootTree
Abstract class representing a Taproot tree structure (leaf or branch).
TaprootUtils
TokenCategory
A definition specifying information about an identity's token category.
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).
URIs
A mapping of identifiers to URIs associated with an entity. URI identifiers may be widely-standardized or registry-specific. Values must be valid URIs, including a protocol prefix – e.g. https:// or ipfs://., Clients are only required to support https and ipfs URIs, but any scheme may be specified.
UTXO
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).
Version

Enums

APIType
BadBitcoinOpcode
BIP137Mode
BitcoinCashNetwork
Class representing a Bitcoin Cash network, implementing the BasedUtxoNetwork abstract class.
BitcoinFeeRateType
BitcoinNetwork
Class representing a Bitcoin network, implementing the BasedUtxoNetwork abstract class.
BitcoinOpcode
BitcoinOrdering
BitcoinProviderApi
BitcoinSerializationIdentifiers
BitcoinSVNetwork
Class representing a Bitcoin network, implementing the BasedUtxoNetwork abstract class.
BlockCypherRequestMethods
DashNetwork
Class representing a Dash network, implementing the BasedUtxoNetwork abstract class.
DisabledBitcoinOpcode
DogecoinNetwork
Class representing a Dogecoin network, implementing the BasedUtxoNetwork abstract class.
ElectraProtocolNetwork
Class representing a Electra Protocol network, implementing the BasedUtxoNetwork abstract class.
LitecoinNetwork
Class representing a Litecoin network, implementing the BasedUtxoNetwork abstract class.
MempoolRequestMethods
P2pkhAddressType
P2shAddressType
PepeNetwork
Class representing a Dogecoin network, implementing the BasedUtxoNetwork abstract class.
PsbtGlobalTypes
PSBT GLOBAL TYPES
PsbtInputTypes
PsbtOutputTypes
PsbtTxType
PsbtVersion
PubKeyAddressType
ScriptPubKeyType
SegwitAddressType
ZcashNetworkTransparent
Class representing a Zcash network, implementing the BasedUtxoNetwork abstract class.

Mixins

BitcoinServiceProvider
A mixin defining the service provider contract for interacting with the bitcoin (elctrum) network.
PsbtInputImpl
PsbtOutputImpl
PsbtSignerImpl

Extensions

ExtBitcoinAddressTypeCasting on BitcoinAddressType
ExtMempoolUtxo on List<MempolUtxo>
ExtUtxoCalculate on List<UtxoWithAddress>
extenstion for calculation on list of utxos

Typedefs

BitcoinServiceResponse = BaseServiceResponse
BitcoinSignerCallBack = String Function(List<int> trDigest, UtxoWithAddress utxo, String publicKey, int sighash)
BitcoinSignerCallBackAsync = Future<String> Function(List<int> trDigest, UtxoWithAddress utxo, String publicKey, int sighash)
ONBTCSIGNER = PsbtSignerResponse? Function(PsbtSignerParams)
ONBTCSIGNERASYNC<INPUT extends PsbtTransactionInput> = Future<PsbtSignerResponse?> Function(PsbtSignerParams)
ONFINALIZEINPUT<INPUT extends PsbtTransactionInput> = PsbtFinalizeResponse? Function(PsbtFinalizeParams params)
ONFINALIZEINPUTASYNC<INPUT extends PsbtTransactionInput> = Future<PsbtFinalizeResponse>? Function(PsbtFinalizeParams)
ONUPDATEPSBTINPUT<INPUT extends PsbtTransactionInput> = INPUT Function(INPUT)
PublicKeyType = PubKeyModes

Exceptions / Errors

DartBitcoinPluginException