@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 {BurstValue} from '@burstjs/util'
const apiSettings = new ApiSettings('https://testnet.burstcoin.network:6876');
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: ${BurstValue.fromPlanck(balanceNQT).toString()}`)
}
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: "https://testnet.burstcoin.network:6876"});
api.network.getBlockchainStatus().then(console.log).catch(console.error);
})()
See more here:
@burstjs/core Online Documentation
API Reference
Modules
apiThe 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',
})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
Settings for API used in [[composeApi]]
api ⇒Composes the API, i.e. setup the environment and mounts the API structure with its functions.
const api = composeApi(new ApiSettings('https://wallet1.burst-team.us:2083')), // one of the mainnet nodes
core ⇒Note, that this method mounts the entire API, i.e. all available methods. One may also customize the API composition using [[ApiComposer]].
Get the transaction attachment version identifier
Attachment types are identified by a field version.
core ⇒Checks if a transaction attachment is of specific version
core coreThe default deadline (in minutes) for Transactions
coreThe default endpoint for [[ApiSettings]]
coreConstants for arbitrary subtypes
coreConstants for asset subtypes
coreConstants for escrow subtypes
coreConstants for leasing subtypes
coreConstants for marketplace subtypes
coreConstants for payment subtypes
coreConstants for reward recipient subtypes (Pool Operation)
coreConstants for smart contract (aka AT) subtypes
coreConstants 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.
Constructs an Attachment
core ⇒Creates BRS Http send parameters for a transaction from attachment data
coreGeneric BRS Web Service class.
core ⇒Tries to extract recipients and its amounts for multi out payments (different and same amount)
core ⇒Gets the amount from a transaction, considering ordinary and multi out transactions (with same and different payments)
core ⇒Checks if a transaction is a multi out transaction with same amounts for each recipient
core ⇒Checks if a transaction is a multi out transaction (with different amounts)
coreAccount 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.
coreAttachment class
The attachment class is used to appended to transaction where appropriate. It is a super class for Message and EncryptedMessage.
coreMessage class
The Message class is used to model a plain message attached to a transaction.
coreEncryptedMessage class
The EncryptedMessage class is a model for a encrypted message attached to a transaction.
Classes
ApiImplCopyright (c) 2019 Burst Apps Team
api
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',
})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
api~ApiSettings
Kind: inner class of api
new ApiSettings(nodeHost, apiVersion, httpClientOptions)
| Param | Type | Description |
|---|---|---|
| nodeHost | string |
The url of the Burst peer |
| apiVersion | ApiVersion |
For future usage. |
| httpClientOptions | any | AxiosRequestSettings |
Optional http options, like additional header. The default implementation uses axios. In case of a custom client pass your own options. see Axios Configuration |
api
Settings for API used in [[composeApi]]
api~ApiSettings
Kind: inner class of api
new ApiSettings(nodeHost, apiVersion, httpClientOptions)
| Param | Type | Description |
|---|---|---|
| nodeHost | string |
The url of the Burst peer |
| apiVersion | ApiVersion |
For future usage. |
| httpClientOptions | any | AxiosRequestSettings |
Optional http options, like additional header. The default implementation uses axios. In case of a custom client pass your own options. see Axios Configuration |
api ⇒
Composes the API, i.e. setup the environment and mounts the API structure with its functions.
const api = composeApi(new ApiSettings('https://wallet1.burst-team.us:2083')), // one of the mainnet nodes
Note, that this method mounts the entire API, i.e. all available methods. One may also customize the API composition using [[ApiComposer]].
Returns:
The complete API
| Param | Description |
|---|---|
| settings | necessary execution context |
api~ApiSettings
Kind: inner class of api
new ApiSettings(nodeHost, apiVersion, httpClientOptions)
| Param | Type | Description |
|---|---|---|
| nodeHost | string |
The url of the Burst peer |
| apiVersion | ApiVersion |
For future usage. |
| httpClientOptions | any | AxiosRequestSettings |
Optional http options, like additional header. The default implementation uses axios. In case of a custom client pass your own options. see Axios Configuration |
core ⇒
Get the transaction attachment version identifier
Attachment types are identified by a field version.
Returns:
return Identifier, if exists, otherwise undefined
| Param | Description |
|---|---|
| transaction | The transaction to be checked |
- core ⇒
- ~BurstService
- new BurstService(settings)
- .toBRSEndpoint(method, data) ⇒
string - .query(method, args, options) ⇒
Promise.<T> - .send(method, args, body, options) ⇒
Promise.<T>
- ~BurstService
core~BurstService
Kind: inner class of core
- ~BurstService
- new BurstService(settings)
- .toBRSEndpoint(method, data) ⇒
string - .query(method, args, options) ⇒
Promise.<T> - .send(method, args, body, options) ⇒
Promise.<T>
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 |
| data | any |
A JSON object which will be mapped to url params |
burstService.query(method, args, options) ⇒ 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 |
| options | any | AxiosRequestConfig |
The optional request configuration for the passed Http client |
burstService.send(method, args, body, options) ⇒ 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 |
| options | any | AxiosRequestConfig |
The optional request configuration for the passed Http client |
core ⇒
Checks if a transaction attachment is of specific version
Returns:
true, if version string matches
| Param | Description |
|---|---|
| transaction | The transaction to be checked |
| versionIdentifier | The version string, i.e. MultiOutCreation |
- core ⇒
- ~BurstService
- new BurstService(settings)
- .toBRSEndpoint(method, data) ⇒
string - .query(method, args, options) ⇒
Promise.<T> - .send(method, args, body, options) ⇒
Promise.<T>
- ~BurstService
core~BurstService
Kind: inner class of core
- ~BurstService
- new BurstService(settings)
- .toBRSEndpoint(method, data) ⇒
string - .query(method, args, options) ⇒
Promise.<T> - .send(method, args, body, options) ⇒
Promise.<T>
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 |
| data | any |
A JSON object which will be mapped to url params |
burstService.query(method, args, options) ⇒ 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 |
| options | any | AxiosRequestConfig |
The optional request configuration for the passed Http client |
burstService.send(method, args, body, options) ⇒ 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 |
| options | any | AxiosRequestConfig |
The optional request configuration for the passed Http client |
core
- core
- ~BurstService
- new BurstService(settings)
- .toBRSEndpoint(method, data) ⇒
string - .query(method, args, options) ⇒
Promise.<T> - .send(method, args, body, options) ⇒
Promise.<T>
- ~BurstService
core~BurstService
Kind: inner class of core
- ~BurstService
- new BurstService(settings)
- .toBRSEndpoint(method, data) ⇒
string - .query(method, args, options) ⇒
Promise.<T> - .send(method, args, body, options) ⇒
Promise.<T>
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 |
| data | any |
A JSON object which will be mapped to url params |
burstService.query(method, args, options) ⇒ 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 |
| options | any | AxiosRequestConfig |
The optional request configuration for the passed Http client |
burstService.send(method, args, body, options) ⇒ 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 |
| options | any | AxiosRequestConfig |
The optional request configuration for the passed Http client |
core
The default deadline (in minutes) for Transactions
- core
- ~BurstService
- new BurstService(settings)
- .toBRSEndpoint(method, data) ⇒
string - .query(method, args, options) ⇒
Promise.<T> - .send(method, args, body, options) ⇒
Promise.<T>
- ~BurstService
core~BurstService
Kind: inner class of core
- ~BurstService
- new BurstService(settings)
- .toBRSEndpoint(method, data) ⇒
string - .query(method, args, options) ⇒
Promise.<T> - .send(method, args, body, options) ⇒
Promise.<T>
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 |
| data | any |
A JSON object which will be mapped to url params |
burstService.query(method, args, options) ⇒ 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 |
| options | any | AxiosRequestConfig |
The optional request configuration for the passed Http client |
burstService.send(method, args, body, options) ⇒ 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 |
| options | any | AxiosRequestConfig |
The optional request configuration for the passed Http client |
core
The default endpoint for [[ApiSettings]]
- core
- ~BurstService
- new BurstService(settings)
- .toBRSEndpoint(method, data) ⇒
string - .query(method, args, options) ⇒
Promise.<T> - .send(method, args, body, options) ⇒
Promise.<T>
- ~BurstService
core~BurstService
Kind: inner class of core
- ~BurstService
- new BurstService(settings)
- .toBRSEndpoint(method, data) ⇒
string - .query(method, args, options) ⇒
Promise.<T> - .send(method, args, body, options) ⇒
Promise.<T>
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 |
| data | any |
A JSON object which will be mapped to url params |
burstService.query(method, args, options) ⇒ 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 |
| options | any | AxiosRequestConfig |
The optional request configuration for the passed Http client |
burstService.send(method, args, body, options) ⇒ 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 |
| options | any | AxiosRequestConfig |
The optional request configuration for the passed Http client |
core
Constants for arbitrary subtypes
- core
- ~BurstService
- new BurstService(settings)
- .toBRSEndpoint(method, data) ⇒
string - .query(method, args, options) ⇒
Promise.<T> - .send(method, args, body, options) ⇒
Promise.<T>
- ~BurstService
core~BurstService
Kind: inner class of core
- ~BurstService
- new BurstService(settings)
- .toBRSEndpoint(method, data) ⇒
string - .query(method, args, options) ⇒
Promise.<T> - .send(method, args, body, options) ⇒
Promise.<T>
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 |
| data | any |
A JSON object which will be mapped to url params |
burstService.query(method, args, options) ⇒ 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 |
| options | any | AxiosRequestConfig |
The optional request configuration for the passed Http client |
burstService.send(method, args, body, options) ⇒ 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 |
| options | any | AxiosRequestConfig |
The optional request configuration for the passed Http client |
core
Constants for asset subtypes
- core
- ~BurstService
- new BurstService(settings)
- .toBRSEndpoint(method, data) ⇒
string - .query(method, args, options) ⇒
Promise.<T> - .send(method, args, body, options) ⇒
Promise.<T>
- ~BurstService
core~BurstService
Kind: inner class of core
- ~BurstService
- new BurstService(settings)
- .toBRSEndpoint(method, data) ⇒
string - .query(method, args, options) ⇒
Promise.<T> - .send(method, args, body, options) ⇒
Promise.<T>
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 |
| data | any |
A JSON object which will be mapped to url params |
burstService.query(method, args, options) ⇒ 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 |
| options | any | AxiosRequestConfig |
The optional request configuration for the passed Http client |
burstService.send(method, args, body, options) ⇒ 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 |
| options | any | AxiosRequestConfig |
The optional request configuration for the passed Http client |
core
Constants for escrow subtypes
- core
- ~BurstService
- new BurstService(settings)
- .toBRSEndpoint(method, data) ⇒
string - .query(method, args, options) ⇒
Promise.<T> - .send(method, args, body, options) ⇒
Promise.<T>
- ~BurstService
core~BurstService
Kind: inner class of core
- ~BurstService
- new BurstService(settings)
- .toBRSEndpoint(method, data) ⇒
string - .query(method, args, options) ⇒
Promise.<T> - .send(method, args, body, options) ⇒
Promise.<T>
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 |
| data | any |
A JSON object which will be mapped to url params |
burstService.query(method, args, options) ⇒ 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 |
| options | any | AxiosRequestConfig |
The optional request configuration for the passed Http client |
burstService.send(method, args, body, options) ⇒ 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 |
| options | any | AxiosRequestConfig |
The optional request configuration for the passed Http client |
core
Constants for leasing subtypes
- core
- ~BurstService
- new BurstService(settings)
- .toBRSEndpoint(method, data) ⇒
string - .query(method, args, options) ⇒
Promise.<T> - .send(method, args, body, options) ⇒
Promise.<T>
- ~BurstService
core~BurstService
Kind: inner class of core
- ~BurstService
- new BurstService(settings)
- .toBRSEndpoint(method, data) ⇒
string - .query(method, args, options) ⇒
Promise.<T> - .send(method, args, body, options) ⇒
Promise.<T>
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 |
| data | any |
A JSON object which will be mapped to url params |
burstService.query(method, args, options) ⇒ 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 |
| options | any | AxiosRequestConfig |
The optional request configuration for the passed Http client |
burstService.send(method, args, body, options) ⇒ 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 |
| options | any | AxiosRequestConfig |
The optional request configuration for the passed Http client |
core
Constants for marketplace subtypes
- core
- ~BurstService
- new BurstService(settings)
- .toBRSEndpoint(method, data) ⇒
string - .query(method, args, options) ⇒
Promise.<T> - .send(method, args, body, options) ⇒
Promise.<T>
- ~BurstService
core~BurstService
Kind: inner class of core
- ~BurstService
- new BurstService(settings)
- .toBRSEndpoint(method, data) ⇒
string - .query(method, args, options) ⇒
Promise.<T> - .send(method, args, body, options) ⇒
Promise.<T>
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 |
| data | any |
A JSON object which will be mapped to url params |
burstService.query(method, args, options) ⇒ 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 |
| options | any | AxiosRequestConfig |
The optional request configuration for the passed Http client |
burstService.send(method, args, body, options) ⇒ 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 |
| options | any | AxiosRequestConfig |
The optional request configuration for the passed Http client |
core
Constants for payment subtypes
- core
- ~BurstService
- new BurstService(settings)
- .toBRSEndpoint(method, data) ⇒
string - .query(method, args, options) ⇒
Promise.<T> - .send(method, args, body, options) ⇒
Promise.<T>
- ~BurstService
core~BurstService
Kind: inner class of core
- ~BurstService
- new BurstService(settings)
- .toBRSEndpoint(method, data) ⇒
string - .query(method, args, options) ⇒
Promise.<T> - .send(method, args, body, options) ⇒
Promise.<T>
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 |
| data | any |
A JSON object which will be mapped to url params |
burstService.query(method, args, options) ⇒ 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 |
| options | any | AxiosRequestConfig |
The optional request configuration for the passed Http client |
burstService.send(method, args, body, options) ⇒ 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 |
| options | any | AxiosRequestConfig |
The optional request configuration for the passed Http client |
core
Constants for reward recipient subtypes (Pool Operation)
- core
- ~BurstService
- new BurstService(settings)
- .toBRSEndpoint(method, data) ⇒
string - .query(method, args, options) ⇒
Promise.<T> - .send(method, args, body, options) ⇒
Promise.<T>
- ~BurstService
core~BurstService
Kind: inner class of core
- ~BurstService
- new BurstService(settings)
- .toBRSEndpoint(method, data) ⇒
string - .query(method, args, options) ⇒
Promise.<T> - .send(method, args, body, options) ⇒
Promise.<T>
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 |
| data | any |
A JSON object which will be mapped to url params |
burstService.query(method, args, options) ⇒ 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 |
| options | any | AxiosRequestConfig |
The optional request configuration for the passed Http client |
burstService.send(method, args, body, options) ⇒ 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 |
| options | any | AxiosRequestConfig |
The optional request configuration for the passed Http client |
core
Constants for smart contract (aka AT) subtypes
- core
- ~BurstService
- new BurstService(settings)
- .toBRSEndpoint(method, data) ⇒
string - .query(method, args, options) ⇒
Promise.<T> - .send(method, args, body, options) ⇒
Promise.<T>
- ~BurstService
core~BurstService
Kind: inner class of core
- ~BurstService
- new BurstService(settings)
- .toBRSEndpoint(method, data) ⇒
string - .query(method, args, options) ⇒
Promise.<T> - .send(method, args, body, options) ⇒
Promise.<T>
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 |
| data | any |
A JSON object which will be mapped to url params |
burstService.query(method, args, options) ⇒ 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 |
| options | any | AxiosRequestConfig |
The optional request configuration for the passed Http client |
burstService.send(method, args, body, options) ⇒ 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 |
| options | any | AxiosRequestConfig |
The optional request configuration for the passed Http client |
core
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.
- core
- ~BurstService
- new BurstService(settings)
- .toBRSEndpoint(method, data) ⇒
string - .query(method, args, options) ⇒
Promise.<T> - .send(method, args, body, options) ⇒
Promise.<T>
- ~BurstService
core~BurstService
Kind: inner class of core
- ~BurstService
- new BurstService(settings)
- .toBRSEndpoint(method, data) ⇒
string - .query(method, args, options) ⇒
Promise.<T> - .send(method, args, body, options) ⇒
Promise.<T>
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 |
| data | any |
A JSON object which will be mapped to url params |
burstService.query(method, args, options) ⇒ 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 |
| options | any | AxiosRequestConfig |
The optional request configuration for the passed Http client |
burstService.send(method, args, body, options) ⇒ 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 |
| options | any | AxiosRequestConfig |
The optional request configuration for the passed Http client |
core ⇒
Deprecated
Constructs an Attachment
Returns:
HttpParams
Internal:
| Param | Description |
|---|---|
| transaction | The transaction with the attachment |
| params | Some HttpParams |
core ⇒- ~BurstService
- new BurstService(settings)
- .toBRSEndpoint(method, data) ⇒
string - .query(method, args, options) ⇒
Promise.<T> - .send(method, args, body, options) ⇒
Promise.<T>
- ~BurstService
core~BurstService
Kind: inner class of core
- ~BurstService
- new BurstService(settings)
- .toBRSEndpoint(method, data) ⇒
string - .query(method, args, options) ⇒
Promise.<T> - .send(method, args, body, options) ⇒
Promise.<T>
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 |
| data | any |
A JSON object which will be mapped to url params |
burstService.query(method, args, options) ⇒ 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 |
| options | any | AxiosRequestConfig |
The optional request configuration for the passed Http client |
burstService.send(method, args, body, options) ⇒ 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 |
| options | any | AxiosRequestConfig |
The optional request configuration for the passed Http client |
core ⇒
Creates BRS Http send parameters for a transaction from attachment data
Returns:
HttpParams
Internal:
| Param | Description |
|---|---|
| attachment | The attachment |
| params | Any object |
- core ⇒
- ~BurstService
- new BurstService(settings)
- .toBRSEndpoint(method, data) ⇒
string - .query(method, args, options) ⇒
Promise.<T> - .send(method, args, body, options) ⇒
Promise.<T>
- ~BurstService
core~BurstService
Kind: inner class of core
- ~BurstService
- new BurstService(settings)
- .toBRSEndpoint(method, data) ⇒
string - .query(method, args, options) ⇒
Promise.<T> - .send(method, args, body, options) ⇒
Promise.<T>
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 |
| data | any |
A JSON object which will be mapped to url params |
burstService.query(method, args, options) ⇒ 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 |
| options | any | AxiosRequestConfig |
The optional request configuration for the passed Http client |
burstService.send(method, args, body, options) ⇒ 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 |
| options | any | AxiosRequestConfig |
The optional request configuration for the passed Http client |
core
Generic BRS Web Service class.
- core
- ~BurstService
- new BurstService(settings)
- .toBRSEndpoint(method, data) ⇒
string - .query(method, args, options) ⇒
Promise.<T> - .send(method, args, body, options) ⇒
Promise.<T>
- ~BurstService
core~BurstService
Kind: inner class of core
- ~BurstService
- new BurstService(settings)
- .toBRSEndpoint(method, data) ⇒
string - .query(method, args, options) ⇒
Promise.<T> - .send(method, args, body, options) ⇒
Promise.<T>
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 |
| data | any |
A JSON object which will be mapped to url params |
burstService.query(method, args, options) ⇒ 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 |
| options | any | AxiosRequestConfig |
The optional request configuration for the passed Http client |
burstService.send(method, args, body, options) ⇒ 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 |
| options | any | AxiosRequestConfig |
The optional request configuration for the passed Http client |
core ⇒
Tries to extract recipients and its amounts for multi out payments (different and same amount)
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 ⇒
- ~BurstService
- new BurstService(settings)
- .toBRSEndpoint(method, data) ⇒
string - .query(method, args, options) ⇒
Promise.<T> - .send(method, args, body, options) ⇒
Promise.<T>
- ~BurstService
core~BurstService
Kind: inner class of core
- ~BurstService
- new BurstService(settings)
- .toBRSEndpoint(method, data) ⇒
string - .query(method, args, options) ⇒
Promise.<T> - .send(method, args, body, options) ⇒
Promise.<T>
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 |
| data | any |
A JSON object which will be mapped to url params |
burstService.query(method, args, options) ⇒ 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 |
| options | any | AxiosRequestConfig |
The optional request configuration for the passed Http client |
burstService.send(method, args, body, options) ⇒ 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 |
| options | any | AxiosRequestConfig |
The optional request configuration for the passed Http client |
core ⇒
Gets the amount from a transaction, considering ordinary and multi out transactions (with same and different payments)
Returns:
the amount in BURST (not NQT)
| Param | Description |
|---|---|
| recipientId | The numeric id of the recipient |
| transaction | The payment transaction |
- core ⇒
- ~BurstService
- new BurstService(settings)
- .toBRSEndpoint(method, data) ⇒
string - .query(method, args, options) ⇒
Promise.<T> - .send(method, args, body, options) ⇒
Promise.<T>
- ~BurstService
core~BurstService
Kind: inner class of core
- ~BurstService
- new BurstService(settings)
- .toBRSEndpoint(method, data) ⇒
string - .query(method, args, options) ⇒
Promise.<T> - .send(method, args, body, options) ⇒
Promise.<T>
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 |
| data | any |
A JSON object which will be mapped to url params |
burstService.query(method, args, options) ⇒ 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 |
| options | any | AxiosRequestConfig |
The optional request configuration for the passed Http client |
burstService.send(method, args, body, options) ⇒ 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 |
| options | any | AxiosRequestConfig |
The optional request configuration for the passed Http client |
core ⇒
Checks if a transaction is a multi out transaction with same amounts for each recipient
Returns:
true, if is a multi out transaction
| Param | Description |
|---|---|
| transaction | Transaction to be checked |
- core ⇒
- ~BurstService
- new BurstService(settings)
- .toBRSEndpoint(method, data) ⇒
string - .query(method, args, options) ⇒
Promise.<T> - .send(method, args, body, options) ⇒
Promise.<T>
- ~BurstService
core~BurstService
Kind: inner class of core
- ~BurstService
- new BurstService(settings)
- .toBRSEndpoint(method, data) ⇒
string - .query(method, args, options) ⇒
Promise.<T> - .send(method, args, body, options) ⇒
Promise.<T>
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 |
| data | any |
A JSON object which will be mapped to url params |
burstService.query(method, args, options) ⇒ 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 |
| options | any | AxiosRequestConfig |
The optional request configuration for the passed Http client |
burstService.send(method, args, body, options) ⇒ 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 |
| options | any | AxiosRequestConfig |
The optional request configuration for the passed Http client |
core ⇒
Checks if a transaction is a multi out transaction (with different amounts)
Returns:
true, if is a multi out transaction
| Param | Description |
|---|---|
| transaction | Transaction to be checked |
- core ⇒
- ~BurstService
- new BurstService(settings)
- .toBRSEndpoint(method, data) ⇒
string - .query(method, args, options) ⇒
Promise.<T> - .send(method, args, body, options) ⇒
Promise.<T>
- ~BurstService
core~BurstService
Kind: inner class of core
- ~BurstService
- new BurstService(settings)
- .toBRSEndpoint(method, data) ⇒
string - .query(method, args, options) ⇒
Promise.<T> - .send(method, args, body, options) ⇒
Promise.<T>
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 |
| data | any |
A JSON object which will be mapped to url params |
burstService.query(method, args, options) ⇒ 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 |
| options | any | AxiosRequestConfig |
The optional request configuration for the passed Http client |
burstService.send(method, args, body, options) ⇒ 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 |
| options | any | AxiosRequestConfig |
The optional request configuration for the passed Http client |
core
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.
- core
- ~BurstService
- new BurstService(settings)
- .toBRSEndpoint(method, data) ⇒
string - .query(method, args, options) ⇒
Promise.<T> - .send(method, args, body, options) ⇒
Promise.<T>
- ~BurstService
core~BurstService
Kind: inner class of core
- ~BurstService
- new BurstService(settings)
- .toBRSEndpoint(method, data) ⇒
string - .query(method, args, options) ⇒
Promise.<T> - .send(method, args, body, options) ⇒
Promise.<T>
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 |
| data | any |
A JSON object which will be mapped to url params |
burstService.query(method, args, options) ⇒ 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 |
| options | any | AxiosRequestConfig |
The optional request configuration for the passed Http client |
burstService.send(method, args, body, options) ⇒ 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 |
| options | any | AxiosRequestConfig |
The optional request configuration for the passed Http client |
core
Attachment class
The attachment class is used to appended to transaction where appropriate. It is a super class for Message and EncryptedMessage.
- core
- ~BurstService
- new BurstService(settings)
- .toBRSEndpoint(method, data) ⇒
string - .query(method, args, options) ⇒
Promise.<T> - .send(method, args, body, options) ⇒
Promise.<T>
- ~BurstService
core~BurstService
Kind: inner class of core
- ~BurstService
- new BurstService(settings)
- .toBRSEndpoint(method, data) ⇒
string - .query(method, args, options) ⇒
Promise.<T> - .send(method, args, body, options) ⇒
Promise.<T>
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 |
| data | any |
A JSON object which will be mapped to url params |
burstService.query(method, args, options) ⇒ 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 |
| options | any | AxiosRequestConfig |
The optional request configuration for the passed Http client |
burstService.send(method, args, body, options) ⇒ 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 |
| options | any | AxiosRequestConfig |
The optional request configuration for the passed Http client |
core
Message class
The Message class is used to model a plain message attached to a transaction.
- core
- ~BurstService
- new BurstService(settings)
- .toBRSEndpoint(method, data) ⇒
string - .query(method, args, options) ⇒
Promise.<T> - .send(method, args, body, options) ⇒
Promise.<T>
- ~BurstService
core~BurstService
Kind: inner class of core
- ~BurstService
- new BurstService(settings)
- .toBRSEndpoint(method, data) ⇒
string - .query(method, args, options) ⇒
Promise.<T> - .send(method, args, body, options) ⇒
Promise.<T>
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 |
| data | any |
A JSON object which will be mapped to url params |
burstService.query(method, args, options) ⇒ 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 |
| options | any | AxiosRequestConfig |
The optional request configuration for the passed Http client |
burstService.send(method, args, body, options) ⇒ 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 |
| options | any | AxiosRequestConfig |
The optional request configuration for the passed Http client |
core
EncryptedMessage class
The EncryptedMessage class is a model for a encrypted message attached to a transaction.
- core
- ~BurstService
- new BurstService(settings)
- .toBRSEndpoint(method, data) ⇒
string - .query(method, args, options) ⇒
Promise.<T> - .send(method, args, body, options) ⇒
Promise.<T>
- ~BurstService
core~BurstService
Kind: inner class of core
- ~BurstService
- new BurstService(settings)
- .toBRSEndpoint(method, data) ⇒
string - .query(method, args, options) ⇒
Promise.<T> - .send(method, args, body, options) ⇒
Promise.<T>
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 |
| data | any |
A JSON object which will be mapped to url params |
burstService.query(method, args, options) ⇒ 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 |
| options | any | AxiosRequestConfig |
The optional request configuration for the passed Http client |
burstService.send(method, args, body, options) ⇒ 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 |
| options | any | AxiosRequestConfig |
The optional request configuration for the passed Http client |
ApiImpl
Copyright (c) 2019 Burst Apps Team
Kind: global class