1.0.11 • Published 5 years ago

bitshares-login v1.0.11

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

Bitshares Login API

Setup

This library can be obtained through npm:

npm install bitshares-login

Usage

Import

import {BitShares} from 'bitshares-login';

Setup defaults

BitShares.init("https://openledger.io", "refcode", "referrer");

Get Account

BitSharesApi.connect("wss://bitshares.openledger.info/ws").then(() => {
      return BitSharesApi.api().account.getAccount("username").then(acc => {
        console.log(acc)
        BitSharesApi.close();
      }).catch(e => {
        throw ...
      })
    }).catch(e => console.log(e));

Register new Account

BitSharesApi.connect("wss://bitshares.openledger.info/ws").then(() => {
      return BitSharesApi.api().account.create("username", "password").then(acc => {
        console.log(acc)
        BitSharesApi.close();
      }).catch(e => {
        throw ...
      })
    }).catch(e => console.log(e));

Login

BitSharesApi.connect("wss://bitshares.openledger.info/ws").then(() => {
      return BitSharesApi.api().account.login("username", "password").then(acc => {
        console.log(acc)
        BitSharesApi.close();
      }).catch(e => {
        throw ...
      })
    }).catch(e => console.log(e));
1.0.11

5 years ago

1.0.10

5 years ago

1.0.9

5 years ago

1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago