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
Build a message from instructions and a fee payer.
Deduplicates accounts and sorts them per Solana’s rules:
- Writable signers (fee payer first)
- Read-only signers
- Writable non-signers
- Read-only non-signers
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