pub struct SolanaLedgerTransaction {
pub signed_message: Vec<u8>,
pub signature: [u8; 64],
}Expand description
A Solana offchain transaction using the spec-compliant Ledger wire format.
Use this for Ledger hardware wallets. Sign the bytes from
UnsignedTransaction::to_ledger_signable_bytes, assemble with
SolanaLedgerTransaction::from_parts, then submit via
Client::send_ledger_transaction.
Wire format: [u32 LE: message_len][preamble + json][64-byte sig], base64-
encoded and posted as {"body":"..."}.
Fields§
§signed_message: Vec<u8>Preamble (85 bytes) concatenated with JSON message bytes.
signature: [u8; 64]Ed25519 signature over signed_message.
Implementations§
Source§impl SolanaLedgerTransaction
impl SolanaLedgerTransaction
Sourcepub fn from_parts(
tx: UnsignedTransaction,
pubkey: [u8; 32],
signature: [u8; 64],
) -> SDKResult<Self>
pub fn from_parts( tx: UnsignedTransaction, pubkey: [u8; 32], signature: [u8; 64], ) -> SDKResult<Self>
Assemble a Ledger transaction from an unsigned transaction, a 32-byte public key, and a 64-byte Ed25519 signature.
Use after signing UnsignedTransaction::to_ledger_signable_bytes.
Trait Implementations§
Source§impl Clone for SolanaLedgerTransaction
impl Clone for SolanaLedgerTransaction
Source§fn clone(&self) -> SolanaLedgerTransaction
fn clone(&self) -> SolanaLedgerTransaction
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for SolanaLedgerTransaction
impl RefUnwindSafe for SolanaLedgerTransaction
impl Send for SolanaLedgerTransaction
impl Sync for SolanaLedgerTransaction
impl Unpin for SolanaLedgerTransaction
impl UnsafeUnpin for SolanaLedgerTransaction
impl UnwindSafe for SolanaLedgerTransaction
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