Kit
Functions

partiallySignTransaction

partiallySignTransaction<T>(keyPairs, transaction): Promise<T>

Given an array of CryptoKey objects which are private keys pertaining to addresses that are required to sign a transaction, this method will return a new signed transaction of type Transaction.

Though the resulting transaction might have every signature it needs to land on the network, this function will not assert that it does. A partially signed transaction cannot be landed on the network, but can be serialized and deserialized.

Type Parameters

Type Parameter
T extends Readonly<{ messageBytes: TransactionMessageBytes; signatures: SignaturesMap; }> & TransactionWithLifetime

Parameters

ParameterType
keyPairsCryptoKeyPair[]
transactionT

Returns

Promise<T>

Example

import { generateKeyPair } from '@solana/keys';
import { partiallySignTransaction } from '@solana/transactions';
 
const partiallySignedTransaction = await partiallySignTransaction([myPrivateKey], tx);

See

signTransaction if you want to assert that the transaction has all of its required signatures after signing.

On this page