Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@project-serum/anchor

Package Overview
Dependencies
Maintainers
5
Versions
73
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@project-serum/anchor - npm Package Versions

13
8

0.20.1

Diff

Changelog

Source

[0.20.1] - 2022-01-09

Fixes

  • lang: Improved error msgs when required programs are missing when using the init constraint(#1257)

Features

  • lang: Allow repr overrides for zero copy accounts (#1273).
armaniferrante
published 0.20.0 •

Changelog

Source

[0.20.0] - 2022-01-06

Fixes

  • lang: init_if_needed now checks rent exemption when init is not needed (#1250).
  • lang: Add missing owner check when associated_token::authority is used (#1240).
  • ts: Add type declarations for conditional workspace and Wallet exports (#1137).
  • ts: Change commitment message recent to processed and max to finalized (#1128)
  • ts: fix translateAddress which currently leads to failing browser code. Now uses PublicKey constructor instead of prototype chain constructor name checking which doesn't work in the presence of code minifying/mangling(#1138)
  • lang: add missing check that verifies that account is ATA when using init_if_needed and init is not needed(#1221)

Features

  • lang: Add programdata_address: Option<Pubkey> field to Program account. Will be populated if account is a program owned by the upgradable bpf loader (#1125)
  • lang,ts,ci,cli,docs: update solana toolchain to version 1.8.5(#1133).
  • lang: Account wrappers for non-Anchor programs no longer have to implement the serialize function because it has a default impl now. Similarly, they no longer have to implement try_deserialize which now delegates to try_deserialize_unchecked by default(#1156).
  • lang: Add set_inner method to Account<'a, T> to enable easy updates (#1177).
  • lang: Handle arrays with const as length (#968).
  • ts: Add optional commitment argument to fetch and fetchMultiple (#1171).
  • lang: Implement AsRef<T> for Account<'a, T>(#1173)
  • cli: Add anchor expand command which wraps around cargo expand (#1160)

Breaking

  • client: Client::new and Client::new_with_options now accept Rc<dyn Signer> instead of Keypair (#975).
  • lang, ts: Change error enum name and message for 'wrong program ownership' account validation (#1154).
  • lang: Change from #[repr(packed)] to #[repr(C)] for zero copy accounts (#1106).
  • lang: Account types can now be found either in the prelude module or the accounts module but not longer directly under the root. Deprecated account types are no longer imported by the prelude (#1208).
armaniferrante
published 0.19.1-beta.1 •

armaniferrante
published 0.19.0 •

Changelog

Source

[0.19.0] - 2021-12-08

Fixes

  • lang: Add deprecated attribute to ProgramAccount (#1014).
  • cli: Add version number from programs Cargo.toml into extracted IDL (#1061).
  • lang: Add deprecated attribute to Loader(#1078).
  • lang: the init_if_needed attribute now checks that given attributes (e.g. space, owner, token::authority etc.) are validated even when init is not needed (#1096).

Features

  • lang: Add ErrorCode::AccountNotInitialized error to separate the situation when the account has the wrong owner from when it does not exist (#1024).
  • lang: Called instructions now log their name by default. This can be turned off with the no-log-ix-name flag (#1057).
  • lang: ProgramData and UpgradableLoaderState can now be passed into Account as generics. see UpgradeableLoaderState. UpgradableLoaderState can also be matched on to get ProgramData, but when ProgramData is used instead, anchor does the serialization and checking that it is actually program data for you (#1095).
  • ts: Add better error msgs in the ts client if something wrong (i.e. not a pubkey or a string) is passed in as an account in an instruction accounts object (#1098).
  • ts: Add inputs postInstructions and preInstructions as a replacement for (the now deprecated) instructions (#1007).
  • ts: Add getAccountInfo helper method to account namespace/client (#1084).

Breaking

  • lang, ts: Error codes have been mapped to new numbers to allow for more errors per namespace (#1096).
armaniferrante
published 0.18.2 •

Changelog

Source

[0.18.2] - 2021-11-14

  • cli: Replace global JavaScript dependency installs with local.

Features

  • lang: Add SystemAccount<'info> account type for generic wallet addresses or accounts owned by the system program (#954)

Fixes

  • cli: fix dns in NODE_OPTIONS (#928).
  • cli: output TypeScript IDL in idl parse subcommand (#941).
  • cli: Add fields os and cpu to npm package @project-serum/anchor-cli (#976).
  • cli: Allow specify output directory for TypeScript IDL (#940).

Breaking

  • spl: Move permissioned markets into dex repository (#962).
armaniferrante
published 0.18.0 •

Changelog

Source

[0.18.0] - 2021-10-24

Features

  • cli: Add support for configuration options for solana-test-validator in Anchor.toml (#834).
  • cli: target/types directory now created on build to store a TypeScript types file for each program's IDL (#795).
  • ts: Program<T> can now be typed with an IDL type (#795).
  • lang: Add mint::freeze_authority keyword for mint initialization within #[derive(Accounts)] (#835).
  • lang: Add AccountLoader type for zero_copy accounts with support for CPI (#792).
  • lang: Add #[account(init_if_needed)] keyword for allowing one to invoke the same instruction even if the account was created already (#906).
  • lang: Add custom errors support for raw constraints (#905).
  • lang, cli, spl: Update solana toolchain to v1.8.0 (#886).
  • lang: Add custom errors support for signer, mut, has_one, owner, raw constraints and address (#905, #913).

Breaking

  • lang: Accounts marked with the #[account(signer)] constraint now enforce signer when the "cpi" feature is enabled (#849).
armaniferrante
published 0.17.1-beta.2 •

armaniferrante
published 0.17.1-beta.1 •

armaniferrante
published 0.17.0 •

Changelog

Source

[0.17.0] - 2021-10-03

Features

  • cli: Add localnet command for starting a local solana-test-validator with the workspace deployed (#820).

Breaking

  • CpiContext accounts must now be used with the accounts struct generated in the crate::cpi::accounts::* module. These structs correspond to the accounts context for each instruction, except that each field is of type AccountInfo (#824).
armaniferrante
published 0.16.2 •

Changelog

Source

[0.16.2] - 2021-09-27

Features

  • lang: Add --detach flag to anchor test (#770).
  • lang: Add associated_token keyword for initializing associated token accounts within #[derive(Accounts)] (#790).
  • cli: Allow passing through cargo flags for build command (#719).
  • cli: Allow passing through cargo flags for test, verify, and publish commands (#804).

Fixes

  • lang: Generated AccountMetas for Rust clients now properly set the isSigner field (#762).
SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc