Socket
Book a DemoInstallSign in
Socket

@exo-tech-xyz/nodes-from-anchor

Package Overview
Dependencies
Maintainers
3
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@exo-tech-xyz/nodes-from-anchor

Node specifications and helpers for the Kinobi standard

0.21.3
latest
Source
npmnpm
Version published
Weekly downloads
2
Maintainers
3
Weekly downloads
 
Created
Source

Kinobi ➤ Nodes From Anchor

npm npm-downloads

This package converts Anchor IDLs from various versions into Kinobi IDLs.

Installation

pnpm install @exo-tech-xyz/nodes-from-anchor

[!NOTE] This package is not included in the main kinobi package.

Functions

rootNodeFromAnchor(anchorIdl)

This function takes a valid Anchor IDL and returns a RootNode.

// node ./kinobi.mjs
import { rootNodeFromAnchor } from '@exo-tech-xyz/nodes-from-anchor';
import { createFromRoot } from 'kinobi';
import { readFileSync } from 'node:fs';
import path from 'path';

// Read the content of your IDL file.
const anchorIdlPath = path.join(__dirname, 'target', 'idl', 'anchor_program.json');
const anchorIdl = JSON.parse(readFileSync(anchorIdlPath, 'utf-8'));

// Parse it into a Kinobi IDL.
const kinobi = createFromRoot(rootNodeFromAnchor(anchorIdl));

Keywords

solana

FAQs

Package last updated on 07 Feb 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

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.