XchainModel constructor Null safety

XchainModel(
  1. Uint8List publicKey,
  2. {Uint8List? lastBlock}
)

Builds a XchainModel from its publicKey.

The address is derived from the publicKey using the SHA3-256 hash. If the chain was not synced yet, lastBlock should be null.

Implementation

XchainModel(this.publicKey, {this.lastBlock})
    : address = base64.encode(Digest("SHA3-256").process(publicKey));