CCC Docs
    Preparing search index...

    Class SignerMultisigCkbPrivateKey

    A class extending Signer that provides access to a CKB multisig script and supports signing operations.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    EmptySignature: `0x${string}` = ...
    multisigInfo: MultisigCkbWitness
    since?: Since
    scriptInfos: Promise<{ script: Script; cellDeps: CellDepInfo[] }[]>
    client_: Client

    Accessors

    Methods

    • Prepare the witness args at a specific index.

      Parameters

      • txLike: TransactionLike

        The transaction.

      • index: number

        The index of the witness args.

      • Optionaltransformer:
            | (
                (
                    witness: MultisigCkbWitness,
                    witnessArgs: WitnessArgs,
                ) =>
                    | void
                    | MultisigCkbWitnessLike
                    | Promise<(void | MultisigCkbWitnessLike | null | undefined)>
                    | null
                    | undefined
            )
            | null

        The transformer function.

      Returns Promise<Transaction>

      The prepared transaction.

    • 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 counts signatures for matching multisig inputs and does not imply that the transaction should 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.

    • 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.

    • 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.

    • 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.