@project-serum/anchor
Advanced tools
Changelog
[0.11.0] - 2021-07-03
Changelog
[0.10.0] - 2021-06-27
#[account(address = <expr>)]
constraint for asserting the address of an account (#400).#[account(init, token = <mint-target>, authority = <token-owner-target>...)]
constraint for initializing SPL token accounts as program derived addresses for the program. Can be used when initialized via seeds
or associated
(#400).associated_seeds!
macro for generating signer seeds for CPIs signed by an #[account(associated = <target>)]
account (#400).[scripts]
section to the Anchor.toml for specifying workspace scripts that can be run via anchor run <script>
(#400).[clusters.<network>]
table entries can now also use { address = <base58-str>, idl = <filepath-str> }
to specify workspace programs (#400).--yarn
flag in favor of using npx
(#432).Changelog
[0.8.0] - 2021-06-10
--program-name
option for build command to build a single program at a time (#362).#[account(close = <destination>)]
constraint for closing accounts and sending the rent exemption lamports to a specified destination account (#371).remaining_accounts
with CpiContext
by implementing the ToAccountMetas
trait on CpiContext
(#351).Changelog
[0.7.0] - 2021-05-31
SetAuthority
instruction (#307).constraint = <expression>
added as a replacement for (the now deprecated) string literal constraints (#341).anchor.workspace
clients (#310).<program>.account.<my-account>
and <program>.state
namespaces now require explicitly invoking the fetch
API. For example, program.account.myAccount(<address>)
and program.state()
is now program.account.myAccount.fetch(<address>)
and program.state.fetch()
(#322).#[account(associated)]
now requires init
to be provided to create an associated account. If not provided, then the address will be assumed to exist, and a constraint will be added to ensure the correctness of the address (#318).#[state]
account discriminator to be namespaced by "state:" (#320).:
to be consistent with accounts (#321).mut
(#341).space
constraints must now be literal integers instead of literal strings (#341).Changelog
[0.6.0] - 2021-05-23
program.simulate
namespace (#266).Address
type, allowing one to use Base 58 encoded strings in public APIs (#304).web3.Account
with web3.Signer
in public APIs (#296).anchor.workspace
clients can now be customized per network with [cluster.<slug>]
in the Anchor.toml (#308).--skip-build
flag to test command (301).anchor shell
command to spawn a node shell populated with an Anchor.toml based environment (#303).