Package Exports
- @darwinia/api
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 (@darwinia/api) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
@darwinia/api
SPEC
High-level darwinia.js api
Usage
yarn add @darwinia/api
import { autoAPI } from "@darwinia-network/darwinia.js";
(async () => {
const api = await autoAPI();
const balance = await api.getBalance(api.account.address);
log(balance);
})();
method | params | return |
---|---|---|
getBalance | (addr: string) | balance: string |
relay | (block: string/number) | res: ExResult |
transfer | (addr: string, amount: number) | res: ExResult |
redeem | (receipt: IReceipt) | res: ExResult |
LICENSE
GPL-3.0