createNewAddress static method
Generates a new address using NosoCore's key pair generation.
This method creates a new key pair using the NosoCore's generateKeyPair method, and then constructs an AddressObject with the generated public key, private key, and the derived address from the public key.
Returns: An AddressObject representing the newly created address.
Implementation
static AddressObject createNewAddress() {
KeyPair keyPair = NosoCore().generateKeyPair();
return AddressObject(
publicKey: keyPair.publicKey,
privateKey: keyPair.privateKey,
hash: getAddressFromPublicKey(keyPair.publicKey));
}