Expand description
Utilities for the program
Functions§
- assert_
derivation - Verify the derivation of the seeds against the given account.
- assert_
owned_ by - Assert that the given account is owned by the given pubkey.
- cmp_
pubkeys - Convenience function for comparing two
Pubkey
s. - compute_
merkle_ root - 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_
or_ allocate_ account_ raw - Create account almost from scratch, lifted from https://github.com/solana-labs/solana-program-library/tree/master/associated-token-account/program/src/processor.rs#L51-L98
- get_
existing_ revision_ map - Get a revision map by looking at the header, finding its location, and deserializing it.
- get_
latest_ revision - Get the latest revision number stored on the revision map.
- is_
on_ curve - Return whether the pubkey is on the Edwards 25519 curve.
- is_
zeroed - See if a slice contains all zeroes. Useful for checking an account’s data.
- resize_
or_ reallocate_ account_ raw - Resize an account using realloc, lifted from Solana Cookbook.