Struct solana_program::message::legacy::Message [−][src]
pub struct Message {
pub header: MessageHeader,
pub account_keys: Vec<Pubkey>,
pub recent_blockhash: Hash,
pub instructions: Vec<CompiledInstruction>,
}
Fields
header: MessageHeader
The message header, identifying signed and read-only account_keys
NOTE: Serialization-related changes must be paired with the direct read at sigverify.
account_keys: Vec<Pubkey>
All the account keys used by this transaction
recent_blockhash: Hash
The id of a recent ledger entry.
instructions: Vec<CompiledInstruction>
Programs that will be executed in sequence and committed in one atomic transaction if all succeed.
Implementations
pub fn new_with_compiled_instructions(
num_required_signatures: u8,
num_readonly_signed_accounts: u8,
num_readonly_unsigned_accounts: u8,
account_keys: Vec<Pubkey>,
recent_blockhash: Hash,
instructions: Vec<CompiledInstruction>
) -> Self
pub fn new_with_blockhash(
instructions: &[Instruction],
payer: Option<&Pubkey>,
blockhash: &Hash
) -> Self
pub fn new_with_nonce(
instructions: Vec<Instruction>,
payer: Option<&Pubkey>,
nonce_account_pubkey: &Pubkey,
nonce_authority_pubkey: &Pubkey
) -> Self
Compute the blake3 hash of a raw transaction message
pub fn program_ids(&self) -> Vec<&Pubkey>ⓘ
pub fn serialize_instructions(&self) -> Vec<u8>ⓘ
pub fn deserialize_instruction(
index: usize,
data: &[u8]
) -> Result<Instruction, SanitizeError>
pub fn signer_keys(&self) -> Vec<&Pubkey>ⓘ
Return true if account_keys has any duplicate keys
Returns true if any account is the bpf upgradeable loader
Trait Implementations
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
The type that holds the reference to Self
for the duration of the
invocation of the function that has an &Self
parameter. This is
required to ensure that the lifetimes don’t persist beyond one function
call, and so that they remain anonymous. Read more
Recover a Self::Anchor
from Self::Abi
. Read more
type Error = SanitizeMessageError
type Error = SanitizeMessageError
The type returned in the event of a conversion error.
Performs the conversion.
Auto Trait Implementations
impl RefUnwindSafe for Message
impl UnwindSafe for Message
Blanket Implementations
pub default fn visit_for_abi(
&self,
_digester: &mut AbiDigester
) -> Result<AbiDigester, DigestError>
pub default fn visit_for_abi(
&self,
digester: &mut AbiDigester
) -> Result<AbiDigester, DigestError>
Mutably borrows from an owned value. Read more
type Abi = <T as IntoWasmAbi>::Abi
type Abi = <T as IntoWasmAbi>::Abi
Same as IntoWasmAbi::Abi
Same as IntoWasmAbi::into_abi
, except that it may throw and never
return in the case of Err
. Read more