1.2.0 • Published 12 months ago

@b-stable/sdk v1.2.0

Weekly downloads
-
License
UNLICENSED
Repository
-
Last release
12 months ago

Installation

To use the B-Stable SDK, you need to install the @b-stable/sdk package and some @polkadot dependencies:

$ yarn add @b-stable/sdk @polkadot/api-augment @polkadot/api

# or

$ npm i @b-stable/sdk @polkadot/api-augment @polkadot/api

Usage

import { Tokens, getApiPromise } from '@b-stable/sdk'

const ALICE_ACCOUNT_ID = '5GNJqTPyNqANBkUVMN1LPPrxXnFouWXoe2wNSmmEoLctxiZY'

const api = await getApiPromise(endpoint)

const tokens = new Tokens(api)

// get balance of ALICE
const balance = await tokens.nativeBalance(ALICE_ACCOUNT_ID)
1.2.0

12 months ago

1.1.0

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago