New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@pnsdomains/pnsjs

Package Overview
Dependencies
Maintainers
2
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pnsdomains/pnsjs

PNS javascript library for contract interaction

latest
Source
npmnpm
Version
4.0.15
Version published
Maintainers
2
Created
Source

PNSjs

The ultimate PNS javascript library, with viem under the hood.

Features

  • Super fast response times
  • Easy call batchability
  • Written in TypeScript
  • Supports the most cutting edge PNS features
  • Full tree-shaking support

Installation

Install @pnsdomains/pnsjs, alongside viem.

npm install @pnsdomains/pnsjs viem

Getting Started

The most simple way to get started is to create a public PNS client, with a supported chain and transport imported from viem. The public client has all the read functions available on it, as well as all subgraph functions.

// Import viem transport, viem chain, and PNSjs
import { http } from 'viem'
import { mainnet } from 'viem/chains'
import { createPnsPublicClient } from '@pnsdomains/pnsjs'

// Create the client
const client = createPnsPublicClient({
  chain: mainnet,
  transport: http(),
})

// Use the client
const plsAddress = client.getAddressRecord({ name: 'pns.pls' })

Docs

Docs can be found here. Full docs site coming soon.

FAQs

Package last updated on 22 Apr 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts