changelog.mdx 96 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972
  1. ---
  2. title: Changelog
  3. description: Anchor Changelog
  4. ---
  5. Version 0 of Semantic Versioning is handled differently from version 1 and
  6. above. The minor version will be incremented upon a breaking change and the
  7. patch version will be incremented for features.
  8. ---
  9. ## [0.31.1] - 2025-04-19
  10. ### Features
  11. - cli, docker: Replace `backpackapp/build` Docker image with
  12. `solanafoundation/anchor`
  13. ([#3619](https://github.com/coral-xyz/anchor/pull/3619)).
  14. - ts: Make `Provider` require publicKey instead of wallet in accounts resolver
  15. ([#3613](https://github.com/coral-xyz/anchor/pull/3613))
  16. ### Fixes
  17. - idl: Update `proc-macro2` usage for latest nightly
  18. ([#3663](https://github.com/solana-foundation/anchor/pull/3663))
  19. - ts: Fix parsing IDL with multiple const generics
  20. ([#3665](https://github.com/solana-foundation/anchor/pull/3665))
  21. ### Breaking
  22. ## [0.31.0] - 2025-03-08
  23. ### Features
  24. - client: Make `solana_account_decoder` dep public in anchor client
  25. ([#3455](https://github.com/coral-xyz/anchor/pull/3455)).
  26. - ts: Add optional `options.blockhash` to `Provider.sendAndConfirm`
  27. ([#3070](https://github.com/coral-xyz/anchor/pull/3070)).
  28. - ts: Add optional `commitment` parameter to `Program.addEventListener`
  29. ([#3052](https://github.com/coral-xyz/anchor/pull/3052)).
  30. - cli, idl: Pass `cargo` args to IDL generation when building program or IDL
  31. ([#3059](https://github.com/coral-xyz/anchor/pull/3059)).
  32. - cli: Add checks for incorrect usage of `idl-build` feature
  33. ([#3061](https://github.com/coral-xyz/anchor/pull/3061)).
  34. - lang: Export `Discriminator` trait from `prelude`
  35. ([#3075](https://github.com/coral-xyz/anchor/pull/3075)).
  36. - lang: Add `Account` utility type to get accounts from bytes
  37. ([#3091](https://github.com/coral-xyz/anchor/pull/3091)).
  38. - client: Add option to pass in mock rpc client when using anchor_client
  39. ([#3053](https://github.com/coral-xyz/anchor/pull/3053)).
  40. - lang: Get discriminator length dynamically
  41. ([#3101](https://github.com/coral-xyz/anchor/pull/3101)).
  42. - lang: Add non-8-byte discriminator support in `declare_program!`
  43. ([#3103](https://github.com/coral-xyz/anchor/pull/3103)).
  44. - client: Make `ThreadSafeSigner` trait public
  45. ([#3107](https://github.com/coral-xyz/anchor/pull/3107)).
  46. - lang: Update `dispatch` function to support dynamic discriminators
  47. ([#3104](https://github.com/coral-xyz/anchor/pull/3104)).
  48. - lang: Remove the fallback function shortcut in `try_entry` function
  49. ([#3109](https://github.com/coral-xyz/anchor/pull/3109)).
  50. - ts: Get discriminator lengths dynamically
  51. ([#3120](https://github.com/coral-xyz/anchor/pull/3120)).
  52. - client: Support non-8-byte discriminators
  53. ([#3125](https://github.com/coral-xyz/anchor/pull/3125)).
  54. - spl: Add `withdraw_withheld_tokens_from_accounts` instruction
  55. ([#3128](https://github.com/coral-xyz/anchor/pull/3128)).
  56. - ts: Add optional `wallet` property to the `Provider` interface
  57. ([#3130](https://github.com/coral-xyz/anchor/pull/3130)).
  58. - cli: Warn if `anchor-spl/idl-build` is missing
  59. ([#3133](https://github.com/coral-xyz/anchor/pull/3133)).
  60. - client: Add `internal_rpc` method for `mock` feature
  61. ([#3135](https://github.com/coral-xyz/anchor/pull/3135)).
  62. - lang: Add `#[instruction]` attribute proc-macro to override default
  63. instruction discriminators
  64. ([#3137](https://github.com/coral-xyz/anchor/pull/3137)).
  65. - lang: Use associated discriminator constants instead of hardcoding in
  66. `#[account]` ([#3144](https://github.com/coral-xyz/anchor/pull/3144)).
  67. - lang: Add `discriminator` argument to `#[account]` attribute
  68. ([#3149](https://github.com/coral-xyz/anchor/pull/3149)).
  69. - lang: Add `discriminator` argument to `#[event]` attribute
  70. ([#3152](https://github.com/coral-xyz/anchor/pull/3152)).
  71. - idl: Check ambiguous discriminators
  72. ([#3157](https://github.com/coral-xyz/anchor/pull/3157)).
  73. - idl: Disallow all zero account discriminators
  74. ([#3159](https://github.com/coral-xyz/anchor/pull/3159)).
  75. - cli: Support non-8-byte discriminators
  76. ([#3165](https://github.com/coral-xyz/anchor/pull/3165)).
  77. - idl: Disallow empty discriminators
  78. ([#3166](https://github.com/coral-xyz/anchor/pull/3166)).
  79. - cli: Add `--no-idl` option to the `test` command
  80. ([#3175](https://github.com/coral-xyz/anchor/pull/3175)).
  81. - spl: Add `burn_checked`, `mint_to_checked` and `approve_checked` instructions
  82. ([#3186](https://github.com/coral-xyz/anchor/pull/3186)).
  83. - cli: Migrate to `agave-install` when `solana_version` is `>= 1.18.19`
  84. ([#3185](https://github.com/coral-xyz/anchor/pull/3185)).
  85. - idl: Add `IdlBuilder`
  86. ([#3188](https://github.com/coral-xyz/anchor/pull/3188)).
  87. - cli: Make `clean` command also remove the `.anchor` directory
  88. ([#3192](https://github.com/coral-xyz/anchor/pull/3192)).
  89. - lang: Deprecate `#[interface]` attribute
  90. ([#3195](https://github.com/coral-xyz/anchor/pull/3195)).
  91. - ts: Include unresolved accounts in the resolution error message
  92. ([#3207](https://github.com/coral-xyz/anchor/pull/3207)).
  93. - lang: Add `LazyAccount`
  94. ([#3194](https://github.com/coral-xyz/anchor/pull/3194)).
  95. - avm: Ask whether to install if the version is not installed with the `use`
  96. command ([#3230](https://github.com/coral-xyz/anchor/pull/3230)).
  97. - cli: Warn if a manifest has `solana-program` dependency
  98. ([#3250](https://github.com/coral-xyz/anchor/pull/3250)).
  99. - cli: Add completions command to generate shell completions via the
  100. clap_complete crate ([#3251](https://github.com/coral-xyz/anchor/pull/3251)).
  101. - cli: Always convert IDLs
  102. ([#3265](https://github.com/coral-xyz/anchor/pull/3265)).
  103. - cli: Check whether the `idl-build` feature exists when using the `idl build`
  104. command ([#3273](https://github.com/coral-xyz/anchor/pull/3273)).
  105. - cli: Build IDL if there is only one program when using the `idl build` command
  106. ([#3275](https://github.com/coral-xyz/anchor/pull/3275)).
  107. - cli: Add short alias for the `idl build` command
  108. ([#3283](https://github.com/coral-xyz/anchor/pull/3283)).
  109. - cli: Add `--program-id` option to `idl convert` command
  110. ([#3309](https://github.com/coral-xyz/anchor/pull/3309)).
  111. - lang: Generate documentation of constants in `declare_program!`
  112. ([#3311](https://github.com/coral-xyz/anchor/pull/3311)).
  113. - cli: Add support for fetching legacy IDLs
  114. ([#3324](https://github.com/coral-xyz/anchor/pull/3324)).
  115. - avm: Add short alias for `install` and `list` commands
  116. ([#3326](https://github.com/coral-xyz/anchor/pull/3326)).
  117. - avm: Add Windows support for renaming anchor binary
  118. ([#3325](https://github.com/coral-xyz/anchor/pull/3325)).
  119. - cli: Add optional `package-manager` flag in `init` command to set package
  120. manager field in Anchor.toml
  121. ([#3328](https://github.com/coral-xyz/anchor/pull/3328)).
  122. - cli: Add test template for [Mollusk](https://github.com/buffalojoec/mollusk)
  123. ([#3352](https://github.com/coral-xyz/anchor/pull/3352)).
  124. - idl: Disallow account discriminators that can conflict with the `zero`
  125. constraint ([#3365](https://github.com/coral-xyz/anchor/pull/3365)).
  126. - cli: Include recommended solana args by default and add new `--max-retries`
  127. option to the `deploy` command
  128. ([#3354](https://github.com/coral-xyz/anchor/pull/3354)).
  129. - avm: Make installation download binaries by default
  130. ([#3445](https://github.com/coral-xyz/anchor/pull/3445)).
  131. - idl: Support PDA resolution of call expressions that don't have any arguments
  132. ([#3485](https://github.com/coral-xyz/anchor/pull/3485)).
  133. - spl: Add `anchor-debug` feature
  134. ([#3511](https://github.com/coral-xyz/anchor/pull/3511)).
  135. ### Fixes
  136. - idl: Make safety comment checks fail silently when program path env is not set
  137. ([#3045](https://github.com/coral-xyz/anchor/pull/3045)).
  138. - idl: Avoid interference from rust tests during IDL generation
  139. ([#3058](https://github.com/coral-xyz/anchor/pull/3058)).
  140. - lang: Fix `align` repr support in `declare-program!`
  141. ([#3056](https://github.com/coral-xyz/anchor/pull/3056)).
  142. - lang: Make stack frames slimmer on ATA creation
  143. ([#3065](https://github.com/coral-xyz/anchor/pull/3065)).
  144. - lang: Remove `getrandom` dependency
  145. ([#3072](https://github.com/coral-xyz/anchor/pull/3072)).
  146. - lang: Make `InitSpace` support unnamed & unit structs
  147. ([#3084](https://github.com/coral-xyz/anchor/pull/3084)).
  148. - lang: Fix using `owner` constraint with `Box`ed accounts
  149. ([#3087](https://github.com/coral-xyz/anchor/pull/3087)).
  150. - lang: Add a sanity check for unimplemented token extensions
  151. ([#3090](https://github.com/coral-xyz/anchor/pull/3090)).
  152. - cli: Skip IDL checks if `--no-idl` option is passed
  153. ([#3093](https://github.com/coral-xyz/anchor/pull/3093)).
  154. - lang: Remove unnecessary clone in account exit routine
  155. ([#3139](https://github.com/coral-xyz/anchor/pull/3139)).
  156. - cli: Fix installation with `--locked` argument using Rust v1.80 due to `time`
  157. crate issue ([#3143](https://github.com/coral-xyz/anchor/pull/3143)).
  158. - lang: Fix compilation warnings due to unused deprecated program id macros
  159. ([#3170](https://github.com/coral-xyz/anchor/pull/3170)).
  160. - ts: Remove `crypto-hash` dependency
  161. ([#3171](https://github.com/coral-xyz/anchor/pull/3171)).
  162. - ts: Improve error message of unsupported `view` method
  163. ([#3177](https://github.com/coral-xyz/anchor/pull/3177)).
  164. - idl: Fix panicking on tests
  165. ([#3197](https://github.com/coral-xyz/anchor/pull/3197)).
  166. - lang: Remove `arrayref` dependency
  167. ([#3201](https://github.com/coral-xyz/anchor/pull/3201)).
  168. - cli: Fix template code shouldn't escape
  169. ([#3210](https://github.com/coral-xyz/anchor/pull/3210)).
  170. - idl: Fix using `address` constraint with non-const expressions
  171. ([#3216](https://github.com/coral-xyz/anchor/pull/3216)).
  172. - idl: Fix using full path types with `Program`
  173. ([#3228](https://github.com/coral-xyz/anchor/pull/3228)).
  174. - lang: Use closures for `init` constraints to reduce the stack usage of
  175. `try_accounts` ([#2939](https://github.com/coral-xyz/anchor/pull/2939)).
  176. - lang: Allow the `cfg` attribute above the instructions
  177. ([#2339](https://github.com/coral-xyz/anchor/pull/2339)).
  178. - idl: Log output with `ANCHOR_LOG` on failure and improve build error message
  179. ([#3284](https://github.com/coral-xyz/anchor/pull/3284)).
  180. - lang: Fix constant bytes declarations when using `declare_program!`
  181. ([#3287](https://github.com/coral-xyz/anchor/pull/3287)).
  182. - lang: Fix using non-instruction composite accounts with `declare_program!`
  183. ([#3290](https://github.com/coral-xyz/anchor/pull/3290)).
  184. - idl: Fix instructions with tuple parameters not producing an
  185. error([#3294](https://github.com/coral-xyz/anchor/pull/3294)).
  186. - ts: Update `engines.node` to `>= 17`
  187. ([#3301](https://github.com/coral-xyz/anchor/pull/3301)).
  188. - cli: Use OS-agnostic paths
  189. ([#3307](https://github.com/coral-xyz/anchor/pull/3307)).
  190. - avm: Use `rustc 1.79.0` when installing versions older than v0.31
  191. ([#3315](https://github.com/coral-xyz/anchor/pull/3315)).
  192. - cli: Fix priority fee calculation causing panic on localnet
  193. ([#3318](https://github.com/coral-xyz/anchor/pull/3318)).
  194. - cli: Fix `shell` command failing due to outdated program initialization
  195. ([#3351](https://github.com/coral-xyz/anchor/pull/3351)).
  196. - idl: Fix detecting false-positives from doc comments during module path
  197. conversion ([#3359](https://github.com/coral-xyz/anchor/pull/3359)).
  198. - cli: Remove passing the rent sysvar account to IDL instructions
  199. ([#3372](https://github.com/coral-xyz/anchor/pull/3372)).
  200. - lang: Fix `cpi` feature instructions not accounting for discriminator
  201. overrides ([#3376](https://github.com/coral-xyz/anchor/pull/3376)).
  202. - idl: Ignore compiler warnings during builds
  203. ([#3396](https://github.com/coral-xyz/anchor/pull/3396)).
  204. - cli: Avoid extra IDL generation during `verify`
  205. ([#3398](https://github.com/coral-xyz/anchor/pull/3398)).
  206. - lang: Require `zero` accounts to be unique
  207. ([#3409](https://github.com/coral-xyz/anchor/pull/3409)).
  208. - lang: Deduplicate `zero` accounts against `init` accounts
  209. ([#3422](https://github.com/coral-xyz/anchor/pull/3422)).
  210. - cli: Fix custom `provider.cluster`
  211. ([#3428](https://github.com/coral-xyz/anchor/pull/3428)).
  212. - cli: Ignore non semver solana/agave releases to avoid panic
  213. ([#3432](https://github.com/coral-xyz/anchor/pull/3432)).
  214. - ts: Fix loading programs with numbers in their names using `workspace`
  215. ([#3450](https://github.com/coral-xyz/anchor/pull/3450)).
  216. - lang: Remove a potential panic while getting the IDL in `declare_program!`
  217. ([#3458](https://github.com/coral-xyz/anchor/pull/3458)).
  218. - cli: Fix altering user-provided lib names
  219. ([#3467](https://github.com/coral-xyz/anchor/pull/3467)).
  220. - idl: Fix missing `program::seed` resolution
  221. ([#3474](https://github.com/coral-xyz/anchor/pull/3474)).
  222. - lang: Fix adding `derive`s and `repr`s to type alias definitions in
  223. `declare_program!` ([#3504](https://github.com/coral-xyz/anchor/pull/3504)).
  224. - idl: Fix using constant identifiers as generic arguments
  225. ([#3522](https://github.com/coral-xyz/anchor/pull/3522)).
  226. - client: Remove `std::process::exit` usage
  227. ([#3544](https://github.com/coral-xyz/anchor/pull/3544)).
  228. - idl: Fix using `Pubkey` constants with `seeds::program`
  229. ([#3559](https://github.com/coral-xyz/anchor/pull/3559)).
  230. - lang: Fix instructions with no accounts causing compilation errors when using
  231. `declare_program!` ([#3567](https://github.com/coral-xyz/anchor/pull/3567)).
  232. - idl: Fix using account or arg values for `seeds::program`
  233. ([#3570](https://github.com/coral-xyz/anchor/pull/3570)).
  234. - lang: Fix using `data` as an instruction parameter name in `declare_program!`
  235. ([#3574](https://github.com/coral-xyz/anchor/pull/3574)).
  236. - cli: Use camelCase for program name in `anchor.workspace` templates
  237. ([#3581](https://github.com/coral-xyz/anchor/pull/3581)).
  238. ### Breaking
  239. - syn: Remove `bpf` target support in `hash` feature
  240. ([#3078](https://github.com/coral-xyz/anchor/pull/3078)).
  241. - client: Add `tokio` support to `RequestBuilder` with `async` feature
  242. ([#3057](https://github.com/coral-xyz/anchor/pull/3057)).
  243. - lang: Remove `EventData` trait
  244. ([#3083](https://github.com/coral-xyz/anchor/pull/3083)).
  245. - client: Remove `async_rpc` method
  246. ([#3053](https://github.com/coral-xyz/anchor/pull/3053)).
  247. - lang: Make discriminator type unsized
  248. ([#3098](https://github.com/coral-xyz/anchor/pull/3098)).
  249. - lang: Require `Discriminator` trait impl when using the `zero` constraint
  250. ([#3118](https://github.com/coral-xyz/anchor/pull/3118)).
  251. - ts: Remove `DISCRIMINATOR_SIZE` constant
  252. ([#3120](https://github.com/coral-xyz/anchor/pull/3120)).
  253. - lang: `#[account]` attribute arguments no longer parses identifiers as
  254. namespaces ([#3140](https://github.com/coral-xyz/anchor/pull/3140)).
  255. - spl: Rename metadata interface instruction fields from `token_program_id` to
  256. `program_id` ([#3076](https://github.com/coral-xyz/anchor/pull/3076)).
  257. - lang, ts: Remove "8 byte" requirement from discriminator error messages
  258. ([#3161](https://github.com/coral-xyz/anchor/pull/3161)).
  259. - lang: Remove `discriminator` method from `Discriminator` trait
  260. ([#3163](https://github.com/coral-xyz/anchor/pull/3163)).
  261. - docker: Upgrade `node` to 20.16.0 LTS
  262. ([#3179](https://github.com/coral-xyz/anchor/pull/3179)).
  263. - ts: Change the `Program` constructor's `idl` parameter type to `any`
  264. ([#3181](https://github.com/coral-xyz/anchor/pull/3181)).
  265. - lang, spl: Remove `borsh 0.9` support
  266. ([#3199](https://github.com/coral-xyz/anchor/pull/3199)).
  267. - ts: Upgrade `typescript` to `5.5.4` and remove the generic parameters of
  268. `SimulateResponse` ([#3221](https://github.com/coral-xyz/anchor/pull/3221)).
  269. - ts: Remove
  270. `StateCoder`([#3224](https://github.com/coral-xyz/anchor/pull/3224)).
  271. - cli: Accept integers for `warp_slot`
  272. ([#3235](https://github.com/coral-xyz/anchor/pull/3235)).
  273. - lang: Remove `EventIndex`
  274. ([#3244](https://github.com/coral-xyz/anchor/pull/3244)).
  275. - spl: Remove `dex` feature
  276. ([#3257](https://github.com/coral-xyz/anchor/pull/3257)).
  277. - client, lang, spl: Upgrade Solana to v2 and SPL to the latest
  278. ([#3219](https://github.com/coral-xyz/anchor/pull/3219)).
  279. - cli: Install Solana from anza.xyz domain in Docker verifiable builds
  280. ([#3271](https://github.com/coral-xyz/anchor/pull/3271)).
  281. - spl: Upgrade SPL deps to latest
  282. ([#3346](https://github.com/coral-xyz/anchor/pull/3346)).
  283. - cli: Upgrade `typescript` version of templates to v5
  284. ([#3480](https://github.com/coral-xyz/anchor/pull/3480)).
  285. - ts: Remove `snake-case` dependency
  286. ([#3507](https://github.com/coral-xyz/anchor/pull/3507)).
  287. ## [0.30.1] - 2024-06-20
  288. ### Features
  289. - idl: Allow overriding the idl build toolchain with the `RUSTUP_TOOLCHAIN`
  290. environment variable
  291. ([#2941](https://github.com/coral-xyz/anchor/pull/2941])).
  292. - avm: Support customizing the installation location using `AVM_HOME`
  293. environment variable ([#2917](https://github.com/coral-xyz/anchor/pull/2917)).
  294. - avm: Optimize `avm list` when GitHub API rate limits are reached
  295. ([#2962](https://github.com/coral-xyz/anchor/pull/2962))
  296. - idl, ts: Add accounts resolution for associated token accounts
  297. ([#2927](https://github.com/coral-xyz/anchor/pull/2927)).
  298. - cli: Add `--no-install` option to the `init` command
  299. ([#2945](https://github.com/coral-xyz/anchor/pull/2945)).
  300. - lang: Implement `TryFromIntError` for `Error` to be able to propagate integer
  301. conversion errors ([#2950](https://github.com/coral-xyz/anchor/pull/2950)).
  302. - idl: Add ability to convert legacy IDLs
  303. ([#2986](https://github.com/coral-xyz/anchor/pull/2986)).
  304. - ts: Extract Anchor error codes into their own package
  305. ([#2983](https://github.com/coral-xyz/anchor/pull/2983)).
  306. - cli: Add additional solana arguments to the `upgrade` command
  307. ([#2998](https://github.com/coral-xyz/anchor/pull/2998)).
  308. - spl: Export `spl-associated-token-account` crate
  309. ([#2999](https://github.com/coral-xyz/anchor/pull/2999)).
  310. - lang: Support legacy IDLs with `declare_program!`
  311. ([#2997](https://github.com/coral-xyz/anchor/pull/2997)).
  312. - cli: Add `idl convert` command
  313. ([#3009](https://github.com/coral-xyz/anchor/pull/3009)).
  314. - cli: Add `idl type` command
  315. ([#3017](https://github.com/coral-xyz/anchor/pull/3017)).
  316. - lang: Add `anchor_lang::pubkey` macro for declaring `Pubkey` const values
  317. ([#3021](https://github.com/coral-xyz/anchor/pull/3021)).
  318. - cli: Sync program ids on the initial build
  319. ([#3023](https://github.com/coral-xyz/anchor/pull/3023)).
  320. - idl: Remove `anchor-syn` dependency
  321. ([#3030](https://github.com/coral-xyz/anchor/pull/3030)).
  322. - lang: Add `const` of program ID to `declare_id!` and `declare_program!`
  323. ([#3019](https://github.com/coral-xyz/anchor/pull/3019)).
  324. - idl: Add separate spec crate
  325. ([#3036](https://github.com/coral-xyz/anchor/pull/3036)).
  326. ### Fixes
  327. - lang: Eliminate variable allocations that build up stack space for token
  328. extension code generation
  329. ([#2913](https://github.com/coral-xyz/anchor/pull/2913)).
  330. - ts: Fix incorrect `maxSupportedTransactionVersion` in `AnchorProvider.send*()`
  331. methods ([#2922](https://github.com/coral-xyz/anchor/pull/2922)).
  332. - cli: Use npm's configured default license for new projects made with
  333. `anchor init` ([#2929](https://github.com/coral-xyz/anchor/pull/2929)).
  334. - cli: add filename to 'Unable to read keypair file' errors
  335. ([#2932](https://github.com/coral-xyz/anchor/pull/2932)).
  336. - idl: Fix path resolution of the `Cargo.lock` of the project when generating
  337. idls for external types
  338. ([#2946](https://github.com/coral-xyz/anchor/pull/2946)).
  339. - idl: Fix potential panic on external type resolution
  340. ([#2954](https://github.com/coral-xyz/anchor/pull/2954)).
  341. - lang: Fix using defined types in instruction parameters with
  342. `declare_program!` ([#2959](https://github.com/coral-xyz/anchor/pull/2959)).
  343. - lang: Fix using const generics with `declare_program!`
  344. ([#2965](https://github.com/coral-xyz/anchor/pull/2965)).
  345. - lang: Fix using `Vec<u8>` type with `declare_program!`
  346. ([#2966](https://github.com/coral-xyz/anchor/pull/2966)).
  347. - lang: Fix `ProgramError::ArithmeticOverflow` not found error
  348. ([#2975](https://github.com/coral-xyz/anchor/pull/2975)).
  349. - lang: Fix using optional accounts with `declare_program!`
  350. ([#2967](https://github.com/coral-xyz/anchor/pull/2967)).
  351. - lang: Fix instruction return type generation with `declare_program!`
  352. ([#2977](https://github.com/coral-xyz/anchor/pull/2977)).
  353. - cli: Fix IDL write getting corrupted from retries
  354. ([#2964](https://github.com/coral-xyz/anchor/pull/2964)).
  355. - idl: Fix `unexpected_cfgs` build warning
  356. ([#2992](https://github.com/coral-xyz/anchor/pull/2992)).
  357. - lang: Make tuple struct fields public in `declare_program!`
  358. ([#2994](https://github.com/coral-xyz/anchor/pull/2994)).
  359. - Remove `rust-version` from crate manifests
  360. ([#3000](https://github.com/coral-xyz/anchor/pull/3000)).
  361. - cli: Fix upgradeable program clones
  362. ([#3010](https://github.com/coral-xyz/anchor/pull/3010)).
  363. - ts: Fix using IDLs that have defined types as generic arguments
  364. ([#3016](https://github.com/coral-xyz/anchor/pull/3016)).
  365. - idl: Fix generation with unsupported expressions
  366. ([#3033](https://github.com/coral-xyz/anchor/pull/3033)).
  367. - idl: Fix using `address` constraint with field expressions
  368. ([#3034](https://github.com/coral-xyz/anchor/pull/3034)).
  369. - lang: Fix using `bytemuckunsafe` account serialization with `declare_program!`
  370. ([#3037](https://github.com/coral-xyz/anchor/pull/3037)).
  371. ### Breaking
  372. ## [0.30.0] - 2024-04-15
  373. ### Features
  374. - cli: Allow force `init` and `new`
  375. ([#2698](https://github.com/coral-xyz/anchor/pull/2698)).
  376. - cli: Add verifiable option when `deploy`
  377. ([#2705](https://github.com/coral-xyz/anchor/pull/2705)).
  378. - cli: Add support for passing arguments to the underlying
  379. `solana program deploy` command with `anchor deploy`
  380. ([#2709](https://github.com/coral-xyz/anchor/pull/2709)).
  381. - lang: Add `InstructionData::write_to` implementation
  382. ([#2733](https://github.com/coral-xyz/anchor/pull/2733)).
  383. - lang: Add `#[interface(..)]` attribute for instruction discriminator overrides
  384. ([#2728](https://github.com/coral-xyz/anchor/pull/2728)).
  385. - ts: Add `.interface(..)` method for instruction discriminator overrides
  386. ([#2728](https://github.com/coral-xyz/anchor/pull/2728)).
  387. - cli: Check `anchor-lang` and CLI version compatibility
  388. ([#2753](https://github.com/coral-xyz/anchor/pull/2753)).
  389. - ts: Add missing IDL PDA seed types
  390. ([#2752](https://github.com/coral-xyz/anchor/pull/2752)).
  391. - cli: `idl close` accepts optional `--idl-address` parameter
  392. ([#2760](https://github.com/coral-xyz/anchor/pull/2760)).
  393. - cli: Add support for simple wildcard patterns in Anchor.toml's
  394. `workspace.members` and `workspace.exclude`.
  395. ([#2785](https://github.com/coral-xyz/anchor/pull/2785)).
  396. - cli: Add `--test-template` option for `init` command
  397. ([#2805](https://github.com/coral-xyz/anchor/pull/2805)).
  398. - cli: `anchor test` is able to run multiple commands
  399. ([#2799](https://github.com/coral-xyz/anchor/pull/2799)).
  400. - cli: Check `@coral-xyz/anchor` package and CLI version compatibility
  401. ([#2813](https://github.com/coral-xyz/anchor/pull/2813)).
  402. - cli: Accept package name as program name
  403. ([#2816](https://github.com/coral-xyz/anchor/pull/2816)).
  404. - cli: Add ability to build and test only a specified program
  405. ([#2823](https://github.com/coral-xyz/anchor/pull/2823)).
  406. - idl: Add new IDL spec
  407. ([#2824](https://github.com/coral-xyz/anchor/pull/2824)).
  408. - idl: Add support for `repr`s
  409. ([#2824](https://github.com/coral-xyz/anchor/pull/2824)).
  410. - idl: Add support for expression evaluation
  411. ([#2824](https://github.com/coral-xyz/anchor/pull/2824)).
  412. - idl: Add support for using external types when generating the IDL
  413. ([#2824](https://github.com/coral-xyz/anchor/pull/2824)).
  414. - idl, ts: Add unit and tuple struct support
  415. ([#2824](https://github.com/coral-xyz/anchor/pull/2824)).
  416. - idl, ts: Add generics support
  417. ([#2824](https://github.com/coral-xyz/anchor/pull/2824)).
  418. - ts: Add `accountsPartial` method to keep the old `accounts` method behavior
  419. ([#2824](https://github.com/coral-xyz/anchor/pull/2824)).
  420. - ts: Make `opts` parameter of `AnchorProvider` constructor optional
  421. ([#2843](https://github.com/coral-xyz/anchor/pull/2843)).
  422. - cli: Add `--no-idl` flag to the `build` command
  423. ([#2847](https://github.com/coral-xyz/anchor/pull/2847)).
  424. - cli: Add priority fees to idl commands
  425. ([#2845](https://github.com/coral-xyz/anchor/pull/2845)).
  426. - ts: Add `prepend` option to MethodBuilder `preInstructions` method
  427. ([#2863](https://github.com/coral-xyz/anchor/pull/2863)).
  428. - lang: Add `declare_program!` macro
  429. ([#2857](https://github.com/coral-xyz/anchor/pull/2857)).
  430. - cli: Add `deactivate_feature` flag to `solana-test-validator` config in
  431. Anchor.toml ([#2872](https://github.com/coral-xyz/anchor/pull/2872)).
  432. - idl: Add `docs` field for constants
  433. ([#2887](https://github.com/coral-xyz/anchor/pull/2887)).
  434. - idl: Store deployment addresses for other clusters
  435. ([#2892](https://github.com/coral-xyz/anchor/pull/2892)).
  436. - lang: Add `Event` utility type to get events from bytes
  437. ([#2897](https://github.com/coral-xyz/anchor/pull/2897)).
  438. - lang, spl: Add support for
  439. [token extensions](https://solana.com/solutions/token-extensions)
  440. ([#2789](https://github.com/coral-xyz/anchor/pull/2789)).
  441. - lang: Return overflow error from `Lamports` trait operations
  442. ([#2907](https://github.com/coral-xyz/anchor/pull/2907)).
  443. ### Fixes
  444. - syn: Add missing `new_from_array` method to `Hash`
  445. ([#2682](https://github.com/coral-xyz/anchor/pull/2682)).
  446. - cli: Switch to Cargo feature resolver(`resolver = "2"`)
  447. ([#2676](https://github.com/coral-xyz/anchor/pull/2676)).
  448. - cli: Fix using user specific path for `provider.wallet` in `Anchor.toml`
  449. ([#2696](https://github.com/coral-xyz/anchor/pull/2696)).
  450. - syn: Fix IDL constant seeds parsing
  451. ([#2699](https://github.com/coral-xyz/anchor/pull/2699)).
  452. - cli: Display errors if toolchain override restoration fails
  453. ([#2700](https://github.com/coral-xyz/anchor/pull/2700)).
  454. - cli: Fix commit based `anchor_version` override
  455. ([#2704](https://github.com/coral-xyz/anchor/pull/2704)).
  456. - spl: Fix compilation with `shmem` feature enabled
  457. ([#2722](https://github.com/coral-xyz/anchor/pull/2722)).
  458. - cli: Localhost default test validator address changes from `localhost` to
  459. `127.0.0.1`, NodeJS 17 IP resolution changes for IPv6
  460. ([#2725](https://github.com/coral-xyz/anchor/pull/2725)).
  461. - lang: Eliminate temporary Vec allocations when serializing data with
  462. discriminant and set the default capacity to 256 bytes
  463. ([#2691](https://github.com/coral-xyz/anchor/pull/2691)).
  464. - lang: Allow custom lifetime in Accounts structure
  465. ([#2741](https://github.com/coral-xyz/anchor/pull/2741)).
  466. - lang: Remove `try_to_vec` usage while setting the return data in order to
  467. reduce heap memory usage
  468. ([#2744](https://github.com/coral-xyz/anchor/pull/2744))
  469. - cli: Show installation progress if Solana tools are not installed when using
  470. toolchain overrides ([#2757](https://github.com/coral-xyz/anchor/pull/2757)).
  471. - ts: Fix formatting enums
  472. ([#2763](https://github.com/coral-xyz/anchor/pull/2763)).
  473. - cli: Fix `migrate` command not working without global `ts-node` installation
  474. ([#2767](https://github.com/coral-xyz/anchor/pull/2767)).
  475. - client, lang, spl, syn: Enable all features for docs.rs build
  476. ([#2774](https://github.com/coral-xyz/anchor/pull/2774)).
  477. - ts: Fix construction of field layouts for type aliased instruction arguments
  478. ([#2821](https://github.com/coral-xyz/anchor/pull/2821))
  479. - idl: Fix IDL ([#2824](https://github.com/coral-xyz/anchor/pull/2824)).
  480. - idl, ts: Make casing consistent
  481. ([#2824](https://github.com/coral-xyz/anchor/pull/2824)).
  482. - ts: Fix not being able to use numbers in instruction, account, or event names
  483. in some cases due to case conversion
  484. ([#2824](https://github.com/coral-xyz/anchor/pull/2824)).
  485. - cli: Fix excessive test validator requests
  486. ([#2828](https://github.com/coral-xyz/anchor/pull/2828)).
  487. - client: Fix `parse_logs_response` to prevent panics when more than 1 outer
  488. instruction exists in logs
  489. ([#2856](https://github.com/coral-xyz/anchor/pull/2856)).
  490. - avm, cli: Fix `stdsimd` feature compilation error from `ahash` when installing
  491. the CLI using newer Rust versions
  492. ([#2867](https://github.com/coral-xyz/anchor/pull/2867)).
  493. - spl: Fix not being able to deserialize newer token 2022 extensions
  494. ([#2876](https://github.com/coral-xyz/anchor/pull/2876)).
  495. - spl: Remove `solana-program` dependency
  496. ([#2900](https://github.com/coral-xyz/anchor/pull/2900)).
  497. - spl: Make `TokenAccount` and ` Mint` `Copy`
  498. ([#2904](https://github.com/coral-xyz/anchor/pull/2904)).
  499. - ts: Add missing errors
  500. ([#2906](https://github.com/coral-xyz/anchor/pull/2906)).
  501. ### Breaking
  502. - cli: Make `cargo build-sbf` the default build command
  503. ([#2694](https://github.com/coral-xyz/anchor/pull/2694)).
  504. - cli: Require explicit `overflow-checks` flag
  505. ([#2716](https://github.com/coral-xyz/anchor/pull/2716)).
  506. - ts: Remove `anchor-deprecated-state` feature
  507. ([#2717](https://github.com/coral-xyz/anchor/pull/2717)).
  508. - lang: Remove `CLOSED_ACCOUNT_DISCRIMINATOR`
  509. ([#2726](https://github.com/coral-xyz/anchor/pull/2726)).
  510. - lang: Make bumps of optional accounts `Option<u8>` rather than `u8`
  511. ([#2730](https://github.com/coral-xyz/anchor/pull/2730)).
  512. - spl: Remove `shared-memory` program
  513. ([#2747](https://github.com/coral-xyz/anchor/pull/2747)).
  514. - ts: Remove `associated`, `account.associated` and `account.associatedAddress`
  515. methods ([#2749](https://github.com/coral-xyz/anchor/pull/2749)).
  516. - cli: `idl upgrade` command closes the IDL buffer account
  517. ([#2760](https://github.com/coral-xyz/anchor/pull/2760)).
  518. - cli: Remove `--jest` option from the `init` command
  519. ([#2805](https://github.com/coral-xyz/anchor/pull/2805)).
  520. - cli: Require `idl-build` feature in program `Cargo.toml`
  521. ([#2824](https://github.com/coral-xyz/anchor/pull/2824)).
  522. - cli: Rename `seeds` feature to `resolution` and make it enabled by default
  523. ([#2824](https://github.com/coral-xyz/anchor/pull/2824)).
  524. - cli: Remove `idl parse` command
  525. ([#2824](https://github.com/coral-xyz/anchor/pull/2824)).
  526. - idl: Change IDL spec ([#2824](https://github.com/coral-xyz/anchor/pull/2824)).
  527. - syn: Remove `idl-parse` and `seeds` features
  528. ([#2824](https://github.com/coral-xyz/anchor/pull/2824)).
  529. - ts: Change `accounts` method to no longer accept resolvable accounts
  530. ([#2824](https://github.com/coral-xyz/anchor/pull/2824)).
  531. - ts: `Program` instances use camelCase for everything
  532. ([#2824](https://github.com/coral-xyz/anchor/pull/2824)).
  533. - ts: Remove discriminator functions
  534. ([#2824](https://github.com/coral-xyz/anchor/pull/2824)).
  535. - ts: Remove `programId` parameter of the `Program` constructor
  536. ([#2864](https://github.com/coral-xyz/anchor/pull/2864)).
  537. - idl, syn: Move IDL types from the `anchor-syn` crate to the new IDL crate
  538. ([#2882](https://github.com/coral-xyz/anchor/pull/2882)).
  539. - idl: Add `#[non_exhaustive]` to IDL enums
  540. ([#2890](https://github.com/coral-xyz/anchor/pull/2890)).
  541. ## [0.29.0] - 2023-10-16
  542. ### Features
  543. - lang: Change all accounts to have a reference to `AccountInfo`
  544. ([#2656](https://github.com/coral-xyz/anchor/pull/2656)).
  545. - lang: Add `get_lamports`, `add_lamports` and `sub_lamports` methods for all
  546. account types ([#2552](https://github.com/coral-xyz/anchor/pull/2552)).
  547. - client: Add a helper struct `DynSigner` to simplify use of
  548. `Client<C> where <C: Clone + Deref<Target = impl Signer>>` with Solana clap
  549. CLI utils that loads `Signer` as `Box<dyn Signer>`
  550. ([#2550](https://github.com/coral-xyz/anchor/pull/2550)).
  551. - lang: Allow CPI calls matching an interface without pinning program ID
  552. ([#2559](https://github.com/coral-xyz/anchor/pull/2559)).
  553. - cli, lang: Add IDL generation through compilation. `anchor build` still uses
  554. parsing method to generate IDLs, use `anchor idl build` to generate IDLs with
  555. the build method ([#2011](https://github.com/coral-xyz/anchor/pull/2011)).
  556. - avm: Add support for the `.anchorversion` file to facilitate switching between
  557. different versions of the `anchor-cli`
  558. ([#2553](https://github.com/coral-xyz/anchor/pull/2553)).
  559. - ts: Add ability to access workspace programs independent of the casing used,
  560. e.g. `anchor.workspace.myProgram`, `anchor.workspace.MyProgram`...
  561. ([#2579](https://github.com/coral-xyz/anchor/pull/2579)).
  562. - bench: Add benchmarking for program binary size
  563. ([#2591](https://github.com/coral-xyz/anchor/pull/2591)).
  564. - spl: Export `mpl-token-metadata` crate
  565. ([#2583](https://github.com/coral-xyz/anchor/pull/2583)).
  566. - spl: Add `TokenRecordAccount` for pNFTs
  567. ([#2597](https://github.com/coral-xyz/anchor/pull/2597)).
  568. - ts: Add support for unnamed(tuple) enum in accounts
  569. ([#2601](https://github.com/coral-xyz/anchor/pull/2601)).
  570. - cli: Add program template with multiple files for instructions, state...
  571. ([#2602](https://github.com/coral-xyz/anchor/pull/2602)).
  572. - bench: Add benchmarking for stack memory usage
  573. ([#2617](https://github.com/coral-xyz/anchor/pull/2617)).
  574. - lang: `Box` the inner enums of `anchor_lang::error::Error` to optimize
  575. `anchor_lang::Result`
  576. ([#2600](https://github.com/coral-xyz/anchor/pull/2600)).
  577. - ts: Add strong type support for `Program.addEventListener` method
  578. ([#2627](https://github.com/coral-xyz/anchor/pull/2627)).
  579. - syn: Add `IdlBuild` trait to implement IDL support for custom types
  580. ([#2629](https://github.com/coral-xyz/anchor/pull/2629)).
  581. - spl: Add `idl-build` feature. IDL build method will not work without enabling
  582. this feature when using `anchor-spl`
  583. ([#2629](https://github.com/coral-xyz/anchor/pull/2629)).
  584. - lang: Add support for type aliases in IDLs
  585. ([#2637](https://github.com/coral-xyz/anchor/pull/2637)).
  586. - cli: Add `test.upgradeable`, `test.genesis.upgradeable` setting in
  587. `Anchor.toml` to support testing upgradeable programs
  588. ([#2642](https://github.com/coral-xyz/anchor/pull/2642)).
  589. - cli, client, lang, spl: Update Solana toolchain and dependencies to `1.17.0`,
  590. `1.16` remains supported
  591. ([#2645](https://github.com/coral-xyz/anchor/pull/2645)).
  592. - spl: Add support for memo program
  593. ([#2661](https://github.com/coral-xyz/anchor/pull/2661)).
  594. - avm: Add `anchor-cli` installation from commit
  595. ([#2659](https://github.com/coral-xyz/anchor/pull/2659)).
  596. - cli: Add `toolchain` property in `Anchor.toml` to override Anchor and Solana
  597. versions ([#2649](https://github.com/coral-xyz/anchor/pull/2649)).
  598. ### Fixes
  599. - ts: Packages no longer depend on `assert`
  600. ([#2535](https://github.com/coral-xyz/anchor/pull/2535)).
  601. - lang: Support for `const` in the `InitSpace` macro
  602. ([#2555](https://github.com/coral-xyz/anchor/pull/2555)).
  603. - cli: Support workspace inheritance
  604. ([#2570](https://github.com/coral-xyz/anchor/pull/2570)).
  605. - client: Compile with Solana `1.14`
  606. ([#2572](https://github.com/coral-xyz/anchor/pull/2572)).
  607. - cli: Fix `anchor build --no-docs` adding docs to the IDL
  608. ([#2575](https://github.com/coral-xyz/anchor/pull/2575)).
  609. - ts: Load workspace programs on-demand rather than loading all of them at once
  610. ([#2579](https://github.com/coral-xyz/anchor/pull/2579)).
  611. - lang: Fix `associated_token::token_program` constraint
  612. ([#2603](https://github.com/coral-xyz/anchor/pull/2603)).
  613. - cli: Fix `anchor account` command panicking outside of workspace
  614. ([#2620](https://github.com/coral-xyz/anchor/pull/2620)).
  615. - lang: IDL named enum variant fields are now camelCase as opposed to
  616. snake_case, consistent with the other IDL types
  617. ([#2633](https://github.com/coral-xyz/anchor/pull/2633)).
  618. - avm: Remove excessive panics and handle the errors gracefully
  619. ([#2671](https://github.com/coral-xyz/anchor/pull/2671)).
  620. ### Breaking
  621. - lang: Switch to type safe bumps in context
  622. ([#2542](https://github.com/coral-xyz/anchor/pull/2542)).
  623. - syn: `idl` feature has been replaced with `idl-build`, `idl-parse` and
  624. `idl-types` features ([#2011](https://github.com/coral-xyz/anchor/pull/2011)).
  625. - syn: IDL `parse` method now returns `Result<Idl>` instead of
  626. `Result<Option<Idl>>`
  627. ([#2582](https://github.com/coral-xyz/anchor/pull/2582)).
  628. - spl: Update `mpl-token-metadata` dependency to use the client SDK instead of
  629. the program crate ([#2632](https://github.com/coral-xyz/anchor/pull/2632)).
  630. - ts: Remove `base64-js` dependency
  631. ([#2635](https://github.com/coral-xyz/anchor/pull/2635)).
  632. - syn: `IdlTypeDefinitionTy` enum has a new variant `Alias`
  633. ([#2637](https://github.com/coral-xyz/anchor/pull/2637)).
  634. - cli, client, lang, spl: Solana `1.14` is no longer supported, minimum required
  635. Solana version is `1.16.0`
  636. ([#2645](https://github.com/coral-xyz/anchor/pull/2645)).
  637. - cli: `anchor_version` and `solana_version` property in `Anchor.toml` that was
  638. being used in verifiable builds are moved inside `toolchain`. They are now
  639. being used for all commands in the workspace, not just verifiable builds
  640. ([#2649](https://github.com/coral-xyz/anchor/pull/2649)).
  641. ## [0.28.0] - 2023-06-09
  642. ### Features
  643. - client: Add `async` feature flag to use an asynchronous anchor-client
  644. ([#2488](https://github.com/coral-xyz/anchor/pull/2488)).
  645. - spl: Add metadata wrappers `approve_collection_authority`,
  646. `bubblegum_set_collection_size`, `burn_edition_nft`, `burn_nft`,
  647. `revoke_collection_authority`, `set_token_standard`, `utilize`,
  648. `unverify_sized_collection_item`, `unverify_collection`
  649. ([#2430](https://github.com/coral-xyz/anchor/pull/2430))
  650. - spl: Add `token_program` constraint to `Token`, `Mint`, and `AssociatedToken`
  651. accounts in order to override required `token_program` fields and use
  652. different token interface implementations in the same instruction
  653. ([#2460](https://github.com/coral-xyz/anchor/pull/2460))
  654. - cli: Add support for Solidity programs. `anchor init` and `anchor new` take an
  655. option `--solidity` which creates solidity code rather than rust.
  656. `anchor build` and `anchor test` work accordingly
  657. ([#2421](https://github.com/coral-xyz/anchor/pull/2421))
  658. - bench: Add benchmarking for compute units usage
  659. ([#2466](https://github.com/coral-xyz/anchor/pull/2466))
  660. - cli: `idl set-buffer`, `idl set-authority` and `idl close` take an option
  661. `--print-only`. which prints transaction in a base64 Borsh compatible format
  662. but not sent to the cluster. It's helpful when managing authority under a
  663. multisig, e.g., a user can create a proposal for a `Custom Instruction` in SPL
  664. Governance ([#2486](https://github.com/coral-xyz/anchor/pull/2486)).
  665. - lang: Add `emit_cpi!` and `#[event_cpi]` macros(behind `event-cpi` feature
  666. flag) to store event logs in transaction metadata
  667. ([#2438](https://github.com/coral-xyz/anchor/pull/2438)).
  668. - cli: Add `keys sync` command to sync program id declarations
  669. ([#2505](https://github.com/coral-xyz/anchor/pull/2505)).
  670. - cli: Create new programs with correct program ids
  671. ([#2509](https://github.com/coral-xyz/anchor/pull/2509)).
  672. - cli, client, lang, spl: Update Solana toolchain and dependencies to `1.16.0`
  673. and specify maximum version of `<1.17.0`
  674. ([#2512](https://github.com/coral-xyz/anchor/pull/2512)).
  675. - cli: `anchor deploy` command's `--program-name` argument accepts program lib
  676. names ([#2519](https://github.com/coral-xyz/anchor/pull/2519)).
  677. ### Fixes
  678. - ts: Narrowed `AccountClient` type to it's appropriate account type
  679. ([#2440](https://github.com/coral-xyz/anchor/pull/2440))
  680. - lang: Fix inability to use identifiers `program_id`, `accounts`, `ix_data`,
  681. `remaining_accounts` in instruction arguments
  682. ([#2464](https://github.com/coral-xyz/anchor/pull/2464))
  683. - cli: Fix incorrect `metadata.address` generation in IDL after deploying with a
  684. custom keypair ([#2485](https://github.com/coral-xyz/anchor/pull/2485))
  685. - cli: IDL commands no longer hang when the payer doesn't have funds to pay for
  686. the transaction fee ([#2492](https://github.com/coral-xyz/anchor/pull/2492))
  687. - cli: Fix `anchor new` not updating `Anchor.toml`
  688. ([#2516](https://github.com/coral-xyz/anchor/pull/2516)).
  689. - client, lang, spl: Allow wider range of dependency versions to reduce
  690. dependency issues ([#2524](https://github.com/coral-xyz/anchor/pull/2524)).
  691. ### Breaking
  692. - lang: Identifiers that are intended for internal usage(`program_id`,
  693. `accounts`, `ix_data`, `remaining_accounts`) have been renamed with `__`
  694. prefix ([#2464](https://github.com/coral-xyz/anchor/pull/2464))
  695. - spl: Remove the `metadata::create_metadata_account_v2` deprecated wrapper
  696. since it was removed from token metadata program
  697. ([#2480](https://github.com/coral-xyz/anchor/pull/2480))
  698. ## [0.27.0] - 2023-03-08
  699. ### Features
  700. - spl: Add `MasterEditionAccount` account deserialization to spl metadata
  701. ([#2393](https://github.com/coral-xyz/anchor/pull/2393)).
  702. - lang: Add the `InitSpace` derive macro to automatically calculate the space at
  703. the initialization of an account
  704. ([#2346](https://github.com/coral-xyz/anchor/pull/2346)).
  705. - cli: Add `env` option to verifiable builds
  706. ([#2325](https://github.com/coral-xyz/anchor/pull/2325)).
  707. - cli: Add `idl close` command to close a program's IDL account
  708. ([#2329](https://github.com/coral-xyz/anchor/pull/2329)).
  709. - cli: `idl init` now supports very large IDL files
  710. ([#2329](https://github.com/coral-xyz/anchor/pull/2329)).
  711. - spl: Add `transfer_checked` function
  712. ([#2353](https://github.com/coral-xyz/anchor/pull/2353)).
  713. - spl: Add `approve_checked` function
  714. ([#2401](https://github.com/coral-xyz/anchor/pull/2401)).
  715. - cli: Add `--skip-build` option to the verify command
  716. ([#2387](https://github.com/coral-xyz/anchor/pull/2387)).
  717. - client: Add support for multithreading to the rust client: use flag
  718. `--multithreaded` ([#2321](https://github.com/coral-xyz/anchor/pull/2321)).
  719. - client: Add `async_rpc` a method which returns a nonblocking solana rpc client
  720. ([#2322](https://github.com/coral-xyz/anchor/pull/2322)).
  721. - avm, cli: Use the `rustls-tls` feature of `reqwest` so that users don't need
  722. OpenSSL installed ([#2385](https://github.com/coral-xyz/anchor/pull/2385)).
  723. - ts: Add `VersionedTransaction` support. Methods in the `Provider` class and
  724. `Wallet` interface now use the argument
  725. `tx: Transaction | VersionedTransaction`
  726. ([#2427](https://github.com/coral-xyz/anchor/pull/2427)).
  727. - cli: Add `--arch sbf` option to compile programs using `cargo build-sbf`
  728. ([#2398](https://github.com/coral-xyz/anchor/pull/2398)).
  729. - land: Support multiple programs with the same interface using `Interface` and
  730. `InterfaceAccount` types, related to token-2022
  731. ([#2386](https://github.com/coral-xyz/anchor/pull/2386)).
  732. ### Fixes
  733. - ts: Make the return type of `AccountClient.fetchMultiple` match the account
  734. type being fetched ([#2390](https://github.com/coral-xyz/anchor/pull/2390))
  735. - cli: Don't regenerate idl in read_all_programs().
  736. ([#2332](https://github.com/coral-xyz/anchor/pull/2332)).
  737. - ts: `provider.simulate` will send the transaction with `sigVerify: false` if
  738. no `signers` are present
  739. ([#2331](https://github.com/coral-xyz/anchor/pull/2331)).
  740. - cli: Failing commands will return the correct exit status.
  741. ([#2370](https://github.com/coral-xyz/anchor/pull/2370)).
  742. - idl: Update the IDL program to use non-deprecated account types
  743. ([#2365](https://github.com/coral-xyz/anchor/pull/2365)).
  744. - ts: Enum fields weren't being converted from snake_case to camelCase
  745. ([#2378](https://github.com/coral-xyz/anchor/pull/2378)).
  746. - lang/cli: Update to solana-program version 1.14.16 and rust version 1.60,
  747. appears to still be incompatible with 1.15 CLI
  748. ([#2420](https://github.com/coral-xyz/anchor/pull/2420)).
  749. ### Breaking
  750. - lang: Remove deprecated account types: `CpiAccount`, `Loader` and
  751. `ProgramAccount` ([#2375](https://github.com/coral-xyz/anchor/pull/2375)).
  752. - lang: Remove `state` and `interface` attributes
  753. ([#2285](https://github.com/coral-xyz/anchor/pull/2285)).
  754. - lang: Remove deprecated literal constraint which has been replaced by
  755. `#[account(constraint = {})]`
  756. ([#2379](https://github.com/coral-xyz/anchor/pull/2379)).
  757. - lang: `account(zero_copy)` and `zero_copy` attributes now derive the
  758. `bytemuck::Pod` and `bytemuck::Zeroable` traits instead of using `unsafe impl`
  759. ([#2330](https://github.com/coral-xyz/anchor/pull/2330)). This imposes useful
  760. restrictions on the type, like not having padding bytes and all fields being
  761. `Pod` themselves. See
  762. [bytemuck::Pod](https://docs.rs/bytemuck/latest/bytemuck/trait.Pod.html) for
  763. details. This change requires adding
  764. `bytemuck = { version = "1.4.0", features = ["derive", "min_const_generics"]}`
  765. to your `cargo.toml`. Legacy applications can still use
  766. `#[account(zero_copy(unsafe))]` and `#[zero_copy(unsafe)]` for the old
  767. behavior.
  768. - ts: Remove `createProgramAddressSync`, `findProgramAddressSync` (now available
  769. in `@solana/web3.js`) and update `associatedAddress` to be synchronous
  770. ([#2357](https://github.com/coral-xyz/anchor/pull/2357)).
  771. ## [0.26.0] - 2022-12-15
  772. ### Features
  773. - cli: Add `--run` to `anchor test` for running a subset of test suites
  774. ([#1828](https://github.com/coral-xyz/anchor/issues/1828)).
  775. - client: Add `transaction` functions to RequestBuilder
  776. ([#1958](https://github.com/coral-xyz/anchor/pull/1958)).
  777. - spl: Add `create_metadata_accounts_v3` and `set_collection_size` wrappers
  778. ([#2119](https://github.com/coral-xyz/anchor/pull/2119)).
  779. - spl: Add `MetadataAccount` account deserialization.
  780. ([#2014](https://github.com/coral-xyz/anchor/pull/2014)).
  781. - spl: Add `update_primary_sale_happened_via_token` wrapper
  782. ([#2173](https://github.com/coral-xyz/anchor/pull/2173)).
  783. - spl: Add `sign_metadata` and `remove_creator_verification` wrappers
  784. ([#2175](https://github.com/coral-xyz/anchor/pull/2175)).
  785. - spl: Add `initialize_account3` and `initialize_mint2`
  786. ([#2265](https://github.com/coral-xyz/anchor/pull/2265)).
  787. - spl: Change `serum-dex` to `openbook-dex`
  788. ([#2308](https://github.com/coral-xyz/anchor/pull/2308)).
  789. - lang: Add parsing for consts from impl blocks for IDL PDA seeds generation
  790. ([#2128](https://github.com/coral-xyz/anchor/pull/2128)).
  791. - lang: Account closing reassigns to system program and reallocates
  792. ([#2169](https://github.com/coral-xyz/anchor/pull/2169)).
  793. - ts: Add coders for SPL programs
  794. ([#2143](https://github.com/coral-xyz/anchor/pull/2143)).
  795. - ts: Add `has_one` relations inference so accounts mapped via has_one
  796. relationships no longer need to be provided
  797. ([#2160](https://github.com/coral-xyz/anchor/pull/2160)).
  798. - ts: Add ability to set args after setting accounts and retrieving pubkeys
  799. ([#2160](https://github.com/coral-xyz/anchor/pull/2160)).
  800. - ts: Add `.prepare()` to builder pattern
  801. ([#2160](https://github.com/coral-xyz/anchor/pull/2160)).
  802. - spl: Add `freeze_delegated_account` and `thaw_delegated_account` wrappers
  803. ([#2164](https://github.com/coral-xyz/anchor/pull/2164)).
  804. - ts: Add `feePayer` check to `AnchorProvider` methods, so that anchor writes
  805. the provider's wallet as fee payer if fee payer isn't already set
  806. ([#2186](https://github.com/coral-xyz/anchor/pull/2186)).
  807. - ts: Add nested PDA inference
  808. ([#2194](https://github.com/coral-xyz/anchor/pull/2194)).
  809. - ts: Add ability to resolve missing accounts with a custom resolver
  810. ([#2194](https://github.com/coral-xyz/anchor/pull/2194)).
  811. - ts: Update the Solana web3 library used by anchor ts to version 1.64.0
  812. ([#2220](https://github.com/coral-xyz/anchor/issues/2220)).
  813. - lang: Updates `AccountsClose` to make it safe to call manually
  814. ([#2209](https://github.com/coral-xyz/anchor/pull/2209)).
  815. - lang: Update rust used in the repo version 1.62
  816. ([#2272](https://github.com/coral-xyz/anchor/pull/2272)).
  817. - cli: Allow custom cluster config
  818. ([#2271](https://github.com/coral-xyz/anchor/pull/2271)).
  819. - ts: Add optional flag to parseLogs to throw an error on decoding failure
  820. ([#2043](https://github.com/coral-xyz/anchor/pull/2043)).
  821. - cli: Add `test.validator.geyser_plugin_config` support
  822. ([#2016](https://github.com/coral-xyz/anchor/pull/2016)).
  823. - cli: Add `account` subcommand to cli
  824. ([#1923](https://github.com/coral-xyz/anchor/pull/1923))
  825. - cli: Add `ticks_per_slot` option to Validator args
  826. ([#1875](https://github.com/coral-xyz/anchor/pull/1875)).
  827. ### Fixes
  828. - lang: Fix parsing for bytes literals in the IDL
  829. ([#2261](https://github.com/coral-xyz/anchor/pull/2261)).
  830. - lang: Fix IDL `seed` generation for byte string literals
  831. ([#2125](https://github.com/coral-xyz/anchor/pull/2125)).
  832. - ts: Update seeds inference to allow nested user defined structs within the
  833. seeds ([#2198](https://github.com/coral-xyz/anchor/pull/2198)).
  834. - event: Fix multiple event listeners with the same name
  835. ([#2165](https://github.com/coral-xyz/anchor/pull/2165)).
  836. - lang: Prevent the payer account from being initialized as a program account
  837. ([#2284](https://github.com/coral-xyz/anchor/pull/2284)).
  838. - ts: Fixing breaking change where null or undefined wallet throws an error
  839. ([#2303](https://github.com/coral-xyz/anchor/pull/2303)).
  840. - ts: Fixed `.fetchNullable()` to be robust towards accounts only holding a
  841. balance ([#2301](https://github.com/coral-xyz/anchor/pull/2301)).
  842. - lang: Only add public enums to the IDL
  843. ([#2309](https://github.com/coral-xyz/anchor/pull/2309)).
  844. - lang: Fix heap intensive error mapping
  845. ([#2313](https://github.com/coral-xyz/anchor/pull/2313)).
  846. ### Breaking
  847. - ts: SPL coders have been removed from the main Anchor package.
  848. ([#2155](https://github.com/coral-xyz/anchor/pull/2155))
  849. - lang: Remove `rent` from constraints
  850. ([#2265](https://github.com/coral-xyz/anchor/pull/2265)).
  851. - spl: Remove `rent` from `associated_token::Create`
  852. ([#2265](https://github.com/coral-xyz/anchor/pull/2265)).
  853. - lang: Add `Discriminator` and `Owner` trait implementation for structures
  854. representing instructions
  855. ([#1997](https://github.com/coral-xyz/anchor/pull/1997)).
  856. - ts: '@coral-xyz/borsh' package is now part of the yarn monorepo
  857. ([#2290](https://github.com/coral-xyz/anchor/pull/2290)). The borsh package
  858. needs to be built before the anchor package can be built but this should
  859. happen automatically when running `yarn build` in packages/anchor, see
  860. [#2299](https://github.com/coral-xyz/anchor/pull/2299) and
  861. [#2306](https://github.com/coral-xyz/anchor/pull/2306).
  862. - lang: Add support for optionally passing in accounts using the syntax
  863. `Optional<Account<'info, T>>`. Shouldn't affect existing programs but may be a
  864. breaking change to tools that use the anchor generated IDL.
  865. [#2101](https://github.com/coral-xyz/anchor/pull/2101).
  866. - ts: Switch from `@project-serum/anchor` to the `@coral-xyz/anchor` package
  867. [#2318](https://github.com/coral-xyz/anchor/pull/2318).
  868. ## [0.25.0] - 2022-07-05
  869. ### Features
  870. - lang: Add `realloc`, `realloc::payer`, and `realloc::zero` as a new constraint
  871. group for program accounts
  872. ([#1986](https://github.com/coral-xyz/anchor/pull/1986)).
  873. - lang: Add `PartialEq` and `Eq` for `anchor_lang::Error`
  874. ([#1544](https://github.com/coral-xyz/anchor/pull/1544)).
  875. - cli: Add `--skip-build` to `anchor publish`
  876. ([#1786](https://github.com/coral-xyz/anchor/pull/1841)).
  877. - cli: Add `--program-keypair` to `anchor deploy`
  878. ([#1786](https://github.com/coral-xyz/anchor/pull/1786)).
  879. - cli: Add compilation optimizations to cli template
  880. ([#1807](https://github.com/coral-xyz/anchor/pull/1807)).
  881. - cli: `build` now adds docs to idl. This can be turned off with `--no-docs`
  882. ([#1561](https://github.com/coral-xyz/anchor/pull/1561)).
  883. - cli: Add `b` and `t` aliases for `build` and `test` respectively
  884. ([#1823](https://github.com/coral-xyz/anchor/pull/1823)).
  885. - spl: Add more derived traits to `TokenAccount` to `Mint`
  886. ([#1818](https://github.com/coral-xyz/anchor/pull/1818)).
  887. - spl: Add `sync_native` token program CPI wrapper function
  888. ([#1833](https://github.com/coral-xyz/anchor/pull/1833)).
  889. - cli: Allow passing arguments to an underlying script with `anchor run`
  890. ([#1914](https://github.com/coral-xyz/anchor/pull/1914)).
  891. - ts: Implement a coder for system program
  892. ([#1920](https://github.com/coral-xyz/anchor/pull/1920)).
  893. - ts: Add `program.coder.types` for encoding/decoding user-defined types
  894. ([#1931](https://github.com/coral-xyz/anchor/pull/1931)).
  895. - client: Add `send_with_spinner_and_config` function to RequestBuilder
  896. ([#1926](https://github.com/coral-xyz/anchor/pull/1926)).
  897. - ts: Implement a coder for SPL associated token program
  898. ([#1939](https://github.com/coral-xyz/anchor/pull/1939)).
  899. - ts: verbose error for missing `ANCHOR_WALLET` variable when using
  900. `NodeWallet.local()` ([#1958](https://github.com/coral-xyz/anchor/pull/1958)).
  901. - ts: Add `MethodsBuilder#accountsStrict` for strict typing on ix account input
  902. ([#2019](https://github.com/coral-xyz/anchor/pull/2019)).
  903. - Update solana dependencies to 1.10.29
  904. ([#2027](https://github.com/coral-xyz/anchor/pull/2027)).
  905. ### Fixes
  906. - cli: Fix `anchor keys list` reading the `target` folder in the wrong path
  907. ([#2063](https://github.com/coral-xyz/anchor/pull/2063)).
  908. - cli: Move `overflow-checks` into workspace `Cargo.toml` so that it will not be
  909. ignored by compiler ([#1806](https://github.com/coral-xyz/anchor/pull/1806)).
  910. - lang: Fix missing account name information when deserialization fails when
  911. using `init` or `zero`
  912. ([#1800](https://github.com/coral-xyz/anchor/pull/1800)).
  913. - ts: Expose the wallet's publickey on the Provider
  914. ([#1845](https://github.com/coral-xyz/anchor/pull/1845)).
  915. ### Breaking
  916. - ts: Change `BROWSER` env variable to `ANCHOR_BROWSER`
  917. ([#1233](https://github.com/coral-xyz/anchor/pull/1233)).
  918. - ts: Add transaction signature to `EventCallback` parameters
  919. ([#1851](https://github.com/coral-xyz/anchor/pull/1851)).
  920. - ts: Change `EventParser#parseLogs` implementation to be a generator instead of
  921. callback function ([#2018](https://github.com/coral-xyz/anchor/pull/2018)).
  922. - lang: Adds a new `&mut reallocs: BTreeSet<Pubkey>` argument to
  923. `Accounts::try_accounts`
  924. ([#1986](https://github.com/coral-xyz/anchor/pull/1986)).
  925. ## [0.24.2] - 2022-04-13
  926. ### Fixes
  927. - lang: Fix `returns` being serialized as `null` instead of `undefined` in IDL
  928. ([#1782](https://github.com/coral-xyz/anchor/pull/1782)).
  929. ## [0.24.1] - 2022-04-12
  930. ### Fixes
  931. - lang: Fix `anchor build` failing if `Test.toml` included a relative path that
  932. didn't exist yet because it's created by `anchor build`
  933. ([#1772](https://github.com/coral-xyz/anchor/pull/1772)).
  934. - cli: Update js/ts template to use new `AnchorProvider` class
  935. ([#1770](https://github.com/coral-xyz/anchor/pull/1770)).
  936. ## [0.24.0] - 2022-04-12
  937. ### Features
  938. - lang: Add support for multiple test suites with separate local validators
  939. ([#1681](https://github.com/coral-xyz/anchor/pull/1681)).
  940. - lang: Add return values to CPI client
  941. ([#1598](https://github.com/coral-xyz/anchor/pull/1598)).
  942. - ts: Add view functions
  943. ([#1695](https://github.com/coral-xyz/anchor/pull/1695)).
  944. - avm: New `avm update` command to update the Anchor CLI to the latest version
  945. ([#1670](https://github.com/coral-xyz/anchor/pull/1670)).
  946. - cli: Update js/ts templates to use new `program.methods` syntax
  947. ([#1732](https://github.com/coral-xyz/anchor/pull/1732)).
  948. - cli: Workspaces created with `anchor init` now come with the `prettier`
  949. formatter and scripts included
  950. ([#1741](https://github.com/coral-xyz/anchor/pull/1741)).
  951. - ts: Add `pubkeys` function to methods builder to get all instruction account
  952. addresses ([#1733](https://github.com/coral-xyz/anchor/pull/1733)).
  953. - ts: Export `LangErrorCode` and `LangErrorMessage` from `error.ts`
  954. ([#1756](https://github.com/coral-xyz/anchor/pull/1756)).
  955. ### Fixes
  956. - avm: `avm install` no longer downloads the version if already installed in the
  957. machine ([#1670](https://github.com/coral-xyz/anchor/pull/1670)).
  958. - cli: make `anchor test` fail when used with `--skip-deploy` option and without
  959. `--skip-local-validator` option but there already is a running validator
  960. ([#1675](https://github.com/coral-xyz/anchor/pull/1675)).
  961. - lang: Return proper error instead of panicking if account length is smaller
  962. than discriminator in functions of `(Account)Loader`
  963. ([#1678](https://github.com/coral-xyz/anchor/pull/1678)).
  964. - cli: Add `@types/bn.js` to `devDependencies` in cli template
  965. ([#1712](https://github.com/coral-xyz/anchor/pull/1712)).
  966. - ts: Event listener no longer crashes on Program Upgrade or any other
  967. unexpected log ([#1757](https://github.com/coral-xyz/anchor/pull/1757)).
  968. ### Breaking
  969. - avm: `avm install` switches to the newly installed version after installation
  970. finishes ([#1670](https://github.com/coral-xyz/anchor/pull/1670)).
  971. - spl: Re-export the `spl_token` crate
  972. ([#1665](https://github.com/coral-xyz/anchor/pull/1665)).
  973. - lang, cli, spl: Update solana toolchain to v1.9.13
  974. ([#1653](https://github.com/coral-xyz/anchor/pull/1653) and
  975. [#1751](https://github.com/coral-xyz/anchor/pull/1751)).
  976. - lang: `Program` type now deserializes `programdata_address` only on demand
  977. ([#1723](https://github.com/coral-xyz/anchor/pull/1723)).
  978. - ts: Make `Provider` an interface and adjust its signatures and add
  979. `AnchorProvider` implementor class
  980. ([#1707](https://github.com/coral-xyz/anchor/pull/1707)).
  981. - spl: Change "to" to "from" in `token::burn`
  982. ([#1080](https://github.com/coral-xyz/anchor/pull/1080)).
  983. ## [0.23.0] - 2022-03-20
  984. ### Features
  985. - cli: Add `anchor clean` command that's the same as `cargo clean` but preserves
  986. keypairs inside `target/deploy`
  987. ([#1470](https://github.com/coral-xyz/anchor/issues/1470)).
  988. - cli: Running `anchor init` now initializes a new git repository for the
  989. workspace. This can be disabled with the `--no-git` flag
  990. ([#1605](https://github.com/coral-xyz/anchor/pull/1605)).
  991. - cli: Add support for `anchor idl fetch` to work outside anchor workspace
  992. ([#1509](https://github.com/coral-xyz/anchor/pull/1509)).
  993. - cli: [[test.validator.clone]] also clones the program data account of programs
  994. owned by the bpf upgradeable loader
  995. ([#1481](https://github.com/coral-xyz/anchor/issues/1481)).
  996. - lang: Add new `AccountSysvarMismatch` error code and test cases for sysvars
  997. ([#1535](https://github.com/coral-xyz/anchor/pull/1535)).
  998. - lang: Replace `std::io::Cursor` with a custom `Write` impl that uses the
  999. Solana mem syscalls ([#1589](https://github.com/coral-xyz/anchor/pull/1589)).
  1000. - lang: Add `require_neq`, `require_keys_neq`, `require_gt`, and `require_gte`
  1001. comparison macros ([#1622](https://github.com/coral-xyz/anchor/pull/1622)).
  1002. - lang: Handle arrays with const as size in instruction data
  1003. ([#1623](https://github.com/coral-xyz/anchor/issues/1623).
  1004. - spl: Add support for revoke instruction
  1005. ([#1493](https://github.com/coral-xyz/anchor/pull/1493)).
  1006. - ts: Add provider parameter to `Spl.token` factory method
  1007. ([#1597](https://github.com/coral-xyz/anchor/pull/1597)).
  1008. ### Fixes
  1009. - ts: Fix the loss of strict typing using the `methods` namespace on builder
  1010. functions ([#1539](https://github.com/coral-xyz/anchor/pull/1539)).
  1011. - spl: Update `spl/governance` to use new errors
  1012. ([#1582](https://github.com/coral-xyz/anchor/pull/1582)).
  1013. - client: Fix `Cluster`'s `FromStr` implementation
  1014. ([#1362](https://github.com/coral-xyz/anchor/pull/1362)).
  1015. - lang: Implement `Key` for `Pubkey` again, so `associated_token::*` constraints
  1016. can use pubkey targets again
  1017. ([#1601](https://github.com/coral-xyz/anchor/pull/1601)).
  1018. - lang: Adjust error code so `#[error_code]` works with just importing
  1019. `anchor_lang::error_code`
  1020. ([#1610](https://github.com/coral-xyz/anchor/pull/1610)).
  1021. - ts: Fix `spl-token` coder account parsing
  1022. ([#1604](https://github.com/coral-xyz/anchor/pull/1604)).
  1023. - cli: Fix `npm install` fallback if `yarn` install doesn't work
  1024. ([#1643](https://github.com/coral-xyz/anchor/pull/1643)).
  1025. - lang: Fix bug where `owner = <target>` would not compile because of missing
  1026. type annotation ([#1648](https://github.com/coral-xyz/anchor/pull/1648)).
  1027. - ts: Adjust `send` and `simulate` functions in `provider.ts`, so they use the
  1028. return value of
  1029. `Wallet.signTransaction`([#1527](https://github.com/coral-xyz/anchor/pull/1527)).
  1030. ### Breaking
  1031. - ts: Mark `transaction`, `instruction`, `simulate` and `rpc` program namespaces
  1032. as deprecated in favor of `methods`
  1033. ([#1539](https://github.com/coral-xyz/anchor/pull/1539)).
  1034. - ts: No longer allow manual setting of globally resolvable program public keys
  1035. in `methods#accounts()`.
  1036. ([#1548][https://github.com/coral-xyz/anchor/pull/1548])
  1037. - lang/ts: Events are now emitted using the `sol_log_data` syscall
  1038. ([#1608](https://github.com/coral-xyz/anchor/pull/1608)).
  1039. - lang: Remove space calculation using `#[derive(Default)]`
  1040. ([#1519](https://github.com/coral-xyz/anchor/pull/1519)).
  1041. - lang: Add support for logging expected and actual values and pubkeys. Add
  1042. `require_eq` and `require_keys_eq` macros. Add default error code to `require`
  1043. macro ([#1572](https://github.com/coral-xyz/anchor/pull/1572)).
  1044. - lang: Add `system_program` CPI wrapper functions. Make `system_program` module
  1045. public instead of re-exporting
  1046. `system_program::System`([#1629](https://github.com/coral-xyz/anchor/pull/1629)).
  1047. - cli: `avm use` no long prompts [y/n] if an install is needed first - it just
  1048. tells the user to `avm install`
  1049. ([#1565](https://github.com/coral-xyz/anchor/pull/1565))
  1050. - ts: Add `AnchorError` with program stack and also a program stack for
  1051. non-`AnchorError` errors
  1052. ([#1640](https://github.com/coral-xyz/anchor/pull/1640)). `AnchorError` is not
  1053. returned for `processed` tx that have `skipPreflight` set to `true` (it falls
  1054. back to `ProgramError` or the raw solana library error).
  1055. ## [0.22.1] - 2022-02-28
  1056. ### Fixes
  1057. - cli: Fix rust template
  1058. ([#1488](https://github.com/coral-xyz/anchor/pull/1488)).
  1059. - lang: Handle array sizes with variable sizes in events and array size casting
  1060. in IDL parsing ([#1485](https://github.com/coral-xyz/anchor/pull/1485))
  1061. ## [0.22.0] - 2022-02-20
  1062. ### Features
  1063. - lang: Add check that declared id == program id
  1064. ([#1451](https://github.com/coral-xyz/anchor/pull/1451)).
  1065. - ts: Added float types support
  1066. ([#1425](https://github.com/coral-xyz/anchor/pull/1425)).
  1067. - cli: Add `--skip-lint` option to disable check linting introduced in
  1068. ([#1452](https://github.com/coral-xyz/anchor/pull/1452)) for rapid prototyping
  1069. ([#1482](https://github.com/coral-xyz/anchor/pull/1482)).
  1070. ### Fixes
  1071. - ts: Allow nullable types for `Option<T>` mapped types
  1072. ([#1428](https://github.com/coral-xyz/anchor/pull/1428)).
  1073. ### Breaking
  1074. - lang: Enforce that the payer for an init-ed account be marked `mut`
  1075. ([#1271](https://github.com/coral-xyz/anchor/pull/1271)).
  1076. - lang: All error-related code is now in the error module
  1077. ([#1426](https://github.com/coral-xyz/anchor/pull/1426)).
  1078. - lang: Require doc comments when using AccountInfo or UncheckedAccount types
  1079. ([#1452](https://github.com/coral-xyz/anchor/pull/1452)).
  1080. - lang: add
  1081. [`error!`](https://docs.rs/anchor-lang/latest/anchor_lang/prelude/macro.error.html)
  1082. and
  1083. [`err!`](https://docs.rs/anchor-lang/latest/anchor_lang/prelude/macro.err.html)
  1084. macro and `Result` type
  1085. ([#1462](https://github.com/coral-xyz/anchor/pull/1462)). This change will
  1086. break most programs. Do the following to upgrade: _ change all
  1087. `ProgramResult`'s to `Result<()>` _ change `#[error]` to `#[error_code]` _
  1088. change all `Err(MyError::SomeError.into())` to
  1089. `Err(error!(MyError::SomeError))` and all
  1090. `Err(ProgramError::SomeProgramError)` to
  1091. `Err(ProgramError::SomeProgramError.into())` or
  1092. `Err(Error::from(ProgramError::SomeProgramError).with_source(source!()))` to
  1093. provide file and line source of the error (`with_source` is most useful with
  1094. `ProgramError`s. `error!` already adds source information for custom and
  1095. anchor internal errors). _ change all `solana_program::program::invoke()` to
  1096. `solana_program::program::invoke().map_err(Into::into)` and
  1097. `solana_program::program::invoke_signed()` to
  1098. `solana_program::program::invoke_signed().map_err(Into::into)`
  1099. ## [0.21.0] - 2022-02-07
  1100. ### Fixes
  1101. - ts: Fix the root type declaration of the `Wallet` / `NodeWallet` class
  1102. ([#1363](https://github.com/coral-xyz/anchor/pull/1363)).
  1103. - ts: Improve type mapping of Account fields into Typescript with additional
  1104. support for `Option<T>` and `Vec<String>` types
  1105. ([#1393](https://github.com/coral-xyz/anchor/pull/1393)).
  1106. ### Features
  1107. - lang: Add `seeds::program` constraint for specifying which program_id to use
  1108. when deriving PDAs ([#1197](https://github.com/coral-xyz/anchor/pull/1197)).
  1109. - lang: `Context` now has a new `bumps: BTree<String, u8>` argument, mapping
  1110. account name to bump seed "found" by the accounts context. This allows one to
  1111. access bump seeds without having to pass them in from the client or
  1112. recalculate them in the handler
  1113. ([#1367](https://github.com/coral-xyz/anchor/pull/1367)).
  1114. - lang, ts: Automatically infer PDA addresses
  1115. ([#1331](https://github.com/coral-xyz/anchor/pull/1331)).
  1116. - ts: Remove error logging in the event parser when log websocket encounters a
  1117. program error ([#1313](https://github.com/coral-xyz/anchor/pull/1313)).
  1118. - ts: Add new `methods` namespace to the program client, introducing a more
  1119. ergonomic builder API
  1120. ([#1324](https://github.com/coral-xyz/anchor/pull/1324)).
  1121. - ts: Add registry utility for fetching the latest verified build
  1122. ([#1371](https://github.com/coral-xyz/anchor/pull/1371)).
  1123. - cli: Expose the solana-test-validator --account flag in Anchor.toml via
  1124. [[test.validator.account]]
  1125. ([#1366](https://github.com/coral-xyz/anchor/pull/1366)).
  1126. - cli: Add avm, a tool for managing anchor-cli versions
  1127. ([#1385](https://github.com/coral-xyz/anchor/pull/1385)).
  1128. ### Breaking
  1129. - lang: Put `init_if_needed` behind a feature flag to decrease wrong usage
  1130. ([#1258](https://github.com/coral-xyz/anchor/pull/1258)).
  1131. - lang: rename `loader_account` module to `account_loader` module
  1132. ([#1279](https://github.com/coral-xyz/anchor/pull/1279))
  1133. - lang: The `Accounts` trait's `try_accounts` method now has an additional
  1134. `bumps: &mut BTreeMap<String, u8>` argument, which accumulates bump seeds
  1135. ([#1367](https://github.com/coral-xyz/anchor/pull/1367)).
  1136. - lang: Providing `bump = <target>` targets with `init` will now error. On
  1137. `init` only, it is required to use `bump` without a target and access the seed
  1138. inside function handlers via `ctx.bumps.get("<pda-account-name")`. For
  1139. subsequent seeds constraints (without init), it is recommended to store the
  1140. bump on your account and use it as a `bump = <target>` target to minimize
  1141. compute units used ([#1380](https://github.com/coral-xyz/anchor/pull/1380)).
  1142. - ts: `Coder` is now an interface and the existing class has been renamed to
  1143. `BorshCoder`. This change allows the generation of Anchor clients for non
  1144. anchor programs
  1145. ([#1259](https://github.com/coral-xyz/anchor/pull/1259/files)).
  1146. - cli: [[test.clone]] key in Anchor.toml is renamed to [[test.validator.clone]]
  1147. ([#1366](https://github.com/coral-xyz/anchor/pull/1366)).
  1148. ## [0.20.1] - 2022-01-09
  1149. ### Fixes
  1150. - lang: Improved error msgs when required programs are missing when using the
  1151. `init` constraint([#1257](https://github.com/coral-xyz/anchor/pull/1257))
  1152. ### Features
  1153. - lang: Allow repr overrides for zero copy accounts
  1154. ([#1273](https://github.com/coral-xyz/anchor/pull/1273)).
  1155. ## [0.20.0] - 2022-01-06
  1156. ### Fixes
  1157. - lang: `init_if_needed` now checks rent exemption when init is not needed
  1158. ([#1250](https://github.com/coral-xyz/anchor/pull/1250)).
  1159. - lang: Add missing owner check when `associated_token::authority` is used
  1160. ([#1240](https://github.com/coral-xyz/anchor/pull/1240)).
  1161. - ts: Add type declarations for conditional `workspace` and `Wallet` exports
  1162. ([#1137](https://github.com/coral-xyz/anchor/pull/1137)).
  1163. - ts: Change commitment message `recent` to `processed` and `max` to `finalized`
  1164. ([#1128](https://github.com/coral-xyz/anchor/pull/1128))
  1165. - ts: fix `translateAddress` which currently leads to failing browser code. Now
  1166. uses `PublicKey` constructor instead of prototype chain constructor name
  1167. checking which doesn't work in the presence of code
  1168. minifying/mangling([#1138](https://github.com/coral-xyz/anchor/pull/1138))
  1169. - lang: add missing check that verifies that account is ATA when using
  1170. `init_if_needed` and init is not
  1171. needed([#1221](https://github.com/coral-xyz/anchor/pull/1221))
  1172. ### Features
  1173. - lang: Add `programdata_address: Option<Pubkey>` field to `Program` account.
  1174. Will be populated if account is a program owned by the upgradable bpf loader
  1175. ([#1125](https://github.com/coral-xyz/anchor/pull/1125))
  1176. - lang,ts,ci,cli,docs: update solana toolchain to version
  1177. 1.8.5([#1133](https://github.com/coral-xyz/anchor/pull/1133)).
  1178. - lang: Account wrappers for non-Anchor programs no longer have to implement the
  1179. `serialize` function because it has a default impl now. Similarly, they no
  1180. longer have to implement `try_deserialize` which now delegates to
  1181. `try_deserialize_unchecked` by
  1182. default([#1156](https://github.com/coral-xyz/anchor/pull/1156)).
  1183. - lang: Add `set_inner` method to `Account<'a, T>` to enable easy updates
  1184. ([#1177](https://github.com/coral-xyz/anchor/pull/1177)).
  1185. - lang: Handle arrays with const as length
  1186. ([#968](https://github.com/coral-xyz/anchor/pull/968)).
  1187. - ts: Add optional commitment argument to `fetch` and `fetchMultiple`
  1188. ([#1171](https://github.com/coral-xyz/anchor/pull/1171)).
  1189. - lang: Implement `AsRef<T>` for
  1190. `Account<'a, T>`([#1173](https://github.com/coral-xyz/anchor/pull/1173))
  1191. - cli: Add `anchor expand` command which wraps around `cargo expand`
  1192. ([#1160](https://github.com/coral-xyz/anchor/pull/1160))
  1193. ### Breaking
  1194. - client: Client::new and Client::new_with_options now accept `Rc<dyn Signer>`
  1195. instead of `Keypair` ([#975](https://github.com/coral-xyz/anchor/pull/975)).
  1196. - lang, ts: Change error enum name and message for 'wrong program ownership'
  1197. account validation ([#1154](https://github.com/coral-xyz/anchor/pull/1154)).
  1198. - lang: Change from `#[repr(packed)]` to `#[repr(C)]` for zero copy accounts
  1199. ([#1106](https://github.com/coral-xyz/anchor/pull/1106)).
  1200. - lang: Account types can now be found either in the `prelude` module or the
  1201. `accounts` module but not longer directly under the root. Deprecated account
  1202. types are no longer imported by the prelude
  1203. ([#1208](https://github.com/coral-xyz/anchor/pull/1208)).
  1204. ## [0.19.0] - 2021-12-08
  1205. ### Fixes
  1206. - lang: Add `deprecated` attribute to `ProgramAccount`
  1207. ([#1014](https://github.com/coral-xyz/anchor/pull/1014)).
  1208. - cli: Add version number from programs `Cargo.toml` into extracted IDL
  1209. ([#1061](https://github.com/coral-xyz/anchor/pull/1061)).
  1210. - lang: Add `deprecated` attribute to
  1211. `Loader`([#1078](https://github.com/coral-xyz/anchor/pull/1078)).
  1212. - lang: the `init_if_needed` attribute now checks that given attributes (e.g.
  1213. space, owner, token::authority etc.) are validated even when init is not
  1214. needed ([#1096](https://github.com/coral-xyz/anchor/pull/1096)).
  1215. ### Features
  1216. - lang: Add `ErrorCode::AccountNotInitialized` error to separate the situation
  1217. when the account has the wrong owner from when it does not exist
  1218. (#[1024](https://github.com/coral-xyz/anchor/pull/1024)).
  1219. - lang: Called instructions now log their name by default. This can be turned
  1220. off with the `no-log-ix-name` flag
  1221. ([#1057](https://github.com/coral-xyz/anchor/pull/1057)).
  1222. - lang: `ProgramData` and `UpgradableLoaderState` can now be passed into
  1223. `Account` as generics. see
  1224. [UpgradeableLoaderState](https://docs.rs/solana-program/latest/solana_program/bpf_loader_upgradeable/enum.UpgradeableLoaderState.html).
  1225. `UpgradableLoaderState` can also be matched on to get `ProgramData`, but when
  1226. `ProgramData` is used instead, anchor does the serialization and checking that
  1227. it is actually program data for you
  1228. ([#1095](https://github.com/coral-xyz/anchor/pull/1095)).
  1229. - ts: Add better error msgs in the ts client if something wrong (i.e. not a
  1230. pubkey or a string) is passed in as an account in an instruction accounts
  1231. object ([#1098](https://github.com/coral-xyz/anchor/pull/1098)).
  1232. - ts: Add inputs `postInstructions` and `preInstructions` as a replacement for
  1233. (the now deprecated) `instructions`
  1234. ([#1007](https://github.com/coral-xyz/anchor/pull/1007)).
  1235. - ts: Add `getAccountInfo` helper method to account namespace/client
  1236. ([#1084](https://github.com/coral-xyz/anchor/pull/1084)).
  1237. ### Breaking
  1238. - lang, ts: Error codes have been mapped to new numbers to allow for more errors
  1239. per namespace ([#1096](https://github.com/coral-xyz/anchor/pull/1096)).
  1240. ## [0.18.2] - 2021-11-14
  1241. - cli: Replace global JavaScript dependency installs with local.
  1242. ### Features
  1243. - lang: Add `SystemAccount<'info>` account type for generic wallet addresses or
  1244. accounts owned by the system program
  1245. ([#954](https://github.com/coral-xyz/anchor/pull/954))
  1246. ### Fixes
  1247. - cli: fix dns in NODE_OPTIONS
  1248. ([#928](https://github.com/coral-xyz/anchor/pull/928)).
  1249. - cli: output TypeScript IDL in `idl parse` subcommand
  1250. ([#941](https://github.com/coral-xyz/anchor/pull/941)).
  1251. - cli: Add fields `os` and `cpu` to npm package `@project-serum/anchor-cli`
  1252. ([#976](https://github.com/coral-xyz/anchor/pull/976)).
  1253. - cli: Allow specify output directory for TypeScript IDL
  1254. ([#940](https://github.com/coral-xyz/anchor/pull/940)).
  1255. ### Breaking
  1256. - spl: Move permissioned markets into dex repository
  1257. ([#962](https://github.com/coral-xyz/anchor/pull/962)).
  1258. ## [0.18.0] - 2021-10-24
  1259. ### Features
  1260. - cli: Add support for configuration options for `solana-test-validator` in
  1261. Anchor.toml ([#834](https://github.com/coral-xyz/anchor/pull/834)).
  1262. - cli: `target/types` directory now created on build to store a TypeScript types
  1263. file for each program's IDL
  1264. ([#795](https://github.com/coral-xyz/anchor/pull/795)).
  1265. - ts: `Program<T>` can now be typed with an IDL type
  1266. ([#795](https://github.com/coral-xyz/anchor/pull/795)).
  1267. - lang: Add `mint::freeze_authority` keyword for mint initialization within
  1268. `#[derive(Accounts)]` ([#835](https://github.com/coral-xyz/anchor/pull/835)).
  1269. - lang: Add `AccountLoader` type for `zero_copy` accounts with support for CPI
  1270. ([#792](https://github.com/coral-xyz/anchor/pull/792)).
  1271. - lang: Add `#[account(init_if_needed)]` keyword for allowing one to invoke the
  1272. same instruction even if the account was created already
  1273. ([#906](https://github.com/coral-xyz/anchor/pull/906)).
  1274. - lang: Add custom errors support for raw constraints
  1275. ([#905](https://github.com/coral-xyz/anchor/pull/905)).
  1276. - lang, cli, spl: Update solana toolchain to v1.8.0
  1277. ([#886](https://github.com/coral-xyz/anchor/pull/886)).
  1278. - lang: Add custom errors support for `signer`, `mut`, `has_one`, `owner`, raw
  1279. constraints and `address`
  1280. ([#905](https://github.com/coral-xyz/anchor/pull/905),
  1281. [#913](https://github.com/coral-xyz/anchor/pull/913)).
  1282. ### Breaking
  1283. - lang: Accounts marked with the `#[account(signer)]` constraint now enforce
  1284. signer when the `"cpi"` feature is enabled
  1285. ([#849](https://github.com/coral-xyz/anchor/pull/849)).
  1286. ## [0.17.0] - 2021-10-03
  1287. ### Features
  1288. - cli: Add `localnet` command for starting a local `solana-test-validator` with
  1289. the workspace deployed ([#820](https://github.com/coral-xyz/anchor/pull/820)).
  1290. ### Breaking
  1291. - `CpiContext` accounts must now be used with the accounts struct generated in
  1292. the `crate::cpi::accounts::*` module. These structs correspond to the accounts
  1293. context for each instruction, except that each field is of type `AccountInfo`
  1294. ([#824](https://github.com/coral-xyz/anchor/pull/824)).
  1295. ## [0.16.2] - 2021-09-27
  1296. ### Features
  1297. - lang: Add `--detach` flag to `anchor test`
  1298. ([#770](https://github.com/coral-xyz/anchor/pull/770)).
  1299. - lang: Add `associated_token` keyword for initializing associated token
  1300. accounts within `#[derive(Accounts)]`
  1301. ([#790](https://github.com/coral-xyz/anchor/pull/790)).
  1302. - cli: Allow passing through cargo flags for build command
  1303. ([#719](https://github.com/coral-xyz/anchor/pull/719)).
  1304. - cli: Allow passing through cargo flags for test, verify, and publish commands
  1305. ([#804](https://github.com/coral-xyz/anchor/pull/804)).
  1306. ### Fixes
  1307. - lang: Generated `AccountMeta`s for Rust clients now properly set the
  1308. `isSigner` field ([#762](https://github.com/coral-xyz/anchor/pull/762)).
  1309. ## [0.16.1] - 2021-09-17
  1310. ### Fixes
  1311. - lang: `Signer` type now sets isSigner to true in the IDL
  1312. ([#750](https://github.com/coral-xyz/anchor/pull/750)).
  1313. ## [0.16.0] - 2021-09-16
  1314. ### Features
  1315. - lang: `Program` type introduced for executable accounts
  1316. ([#705](https://github.com/coral-xyz/anchor/pull/705)).
  1317. - lang: `Signer` type introduced for signing accounts where data is not used
  1318. ([#705](https://github.com/coral-xyz/anchor/pull/705)).
  1319. - lang: `UncheckedAccount` type introduced as a preferred alias for
  1320. `AccountInfo` ([#745](https://github.com/coral-xyz/anchor/pull/745)).
  1321. ### Breaking Changes
  1322. - lang: `#[account(owner = <pubkey>)]` now requires a `Pubkey` instead of an
  1323. account ([#691](https://github.com/coral-xyz/anchor/pull/691)).
  1324. ## [0.15.0] - 2021-09-07
  1325. ### Features
  1326. - lang: Add new `Account` type to replace `ProgramAccount` and `CpiAccount`,
  1327. both of which are deprecated
  1328. ([#686](https://github.com/coral-xyz/anchor/pull/686)).
  1329. - lang: `Box` can be used with `Account` types to reduce stack usage
  1330. ([#686](https://github.com/coral-xyz/anchor/pull/686)).
  1331. - lang: Add `Owner` trait, which is automatically implemented by all
  1332. `#[account]` structs ([#686](https://github.com/coral-xyz/anchor/pull/686)).
  1333. - lang: Check that ProgramAccount writable before mut borrow (`anchor-debug`
  1334. only) ([#681](https://github.com/coral-xyz/anchor/pull/681)).
  1335. ### Breaking Changes
  1336. - lang: All programs must now define their program id in source via
  1337. `declare_id!` ([#686](https://github.com/coral-xyz/anchor/pull/686)).
  1338. ## [0.14.0] - 2021-09-02
  1339. ### Features
  1340. - lang: Ignore `Unnamed` structs instead of panic
  1341. ([#605](https://github.com/coral-xyz/anchor/pull/605)).
  1342. - lang: Add constraints for initializing mint accounts as pdas,
  1343. `#[account(init, seeds = [...], mint::decimals = <expr>, mint::authority = <expr>)]`
  1344. ([#562](https://github.com/coral-xyz/anchor/pull/562)).
  1345. - lang: Add `AsRef<AccountInfo>` for `AccountInfo` wrappers
  1346. ([#652](https://github.com/coral-xyz/anchor/pull/652)).
  1347. - lang: Optimize `trait Key` by removing `AccountInfo` cloning
  1348. ([#652](https://github.com/coral-xyz/anchor/pull/652)).
  1349. - cli, client, lang: Update solana toolchain to v1.7.11
  1350. ([#653](https://github.com/coral-xyz/anchor/pull/653)).
  1351. ### Breaking Changes
  1352. - lang: Change
  1353. `#[account(init, seeds = [...], token = <expr>, authority = <expr>)]` to
  1354. `#[account(init, token::mint = <expr> token::authority = <expr>)]`
  1355. ([#562](https://github.com/coral-xyz/anchor/pull/562)).
  1356. - lang: `#[associated]` and `#[account(associated = <target>, with = <target>)]`
  1357. are both removed ([#612](https://github.com/coral-xyz/anchor/pull/612)).
  1358. - cli: Removed `anchor launch` command
  1359. ([#634](https://github.com/coral-xyz/anchor/pull/634)).
  1360. - lang: `#[account(init)]` now creates the account inside the same instruction
  1361. to be consistent with initializing PDAs. To maintain the old behavior of
  1362. `init`, replace it with `#[account(zero)]`
  1363. ([#641](https://github.com/coral-xyz/anchor/pull/641)).
  1364. - lang: `bump` must be provided when using the `seeds` constraint. This has been
  1365. added as an extra safety constraint to ensure that whenever a PDA is
  1366. initialized via a constraint the bump used is the one created by
  1367. `Pubkey::find_program_address`
  1368. ([#641](https://github.com/coral-xyz/anchor/pull/641)).
  1369. - lang: `try_from_init` has been removed from `Loader`, `ProgramAccount`, and
  1370. `CpiAccount` and replaced with `try_from_unchecked`
  1371. ([#641](https://github.com/coral-xyz/anchor/pull/641)).
  1372. - lang: Remove `AccountsInit` trait
  1373. ([#641](https://github.com/coral-xyz/anchor/pull/641)).
  1374. - lang: `try_from` methods for `ProgramAccount`, `Loader`, and `ProgramState`
  1375. now take in an additional `program_id: &Pubkey` parameter
  1376. ([#660](https://github.com/coral-xyz/anchor/pull/660)).
  1377. ## [0.13.2] - 2021-08-11
  1378. ### Fixes
  1379. - cli: Fix `anchor init` command "Workspace not found" regression
  1380. ([#598](https://github.com/coral-xyz/anchor/pull/598)).
  1381. ## [0.13.1] - 2021-08-10
  1382. ### Features
  1383. - cli: Programs embedded into genesis during tests will produce program logs
  1384. ([#594](https://github.com/coral-xyz/anchor/pull/594)).
  1385. ### Fixes
  1386. - cli: Allows Cargo.lock to exist in workspace subdirectories when publishing
  1387. ([#593](https://github.com/coral-xyz/anchor/pull/593)).
  1388. ## [0.13.0] - 2021-08-08
  1389. ### Features
  1390. - cli: Adds a `[registry]` section in the Anchor toml
  1391. ([#570](https://github.com/coral-xyz/anchor/pull/570)).
  1392. - cli: Adds the `anchor login <api-token>` command
  1393. ([#570](https://github.com/coral-xyz/anchor/pull/570)).
  1394. - cli: Adds the `anchor publish <package>` command
  1395. ([#570](https://github.com/coral-xyz/anchor/pull/570)).
  1396. - cli: Adds a root level `anchor_version` field to the Anchor.toml for
  1397. specifying the anchor docker image to use for verifiable builds
  1398. ([#570](https://github.com/coral-xyz/anchor/pull/570)).
  1399. - cli: Adds a root level `solana_version` field to the Anchor.toml for
  1400. specifying the solana toolchain to use for verifiable builds
  1401. ([#570](https://github.com/coral-xyz/anchor/pull/570)).
  1402. - lang: Dynamically fetch rent sysvar for when using `init`
  1403. ([#587](https://github.com/coral-xyz/anchor/pull/587)).
  1404. ### Breaking
  1405. - cli: `[clusters.<network>]` Anchor.toml section has been renamed to
  1406. `[programs.<network>]` ([#570](https://github.com/coral-xyz/anchor/pull/570)).
  1407. - cli: `[workspace]` member and exclude arrays must now be filepaths relative to
  1408. the workspace root ([#570](https://github.com/coral-xyz/anchor/pull/570)).
  1409. ## [0.12.0] - 2021-08-03
  1410. ### Features
  1411. - cli: Add keys `members` / `exclude` in config `programs` section
  1412. ([#546](https://github.com/coral-xyz/anchor/pull/546)).
  1413. - cli: Allow program address configuration for test command through
  1414. `clusters.localnet` ([#554](https://github.com/coral-xyz/anchor/pull/554)).
  1415. - lang: IDLs are now parsed from the entire crate
  1416. ([#517](https://github.com/coral-xyz/anchor/pull/517)).
  1417. - spl: Dex permissioned markets proxy
  1418. ([#519](https://github.com/coral-xyz/anchor/pull/519),
  1419. [#543](https://github.com/coral-xyz/anchor/pull/543)).
  1420. ### Breaking Changes
  1421. - ts: Use `hex` by default for decoding Instruction
  1422. ([#547](https://github.com/coral-xyz/anchor/pull/547)).
  1423. - lang: `CpiAccount::reload` mutates the existing struct instead of returning a
  1424. new one ([#526](https://github.com/coral-xyz/anchor/pull/526)).
  1425. - cli: Anchor.toml now requires an explicit `[scripts]` test command
  1426. ([#550](https://github.com/coral-xyz/anchor/pull/550)).
  1427. ## [0.11.1] - 2021-07-09
  1428. ### Features
  1429. - lang: Adds `require` macro for specifying assertions that return error codes
  1430. on failure ([#483](https://github.com/coral-xyz/anchor/pull/483)).
  1431. - lang: Allow one to specify arbitrary programs as the owner when creating PDA
  1432. ([#483](https://github.com/coral-xyz/anchor/pull/483)).
  1433. - lang: A new `bump` keyword is added to the accounts constraints, which is used
  1434. to add an optional bump seed to the end of a `seeds` array. When used in
  1435. conjunction with _both_ `init` and `seeds`, then the program executes
  1436. `find_program_address` to assert that the given bump is the canonical bump
  1437. ([#483](https://github.com/coral-xyz/anchor/pull/483)).
  1438. ### Fixes
  1439. - lang: Preserve all instruction data for fallback functions
  1440. ([#483](https://github.com/coral-xyz/anchor/pull/483)).
  1441. - ts: Event listener not firing when creating associated accounts
  1442. ([#356](https://github.com/coral-xyz/anchor/issues/356)).
  1443. ## [0.11.0] - 2021-07-03
  1444. ### Features
  1445. - lang: Add fallback functions
  1446. ([#457](https://github.com/coral-xyz/anchor/pull/457)).
  1447. - lang: Add feature flag for using the old state account discriminator. This is
  1448. a temporary flag for those with programs built prior to v0.7.0 but want to use
  1449. the latest Anchor version. Expect this to be removed in a future version
  1450. ([#446](https://github.com/coral-xyz/anchor/pull/446)).
  1451. - lang: Add generic support to Accounts
  1452. ([#496](https://github.com/coral-xyz/anchor/pull/496)).
  1453. ### Breaking Changes
  1454. - cli: Remove `.spec` suffix on TypeScript tests files
  1455. ([#441](https://github.com/coral-xyz/anchor/pull/441)).
  1456. - lang: Remove `belongs_to` constraint
  1457. ([#459](https://github.com/coral-xyz/anchor/pull/459)).
  1458. ## [0.10.0] - 2021-06-27
  1459. ### Features
  1460. - lang: Add `#[account(address = <expr>)]` constraint for asserting the address
  1461. of an account ([#400](https://github.com/coral-xyz/anchor/pull/400)).
  1462. - lang: Add
  1463. `#[account(init, token = <mint-target>, authority = <token-owner-target>...)]`
  1464. constraint for initializing SPL token accounts as program derived addresses
  1465. for the program. Can be used when initialized via `seeds` or `associated`
  1466. ([#400](https://github.com/coral-xyz/anchor/pull/400)).
  1467. - lang: Add `associated_seeds!` macro for generating signer seeds for CPIs
  1468. signed by an `#[account(associated = <target>)]` account
  1469. ([#400](https://github.com/coral-xyz/anchor/pull/400)).
  1470. - cli: Add `[scripts]` section to the Anchor.toml for specifying workspace
  1471. scripts that can be run via `anchor run <script>`
  1472. ([#400](https://github.com/coral-xyz/anchor/pull/400)).
  1473. - cli: `[clusters.<network>]` table entries can now also use
  1474. `{ address = <base58-str>, idl = <filepath-str> }` to specify workspace
  1475. programs ([#400](https://github.com/coral-xyz/anchor/pull/400)).
  1476. ### Breaking Changes
  1477. - cli: Remove `--yarn` flag in favor of using `npx`
  1478. ([#432](https://github.com/coral-xyz/anchor/pull/432)).
  1479. ## [0.9.0] - 2021-06-15
  1480. ### Features
  1481. - lang: Instruction data is now available to accounts constraints
  1482. ([#386](https://github.com/coral-xyz/anchor/pull/386)).
  1483. - lang: Initialize program derived addresses with accounts constraints
  1484. ([#386](https://github.com/coral-xyz/anchor/pull/386)).
  1485. ### Breaking Changes
  1486. - lang: Event field names in IDLs are now mixed case.
  1487. ([#379](https://github.com/coral-xyz/anchor/pull/379)).
  1488. - lang: Accounts trait now accepts an additional `&[u8]` parameter
  1489. ([#386](https://github.com/coral-xyz/anchor/pull/386)).
  1490. ## [0.8.0] - 2021-06-10
  1491. ### Features
  1492. - cli: Add `--program-name` option for build command to build a single program
  1493. at a time ([#362](https://github.com/coral-xyz/anchor/pull/362)).
  1494. - cli, client: Parse custom cluster urls from str
  1495. ([#369](https://github.com/coral-xyz/anchor/pull/369)).
  1496. - cli, client, lang: Update solana toolchain to v1.7.1
  1497. ([#368](https://github.com/coral-xyz/anchor/pull/369)).
  1498. - ts: Instruction decoding and formatting
  1499. ([#372](https://github.com/coral-xyz/anchor/pull/372)).
  1500. - lang: Add `#[account(close = <destination>)]` constraint for closing accounts
  1501. and sending the rent exemption lamports to a specified destination account
  1502. ([#371](https://github.com/coral-xyz/anchor/pull/371)).
  1503. ### Fixes
  1504. - lang: Allows one to use `remaining_accounts` with `CpiContext` by implementing
  1505. the `ToAccountMetas` trait on `CpiContext`
  1506. ([#351](https://github.com/coral-xyz/anchor/pull/351/files)).
  1507. ### Breaking
  1508. - lang, ts: Framework defined error codes are introduced, reserving error codes
  1509. 0-300 for Anchor, and 300 and up for user defined error codes
  1510. ([#354](https://github.com/coral-xyz/anchor/pull/354)).
  1511. ## [0.7.0] - 2021-05-31
  1512. ### Features
  1513. - cli: Add global options for override Anchor.toml values
  1514. ([#313](https://github.com/coral-xyz/anchor/pull/313)).
  1515. - spl: Add `SetAuthority` instruction
  1516. ([#307](https://github.com/coral-xyz/anchor/pull/307/files)).
  1517. - spl: Add init and close open orders instructions
  1518. ([#245](https://github.com/coral-xyz/anchor/pull/245)).
  1519. - lang: `constraint = <expression>` added as a replacement for (the now
  1520. deprecated) string literal constraints
  1521. ([#341](https://github.com/coral-xyz/anchor/pull/341)).
  1522. - lang: Span information is now preserved, providing informative compiler error
  1523. messages ([#341](https://github.com/coral-xyz/anchor/pull/341)).
  1524. - ts: Address metadata is now optional for `anchor.workspace` clients
  1525. ([#310](https://github.com/coral-xyz/anchor/pull/310)).
  1526. ### Breaking Changes
  1527. - ts: Retrieving deserialized accounts from the `<program>.account.<my-account>`
  1528. and `<program>.state` namespaces now require explicitly invoking the `fetch`
  1529. API. For example, `program.account.myAccount(<address>)` and `program.state()`
  1530. is now `program.account.myAccount.fetch(<address>)` and
  1531. `program.state.fetch()`
  1532. ([#322](https://github.com/coral-xyz/anchor/pull/322)).
  1533. - lang: `#[account(associated)]` now requires `init` to be provided to create an
  1534. associated account. If not provided, then the address will be assumed to
  1535. exist, and a constraint will be added to ensure the correctness of the address
  1536. ([#318](https://github.com/coral-xyz/anchor/pull/318)).
  1537. - lang, ts: Change account discriminator pre-image of the `#[state]` account
  1538. discriminator to be namespaced by "state:"
  1539. ([#320](https://github.com/coral-xyz/anchor/pull/320)).
  1540. - lang, ts: Change domain delimiters for the pre-image of the instruction
  1541. sighash to be a single colon `:` to be consistent with accounts
  1542. ([#321](https://github.com/coral-xyz/anchor/pull/321)).
  1543. - lang: Associated constraints no longer automatically implement `mut`
  1544. ([#341](https://github.com/coral-xyz/anchor/pull/341)).
  1545. - lang: Associated `space` constraints must now be literal integers instead of
  1546. literal strings ([#341](https://github.com/coral-xyz/anchor/pull/341)).
  1547. ## [0.6.0] - 2021-05-23
  1548. ### Features
  1549. - ts: Add `program.simulate` namespace
  1550. ([#266](https://github.com/coral-xyz/anchor/pull/266)).
  1551. - ts: Introduce `Address` type, allowing one to use Base 58 encoded strings in
  1552. public APIs ([#304](https://github.com/coral-xyz/anchor/pull/304)).
  1553. - ts: Replace deprecated `web3.Account` with `web3.Signer` in public APIs
  1554. ([#296](https://github.com/coral-xyz/anchor/pull/296)).
  1555. - ts: Generated `anchor.workspace` clients can now be customized per network
  1556. with `[cluster.<slug>]` in the Anchor.toml
  1557. ([#308](https://github.com/coral-xyz/anchor/pull/308)).
  1558. - cli: Add yarn flag to test command
  1559. ([#267](https://github.com/coral-xyz/anchor/pull/267)).
  1560. - cli: Add `--skip-build` flag to test command
  1561. ([301](https://github.com/coral-xyz/anchor/pull/301)).
  1562. - cli: Add `anchor shell` command to spawn a node shell populated with an
  1563. Anchor.toml based environment
  1564. ([#303](https://github.com/coral-xyz/anchor/pull/303)).
  1565. ### Breaking Changes
  1566. - cli: The Anchor.toml's `wallet` and `cluster` settings must now be under the
  1567. `[provider]` table ([#305](https://github.com/coral-xyz/anchor/pull/305)).
  1568. - ts: Event coder `decode` API changed to decode strings directly instead of
  1569. buffers ([#292](https://github.com/coral-xyz/anchor/pull/292)).
  1570. - ts: Event coder `encode` API removed
  1571. ([#292](https://github.com/coral-xyz/anchor/pull/292)).
  1572. ## [0.5.0] - 2021-05-07
  1573. ### Features
  1574. - client: Adds support for state instructions
  1575. ([#248](https://github.com/coral-xyz/anchor/pull/248)).
  1576. - lang: Add `anchor-debug` feature flag for logging
  1577. ([#253](https://github.com/coral-xyz/anchor/pull/253)).
  1578. - ts: Add support for u16
  1579. ([#255](https://github.com/coral-xyz/anchor/pull/255)).
  1580. ### Breaking Changes
  1581. - client: Renames `RequestBuilder::new` to `RequestBuilder::from`
  1582. ([#248](https://github.com/coral-xyz/anchor/pull/248)).
  1583. - lang: Renames the generated `instruction::state::Ctor` struct to
  1584. `instruction::state::New`
  1585. ([#248](https://github.com/coral-xyz/anchor/pull/248)).
  1586. ## [0.4.5] - 2021-04-29
  1587. - spl: Add serum DEX CPI client
  1588. ([#224](https://github.com/coral-xyz/anchor/pull/224)).
  1589. ## [0.4.4] - 2021-04-18
  1590. ### Features
  1591. - lang: Allows one to specify multiple `with` targets when creating associated
  1592. accounts ([#197](https://github.com/coral-xyz/anchor/pull/197)).
  1593. - lang, ts: Add array support
  1594. ([#202](https://github.com/coral-xyz/anchor/pull/202)).
  1595. - lang: Zero copy deserialization for accounts
  1596. ([#202](https://github.com/coral-xyz/anchor/pull/202),
  1597. [#206](https://github.com/coral-xyz/anchor/pull/206)).
  1598. - lang, spl, cli, client: Upgrade solana toolchain to 1.6.6
  1599. ([#210](https://github.com/coral-xyz/anchor/pull/210)).
  1600. ## [0.4.3] - 2021-04-13
  1601. ### Features
  1602. - lang: CPI clients for program state instructions
  1603. ([#43](https://github.com/coral-xyz/anchor/pull/43)).
  1604. - lang: Add `#[account(owner = <program>)]` constraint
  1605. ([#178](https://github.com/coral-xyz/anchor/pull/178)).
  1606. - lang, cli, ts: Add `#[account(associated = <target>)]` and `#[associated]`
  1607. attributes for creating associated program accounts within programs. The
  1608. TypeScript package can fetch these accounts with a new
  1609. `<program>.account.<account-name>.associated` (and `associatedAddress`) method
  1610. ([#186](https://github.com/coral-xyz/anchor/pull/186)).
  1611. ### Fixes
  1612. - lang: Unused `#[account]`s are now parsed into the IDL correctly
  1613. ([#177](https://github.com/coral-xyz/anchor/pull/177)).
  1614. ## [0.4.2] - 2021-04-10
  1615. ### Features
  1616. - cli: Fund Anchor.toml configured wallet when testing
  1617. ([#164](https://github.com/coral-xyz/anchor/pull/164)).
  1618. - spl: Add initialize_account instruction for spl tokens
  1619. ([#166](https://github.com/coral-xyz/anchor/pull/166)).
  1620. ## [0.4.1] - 2021-04-06
  1621. - cli: Version verifiable docker builder
  1622. ([#145](https://github.com/coral-xyz/anchor/pull/145)).
  1623. ## [0.4.0] - 2021-04-04
  1624. ### Features
  1625. - cli: Specify test files to run
  1626. ([#118](https://github.com/coral-xyz/anchor/pull/118)).
  1627. - lang: Allow overriding the `#[state]` account's size
  1628. ([#121](https://github.com/coral-xyz/anchor/pull/121)).
  1629. - lang, client, ts: Add event emission and subscriptions
  1630. ([#89](https://github.com/coral-xyz/anchor/pull/89)).
  1631. - lang/account: Allow namespacing account discriminators
  1632. ([#128](https://github.com/coral-xyz/anchor/pull/128)).
  1633. - cli: TypeScript migrations
  1634. ([#132](https://github.com/coral-xyz/anchor/pull/132)).
  1635. - lang: Add `#[account(executable)]` attribute
  1636. ([#140](https://github.com/coral-xyz/anchor/pull/140)).
  1637. ### Breaking Changes
  1638. - client: Replace url str with `Cluster` struct when constructing clients
  1639. ([#89](https://github.com/coral-xyz/anchor/pull/89)).
  1640. - lang: Changes the account discriminator of `IdlAccount` to be namespaced by
  1641. `"internal"` ([#128](https://github.com/coral-xyz/anchor/pull/128)).
  1642. - lang, spl, cli: Upgrade solana toolchain to 1.6.3, a major version upgrade
  1643. even though only the minor version is incremented. This allows for the removal
  1644. of `-#![feature(proc_macro_hygiene)]`.
  1645. ([#139](https://github.com/coral-xyz/anchor/pull/139)).
  1646. ## [0.3.0] - 2021-03-12
  1647. ### Features
  1648. - ts: Allow preloading instructions for state rpc transactions
  1649. ([cf9c84](https://github.com/coral-xyz/anchor/commit/cf9c847e4144989b5bc1936149d171e90204777b)).
  1650. - ts: Export sighash coder function
  1651. ([734c75](https://github.com/coral-xyz/anchor/commit/734c751882f43beec7ea3f0f4d988b502e3f24e4)).
  1652. - cli: Specify programs to embed into local validator genesis via Anchor.toml
  1653. while testing
  1654. ([b3803a](https://github.com/coral-xyz/anchor/commit/b3803aec03fbbae1a794c9aa6a789e6cb58fda99)).
  1655. - cli: Allow skipping the creation of a local validator when testing against
  1656. localnet ([#93](https://github.com/coral-xyz/anchor/pull/93)).
  1657. - cli: Adds support for tests with Typescript
  1658. ([#94](https://github.com/coral-xyz/anchor/pull/94)).
  1659. - cli: Deterministic and verifiable builds
  1660. ([#100](https://github.com/coral-xyz/anchor/pull/100)).
  1661. - cli, lang: Add write buffers for IDL upgrades
  1662. ([#107](https://github.com/coral-xyz/anchor/pull/107)).
  1663. ## Breaking Changes
  1664. - lang: Removes `IdlInstruction::Clear`
  1665. ([#107](https://github.com/coral-xyz/anchor/pull/107)).
  1666. ### Fixes
  1667. - cli: Propagates mocha test exit status on error
  1668. ([79b791](https://github.com/coral-xyz/anchor/commit/79b791ffa85ffae5b6163fa853562aa568650f21)).
  1669. ## [0.2.1] - 2021-02-11
  1670. ### Features
  1671. - cli: Embed workspace programs into local validator genesis when testing
  1672. ([733ec3](https://github.com/coral-xyz/anchor/commit/733ec300b0308e7d007873b0975585d836333fd4)).
  1673. - cli: Stream program logs to `.anchor/program-logs` directory when testing
  1674. ([ce5ca7](https://github.com/coral-xyz/anchor/commit/ce5ca7ddab6e0fd579deddcd02094b3f798bbe6a)).
  1675. - spl: Add shared memory api
  1676. [(d92cb1)](https://github.com/coral-xyz/anchor/commit/d92cb1516b78696d1257e41d0c5ac6821716300e).
  1677. - lang/attribute/access-control: Allow specifying multiple modifier functions
  1678. ([845df6](https://github.com/coral-xyz/anchor/commit/845df6d1960bb544fa0f2e3331ec79cc804edeb6)).
  1679. - lang/syn: Allow state structs that don't have a ctor or impl block (just trait
  1680. implementations)
  1681. ([a78000](https://github.com/coral-xyz/anchor/commit/a7800026833d64579e5b19c90d724ecc20d2a455)).
  1682. - ts: Add instruction method to state namespace
  1683. ([627c27](https://github.com/coral-xyz/anchor/commit/627c275e9cdf3dafafcf44473ba8146cc7979d44)).
  1684. - lang/syn, ts: Add support for u128 and i128
  1685. ([#83](https://github.com/coral-xyz/anchor/pull/83)).
  1686. ## [0.2.0] - 2021-02-08
  1687. ### Features
  1688. - lang: Adds the ability to create and use CPI program interfaces
  1689. ([#66](https://github.com/coral-xyz/anchor/pull/66/files?file-filters%5B%5D=)).
  1690. ### Breaking Changes
  1691. - lang, client, ts: Migrate from rust enum based method dispatch to a variant of
  1692. sighash ([#64](https://github.com/coral-xyz/anchor/pull/64)).
  1693. ## [0.1.0] - 2021-01-31
  1694. Initial release.
  1695. ### Includes
  1696. - lang: `anchor-lang` crate providing a Rust eDSL for Solana.
  1697. - lang/attribute/access-control: Internal attribute macro for function
  1698. modifiers.
  1699. - lang/attribute/account: Internal attribute macro for defining Anchor accounts.
  1700. - lang/attribute/error: Internal attribute macro for defining Anchor program
  1701. errors.
  1702. - lang/attribute/program: Internal attribute macro for defining an Anchor
  1703. program.
  1704. - lang/attribute/state: Internal attribute macro for defining an Anchor program
  1705. state struct.
  1706. - lang/derive/accounts: Internal derive macro for defining deserialized account
  1707. structs.
  1708. - lang/syn: Internal crate for parsing the Anchor eDSL, generating code, and an
  1709. IDL.
  1710. - spl: `anchor-spl` crate providing CPI clients for Anchor programs.
  1711. - client: `anchor-client` crate providing Rust clients for Anchor programs.
  1712. - ts: `@project-serum/anchor` package for generating TypeScript clients.
  1713. - cli: Command line interface for managing Anchor programs.