CCC Docs
    Preparing search index...

    Hierarchy

    Index

    Constructors

    • Creates an instance of OutPoint.

      Parameters

      • txHash: `0x${string}`

        The transaction hash.

      • index: bigint

        The index of the output in the transaction.

      Returns OutPoint

    Properties

    txHash: `0x${string}`

    The transaction hash.

    index: bigint

    The index of the output in the transaction.

    byteLength?: number

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

    Methods

    • Creates an OutPoint instance from an OutPointLike object.

      Parameters

      • outPoint: OutPointLike

        An OutPointLike object or an instance of OutPoint.

      Returns OutPoint

      An OutPoint instance.

      const outPoint = OutPoint.from({ txHash: "0x...", index: 0 });
      
    • Clone a OutPoint.

      Returns OutPoint

      A cloned OutPoint instance.

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

      Parameters

      Returns boolean

      True if the OutPoints are equal, false otherwise

      const isEqual = outPoint0.eq(outPoint1);
      
    • Encode the entity into bytes

      Parameters

      Returns Bytes

      The encoded bytes

      Will throw an error if the entity is not serializable

    • Decode the entity from bytes

      Parameters

      Returns OutPoint

      The decoded entity

      Will throw an error if the entity is not serializable

    • Create an entity from bytes

      Parameters

      Returns OutPoint

      The created entity

      Will throw an error if the entity is not serializable

    • 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