navio-blsct
    Preparing search index...

    Class TxOut

    Represents a transaction output used to construct a CTxOut in a confidential transaction.

    Examples:

    const { SubAddr, DoublePublicKey, TxOut, TokenId, TxOutputType } = require('navio-blsct')
    const dpk = new DoublePublicKey()
    const subAddr = SubAddr.fromDoublePublicKey(dpk)
    const amount = 789
    const memo = "apple"
    const txOut = TxOut.generate(subAddr, amount, memo)
    txOut.getDestination()
    txOut.getAmount() // 789
    txOut.getMemo() // "apple"
    txOut.getTokenId()
    txOut.getMinStake() // 0
    const ser = txOut.serialize()
    const deser = TxOut.deserialize(ser)
    ser === deser.serialize() // true

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    obj: any
    objSize: number

    Methods

    • Returns a deep copy of the instance.

      Returns TxOut

      A new TxOut instance that is a deep copy of this instance.

    • Returns the amount of the transaction output.

      Returns number

      The amount of the transaction output.

    • Returns the destination SubAddr of the transaction output.

      Returns SubAddr

      The destination SubAddr of the transaction output.

    • Returns the memo of the transaction output.

      Returns string

      The memo of the transaction output.

    • Returns the minimum stake required for the transaction output.

      Returns number

      The minimum stake required for the transaction output.

    • Returns the token ID associated with the transaction output.

      Returns TokenId

      The token ID associated with the transaction output.

    • Returns the underlying C++ object, transferring ownership from this instance to the caller.

      Returns any

      The underlying object of the instance.

    • Serializes the instance to a hexadecimal string.

      Returns string

      A hexadecimal string representation of the instance.

    • Returns the size of the underlying C++ object.

      Returns number

      The size of the underlying C++ object in bytes.

    • Returns a string representation of the instance.

      Returns string

      A string representation of the instance.

    • Returnsthe underlying C++ object.

      Returns any

      The underlying C++ object.

    • Deserializes a TxOut from its hexadecimal representation.

      Parameters

      • this: new (obj: any) => TxOut
      • hex: string

        The hexadecimal string to deserialize.

      Returns TxOut

      A new TxOut instance.

    • Constucts a new instance using the provided object.

      Type Parameters

      Parameters

      • this: new (obj: any, objSize?: number) => T
      • obj: any

        The object to use for the new instance.

      Returns T

      A new instance of the class.

    • Constructs a new instance using the provided object and size.

      Type Parameters

      Parameters

      • this: new (obj: any) => T
      • obj: any

        The object to use for the new instance.

      • objSize: number

        The size of the object.

      Returns T

      A new instance of the class.

    • Constructs a new TxOut instance.

      Parameters

      • subAddr: SubAddr

        The destination SubAddr of the output.

      • amount: number

        The amount of the output.

      • memo: string

        The memo of the output.

      • OptionaltokenId: TokenId

        The token ID associated with the output (optional).

      • outputType: TxOutputType = TxOutputType.Normal

        The type of the output (default is TxOutputType.Normal).

      • minStake: number = 0

        The minimum stake for the output (default is 0).

      Returns TxOut

      A new TxOut instance.