Hierarchy

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 });
    
  • Encode the entity into bytes

    Parameters

    Returns Uint8Array

    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 Uint8Array

    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