Development

If you want to help develop portablegabi, we would be glad to merge your pull request. But first, you need to set up a development environment for our project. For that, start with installing the following dependencies:

Make sure you set up your GOPATH directory and environment variables.

After you are done, clone the portablegabi project into the correct go path:

mkdir -p $GOPATH/src/github.com/KILTprotocol/
git clone https://github.com/KILTprotocol/portablegabi.git \
  $GOPATH/src/github.com/KILTprotocol/portablegabi
cd $GOPATH/src/github.com/KILTprotocol/portablegabi

Next, you need to install all the node dependencies, build the Portablegabi WASM and transpile the Typescript code:

yarn install
yarn build

To ensure everything went fine, you can execute any of the provided examples:

yarn ts-node docs/examples/exampleSingle.ts

You can use the Portablegabi version you have just built by running yarn link inside the Portablegabi project and yarn link @kiltprotocol/portablegabi in the project where you want to use Portablegabi.

Optional: Test with Substrate chain

If you want to test the examples with a blockchain, you will also need to install rust and Substrate. For more information about setting up a chain to be used with the Portablegabi API, see the exemplary portablegabi-node. For code examples of the Portablegabi chain API, please have a look at our chain examples.