Skip to main content

Sign a bytes message

Sign an arbitrary piece of data. The signature can be verified through algosdk.verifyBytes.

The bytes to sign are prepended with the MX preffix.

See also: algosdk signBytes


  • The user has already shared the account to sign the data with.

Interactive Example#

In order to run this example, you need to execute connect() method.
import MyAlgoConnect from '@randlabs/myalgo-connect';

const myAlgoConnect = new MyAlgoConnect();

const data = new Uint8Array([...]);
const signer = 'MKJ...';

const signature = await myAlgoConnect.signBytes(data, signer);