Module prelude

Module prelude 

Source
Expand description

§TestSVM Core Prelude

Common imports for TestSVM users. This module re-exports the most commonly used types and traits from testsvm-core for convenient access.

Re-exports§

pub use crate::AccountRef;
pub use crate::TXError;
pub use crate::TXResult;
pub use crate::TestSVM;

Modules§

system_program
The system native program.
sysvar

Structs§

AccountMeta
Describes a single account read or written by a program during instruction execution.
AddressBook
Address book for mapping public keys to registered addresses with labels.
Instruction
A directive for a single invocation of a Solana program.
Keypair
A vanilla Ed25519 key pair
Pubkey
The address of a Solana account.
RegisteredAddress
Registered address with role information
Transaction
An atomically-committed sequence of instructions.

Enums§

AddressRole
Role type for registered addresses, defining the purpose of each address

Traits§

AccountDeserialize
A data structure that can be deserialized and stored into account storage, i.e. an AccountInfo’s mutable data slice.
AccountSerialize
A data structure that can be serialized and stored into account storage, i.e. an AccountInfo’s mutable data slice.
Discriminator
Unique identifier for a type.
InstructionData
Calculates the data for an instruction invocation, where the data is Discriminator + BorshSerialize(args). args is a borsh serialized struct of named fields for each argument given to an instruction.
Key
Defines the Pubkey of an account.
Signer
The Signer trait declares operations that all digital signature providers must support. It is the primary interface by which signers are specified in Transaction signing interfaces
ToAccountInfos
Transformation to AccountInfo structs.
ToAccountMetas
Transformation to AccountMeta structs.

Functions§

anchor_instruction
Creates a new Anchor instruction from the generated declare_program! client structs

Type Aliases§

Result
Result<T, Error>