pub struct Message {
pub num_required_signatures: u8,
pub num_readonly_signed_accounts: u8,
pub num_readonly_unsigned_accounts: u8,
pub account_keys: Vec<[u8; 32]>,
pub recent_blockhash: [u8; 32],
pub instructions: Vec<CompiledInstruction>,
}Expand description
A Solana transaction message (legacy format).
Fields§
§num_required_signatures: u8Number of required signatures.
num_readonly_signed_accounts: u8Number of read-only signed accounts.
num_readonly_unsigned_accounts: u8Number of read-only unsigned accounts.
account_keys: Vec<[u8; 32]>All account keys referenced by the message.
recent_blockhash: [u8; 32]Recent blockhash (32 bytes).
instructions: Vec<CompiledInstruction>Compiled instructions.
Implementations§
Source§impl Message
impl Message
Sourcepub fn new(instructions: &[Instruction], fee_payer: [u8; 32]) -> Self
pub fn new(instructions: &[Instruction], fee_payer: [u8; 32]) -> Self
Sourcepub fn try_new(
instructions: &[Instruction],
fee_payer: [u8; 32],
) -> Result<Self, SignerError>
pub fn try_new( instructions: &[Instruction], fee_payer: [u8; 32], ) -> Result<Self, SignerError>
Fallible version of new.
Returns an error if any instruction references an account key not present in the deduplicated key list, or if the key list exceeds 256.
Source§impl Message
impl Message
Sourcepub fn deserialize(data: &[u8]) -> Result<Self, SignerError>
pub fn deserialize(data: &[u8]) -> Result<Self, SignerError>
Deserialize a legacy message from wire-format bytes.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Message
impl RefUnwindSafe for Message
impl Send for Message
impl Sync for Message
impl Unpin for Message
impl UnsafeUnpin for Message
impl UnwindSafe for Message
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more