import { JWK } from './JWK.cjs'; import { Transaction } from './Transaction.cjs'; type Options = { key?: JWK; }; /** * The `TransactionSigner` is responsible for providing the method used to sign * a transaction and verify a transaction's signature. * @template TxToSign The type of transaction this signer signs. */ interface TransactionSigner { /** * Sign the given transaction. * @param transaction The transaction in question. * @param options (Optional) Options to consider when signing the transaction. * @returns The signed transaction. */ sign(transaction: Partial, options?: Options): Promise | TxToSign; /** * Validate the given signing key. * @param key The signing key in question. * @returns `true` if valid, `false` if not. */ validateSigningKey(key: K): Promise | boolean; /** * Verify a ___signed___ transaction's fields. * @param transaction The transaction in question. * @returns `true` if the transaction is valid, `false` if not. */ verify(signedTransaction: unknown): Promise | boolean; } export { TransactionSigner };