XchainModel constructor Null safety
- RsaPublicKey publicKey,
- {dynamic 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, {lastBlock})
: address = Digest("SHA3-256").process(base64.decode(publicKey.encode())),
lastBlock = lastBlock ?? Uint8List(1);