Skip to content

polkadotjs-developer-hub/polkadot-js-recipes

Repository files navigation

Pre-requisite installation

  • Install node-js 14
  • Install npm

https://docs.npmjs.com/downloading-and-installing-node-js-and-npm

  • Install ts-node npm package globally in your system
npm install -g typescript
npm install -g ts-node

https://www.npmjs.com/package/ts-node

Running code samples

Install all the packages from package.json

npm install

Run specific examples

ts-node <filename.ts>

Connecting to blockchain network

In the file

 .env

we provide the websocket url of blockchain network in the file above