CCC Docs
    Preparing search index...

    Class MultisigCkbWitness

    A class representing multisig information, holding information ingredients and containing utilities.

    Hierarchy

    Index

    Constructors

    • Parameters

      • publicKeyHashes: `0x${string}`[]

        The public key hashes.

      • threshold: number

        The threshold.

      • mustMatch: number

        The number of signatures that must match.

      • signatures: `0x${string}`[]

        The signatures.

      Returns MultisigCkbWitness

    Properties

    byteLength?: number

    The bytes length of the entity, if it is fixed, otherwise undefined

    publicKeyHashes: `0x${string}`[]

    The public key hashes.

    threshold: number

    The threshold.

    mustMatch: number

    The number of signatures that must match.

    signatures: `0x${string}`[]

    The signatures.

    Accessors

    Methods

    • Convert the entity to bytes

      Returns Bytes

      The bytes representation of the entity

    • Check if the entity is equal to another entity

      Parameters

      Returns boolean

      True if the entities are equal, false otherwise

    • Calculate the hash of the entity

      Returns `0x${string}`

      The hash of the entity

    • Convert the entity to a full-byte untrimmed Hex representation

      Returns `0x${string}`

      The entity full-byte untrimmed hexadecimal representation

    • Generate valid public key hashes and their signatures from the witness. This method filters out invalid signatures, duplicate signatures, and signatures not in the multisig script.

      Parameters

      Returns Generator<
          {
              pubkeyHash: `0x${string}`;
              signature: `0x${string}`;
              isRequired: boolean;
          },
      >

      A generator of public key hashes, signatures, and whether the signature is required.

    • Calculate the number of matched signatures in the witness.

      Parameters

      Returns { required: number; flexible: number }

      The number of required and flexible signatures.