read
Reads anchored data from a blockchain.
Example:
val anchorRef = AnchorRef(
chainId = "algorand:testnet",
txHash = "abc123..."
)
val data = blockchainService.read<MyData>(
ref = anchorRef,
serializer = MyData.serializer()
)Content copied to clipboard
Return
The anchored data
Parameters
ref
Anchor reference containing chain ID and transaction hash
serializer
Kotlinx Serialization serializer for the data type
Throws
if chain is not registered