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
πΉπΆπππΎππΎπΆ.πΏπ
SPEC
High-level darwinia.js api
Usage
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 |
reset | (block: string/number) | res: ExResult |
relay | (block: string/number) | res: ExResult |
transfer | (addr: string, amount: number) | res: ExResult |
redeem | (receipt: IReceipt) | res: ExResult |
LICENSE
GPL-3.0