Struct solana_sdk::message::Message [−][src]
pub struct Message {
pub header: MessageHeader,
pub account_keys: Vec<Pubkey, Global>,
pub recent_blockhash: Hash,
pub instructions: Vec<CompiledInstruction, Global>,
}
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, Global>
All the account keys used by this transaction
recent_blockhash: Hash
The id of a recent ledger entry.
instructions: Vec<CompiledInstruction, Global>
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, Global>,
recent_blockhash: Hash,
instructions: Vec<CompiledInstruction, Global>
) -> Message
pub fn new_with_blockhash(
instructions: &[Instruction],
payer: Option<&Pubkey>,
blockhash: &Hash
) -> Message
pub fn new_with_nonce(
instructions: Vec<Instruction, Global>,
payer: Option<&Pubkey>,
nonce_account_pubkey: &Pubkey,
nonce_authority_pubkey: &Pubkey
) -> Message
Compute the blake3 hash of a raw transaction message
pub fn program_ids(&self) -> Vec<&Pubkey, Global>ⓘ
pub fn serialize_instructions(&self) -> Vec<u8, Global>ⓘ
pub fn deserialize_instruction(
index: usize,
data: &[u8]
) -> Result<Instruction, SanitizeError>
pub fn signer_keys(&self) -> Vec<&Pubkey, Global>ⓘ
Return true if account_keys has any duplicate keys
Returns true if any account is the bpf upgradeable loader
Trait Implementations
pub fn deserialize<__D>(
__deserializer: __D
) -> Result<Message, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
pub fn deserialize<__D>(
__deserializer: __D
) -> Result<Message, <__D as Deserializer<'de>>::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
pub unsafe fn ref_from_abi(
js: <Message as RefFromWasmAbi>::Abi
) -> <Message as RefFromWasmAbi>::Anchor
pub unsafe fn ref_from_abi(
js: <Message as RefFromWasmAbi>::Abi
) -> <Message as RefFromWasmAbi>::Anchor
Recover a Self::Anchor
from Self::Abi
. Read more
pub unsafe fn ref_mut_from_abi(
js: <Message as RefMutFromWasmAbi>::Abi
) -> <Message as RefMutFromWasmAbi>::Anchor
pub unsafe fn ref_mut_from_abi(
js: <Message as RefMutFromWasmAbi>::Abi
) -> <Message as RefMutFromWasmAbi>::Anchor
Same as RefFromWasmAbi::ref_from_abi
pub fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
pub fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
type Error = SanitizeMessageError
type Error = SanitizeMessageError
The type returned in the event of a conversion error.
pub fn try_from(
message: Message
) -> Result<SanitizedMessage, <SanitizedMessage as TryFrom<Message>>::Error>
pub fn try_from(
message: Message
) -> Result<SanitizedMessage, <SanitizedMessage as TryFrom<Message>>::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