CCC Docs
    Preparing search index...

    Class MultisigCkbWitness

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

    Hierarchy

    Index
    • Parameters

      • publicKeyHashes: {
            publicKeyHashes: `0x${string}`[];
            threshold: number;
            mustMatch: number;
            signatures: `0x${string}`[];
        }

        The public key hashes.

      Returns MultisigCkbWitness

    byteLength?: number

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

    Encode the entity into bytes

    Type Declaration

    Will throw an error if the entity is not serializable

    decode: (_: BytesLike, _context?: any) => MultisigCkbWitness

    Decode the entity from bytes

    Type Declaration

    Will throw an error if the entity is not serializable

    fromBytes: (_bytes: BytesLike, _context?: any) => MultisigCkbWitness

    Create an entity from bytes

    Type Declaration

    Will throw an error if the entity is not serializable

    publicKeyHashes: `0x${string}`[]
    threshold: number
    mustMatch: number
    signatures: `0x${string}`[]
    • 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.