solana-tools-lite 0.1.2

A lightweight, SDK-free, offline-first signing toolkit for Solana keys, messages, and transactions.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use crate::models::message::Message;
use serde::{Deserialize, Serialize};

/// A Solana transaction consists of a list of signatures and a message.
///
/// Each signature corresponds to a required signer defined in the message header.
/// If the transaction is unsigned (e.g., created for cold signing), the signatures
/// list might be empty or contain placeholder (zero) signatures.
#[derive(Debug, Serialize, Deserialize)]
pub struct Transaction {
    /// Ordered list of signatures.
    /// The number of signatures must match the message header's `num_required_signatures`.
    #[serde(with = "crate::serde::signature")]
    pub signatures: Vec<ed25519_dalek::Signature>,
    /// The content of the transaction, including instructions, account keys, and blockhash.
    pub message: Message,
}