import { generateKeyPairSigner } from '@solana/signers';
const signer = generateKeyPairSigner();
signer.address; // Address;
signer.keyPair; // CryptoKeyPair;
const [messageSignatures] = await signer.signMessages([message]);
const [transactionSignatures] = await signer.signTransactions([transaction]);
Defines a signer that uses a CryptoKeyPair to sign messages and transactions.
It implements both the MessagePartialSigner and TransactionPartialSigner interfaces and keeps track of the CryptoKeyPair instance used to sign messages and transactions.