Defines a Noop (No-Operation) signer that pretends to partially sign messages and transactions.

For a given Address, a Noop Signer can be created to offer an implementation of both the MessagePartialSigner and TransactionPartialSigner interfaces such that they do not sign anything. Namely, signing a transaction or a message with a NoopSigner will return an empty SignatureDictionary.

Type Parameters

  • TAddress extends string = string

    Supply a string literal to define a Noop signer having a particular address.

import { address } from '@solana/addresses';
import { createNoopSigner } from '@solana/signers';

const signer = createNoopSigner(address('1234..5678'));
const [messageSignatures] = await signer.signMessages([message]);
const [transactionSignatures] = await signer.signTransactions([transaction]);
// ^ Both messageSignatures and transactionSignatures are empty.

This signer may be useful:

  • For testing purposes.
  • For indicating that a given account is a signer and taking the responsibility to provide the signature for that account ourselves. For instance, if we need to send the transaction to a server that will sign it and send it for us.