0.1.18 • Published 5 years ago

sdagwallet.js v0.1.18

Weekly downloads
4
License
MIT
Repository
github
Last release
5 years ago

SDAGWallet.js

SDAG Wallet for Javascript Developers

Installation

npm i sdagwallet.js

Usage

Import

import Wallet from 'sdagwallet.js'

let wallet = new Wallet();

Auto configuration

wallet.autoConfigHub("mainnet"); // Using mainnet
wallet.autoConfigHub("testnet"); // Using testnet

Manual configuration

wallet.configHub("ws://10.168.3.131:6635");

Generate Mnemonic

wallet.generateMnemonic();

Login

await wallet.loginWithMnemonic(secret, password);

Keys

wallet.getAddress();
wallet.getPrivateKey(); // Extened Private Key
wallet.getPublicKey();

Getting Balance

await wallet.getBalance();

Getting History Txs

await wallet.getHistory();

Getting a Unit

await wallet.getUnit('AELe/VgaqoCJekPfVxd8huecW3g7n33ihFw1A3vVVPE=');

Sending Assets

await wallet.send({ to: 'E5UR2ISKQWT3HISO55SHQYGYTF5BLWV6', amount: 2, text: 'Hello world' });

Subscribe

wallet.onAssetMessage(msg => {});
wallet.watchAddress(addrs, msg => {});

License

GPL-3.0

0.1.18

5 years ago

0.1.17

5 years ago

0.1.16

5 years ago

0.1.15

5 years ago

0.1.13

5 years ago

0.1.12

5 years ago

0.1.11

5 years ago

0.1.10

5 years ago

0.1.9

5 years ago

0.1.6

5 years ago

0.1.5

5 years ago

0.1.4

5 years ago

0.1.3

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago