getMeta method
Implementation
Future<AssetMeta?> getMeta(String symbol) async {
var response = await request(
'blockchain.asset.get_meta',
[symbol],
);
if (response.runtimeType == String) {
/// "_This rpc call is not functional unless -assetindex is enabled. To enable, please run the wallet with -assetindex, this will require a reindex to occur"
return null; // todo: this should error and we should catch it above
}
response = response as Map;
if (response.isNotEmpty) {
return AssetMeta(
symbol: symbol,
satsInCirculation: response['sats_in_circulation'],
divisions: response['divisions'],
reissuable: response['reissuable'],
hasIpfs: response['has_ipfs'],
source: TxSource(
txHash: response['source']['tx_hash'],
txPos: response['source']['tx_pos'],
height: response['source']['height']),
);
}
return null;
}