1.1.1 • Published 9 months ago

@pendulum-chain/api v1.1.1

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
9 months ago

license

@pendulum-chain api

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

Getting Started

More documentation and examples on wiki

  • Install dependencies
yarn add @polkadot/api @pendulum-chain/api@beta
  • Create API instance
import { ApiPromise } from '@polkadot/api';
import { WsProvider } from '@polkadot/rpc-provider';
import { options } from '@pendulum-chain/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 Pendulum Network.
  • types
    • Polkadot.js auto-generated types for Pendulum Network.
1.1.1

9 months ago

1.0.1

1 year ago

0.3.6

2 years ago

0.3.5

2 years ago

0.3.8

2 years ago

0.3.7

2 years ago

0.3.4

2 years ago

0.3.3

2 years ago

0.3.2

2 years ago

0.3.1

2 years ago

0.2.4

2 years ago

0.2.3

2 years ago

0.2.2

2 years ago

0.2.1

2 years ago

0.1.6

2 years ago

0.1.5

2 years ago

0.1.4

2 years ago

0.1.3

2 years ago

0.1.2

2 years ago