0.2.9 • Published 29 days ago

@astar-network/astar-api v0.2.9

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
29 days ago

license

@astar-network api

This library provides additional typing information for user to access Astar's modules by using polkadot.js

Getting Started

More documentation and examples on wiki

  • Install dependencies
yarn add @polkadot/api @astar-network/astar-api@beta
  • Create API instance
import { ApiPromise } from '@polkadot/api';
import { WsProvider } from '@polkadot/rpc-provider';
import { options } from '@astar-network/astar-api';

async function main() {
    const provider = new WsProvider('wss://localhost:9944');
    const api = new ApiPromise(options({ provider }));
    await api.isReady;

    // use the api
    //..
}

main()
  • Use api to interact with node
// query and display account data
const data = await api.query.system.account('5F98oWfz2r5rcRVnP9VCndg33DAAsky3iuoBSpaPUbgN9AJn');
console.log(data.toHuman())

Packages

  • api
    • Contains necessary options to create a polkadot.js API instance
  • type-definitions
    • Polkadot.js type definitions for Astar Network.
  • types
    • Polkadot.js auto-generated types for Astar Network.
0.2.9

29 days ago

0.2.8

5 months ago

0.2.7

5 months ago

0.2.6

6 months ago

0.2.5

10 months ago

0.2.4

10 months ago

0.2.3

1 year ago

0.2.2

1 year ago

0.1.14

1 year ago

0.1.15

1 year ago

0.2.1

1 year ago

0.1.16

1 year ago

0.1.17

1 year ago

0.1.19

1 year ago

0.1.13

1 year ago

0.1.10

1 year ago

0.1.12

1 year ago

0.1.9

1 year ago

0.1.8

2 years ago

0.1.5-7

2 years ago

0.1.5-4

2 years ago

0.1.5-6

2 years ago

0.1.5-5

2 years ago

0.1.5-3

2 years ago

0.1.5-2

2 years ago

0.1.5-1

2 years ago

0.1.4-13

2 years ago