Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

Index

Constructors

constructor

Properties

Protected api

Methods

claim

  • Claim fees. Claim funds from asset pool, only the asset issuer can claim.

    Parameters

    • credentials: Credentials

      account credentials issuing the asset

    • asset: AssetRef

      which asset to claim from

    • uia: Long | number

      UIA raw amount

    • dct: Long | number

      DCT raw amount

    • Optional fee: Fee

      fee for the operation or asset id, if left undefined the fee will be computed in DCT asset. When set, the request might fail if the asset is not convertible to DCT or conversion pool is not large enough

    Returns Observable<TransactionConfirmation>

convertFromDCT

  • convertFromDCT(assetId: ChainObject, amount: number | Long, roundingMode?: Decimal.Rounding): Observable<AssetAmount>
  • Get asset by id and convert amount in DCT to this asset

    Parameters

    • assetId: ChainObject

      asset id to get

    • amount: number | Long

      amount to convert

    • Default value roundingMode: Decimal.Rounding = Decimal.ROUND_CEIL

      rounding mode to use when rounding to target asset precision

    Returns Observable<AssetAmount>

convertToDCT

  • convertToDCT(assetId: ChainObject, amount: number | Long, roundingMode?: Decimal.Rounding): Observable<AssetAmount>
  • Get asset by id and convert amount in this asset to DCT

    Parameters

    • assetId: ChainObject

      asset id to get

    • amount: number | Long

      amount to convert

    • Default value roundingMode: Decimal.Rounding = Decimal.ROUND_CEIL

      rounding mode to use when rounding to target asset precision

    Returns Observable<AssetAmount>

create

  • Create a new Asset.

    Parameters

    • credentials: Credentials

      account credentials issuing the asset

    • symbol: string

      the string symbol, 3-16 uppercase chars

    • precision: AssetPrecision

      base unit precision, decimal places used in string representation

    • description: string

      optional description

    • Default value options: AssetOptions = new AssetOptions(ExchangeRate.forCreateOp(1, 1))

      asset options

    • Optional fee: Fee

      fee for the operation or asset id, if left undefined the fee will be computed in DCT asset. When set, the request might fail if the asset is not convertible to DCT or conversion pool is not large enough

    Returns Observable<TransactionConfirmation>

createAssetCreateOperation

  • Create asset create operation.

    Parameters

    • issuer: ChainObject

      account id issuing the asset

    • symbol: string

      the string symbol, 3-16 uppercase chars

    • precision: AssetPrecision

      base unit precision, decimal places used in string representation

    • description: string

      optional description

    • options: AssetOptions

      asset options

    • Optional monitoredOptions: MonitoredAssetOpts

      options for monitored asset

    • Optional fee: Fee

      fee for the operation or asset id, if left undefined the fee will be computed in DCT asset. When set, the request might fail if the asset is not convertible to DCT or conversion pool is not large enough

    Returns Observable<AssetCreateOperation>

createAssetIssueOperation

  • Create issue asset operation. Only the issuer of the asset can issue some funds until maxSupply is reached.

    Parameters

    • asset: AssetRef

      asset to issue

    • amount: Long | number

      raw amount to issue

    • Optional to: ChainObject

      optional account id receiving the created funds, issuer account id is used if not defined

    • Optional memo: Memo

      optional memo for receiver

    • Optional fee: Fee

      fee for the operation or asset id, if left undefined the fee will be computed in DCT asset. When set, the request might fail if the asset is not convertible to DCT or conversion pool is not large enough

    Returns Observable<AssetIssueOperation>

createAssetUpdateAdvancedOperation

  • Create update advanced options operation for the asset.

    Parameters

    • asset: AssetRef

      asset to update

    • Optional fee: Fee

      fee for the operation or asset id, if left undefined the fee will be computed in DCT asset. When set, the request might fail if the asset is not convertible to DCT or conversion pool is not large enough

    Returns Observable<AssetUpdateAdvancedOperation>

createAssetUpdateOperation

  • Create update asset operation.

    Parameters

    • asset: AssetRef

      asset to update

    • Optional newIssuer: ChainObject

      a new issuer account id

    • Optional fee: Fee

      fee for the operation or asset id, if left undefined the fee will be computed in DCT asset. When set, the request might fail if the asset is not convertible to DCT or conversion pool is not large enough

    Returns Observable<AssetUpdateOperation>

createClaimFeesOperation

  • Create claim fees operation. Claim funds from asset pool, only the asset issuer can claim.

    Parameters

    • asset: AssetRef

      which asset to claim from

    • uia: Long | number

      UIA raw amount

    • dct: Long | number

      DCT raw amount

    • Optional fee: Fee

      fee for the operation or asset id, if left undefined the fee will be computed in DCT asset. When set, the request might fail if the asset is not convertible to DCT or conversion pool is not large enough

    Returns Observable<AssetClaimFeesOperation>

createFundPoolsOperation

  • Create fund asset pool operation. Any account can fund a pool.

    Parameters

    • asset: AssetRef

      which asset to fund

    • uia: Long | number

      UIA raw amount

    • dct: Long | number

      DCT raw amount

    • Optional fee: Fee

      fee for the operation or asset id, if left undefined the fee will be computed in DCT asset. When set, the request might fail if the asset is not convertible to DCT or conversion pool is not large enough

    Returns Observable<AssetFundPoolsOperation>

createMonitoredAsset

createReserveOperation

  • Create reserve funds operation. Return issued funds to the issuer of the asset.

    Parameters

    • asset: AssetRef

      which asset to reserve from

    • amount: Long | number

      raw amount to remove from current supply

    • Optional fee: Fee

      fee for the operation or asset id, if left undefined the fee will be computed in DCT asset. When set, the request might fail if the asset is not convertible to DCT or conversion pool is not large enough

    Returns Observable<AssetReserveOperation>

fund

  • Fund asset pool. Any account can fund a pool.

    Parameters

    • credentials: Credentials

      account credentials funding the pool

    • asset: AssetRef

      which asset to fund

    • uia: Long | number

      UIA raw amount

    • dct: Long | number

      DCT raw amount

    • Optional fee: Fee

      fee for the operation or asset id, if left undefined the fee will be computed in DCT asset. When set, the request might fail if the asset is not convertible to DCT or conversion pool is not large enough

    Returns Observable<TransactionConfirmation>

get

getAll

getAllByName

  • getAllByName(assetSymbols: string[]): Observable<Asset[]>

getAssetsData

getByName

  • getByName(assetSymbol: string): Observable<Asset>

getRealSupply

issue

  • Issue asset. Only the issuer of the asset can issue some funds until maxSupply is reached.

    Parameters

    • credentials: Credentials

      account credentials issuing the asset

    • asset: AssetRef

      asset to issue

    • amount: Long | number

      raw amount to issue

    • Optional to: ChainObject

      optional account id receiving the created funds, issuer account id is used if not defined

    • Optional memo: Memo

      optional memo for receiver

    • Optional fee: Fee

      fee for the operation or asset id, if left undefined the fee will be computed in DCT asset. When set, the request might fail if the asset is not convertible to DCT or conversion pool is not large enough

    Returns Observable<TransactionConfirmation>

listAll

  • listAll(includeMonitored?: boolean): Observable<Asset[]>

listAllRelative

  • listAllRelative(lowerBound: string, limit?: number): Observable<Asset[]>
  • Get assets alphabetically by symbol name.

    Parameters

    • lowerBound: string

      lower bound of symbol names to retrieve

    • Default value limit: number = 100

      maximum number of assets to fetch (must not exceed 100)

    Returns Observable<Asset[]>

    the assets found

Private pageAll

  • pageAll(lowerBound: string): Observable<Asset[]>

Protected request

reserve

  • Reserve funds. Return issued funds to the issuer of the asset.

    Parameters

    • credentials: Credentials

      account credentials returning the asset

    • asset: AssetRef

      which asset to reserve from

    • amount: Long | number

      raw amount to remove from current supply

    • Optional fee: Fee

      fee for the operation or asset id, if left undefined the fee will be computed in DCT asset. When set, the request might fail if the asset is not convertible to DCT or conversion pool is not large enough

    Returns Observable<TransactionConfirmation>

update

  • Update asset.

    Parameters

    • credentials: Credentials

      account credentials issuing the asset

    • asset: AssetRef

      asset to update

    • Optional exchangeRate: [Long | number, Long | number]

      new exchange rate, DCT base amount to UIA quote amount pair

    • Optional description: undefined | string

      new description

    • Optional exchangeable: undefined | false | true

      enable converting the asset to DCT, so it can be used to pay for fees

    • Optional maxSupply: Long

      new max supply

    • Optional newIssuer: ChainObject

      a new issuer account id

    • Optional fee: Fee

      fee for the operation or asset id, if left undefined the fee will be computed in DCT asset. When set, the request might fail if the asset is not convertible to DCT or conversion pool is not large enough

    Returns Observable<TransactionConfirmation>

updateAdvanced

  • Update advanced options for the asset.

    Parameters

    • credentials: Credentials

      account credentials issuing the asset

    • asset: AssetRef

      asset to update

    • Optional precision: AssetPrecision

      new precision

    • Optional fixedMaxSupply: undefined | false | true

      whether it should be allowed to change max supply, cannot be reverted once set to true

    • Optional fee: Fee

      fee for the operation or asset id, if left undefined the fee will be computed in DCT asset. When set, the request might fail if the asset is not convertible to DCT or conversion pool is not large enough

    Returns Observable<TransactionConfirmation>

Generated using TypeDoc