isTransactionPartialSigner

function isTransactionPartialSigner<TAddress, TValue>(
    value,
): value is Readonly<{
    address: Address<TAddress>;
    signTransactions: any;
}> &
    TValue;

Checks whether the provided value implements the TransactionPartialSigner interface.

Type Parameters

Type ParameterDescription
TAddress extends stringThe inferred type of the address provided.
TValue extends object-

Parameters

ParameterType
valueTValue

Returns

value is Readonly<{ address: Address<TAddress>; signTransactions: any }> & TValue

Example

import { Address } from '@solana/addresses';
import { isTransactionPartialSigner } from '@solana/signers';
 
const address = '1234..5678' as Address<'1234..5678'>;
isTransactionPartialSigner({ address, signTransactions: async () => {} }); // true
isTransactionPartialSigner({ address }); // false

See

assertIsTransactionPartialSigner

On this page