Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface AssetApi

Asset API

The Asset API provides all functions for Asset/Token operations

Hierarchy

  • AssetApi

Index

Properties

addAssetTreasuryAccount

addAssetTreasuryAccount: function

Adds/Marks an account as treasury account for a given asset

Treasury Accounts are excluded from distributions for token/asset holders.

param
returns

The transaction object

throws

Error in case of unsuccessful transaction

Type declaration

burnAsset

burnAsset: function

Burns assets, i.e. is de facto a transfer to recipient address '0'

param

The argument object

returns

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

Type declaration

calculateDistributionFee

calculateDistributionFee: function

Calculates the fee for AssetApi.distributeToAssetHolders

param

The args object

param

fee object with amount of eligible asset holders

Type declaration

cancelAskOrder

cancelAskOrder: function

Cancel Ask Order

param

The argument object

returnthe

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

Type declaration

cancelBidOrder

cancelBidOrder: function

Cancel Bid Order

param

The argument object

returns

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

Type declaration

distributeToAssetHolders

distributeToAssetHolders: function

Distributes Signa and/or another asset to the holders of a given asset. Just pass the total amount to be distributed and it will be sent/distributed proportionally (at very high transation rate, i.e. 5K TPS) to all holders.

To inspect the share a token holder received you need to use TransactionApi.getDistributionAmountsFromTransaction

To calculate the fees upfront use AssetApi.calculateDistributionFee.

param

The distribution args object

throws

Error in case of unsuccessful transaction

Type declaration

getAllAssets

getAllAssets: function

Get all available assets

param

The argument object

returns

List of assets

Type declaration

getAllTrades

getAllTrades: function

Search for asset trades

param

The argument object

returns

The list of asset trades

Type declaration

getAsset

getAsset: function

Get asset information by its id

param

The arguments object

returns

The asset, if exists

Type declaration

getAssetHolders

getAssetHolders: function

Get all accounts that holds the fiven asset

param

The argument object

returns

The list of asset accounts

Type declaration

getAssetTrades

getAssetTrades: function

Get all asset trades by accountId and/or assetId

see

also AssetApi.getAssetTradesPerAsset or AssetApi.getAssetTradesPerAccount

param

The argument object

returns

The list of asset trades

throws

Error if not at least assetId or accountId was giveb

Type declaration

getAssetTradesPerAccount

getAssetTradesPerAccount: function

A convenience function to get all asset transfers by accountId

see

also AssetApi.getAssetTrades

param

The argument object

returns

The list of asset trades

Type declaration

getAssetTradesPerAsset

getAssetTradesPerAsset: function

A convenience function to get all asset transfers by assetId

see

also AssetApi.getAssetTrades

param

The argument object

returns

The list of asset trades

Type declaration

getAssetTransfers

getAssetTransfers: function

Get all asset transfers by accountId and/or assetId

see

also AssetApi.getAssetTransfersPerAsset or AssetApi.getAssetTransfersPerAccount

param

The argument object

returns

The list of asset transfers

throws

Error if not at least assetId or accountId was giveb

Type declaration

getAssetTransfersPerAccount

getAssetTransfersPerAccount: function

A convenience function to get all asset transfers by accountId

see

also AssetApi.getAssetTransfers

param

The argument object

returns

The list of asset transfers

Type declaration

getAssetTransfersPerAsset

getAssetTransfersPerAsset: function

A convenience function to get all asset transfers by assetId

see

also AssetApi.getAssetTransfers

param

The argument object

returns

The list of asset transfers

Type declaration

getAssetsByIssuer

getAssetsByIssuer: function

Gets all assets by given issuer. So, if an ownership was transferred the asset won't be listed by this call.

param

The args object

param

asset list

Type declaration

getAssetsByName

getAssetsByName: function

Gets all assets by name (or parts of it)

param

The args object

param

asset list

Type declaration

getAssetsByOwner

getAssetsByOwner: function

Gets all assets by given owner. So, if an ownership was transferred this new owner is considered byt this call.

param

The args object

param

asset list

Type declaration

getOpenAskOrders

getOpenAskOrders: function

Gets all open Ask Orders

param

The query object

returns

A list of ask orders

Type declaration

getOpenAskOrdersPerAccount

getOpenAskOrdersPerAccount: function

Gets all open Ask Orders

param

The query object

returns

A list of ask orders

Type declaration

getOpenAskOrdersPerAsset

getOpenAskOrdersPerAsset: function

Gets all open Ask Orders per asset

param

The query object

returns

A list of ask orders

Type declaration

getOpenBidOrders

getOpenBidOrders: function

Gets all open Bid Orders

param

The query object

returns

A list of bid orders

Type declaration

getOpenBidOrdersPerAccount

getOpenBidOrdersPerAccount: function

Gets all open Bid Orders per account

param

The query object

returns

A list of bid orders

Type declaration

getOpenBidOrdersPerAsset

getOpenBidOrdersPerAsset: function

Gets all open Bid Orders per asset

param

The query object

returns

A list of bid orders

Type declaration

getTradeHistoryPerAccount

getTradeHistoryPerAccount: function

The trade history is a journal about open/filled and/or cancelled trades for a given account and optionally set asset

param

The args object

param

trade history

Type declaration

issueAsset

issueAsset: function

Issues assets

param

The argument object

returns

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

Type declaration

mintAsset

mintAsset: function

Mints assets

param

The argument object

returns

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

Type declaration

placeAskOrder

placeAskOrder: function

Place Ask Order

param

The argument object

returns

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

Type declaration

placeBidOrder

placeBidOrder: function

Place Ask Order

param

The argument object

returns

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

Type declaration

transferAsset

transferAsset: function

Transfer assets

param

The argument object

returns

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

Type declaration

transferAssetOwnership

transferAssetOwnership: function

Transfer assets ownership

param

The argument object

returns

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

Type declaration

transferMultipleAssets

transferMultipleAssets: function

Transfer multiple (2-4) assets in one transaction.

param

The argument object

returns

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

Type declaration