
Research
/Security News
Weaponizing Discord for Command and Control Across npm, PyPI, and RubyGems.org
Socket researchers uncover how threat actors weaponize Discord across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.
@codama/nodes-from-anchor
Advanced tools
This package converts Anchor IDLs from various versions into Codama IDLs.
pnpm install @codama/nodes-from-anchor
[!NOTE]
- This package is not included in the main
codama
package.- If
metadata.origin
is not set on the IDL, it is assumed to be"anchor"
. If you are trying to parse a Shank IDL, be sure that origin is set to"shank"
so discriminators can be set correctly.
rootNodeFromAnchor(anchorIdl)
This function takes a valid Anchor IDL and returns a RootNode
.
// node ./codama.mjs
import { rootNodeFromAnchor } from '@codama/nodes-from-anchor';
import { createFromRoot } from 'codama';
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 Codama IDL.
const codama = createFromRoot(rootNodeFromAnchor(anchorIdl));
FAQs
Node specifications and helpers for the Codama standard
The npm package @codama/nodes-from-anchor receives a total of 5,874 weekly downloads. As such, @codama/nodes-from-anchor popularity was classified as popular.
We found that @codama/nodes-from-anchor demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Research
/Security News
Socket researchers uncover how threat actors weaponize Discord across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.
Security News
Socket now integrates with Bun 1.3’s Security Scanner API to block risky packages at install time and enforce your organization’s policies in local dev and CI.
Research
The Socket Threat Research Team is tracking weekly intrusions into the npm registry that follow a repeatable adversarial playbook used by North Korean state-sponsored actors.