Kit
Type aliases

ITransactionMessageWithSigners

ITransactionMessageWithSigners<TAddress, TSigner, TAccounts> = TransactionMessageWithSigners<TAddress, TSigner, TAccounts>

A BaseTransactionMessage type extension that accept TransactionSigners.

Namely, it allows:

Type Parameters

Type ParameterDefault typeDescription
TAddress extends stringstringSupply a string literal to define an account having a particular address.
TSigner extends TransactionSigner<TAddress>TransactionSigner<TAddress>Optionally provide a narrower type for TransactionSigners.
TAccounts extends readonly AccountMetaWithSigner<TSigner>[]readonly AccountMetaWithSigner<TSigner>[]Optionally provide a narrower type for the account metas.

Deprecated

Use TransactionMessageWithSigners instead. It was only renamed.

Example

import { IInstruction } from '@solana/instructions';
import { BaseTransactionMessage } from '@solana/transaction-messages';
import { generateKeyPairSigner, IInstructionWithSigners, ITransactionMessageWithSigners } from '@solana/signers';
 
const signer = await generateKeyPairSigner();
const firstInstruction: IInstruction = { ... };
const secondInstruction: IInstructionWithSigners = { ... };
const transactionMessage: BaseTransactionMessage & ITransactionMessageWithSigners = {
    feePayer: signer,
    instructions: [firstInstruction, secondInstruction],
}

On this page