Skip to main content
Version: 3.1.0

Generate AWT Token

Takes in the mnemonic or secret seed of an Aventus account and returns an AWT token with a valid token age.

// replace <mnemonic OR secret seed> with process.env.SURI if you have already set the environment variable
avnSdk.awtUtils.generateAwtToken( options, signer )
  • signer: The signer object can be derived by running avnSdk.signer
  • options: The initialisation options for the user.

Example Result

eyJwayI6IjB4NWUzNzkxZjhmMzNlYWY4YjJiMjhhYWM0NzJiZDc3ODJlMTc1NDEzYWZjYWQ1YjkzOWQzNzczZmU4YjljNDY3NyIsImlhdCI6IjIwMjItMDQtMTRUMDY6MTU6MzQuODE4WiIsInNpZyI6IjB4YjA3Y2IwOGYwMGIyZmFhYjhkMThmOTFkNGQ5ZDI5MDQwMWQzOGE4OWRjNTVjMTZmMTRiNWVmMWE4OWNiMmU3M2RkOTAyN2Q5OWRhODA0ZjA5M2U2ODY5NTVlZTczNWRjYWFmYjNkNDEzODg3ZWEzMTQ5NzI4ODM1MWE5MDdjODAifQ==