Options
All
  • Public
  • Public/Protected
  • All
Menu

Class GenericAccount<T, TO>

Type parameters

Hierarchy

Index

Constructors

constructor

Properties

address

address: string = ""

hd

hd: HDKey | any

node

privateKey

privateKey: string = ""

publicKey

publicKey: string = ""

supportsCancel

supportsCancel: boolean = false

Private transactions

transactions: T[] = []

type

utils

utils: GenericAccountUtils | any

Methods

Abstract buildCancelTransaction

  • Builds cancel transaction if supported by the implementation

    remarks

    Sending a transaction with the same nonce but with higher gas price will cancel an existing non mined transaction if included into a block.

    Parameters

    • nonce: number

      account nonce

    • txGasPrice: number

      gas price in lowest denominator

    Returns GenericTransaction | false

    a new cancel transaction

Abstract buildTransaction

  • buildTransaction(to: string, amount: number, nonce: number, txdata: Buffer, gasPrice: number, gasLimit: number): GenericTransaction
  • Builds transaction

    Parameters

    • to: string
    • amount: number
    • nonce: number
    • txdata: Buffer
    • gasPrice: number
    • gasLimit: number

    Returns GenericTransaction

    transaction

Abstract buildTransferTransaction

  • buildTransferTransaction(to: string, amount: number, nonce: number, txGasPrice: number, txGasLimit: number): T
  • Builds transfer transaction

    Parameters

    • to: string
    • amount: number
    • nonce: number
    • txGasPrice: number
    • txGasLimit: number

    Returns T

    transfer transaction

Abstract estimateTransaction

  • estimateTransaction(to: string, amount: number, nonce: number, txdata: Buffer, txGasPrice?: number, txGasLimit?: number): Promise<number>
  • Estimates transaction

    Parameters

    • to: string
    • amount: number
    • nonce: number
    • txdata: Buffer
    • Optional txGasPrice: number
    • Optional txGasLimit: number

    Returns Promise<number>

    a cost estimate

Abstract getBalance

  • getBalance(): Promise<BigNumber>

Abstract getNonce

  • getNonce(): Promise<number>

getTransactions

  • getTransactions(): T[]

send

  • send(transaction: T, cb?: any, cbtype?: string): Promise<object>
  • Sends generic account

    Parameters

    • transaction: T
    • Optional cb: any
    • Optional cbtype: string

    Returns Promise<object>

    send

Abstract signTransaction

  • signTransaction(transaction: T): Buffer
  • Signs transaction

    Parameters

    • transaction: T

    Returns Buffer

    serialized data

tryHdWalletSetup

  • tryHdWalletSetup(): void

Static getImplementedClassName

  • getImplementedClassName(name: string): string

Generated using TypeDoc