23.12.29 • Published 4 months ago
@nexajs/wallet v23.12.29
NexaJS Wallet
Create a Nexa Wallet to manage your assets.
Auto-generated Wallet
import { Wallet } from '@nexajs/wallet'
const wallet = await Wallet.init()
// {
// mnemonic: 'correct horse battery staple',
// path: `m/44'/29223'/0'`,
// index: 0,
// ...
// updatedAt: 1234567890,
// }
const address = wallet.address
console.log(address)
// nexa:nqtsq5g59vw9p29wupxtnrff0u8ny2tn3j8n63j5akmsk58z
const balance = wallet.balance
console.log(balance)
// {
// confirmed: 1337,
// unconfirmed: 0,
// }
Mnemonic Wallet
import { Wallet } from '@nexajs/wallet'
const wallet = await Wallet.init('correct horse battery staple')
// {
// mnemonic: 'correct horse battery staple',
// path: `m/44'/29223'/0'`,
// index: 0,
// ...
// updatedAt: 1234567890,
// }
const address = wallet.address
console.log(address)
// nexa:nqtsq5g59vw9p29wupxtnrff0u8ny2tn3j8n63j5akmsk58z
const balance = wallet.balance
console.log(balance)
// {
// confirmed: 1337,
// unconfirmed: 0,
// }
Entropy Wallet
import { Wallet } from '@nexajs/wallet'
const wallet = await Wallet.init(0xdeadbeef)
// {
// mnemonic: 'correct horse battery staple',
// path: `m/44'/29223'/0'`,
// index: 0,
// ...
// updatedAt: 1234567890,
// }
const address = wallet.address
console.log(address)
// nexa:nqtsq5g59vw9p29wupxtnrff0u8ny2tn3j8n63j5akmsk58z
const balance = wallet.balance
console.log(balance)
// {
// confirmed: 1337,
// unconfirmed: 0,
// }
Email + Password Wallet
import { Wallet } from '@nexajs/wallet'
const wallet = await Wallet.init('satoshi@bitcoin.org', 'setecastronomy')
// {
// mnemonic: 'correct horse battery staple',
// path: `m/44'/29223'/0'`,
// index: 0,
// ...
// updatedAt: 1234567890,
// }
const address = wallet.address
console.log(address)
// nexa:nqtsq5g59vw9p29wupxtnrff0u8ny2tn3j8n63j5akmsk58z
const balance = wallet.balance
console.log(balance)
// {
// confirmed: 1337,
// unconfirmed: 0,
// }
23.12.29
4 months ago
23.12.26
4 months ago
23.12.25
4 months ago
23.12.13
5 months ago
23.11.2
6 months ago
23.10.8
7 months ago
23.11.8
6 months ago
23.10.9
7 months ago
23.10.7
7 months ago
23.10.25
6 months ago
23.9.5
8 months ago
23.11.14
6 months ago
23.10.24
7 months ago
23.9.4
8 months ago
23.10.23
7 months ago
23.8.21
9 months ago
23.10.22
7 months ago
23.11.11
6 months ago
23.10.21
7 months ago
23.7.30
9 months ago
23.10.20
7 months ago
23.8.20
9 months ago
23.8.9
9 months ago
23.7.29
9 months ago
23.10.19
7 months ago
23.7.28
9 months ago
23.10.18
7 months ago
23.7.27
9 months ago
23.7.26
9 months ago
23.10.16
7 months ago
23.7.25
10 months ago
23.10.15
7 months ago
23.10.14
7 months ago
23.10.13
7 months ago
23.10.12
7 months ago
23.10.11
7 months ago
23.8.11
9 months ago
23.8.30
8 months ago
23.5.1
1 year ago
23.5.12
12 months ago
23.5.13
12 months ago
23.5.15
12 months ago
23.5.16
12 months ago
23.5.17
12 months ago
23.4.14
1 year ago
23.4.13
1 year ago
23.4.4
1 year ago