BlockchainAnchorOptionsParser

Single-method parser contract for converting a raw map into typed BlockchainAnchorClientOptions.

Implement this interface (or use a lambda via SAM conversion) to add support for a new blockchain type without modifying BlockchainAnchorClientOptions:

val myChainParser = BlockchainAnchorOptionsParser { chainId, map ->
if (chainId.startsWith("mychain:")) MyChainOptions.fromMap(map) else null
}
BlockchainAnchorClientOptions.registerParser(myChainParser)

Return null if this parser does not handle the given chainId.

Functions

Link copied to clipboard
abstract fun parse(chainId: String, map: Map<String, Any?>): BlockchainAnchorClientOptions?