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< BlockResponse> - Get a block by hash or height
-
blockchainInfo(
) → Future< BlockchainInfoResponse> - 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 = 10}) → Future< BlockTxsResponse> - Get transactions in a block
-
broadcastAndFinalizeTx(
List< int> txBytes) → Future<BroadcastAndFinalizeResponse> - Broadcast a transaction and wait for finalization
-
broadcastAndFinalizeTxs(
List< List< txBytesList) → Future<int> >List< BroadcastAndFinalizeResponse> > - Broadcast multiple transactions and wait for finalization
-
broadcastTx(
List< int> txBytes) → Future<BroadcastResponse> - Broadcast a single transaction
-
broadcastTxs(
List< List< txBytesList) → Future<int> >List< BroadcastResponse> > - Broadcast multiple transactions
-
chronikInfo(
) → Future< ChronikInfoResponse> - 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< List< int> > - Get raw transaction bytes
-
script(
String scriptType, String scriptPayload) → ScriptEndpoint - Get script endpoint for querying script-specific data
-
token(
String tokenId) → Future< TokenInfoResponse> - 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< TxResponse> - Get transaction details by TXID
-
unconfirmedTxs(
) → Future< UnconfirmedTxsResponse> - Get unconfirmed transactions from mempool
-
validateRawTx(
List< int> txBytes) → Future<ValidateRawTxResponse?> - 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 a Chronik client using a connection strategy