Socket
Socket
Sign inDemoInstall

@project-serum/anchor

Package Overview
Dependencies
65
Maintainers
2
Versions
73
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @project-serum/anchor

Anchor client


Version published
Weekly downloads
104K
increased by1.62%
Maintainers
2
Install size
27.1 MB
Created
Weekly downloads
 

Changelog

Source

[0.26.0] - 2022-12-15

Features

  • cli: Add --run to anchor test for running a subset of test suites (#1828).
  • client: Add transaction functions to RequestBuilder (#1958).
  • spl: Add create_metadata_accounts_v3 and set_collection_size wrappers (#2119).
  • spl: Add MetadataAccount account deserialization. (#2014).
  • spl: Add update_primary_sale_happened_via_token wrapper (#2173).
  • spl: Add sign_metadata and remove_creator_verification wrappers (#2175).
  • spl: Add initialize_account3 and initialize_mint2 (#2265).
  • spl: Change serum-dex to openbook-dex (#2308).
  • lang: Add parsing for consts from impl blocks for IDL PDA seeds generation (#2128).
  • lang: Account closing reassigns to system program and reallocates (#2169).
  • ts: Add coders for SPL programs (#2143).
  • ts: Add has_one relations inference so accounts mapped via has_one relationships no longer need to be provided (#2160).
  • ts: Add ability to set args after setting accounts and retrieving pubkeys (#2160).
  • ts: Add .prepare() to builder pattern (#2160).
  • spl: Add freeze_delegated_account and thaw_delegated_account wrappers (#2164).
  • ts: Add feePayer check to AnchorProvider methods, so that anchor writes the provider's wallet as fee payer if fee payer isn't already set (#2186).
  • ts: Add nested PDA inference (#2194).
  • ts: Add ability to resolve missing accounts with a custom resolver (#2194).
  • ts: Update the Solana web3 library used by anchor ts to version 1.64.0 (#2220).
  • lang: Updates AccountsClose to make it safe to call manually (#2209).
  • lang: Update rust used in the repo version 1.62 (#2272).
  • cli: Allow custom cluster config (#2271).
  • ts: Add optional flag to parseLogs to throw an error on decoding failure (#2043).
  • cli: Add test.validator.geyser_plugin_config support (#2016).
  • cli: Add account subcommand to cli (#1923)
  • cli: Add ticks_per_slot option to Validator args (#1875).

Fixes

  • lang: Fix parsing for bytes literals in the IDL (#2261).
  • lang: Fix IDL seed generation for byte string literals (#2125).
  • ts: Update seeds inference to allow nested user defined structs within the seeds (#2198).
  • event: Fix multiple event listeners with the same name (#2165).
  • lang: Prevent the payer account from being initialized as a program account (#2284).
  • ts: Fixing breaking change where null or undefined wallet throws an error (#2303).
  • ts: Fixed .fetchNullable() to be robust towards accounts only holding a balance (#2301).
  • lang: Only add public enums to the IDL (#2309).
  • lang: Fix heap intensive error mapping (#2313).

Breaking

  • ts: SPL coders have been removed from the main Anchor package. (#2155)
  • lang: Remove rent from constraints (#2265).
  • spl: Remove rent from associated_token::Create (#2265).
  • lang: Add Discriminator and Owner trait implementation for structures representing instructions (#1997).
  • ts: '@coral-xyz/borsh' package is now part of the yarn monorepo (#2290). The borsh package needs to be built before the anchor package can be built but this should happen automatically when running yarn build in packages/anchor, see #2299 and #2306.
  • lang: Add support for optionally passing in accounts using the syntax Optional<Account<'info, T>>. Shouldn't affect existing programs but may be a breaking change to tools that use the anchor generated IDL. #2101.
  • ts: Switch from @project-serum/anchor to the @coral-xyz/anchor package #2318.

Readme

Source

@project-serum/anchor

npm Docs

TypeScript client for Anchor programs.

Note

  • @project-serum/anchor depends on node.js native modules. Therefore, webpack 5 will not work with current version. You will either need to rollback to webpack 4, or use a polyfill for each missing dependency.

FAQs

Last updated on 15 Dec 2022

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc