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.
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
NoopSignerwill return an emptySignatureDictionary.