Package Exports
- @nano/wallet
- @nano/wallet/latest.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@nano/wallet) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Offline Wallet
Code Rewrite in progress.
LOCAL:
<script src="/nano.js"></script>
CDN:
<script src="https://unpkg.com/@nano/wallet"></script>
NPM:
// npm install @nano/wallet
const nano = require('@nano/wallet')
DOCS IN PROGRESS
BASIC:
nano.import( nano.generate() )
console.log( await nano.accounts() )
await nano.wait({
amount: '0.001',
receive: true, // oh yeah.
// webhook: 'https://secret.stuff/post' // nice, huh
})
await nano.send({
to: [
'@fosse',
'nano_1faucet7b6xjyha7m13objpn5ubkquzd6ska8kwopzf1ecbfmn35d1zey3ys',
// ... 500 more
],
amount: nano.convert(0.0001, 'NANO', 'RAW'),
// key: 'POW_KEY'
})
await nano.send({
to: 'nano_1faucet7b6xjyha7m13objpn5ubkquzd6ska8kwopzf1ecbfmn35d1zey3ys',
amount: (await wallet.balance()).balance // or 'all'
})
// from RAM not Blockchain
nano.destroy()
License
MIT