Skip to content

Latest commit

 

History

History
31 lines (19 loc) · 894 Bytes

README.md

File metadata and controls

31 lines (19 loc) · 894 Bytes

PNSjs

The PNS javascript library, with ethers.js under the hood.

DISCLAMER: This repo is currently under active development and is not ready to be used in production

Installation

Install @pnslabs/pnsjs, alongside ethers.

npm install @pnslabs/pnsjs ethers

Getting Started

All that's needed to get started is an ethers or web3 provider instance. To create a new PNS instance, you have to pass it in the PNS constructor.

import { PNS } from '@pnslabs/pnsjs';
import { ethers } from 'ethers';

let rpcUrl = 'https://mainnet.infura.io/v3/your-api-key';

const provider = new ethers.providers.JsonRpcProvider(rpcUrl);

const signer = provider.getSigner()

const PNSInstance = new PNS(signer);