Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • TransactionFactory

Index

Constructors

constructor

Properties

messenger

messenger: Messenger

Methods

clone

  • clone the transaction

    example
    const cloneTxn = hmy.transactions.clone(txn);
    console.log(cloneTxn)

    Parameters

    Returns Transaction

newTx

  • Create a new Transaction

    params
    // to: Address of the receiver
    // value: value transferred in wei
    // gasLimit: the maximum gas would pay, can use string
    // shardID: send token from shardID
    // toShardId: send token to shardID
    // gasPrice: you can use Unit class, and use Gwei, then remember to use toWei(), which will be transformed to BN
    example
    const txn = hmy.transactions.newTx({
      to: 'one166axnkjmghkf3df7xfvd0hn4dft8kemrza4cd2',
      value: '10000',
      gasLimit: '210000',
      shardID: 0,
      toShardID: 0,
      gasPrice: new hmy.utils.Unit('100').asGwei().toWei(),
    });

    Parameters

    • Optional txParams: TxParams | any
    • Default value sharding: boolean = false

    Returns Transaction

recover

  • example
    txHash = '0xf8698085174876e8008252088080949d72989b68777a1f3ffd6f1db079f1928373ee52830186a08027a0ab8229ff5d5240948098f26372eaed9ab2e9be23e8594b08e358ca56a47f8ae9a0084e5c4d1fec496af444423d8a714f65c079260ff01a1be1de7005dd424adf44'
    
    const recoverTx = hmy.transactions.recover(txHash);
    console.log(recoverTx);

    Parameters

    • txHash: string

    Returns Transaction

setMessenger

  • Parameters

    Returns void

Static getContractAddress

  • Parameters

    Returns any

Generated using TypeDoc