Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface TransactionApi

Transaction API

This module provides methods related to blockchain transactions

Hierarchy

  • TransactionApi

Index

Properties

broadcastTransaction

broadcastTransaction: function

Broadcasts a transaction to the network/blockchain

param

The signed transaction payload encoded in base64

returns

The Transaction Id or Unsigned Bytes as Hex String if no private key was sent

Type declaration

    • Parameters

      • signedTransactionPayload: string

      Returns Promise<TransactionId>

cancelSubscription

cancelSubscription: function

Cancels a subscription

param

The argument object

returns

The Transaction Id or Unsigned Bytes as Hex String if no private key was sent

Type declaration

createSubscription

createSubscription: function

Create a subscription

param

The argument object

returns

The Transaction Id or Unsigned Bytes as Hex String if no private key was sent

Type declaration

getDistributionAmountsFromTransaction

getDistributionAmountsFromTransaction: function

Gets the amount a token holder received from a previous distribution to asset/token holders

Distribution to token holders is very efficient at very high transaction rate, so one need explicitely query the node for the underlying amounts of a run distribution.

see

AssetApi.distributeToAssetHolders

param

The transaction Id of the distribution

param

The relevant account

returns

the received income from an asset distribution payment

Type declaration

getSubscription

getSubscription: function

Gets a subscription

param

The id of the subscription

returns

The Subscription Object (as promise)

Type declaration

getSubscriptionPayments

getSubscriptionPayments: function

Gets the payments from a specific subscription aka Auto-Payment

param

argument object

returns

a list of transactions which belong to the given subscription

Type declaration

getTransaction

getTransaction: function

Get a transaction and its details from the network/blockchain

param

The transaction Id

returns

The Transaction

Type declaration

getTransactionByFullHash

getTransactionByFullHash: function

Get a transaction using the hash reference instead of the id

param

The transactions full hash

returns

The Transaction

Type declaration

getUnconfirmedTransactions

getUnconfirmedTransactions: function

Get the all current unconfirmed transactions

returns

The UnconfirmedTransactionList of unconfirmed transactions

Type declaration

parseTransactionBytes

parseTransactionBytes: function

Parses a transaction byte sequence to its JSON representation

param

The transaction byte sequence in hexadecimal format

returns

The parsed Transaction object

Type declaration

    • Parameters

      • transactionHexBytes: string

      Returns Promise<Transaction>

sendAmountToMultipleRecipients

sendAmountToMultipleRecipients: function

Sends a multi-out request to the blockchain with arbitrary value for each recipient

param

The argument object

returns

The Transaction Id or Unsigned Bytes as Hex String if no private key was sent

sendAmountToSingleRecipient

sendAmountToSingleRecipient: function

Sends an amount to another account/recipient

param

The argument object

returns

The Transaction Id or Unsigned Bytes as Hex String if no private key was sent

Type declaration

sendSameAmountToMultipleRecipients

sendSameAmountToMultipleRecipients: function

Sends a multi-out request to the blockchain with same value for all recipients

param

The argument object

returns

The Transaction Id or Unsigned Bytes as Hex String if no private key was sent

signAndBroadcastTransaction

signAndBroadcastTransaction: function

Signs and broadcasts a transaction

Usually, you don't need this, as all sending methods in SignumJS sign and broadcast. As not all BRS API functions are implemented yet in SignumJS this method is handy for those, i.e. all direct calls to ChainService.send

param

The unsigned Transaction Object (returned by ChainService.send)

returns

The TransactionId

Type declaration