npm

Join us for the upcoming webinar, "Enterprise JavaScript done right: the tools you love, the security you need."Sign up here »

@burstjs/core

0.3.0 • Public • Published

@burstjs/core

Burst-related functions and models for building Burstcoin applications.

Installation

burstJS can be used with NodeJS or Web. Two formats are available

Using with NodeJS and/or modern web frameworks

Install using npm:

npm install @burstjs/core

or using yarn:

yarn add @burstjs/core

Example

import {composeApi, ApiSettings} from '@burstjs/core'
import {convertNQTStringToNumber} from '@burstjs/util'
 
const apiSettings = new ApiSettings('http://at-testnet.burst-alliance.org:6876', 'burst');
const api = composeApi(apiSettings);
 
// this self-executing file makes turns this file into a starting point of your app
 
(async () => {
try{
const {balanceNQT} = await api.account.getAccountBalance('13036514135565182944')
console.log(`Account Balance: ${convertNQTStringToNumber(balanceNQT)} BURST`)
}
catch(e){ // e is of type HttpError (as part of @burstjs/http)
console.error(`Whooops, something went wrong: ${e.message}`)
}
})()

Using in classic <script>

Each package is available as bundled standalone library using IIFE. This way burstJS can be used also within <script>-Tags. This might be useful for Wordpress and/or other PHP applications.

Just import the package using the HTML <script> tag.

<script src='https://cdn.jsdelivr.net/npm/@burstjs/core/dist/burstjs.min.js'></script>

Example

(function(){
const api = b$.composeApi({
nodeHost: "http://at-testnet.burst-alliance.org:6876",
apiRootUrl: "/burst"
});
 
api.network.getBlockchainStatus().then(console.log).catch(console.error);
})()

See more here:

@burstjs/core Online Documentation


API Reference

Modules

api
core

Classes

ApiSettings

Context for API used in [[composeApi]]

ContractHelper

Helper class for contracts

A contract owns additional data, which is splitted in 8 byte blocks. The content is encoded in hexadecimal representation and big endianness. This helper class facilitates access to these data

BurstService

Generic BRS Web Service class.

Members

ApiSettings

Composes the API, i.e. setup the environment and mounts the API structure with its functions.

const api = composeApi({
  nodeHost: 'https://wallet1.burst-team.us:2083', // one of the mainnet nodes
  apiRootUrl: '/burst' // endpoint to the BURST API
})

Note, that this method mounts the entire API, i.e. all available methods. One may also customize the API composition using [[ApiComposer]].

api

api~ApiImpl

Copyright (c) 2019 Burst Apps Team

Kind: inner class of api

api~ApiComposer

The API composer mounts the API for given service and selected methods

Usually you would use [[composeApi]], which gives you all available API methods. Unfortunately, this will import almost all dependencies, even if you need only a fraction of the methods. To take advantage of tree-shaking (dead code elimination) you can compose your own API with the methods you need. This can reduce your final bundle significantly.

Usage:


const burstService = new BurstService({
    nodeHost: 'https://testnet.burst.fun',
    apiRootUrl: '/burst'
})

const api = apiComposer .create(burstService) .withMessageApi({ sendTextMessage }) .withAccountApi({ getAccountTransactions, getUnconfirmedAccountTransactions, getAccountBalance, generateSendTransactionQRCode, generateSendTransactionQRCodeAddress, }) .compose();

The with<section>Api uses factory methods from the api.core.factories package

Kind: inner class of api

apiComposer.withBlockApi(creatorMap)

Adds the [[BlockApi]] to be composed

Kind: instance method of ApiComposer

Param Description
creatorMap

A map of creator/factory functions for the endpoints

apiComposer.withAccountApi(creatorMap)

Adds the [[AccountApi]] to be composed

Kind: instance method of ApiComposer

Param Description
creatorMap

A map of creator/factory functions for the endpoints

apiComposer.withNetworkApi(creatorMap)

Adds the [[NetworkApi]] to be composed

Kind: instance method of ApiComposer

Param Description
creatorMap

A map of creator/factory functions for the endpoints

apiComposer.withMessageApi(creatorMap)

Adds the [[MessageApi]] to be composed

Kind: instance method of ApiComposer

Param Description
creatorMap

A map of creator/factory functions for the endpoints

apiComposer.withTransactionApi(creatorMap)

Adds the [[TransactionApi]] to be composed

Kind: instance method of ApiComposer

Param Description
creatorMap

A map of creator/factory functions for the endpoints

apiComposer.withAliasApi(creatorMap)

Adds the [[AliasApi]] to be composed

Kind: instance method of ApiComposer

Param Description
creatorMap

A map of creator/factory functions for the endpoints

apiComposer.withContractApi(creatorMap)

Adds the [[ContractApi]] to be composed

Kind: instance method of ApiComposer

Param Description
creatorMap

A map of creator/factory functions for the endpoints

apiComposer.compose()

Composes the API Note: As of being a builder pattern, this need to call this method as last

Kind: instance method of ApiComposer

ApiComposer.create(service) ⇒

Creates the composer instance

Kind: static method of ApiComposer
Returns:

the composer instance

Param
service

core

core~Account

Account class

The account class serves as a model for a Burstcoin account. It's meant to model the response from BRS API, except publicKey has been moved into the keys object.

Kind: inner class of core

core~BurstNode

Original work Copyright (c) 2018 PoC-Consortium Modified work Copyright (c) 2019 Burst Apps Team

Kind: inner class of core

core~TransactionArbitrarySubtype

Constants for arbitrary subtypes

Kind: inner property of core

core~TransactionAssetSubtype

Constants for asset subtypes

Kind: inner property of core

core~TransactionEscrowSubtype

Constants for escrow subtypes

Kind: inner property of core

core~TransactionLeasingSubtype

Constants for leasing subtypes

Kind: inner property of core

core~TransactionMarketplaceSubtype

Constants for marketplace subtypes

Kind: inner property of core

core~TransactionPaymentSubtype

Constants for payment subtypes

Kind: inner property of core

core~TransactionRewardRecipientSubtype

Constants for reward recipient subtypes (Pool Operation)

Kind: inner property of core

core~TransactionSmartContractSubtype

Constants for smart contract (aka AT) subtypes

Kind: inner property of core

core~TransactionType

Constants for transaction types

The transaction type is part of every [[Transaction]] object and used to distinguish block data. Additionally, to the transaction type a subtype is sent, that specifies the kind of transaction more detailly.

Kind: inner property of core

core~FeeQuantNQT

The smallest possible fee

Kind: inner constant of core

core~assertAttachmentVersion(transaction, versionIdentifier)

Asserts a specific version of a transactions attachment

Kind: inner method of core
Throws:

  • An exception in case of wrong version

Param Description
transaction

The transaction to be checked

versionIdentifier

The version string, i.e. MultiOutCreation

core~getContractDatablock(position, length) ⇒

Extracts a variables value as hexadecimal string from a contract's machine data

Kind: inner method of core
Returns:

The value as hexadecimal string (already considering endianness)

Param Default Description
position

The variables position

length 16

The length of data to be extracted

core~getRecipientAmountsFromMultiOutPayment(transaction) ⇒

Tries to extract recipients and its amounts for multi out payments (different and same amount)

Kind: inner method of core
Returns:

A list of recipients and their payed amount (in NQT)


Throws:

  • An exception in case of wrong transaction types

Param Description
transaction

The transaction

core~getRecipientsAmount(recipientId, transaction) ⇒

Gets the amount from a transaction, considering ordinary and multi out transactions (with same and different payments)

Kind: inner method of core
Returns:

the amount in BURST (not NQT)

Param Description
recipientId

The numeric id of the recipient

transaction

The payment transaction

core~isMultiOutSameTransaction(transaction) ⇒

Checks if a transaction is a multi out transaction with same amounts for each recipient

Kind: inner method of core
Returns:

true, if is a multi out transaction

Param Description
transaction

Transaction to be checked

core~isMultiOutTransaction(transaction) ⇒

Checks if a transaction is a multi out transaction (with different amounts)

Kind: inner method of core
Returns:

true, if is a multi out transaction

Param Description
transaction

Transaction to be checked

core

core~Account

Account class

The account class serves as a model for a Burstcoin account. It's meant to model the response from BRS API, except publicKey has been moved into the keys object.

Kind: inner class of core

core~BurstNode

Original work Copyright (c) 2018 PoC-Consortium Modified work Copyright (c) 2019 Burst Apps Team

Kind: inner class of core

core~TransactionArbitrarySubtype

Constants for arbitrary subtypes

Kind: inner property of core

core~TransactionAssetSubtype

Constants for asset subtypes

Kind: inner property of core

core~TransactionEscrowSubtype

Constants for escrow subtypes

Kind: inner property of core

core~TransactionLeasingSubtype

Constants for leasing subtypes

Kind: inner property of core

core~TransactionMarketplaceSubtype

Constants for marketplace subtypes

Kind: inner property of core

core~TransactionPaymentSubtype

Constants for payment subtypes

Kind: inner property of core

core~TransactionRewardRecipientSubtype

Constants for reward recipient subtypes (Pool Operation)

Kind: inner property of core

core~TransactionSmartContractSubtype

Constants for smart contract (aka AT) subtypes

Kind: inner property of core

core~TransactionType

Constants for transaction types

The transaction type is part of every [[Transaction]] object and used to distinguish block data. Additionally, to the transaction type a subtype is sent, that specifies the kind of transaction more detailly.

Kind: inner property of core

core~FeeQuantNQT

The smallest possible fee

Kind: inner constant of core

core~assertAttachmentVersion(transaction, versionIdentifier)

Asserts a specific version of a transactions attachment

Kind: inner method of core
Throws:

  • An exception in case of wrong version

Param Description
transaction

The transaction to be checked

versionIdentifier

The version string, i.e. MultiOutCreation

core~getContractDatablock(position, length) ⇒

Extracts a variables value as hexadecimal string from a contract's machine data

Kind: inner method of core
Returns:

The value as hexadecimal string (already considering endianness)

Param Default Description
position

The variables position

length 16

The length of data to be extracted

core~getRecipientAmountsFromMultiOutPayment(transaction) ⇒

Tries to extract recipients and its amounts for multi out payments (different and same amount)

Kind: inner method of core
Returns:

A list of recipients and their payed amount (in NQT)


Throws:

  • An exception in case of wrong transaction types

Param Description
transaction

The transaction

core~getRecipientsAmount(recipientId, transaction) ⇒

Gets the amount from a transaction, considering ordinary and multi out transactions (with same and different payments)

Kind: inner method of core
Returns:

the amount in BURST (not NQT)

Param Description
recipientId

The numeric id of the recipient

transaction

The payment transaction

core~isMultiOutSameTransaction(transaction) ⇒

Checks if a transaction is a multi out transaction with same amounts for each recipient

Kind: inner method of core
Returns:

true, if is a multi out transaction

Param Description
transaction

Transaction to be checked

core~isMultiOutTransaction(transaction) ⇒

Checks if a transaction is a multi out transaction (with different amounts)

Kind: inner method of core
Returns:

true, if is a multi out transaction

Param Description
transaction

Transaction to be checked

core

core~Account

Account class

The account class serves as a model for a Burstcoin account. It's meant to model the response from BRS API, except publicKey has been moved into the keys object.

Kind: inner class of core

core~BurstNode

Original work Copyright (c) 2018 PoC-Consortium Modified work Copyright (c) 2019 Burst Apps Team

Kind: inner class of core

core~TransactionArbitrarySubtype

Constants for arbitrary subtypes

Kind: inner property of core

core~TransactionAssetSubtype

Constants for asset subtypes

Kind: inner property of core

core~TransactionEscrowSubtype

Constants for escrow subtypes

Kind: inner property of core

core~TransactionLeasingSubtype

Constants for leasing subtypes

Kind: inner property of core

core~TransactionMarketplaceSubtype

Constants for marketplace subtypes

Kind: inner property of core

core~TransactionPaymentSubtype

Constants for payment subtypes

Kind: inner property of core

core~TransactionRewardRecipientSubtype

Constants for reward recipient subtypes (Pool Operation)

Kind: inner property of core

core~TransactionSmartContractSubtype

Constants for smart contract (aka AT) subtypes

Kind: inner property of core

core~TransactionType

Constants for transaction types

The transaction type is part of every [[Transaction]] object and used to distinguish block data. Additionally, to the transaction type a subtype is sent, that specifies the kind of transaction more detailly.

Kind: inner property of core

core~FeeQuantNQT

The smallest possible fee

Kind: inner constant of core

core~assertAttachmentVersion(transaction, versionIdentifier)

Asserts a specific version of a transactions attachment

Kind: inner method of core
Throws:

  • An exception in case of wrong version

Param Description
transaction

The transaction to be checked

versionIdentifier

The version string, i.e. MultiOutCreation

core~getContractDatablock(position, length) ⇒

Extracts a variables value as hexadecimal string from a contract's machine data

Kind: inner method of core
Returns:

The value as hexadecimal string (already considering endianness)

Param Default Description
position

The variables position

length 16

The length of data to be extracted

core~getRecipientAmountsFromMultiOutPayment(transaction) ⇒

Tries to extract recipients and its amounts for multi out payments (different and same amount)

Kind: inner method of core
Returns:

A list of recipients and their payed amount (in NQT)


Throws:

  • An exception in case of wrong transaction types

Param Description
transaction

The transaction

core~getRecipientsAmount(recipientId, transaction) ⇒

Gets the amount from a transaction, considering ordinary and multi out transactions (with same and different payments)

Kind: inner method of core
Returns:

the amount in BURST (not NQT)

Param Description
recipientId

The numeric id of the recipient

transaction

The payment transaction

core~isMultiOutSameTransaction(transaction) ⇒

Checks if a transaction is a multi out transaction with same amounts for each recipient

Kind: inner method of core
Returns:

true, if is a multi out transaction

Param Description
transaction

Transaction to be checked

core~isMultiOutTransaction(transaction) ⇒

Checks if a transaction is a multi out transaction (with different amounts)

Kind: inner method of core
Returns:

true, if is a multi out transaction

Param Description
transaction

Transaction to be checked

core

core~Account

Account class

The account class serves as a model for a Burstcoin account. It's meant to model the response from BRS API, except publicKey has been moved into the keys object.

Kind: inner class of core

core~BurstNode

Original work Copyright (c) 2018 PoC-Consortium Modified work Copyright (c) 2019 Burst Apps Team

Kind: inner class of core

core~TransactionArbitrarySubtype

Constants for arbitrary subtypes

Kind: inner property of core

core~TransactionAssetSubtype

Constants for asset subtypes

Kind: inner property of core

core~TransactionEscrowSubtype

Constants for escrow subtypes

Kind: inner property of core

core~TransactionLeasingSubtype

Constants for leasing subtypes

Kind: inner property of core

core~TransactionMarketplaceSubtype

Constants for marketplace subtypes

Kind: inner property of core

core~TransactionPaymentSubtype

Constants for payment subtypes

Kind: inner property of core

core~TransactionRewardRecipientSubtype

Constants for reward recipient subtypes (Pool Operation)

Kind: inner property of core

core~TransactionSmartContractSubtype

Constants for smart contract (aka AT) subtypes

Kind: inner property of core

core~TransactionType

Constants for transaction types

The transaction type is part of every [[Transaction]] object and used to distinguish block data. Additionally, to the transaction type a subtype is sent, that specifies the kind of transaction more detailly.

Kind: inner property of core

core~FeeQuantNQT

The smallest possible fee

Kind: inner constant of core

core~assertAttachmentVersion(transaction, versionIdentifier)

Asserts a specific version of a transactions attachment

Kind: inner method of core
Throws:

  • An exception in case of wrong version

Param Description
transaction

The transaction to be checked

versionIdentifier

The version string, i.e. MultiOutCreation

core~getContractDatablock(position, length) ⇒

Extracts a variables value as hexadecimal string from a contract's machine data

Kind: inner method of core
Returns:

The value as hexadecimal string (already considering endianness)

Param Default Description
position

The variables position

length 16

The length of data to be extracted

core~getRecipientAmountsFromMultiOutPayment(transaction) ⇒

Tries to extract recipients and its amounts for multi out payments (different and same amount)

Kind: inner method of core
Returns:

A list of recipients and their payed amount (in NQT)


Throws:

  • An exception in case of wrong transaction types

Param Description
transaction

The transaction

core~getRecipientsAmount(recipientId, transaction) ⇒

Gets the amount from a transaction, considering ordinary and multi out transactions (with same and different payments)

Kind: inner method of core
Returns:

the amount in BURST (not NQT)

Param Description
recipientId

The numeric id of the recipient

transaction

The payment transaction

core~isMultiOutSameTransaction(transaction) ⇒

Checks if a transaction is a multi out transaction with same amounts for each recipient

Kind: inner method of core
Returns:

true, if is a multi out transaction

Param Description
transaction

Transaction to be checked

core~isMultiOutTransaction(transaction) ⇒

Checks if a transaction is a multi out transaction (with different amounts)

Kind: inner method of core
Returns:

true, if is a multi out transaction

Param Description
transaction

Transaction to be checked

core

core~Account

Account class

The account class serves as a model for a Burstcoin account. It's meant to model the response from BRS API, except publicKey has been moved into the keys object.

Kind: inner class of core

core~BurstNode

Original work Copyright (c) 2018 PoC-Consortium Modified work Copyright (c) 2019 Burst Apps Team

Kind: inner class of core

core~TransactionArbitrarySubtype

Constants for arbitrary subtypes

Kind: inner property of core

core~TransactionAssetSubtype

Constants for asset subtypes

Kind: inner property of core

core~TransactionEscrowSubtype

Constants for escrow subtypes

Kind: inner property of core

core~TransactionLeasingSubtype

Constants for leasing subtypes

Kind: inner property of core

core~TransactionMarketplaceSubtype

Constants for marketplace subtypes

Kind: inner property of core

core~TransactionPaymentSubtype

Constants for payment subtypes

Kind: inner property of core

core~TransactionRewardRecipientSubtype

Constants for reward recipient subtypes (Pool Operation)

Kind: inner property of core

core~TransactionSmartContractSubtype

Constants for smart contract (aka AT) subtypes

Kind: inner property of core

core~TransactionType

Constants for transaction types

The transaction type is part of every [[Transaction]] object and used to distinguish block data. Additionally, to the transaction type a subtype is sent, that specifies the kind of transaction more detailly.

Kind: inner property of core

core~FeeQuantNQT

The smallest possible fee

Kind: inner constant of core

core~assertAttachmentVersion(transaction, versionIdentifier)

Asserts a specific version of a transactions attachment

Kind: inner method of core
Throws:

  • An exception in case of wrong version

Param Description
transaction

The transaction to be checked

versionIdentifier

The version string, i.e. MultiOutCreation

core~getContractDatablock(position, length) ⇒

Extracts a variables value as hexadecimal string from a contract's machine data

Kind: inner method of core
Returns:

The value as hexadecimal string (already considering endianness)

Param Default Description
position

The variables position

length 16

The length of data to be extracted

core~getRecipientAmountsFromMultiOutPayment(transaction) ⇒

Tries to extract recipients and its amounts for multi out payments (different and same amount)

Kind: inner method of core
Returns:

A list of recipients and their payed amount (in NQT)


Throws:

  • An exception in case of wrong transaction types

Param Description
transaction

The transaction

core~getRecipientsAmount(recipientId, transaction) ⇒

Gets the amount from a transaction, considering ordinary and multi out transactions (with same and different payments)

Kind: inner method of core
Returns:

the amount in BURST (not NQT)

Param Description
recipientId

The numeric id of the recipient

transaction

The payment transaction

core~isMultiOutSameTransaction(transaction) ⇒

Checks if a transaction is a multi out transaction with same amounts for each recipient

Kind: inner method of core
Returns:

true, if is a multi out transaction

Param Description
transaction

Transaction to be checked

core~isMultiOutTransaction(transaction) ⇒

Checks if a transaction is a multi out transaction (with different amounts)

Kind: inner method of core
Returns:

true, if is a multi out transaction

Param Description
transaction

Transaction to be checked

core

core~Account

Account class

The account class serves as a model for a Burstcoin account. It's meant to model the response from BRS API, except publicKey has been moved into the keys object.

Kind: inner class of core

core~BurstNode

Original work Copyright (c) 2018 PoC-Consortium Modified work Copyright (c) 2019 Burst Apps Team

Kind: inner class of core

core~TransactionArbitrarySubtype

Constants for arbitrary subtypes

Kind: inner property of core

core~TransactionAssetSubtype

Constants for asset subtypes

Kind: inner property of core

core~TransactionEscrowSubtype

Constants for escrow subtypes

Kind: inner property of core

core~TransactionLeasingSubtype

Constants for leasing subtypes

Kind: inner property of core

core~TransactionMarketplaceSubtype

Constants for marketplace subtypes

Kind: inner property of core

core~TransactionPaymentSubtype

Constants for payment subtypes

Kind: inner property of core

core~TransactionRewardRecipientSubtype

Constants for reward recipient subtypes (Pool Operation)

Kind: inner property of core

core~TransactionSmartContractSubtype

Constants for smart contract (aka AT) subtypes

Kind: inner property of core

core~TransactionType

Constants for transaction types

The transaction type is part of every [[Transaction]] object and used to distinguish block data. Additionally, to the transaction type a subtype is sent, that specifies the kind of transaction more detailly.

Kind: inner property of core

core~FeeQuantNQT

The smallest possible fee

Kind: inner constant of core

core~assertAttachmentVersion(transaction, versionIdentifier)

Asserts a specific version of a transactions attachment

Kind: inner method of core
Throws:

  • An exception in case of wrong version

Param Description
transaction

The transaction to be checked

versionIdentifier

The version string, i.e. MultiOutCreation

core~getContractDatablock(position, length) ⇒

Extracts a variables value as hexadecimal string from a contract's machine data

Kind: inner method of core
Returns:

The value as hexadecimal string (already considering endianness)

Param Default Description
position

The variables position

length 16

The length of data to be extracted

core~getRecipientAmountsFromMultiOutPayment(transaction) ⇒

Tries to extract recipients and its amounts for multi out payments (different and same amount)

Kind: inner method of core
Returns:

A list of recipients and their payed amount (in NQT)


Throws:

  • An exception in case of wrong transaction types

Param Description
transaction

The transaction

core~getRecipientsAmount(recipientId, transaction) ⇒

Gets the amount from a transaction, considering ordinary and multi out transactions (with same and different payments)

Kind: inner method of core
Returns:

the amount in BURST (not NQT)

Param Description
recipientId

The numeric id of the recipient

transaction

The payment transaction

core~isMultiOutSameTransaction(transaction) ⇒

Checks if a transaction is a multi out transaction with same amounts for each recipient

Kind: inner method of core
Returns:

true, if is a multi out transaction

Param Description
transaction

Transaction to be checked

core~isMultiOutTransaction(transaction) ⇒

Checks if a transaction is a multi out transaction (with different amounts)

Kind: inner method of core
Returns:

true, if is a multi out transaction

Param Description
transaction

Transaction to be checked

core

core~Account

Account class

The account class serves as a model for a Burstcoin account. It's meant to model the response from BRS API, except publicKey has been moved into the keys object.

Kind: inner class of core

core~BurstNode

Original work Copyright (c) 2018 PoC-Consortium Modified work Copyright (c) 2019 Burst Apps Team

Kind: inner class of core

core~TransactionArbitrarySubtype

Constants for arbitrary subtypes

Kind: inner property of core

core~TransactionAssetSubtype

Constants for asset subtypes

Kind: inner property of core

core~TransactionEscrowSubtype

Constants for escrow subtypes

Kind: inner property of core

core~TransactionLeasingSubtype

Constants for leasing subtypes

Kind: inner property of core

core~TransactionMarketplaceSubtype

Constants for marketplace subtypes

Kind: inner property of core

core~TransactionPaymentSubtype

Constants for payment subtypes

Kind: inner property of core

core~TransactionRewardRecipientSubtype

Constants for reward recipient subtypes (Pool Operation)

Kind: inner property of core

core~TransactionSmartContractSubtype

Constants for smart contract (aka AT) subtypes

Kind: inner property of core

core~TransactionType

Constants for transaction types

The transaction type is part of every [[Transaction]] object and used to distinguish block data. Additionally, to the transaction type a subtype is sent, that specifies the kind of transaction more detailly.

Kind: inner property of core

core~FeeQuantNQT

The smallest possible fee

Kind: inner constant of core

core~assertAttachmentVersion(transaction, versionIdentifier)

Asserts a specific version of a transactions attachment

Kind: inner method of core
Throws:

  • An exception in case of wrong version

Param Description
transaction

The transaction to be checked

versionIdentifier

The version string, i.e. MultiOutCreation

core~getContractDatablock(position, length) ⇒

Extracts a variables value as hexadecimal string from a contract's machine data

Kind: inner method of core
Returns:

The value as hexadecimal string (already considering endianness)

Param Default Description
position

The variables position

length 16

The length of data to be extracted

core~getRecipientAmountsFromMultiOutPayment(transaction) ⇒

Tries to extract recipients and its amounts for multi out payments (different and same amount)

Kind: inner method of core
Returns:

A list of recipients and their payed amount (in NQT)


Throws:

  • An exception in case of wrong transaction types

Param Description
transaction

The transaction

core~getRecipientsAmount(recipientId, transaction) ⇒

Gets the amount from a transaction, considering ordinary and multi out transactions (with same and different payments)

Kind: inner method of core
Returns:

the amount in BURST (not NQT)

Param Description
recipientId

The numeric id of the recipient

transaction

The payment transaction

core~isMultiOutSameTransaction(transaction) ⇒

Checks if a transaction is a multi out transaction with same amounts for each recipient

Kind: inner method of core
Returns:

true, if is a multi out transaction

Param Description
transaction

Transaction to be checked

core~isMultiOutTransaction(transaction) ⇒

Checks if a transaction is a multi out transaction (with different amounts)

Kind: inner method of core
Returns:

true, if is a multi out transaction

Param Description
transaction

Transaction to be checked

core

core~Account

Account class

The account class serves as a model for a Burstcoin account. It's meant to model the response from BRS API, except publicKey has been moved into the keys object.

Kind: inner class of core

core~BurstNode

Original work Copyright (c) 2018 PoC-Consortium Modified work Copyright (c) 2019 Burst Apps Team

Kind: inner class of core

core~TransactionArbitrarySubtype

Constants for arbitrary subtypes

Kind: inner property of core

core~TransactionAssetSubtype

Constants for asset subtypes

Kind: inner property of core

core~TransactionEscrowSubtype

Constants for escrow subtypes

Kind: inner property of core

core~TransactionLeasingSubtype

Constants for leasing subtypes

Kind: inner property of core

core~TransactionMarketplaceSubtype

Constants for marketplace subtypes

Kind: inner property of core

core~TransactionPaymentSubtype

Constants for payment subtypes

Kind: inner property of core

core~TransactionRewardRecipientSubtype

Constants for reward recipient subtypes (Pool Operation)

Kind: inner property of core

core~TransactionSmartContractSubtype

Constants for smart contract (aka AT) subtypes

Kind: inner property of core

core~TransactionType

Constants for transaction types

The transaction type is part of every [[Transaction]] object and used to distinguish block data. Additionally, to the transaction type a subtype is sent, that specifies the kind of transaction more detailly.

Kind: inner property of core

core~FeeQuantNQT

The smallest possible fee

Kind: inner constant of core

core~assertAttachmentVersion(transaction, versionIdentifier)

Asserts a specific version of a transactions attachment

Kind: inner method of core
Throws:

  • An exception in case of wrong version

Param Description
transaction

The transaction to be checked

versionIdentifier

The version string, i.e. MultiOutCreation

core~getContractDatablock(position, length) ⇒

Extracts a variables value as hexadecimal string from a contract's machine data

Kind: inner method of core
Returns:

The value as hexadecimal string (already considering endianness)

Param Default Description
position

The variables position

length 16

The length of data to be extracted

core~getRecipientAmountsFromMultiOutPayment(transaction) ⇒

Tries to extract recipients and its amounts for multi out payments (different and same amount)

Kind: inner method of core
Returns:

A list of recipients and their payed amount (in NQT)


Throws:

  • An exception in case of wrong transaction types

Param Description
transaction

The transaction

core~getRecipientsAmount(recipientId, transaction) ⇒

Gets the amount from a transaction, considering ordinary and multi out transactions (with same and different payments)

Kind: inner method of core
Returns:

the amount in BURST (not NQT)

Param Description
recipientId

The numeric id of the recipient

transaction

The payment transaction

core~isMultiOutSameTransaction(transaction) ⇒

Checks if a transaction is a multi out transaction with same amounts for each recipient

Kind: inner method of core
Returns:

true, if is a multi out transaction

Param Description
transaction

Transaction to be checked

core~isMultiOutTransaction(transaction) ⇒

Checks if a transaction is a multi out transaction (with different amounts)

Kind: inner method of core
Returns:

true, if is a multi out transaction

Param Description
transaction

Transaction to be checked

core

core~Account

Account class

The account class serves as a model for a Burstcoin account. It's meant to model the response from BRS API, except publicKey has been moved into the keys object.

Kind: inner class of core

core~BurstNode

Original work Copyright (c) 2018 PoC-Consortium Modified work Copyright (c) 2019 Burst Apps Team

Kind: inner class of core

core~TransactionArbitrarySubtype

Constants for arbitrary subtypes

Kind: inner property of core

core~TransactionAssetSubtype

Constants for asset subtypes

Kind: inner property of core

core~TransactionEscrowSubtype

Constants for escrow subtypes

Kind: inner property of core

core~TransactionLeasingSubtype

Constants for leasing subtypes

Kind: inner property of core

core~TransactionMarketplaceSubtype

Constants for marketplace subtypes

Kind: inner property of core

core~TransactionPaymentSubtype

Constants for payment subtypes

Kind: inner property of core

core~TransactionRewardRecipientSubtype

Constants for reward recipient subtypes (Pool Operation)

Kind: inner property of core

core~TransactionSmartContractSubtype

Constants for smart contract (aka AT) subtypes

Kind: inner property of core

core~TransactionType

Constants for transaction types

The transaction type is part of every [[Transaction]] object and used to distinguish block data. Additionally, to the transaction type a subtype is sent, that specifies the kind of transaction more detailly.

Kind: inner property of core

core~FeeQuantNQT

The smallest possible fee

Kind: inner constant of core

core~assertAttachmentVersion(transaction, versionIdentifier)

Asserts a specific version of a transactions attachment

Kind: inner method of core
Throws:

  • An exception in case of wrong version

Param Description
transaction

The transaction to be checked

versionIdentifier

The version string, i.e. MultiOutCreation

core~getContractDatablock(position, length) ⇒

Extracts a variables value as hexadecimal string from a contract's machine data

Kind: inner method of core
Returns:

The value as hexadecimal string (already considering endianness)

Param Default Description
position

The variables position

length 16

The length of data to be extracted

core~getRecipientAmountsFromMultiOutPayment(transaction) ⇒

Tries to extract recipients and its amounts for multi out payments (different and same amount)

Kind: inner method of core
Returns:

A list of recipients and their payed amount (in NQT)


Throws:

  • An exception in case of wrong transaction types

Param Description
transaction

The transaction

core~getRecipientsAmount(recipientId, transaction) ⇒

Gets the amount from a transaction, considering ordinary and multi out transactions (with same and different payments)

Kind: inner method of core
Returns:

the amount in BURST (not NQT)

Param Description
recipientId

The numeric id of the recipient

transaction

The payment transaction

core~isMultiOutSameTransaction(transaction) ⇒

Checks if a transaction is a multi out transaction with same amounts for each recipient

Kind: inner method of core
Returns:

true, if is a multi out transaction

Param Description
transaction

Transaction to be checked

core~isMultiOutTransaction(transaction) ⇒

Checks if a transaction is a multi out transaction (with different amounts)

Kind: inner method of core
Returns:

true, if is a multi out transaction

Param Description
transaction

Transaction to be checked

core

core~Account

Account class

The account class serves as a model for a Burstcoin account. It's meant to model the response from BRS API, except publicKey has been moved into the keys object.

Kind: inner class of core

core~BurstNode

Original work Copyright (c) 2018 PoC-Consortium Modified work Copyright (c) 2019 Burst Apps Team

Kind: inner class of core

core~TransactionArbitrarySubtype

Constants for arbitrary subtypes

Kind: inner property of core

core~TransactionAssetSubtype

Constants for asset subtypes

Kind: inner property of core

core~TransactionEscrowSubtype

Constants for escrow subtypes

Kind: inner property of core

core~TransactionLeasingSubtype

Constants for leasing subtypes

Kind: inner property of core

core~TransactionMarketplaceSubtype

Constants for marketplace subtypes

Kind: inner property of core

core~TransactionPaymentSubtype

Constants for payment subtypes

Kind: inner property of core

core~TransactionRewardRecipientSubtype

Constants for reward recipient subtypes (Pool Operation)

Kind: inner property of core

core~TransactionSmartContractSubtype

Constants for smart contract (aka AT) subtypes

Kind: inner property of core

core~TransactionType

Constants for transaction types

The transaction type is part of every [[Transaction]] object and used to distinguish block data. Additionally, to the transaction type a subtype is sent, that specifies the kind of transaction more detailly.

Kind: inner property of core

core~FeeQuantNQT

The smallest possible fee

Kind: inner constant of core

core~assertAttachmentVersion(transaction, versionIdentifier)

Asserts a specific version of a transactions attachment

Kind: inner method of core
Throws:

  • An exception in case of wrong version

Param Description
transaction

The transaction to be checked

versionIdentifier

The version string, i.e. MultiOutCreation

core~getContractDatablock(position, length) ⇒

Extracts a variables value as hexadecimal string from a contract's machine data

Kind: inner method of core
Returns:

The value as hexadecimal string (already considering endianness)

Param Default Description
position

The variables position

length 16

The length of data to be extracted

core~getRecipientAmountsFromMultiOutPayment(transaction) ⇒

Tries to extract recipients and its amounts for multi out payments (different and same amount)

Kind: inner method of core
Returns:

A list of recipients and their payed amount (in NQT)


Throws:

  • An exception in case of wrong transaction types

Param Description
transaction

The transaction

core~getRecipientsAmount(recipientId, transaction) ⇒

Gets the amount from a transaction, considering ordinary and multi out transactions (with same and different payments)

Kind: inner method of core
Returns:

the amount in BURST (not NQT)

Param Description
recipientId

The numeric id of the recipient

transaction

The payment transaction

core~isMultiOutSameTransaction(transaction) ⇒

Checks if a transaction is a multi out transaction with same amounts for each recipient

Kind: inner method of core
Returns:

true, if is a multi out transaction

Param Description
transaction

Transaction to be checked

core~isMultiOutTransaction(transaction) ⇒

Checks if a transaction is a multi out transaction (with different amounts)

Kind: inner method of core
Returns:

true, if is a multi out transaction

Param Description
transaction

Transaction to be checked

core

core~Account

Account class

The account class serves as a model for a Burstcoin account. It's meant to model the response from BRS API, except publicKey has been moved into the keys object.

Kind: inner class of core

core~BurstNode

Original work Copyright (c) 2018 PoC-Consortium Modified work Copyright (c) 2019 Burst Apps Team

Kind: inner class of core

core~TransactionArbitrarySubtype

Constants for arbitrary subtypes

Kind: inner property of core

core~TransactionAssetSubtype

Constants for asset subtypes

Kind: inner property of core

core~TransactionEscrowSubtype

Constants for escrow subtypes

Kind: inner property of core

core~TransactionLeasingSubtype

Constants for leasing subtypes

Kind: inner property of core

core~TransactionMarketplaceSubtype

Constants for marketplace subtypes

Kind: inner property of core

core~TransactionPaymentSubtype

Constants for payment subtypes

Kind: inner property of core

core~TransactionRewardRecipientSubtype

Constants for reward recipient subtypes (Pool Operation)

Kind: inner property of core

core~TransactionSmartContractSubtype

Constants for smart contract (aka AT) subtypes

Kind: inner property of core

core~TransactionType

Constants for transaction types

The transaction type is part of every [[Transaction]] object and used to distinguish block data. Additionally, to the transaction type a subtype is sent, that specifies the kind of transaction more detailly.

Kind: inner property of core

core~FeeQuantNQT

The smallest possible fee

Kind: inner constant of core

core~assertAttachmentVersion(transaction, versionIdentifier)

Asserts a specific version of a transactions attachment

Kind: inner method of core
Throws:

  • An exception in case of wrong version

Param Description
transaction

The transaction to be checked

versionIdentifier

The version string, i.e. MultiOutCreation

core~getContractDatablock(position, length) ⇒

Extracts a variables value as hexadecimal string from a contract's machine data

Kind: inner method of core
Returns:

The value as hexadecimal string (already considering endianness)

Param Default Description
position

The variables position

length 16

The length of data to be extracted

core~getRecipientAmountsFromMultiOutPayment(transaction) ⇒

Tries to extract recipients and its amounts for multi out payments (different and same amount)

Kind: inner method of core
Returns:

A list of recipients and their payed amount (in NQT)


Throws:

  • An exception in case of wrong transaction types

Param Description
transaction

The transaction

core~getRecipientsAmount(recipientId, transaction) ⇒

Gets the amount from a transaction, considering ordinary and multi out transactions (with same and different payments)

Kind: inner method of core
Returns:

the amount in BURST (not NQT)

Param Description
recipientId

The numeric id of the recipient

transaction

The payment transaction

core~isMultiOutSameTransaction(transaction) ⇒

Checks if a transaction is a multi out transaction with same amounts for each recipient

Kind: inner method of core
Returns:

true, if is a multi out transaction

Param Description
transaction

Transaction to be checked

core~isMultiOutTransaction(transaction) ⇒

Checks if a transaction is a multi out transaction (with different amounts)

Kind: inner method of core
Returns:

true, if is a multi out transaction

Param Description
transaction

Transaction to be checked

core

core~Account

Account class

The account class serves as a model for a Burstcoin account. It's meant to model the response from BRS API, except publicKey has been moved into the keys object.

Kind: inner class of core

core~BurstNode

Original work Copyright (c) 2018 PoC-Consortium Modified work Copyright (c) 2019 Burst Apps Team

Kind: inner class of core

core~TransactionArbitrarySubtype

Constants for arbitrary subtypes

Kind: inner property of core

core~TransactionAssetSubtype

Constants for asset subtypes

Kind: inner property of core

core~TransactionEscrowSubtype

Constants for escrow subtypes

Kind: inner property of core

core~TransactionLeasingSubtype

Constants for leasing subtypes

Kind: inner property of core

core~TransactionMarketplaceSubtype

Constants for marketplace subtypes

Kind: inner property of core

core~TransactionPaymentSubtype

Constants for payment subtypes

Kind: inner property of core

core~TransactionRewardRecipientSubtype

Constants for reward recipient subtypes (Pool Operation)

Kind: inner property of core

core~TransactionSmartContractSubtype

Constants for smart contract (aka AT) subtypes

Kind: inner property of core

core~TransactionType

Constants for transaction types

The transaction type is part of every [[Transaction]] object and used to distinguish block data. Additionally, to the transaction type a subtype is sent, that specifies the kind of transaction more detailly.

Kind: inner property of core

core~FeeQuantNQT

The smallest possible fee

Kind: inner constant of core

core~assertAttachmentVersion(transaction, versionIdentifier)

Asserts a specific version of a transactions attachment

Kind: inner method of core
Throws:

  • An exception in case of wrong version

Param Description
transaction

The transaction to be checked

versionIdentifier

The version string, i.e. MultiOutCreation

core~getContractDatablock(position, length) ⇒

Extracts a variables value as hexadecimal string from a contract's machine data

Kind: inner method of core
Returns:

The value as hexadecimal string (already considering endianness)

Param Default Description
position

The variables position

length 16

The length of data to be extracted

core~getRecipientAmountsFromMultiOutPayment(transaction) ⇒

Tries to extract recipients and its amounts for multi out payments (different and same amount)

Kind: inner method of core
Returns:

A list of recipients and their payed amount (in NQT)


Throws:

  • An exception in case of wrong transaction types

Param Description
transaction

The transaction

core~getRecipientsAmount(recipientId, transaction) ⇒

Gets the amount from a transaction, considering ordinary and multi out transactions (with same and different payments)

Kind: inner method of core
Returns:

the amount in BURST (not NQT)

Param Description
recipientId

The numeric id of the recipient

transaction

The payment transaction

core~isMultiOutSameTransaction(transaction) ⇒

Checks if a transaction is a multi out transaction with same amounts for each recipient

Kind: inner method of core
Returns:

true, if is a multi out transaction

Param Description
transaction

Transaction to be checked

core~isMultiOutTransaction(transaction) ⇒

Checks if a transaction is a multi out transaction (with different amounts)

Kind: inner method of core
Returns:

true, if is a multi out transaction

Param Description
transaction

Transaction to be checked

core

core~Account

Account class

The account class serves as a model for a Burstcoin account. It's meant to model the response from BRS API, except publicKey has been moved into the keys object.

Kind: inner class of core

core~BurstNode

Original work Copyright (c) 2018 PoC-Consortium Modified work Copyright (c) 2019 Burst Apps Team

Kind: inner class of core

core~TransactionArbitrarySubtype

Constants for arbitrary subtypes

Kind: inner property of core

core~TransactionAssetSubtype

Constants for asset subtypes

Kind: inner property of core

core~TransactionEscrowSubtype

Constants for escrow subtypes

Kind: inner property of core

core~TransactionLeasingSubtype

Constants for leasing subtypes

Kind: inner property of core

core~TransactionMarketplaceSubtype

Constants for marketplace subtypes

Kind: inner property of core

core~TransactionPaymentSubtype

Constants for payment subtypes

Kind: inner property of core

core~TransactionRewardRecipientSubtype

Constants for reward recipient subtypes (Pool Operation)

Kind: inner property of core

core~TransactionSmartContractSubtype

Constants for smart contract (aka AT) subtypes

Kind: inner property of core

core~TransactionType

Constants for transaction types

The transaction type is part of every [[Transaction]] object and used to distinguish block data. Additionally, to the transaction type a subtype is sent, that specifies the kind of transaction more detailly.

Kind: inner property of core

core~FeeQuantNQT

The smallest possible fee

Kind: inner constant of core

core~assertAttachmentVersion(transaction, versionIdentifier)

Asserts a specific version of a transactions attachment

Kind: inner method of core
Throws:

  • An exception in case of wrong version

Param Description
transaction

The transaction to be checked

versionIdentifier

The version string, i.e. MultiOutCreation

core~getContractDatablock(position, length) ⇒

Extracts a variables value as hexadecimal string from a contract's machine data

Kind: inner method of core
Returns:

The value as hexadecimal string (already considering endianness)

Param Default Description
position

The variables position

length 16

The length of data to be extracted

core~getRecipientAmountsFromMultiOutPayment(transaction) ⇒

Tries to extract recipients and its amounts for multi out payments (different and same amount)

Kind: inner method of core
Returns:

A list of recipients and their payed amount (in NQT)


Throws:

  • An exception in case of wrong transaction types

Param Description
transaction

The transaction

core~getRecipientsAmount(recipientId, transaction) ⇒

Gets the amount from a transaction, considering ordinary and multi out transactions (with same and different payments)

Kind: inner method of core
Returns:

the amount in BURST (not NQT)

Param Description
recipientId

The numeric id of the recipient

transaction

The payment transaction

core~isMultiOutSameTransaction(transaction) ⇒

Checks if a transaction is a multi out transaction with same amounts for each recipient

Kind: inner method of core
Returns:

true, if is a multi out transaction

Param Description
transaction

Transaction to be checked

core~isMultiOutTransaction(transaction) ⇒

Checks if a transaction is a multi out transaction (with different amounts)

Kind: inner method of core
Returns:

true, if is a multi out transaction

Param Description
transaction

Transaction to be checked

core

core~Account

Account class

The account class serves as a model for a Burstcoin account. It's meant to model the response from BRS API, except publicKey has been moved into the keys object.

Kind: inner class of core

core~BurstNode

Original work Copyright (c) 2018 PoC-Consortium Modified work Copyright (c) 2019 Burst Apps Team

Kind: inner class of core

core~TransactionArbitrarySubtype

Constants for arbitrary subtypes

Kind: inner property of core

core~TransactionAssetSubtype

Constants for asset subtypes

Kind: inner property of core

core~TransactionEscrowSubtype

Constants for escrow subtypes

Kind: inner property of core

core~TransactionLeasingSubtype

Constants for leasing subtypes

Kind: inner property of core

core~TransactionMarketplaceSubtype

Constants for marketplace subtypes

Kind: inner property of core

core~TransactionPaymentSubtype

Constants for payment subtypes

Kind: inner property of core

core~TransactionRewardRecipientSubtype

Constants for reward recipient subtypes (Pool Operation)

Kind: inner property of core

core~TransactionSmartContractSubtype

Constants for smart contract (aka AT) subtypes

Kind: inner property of core

core~TransactionType

Constants for transaction types

The transaction type is part of every [[Transaction]] object and used to distinguish block data. Additionally, to the transaction type a subtype is sent, that specifies the kind of transaction more detailly.

Kind: inner property of core

core~FeeQuantNQT

The smallest possible fee

Kind: inner constant of core

core~assertAttachmentVersion(transaction, versionIdentifier)

Asserts a specific version of a transactions attachment

Kind: inner method of core
Throws:

  • An exception in case of wrong version

Param Description
transaction

The transaction to be checked

versionIdentifier

The version string, i.e. MultiOutCreation

core~getContractDatablock(position, length) ⇒

Extracts a variables value as hexadecimal string from a contract's machine data

Kind: inner method of core
Returns:

The value as hexadecimal string (already considering endianness)

Param Default Description
position

The variables position

length 16

The length of data to be extracted

core~getRecipientAmountsFromMultiOutPayment(transaction) ⇒

Tries to extract recipients and its amounts for multi out payments (different and same amount)

Kind: inner method of core
Returns:

A list of recipients and their payed amount (in NQT)


Throws:

  • An exception in case of wrong transaction types

Param Description
transaction

The transaction

core~getRecipientsAmount(recipientId, transaction) ⇒

Gets the amount from a transaction, considering ordinary and multi out transactions (with same and different payments)

Kind: inner method of core
Returns:

the amount in BURST (not NQT)

Param Description
recipientId

The numeric id of the recipient

transaction

The payment transaction

core~isMultiOutSameTransaction(transaction) ⇒

Checks if a transaction is a multi out transaction with same amounts for each recipient

Kind: inner method of core
Returns:

true, if is a multi out transaction

Param Description
transaction

Transaction to be checked

core~isMultiOutTransaction(transaction) ⇒

Checks if a transaction is a multi out transaction (with different amounts)

Kind: inner method of core
Returns:

true, if is a multi out transaction

Param Description
transaction

Transaction to be checked

core

core~Account

Account class

The account class serves as a model for a Burstcoin account. It's meant to model the response from BRS API, except publicKey has been moved into the keys object.

Kind: inner class of core

core~BurstNode

Original work Copyright (c) 2018 PoC-Consortium Modified work Copyright (c) 2019 Burst Apps Team

Kind: inner class of core

core~TransactionArbitrarySubtype

Constants for arbitrary subtypes

Kind: inner property of core

core~TransactionAssetSubtype

Constants for asset subtypes

Kind: inner property of core

core~TransactionEscrowSubtype

Constants for escrow subtypes

Kind: inner property of core

core~TransactionLeasingSubtype

Constants for leasing subtypes

Kind: inner property of core

core~TransactionMarketplaceSubtype

Constants for marketplace subtypes

Kind: inner property of core

core~TransactionPaymentSubtype

Constants for payment subtypes

Kind: inner property of core

core~TransactionRewardRecipientSubtype

Constants for reward recipient subtypes (Pool Operation)

Kind: inner property of core

core~TransactionSmartContractSubtype

Constants for smart contract (aka AT) subtypes

Kind: inner property of core

core~TransactionType

Constants for transaction types

The transaction type is part of every [[Transaction]] object and used to distinguish block data. Additionally, to the transaction type a subtype is sent, that specifies the kind of transaction more detailly.

Kind: inner property of core

core~FeeQuantNQT

The smallest possible fee

Kind: inner constant of core

core~assertAttachmentVersion(transaction, versionIdentifier)

Asserts a specific version of a transactions attachment

Kind: inner method of core
Throws:

  • An exception in case of wrong version

Param Description
transaction

The transaction to be checked

versionIdentifier

The version string, i.e. MultiOutCreation

core~getContractDatablock(position, length) ⇒

Extracts a variables value as hexadecimal string from a contract's machine data

Kind: inner method of core
Returns:

The value as hexadecimal string (already considering endianness)

Param Default Description
position

The variables position

length 16

The length of data to be extracted

core~getRecipientAmountsFromMultiOutPayment(transaction) ⇒

Tries to extract recipients and its amounts for multi out payments (different and same amount)

Kind: inner method of core
Returns:

A list of recipients and their payed amount (in NQT)


Throws:

  • An exception in case of wrong transaction types

Param Description
transaction

The transaction

core~getRecipientsAmount(recipientId, transaction) ⇒

Gets the amount from a transaction, considering ordinary and multi out transactions (with same and different payments)

Kind: inner method of core
Returns:

the amount in BURST (not NQT)

Param Description
recipientId

The numeric id of the recipient

transaction

The payment transaction

core~isMultiOutSameTransaction(transaction) ⇒

Checks if a transaction is a multi out transaction with same amounts for each recipient

Kind: inner method of core
Returns:

true, if is a multi out transaction

Param Description
transaction

Transaction to be checked

core~isMultiOutTransaction(transaction) ⇒

Checks if a transaction is a multi out transaction (with different amounts)

Kind: inner method of core
Returns:

true, if is a multi out transaction

Param Description
transaction

Transaction to be checked

core

core~Account

Account class

The account class serves as a model for a Burstcoin account. It's meant to model the response from BRS API, except publicKey has been moved into the keys object.

Kind: inner class of core

core~BurstNode

Original work Copyright (c) 2018 PoC-Consortium Modified work Copyright (c) 2019 Burst Apps Team

Kind: inner class of core

core~TransactionArbitrarySubtype

Constants for arbitrary subtypes

Kind: inner property of core

core~TransactionAssetSubtype

Constants for asset subtypes

Kind: inner property of core

core~TransactionEscrowSubtype

Constants for escrow subtypes

Kind: inner property of core

core~TransactionLeasingSubtype

Constants for leasing subtypes

Kind: inner property of core

core~TransactionMarketplaceSubtype

Constants for marketplace subtypes

Kind: inner property of core

core~TransactionPaymentSubtype

Constants for payment subtypes

Kind: inner property of core

core~TransactionRewardRecipientSubtype

Constants for reward recipient subtypes (Pool Operation)

Kind: inner property of core

core~TransactionSmartContractSubtype

Constants for smart contract (aka AT) subtypes

Kind: inner property of core

core~TransactionType

Constants for transaction types

The transaction type is part of every [[Transaction]] object and used to distinguish block data. Additionally, to the transaction type a subtype is sent, that specifies the kind of transaction more detailly.

Kind: inner property of core

core~FeeQuantNQT

The smallest possible fee

Kind: inner constant of core

core~assertAttachmentVersion(transaction, versionIdentifier)

Asserts a specific version of a transactions attachment

Kind: inner method of core
Throws:

  • An exception in case of wrong version

Param Description
transaction

The transaction to be checked

versionIdentifier

The version string, i.e. MultiOutCreation

core~getContractDatablock(position, length) ⇒

Extracts a variables value as hexadecimal string from a contract's machine data

Kind: inner method of core
Returns:

The value as hexadecimal string (already considering endianness)

Param Default Description
position

The variables position

length 16

The length of data to be extracted

core~getRecipientAmountsFromMultiOutPayment(transaction) ⇒

Tries to extract recipients and its amounts for multi out payments (different and same amount)

Kind: inner method of core
Returns:

A list of recipients and their payed amount (in NQT)


Throws:

  • An exception in case of wrong transaction types

Param Description
transaction

The transaction

core~getRecipientsAmount(recipientId, transaction) ⇒

Gets the amount from a transaction, considering ordinary and multi out transactions (with same and different payments)

Kind: inner method of core
Returns:

the amount in BURST (not NQT)

Param Description
recipientId

The numeric id of the recipient

transaction

The payment transaction

core~isMultiOutSameTransaction(transaction) ⇒

Checks if a transaction is a multi out transaction with same amounts for each recipient

Kind: inner method of core
Returns:

true, if is a multi out transaction

Param Description
transaction

Transaction to be checked

core~isMultiOutTransaction(transaction) ⇒

Checks if a transaction is a multi out transaction (with different amounts)

Kind: inner method of core
Returns:

true, if is a multi out transaction

Param Description
transaction

Transaction to be checked

core

core~Account

Account class

The account class serves as a model for a Burstcoin account. It's meant to model the response from BRS API, except publicKey has been moved into the keys object.

Kind: inner class of core

core~BurstNode

Original work Copyright (c) 2018 PoC-Consortium Modified work Copyright (c) 2019 Burst Apps Team

Kind: inner class of core

core~TransactionArbitrarySubtype

Constants for arbitrary subtypes

Kind: inner property of core

core~TransactionAssetSubtype

Constants for asset subtypes

Kind: inner property of core

core~TransactionEscrowSubtype

Constants for escrow subtypes

Kind: inner property of core

core~TransactionLeasingSubtype

Constants for leasing subtypes

Kind: inner property of core

core~TransactionMarketplaceSubtype

Constants for marketplace subtypes

Kind: inner property of core

core~TransactionPaymentSubtype

Constants for payment subtypes

Kind: inner property of core

core~TransactionRewardRecipientSubtype

Constants for reward recipient subtypes (Pool Operation)

Kind: inner property of core

core~TransactionSmartContractSubtype

Constants for smart contract (aka AT) subtypes

Kind: inner property of core

core~TransactionType

Constants for transaction types

The transaction type is part of every [[Transaction]] object and used to distinguish block data. Additionally, to the transaction type a subtype is sent, that specifies the kind of transaction more detailly.

Kind: inner property of core

core~FeeQuantNQT

The smallest possible fee

Kind: inner constant of core

core~assertAttachmentVersion(transaction, versionIdentifier)

Asserts a specific version of a transactions attachment

Kind: inner method of core
Throws:

  • An exception in case of wrong version

Param Description
transaction

The transaction to be checked

versionIdentifier

The version string, i.e. MultiOutCreation

core~getContractDatablock(position, length) ⇒

Extracts a variables value as hexadecimal string from a contract's machine data

Kind: inner method of core
Returns:

The value as hexadecimal string (already considering endianness)

Param Default Description
position

The variables position

length 16

The length of data to be extracted

core~getRecipientAmountsFromMultiOutPayment(transaction) ⇒

Tries to extract recipients and its amounts for multi out payments (different and same amount)

Kind: inner method of core
Returns:

A list of recipients and their payed amount (in NQT)


Throws:

  • An exception in case of wrong transaction types

Param Description
transaction

The transaction

core~getRecipientsAmount(recipientId, transaction) ⇒

Gets the amount from a transaction, considering ordinary and multi out transactions (with same and different payments)

Kind: inner method of core
Returns:

the amount in BURST (not NQT)

Param Description
recipientId

The numeric id of the recipient

transaction

The payment transaction

core~isMultiOutSameTransaction(transaction) ⇒

Checks if a transaction is a multi out transaction with same amounts for each recipient

Kind: inner method of core
Returns:

true, if is a multi out transaction

Param Description
transaction

Transaction to be checked

core~isMultiOutTransaction(transaction) ⇒

Checks if a transaction is a multi out transaction (with different amounts)

Kind: inner method of core
Returns:

true, if is a multi out transaction

Param Description
transaction

Transaction to be checked

core

core~Account

Account class

The account class serves as a model for a Burstcoin account. It's meant to model the response from BRS API, except publicKey has been moved into the keys object.

Kind: inner class of core

core~BurstNode

Original work Copyright (c) 2018 PoC-Consortium Modified work Copyright (c) 2019 Burst Apps Team

Kind: inner class of core

core~TransactionArbitrarySubtype

Constants for arbitrary subtypes

Kind: inner property of core

core~TransactionAssetSubtype

Constants for asset subtypes

Kind: inner property of core

core~TransactionEscrowSubtype

Constants for escrow subtypes

Kind: inner property of core

core~TransactionLeasingSubtype

Constants for leasing subtypes

Kind: inner property of core

core~TransactionMarketplaceSubtype

Constants for marketplace subtypes

Kind: inner property of core

core~TransactionPaymentSubtype

Constants for payment subtypes

Kind: inner property of core

core~TransactionRewardRecipientSubtype

Constants for reward recipient subtypes (Pool Operation)

Kind: inner property of core

core~TransactionSmartContractSubtype

Constants for smart contract (aka AT) subtypes

Kind: inner property of core

core~TransactionType

Constants for transaction types

The transaction type is part of every [[Transaction]] object and used to distinguish block data. Additionally, to the transaction type a subtype is sent, that specifies the kind of transaction more detailly.

Kind: inner property of core

core~FeeQuantNQT

The smallest possible fee

Kind: inner constant of core

core~assertAttachmentVersion(transaction, versionIdentifier)

Asserts a specific version of a transactions attachment

Kind: inner method of core
Throws:

  • An exception in case of wrong version

Param Description
transaction

The transaction to be checked

versionIdentifier

The version string, i.e. MultiOutCreation

core~getContractDatablock(position, length) ⇒

Extracts a variables value as hexadecimal string from a contract's machine data

Kind: inner method of core
Returns:

The value as hexadecimal string (already considering endianness)

Param Default Description
position

The variables position

length 16

The length of data to be extracted

core~getRecipientAmountsFromMultiOutPayment(transaction) ⇒

Tries to extract recipients and its amounts for multi out payments (different and same amount)

Kind: inner method of core
Returns:

A list of recipients and their payed amount (in NQT)


Throws:

  • An exception in case of wrong transaction types

Param Description
transaction

The transaction

core~getRecipientsAmount(recipientId, transaction) ⇒

Gets the amount from a transaction, considering ordinary and multi out transactions (with same and different payments)

Kind: inner method of core
Returns:

the amount in BURST (not NQT)

Param Description
recipientId

The numeric id of the recipient

transaction

The payment transaction

core~isMultiOutSameTransaction(transaction) ⇒

Checks if a transaction is a multi out transaction with same amounts for each recipient

Kind: inner method of core
Returns:

true, if is a multi out transaction

Param Description
transaction

Transaction to be checked

core~isMultiOutTransaction(transaction) ⇒

Checks if a transaction is a multi out transaction (with different amounts)

Kind: inner method of core
Returns:

true, if is a multi out transaction

Param Description
transaction

Transaction to be checked

core

core~Account

Account class

The account class serves as a model for a Burstcoin account. It's meant to model the response from BRS API, except publicKey has been moved into the keys object.

Kind: inner class of core

core~BurstNode

Original work Copyright (c) 2018 PoC-Consortium Modified work Copyright (c) 2019 Burst Apps Team

Kind: inner class of core

core~TransactionArbitrarySubtype

Constants for arbitrary subtypes

Kind: inner property of core

core~TransactionAssetSubtype

Constants for asset subtypes

Kind: inner property of core

core~TransactionEscrowSubtype

Constants for escrow subtypes

Kind: inner property of core

core~TransactionLeasingSubtype

Constants for leasing subtypes

Kind: inner property of core

core~TransactionMarketplaceSubtype

Constants for marketplace subtypes

Kind: inner property of core

core~TransactionPaymentSubtype

Constants for payment subtypes

Kind: inner property of core

core~TransactionRewardRecipientSubtype

Constants for reward recipient subtypes (Pool Operation)

Kind: inner property of core

core~TransactionSmartContractSubtype

Constants for smart contract (aka AT) subtypes

Kind: inner property of core

core~TransactionType

Constants for transaction types

The transaction type is part of every [[Transaction]] object and used to distinguish block data. Additionally, to the transaction type a subtype is sent, that specifies the kind of transaction more detailly.

Kind: inner property of core

core~FeeQuantNQT

The smallest possible fee

Kind: inner constant of core

core~assertAttachmentVersion(transaction, versionIdentifier)

Asserts a specific version of a transactions attachment

Kind: inner method of core
Throws:

  • An exception in case of wrong version

Param Description
transaction

The transaction to be checked

versionIdentifier

The version string, i.e. MultiOutCreation

core~getContractDatablock(position, length) ⇒

Extracts a variables value as hexadecimal string from a contract's machine data

Kind: inner method of core
Returns:

The value as hexadecimal string (already considering endianness)

Param Default Description
position

The variables position

length 16

The length of data to be extracted

core~getRecipientAmountsFromMultiOutPayment(transaction) ⇒

Tries to extract recipients and its amounts for multi out payments (different and same amount)

Kind: inner method of core
Returns:

A list of recipients and their payed amount (in NQT)


Throws:

  • An exception in case of wrong transaction types

Param Description
transaction

The transaction

core~getRecipientsAmount(recipientId, transaction) ⇒

Gets the amount from a transaction, considering ordinary and multi out transactions (with same and different payments)

Kind: inner method of core
Returns:

the amount in BURST (not NQT)

Param Description
recipientId

The numeric id of the recipient

transaction

The payment transaction

core~isMultiOutSameTransaction(transaction) ⇒

Checks if a transaction is a multi out transaction with same amounts for each recipient

Kind: inner method of core
Returns:

true, if is a multi out transaction

Param Description
transaction

Transaction to be checked

core~isMultiOutTransaction(transaction) ⇒

Checks if a transaction is a multi out transaction (with different amounts)

Kind: inner method of core
Returns:

true, if is a multi out transaction

Param Description
transaction

Transaction to be checked

core

core~Account

Account class

The account class serves as a model for a Burstcoin account. It's meant to model the response from BRS API, except publicKey has been moved into the keys object.

Kind: inner class of core

core~BurstNode

Original work Copyright (c) 2018 PoC-Consortium Modified work Copyright (c) 2019 Burst Apps Team

Kind: inner class of core

core~TransactionArbitrarySubtype

Constants for arbitrary subtypes

Kind: inner property of core

core~TransactionAssetSubtype

Constants for asset subtypes

Kind: inner property of core

core~TransactionEscrowSubtype

Constants for escrow subtypes

Kind: inner property of core

core~TransactionLeasingSubtype

Constants for leasing subtypes

Kind: inner property of core

core~TransactionMarketplaceSubtype

Constants for marketplace subtypes

Kind: inner property of core

core~TransactionPaymentSubtype

Constants for payment subtypes

Kind: inner property of core

core~TransactionRewardRecipientSubtype

Constants for reward recipient subtypes (Pool Operation)

Kind: inner property of core

core~TransactionSmartContractSubtype

Constants for smart contract (aka AT) subtypes

Kind: inner property of core

core~TransactionType

Constants for transaction types

The transaction type is part of every [[Transaction]] object and used to distinguish block data. Additionally, to the transaction type a subtype is sent, that specifies the kind of transaction more detailly.

Kind: inner property of core

core~FeeQuantNQT

The smallest possible fee

Kind: inner constant of core

core~assertAttachmentVersion(transaction, versionIdentifier)

Asserts a specific version of a transactions attachment

Kind: inner method of core
Throws:

  • An exception in case of wrong version

Param Description
transaction

The transaction to be checked

versionIdentifier

The version string, i.e. MultiOutCreation

core~getContractDatablock(position, length) ⇒

Extracts a variables value as hexadecimal string from a contract's machine data

Kind: inner method of core
Returns:

The value as hexadecimal string (already considering endianness)

Param Default Description
position

The variables position

length 16

The length of data to be extracted

core~getRecipientAmountsFromMultiOutPayment(transaction) ⇒

Tries to extract recipients and its amounts for multi out payments (different and same amount)

Kind: inner method of core
Returns:

A list of recipients and their payed amount (in NQT)


Throws:

  • An exception in case of wrong transaction types

Param Description
transaction

The transaction

core~getRecipientsAmount(recipientId, transaction) ⇒

Gets the amount from a transaction, considering ordinary and multi out transactions (with same and different payments)

Kind: inner method of core
Returns:

the amount in BURST (not NQT)

Param Description
recipientId

The numeric id of the recipient

transaction

The payment transaction

core~isMultiOutSameTransaction(transaction) ⇒

Checks if a transaction is a multi out transaction with same amounts for each recipient

Kind: inner method of core
Returns:

true, if is a multi out transaction

Param Description
transaction

Transaction to be checked

core~isMultiOutTransaction(transaction) ⇒

Checks if a transaction is a multi out transaction (with different amounts)

Kind: inner method of core
Returns:

true, if is a multi out transaction

Param Description
transaction

Transaction to be checked

core

core~Account

Account class

The account class serves as a model for a Burstcoin account. It's meant to model the response from BRS API, except publicKey has been moved into the keys object.

Kind: inner class of core

core~BurstNode

Original work Copyright (c) 2018 PoC-Consortium Modified work Copyright (c) 2019 Burst Apps Team

Kind: inner class of core

core~TransactionArbitrarySubtype

Constants for arbitrary subtypes

Kind: inner property of core

core~TransactionAssetSubtype

Constants for asset subtypes

Kind: inner property of core

core~TransactionEscrowSubtype

Constants for escrow subtypes

Kind: inner property of core

core~TransactionLeasingSubtype

Constants for leasing subtypes

Kind: inner property of core

core~TransactionMarketplaceSubtype

Constants for marketplace subtypes

Kind: inner property of core

core~TransactionPaymentSubtype

Constants for payment subtypes

Kind: inner property of core

core~TransactionRewardRecipientSubtype

Constants for reward recipient subtypes (Pool Operation)

Kind: inner property of core

core~TransactionSmartContractSubtype

Constants for smart contract (aka AT) subtypes

Kind: inner property of core

core~TransactionType

Constants for transaction types

The transaction type is part of every [[Transaction]] object and used to distinguish block data. Additionally, to the transaction type a subtype is sent, that specifies the kind of transaction more detailly.

Kind: inner property of core

core~FeeQuantNQT

The smallest possible fee

Kind: inner constant of core

core~assertAttachmentVersion(transaction, versionIdentifier)

Asserts a specific version of a transactions attachment

Kind: inner method of core
Throws:

  • An exception in case of wrong version

Param Description
transaction

The transaction to be checked

versionIdentifier

The version string, i.e. MultiOutCreation

core~getContractDatablock(position, length) ⇒

Extracts a variables value as hexadecimal string from a contract's machine data

Kind: inner method of core
Returns:

The value as hexadecimal string (already considering endianness)

Param Default Description
position

The variables position

length 16

The length of data to be extracted

core~getRecipientAmountsFromMultiOutPayment(transaction) ⇒

Tries to extract recipients and its amounts for multi out payments (different and same amount)

Kind: inner method of core
Returns:

A list of recipients and their payed amount (in NQT)


Throws:

  • An exception in case of wrong transaction types

Param Description
transaction

The transaction

core~getRecipientsAmount(recipientId, transaction) ⇒

Gets the amount from a transaction, considering ordinary and multi out transactions (with same and different payments)

Kind: inner method of core
Returns:

the amount in BURST (not NQT)

Param Description
recipientId

The numeric id of the recipient

transaction

The payment transaction

core~isMultiOutSameTransaction(transaction) ⇒

Checks if a transaction is a multi out transaction with same amounts for each recipient

Kind: inner method of core
Returns:

true, if is a multi out transaction

Param Description
transaction

Transaction to be checked

core~isMultiOutTransaction(transaction) ⇒

Checks if a transaction is a multi out transaction (with different amounts)

Kind: inner method of core
Returns:

true, if is a multi out transaction

Param Description
transaction

Transaction to be checked

ApiSettings

Context for API used in [[composeApi]]

Kind: global class

ContractHelper

Helper class for contracts

A contract owns additional data, which is splitted in 8 byte blocks. The content is encoded in hexadecimal representation and big endianness. This helper class facilitates access to these data

Kind: global class

contractHelper.contract ⇒

Kind: instance property of ContractHelper
Returns:

Get the contract


contractHelper.getVariableAsString(index) ⇒

Get a variable as string

Kind: instance method of ContractHelper
Returns:

The data as string (Utf-8)

Param Description
index

The index of variable (starting at 0)

contractHelper.getDataBlocksAsString(index, count) ⇒

Get multiple data blocks as string

Kind: instance method of ContractHelper
Returns:

The data as string (Utf-8)

Param Description
index

The index of variable (starting at 0)

count

Number of blocks

contractHelper.getVariableAsDecimal(index) ⇒

Get a variable as decimal (string)

Kind: instance method of ContractHelper
Returns:

The data as a decimal string sequence

Param Description
index

The index of variable (starting at 0)

contractHelper.getVariable(index) ⇒

Get a variable at given position/index

Kind: instance method of ContractHelper
Returns:

The data as hexadecimal string (in little endianness)

Param Description
index

The index of variable (starting at 0)

contractHelper.getHexDataAt(index, length) ⇒

Get a hexadecimal data block of arbitrary length at given position/index

Kind: instance method of ContractHelper
Returns:

The data as hexadecimal string (in little endianness)

Param Description
index

The index of variable (starting at 0)

length

The length of the data block (must be a multiple of 2)

BurstService

Generic BRS Web Service class.

Kind: global class

new BurstService(settings)

Creates Service instance

Param Description
settings

The settings for the service

burstService.toBRSEndpoint(method, data) ⇒ string

Mounts a BRS conform API (V1) endpoint of format <host>?requestType=getBlock&height=123

Kind: instance method of BurstService
Returns: string -

The mounted url (without host)


See: https://burstwiki.org/wiki/The_Burst_API

Param Type Description
method string

The method name for requestType

data any

A JSON object which will be mapped to url params

burstService.query(method, args) ⇒ Promise.<T>

Requests a query to BRS

Kind: instance method of BurstService
Returns: Promise.<T> -

The response data of success


Throws:

  • HttpError in case of failure

Param Type Description
method string

The BRS method according https://burstwiki.org/wiki/The_Burst_API

args any

A JSON object which will be mapped to url params

burstService.send(method, args, body) ⇒ Promise.<T>

Send data to BRS

Kind: instance method of BurstService
Returns: Promise.<T> -

The response data of success


Throws:

  • HttpError in case of failure

Param Type Description
method string

The BRS method according https://burstwiki.org/wiki/The_Burst_API. Note that there are only a few POST methods

args any

A JSON object which will be mapped to url params

body any

An object with key value pairs to submit as post body

ApiSettings ⇒

Composes the API, i.e. setup the environment and mounts the API structure with its functions.

const api = composeApi({
  nodeHost: 'https://wallet1.burst-team.us:2083', // one of the mainnet nodes
  apiRootUrl: '/burst' // endpoint to the BURST API
})

Note, that this method mounts the entire API, i.e. all available methods. One may also customize the API composition using [[ApiComposer]].

Kind: global variable
Returns:

The complete API

Param Description
settings

necessary execution context

Keywords

none

install

npm i @burstjs/core

Downloadsweekly downloads

6

version

0.3.0

license

GPL-3.0

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
  • avatar
Report a vulnerability