Ethereum Solana Substrate Nuls /Nuls2
Copy // FUNCTION SIGNATURE
await ethereum .NewAccount (derivationPath ?: "m/44'/60'/0'/0/0" )
-----------------------------------------------
//EXAMPLE
import { ethereum } from 'aleph-sdk-ts'
account = await ethereum .NewAccount ()
// --> RETURNS THE OBJECT
{
account : {
address : "<address>" ,
publicKey : "<public key>" ,
wallet : < wallet object > },
mnemonic: "< mnemonic generated >"
}
Copy // FUNCTION SIGNATURE
await solana .NewAccount ()
------------------------------------------------
//EXAMPLE
import { solana } from 'aleph-sdk-ts/accounts'
account = await solana .NewAccount ()
// --> RETURNS THE OBJECT
{
account : {
address : "<address>" ,
publicKey : "<public key>" ,
wallet : < wallet object > },
privateKey: "< private key generated >"
}
Copy // FUNCTION SIGNATURE
await substrate .NewAccount ()
------------------------------------------------
//EXAMPLE
import { substrate } from 'aleph-sdk-ts/accounts'
account = await substrate .NewAccount ()
// --> RETURNS THE OBJECT
{
account : {
address : "<address>" ,
publicKey : "<public key>" ,
pair : < pair object > } ,
mnemonic : "<mnemonic generated>"
}
Copy // FUNCTION SIGNATURE
await nuls .NewAccount ({ chain_id = 1 , prefix = "" })
await nuls2 .NewAccount ({ chain_id = 1 , prefix = "NULS" })
------------------------------------------------
//EXAMPLE
import { nuls2 } from 'aleph-sdk-ts/accounts'
account = await nuls2 .NewAccount ()
// --> RETURNS THE OBJECT
{
account : {
address : "<address>" ,
publicKey : "<public key>" ,
privateKey : "<private key>" } ,
mnemonic : "<mnemonic generated>"
}
Some of the chains allow for passing extra parameters to create the blockchain account. Below you will find a table of the optional parameters.