Sign Message

Signing a message from a chain module returns a signed message.

The account and message are the two required parameters to be passed to the chain module to sign a message, except for the NULS chains where the private_key from the account should be provided instead of the account.

import { avalanche } from 'aleph-js'

signed_message = await avalanche.sign(account, message)

Accounts connected with an Ethereum web3 provider have the ability to sign messages with the provider.

import { ethereum } from 'aleph-js'

signed_message = await ethereum.w3_sign(w3, address, message)

Last updated