CCC Docs
    Preparing search index...

    Class SignerMultisigAbstract

    An abstract class representing a multisig signer.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    client_: Client

    Accessors

    Methods

    • Register a listener to be called when this signer is replaced.

      Parameters

      • _: () => void

      Returns () => void

      A function for unregister

    • Gets the internal address associated with the signer.

      Returns Promise<string>

      A promise that resolves to a string representing the internal address.

    • Gets the identity for verifying signature, usually it's address

      Returns Promise<string>

      A promise that resolves to a string representing the identity

    • Gets the recommended Address object for the signer.

      Parameters

      • Optional_preference: unknown

        Optional preference parameter.

      Returns Promise<Address>

      A promise that resolves to the recommended Address object.

    • Gets the recommended address for the signer as a string.

      Parameters

      • Optionalpreference: unknown

        Optional preference parameter.

      Returns Promise<string>

      A promise that resolves to the recommended address as a string.

    • Gets an array of addresses associated with the signer as strings.

      Returns Promise<string[]>

      A promise that resolves to an array of addresses as strings.

    • Find cells of this signer

      Parameters

      • filter: ClientIndexerSearchKeyFilterLike

        The filter for the search key.

      • OptionalwithData: boolean | null

        Whether to include cell data in the response.

      • Optionalorder: "asc" | "desc"

        The order of the returned cells, can be "asc" or "desc".

      • Optionallimit: number

        The maximum number of cells for every querying chunk.

      Returns AsyncGenerator<Cell>

      A async generator that yields all matching cells

    • Find transactions of this signer

      Parameters

      Returns AsyncGenerator<
          {
              txHash: `0x${string}`;
              blockNumber: bigint;
              txIndex: bigint;
              isInput: boolean;
              cellIndex: bigint;
          },
      >

      A async generator that yields all matches transactions

    • Find transactions of this signer

      Parameters

      Returns AsyncGenerator<
          {
              txHash: `0x${string}`;
              blockNumber: bigint;
              txIndex: bigint;
              cells: { isInput: boolean; cellIndex: bigint }[];
          },
      >

      A async generator that yields all matches transactions

    • Find transactions of this signer

      Parameters

      Returns AsyncGenerator<
          | {
              txHash: `0x${string}`;
              blockNumber: bigint;
              txIndex: bigint;
              isInput: boolean;
              cellIndex: bigint;
          }
          | {
              txHash: `0x${string}`;
              blockNumber: bigint;
              txIndex: bigint;
              cells: { isInput: boolean; cellIndex: bigint }[];
          },
      >

      A async generator that yields all matches transactions

    • Signs a message and returns signature only. This method is not implemented and should be overridden by subclasses.

      Parameters

      • _: BytesLike

        The message to sign, as a string or BytesLike object.

      Returns Promise<string>

      A promise that resolves to the signature as a string.

      Will throw an error if not implemented.

    • Verify a signature.

      Parameters

      • message: BytesLike

        The original message.

      • signature: string | Signature

        The signature to verify.

      Returns Promise<boolean>

      A promise that resolves to the verification result.

      Will throw an error if not implemented.

    • Prepares a transaction before signing. This method can be overridden by subclasses to perform any necessary steps, such as adding cell dependencies or witnesses, before the transaction is signed. The default implementation converts the TransactionLike object to a Transaction object without modification.

      Parameters

      Returns Promise<Transaction>

      A promise that resolves to the prepared Transaction object.

      Note that this default implementation does not add any cell dependencies or dummy witnesses. This may lead to an underestimation of transaction size and fees if used with methods like Transaction.completeFee. Subclasses for signers that are intended to sign transactions should override this method to perform necessary preparations.

    • Get the number of members in the multisig script.

      Returns Promise<number>

      The number of members.

    • Get the threshold of the multisig script.

      Returns Promise<number>

      The threshold.

    • Get the count of required member of the multisig script.

      Returns Promise<number>

      The must match count.

    • Get the number of valid signatures for matching multisig inputs in the transaction.

      Parameters

      Returns Promise<number | undefined>

      The matched multisig signature count, or undefined when the transaction is unrelated to any multisig address supported by this signer.

      Returns undefined when the transaction has no inputs locked by any multisig address supported by this signer. This method only evaluates matching multisig inputs and does not indicate whether the transaction itself is expected to be signed by this multisig.

    • Check if related multisig inputs in the transaction need more signatures.

      Parameters

      Returns Promise<boolean>

      A promise that resolves to true when related multisig inputs still need signatures, and false otherwise.

      Returns false when the transaction has no inputs locked by any multisig address supported by this signer. A false result therefore means either the related multisig inputs are already fulfilled, or the transaction is unrelated to all multisig addresses supported by this signer.

    • Send a transaction.

      Parameters

      Returns Promise<`0x${string}`>

      The transaction hash.

      This method rejects the transaction only when related multisig inputs still need signatures. It does not verify that the transaction actually contains inputs locked by any multisig address supported by this signer, so transactions unrelated to those multisig addresses are not rejected by this check.