Constructors

  • Creates an instance of OutPoint.

    Parameters

    • txHash: `0x${string}`

      The transaction hash.

    • index: bigint

      The index of the output in the transaction.

    Returns ccc.OutPoint

Properties

txHash: `0x${string}`

The transaction hash.

index: bigint

The index of the output in the transaction.

Methods

  • Creates an OutPoint instance from an OutPointLike object.

    Parameters

    • outPoint: OutPointLike

      An OutPointLike object or an instance of OutPoint.

    Returns ccc.OutPoint

    An OutPoint instance.

    const outPoint = OutPoint.from({ txHash: "0x...", index: 0 });
    
  • Converts the OutPoint instance to bytes.

    Returns Uint8Array

    A Uint8Array containing the outpoint bytes.

    const outPointBytes = outPoint.toBytes();
    
  • Compares the current OutPoint instance with another OutPointLike object for equality.

    Parameters

    Returns boolean

    True if the out points are equal, otherwise false.

    const isEqual = outPoint.eq(anotherOutPoint);