Function decode_solana_transaction

Source
pub fn decode_solana_transaction(
    tx: &TransactionRepoModel,
) -> Result<Transaction, TransactionError>
Expand description

Decodes a Solana transaction from the transaction repository model.

Extracts the Solana transaction data and deserializes it into a SolanaTransaction. This is a pure helper function that can be used anywhere in the Solana transaction domain.

Note: This only works for transactions that have already been built (transaction field is Some). For instructions-based transactions that haven’t been prepared yet, this will return an error.