Options
All
  • Public
  • Public/Protected
  • All
Menu

Class AssetTransferInput

An AssetTransferInput consists of the following:

  • An AssetOutPoint, which points to the asset to be spent.
  • A lock script and an unlock script, that prove ownership of the asset
  • The hashed value(blake256) of a lock script must be identical to that of the pointed asset's lock script hash.
  • The results of running the script must return successful in order for the Asset's input to be valid.

Hierarchy

  • AssetTransferInput

Index

Constructors

constructor

Properties

lockScript

lockScript: Buffer

prevOut

prevOut: AssetOutPoint

unlockScript

unlockScript: Buffer

Methods

setLockScript

  • setLockScript(lockScript: Buffer): void

setUnlockScript

  • setUnlockScript(unlockScript: Buffer): void

toEncodeObject

  • toEncodeObject(): (Buffer | (string | number)[])[]

toJSON

  • toJSON(): object
  • Convert to an AssetTransferInput JSON object.

    Returns object

    An AssetTransferInput JSON object.

    • lockScript: number[]
    • prevOut: object
      • amount: number
      • assetType: string
      • index: number
      • transactionHash: string
    • unlockScript: number[]

withoutScript

Static fromJSON

Generated using TypeDoc