GithubHelp home page GithubHelp logo

sayplaydiv / acala.js Goto Github PK

View Code? Open in Web Editor NEW

This project forked from acalanetwork/acala.js

0.0 0.0 0.0 3.45 MB

Home Page: https://developer.acala.network/

License: Apache License 2.0

JavaScript 0.17% TypeScript 99.83%

acala.js's Introduction

license npm

@acala-network

This library provides additional typing information for user to access Acala Network by using polkadot.js.

Getting Started

More documentation and examples on wiki.

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

async function main() {
    const provider = new WsProvider('wss://testnet-node-1.acala.laminar.one/ws');
    const api = new ApiPromise(options({ provider }));
    await api.isReady;

    // use 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
  • api-derive
    • Additional polkadot.js derives for Acala Network
  • app-util
    • Utilities to work with Acala Network
  • types
    • Polkadot.js type definations for Acala Network

acala.js's People

Contributors

actions-user avatar qwer951123 avatar xlc avatar ntduan avatar ermalkaleci avatar shaunxw avatar zjb0807 avatar bette7 avatar jhutchings1 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.