@medibloc/panacea-js
TypeScript icon, indicating that this package has built-in type declarations

2.2.1 • Public • Published

Panacea Javascript SDK

The panacea-js is the official Panacea Javascript SDK written in Typescript, powered by CosmJS.

The panacea-js extends the CosmJS in order to provide Panacea-specific features (AOL, DID, PNFT). So, it exposes CosmJS basic functions as they are, such as connectWithSigner and sendTokens.

Usage

Installation

yarn add @medibloc/panacea-js \
  @cosmjs/proto-signing@0.32.3 \
  @cosmjs/stargate@0.32.3 \
  cosmjs-types@0.9.0

Examples

A list of examples can be found at the example.md.

Contribution

Install dependencies and build the project.

yarn install
yarn build

To run simple unit tests,

yarn test

To run integration tests with panacea-core, start a panacea-core daemon first.

docker run --rm -d \
  -e CHAIN_ID="chain-1" \
  -e MNEMONIC="..." \
  -p 26657:26657 \
  -v $(pwd)/scripts:/root/scripts \
  --name core \
  ghcr.io/medibloc/panacea-core:v2.2.0 \
  bash /root/scripts/panacea-core/init.sh

Then, the integration tests can be run with the following environment variables.

PANACEAD_ENABLED=true \
TENDERMINT_URL="http://localhost:26657" \
CHAIN_ID="chain-1" \
MNEMONIC="..." \
yarn test

For more details, please see the CI script.

License

Apache-2.0 License

Package Sidebar

Install

npm i @medibloc/panacea-js

Homepage

medibloc.org

Weekly Downloads

16

Version

2.2.1

License

Apache-2.0

Unpacked Size

1.96 MB

Total Files

115

Last publish

Collaborators

  • medibloc