Kit
Functions

getTransactionDecoder

getTransactionDecoder(): VariableSizeDecoder<Readonly<{ messageBytes: TransactionMessageBytes; signatures: SignaturesMap; }>>

Returns a decoder that you can use to convert a byte array in the Solana transaction wire format to a Transaction object.

Returns

VariableSizeDecoder<Readonly<{ messageBytes: TransactionMessageBytes; signatures: SignaturesMap; }>>

Example

import { getTransactionDecoder } from '@solana/transactions';
 
const transactionDecoder = getTransactionDecoder();
const transaction = transactionDecoder.decode(wireTransactionBytes);
for (const [address, signature] in Object.entries(transaction.signatures)) {
    console.log(`Signature by ${address}`, signature);
}

On this page