CCC Docs
    Preparing search index...

    Hierarchy

    Index

    Constructors

    Properties

    txHash: `0x${string}`
    index: bigint
    byteLength?: number

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

    encode: (_: {} & { txHash: BytesLike; index: NumLike }) => Bytes

    Encode the entity into bytes

    Type Declaration

    Will throw an error if the entity is not serializable

    decode: (_: BytesLike, _config?: { isExtraFieldIgnored?: boolean }) => OutPoint

    Decode the entity from bytes

    Type Declaration

      • (_: BytesLike, _config?: { isExtraFieldIgnored?: boolean }): OutPoint
      • Parameters

        • _: BytesLike

          The bytes to decode

        • Optional_config: { isExtraFieldIgnored?: boolean }

          The configuration for decoding, including whether to ignore extra fields

        Returns OutPoint

        The decoded entity

    Will throw an error if the entity is not serializable

    fromBytes: (
        _bytes: BytesLike,
        _config?: { isExtraFieldIgnored?: boolean },
    ) => OutPoint

    Create an entity from bytes

    Type Declaration

      • (_bytes: BytesLike, _config?: { isExtraFieldIgnored?: boolean }): OutPoint
      • Parameters

        • _bytes: BytesLike
        • Optional_config: { isExtraFieldIgnored?: boolean }

          The configuration for decoding, including whether to ignore extra fields

        Returns OutPoint

        The created entity

    Will throw an error if the entity is not serializable

    from: (_: {} & { txHash: BytesLike; index: NumLike }) => OutPoint

    Create an entity from a serializable object

    Type Declaration

    Will throw an error if the entity is not serializable

    Methods

    • Clone a OutPoint.

      Returns OutPoint

      A cloned OutPoint instance.

      const outPoint1 = outPoint0.clone();
      
    • Check if the OutPoint is equal to another OutPoint.

      Parameters

      • other: {} & { txHash: BytesLike; index: NumLike }

        The other OutPoint to compare with

      Returns boolean

      True if the OutPoints are equal, false otherwise

      const isEqual = outPoint0.eq(outPoint1);
      
    • Convert the entity to bytes

      Returns Bytes

      The bytes representation of the entity

    • 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