Ask for a Provider Account a read Access to its encryption publicKey. As NULS2 currently doesn't support instantiation through a provider, this method has no effect.
Decrypt a given content using a NULS2 account.
The encrypted content to decrypt.
Encrypt a content using the user's public key for a NULS2 account.
The content to encrypt.
Optional
delegateSupport: string | ECIESAccountOptional, if you want to encrypt data for another ECIESAccount (Can also be directly a public key)
The Sign method provides a way to sign a given Aleph message using a NULS2 account. The full message is not used as the payload, only fields of the BaseMessage type are.
The message's signature is based on secp256k1
package.
The Aleph message to sign, using some of its fields.
Static
addressExtract an address from a given hash.
The hash containing the address.
Optional
prefix: stringThe optional address prefix.
Static
magicCreates a hash from a message.
The message used to create the hash.
The optional message's hash prefix.
Static
publicCreates a hash from a user's public key.
The public key used to create the hash.
NULS2Account implements the Account class for the NULS2 protocol. It is used to represent a NULS2 account when publishing a message on the Aleph network.