ChronikClient class

Main client for accessing the Chronik indexer

Constructors

ChronikClient(List<String> urls)
Create a Chronik client with the given list of server URLs
factory

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

address(String address) → ScriptEndpoint
Get script endpoint for an eCash address
block(String hashOrHeight) → Future<Block>
Get a block by hash or height
blockchainInfo() → Future<BlockchainInfo>
Get current blockchain information
blocks(int startHeight, int endHeight) → Future<List<BlockInfo>>
Get a range of blocks
blockTxs(String hashOrHeight, {int page = 0, int pageSize = 25}) → Future<TxHistoryPage>
Get transactions in a block
broadcastAndFinalizeTx(Uint8List rawTx, {dynamic finalizationTimeout = const Duration(minutes: 2), dynamic skipTokenChecks = false}) → Future<BroadcastResponse>
Broadcast a transaction and wait for finalization
broadcastAndFinalizeTxs(List<Uint8List> rawTxs, {dynamic finalizationTimeout = const Duration(minutes: 2), dynamic skipTokenChecks = false}) → Future<BroadcastTxsResponse>
Broadcast multiple transactions and wait for finalization
broadcastTx(Uint8List rawTx) → Future<BroadcastResponse>
Broadcast a single transaction
broadcastTxs(List<Uint8List> rawTxs) → Future<BroadcastTxsResponse>
Broadcast multiple transactions
chronikInfo() → Future<ChronikInfo>
Get Chronik server information
close() → void
Close the client and clean up resources
lokadId(String lokadId) → LokadIdEndpoint
Get lokad ID endpoint for querying lokad-specific data
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
plugin(String pluginName) → PluginEndpoint
Get plugin endpoint for querying plugin-specific data
rawTx(String txid) → Future<RawTx>
Get raw transaction bytes
script(String scriptType, String scriptPayload) → ScriptEndpoint
Get script endpoint for querying script-specific data
token(String tokenId) → Future<TokenInfo>
Get token information by token ID
tokenId(String tokenId) → TokenIdEndpoint
Get token ID endpoint for querying token-specific data
toString() → String
A string representation of this object.
inherited
tx(String txid) → Future<Tx>
Get transaction details by TXID
unconfirmedTxs() → Future<TxHistoryPage>
Get unconfirmed transactions from mempool
validateRawTx(Uint8List rawTx) → Future<Tx>
Validate a raw transaction Returns null for valid transactions, or an error message for invalid ones
ws(WsConfig config) → WsEndpoint
Create and configure a WebSocket endpoint

Operators

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

Static Methods

useStrategy(ConnectionStrategy strategy, List<String> urls) → Future<ChronikClient>
Create Chronik client instance with specified ConnectionStrategy