Object.assign(window.search, {"doc_urls":["introduction/introduction.html#introduction","introduction/what_is_anchor.html#what-is-anchor","introduction/anchor_documentation.html#anchor-documentation","prerequisites/prerequisites.html#prerequisites","prerequisites/useful_resources.html#useful-resources","prerequisites/useful_resources.html#rust","prerequisites/useful_resources.html#solana","prerequisites/intro_to_solana.html#intro-to-programming-on-solana","prerequisites/intro_to_solana.html#memory-on-solana","prerequisites/intro_to_solana.html#transactions-and-accounts","prerequisites/intro_to_solana.html#rent","prerequisites/intro_to_solana.html#program-example-the-system-program","prerequisites/intro_to_solana.html#program-composition","prerequisites/intro_to_solana.html#program-composition-via-multiple-instructions-in-a-transaction","prerequisites/intro_to_solana.html#program-composition-via-cross-program-invocations","prerequisites/intro_to_solana.html#validating-inputs","getting_started/getting_started.html#getting-started","getting_started/installation.html#installation","getting_started/installation.html#rust","getting_started/installation.html#solana","getting_started/installation.html#yarn","getting_started/installation.html#anchor","getting_started/installation.html#installing-using-anchor-version-manager-avm-recommended","getting_started/installation.html#install-using-pre-build-binary-on-x86_64-linux","getting_started/installation.html#build-from-source-for-other-operating-systems-without-avm","getting_started/hello_anchor.html#hello-anchor","anchor_in_depth/anchor_programs_in-depth.html#anchor-programs-in-depth","anchor_in_depth/essentials.html#essentials","anchor_in_depth/high-level_overview.html#high-level-overview","anchor_in_depth/the_accounts_struct.html#the-accounts-struct","anchor_in_depth/the_accounts_struct.html#types","anchor_in_depth/the_accounts_struct.html#the-account-type","anchor_in_depth/the_accounts_struct.html#constraints","anchor_in_depth/the_accounts_struct.html#safety-checks","anchor_in_depth/the_program_module.html#the-program-module","anchor_in_depth/the_program_module.html#context","anchor_in_depth/the_program_module.html#instruction-data","anchor_in_depth/errors.html#errors","anchor_in_depth/errors.html#anchor-internal-errors","anchor_in_depth/errors.html#custom-errors","anchor_in_depth/errors.html#require","anchor_in_depth/milestone_project_tic-tac-toe.html#milestone-project---tic-tac-toe","anchor_in_depth/milestone_project_tic-tac-toe.html#setting-up-the-game","anchor_in_depth/milestone_project_tic-tac-toe.html#state","anchor_in_depth/milestone_project_tic-tac-toe.html#the-setup-instruction","anchor_in_depth/milestone_project_tic-tac-toe.html#testing-the-setup-instruction","anchor_in_depth/milestone_project_tic-tac-toe.html#playing-the-game","anchor_in_depth/milestone_project_tic-tac-toe.html#the-play-instruction","anchor_in_depth/milestone_project_tic-tac-toe.html#testing-the-play-instruction","anchor_in_depth/milestone_project_tic-tac-toe.html#deployment","anchor_in_depth/milestone_project_tic-tac-toe.html#program-directory-organization","anchor_in_depth/intermediate.html#intermediate","anchor_in_depth/CPIs.html#cross-program-invocations","anchor_in_depth/CPIs.html#setting-up-basic-cpi-functionality","anchor_in_depth/CPIs.html#privilege-extension","anchor_in_depth/CPIs.html#reloading-an-account","anchor_in_depth/CPIs.html#returning-values-from-handler-functions","anchor_in_depth/CPIs.html#reading-return-data-in-the-clients","anchor_in_depth/CPIs.html#return-data-size-limit-workarounds","anchor_in_depth/CPIs.html#programs-as-signers","anchor_in_depth/PDAs.html#pdas","anchor_in_depth/PDAs.html#creation-of-a-pda","anchor_in_depth/PDAs.html#using-pdas","anchor_in_depth/PDAs.html#hashmap-like-structures-using-pdas","anchor_in_depth/PDAs.html#programs-as-signers","anchor_in_depth/PDAs.html#pdas-conclusion","anchor_in_depth/events.html#events","anchor_in_depth/events.html#table-of-contents","anchor_in_depth/events.html#introduction-to-events","anchor_in_depth/events.html#defining-events","anchor_in_depth/events.html#emitting-events","anchor_in_depth/events.html#subscribing-to-events","anchor_in_depth/events.html#unsubscribing-from-events","anchor_in_depth/events.html#cpi-events","anchor_bts/discriminator.html#the-discriminator","anchor_bts/discriminator.html#the-necessity-of-the-discriminator-in-anchor","anchor_bts/discriminator.html#discriminators-in-anchor-account-processing","anchor_bts/discriminator.html#conclusion","anchor_references/anchor_references.html#anchor-references","anchor_references/space.html#space-reference","anchor_references/space.html#example","anchor_references/javascript_anchor_types_reference.html#javascript-anchor-types-reference","anchor_references/cli.html#cli","anchor_references/cli.html#build","anchor_references/cli.html#cluster","anchor_references/cli.html#cluster-list","anchor_references/cli.html#deploy","anchor_references/cli.html#expand","anchor_references/cli.html#idl","anchor_references/cli.html#idl-init","anchor_references/cli.html#idl-fetch","anchor_references/cli.html#idl-authority","anchor_references/cli.html#idl-erase-authority","anchor_references/cli.html#idl-upgrade","anchor_references/cli.html#init","anchor_references/cli.html#migrate","anchor_references/cli.html#new","anchor_references/cli.html#shell","anchor_references/cli.html#test","anchor_references/cli.html#upgrade","anchor_references/cli.html#verify","anchor_references/avm.html#anchor-version-manager","anchor_references/avm.html#install","anchor_references/avm.html#list","anchor_references/avm.html#uninstall","anchor_references/avm.html#use","anchor_references/anchor-toml_reference.html#anchortoml-reference","anchor_references/anchor-toml_reference.html#provider-required","anchor_references/anchor-toml_reference.html#scripts-required-for-testing","anchor_references/anchor-toml_reference.html#registry","anchor_references/anchor-toml_reference.html#programs","anchor_references/anchor-toml_reference.html#test","anchor_references/anchor-toml_reference.html#testvalidator","anchor_references/reference_links.html#code-references"],"index":{"documentStore":{"docInfo":{"0":{"body":20,"breadcrumbs":2,"title":1},"1":{"body":55,"breadcrumbs":3,"title":1},"10":{"body":47,"breadcrumbs":4,"title":1},"100":{"body":11,"breadcrumbs":5,"title":1},"101":{"body":62,"breadcrumbs":7,"title":3},"102":{"body":21,"breadcrumbs":5,"title":1},"103":{"body":41,"breadcrumbs":5,"title":1},"104":{"body":3,"breadcrumbs":5,"title":1},"105":{"body":21,"breadcrumbs":5,"title":1},"106":{"body":0,"breadcrumbs":6,"title":2},"107":{"body":16,"breadcrumbs":6,"title":2},"108":{"body":22,"breadcrumbs":7,"title":3},"109":{"body":16,"breadcrumbs":5,"title":1},"11":{"body":157,"breadcrumbs":7,"title":4},"110":{"body":23,"breadcrumbs":5,"title":1},"111":{"body":50,"breadcrumbs":5,"title":1},"112":{"body":164,"breadcrumbs":5,"title":1},"113":{"body":6,"breadcrumbs":6,"title":2},"12":{"body":38,"breadcrumbs":5,"title":2},"13":{"body":86,"breadcrumbs":9,"title":6},"14":{"body":85,"breadcrumbs":9,"title":6},"15":{"body":241,"breadcrumbs":5,"title":2},"16":{"body":9,"breadcrumbs":4,"title":2},"17":{"body":0,"breadcrumbs":4,"title":1},"18":{"body":4,"breadcrumbs":4,"title":1},"19":{"body":18,"breadcrumbs":4,"title":1},"2":{"body":69,"breadcrumbs":5,"title":2},"20":{"body":4,"breadcrumbs":4,"title":1},"21":{"body":0,"breadcrumbs":4,"title":1},"22":{"body":83,"breadcrumbs":10,"title":7},"23":{"body":16,"breadcrumbs":10,"title":7},"24":{"body":58,"breadcrumbs":9,"title":6},"25":{"body":120,"breadcrumbs":6,"title":2},"26":{"body":40,"breadcrumbs":6,"title":3},"27":{"body":9,"breadcrumbs":5,"title":1},"28":{"body":118,"breadcrumbs":10,"title":3},"29":{"body":14,"breadcrumbs":8,"title":2},"3":{"body":7,"breadcrumbs":2,"title":1},"30":{"body":21,"breadcrumbs":7,"title":1},"31":{"body":307,"breadcrumbs":8,"title":2},"32":{"body":97,"breadcrumbs":7,"title":1},"33":{"body":103,"breadcrumbs":8,"title":2},"34":{"body":38,"breadcrumbs":8,"title":2},"35":{"body":46,"breadcrumbs":7,"title":1},"36":{"body":110,"breadcrumbs":8,"title":2},"37":{"body":97,"breadcrumbs":6,"title":1},"38":{"body":34,"breadcrumbs":8,"title":3},"39":{"body":79,"breadcrumbs":7,"title":2},"4":{"body":0,"breadcrumbs":5,"title":2},"40":{"body":159,"breadcrumbs":6,"title":1},"41":{"body":55,"breadcrumbs":14,"title":5},"42":{"body":0,"breadcrumbs":12,"title":3},"43":{"body":447,"breadcrumbs":10,"title":1},"44":{"body":516,"breadcrumbs":11,"title":2},"45":{"body":254,"breadcrumbs":12,"title":3},"46":{"body":0,"breadcrumbs":11,"title":2},"47":{"body":62,"breadcrumbs":11,"title":2},"48":{"body":260,"breadcrumbs":12,"title":3},"49":{"body":91,"breadcrumbs":10,"title":1},"5":{"body":25,"breadcrumbs":4,"title":1},"50":{"body":113,"breadcrumbs":12,"title":3},"51":{"body":9,"breadcrumbs":5,"title":1},"52":{"body":36,"breadcrumbs":10,"title":3},"53":{"body":416,"breadcrumbs":12,"title":5},"54":{"body":341,"breadcrumbs":9,"title":2},"55":{"body":108,"breadcrumbs":9,"title":2},"56":{"body":120,"breadcrumbs":11,"title":4},"57":{"body":53,"breadcrumbs":11,"title":4},"58":{"body":48,"breadcrumbs":12,"title":5},"59":{"body":15,"breadcrumbs":9,"title":2},"6":{"body":22,"breadcrumbs":4,"title":1},"60":{"body":46,"breadcrumbs":6,"title":1},"61":{"body":102,"breadcrumbs":7,"title":2},"62":{"body":5,"breadcrumbs":7,"title":2},"63":{"body":665,"breadcrumbs":9,"title":4},"64":{"body":340,"breadcrumbs":7,"title":2},"65":{"body":111,"breadcrumbs":7,"title":2},"66":{"body":27,"breadcrumbs":6,"title":1},"67":{"body":12,"breadcrumbs":7,"title":2},"68":{"body":47,"breadcrumbs":7,"title":2},"69":{"body":44,"breadcrumbs":7,"title":2},"7":{"body":15,"breadcrumbs":6,"title":3},"70":{"body":45,"breadcrumbs":7,"title":2},"71":{"body":24,"breadcrumbs":7,"title":2},"72":{"body":8,"breadcrumbs":7,"title":2},"73":{"body":111,"breadcrumbs":7,"title":2},"74":{"body":70,"breadcrumbs":4,"title":1},"75":{"body":140,"breadcrumbs":6,"title":3},"76":{"body":260,"breadcrumbs":7,"title":4},"77":{"body":50,"breadcrumbs":4,"title":1},"78":{"body":2,"breadcrumbs":4,"title":2},"79":{"body":121,"breadcrumbs":6,"title":2},"8":{"body":103,"breadcrumbs":5,"title":2},"80":{"body":70,"breadcrumbs":5,"title":1},"81":{"body":126,"breadcrumbs":10,"title":4},"82":{"body":114,"breadcrumbs":5,"title":1},"83":{"body":39,"breadcrumbs":5,"title":1},"84":{"body":0,"breadcrumbs":5,"title":1},"85":{"body":18,"breadcrumbs":6,"title":2},"86":{"body":21,"breadcrumbs":5,"title":1},"87":{"body":24,"breadcrumbs":5,"title":1},"88":{"body":29,"breadcrumbs":5,"title":1},"89":{"body":31,"breadcrumbs":6,"title":2},"9":{"body":203,"breadcrumbs":5,"title":2},"90":{"body":24,"breadcrumbs":6,"title":2},"91":{"body":13,"breadcrumbs":6,"title":2},"92":{"body":18,"breadcrumbs":7,"title":3},"93":{"body":41,"breadcrumbs":6,"title":2},"94":{"body":37,"breadcrumbs":5,"title":1},"95":{"body":36,"breadcrumbs":5,"title":1},"96":{"body":12,"breadcrumbs":5,"title":1},"97":{"body":19,"breadcrumbs":5,"title":1},"98":{"body":76,"breadcrumbs":5,"title":1},"99":{"body":16,"breadcrumbs":5,"title":1}},"docs":{"0":{"body":"Welcome to The Anchor Book! ⚓ This chapter covers what anchor is, how its documentation is structured, and what you should know to have a good time with this guide. If you find errors or something doesn't work, please report it here .","breadcrumbs":"Introduction » Introduction","id":"0","title":"Introduction"},"1":{"body":"Anchor is a framework for quickly building secure Solana programs. With Anchor you can build programs quickly because it writes various boilerplate for you such as (de)serialization of accounts and instruction data. You can build secure programs more easily because Anchor handles certain security checks for you. On top of that, it allows you to succinctly define additional checks and keep them separate from your business logic. Both of these aspects mean that instead of working on the tedious parts of raw Solana programs, you can spend more time working on what matters most, your product.","breadcrumbs":"Introduction » What is Anchor » What is Anchor","id":"1","title":"What is Anchor"},"10":{"body":"Because validators don’t have infinite storage and providing storage costs money, accounts need to pay rent for their existence. This rent is subtracted from their lamports regularly. However, if an account's lamports balance is above the rent-exemption threshold, it is rent-exempt and does not lose its lamports. This threshold depends on the size of the account. In 99% of cases, you will create rent-exempt accounts. It's even being considered to disable non-rent-exempt accounts.","breadcrumbs":"Prerequisites » Intro to Solana » Rent","id":"10","title":"Rent"},"100":{"body":"anchor verify Verifies the on-chain bytecode matches the locally compiled artifact.","breadcrumbs":"Anchor References » CLI Reference » Verify","id":"100","title":"Verify"},"101":{"body":"Anchor Version Manager (avm) is provided to manage multiple installations of the anchor-cli binary. This may be required to produce verifiable builds, or if you'd prefer to work with an alternate version. Anchor version manager USAGE: avm OPTIONS: -h, --help Print help information -V, --version Print version information SUBCOMMANDS: help Print this message or the help of the given subcommand(s) install Install a version of Anchor list List available versions of Anchor uninstall Uninstall a version of Anchor use Use a specific version of Anchor","breadcrumbs":"Anchor References » AVM Reference » Anchor Version Manager","id":"101","title":"Anchor Version Manager"},"102":{"body":"avm install Install the specified version of anchor-cli. The version argument should follow semver versioning. It is also possible to use latest as the version argument to install the latest version.","breadcrumbs":"Anchor References » AVM Reference » Install","id":"102","title":"Install"},"103":{"body":"avm list Lists available versions of anchor-cli. 0.3.0\n0.4.0\n0.4.1\n0.4.2\n0.4.3\n0.4.4\n0.4.5\n0.5.0\n0.6.0\n0.7.0\n0.8.0\n0.9.0\n0.10.0\n0.11.0\n0.11.1\n0.12.0\n0.13.0\n0.13.1\n0.13.2\n0.14.0\n0.15.0\n0.16.0\n0.16.1\n0.16.2\n0.17.0\n0.18.0\n0.18.2\n0.19.0\n0.20.0 (installed)\n0.20.1 (latest, installed, current)","breadcrumbs":"Anchor References » AVM Reference » List","id":"103","title":"List"},"104":{"body":"avm uninstall ","breadcrumbs":"Anchor References » AVM Reference » Uninstall","id":"104","title":"Uninstall"},"105":{"body":"avm use Use a specific version. This version will remain in use until you change it by calling the same command again. Similarly to avm install, you can also use latest for the version.","breadcrumbs":"Anchor References » AVM Reference » Use","id":"105","title":"Use"},"106":{"body":"","breadcrumbs":"Anchor References » Anchor.toml Reference » Anchor.toml Reference","id":"106","title":"Anchor.toml Reference"},"107":{"body":"A wallet and cluster that are used for all commands. Example: [provider]\ncluster = \"localnet\" # The cluster used for all commands.\nwallet = \"~/.config/solana/id.json\" # The keypair used for all commands.","breadcrumbs":"Anchor References » Anchor.toml Reference » provider (required)","id":"107","title":"provider (required)"},"108":{"body":"Scripts that can be run with anchor run