Skip to main content
Version: 1.0


Before running any script with the avn-api, let's set your AvN mnemonic or secret seed generated via the accounts page. There are two ways you can set this:

export AVN_SURI=<mnemonic OR secret seed>

Your secret URI (SURI) could either be a mnemonic (seed phrase) or the secret seed (private key) of your account.


For windows users, here's a guide on how to set your environment variable.


You can export your SURI, in your CLI, in the format of any of the examples below

export AVN_SURI='flag dynamic laptop often park illegal equip curve game blame junior warm'


export AVN_SURI=0x5392ca60a61aea99fce14358798de93c1bc11c3696a905718738c71fae539c24

This does not return anything.

If no URL is passed the API will run in offline mode, exposing ONLY core utilities and can be initialised using the below:

const api = new AvnApi();
// OR
const api = new AvnApi(null, options);

It's important that you keep the mnemonic/seed secret safe and not expose it anywhere else. If this data is compromised, you could lose your funds.