PackageTrack
Sign in Get early access

anchor-derive-space

Anchor Derive macro to automatically calculate the size of a structure or an enum

1.1.2 4.8M downloads/mo #4583 most downloaded on crates.io otter-sec/anchor

What this package is like to depend on

Last release 1 months ago

26 Jun 2026

Release timing varies

gaps range from 2 weeks to 9 months

Nearly every release is documented

notes for 16 of 16 stable releases

Nothing withdrawn

no release was ever pulled

3 years old

21 releases · first in 2023

14 releases in the last 12 months

see the full history below

Release timeline

21 releases · Mar 2023 to Jun 2026
2024 2025 2026
Release Pre-release

Releases

latest 21
  1. 1.1.2 26 Jun 2026
    Release notes

    The v1.1.2 release is here.

    Check out the release notes from Anchor website or GitHub.

    For a list of notable changes with their associated PRs, see the CHANGELOG.

    Open source →
    Release notes

    Features

    Fixes

    • deps: Tighten dependencies between anchor-* crates to reduce breakage (#4726).

    Breaking

    Open source →
  2. 1.1.1 25 Jun 2026
    Release notes

    The v1.1.1 release is here.

    Check out the release notes from Anchor website or GitHub.

    For a list of notable changes with their associated PRs, see the CHANGELOG.

    Open source →
    Release notes

    Features

    • ts: Re-implement verifiedBuild using the OtterSec registry (verify.osec.io), replacing the defunct apr.dev API (#4522).
    • ts: Add decodeIdlAccountRaw (#4375).
    • cli: Add --stdout flag to the expand command (#4400).
    • client: Add versioned tx support (#4207).
    • cli: Add edition and rust-version to template (#4048)
    • lang: Add program_id verification to CPI return values (#4411).
    • cli: Resolve the target directory via cargo metadata so custom target locations (e.g. CARGO_TARGET_DIR, workspace-level overrides) work across build, test, deploy and IDL paths (#3817).
    • cli: Allow configuring IDL JSON location in workspace config (#4483).
    • lang: Derive Clone, Debug, Copy, and Default on generated client / CPI account structs and instruction args where the field types allow it (#4085).
    • cli: Support multiple named scripts in Anchor.toml and run them via anchor test --script <name> / anchor run <name> (#3999).
    • cli/idl: Add fetch-historical support to recover historical IDLs with the Anchor CLI (#3992).
    • cli: anchor init refuses to create a new Anchor workspace inside an existing Cargo workspace to avoid broken nested layouts (#4576).
    • cli: Add r as an alias to the run command (#4643).

    Fixes

    • cli: Warn instead of aborting anchor build when a program keypair and declare_id! do not match (#4705).
    • lang: Snapshot CPI return data before Return::get() validates the source program (#4624).
    • lang/syn: Remove remaining fallible IDL generation paths from clippy-denied code (#4631).
    • lang: Validate max_len arguments more strictly during space derivation (#4707).
    • ts: Remove cross-fetch dependency (#4671).
    • lang: Set anchor-lang Minimum Supported Rust Version to 1.89 (#4638).
    • lang: Migrate anchor-syn from syn 1.x to syn 2.0, allowing use of modern Rust syntax (#4523).
    • idl: Bump version to 0.1.3 (#4453).
    • lang: Avoid fatal errors in IDL building when modern Rust syntax is in use (#4520).
    • lang: Return InvalidProgramId when Migration::exit cannot persist migrated state because To::owner() does not match program_id (#4706).
    • client: Avoid panic in parse_logs_response when a program-emitted log line ends with invoke [1] (#4461).
    • cli: Correctly honor --skip-seed-phrase-validation in keygen recover (#4417).
    • ts: Fix sha256.hash() returning corrupted output by using hex encoding (#4404).
    • lang: Support module constants in max_len attribute (#3879).
    • cli: Bump cargo_toml to allow parsing resolver = "3" (#4515).
    • ts: Validate instruction args in BorshInstructionCoder.encode to reject typo'd or missing fields instead of silently ignoring them (#4560).
    • ts: Align TS camelCase conversion with Rust heck for digit-letter identifiers so generated client names match Rust identifiers (#4571).
    • cli: Warn if event-cpi instruction is unreachable with custom discriminators (#4614).
    • ts: Update engines.node to >= 20.18 (#4647).

    Breaking

    Open source →
  3. 1.1.0 25 Jun 2026
    Release notes

    The v1.1.0 release is here.

    Check out the release notes from Anchor website or GitHub.

    For a list of notable changes with their associated PRs, see the CHANGELOG.

    Open source →
  4. 1.0.3 26 Jun 2026
    Release notes

    The v1.0.3 release is here.

    Check out the release notes from Anchor website or GitHub.

    For a list of notable changes with their associated PRs, see the CHANGELOG.

    Open source →
    Release notes

    Features

    Fixes

    • deps: Tighten dependencies between anchor-* crates to reduce breakage (#4726).

    Breaking

    Open source →
  5. 1.0.2 02 May 2026
    Release notes

    The v1.0.2 release is here.

    Check out the release notes from Anchor website or GitHub.

    For a list of notable changes with their associated PRs, see the CHANGELOG.

    Open source →
    Release notes

    Features

    Fixes

    • client: Replace solana-program with solana-hash (#4468).
    • lang: Make idl build time way faster by caching CrateContext (#4325).
    • cli: Bind localnet to 127.0.0.1 by default to fix a panic in solana-test-validator version 3.1.10 (#4397).
    • cli: Fallback to a priority fee of 0 on localnet (#4259).
    • lang/syn: Fix compile error with init and a runtime seeds expression (#4495).

    Breaking

    Open source →
  6. 1.0.1 21 Apr 2026
    Release notes

    The 1.0.1 patch release is here. This release fixes an issue with handling user-provided Borsh attributes in serialization.

    For a list of notable changes with their associated PRs, see the CHANGELOG.

    Open source →
    Release notes

    Features

    Fixes

    • lang: Handle user-provided borsh attributes in derives (#4380).

    Breaking

    Open source →
  7. 1.0.0 02 Apr 2026
    Release notes

    The first stable major release is here. This version ships several new features and improvements.

    Check out the release notes from Anchor website or GitHub.

    For a list of notable changes with their associated PRs, see the CHANGELOG.

    Open source →
    Release notes

    Features

    • lang: Add Migration<'info, From, To> account type for schema migrations between account types (#4060).
    • cli: Added a check_program_id_mismatch in build time to check if the program ID in the source code matches the program ID in the keypair file (#4018). This check will be skipped during anchor test.
    • lang: Add instruction parser to declare_program! (#4118).
    • ts: Export all IDL types from the root. Users can now update dist/cjs/idl imports to import directly from @anchor-lang/core (#3948).
    • lang: Add declare_program! support with just anchor_client and not anchor_lang (#4157).
    • lang: Export Owners from prelude (#4189).
    • cli: Use surfpool by default for anchor test and anchor localnet commands (#4106).
    • lang: Optimize enums with all unit variants and empty arrays with Lazy (#4237).
    • lang: Include init_if_needed accounts in duplicate mutable account checks (#4239).
    • client: Accept FnMut for events closure (#4024).
    • client: Export all types used by the public API (#4211).
    • lang: Make common::close accept references (#4178).
    • cli/idl: Add --allow-localnet option for IDL commands; fix panic when run outside a workspace (#4252).
    • lang: Check owner on account reload (#3837).
    • lang/ts: Upgrade borsh to 1.5.7 (#4012).
    • syn: Relax seeds syntax to allow more flexible PDA seed expressions (#3813).
    • lang: Deprecate AccountInfo usage in Accounts macro with a compile-time warning (#3854).
    • cli: Update anchor init to use the multiple program template by default (#3958).
    • cli: Add hooks section to Anchor.toml for {pre,post}-{build,test,deploy} lifecycle hooks (#3862).
    • lang: Add generic program validation support to Program type allowing Program<'info> for executable-only validation (#3878).
    • cli: Added litesvm test template and made it the default option on anchor init (#4316)
    • cli: Added --install-agent-skills to automatically install Solana agent skills during anchor init (#4307)
    • avm: Added flags and version labels to explicitly handle pre-releases (avm list --pre-release, avm update --pre-release and avm install latest-pre-release). (#4335)
    • avm: Added avm self-update command and passive version check warning for out of date avm (#4338)
    • lang, cli, client: Updated solana dependencies to the latest compatible versions. Bumping CI and docker builds to use Solana CLI version 3.1.10 (#4317)

    Fixes

    • lang: Add missing Lazy bound on generics (#4240).
    • lang: Fix wrong generated error code in declare_program! (#4129).
    • idl: Fix defined types with unsupported fields not producing an error (#4088).
    • lang: Fix using non-instruction composite accounts multiple times with declare_program! (#4113).
    • lang: Fix declare_program! messing up IDL errors generation (#4126).
    • idl: Fix address constraint not resolving constants that have numbers in their identifiers (#4144).
    • lang: Fix constant nested string generation in declare_program! (#4158).
    • idl: Fix local_file method not found for proc_macro2::Span error (#4187).
    • lang: Relax duplicate mutable account constraint to only check types that serialize on exit (Account, LazyAccount, InterfaceAccount, Migration) (#4202).
    • idl: Make serde_json optional (#4296).
    • lang: Fix declare_program! instruction parser with optional accounts (#4180).
    • lang: Use original borsh derives (#4205).
    • lang: Fix unexpected account substitution in InterfaceAccount (#4139).
    • idl: Respect offset = ... in IDL generation for custom errors (#4040).
    • cli: Relax separate dependency check for solana-program (#4166).
    • lang: Enforce type and count matching between instruction handler and #[instruction(..)] args (#4000).
    • lang: Handle invalid camelCase identifiers more gracefully (#4021).
    • cli: Fix i128/u128 deserialization (#3938).
    • ts: Fix incorrect Anchor dependency version requirements (#4138).
    • lang: Omit parsers module of declare_program! during on-chain (Solana) builds (#4109).
    • docs: Fixed broken links and replaced coral-xyz github references to solana-foundation (#4320)
    • avm: Fixed handling of new Cargo.toml version location. Fixed handling of pre-release version parsing. (#4335)
    • client: Fix deadlock when having multiple websocket listeners (#4250).
    • lang: Fix incorrect deserialization for dynamically sized types when using lazy-account (#4319)
    • avm: Using a temporary installation dir on cargo install calls to prevent cargo erroring out due to existing anchor symlink in .avm/bin (4343)

    Breaking

    • cli: Remove program arch options (#4295).
    • lang: Disallow duplicate mutable accounts by default. But allows duplicate mutable accounts in instruction contexts using dup constraint (#3946).
    • cli: Remove program id arguments of idl init and idl upgrade commands (#4130).
    • lang: Rename utils module of declare_program! to parsers (#4151).
    • lang: Remove the interface-instructions feature and the #[interface] attribute (#4156).
    • cli: Remove the login command (#4182).
    • idl: Exclude external accounts (#4197).
    • idl: Remove the conflicting account names check (#4294).
    • deps: Update to Solana 3.0 (#4031).
    • idl: Remove legacy IDL instructions and integrate Program Metadata for IDL management (#3798).
    • ts: Rename TypeScript packages from @coral-xyz/anchor to @anchor-lang/core (#4141).
    • lang: Remove program account info from CPI context (#2762).
    • cli: Remove dependency on the external solana CLI; native implementations provided for balance, airdrop, address, deploy, and other commands (#4099).
    • idl: Disallow multiple #[error_code] definitions in a single program (#4300).
    • cli: Remove the [registry] section from Anchor.toml (#4299).
    • client: Make sending a tx not panic and instead return an Error when signing fails (#3865).
    • lang: Rename errors and ProgramError of declare_program! (#4347).
    • client: Remove the solana-account-decoder crate export (#4373).
    Open source →
    Release notes

    Features

    Fixes

    • client: Fix deadlock when having multiple websocket listeners (#4250).

    Breaking

    • lang: Rename errors and ProgramError of declare_program! (#4347).
    • client: Remove the solana-account-decoder crate export (#4373).
    Open source →
  8. 1.0.0-rc.5 20 Mar 2026 pre-release
    Release notes

    Features

    • lang, cli, client: Updated solana dependencies to the latest compatible versions. Bumping CI and docker builds to use Solana CLI version 3.1.10 (#4317)

    Fixes

    • lang: Fix incorrect deserialization for dynamically sized types when using lazy-account (#4319)
    • avm: Using a temporary installation dir on cargo install calls to prevent cargo erroring out due to existing anchor symlink in .avm/bin (4343)

    Breaking

    Open source →
  9. 1.0.0-rc.4 19 Mar 2026 pre-release
    Release notes

    Features

    • avm: Added flags and version labels to explicitly handle pre-releases (avm list --pre-release, avm update --pre-release and avm install latest-pre-release). (#4335)
    • avm: Added avm self-update command and passive version check warning for out of date avm (#4338)

    Fixes

    • avm: Fixed handling of new Cargo.toml version location. Fixed handling of pre-release version parsing. (#4335)

    Breaking

    Open source →
  10. 1.0.0-rc.3 18 Mar 2026 pre-release
    Release notes

    Features

    • lang: Add Migration<'info, From, To> account type for schema migrations between account types (#4060).
    • cli: Added a check_program_id_mismatch in build time to check if the program ID in the source code matches the program ID in the keypair file (#4018). This check will be skipped during anchor test.
    • lang: Add instruction parser to declare_program! (#4118).
    • ts: Export all IDL types from the root. Users can now update dist/cjs/idl imports to import directly from @anchor-lang/core (#3948).
    • lang: Add declare_program! support with just anchor_client and not anchor_lang (#4157).
    • lang: Export Owners from prelude (#4189).
    • cli: Use surfpool by default for anchor test and anchor localnet commands (#4106).
    • lang: Optimize enums with all unit variants and empty arrays with Lazy (#4237).
    • lang: Include init_if_needed accounts in duplicate mutable account checks (#4239).
    • client: Accept FnMut for events closure (#4024).
    • client: Export all types used by the public API (#4211).
    • lang: Make common::close accept references (#4178).
    • cli/idl: Add --allow-localnet option for IDL commands; fix panic when run outside a workspace (#4252).
    • lang: Check owner on account reload (#3837).
    • lang/ts: Upgrade borsh to 1.5.7 (#4012).
    • syn: Relax seeds syntax to allow more flexible PDA seed expressions (#3813).
    • lang: Deprecate AccountInfo usage in Accounts macro with a compile-time warning (#3854).
    • cli: Update anchor init to use the multiple program template by default (#3958).
    • cli: Add hooks section to Anchor.toml for {pre,post}-{build,test,deploy} lifecycle hooks (#3862).
    • lang: Add generic program validation support to Program type allowing Program<'info> for executable-only validation (#3878).
    • cli: Added litesvm test template and made it the default option on anchor init (#4316)
    • cli: Added --install-agent-skills to automatically install Solana agent skills during anchor init (#4307)

    Fixes

    • lang: Add missing Lazy bound on generics (#4240).
    • lang: Fix wrong generated error code in declare_program! (#4129).
    • idl: Fix defined types with unsupported fields not producing an error (#4088).
    • lang: Fix using non-instruction composite accounts multiple times with declare_program! (#4113).
    • lang: Fix declare_program! messing up IDL errors generation (#4126).
    • idl: Fix address constraint not resolving constants that have numbers in their identifiers (#4144).
    • lang: Fix constant nested string generation in declare_program! (#4158).
    • idl: Fix local_file method not found for proc_macro2::Span error (#4187).
    • lang: Relax duplicate mutable account constraint to only check types that serialize on exit (Account, LazyAccount, InterfaceAccount, Migration) (#4202).
    • idl: Make serde_json optional (#4296).
    • lang: Fix declare_program! instruction parser with optional accounts (#4180).
    • lang: Use original borsh derives (#4205).
    • lang: Fix unexpected account substitution in InterfaceAccount (#4139).
    • idl: Respect offset = ... in IDL generation for custom errors (#4040).
    • cli: Relax separate dependency check for solana-program (#4166).
    • lang: Enforce type and count matching between instruction handler and #[instruction(..)] args (#4000).
    • lang: Handle invalid camelCase identifiers more gracefully (#4021).
    • cli: Fix i128/u128 deserialization (#3938).
    • ts: Fix incorrect Anchor dependency version requirements (#4138).
    • lang: Omit parsers module of declare_program! during on-chain (Solana) builds (#4109).
    • docs: Fixed broken links and replaced coral-xyz github references to solana-foundation (#4320)

    Breaking

    • cli: Remove program arch options (#4295).
    • lang: Disallow duplicate mutable accounts by default. But allows duplicate mutable accounts in instruction contexts using dup constraint (#3946).
    • cli: Remove program id arguments of idl init and idl upgrade commands (#4130).
    • lang: Rename utils module of declare_program! to parsers (#4151).
    • lang: Remove the interface-instructions feature and the #[interface] attribute (#4156).
    • cli: Remove the login command (#4182).
    • idl: Exclude external accounts (#4197).
    • idl: Remove the conflicting account names check (#4294).
    • deps: Update to Solana 3.0 (#4031).
    • idl: Remove legacy IDL instructions and integrate Program Metadata for IDL management (#3798).
    • ts: Rename TypeScript packages from @coral-xyz/anchor to @anchor-lang/anchor (#4141).
    • lang: Remove program account info from CPI context (#2762).
    • cli: Remove dependency on the external solana CLI; native implementations provided for balance, airdrop, address, deploy, and other commands (#4099).
    • idl: Disallow multiple #[error_code] definitions in a single program (#4300).
    • cli: Remove the [registry] section from Anchor.toml (#4299).
    • client: Make sending a tx not panic and instead return an Error when signing fails (#3865).
    • idl: Disallow multiple error definitions (#4300).
    Open source →
  11. 1.0.0-rc.2 10 Jan 2026 pre-release

    Nothing published for this version

  12. 1.0.0-rc.1 12 Dec 2025 pre-release

    Nothing published for this version

  13. 0.32.1 10 Oct 2025
    Release notes

    Features

    Fixes

    • lang: Fix deprecation warnings on alloc and add solana-program to prelude (#3975).
    • cli: Fix race condition that could happen when deploying a program (#3976).

    Breaking

    Open source →
    Release notes

    Fixes

    • lang: Fix deprecation warnings on alloc and add solana-program to prelude (#3975).
    • cli: Fix race condition that could happen when deploying a program (#3976).
    Open source →
  14. 0.32.0 09 Oct 2025
    Release notes

    Features

    • lang: Add #[error] attribute to declare_program! (#3757).
    • cli: Replace anchor verify to use solana-verify under the hood, adding automatic installation via AVM, local path support, and future-proof argument passing (#3768).
    • lang: Replace solana-program crate with smaller crates (#3819).
    • cli: Make anchor deploy to upload the IDL to the cluster by default unless --no-idl is passed (#3863).
    • lang: Use solana-invoke instead of solana_cpi::invoke (#3900).
    • client: remove solana-client from anchor-client and cli (#3877).
    • idl: Build IDL on stable Rustc (#3842).
    • lang: Add custom error when using init on SystemAccount (#3828).
    • ts: Add support for Bun as a package manager (#3586).
    • lang: Add support for tuple types in space calculation (#3744).
    • lang: Add missing pubkey const generation (#3677).
    • cli: Add the Minimum Supported Rust Version (MSRV) to the Rust template, since an arbitrary compiler version isn't supported (#3873).
    • lang: Update mollusk test template dependencies to ~0.4 and remove redundant solana-program dev-dependency from generated template (#3790).

    Fixes

    • docker: Upgrade node to 20.18.0 LTS (#3687).
    • cli: Fix using deprecated commitment recent in migration scripts (#3725).
    • cli: Fix not respecting provider.cluster in keys sync command (#3761).
    • lang: Fix deprecated realloc, store_current_index and clippy warnings (#3819).
    • avm: fix AVM instability with solana-verify (#3867).
    • avm: update AVM to only use non-draft releases(#3931).
    • lang: update bytemuck (#3858).
    • idl: disable Locale in camelCase (#3845).
    • ts: Remove event parsing panic (#3657).
    • avm: Expose anchor on PATH via $CARGO_HOME/bin symlink (#3835).

    Breaking

    • spl: Update SPL dependencies to latest compatible versions (#3860).
    • cli: Replace anchor verify to use solana-verify under the hood, adding automatic installation via AVM, local path support, and future-proof argument passing (#3768).
    • cli: Upload IDL by default with an option to skip (#3863).
    • lang: remove Solang (#3824).
    • cli: remove anchor publish command (#3795).
    Open source →
    Release notes

    Features

    • lang: Add #[error] attribute to declare_program! (#3757).
    • cli: Replace anchor verify to use solana-verify under the hood, adding automatic installation via AVM, local path support, and future-proof argument passing (#3768).
    • lang: Replace solana-program crate with smaller crates (#3819).
    • cli: Make anchor deploy to upload the IDL to the cluster by default unless --no-idl is passed (#3863).
    • lang: Use solana-invoke instead of solana_cpi::invoke (#3900).
    • client: remove solana-client from anchor-client and cli (#3877).
    • idl: Build IDL on stable Rustc (#3842).
    • lang: Add custom error when using init on SystemAccount (#3828).
    • ts: Add support for Bun as a package manager (#3586).
    • lang: Add support for tuple types in space calculation (#3744).
    • lang: Add missing pubkey const generation (#3677).
    • cli: Add the Minimum Supported Rust Version (MSRV) to the Rust template, since an arbitrary compiler version isn't supported (#3873).
    • lang: Update mollusk test template dependencies to ~0.4 and remove redundant solana-program dev-dependency from generated template (#3790).

    Fixes

    • docker: Upgrade node to 20.18.0 LTS (#3687).
    • cli: Fix using deprecated commitment recent in migration scripts (#3725).
    • cli: Fix not respecting provider.cluster in keys sync command (#3761).
    • lang: Fix deprecated realloc, store_current_index and clippy warnings (#3819).
    • avm: fix AVM instability with solana-verify (#3867).
    • avm: update AVM to only use non-draft releases(#3931).
    • lang: update bytemuck (#3858).
    • idl: disable Locale in camelCase (#3845).
    • ts: Remove event parsing panic (#3657).
    • avm: Expose anchor on PATH via $CARGO_HOME/bin symlink (#3835).

    Breaking

    • spl: Update SPL dependencies to latest compatible versions (#3860).
    • cli: Replace anchor verify to use solana-verify under the hood, adding automatic installation via AVM, local path support, and future-proof argument passing (#3768).
    • cli: Upload IDL by default with an option to skip ((#3863)[https://github.com/solana-foundation/anchor/pull/3863]).
    • lang: remove Solang (#3824).
    • cli: remove anchor publish command (#3795).
    Open source →
    Release notes

    Features

    • lang: Add #[error] attribute to declare_program! (#3757).
    • cli: Replace anchor verify to use solana-verify under the hood, adding automatic installation via AVM, local path support, and future-proof argument passing (#3768).
    • lang: Replace solana-program crate with smaller crates (#3819).
    • cli: Make anchor deploy to upload the IDL to the cluster by default unless --no-idl is passed (#3863).
    • lang: Use solana-invoke instead of solana_cpi::invoke (#3900).
    • client: remove solana-client from anchor-client and cli (#3877).
    • idl: Build IDL on stable Rustc (#3842).
    • lang: Add custom error when using init on SystemAccount (#3828).
    • lang: Add errors to declare_program (#3757).
    • ts: Add support for Bun as a package manager (#3586).
    • lang: Add support for tuple types in space calculation (#3744).
    • lang: Add missing pubkey const generation (#3677).
    • cli: Add the Minimum Supported Rust Version (MSRV) to the Rust template, since an arbitrary compiler version isn't supported (#3873).

    Fixes

    • docker: Upgrade node to 20.18.0 LTS (#3687).
    • cli: Fix using deprecated commitment recent in migration scripts (#3725).
    • cli: Fix not respecting provider.cluster in keys sync command (#3761).
    • lang: Fix deprecated realloc, store_current_index and clippy warnings (#3819).
    • avm: fix AVM instability with solana-verify (#3867).
    • avm: update AVM to only use non-draft releases(#3931).
    • lang: update bytemuck (#3858).
    • idl: disable Locale in camelCase (#3845).
    • ts: Remove event parsing panic (#3657).

    Breaking

    • spl: Update SPL dependencies to latest compatible versions (#3860).
    • cli: Replace anchor verify to use solana-verify under the hood, adding automatic installation via AVM, local path support, and future-proof argument passing (#3768).
    • cli: Upload IDL by default with an option to skip ((#3863)[https://github.com/solana-foundation/anchor/pull/3863]).
    • lang: remove Solang (#3824).
    • cli: remove anchor publish command (#3795).
    Open source →
  15. 0.31.1 20 Apr 2025
    Release notes

    This release uses a new docker image found at solanafoundation/anchor for the anchor verify command. New images will be pushed to this organization in the future.

    Releases for anchor will also be published under the solanafoundation Github organization from now on.

    Features

    • cli, docker: Replace backpackapp/build Docker image with solanafoundation/anchor (#3619).
    • ts: Make Provider require publicKey instead of wallet in accounts resolver (#3613)

    Fixes

    • idl: Update proc-macro2 usage for latest nightly (#3663)
    • ts: Fix parsing IDL with multiple const generics (#3665)

    Breaking

    Open source →
    Release notes

    Features

    • cli, docker: Replace backpackapp/build Docker image with solanafoundation/anchor (#3619).
    • ts: Make Provider require publicKey instead of wallet in accounts resolver (#3613)

    Fixes

    • idl: Update proc-macro2 usage for latest nightly (#3663)
    • ts: Fix parsing IDL with multiple const generics (#3665)

    Breaking

    Open source →
  16. 0.31.0 09 Mar 2025
    Release notes

    Features

    • client: Make solana_account_decoder dep public in anchor client (#3455).
    • ts: Add optional options.blockhash to Provider.sendAndConfirm (#3070).
    • ts: Add optional commitment parameter to Program.addEventListener (#3052).
    • cli, idl: Pass cargo args to IDL generation when building program or IDL (#3059).
    • cli: Add checks for incorrect usage of idl-build feature (#3061).
    • lang: Export Discriminator trait from prelude (#3075).
    • lang: Add Account utility type to get accounts from bytes (#3091).
    • client: Add option to pass in mock rpc client when using anchor_client (#3053).
    • lang: Get discriminator length dynamically (#3101).
    • lang: Add non-8-byte discriminator support in declare_program! (#3103).
    • client: Make ThreadSafeSigner trait public (#3107).
    • lang: Update dispatch function to support dynamic discriminators (#3104).
    • lang: Remove the fallback function shortcut in try_entry function (#3109).
    • ts: Get discriminator lengths dynamically (#3120).
    • client: Support non-8-byte discriminators (#3125).
    • spl: Add withdraw_withheld_tokens_from_accounts instruction (#3128).
    • ts: Add optional wallet property to the Provider interface (#3130).
    • cli: Warn if anchor-spl/idl-build is missing (#3133).
    • client: Add internal_rpc method for mock feature (#3135).
    • lang: Add #[instruction] attribute proc-macro to override default instruction discriminators (#3137).
    • lang: Use associated discriminator constants instead of hardcoding in #[account] (#3144).
    • lang: Add discriminator argument to #[account] attribute (#3149).
    • lang: Add discriminator argument to #[event] attribute (#3152).
    • idl: Check ambiguous discriminators (#3157).
    • idl: Disallow all zero account discriminators (#3159).
    • cli: Support non-8-byte discriminators (#3165).
    • idl: Disallow empty discriminators (#3166).
    • cli: Add --no-idl option to the test command (#3175).
    • spl: Add burn_checked, mint_to_checked and approve_checked instructions (#3186).
    • cli: Migrate to agave-install when solana_version is >= 1.18.19 (#3185).
    • idl: Add IdlBuilder (#3188).
    • cli: Make clean command also remove the .anchor directory (#3192).
    • lang: Deprecate #[interface] attribute (#3195).
    • ts: Include unresolved accounts in the resolution error message (#3207).
    • lang: Add LazyAccount (#3194).
    • avm: Ask whether to install if the version is not installed with the use command (#3230).
    • cli: Warn if a manifest has solana-program dependency (#3250).
    • cli: Add completions command to generate shell completions via the clap_complete crate (#3251).
    • cli: Always convert IDLs (#3265).
    • cli: Check whether the idl-build feature exists when using the idl build command (#3273).
    • cli: Build IDL if there is only one program when using the idl build command (#3275).
    • cli: Add short alias for the idl build command (#3283).
    • cli: Add --program-id option to idl convert command (#3309).
    • lang: Generate documentation of constants in declare_program! (#3311).
    • cli: Add support for fetching legacy IDLs (#3324).
    • avm: Add short alias for install and list commands (#3326).
    • avm: Add Windows support for renaming anchor binary (#3325).
    • cli: Add optional package-manager flag in init command to set package manager field in Anchor.toml (#3328).
    • cli: Add test template for Mollusk (#3352).
    • idl: Disallow account discriminators that can conflict with the zero constraint (#3365).
    • cli: Include recommended solana args by default and add new --max-retries option to the deploy command (#3354).
    • avm: Make installation download binaries by default (#3445).
    • idl: Support PDA resolution of call expressions that don't have any arguments (#3485).
    • spl: Add anchor-debug feature (#3511).
    • avm: Always install commit hash inputs from source (#3461).

    Fixes

    • idl: Make safety comment checks fail silently when program path env is not set (#3045).
    • idl: Avoid interference from rust tests during IDL generation (#3058).
    • lang: Fix align repr support in declare-program! (#3056).
    • lang: Make stack frames slimmer on ATA creation (#3065).
    • lang: Remove getrandom dependency (#3072).
    • lang: Make InitSpace support unnamed & unit structs (#3084).
    • lang: Fix using owner constraint with Boxed accounts (#3087).
    • lang: Add a sanity check for unimplemented token extensions (#3090).
    • cli: Skip IDL checks if --no-idl option is passed (#3093).
    • lang: Fix compilation error when an #[account] struct has generics (#3148).
    • lang: Remove unnecessary clone in account exit routine (#3139).
    • cli: Fix installation with --locked argument using Rust v1.80 due to time crate issue (#3143).
    • lang: Fix compilation warnings due to unused deprecated program id macros (#3170).
    • ts: Remove crypto-hash dependency (#3171).
    • ts: Improve error message of unsupported view method (#3177).
    • idl: Fix panicking on tests (#3197).
    • lang: Remove arrayref dependency (#3201).
    • cli: Fix template code shouldn't escape (#3210).
    • idl: Fix using address constraint with non-const expressions (#3216).
    • idl: Fix using full path types with Program (#3228).
    • lang: Use closures for init constraints to reduce the stack usage of try_accounts (#2939).
    • lang: Allow the cfg attribute above the instructions (#2339).
    • idl: Log output with ANCHOR_LOG on failure and improve build error message (#3284).
    • lang: Fix constant bytes declarations when using declare_program! (#3287).
    • lang: Fix using non-instruction composite accounts with declare_program! (#3290).
    • idl: Fix instructions with tuple parameters not producing an error(#3294).
    • ts: Update engines.node to >= 17 (#3301).
    • cli: Use OS-agnostic paths (#3307).
    • avm: Use rustc 1.79.0 when installing versions older than v0.31 (#3315).
    • cli: Fix priority fee calculation causing panic on localnet (#3318).
    • cli: Fix shell command failing due to outdated program initialization (#3351).
    • idl: Fix detecting false-positives from doc comments during module path conversion (#3359).
    • cli: Remove passing the rent sysvar account to IDL instructions (#3372).
    • lang: Fix cpi feature instructions not accounting for discriminator overrides (#3376).
    • idl: Ignore compiler warnings during builds (#3396).
    • cli: Avoid extra IDL generation during verify (#3398).
    • lang: Require zero accounts to be unique (#3409).
    • lang: Deduplicate zero accounts against init accounts (#3422).
    • cli: Fix custom provider.cluster (#3428).
    • cli: Ignore non semver solana/agave releases to avoid panic (#3432).
    • ts: Fix loading programs with numbers in their names using workspace (#3450).
    • lang: Remove a potential panic while getting the IDL in declare_program! (#3458).
    • cli: Fix altering user-provided lib names (#3467).
    • idl: Fix missing program::seed resolution (#3474).
    • lang: Fix adding derives and reprs to type alias definitions in declare_program! (#3504).
    • idl: Fix using constant identifiers as generic arguments (#3522).
    • client: Remove std::process::exit usage (#3544).
    • idl: Fix using Pubkey constants with seeds::program (#3559).
    • lang: Fix instructions with no accounts causing compilation errors when using declare_program! (#3567).
    • idl: Fix using account or arg values for seeds::program (#3570).
    • lang: Fix using data as an instruction parameter name in declare_program! (#3574).
    • cli: Use camelCase for program name in anchor.workspace templates (#3581).
    • cli: Fix the default JS update command being incorrect (#3337).
    • cli: Remove stripping workspace prefix from program id of the upgrade command (#3345).
    • cli: Convert package managers to lowercase during serialization (#3531).

    Breaking

    • syn: Remove bpf target support in hash feature (#3078).
    • client: Add tokio support to RequestBuilder with async feature (#3057).
    • lang: Remove EventData trait (#3083).
    • client: Remove async_rpc method (#3053).
    • lang: Make discriminator type unsized (#3098).
    • lang: Require Discriminator trait impl when using the zero constraint (#3118).
    • ts: Remove DISCRIMINATOR_SIZE constant (#3120).
    • lang: #[account] attribute arguments no longer parses identifiers as namespaces (#3140).
    • spl: Rename metadata interface instruction fields from token_program_id to program_id (#3076).
    • lang, ts: Remove "8 byte" requirement from discriminator error messages (#3161).
    • lang: Remove discriminator method from Discriminator trait (#3163).
    • docker: Upgrade node to 20.16.0 LTS (#3179).
    • ts: Change the Program constructor's idl parameter type to any (#3181).
    • lang, spl: Remove borsh 0.9 support (#3199).
    • ts: Upgrade typescript to 5.5.4 and remove the generic parameters of SimulateResponse (#3221).
    • ts: Remove StateCoder(#3224).
    • cli: Accept integers for warp_slot (#3235).
    • lang: Remove EventIndex (#3244).
    • spl: Remove dex feature (#3257).
    • client, lang, spl: Upgrade Solana to v2 and SPL to the latest (#3219).
    • cli: Install Solana from anza.xyz domain in Docker verifiable builds (#3271).
    • spl: Upgrade SPL deps to latest (#3346).
    • cli: Upgrade typescript version of templates to v5 (#3480).
    • ts: Remove snake-case dependency (#3507).
    • deps: Upgrade Solana to 2.1.0 (#3339).
    • spl: Update mpl-token-metadata version requirement to 5 (#3356).
    Open source →
    Release notes

    Features

    • client: Make solana_account_decoder dep public in anchor client (#3455).
    • ts: Add optional options.blockhash to Provider.sendAndConfirm (#3070).
    • ts: Add optional commitment parameter to Program.addEventListener (#3052).
    • cli, idl: Pass cargo args to IDL generation when building program or IDL (#3059).
    • cli: Add checks for incorrect usage of idl-build feature (#3061).
    • lang: Export Discriminator trait from prelude (#3075).
    • lang: Add Account utility type to get accounts from bytes (#3091).
    • client: Add option to pass in mock rpc client when using anchor_client (#3053).
    • lang: Get discriminator length dynamically (#3101).
    • lang: Add non-8-byte discriminator support in declare_program! (#3103).
    • client: Make ThreadSafeSigner trait public (#3107).
    • lang: Update dispatch function to support dynamic discriminators (#3104).
    • lang: Remove the fallback function shortcut in try_entry function (#3109).
    • ts: Get discriminator lengths dynamically (#3120).
    • client: Support non-8-byte discriminators (#3125).
    • spl: Add withdraw_withheld_tokens_from_accounts instruction (#3128).
    • ts: Add optional wallet property to the Provider interface (#3130).
    • cli: Warn if anchor-spl/idl-build is missing (#3133).
    • client: Add internal_rpc method for mock feature (#3135).
    • lang: Add #[instruction] attribute proc-macro to override default instruction discriminators (#3137).
    • lang: Use associated discriminator constants instead of hardcoding in #[account] (#3144).
    • lang: Add discriminator argument to #[account] attribute (#3149).
    • lang: Add discriminator argument to #[event] attribute (#3152).
    • idl: Check ambiguous discriminators (#3157).
    • idl: Disallow all zero account discriminators (#3159).
    • cli: Support non-8-byte discriminators (#3165).
    • idl: Disallow empty discriminators (#3166).
    • cli: Add --no-idl option to the test command (#3175).
    • spl: Add burn_checked, mint_to_checked and approve_checked instructions (#3186).
    • cli: Migrate to agave-install when solana_version is >= 1.18.19 (#3185).
    • idl: Add IdlBuilder (#3188).
    • cli: Make clean command also remove the .anchor directory (#3192).
    • lang: Deprecate #[interface] attribute (#3195).
    • ts: Include unresolved accounts in the resolution error message (#3207).
    • lang: Add LazyAccount (#3194).
    • avm: Ask whether to install if the version is not installed with the use command (#3230).
    • cli: Warn if a manifest has solana-program dependency (#3250).
    • cli: Add completions command to generate shell completions via the clap_complete crate (#3251).
    • cli: Always convert IDLs (#3265).
    • cli: Check whether the idl-build feature exists when using the idl build command (#3273).
    • cli: Build IDL if there is only one program when using the idl build command (#3275).
    • cli: Add short alias for the idl build command (#3283).
    • cli: Add --program-id option to idl convert command (#3309).
    • lang: Generate documentation of constants in declare_program! (#3311).
    • cli: Add support for fetching legacy IDLs (#3324).
    • avm: Add short alias for install and list commands (#3326).
    • avm: Add Windows support for renaming anchor binary (#3325).
    • cli: Add optional package-manager flag in init command to set package manager field in Anchor.toml (#3328).
    • cli: Add test template for Mollusk (#3352).
    • idl: Disallow account discriminators that can conflict with the zero constraint (#3365).
    • cli: Include recommended solana args by default and add new --max-retries option to the deploy command (#3354).
    • avm: Make installation download binaries by default (#3445).
    • idl: Support PDA resolution of call expressions that don't have any arguments (#3485).
    • spl: Add anchor-debug feature (#3511).

    Fixes

    • idl: Make safety comment checks fail silently when program path env is not set (#3045).
    • idl: Avoid interference from rust tests during IDL generation (#3058).
    • lang: Fix align repr support in declare-program! (#3056).
    • lang: Make stack frames slimmer on ATA creation (#3065).
    • lang: Remove getrandom dependency (#3072).
    • lang: Make InitSpace support unnamed & unit structs (#3084).
    • lang: Fix using owner constraint with Boxed accounts (#3087).
    • lang: Add a sanity check for unimplemented token extensions (#3090).
    • cli: Skip IDL checks if --no-idl option is passed (#3093).
    • lang: Remove unnecessary clone in account exit routine (#3139).
    • cli: Fix installation with --locked argument using Rust v1.80 due to time crate issue (#3143).
    • lang: Fix compilation warnings due to unused deprecated program id macros (#3170).
    • ts: Remove crypto-hash dependency (#3171).
    • ts: Improve error message of unsupported view method (#3177).
    • idl: Fix panicking on tests (#3197).
    • lang: Remove arrayref dependency (#3201).
    • cli: Fix template code shouldn't escape (#3210).
    • idl: Fix using address constraint with non-const expressions (#3216).
    • idl: Fix using full path types with Program (#3228).
    • lang: Use closures for init constraints to reduce the stack usage of try_accounts (#2939).
    • lang: Allow the cfg attribute above the instructions (#2339).
    • idl: Log output with ANCHOR_LOG on failure and improve build error message (#3284).
    • lang: Fix constant bytes declarations when using declare_program! (#3287).
    • lang: Fix using non-instruction composite accounts with declare_program! (#3290).
    • idl: Fix instructions with tuple parameters not producing an error(#3294).
    • ts: Update engines.node to >= 17 (#3301).
    • cli: Use OS-agnostic paths (#3307).
    • avm: Use rustc 1.79.0 when installing versions older than v0.31 (#3315).
    • cli: Fix priority fee calculation causing panic on localnet (#3318).
    • cli: Fix shell command failing due to outdated program initialization (#3351).
    • idl: Fix detecting false-positives from doc comments during module path conversion (#3359).
    • cli: Remove passing the rent sysvar account to IDL instructions (#3372).
    • lang: Fix cpi feature instructions not accounting for discriminator overrides (#3376).
    • idl: Ignore compiler warnings during builds (#3396).
    • cli: Avoid extra IDL generation during verify (#3398).
    • lang: Require zero accounts to be unique (#3409).
    • lang: Deduplicate zero accounts against init accounts (#3422).
    • cli: Fix custom provider.cluster (#3428).
    • cli: Ignore non semver solana/agave releases to avoid panic (#3432).
    • ts: Fix loading programs with numbers in their names using workspace (#3450).
    • lang: Remove a potential panic while getting the IDL in declare_program! (#3458).
    • cli: Fix altering user-provided lib names (#3467).
    • idl: Fix missing program::seed resolution (#3474).
    • lang: Fix adding derives and reprs to type alias definitions in declare_program! (#3504).
    • idl: Fix using constant identifiers as generic arguments (#3522).
    • client: Remove std::process::exit usage (#3544).
    • idl: Fix using Pubkey constants with seeds::program (#3559).
    • lang: Fix instructions with no accounts causing compilation errors when using declare_program! (#3567).
    • idl: Fix using account or arg values for seeds::program (#3570).
    • lang: Fix using data as an instruction parameter name in declare_program! (#3574).
    • cli: Use camelCase for program name in anchor.workspace templates (#3581).

    Breaking

    • syn: Remove bpf target support in hash feature (#3078).
    • client: Add tokio support to RequestBuilder with async feature (#3057).
    • lang: Remove EventData trait (#3083).
    • client: Remove async_rpc method (#3053).
    • lang: Make discriminator type unsized (#3098).
    • lang: Require Discriminator trait impl when using the zero constraint (#3118).
    • ts: Remove DISCRIMINATOR_SIZE constant (#3120).
    • lang: #[account] attribute arguments no longer parses identifiers as namespaces (#3140).
    • spl: Rename metadata interface instruction fields from token_program_id to program_id (#3076).
    • lang, ts: Remove "8 byte" requirement from discriminator error messages (#3161).
    • lang: Remove discriminator method from Discriminator trait (#3163).
    • docker: Upgrade node to 20.16.0 LTS (#3179).
    • ts: Change the Program constructor's idl parameter type to any (#3181).
    • lang, spl: Remove borsh 0.9 support (#3199).
    • ts: Upgrade typescript to 5.5.4 and remove the generic parameters of SimulateResponse (#3221).
    • ts: Remove StateCoder(#3224).
    • cli: Accept integers for warp_slot (#3235).
    • lang: Remove EventIndex (#3244).
    • spl: Remove dex feature (#3257).
    • client, lang, spl: Upgrade Solana to v2 and SPL to the latest (#3219).
    • cli: Install Solana from anza.xyz domain in Docker verifiable builds (#3271).
    • spl: Upgrade SPL deps to latest (#3346).
    • cli: Upgrade typescript version of templates to v5 (#3480).
    • ts: Remove snake-case dependency (#3507).
    Open source →
  17. 0.30.1 20 Jun 2024
    Release notes

    Features

    • idl: Allow overriding the idl build toolchain with the RUSTUP_TOOLCHAIN environment variable (#2941).
    • avm: Support customizing the installation location using AVM_HOME environment variable (#2917).
    • avm: Optimize avm list when GitHub API rate limits are reached (#2962)
    • idl, ts: Add accounts resolution for associated token accounts (#2927).
    • cli: Add --no-install option to the init command (#2945).
    • lang: Implement TryFromIntError for Error to be able to propagate integer conversion errors (#2950).
    • idl: Add ability to convert legacy IDLs (#2986).
    • ts: Extract Anchor error codes into their own package (#2983).
    • cli: Add additional solana arguments to the upgrade command (#2998).
    • spl: Export spl-associated-token-account crate (#2999).
    • lang: Support legacy IDLs with declare_program! (#2997).
    • cli: Add idl convert command (#3009).
    • cli: Add idl type command (#3017).
    • lang: Add anchor_lang::pubkey macro for declaring Pubkey const values (#3021).
    • cli: Sync program ids on the initial build (#3023).
    • idl: Remove anchor-syn dependency (#3030).
    • lang: Add const of program ID to declare_id! and declare_program! (#3019).
    • idl: Add separate spec crate (#3036).
    • lang: Include pubkey! macro in prelude (#3026).
    • cli: Print total steps in IDL buffer writes (#2944).

    Fixes

    • lang: Eliminate variable allocations that build up stack space for token extension code generation (#2913).
    • ts: Fix incorrect maxSupportedTransactionVersion in AnchorProvider.send*() methods (#2922).
    • cli: Use npm's configured default license for new projects made with anchor init (#2929).
    • cli: add filename to 'Unable to read keypair file' errors (#2932).
    • idl: Fix path resolution of the Cargo.lock of the project when generating idls for external types (#2946).
    • idl: Fix potential panic on external type resolution (#2954).
    • lang: Fix using defined types in instruction parameters with declare_program! (#2959).
    • lang: Fix using const generics with declare_program! (#2965).
    • lang: Fix using Vec<u8> type with declare_program! (#2966).
    • lang: Fix ProgramError::ArithmeticOverflow not found error (#2975).
    • lang: Fix using optional accounts with declare_program! (#2967).
    • lang: Fix instruction return type generation with declare_program! (#2977).
    • cli: Fix IDL write getting corrupted from retries (#2964).
    • idl: Fix unexpected_cfgs build warning (#2992).
    • lang: Make tuple struct fields public in declare_program! (#2994).
    • Remove rust-version from crate manifests (#3000).
    • cli: Fix upgradeable program clones (#3010).
    • ts: Fix using IDLs that have defined types as generic arguments (#3016).
    • idl: Fix generation with unsupported expressions (#3033).
    • idl: Fix using address constraint with field expressions (#3034).
    • lang: Fix using bytemuckunsafe account serialization with declare_program! (#3037).
    • ts: Upgrade @babel/traverse to 7.24.1 (#2919).

    Breaking

    • deps: Upgrade Solana to 1.18.17 (#3039).
    Open source →
    Release notes

    Features

    • idl: Allow overriding the idl build toolchain with the RUSTUP_TOOLCHAIN environment variable (#2941).
    • avm: Support customizing the installation location using AVM_HOME environment variable (#2917).
    • avm: Optimize avm list when GitHub API rate limits are reached (#2962)
    • idl, ts: Add accounts resolution for associated token accounts (#2927).
    • cli: Add --no-install option to the init command (#2945).
    • lang: Implement TryFromIntError for Error to be able to propagate integer conversion errors (#2950).
    • idl: Add ability to convert legacy IDLs (#2986).
    • ts: Extract Anchor error codes into their own package (#2983).
    • cli: Add additional solana arguments to the upgrade command (#2998).
    • spl: Export spl-associated-token-account crate (#2999).
    • lang: Support legacy IDLs with declare_program! (#2997).
    • cli: Add idl convert command (#3009).
    • cli: Add idl type command (#3017).
    • lang: Add anchor_lang::pubkey macro for declaring Pubkey const values (#3021).
    • cli: Sync program ids on the initial build (#3023).
    • idl: Remove anchor-syn dependency (#3030).
    • lang: Add const of program ID to declare_id! and declare_program! (#3019).
    • idl: Add separate spec crate (#3036).

    Fixes

    • lang: Eliminate variable allocations that build up stack space for token extension code generation (#2913).
    • ts: Fix incorrect maxSupportedTransactionVersion in AnchorProvider.send*() methods (#2922).
    • cli: Use npm's configured default license for new projects made with anchor init (#2929).
    • cli: add filename to 'Unable to read keypair file' errors (#2932).
    • idl: Fix path resolution of the Cargo.lock of the project when generating idls for external types (#2946).
    • idl: Fix potential panic on external type resolution (#2954).
    • lang: Fix using defined types in instruction parameters with declare_program! (#2959).
    • lang: Fix using const generics with declare_program! (#2965).
    • lang: Fix using Vec<u8> type with declare_program! (#2966).
    • lang: Fix ProgramError::ArithmeticOverflow not found error (#2975).
    • lang: Fix using optional accounts with declare_program! (#2967).
    • lang: Fix instruction return type generation with declare_program! (#2977).
    • cli: Fix IDL write getting corrupted from retries (#2964).
    • idl: Fix unexpected_cfgs build warning (#2992).
    • lang: Make tuple struct fields public in declare_program! (#2994).
    • Remove rust-version from crate manifests (#3000).
    • cli: Fix upgradeable program clones (#3010).
    • ts: Fix using IDLs that have defined types as generic arguments (#3016).
    • idl: Fix generation with unsupported expressions (#3033).
    • idl: Fix using address constraint with field expressions (#3034).
    • lang: Fix using bytemuckunsafe account serialization with declare_program! (#3037).

    Breaking

    Open source →
  18. 0.30.0 15 Apr 2024
    Release notes

    See the Anchor 0.30 release notes for a high-level overview of how to update.

    Features

    • cli: Allow force init and new (#2698).
    • cli: Add verifiable option when deploy (#2705).
    • cli: Add support for passing arguments to the underlying solana program deploy command with anchor deploy (#2709).
    • lang: Add InstructionData::write_to implementation (#2733).
    • lang: Add #[interface(..)] attribute for instruction discriminator overrides (#2728).
    • ts: Add .interface(..) method for instruction discriminator overrides (#2728).
    • cli: Check anchor-lang and CLI version compatibility (#2753).
    • ts: Add missing IDL PDA seed types (#2752).
    • cli: idl close accepts optional --idl-address parameter (#2760).
    • cli: Add support for simple wildcard patterns in Anchor.toml's workspace.members and workspace.exclude. (#2785).
    • cli: Add --test-template option for init command (#2805).
    • cli: anchor test is able to run multiple commands (#2799).
    • cli: Check @coral-xyz/anchor package and CLI version compatibility (#2813).
    • cli: Accept package name as program name (#2816).
    • cli: Add ability to build and test only a specified program (#2823).
    • idl: Add new IDL spec (#2824).
    • idl: Add support for reprs (#2824).
    • idl: Add support for expression evaluation (#2824).
    • idl: Add support for using external types when generating the IDL (#2824).
    • idl, ts: Add unit and tuple struct support (#2824).
    • idl, ts: Add generics support (#2824).
    • ts: Add accountsPartial method to keep the old accounts method behavior (#2824).
    • ts: Make opts parameter of AnchorProvider constructor optional (#2843).
    • cli: Add --no-idl flag to the build command (#2847).
    • cli: Add priority fees to idl commands (#2845).
    • ts: Add prepend option to MethodBuilder preInstructions method (#2863).
    • lang: Add declare_program! macro (#2857).
    • cli: Add deactivate_feature flag to solana-test-validator config in Anchor.toml (#2872).
    • idl: Add docs field for constants (#2887).
    • idl: Store deployment addresses for other clusters (#2892).
    • lang: Add Event utility type to get events from bytes (#2897).
    • lang, spl: Add support for token extensions (#2789).
    • lang: Return overflow error from Lamports trait operations (#2907).
    • lang: Add composite accounts support for declare_program! (#2894).
    • client: Expose more parts from logs parsing (#2707).

    Fixes

    • syn: Add missing new_from_array method to Hash (#2682).
    • cli: Switch to Cargo feature resolver(resolver = "2") (#2676).
    • cli: Fix using user specific path for provider.wallet in Anchor.toml (#2696).
    • syn: Fix IDL constant seeds parsing (#2699).
    • cli: Display errors if toolchain override restoration fails (#2700).
    • cli: Fix commit based anchor_version override (#2704).
    • spl: Fix compilation with shmem feature enabled (#2722).
    • cli: Localhost default test validator address changes from localhost to 127.0.0.1, NodeJS 17 IP resolution changes for IPv6 (#2725).
    • lang: Eliminate temporary Vec allocations when serializing data with discriminant and set the default capacity to 256 bytes (#2691).
    • lang: Allow custom lifetime in Accounts structure (#2741).
    • lang: Remove try_to_vec usage while setting the return data in order to reduce heap memory usage (#2744)
    • cli: Show installation progress if Solana tools are not installed when using toolchain overrides (#2757).
    • ts: Fix formatting enums (#2763).
    • cli: Fix migrate command not working without global ts-node installation (#2767).
    • client, lang, spl, syn: Enable all features for docs.rs build (#2774).
    • ts: Fix construction of field layouts for type aliased instruction arguments (#2821)
    • idl: Fix IDL (#2824).
    • idl, ts: Make casing consistent (#2824).
    • ts: Fix not being able to use numbers in instruction, account, or event names in some cases due to case conversion (#2824).
    • cli: Fix excessive test validator requests (#2828).
    • client: Fix parse_logs_response to prevent panics when more than 1 outer instruction exists in logs (#2856).
    • avm, cli: Fix stdsimd feature compilation error from ahash when installing the CLI using newer Rust versions (#2867).
    • spl: Fix not being able to deserialize newer token 2022 extensions (#2876).
    • client: Fix erroneous Cluster websocket ports (#2690).
    • spl: Remove solana-program dependency (#2900).
    • spl: Make TokenAccount and Mint Copy (#2904).
    • ts: Add missing errors (#2906).

    Breaking

    • cli: Make cargo build-sbf the default build command (#2694).
    • cli: Require explicit overflow-checks flag (#2716).
    • ts: Remove anchor-deprecated-state feature (#2717).
    • lang: Remove CLOSED_ACCOUNT_DISCRIMINATOR (#2726).
    • lang: Make bumps of optional accounts Option<u8> rather than u8 (#2730).
    • spl: Remove shared-memory program (#2747).
    • ts: Remove associated, account.associated and account.associatedAddress methods (#2749).
    • cli: idl upgrade command closes the IDL buffer account (#2760).
    • cli: Remove --jest option from the init command (#2805).
    • cli: Require idl-build feature in program Cargo.toml (#2824).
    • cli: Rename seeds feature to resolution and make it enabled by default (#2824).
    • cli: Remove idl parse command (#2824).
    • idl: Change IDL spec (#2824).
    • syn: Remove idl-parse and seeds features (#2824).
    • ts: Change accounts method to no longer accept resolvable accounts (#2824).
    • ts: Program instances use camelCase for everything (#2824).
    • ts: Remove discriminator functions (#2824).
    • ts: Remove programId parameter of the Program constructor (#2864).
    • idl, syn: Move IDL types from the anchor-syn crate to the new IDL crate (#2882).
    • idl: Add #[non_exhaustive] to IDL enums (#2890).
    • idl: Rename IDL crate from anchor-idl to anchor-lang-idl (#2908).
    • deps: Upgrade Solana to 1.18.8 (#2867).
    Open source →
    Release notes

    See the Anchor 0.30 release notes for a high-level overview of how to update.

    Features

    • cli: Allow force init and new (#2698).
    • cli: Add verifiable option when deploy (#2705).
    • cli: Add support for passing arguments to the underlying solana program deploy command with anchor deploy (#2709).
    • lang: Add InstructionData::write_to implementation (#2733).
    • lang: Add #[interface(..)] attribute for instruction discriminator overrides (#2728).
    • ts: Add .interface(..) method for instruction discriminator overrides (#2728).
    • cli: Check anchor-lang and CLI version compatibility (#2753).
    • ts: Add missing IDL PDA seed types (#2752).
    • cli: idl close accepts optional --idl-address parameter (#2760).
    • cli: Add support for simple wildcard patterns in Anchor.toml's workspace.members and workspace.exclude. (#2785).
    • cli: Add --test-template option for init command (#2805).
    • cli: anchor test is able to run multiple commands (#2799).
    • cli: Check @coral-xyz/anchor package and CLI version compatibility (#2813).
    • cli: Accept package name as program name (#2816).
    • cli: Add ability to build and test only a specified program (#2823).
    • idl: Add new IDL spec (#2824).
    • idl: Add support for reprs (#2824).
    • idl: Add support for expression evaluation (#2824).
    • idl: Add support for using external types when generating the IDL (#2824).
    • idl, ts: Add unit and tuple struct support (#2824).
    • idl, ts: Add generics support (#2824).
    • ts: Add accountsPartial method to keep the old accounts method behavior (#2824).
    • ts: Make opts parameter of AnchorProvider constructor optional (#2843).
    • cli: Add --no-idl flag to the build command (#2847).
    • cli: Add priority fees to idl commands (#2845).
    • ts: Add prepend option to MethodBuilder preInstructions method (#2863).
    • lang: Add declare_program! macro (#2857).
    • cli: Add deactivate_feature flag to solana-test-validator config in Anchor.toml (#2872).
    • idl: Add docs field for constants (#2887).
    • idl: Store deployment addresses for other clusters (#2892).
    • lang: Add Event utility type to get events from bytes (#2897).
    • lang, spl: Add support for token extensions (#2789).
    • lang: Return overflow error from Lamports trait operations (#2907).
    • lang: Add composite accounts support for declare_program! (#2894).
    • client: Expose more parts from logs parsing (#2707).

    Fixes

    • syn: Add missing new_from_array method to Hash (#2682).
    • cli: Switch to Cargo feature resolver(resolver = "2") (#2676).
    • cli: Fix using user specific path for provider.wallet in Anchor.toml (#2696).
    • syn: Fix IDL constant seeds parsing (#2699).
    • cli: Display errors if toolchain override restoration fails (#2700).
    • cli: Fix commit based anchor_version override (#2704).
    • spl: Fix compilation with shmem feature enabled (#2722).
    • cli: Localhost default test validator address changes from localhost to 127.0.0.1, NodeJS 17 IP resolution changes for IPv6 (#2725).
    • lang: Eliminate temporary Vec allocations when serializing data with discriminant and set the default capacity to 256 bytes (#2691).
    • lang: Allow custom lifetime in Accounts structure (#2741).
    • lang: Remove try_to_vec usage while setting the return data in order to reduce heap memory usage (#2744)
    • cli: Show installation progress if Solana tools are not installed when using toolchain overrides (#2757).
    • ts: Fix formatting enums (#2763).
    • cli: Fix migrate command not working without global ts-node installation (#2767).
    • client, lang, spl, syn: Enable all features for docs.rs build (#2774).
    • ts: Fix construction of field layouts for type aliased instruction arguments (#2821)
    • idl: Fix IDL (#2824).
    • idl, ts: Make casing consistent (#2824).
    • ts: Fix not being able to use numbers in instruction, account, or event names in some cases due to case conversion (#2824).
    • cli: Fix excessive test validator requests (#2828).
    • client: Fix parse_logs_response to prevent panics when more than 1 outer instruction exists in logs (#2856).
    • avm, cli: Fix stdsimd feature compilation error from ahash when installing the CLI using newer Rust versions (#2867).
    • spl: Fix not being able to deserialize newer token 2022 extensions (#2876).
    • client: Fix erroneous Cluster websocket ports (#2690).
    • spl: Remove solana-program dependency (#2900).
    • spl: Make TokenAccount and Mint Copy (#2904).
    • ts: Add missing errors (#2906).

    Breaking

    • cli: Make cargo build-sbf the default build command (#2694).
    • cli: Require explicit overflow-checks flag (#2716).
    • ts: Remove anchor-deprecated-state feature (#2717).
    • lang: Remove CLOSED_ACCOUNT_DISCRIMINATOR (#2726).
    • lang: Make bumps of optional accounts Option<u8> rather than u8 (#2730).
    • spl: Remove shared-memory program (#2747).
    • ts: Remove associated, account.associated and account.associatedAddress methods (#2749).
    • cli: idl upgrade command closes the IDL buffer account (#2760).
    • cli: Remove --jest option from the init command (#2805).
    • cli: Require idl-build feature in program Cargo.toml (#2824).
    • cli: Rename seeds feature to resolution and make it enabled by default (#2824).
    • cli: Remove idl parse command (#2824).
    • idl: Change IDL spec (#2824).
    • syn: Remove idl-parse and seeds features (#2824).
    • ts: Change accounts method to no longer accept resolvable accounts (#2824).
    • ts: Program instances use camelCase for everything (#2824).
    • ts: Remove discriminator functions (#2824).
    • ts: Remove programId parameter of the Program constructor (#2864).
    • idl, syn: Move IDL types from the anchor-syn crate to the new IDL crate (#2882).
    • idl: Add #[non_exhaustive] to IDL enums (#2890).
    • idl: Rename IDL crate from anchor-idl to anchor-lang-idl (#2908).
    • deps: Upgrade Solana to 1.18.8 (#2867).
    Open source →
    Release notes

    Features

    • cli: Allow force init and new (#2698).
    • cli: Add verifiable option when deploy (#2705).
    • cli: Add support for passing arguments to the underlying solana program deploy command with anchor deploy (#2709).
    • lang: Add InstructionData::write_to implementation (#2733).
    • lang: Add #[interface(..)] attribute for instruction discriminator overrides (#2728).
    • ts: Add .interface(..) method for instruction discriminator overrides (#2728).
    • cli: Check anchor-lang and CLI version compatibility (#2753).
    • ts: Add missing IDL PDA seed types (#2752).
    • cli: idl close accepts optional --idl-address parameter (#2760).
    • cli: Add support for simple wildcard patterns in Anchor.toml's workspace.members and workspace.exclude. (#2785).
    • cli: Add --test-template option for init command (#2805).
    • cli: anchor test is able to run multiple commands (#2799).
    • cli: Check @coral-xyz/anchor package and CLI version compatibility (#2813).
    • cli: Accept package name as program name (#2816).
    • cli: Add ability to build and test only a specified program (#2823).
    • idl: Add new IDL spec (#2824).
    • idl: Add support for reprs (#2824).
    • idl: Add support for expression evaluation (#2824).
    • idl: Add support for using external types when generating the IDL (#2824).
    • idl, ts: Add unit and tuple struct support (#2824).
    • idl, ts: Add generics support (#2824).
    • ts: Add accountsPartial method to keep the old accounts method behavior (#2824).
    • ts: Make opts parameter of AnchorProvider constructor optional (#2843).
    • cli: Add --no-idl flag to the build command (#2847).
    • cli: Add priority fees to idl commands (#2845).
    • ts: Add prepend option to MethodBuilder preInstructions method (#2863).
    • lang: Add declare_program! macro (#2857).
    • cli: Add deactivate_feature flag to solana-test-validator config in Anchor.toml (#2872).
    • idl: Add docs field for constants (#2887).
    • idl: Store deployment addresses for other clusters (#2892).
    • lang: Add Event utility type to get events from bytes (#2897).
    • lang, spl: Add support for token extensions (#2789).
    • lang: Return overflow error from Lamports trait operations (#2907).

    Fixes

    • syn: Add missing new_from_array method to Hash (#2682).
    • cli: Switch to Cargo feature resolver(resolver = "2") (#2676).
    • cli: Fix using user specific path for provider.wallet in Anchor.toml (#2696).
    • syn: Fix IDL constant seeds parsing (#2699).
    • cli: Display errors if toolchain override restoration fails (#2700).
    • cli: Fix commit based anchor_version override (#2704).
    • spl: Fix compilation with shmem feature enabled (#2722).
    • cli: Localhost default test validator address changes from localhost to 127.0.0.1, NodeJS 17 IP resolution changes for IPv6 (#2725).
    • lang: Eliminate temporary Vec allocations when serializing data with discriminant and set the default capacity to 256 bytes (#2691).
    • lang: Allow custom lifetime in Accounts structure (#2741).
    • lang: Remove try_to_vec usage while setting the return data in order to reduce heap memory usage (#2744)
    • cli: Show installation progress if Solana tools are not installed when using toolchain overrides (#2757).
    • ts: Fix formatting enums (#2763).
    • cli: Fix migrate command not working without global ts-node installation (#2767).
    • client, lang, spl, syn: Enable all features for docs.rs build (#2774).
    • ts: Fix construction of field layouts for type aliased instruction arguments (#2821)
    • idl: Fix IDL (#2824).
    • idl, ts: Make casing consistent (#2824).
    • ts: Fix not being able to use numbers in instruction, account, or event names in some cases due to case conversion (#2824).
    • cli: Fix excessive test validator requests (#2828).
    • client: Fix parse_logs_response to prevent panics when more than 1 outer instruction exists in logs (#2856).
    • avm, cli: Fix stdsimd feature compilation error from ahash when installing the CLI using newer Rust versions (#2867).
    • spl: Fix not being able to deserialize newer token 2022 extensions (#2876).
    • spl: Remove solana-program dependency (#2900).
    • spl: Make TokenAccount and Mint Copy (#2904).
    • ts: Add missing errors (#2906).

    Breaking

    • cli: Make cargo build-sbf the default build command (#2694).
    • cli: Require explicit overflow-checks flag (#2716).
    • ts: Remove anchor-deprecated-state feature (#2717).
    • lang: Remove CLOSED_ACCOUNT_DISCRIMINATOR (#2726).
    • lang: Make bumps of optional accounts Option<u8> rather than u8 (#2730).
    • spl: Remove shared-memory program (#2747).
    • ts: Remove associated, account.associated and account.associatedAddress methods (#2749).
    • cli: idl upgrade command closes the IDL buffer account (#2760).
    • cli: Remove --jest option from the init command (#2805).
    • cli: Require idl-build feature in program Cargo.toml (#2824).
    • cli: Rename seeds feature to resolution and make it enabled by default (#2824).
    • cli: Remove idl parse command (#2824).
    • idl: Change IDL spec (#2824).
    • syn: Remove idl-parse and seeds features (#2824).
    • ts: Change accounts method to no longer accept resolvable accounts (#2824).
    • ts: Program instances use camelCase for everything (#2824).
    • ts: Remove discriminator functions (#2824).
    • ts: Remove programId parameter of the Program constructor (#2864).
    • idl, syn: Move IDL types from the anchor-syn crate to the new IDL crate (#2882).
    • idl: Add #[non_exhaustive] to IDL enums (#2890).
    Open source →
  19. 0.29.0 16 Oct 2023
    Release notes

    See the Anchor 0.29 release notes for a high-level overview of how to update.

    Features

    • lang: Change all accounts to have a reference to AccountInfo (#2656).
    • lang: Add get_lamports, add_lamports and sub_lamports methods for all account types (#2552).
    • client: Add a helper struct DynSigner to simplify use of Client<C> where <C: Clone + Deref<Target = impl Signer>> with Solana clap CLI utils that loads Signer as Box<dyn Signer> (#2550).
    • lang: Allow CPI calls matching an interface without pinning program ID (#2559).
    • cli, lang: Add IDL generation through compilation. anchor build still uses parsing method to generate IDLs, use anchor idl build to generate IDLs with the build method (#2011).
    • avm: Add support for the .anchorversion file to facilitate switching between different versions of the anchor-cli (#2553).
    • ts: Add ability to access workspace programs independent of the casing used, e.g. anchor.workspace.myProgram, anchor.workspace.MyProgram... (#2579).
    • bench: Add benchmarking for program binary size (#2591).
    • spl: Export mpl-token-metadata crate (#2583).
    • spl: Add TokenRecordAccount for pNFTs (#2597).
    • ts: Add support for unnamed(tuple) enum in accounts (#2601).
    • cli: Add program template with multiple files for instructions, state... (#2602).
    • bench: Add benchmarking for stack memory usage (#2617).
    • lang: Box the inner enums of anchor_lang::error::Error to optimize anchor_lang::Result (#2600).
    • ts: Add strong type support for Program.addEventListener method (#2627).
    • syn: Add IdlBuild trait to implement IDL support for custom types (#2629).
    • spl: Add idl-build feature. IDL build method will not work without enabling this feature when using anchor-spl (#2629).
    • lang: Add support for type aliases in IDLs (#2637).
    • cli: Add test.upgradeable, test.genesis.upgradeable setting in Anchor.toml to support testing upgradeable programs (#2642).
    • cli, client, lang, spl: Update Solana toolchain and dependencies to 1.17.0, 1.16 remains supported (#2645).
    • spl: Add support for memo program (#2661).
    • avm: Add anchor-cli installation from commit (#2659).
    • cli: Add toolchain property in Anchor.toml to override Anchor and Solana versions (#2649).

    Fixes

    • ts: Packages no longer depend on assert (#2535).
    • lang: Support for const in the InitSpace macro (#2555).
    • cli: Support workspace inheritance (#2570).
    • client: Compile with Solana 1.14 (#2572).
    • cli: Fix anchor build --no-docs adding docs to the IDL (#2575).
    • ts: Load workspace programs on-demand rather than loading all of them at once (#2579).
    • lang: Fix associated_token::token_program constraint (#2603).
    • cli: Fix anchor account command panicking outside of workspace (#2620).
    • lang: IDL named enum variant fields are now camelCase as opposed to snake_case, consistent with the other IDL types (#2633).
    • avm: Remove excessive panics and handle the errors gracefully (#2671).

    Breaking

    • lang: Switch to type safe bumps in context (#2542).
    • syn: idl feature has been replaced with idl-build, idl-parse and idl-types features (#2011).
    • syn: IDL parse method now returns Result<Idl> instead of Result<Option<Idl>> (#2582).
    • spl: Update mpl-token-metadata dependency to use the client SDK instead of the program crate (#2632).
    • ts: Remove base64-js dependency (#2635).
    • syn: IdlTypeDefinitionTy enum has a new variant Alias (#2637).
    • cli, client, lang, spl: Solana 1.14 is no longer supported, minimum required Solana version is 1.16.0 (#2645).
    • cli: anchor_version and solana_version property in Anchor.toml that was being used in verifiable builds are moved inside toolchain. They are now being used for all commands in the workspace, not just verifiable builds (#2649).
    Open source →
    Release notes

    Features

    • lang: Change all accounts to have a reference to AccountInfo (#2656).
    • lang: Add get_lamports, add_lamports and sub_lamports methods for all account types (#2552).
    • client: Add a helper struct DynSigner to simplify use of Client<C> where <C: Clone + Deref<Target = impl Signer>> with Solana clap CLI utils that loads Signer as Box<dyn Signer> (#2550).
    • lang: Allow CPI calls matching an interface without pinning program ID (#2559).
    • cli, lang: Add IDL generation through compilation. anchor build still uses parsing method to generate IDLs, use anchor idl build to generate IDLs with the build method (#2011).
    • avm: Add support for the .anchorversion file to facilitate switching between different versions of the anchor-cli (#2553).
    • ts: Add ability to access workspace programs independent of the casing used, e.g. anchor.workspace.myProgram, anchor.workspace.MyProgram... (#2579).
    • bench: Add benchmarking for program binary size (#2591).
    • spl: Export mpl-token-metadata crate (#2583).
    • spl: Add TokenRecordAccount for pNFTs (#2597).
    • ts: Add support for unnamed(tuple) enum in accounts (#2601).
    • cli: Add program template with multiple files for instructions, state... (#2602).
    • bench: Add benchmarking for stack memory usage (#2617).
    • lang: Box the inner enums of anchor_lang::error::Error to optimize anchor_lang::Result (#2600).
    • ts: Add strong type support for Program.addEventListener method (#2627).
    • syn: Add IdlBuild trait to implement IDL support for custom types (#2629).
    • spl: Add idl-build feature. IDL build method will not work without enabling this feature when using anchor-spl (#2629).
    • lang: Add support for type aliases in IDLs (#2637).
    • cli: Add test.upgradeable, test.genesis.upgradeable setting in Anchor.toml to support testing upgradeable programs (#2642).
    • cli, client, lang, spl: Update Solana toolchain and dependencies to 1.17.0, 1.16 remains supported (#2645).
    • spl: Add support for memo program (#2661).
    • avm: Add anchor-cli installation from commit (#2659).
    • cli: Add toolchain property in Anchor.toml to override Anchor and Solana versions (#2649).

    Fixes

    • ts: Packages no longer depend on assert (#2535).
    • lang: Support for const in the InitSpace macro (#2555).
    • cli: Support workspace inheritance (#2570).
    • client: Compile with Solana 1.14 (#2572).
    • cli: Fix anchor build --no-docs adding docs to the IDL (#2575).
    • ts: Load workspace programs on-demand rather than loading all of them at once (#2579).
    • lang: Fix associated_token::token_program constraint (#2603).
    • cli: Fix anchor account command panicking outside of workspace (#2620).
    • lang: IDL named enum variant fields are now camelCase as opposed to snake_case, consistent with the other IDL types (#2633).
    • avm: Remove excessive panics and handle the errors gracefully (#2671).

    Breaking

    • lang: Switch to type safe bumps in context (#2542).
    • syn: idl feature has been replaced with idl-build, idl-parse and idl-types features (#2011).
    • syn: IDL parse method now returns Result<Idl> instead of Result<Option<Idl>> (#2582).
    • spl: Update mpl-token-metadata dependency to use the client SDK instead of the program crate (#2632).
    • ts: Remove base64-js dependency (#2635).
    • syn: IdlTypeDefinitionTy enum has a new variant Alias (#2637).
    • cli, client, lang, spl: Solana 1.14 is no longer supported, minimum required Solana version is 1.16.0 (#2645).
    • cli: anchor_version and solana_version property in Anchor.toml that was being used in verifiable builds are moved inside toolchain. They are now being used for all commands in the workspace, not just verifiable builds (#2649).
    Open source →
  20. 0.28.0 09 Jun 2023
    Release notes

    Features

    • client: Add async feature flag to use an asynchronous anchor-client (#2488).
    • spl: Add metadata wrappers approve_collection_authority, bubblegum_set_collection_size, burn_edition_nft, burn_nft, revoke_collection_authority, set_token_standard, utilize, unverify_sized_collection_item, unverify_collection (#2430)
    • spl: Add token_program constraint to Token, Mint, and AssociatedToken accounts in order to override required token_program fields and use different token interface implementations in the same instruction (#2460)
    • cli: Add support for Solidity programs. anchor init and anchor new take an option --solidity which creates solidity code rather than rust. anchor build and anchor test work accordingly (#2421)
    • bench: Add benchmarking for compute units usage (#2466)
    • cli: idl set-buffer, idl set-authority and idl close take an option --print-only. which prints transaction in a base64 Borsh compatible format but not sent to the cluster. It's helpful when managing authority under a multisig, e.g., a user can create a proposal for a Custom Instruction in SPL Governance (#2486).
    • lang: Add emit_cpi! and #[event_cpi] macros(behind event-cpi feature flag) to store event logs in transaction metadata (#2438).
    • cli: Add keys sync command to sync program id declarations (#2505).
    • cli: Create new programs with correct program ids (#2509).
    • cli, client, lang, spl: Update Solana toolchain and dependencies to 1.16.0 and specify maximum version of <1.17.0 (#2512).
    • cli: anchor deploy command's --program-name argument accepts program lib names (#2519).

    Fixes

    • ts: Narrowed AccountClient type to it's appropriate account type (#2440)
    • lang: Fix inability to use identifiers program_id, accounts, ix_data, remaining_accounts in instruction arguments (#2464)
    • cli: Fix incorrect metadata.address generation in IDL after deploying with a custom keypair (#2485)
    • cli: IDL commands no longer hang when the payer doesn't have funds to pay for the transaction fee (#2492)
    • cli: Fix anchor new not updating Anchor.toml (#2516).
    • client, lang, spl: Allow wider range of dependency versions to reduce dependency issues (#2524).

    Breaking

    • lang: Identifiers that are intended for internal usage(program_id, accounts, ix_data, remaining_accounts) have been renamed with __ prefix (#2464)
    • spl: Remove the metadata::create_metadata_account_v2 deprecated wrapper since it was removed from token metadata program (#2480)
    Open source →
  21. 0.27.0 08 Mar 2023
    Release notes

    Features

    • spl: Add MasterEditionAccount account deserialization to spl metadata (#2393).
    • lang: Add the InitSpace derive macro to automatically calculate the space at the initialization of an account (#2346).
    • cli: Add env option to verifiable builds (#2325).
    • cli: Add idl close command to close a program's IDL account (#2329).
    • cli: idl init now supports very large IDL files (#2329).
    • spl: Add transfer_checked function (#2353).
    • spl: Add approve_checked function (#2401).
    • cli: Add --skip-build option to the verify command (#2387).
    • client: Add support for multithreading to the rust client: use flag --multithreaded (#2321).
    • client: Add async_rpc a method which returns a nonblocking solana rpc client (#2322).
    • avm, cli: Use the rustls-tls feature of reqwest so that users don't need OpenSSL installed (#2385).
    • ts: Add VersionedTransaction support. Methods in the Provider class and Wallet interface now use the argument tx: Transaction | VersionedTransaction (#2427).
    • cli: Add --arch sbf option to compile programs using cargo build-sbf (#2398).
    • land: Support multiple programs with the same interface using Interface and InterfaceAccount types, related to token-2022 (#2386).

    Fixes

    • ts: Make the return type of AccountClient.fetchMultiple match the account type being fetched (#2390)
    • cli: Don't regenerate idl in read_all_programs(). (#2332).
    • ts: provider.simulate will send the transaction with sigVerify: false if no signers are present (#2331).
    • cli: Failing commands will return the correct exit status. (#2370).
    • idl: Update the IDL program to use non-deprecated account types (#2365).
    • ts: Enum fields weren't being converted from snake_case to camelCase (#2378).
    • lang/cli: Update to solana-program version 1.14.16 and rust version 1.60, appears to still be incompatible with 1.15 CLI (#2420).

    Breaking

    • lang: Remove deprecated account types: CpiAccount, Loader and ProgramAccount (#2375).
    • lang: Remove state and interface attributes (#2285).
    • lang: Remove deprecated literal constraint which has been replaced by #[account(constraint = {})] (#2379).
    • lang: account(zero_copy) and zero_copy attributes now derive the bytemuck::Pod and bytemuck::Zeroable traits instead of using unsafe impl (#2330). This imposes useful restrictions on the type, like not having padding bytes and all fields being Pod themselves. See bytemuck::Pod for details. This change requires adding bytemuck = { version = "1.4.0", features = ["derive", "min_const_generics"]} to your cargo.toml. Legacy applications can still use #[account(zero_copy(unsafe))] and #[zero_copy(unsafe)] for the old behavior.
    • ts: Remove createProgramAddressSync, findProgramAddressSync (now available in @solana/web3.js) and update associatedAddress to be synchronous (#2357).
    Open source →

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive