Create Supra Accounts
How to create new and import existing accounts.
SupraAccount
class constructor
SupraAccount
class constructorCreate a new supra account or create one from the provided private key.
If no privateKeyBytes
parameter is provided, a new account will be generated.
Parameters
Name
Type
Optional
privateKeyBytes
Uint8Array
address
MaybeHexString
Returns SupraAccount
fromDerivePath
function
fromDerivePath
functionCreate a new SupraAccount from mnemonic.
Parameters
Name
Type
Optional
path
string
mnemonics
string
Returns SupraAccount
Example
The SupraAccount class allows you to generate new accounts, import private key, or derive from mnemonics.
Last updated