{"repo":"metaplex-foundation/mpl-token-auth-rules","free":true,"listed":false,"github":"https://github.com/metaplex-foundation/mpl-token-auth-rules","clone":"git clone https://github.com/metaplex-foundation/mpl-token-auth-rules.git","description":"A program that provides the ability to create and execute rules to restrict common token operations such as transferring and selling.","language":"HTML","stars":31,"topics":["blockchain","metaplex","nft","rust","solana"],"license":null,"category":"blockchain-web3","readme_excerpt":"Metaplex Token Authorization Rules A program that provides the ability to create and execute rules to restrict common token operations such as transferring and selling. Read the official documentation here. Overview Authorization rules are variants of a Rule enum that implements a validate() function. There are Primitive Rules and Composed Rules that are created by combining of one or more primitive rules. Primitive Rules store any accounts or data needed for evaluation, and at runtime will produce a true or false output based on accounts and a well-defined Payload that are passed into the validate() function. Composed Rules return a true or false based on whether any or all of the primitive rules return true. Composed rules can then be combined into higher-level composed rules that implement more complex boolean logic. Because of the recursive definition of the Rule enum, calling validate() on a top-level composed rule will start at the top and validate at every level, down to the component primitive rules. Getting Started The packages below can be used to interact with Token Authorization Rules (Token Auth Rules) program. TypeScript See typedoc documentation. Rust See crate documentation. Building From the root directory of the repository: - Install the required packages: - Build the program: This will create the program binary at /programs/.bin Testing Token Auth Rules includes three sets of tests: BPF, TypeScript for the JS Client, and Legacy Typescript for the Solita-bas","default_branch":null,"files":null,"tree":[],"storefront":"/r/metaplex-foundation","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/metaplex-foundation/mpl-token-auth-rules/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}