Class TransactionBuilder

Class contains available transaction operation names constants

Hierarchy

  • TransactionBuilder

Index

Constructors

constructor

Accessors

operations

transaction

  • get transaction(): any

Methods

addOperation

  • Append new operation to transaction object.

    Parameters

    • operation: Operation

      Operation to append to transaction.

    Returns void

    Successful operation add value.

broadcast

  • broadcast(privateKey: string, sign?: boolean): Promise<void>
  • Broadcast transaction to DCore blockchain.

    Parameters

    • privateKey: string

      Private key to sign transaction in WIF(hex)(Wallet Import Format) format .

    • Default value sign: boolean = true

      If value is 'true' transaction will be singed, in 'false' transaction will not be signed. Default 'true'

    Returns Promise<void>

    Void.

previewTransaction

  • previewTransaction(): any

propose

replaceOperation

  • replaceOperation(operationIndex: number, newOperation: Operation): boolean
  • Replace operation on operationIndex with newOperation

    Parameters

    • operationIndex: number

      Index of operation to replace. Must be greater than 0 and smaller than length of operations.

    • newOperation: Operation

      Operation to be placed to index.

    Returns boolean

    Returns true if replaced, false otherwise.

setTransactionFees

  • setTransactionFees(): Promise<void>

signTransaction

Powered by DECENT