wirednkod / papi-intro-tutorial

A simple step-by-step guide to start with PAPI
5 stars 1 forks source link

Introduction to the new Polkadot API

Welcome to the first interactive tutorial of the new Polkadot API.

This is a guided tutorial intended to teach readers how to set up, use and interact with Substrate based chains by using the new Polkadot-API.

What is the fuss about

The new Polkadot API (PAPI) is:

While Polkadot API is a very interesting approach and way of interacting with Substrate based chains, I have found it quite challenging to twist my mindset from existing approaches (e.g. PolkadotJS) to installing and using Polkadot-API.

Having said that, after a few retries and with some help from the creators (Josep and Victor) I found myself loving, using it and adding it in existing and new projects.

What this tutorial is about

This tutorial is meant for developers who want to install Polkadot-API (or aka PAPI) in a project, add correctly some chains in the project and interact with them with various ways (web socket, smoldot etc.).

In order to address this, we will set up a simple TypeScript project with the minimum needed configuration, run the basic steps needed to "integrate"/"add" (use whatever word fits you best here), the chains we need to connect to in our project and then create some sample calls.

What this tutorial is not about

This tutorial is divided into sections, each targeting specific learning goals and offering natural pause points. All content is open source and freely accessible here.

Suggestions for improvement, comments, issues, and pull requests are welcome.

Enjoy, and I hope you find this tutorial informative and valuable!