Module lpl_token_auth_rules::utils
source · Expand description
Utilities for the program
Functions
- Verify the derivation of the seeds against the given account.
- Assert that the given account is owned by the given pubkey.
- Compute the root of a Merkle tree given a leaf and a proof. Uses a constant value of 0x01 as an input to the hashing function along with the values to be hashed.
- Create account almost from scratch, lifted from https://github.com/solana-labs/safecoin-program-library/tree/master/associated-token-account/program/src/processor.rs#L51-L98
- Get a revision map by looking at the header, finding its location, and deserializing it.
- Get the latest revision number stored on the revision map.
- This function returns the rule for an operation by recursively searching through fallbacks
- Return whether the pubkey is on the Edwards 25519 curve.
- See if a slice contains all zeroes. Useful for checking an account’s data.
- Resize an account using realloc, lifted from Solana Cookbook.