Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Transaction

Hierarchy

  • Transaction

Index

Constructors

constructor

Properties

Private plugins

plugins: Plugin[]

Methods

encodeDataForDigestHash

  • encodeDataForDigestHash(tx: TransactionModel, include_signs: boolean): number[]

generateTransaction

getBlock

  • getBlock(node: string, chain: string, blockid: string): Promise<any>
  • Parameters

    • node: string
    • chain: string
    • blockid: string

    Returns Promise<any>

getBlockByHeight

  • getBlockByHeight(node: string, chain: string, height: string): Promise<any>

makeTransaction

makeTxInputs

  • makeTxInputs(utxos: UTXO[]): TXInput[]

makeTxOutput

  • makeTxOutput(totalSelected: BN | string | number, totalNeed: BN | string | number, toAddress: string): TXOutput
  • Parameters

    • totalSelected: BN | string | number
    • totalNeed: BN | string | number
    • toAddress: string

    Returns TXOutput

makeTxOutputs

  • makeTxOutputs(amount: BN | string | number, fee?: BN | string | number, to?: undefined | string): TXOutput[]
  • Parameters

    • amount: BN | string | number
    • Optional fee: BN | string | number
    • Optional to: undefined | string

    Returns TXOutput[]

post

  • post(node: string, chain: string, tx: any, account?: AccountModel): Promise<any>

preExec

  • preExec(node: string, chain: string, address: string, authRequire?: string[], invokeRequests?: ContractRequesttModel[]): Promise<any>
  • Parameters

    • node: string
    • chain: string
    • address: string
    • Default value authRequire: string[] = []
    • Default value invokeRequests: ContractRequesttModel[] = []

    Returns Promise<any>

preExecWithUTXO

  • preExecWithUTXO(node: string, chain: string, address: string, sum: string | number | BN, authRequire?: string[], invokeRequests?: ContractRequesttModel[], account?: AccountModel): Promise<any>

queryTransaction

  • queryTransaction(node: string, chain: string, txid: string): Promise<any>

signTx