Skip to content

HolyGrease/polkadart

 
 

Repository files navigation

Polkadart

Star on Github Test Coverage License: Apache 2.0

This library provides a clean wrapper around all the methods exposed by a Polkadot/Substrate network client and defines all the types exposed by a node, this API provides developers the ability to query a node and interact with the Polkadot or Substrate chains using Dart.

This library is funded by Web3 Foundation via their Open Grants Program

A Dart implementation of SCALE, Substrate uses a lightweight and efficient encoding and decoding program to optimize how data is sent and received over the network. The program used to serialize and deserialize data is called the SCALE codec, with SCALE being an acronym for simple concatenated aggregate little-endian.

A Dart implementation of SS58. The SS58 is the default Substrate address format, this encoded address format is based on the Bitcoin Base-58-check format, but with a few modifications specifically designed to suit Substrate-based chains. You can use other address formats for Substrate-based chains. However, the SS58 address format provides a base-58 encoded value that can identify a specific account on any Substrate chain. Because different chains can have different ways of identifying accounts, the SS58 address is designed to be extensible.

Basic format

base58encode ( concat ( <address-type>, <address>, <checksum> ) )

One of the most important things to understand about polkadart is that most interfaces are generated automatically when it connects to a running node. This is quite a departure from other APIs in projects where the interfaces are static. While sounding quite scary, it is a powerful concept that exists in both Polkadot and Substrate chains and allows the API to be used in environments where the chain is customized.

Requirements

You need to have git-lfs installed to run the tests. Download from Github

On Mac OS X:

brew install git-lfs

On Ubuntu:

sudo apt-get install git-lfs

Fetching files

To ensure the git-lfs files are fetched inside the cloned git repository. Run these commands from the root of polkadart repo.

git lfs fetch
git lfs checkout

Documentation and Tests

You can run all tests from the library by running docker compose up.

Package Path
polkadart packages/polkadart
polkadart_cli packages/polkadart_cli/
polkadart_scale_codec packages/polkadart_scale_codec/
ss58 packages/ss58/
substrate_metadata packages/substrate_metadata/

Road map and current state

✅ = Supported and mostly stable
🟡 = Partially implemented and under active development.
🔴 = Not supported yet but on-deck to be implemented soon.

Status
Scale Codec
SS58 Format
Parse Metadata v14
Substrate Metadata
RPC
Constants
Websocket Provider
Http Provider
Signed Extrinsics 🔴

Contributors

License

This repository is licensed under Apache 2.0 license

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Dart 100.0%