Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
@burstjs/core
Advanced tools
Burst-related functions and models for building Burstcoin applications.
Install using npm:
npm install @burstjs/core
or using yarn:
yarn add @burstjs/core
Generic BRS Web Service class. Extend and specific services here
Promise.<ArrayBufferLike>
Get QR Code image for a given BURST address
Promise.<string>
Generate the URL for a QR Code for a given BURST address. Useful for IMG tags in HTML.
Submits a getBalance query given an accountId
Promise.<TransactionList>
Get transactions of given account
Promise.<AliasList>
Gets the aliases of an account
Promise.<UnconfirmedTransactionList>
Get unconfirmed transactions of given account
Get a block by given height
Get a block by given id
Original work Copyright (c) 2019 Burst Apps Team
Promise.<BlockId>
Get a block id by given height
Constructs an Attachment
Broadcasts a text message to the network/blockchain
The message will be broadcasted in two steps.
Get the blockchain status.
Get the state of the server node and network
Promise.<SuggestedFees>
Get the current suggested fees
Broadcasts a transaction to the network/blockchain
Get a transaction from the network/blockchain
Sends burst to the blockchain
The message will be broadcasted in two steps.
Generic BRS Web Service class. Extend and specific services here
Kind: global class
Creates Service instance
Param | Type | Description |
---|---|---|
baseUrl | The host url of web service | |
relativePath | The relative path will be prepended before each url created with toBRSEndpoint() | |
httpClient | Http | If passed an client instance, it will be used instead of default HttpImpl. Good for testing. |
Kind: instance property of BurstService
Returns:
The internal Http client
Mounts a BRS conform API endpoint of format <host>?requestType=getBlock&height=123
Kind: instance method of BurstService
Returns:
The mounted url (without host)
Param | Description |
---|---|
method | The method name for |
data | A JSON object which will be mapped to url params |
Requests a query to BRS
Kind: instance method of BurstService
Returns:
The response data of success
HttpError in case of failure
Param | Description |
---|---|
method | The BRS method according https://burstwiki.org/wiki/The_Burst_API |
args | A JSON object which will be mapped to url params |
Send data to BRS
Kind: instance method of BurstService
Returns:
The response data of success
HttpError in case of failure
Param | Description |
---|---|
method | The BRS method accordinghttps://burstwiki.org/wiki/The_Burst_API#Create_Transaction. Note that there are only a few POST methods |
args | A JSON object which will be mapped to url params |
body | An object with key value pairs to submit as post body |
Promise.<ArrayBufferLike>
Get QR Code image for a given BURST address
Kind: global function
Param | Type | Description |
---|---|---|
receiverId | string | The recipient burst |
amountNQT | string | The amount (in NQT) to request |
feeSuggestionType | string | The fee suggestion type string |
Promise.<string>
Generate the URL for a QR Code for a given BURST address. Useful for IMG tags in HTML.
Kind: global function
Param | Type | Description |
---|---|---|
receiverId | string | The recipient burst address |
amountNQT | string | The amount (in NQT) to request |
feeSuggestionType | string | The fee suggestion type string |
Submits a getBalance query given an accountId
Promise.<TransactionList>
Get transactions of given account
Kind: global function
Param | Type | Description |
---|---|---|
accountId | string | The numeric accountId |
firstIndex | number | The first index of the transaction list, beginning at 0 |
lastIndex | number | The last index of the transaction list |
numberOfConfirmations | number | The minimum required number of confirmations per transaction |
Promise.<AliasList>
Gets the aliases of an account
Kind: global function
Param | Type |
---|---|
accountId | string |
Promise.<UnconfirmedTransactionList>
Get unconfirmed transactions of given account
Kind: global function
Param | Type | Description |
---|---|---|
accountId | string | The numeric accountId |
Get a block by given height
Kind: global function
Returns:
The Block
Param | Description |
---|---|
height | The block height |
includeTransactions | true, if transactions shall be included |
Get a block by given id
Kind: global function
Returns:
The Block
Param | Description |
---|---|
id | The block id |
includeTransactions | true, if transactions shall be included |
Original work Copyright (c) 2019 Burst Apps Team
Promise.<BlockId>
Get a block id by given height
Kind: global function
Returns: Promise.<BlockId>
-
The Block Id
Param | Type | Description |
---|---|---|
height | number | The block height |
Constructs an Attachment
Kind: global function
Returns:
HttpParams
Param | Description |
---|---|
transactions | The transaction with the attachment |
params | Some HttpParams |
Broadcasts a text message to the network/blockchain
The message will be broadcasted in two steps.
Kind: global function
Returns:
The Transaction Id
Param | Description |
---|---|
message | The text message to be sent |
recipientId | The recipients Id, not RS Address |
senderPublicKey | The senders public key for sending an unsigned message |
senderPrivateKey | The senders private key to sign the message |
fee | The optional fee (expressed in Burst) for the message, default is 0.1 Burst. |
Get the blockchain status.
Kind: global function
Returns:
The Blockchain Status
Get the state of the server node and network
Kind: global function
Returns:
The server Status
Promise.<SuggestedFees>
Get the current suggested fees
Kind: global function
Returns: Promise.<SuggestedFees>
-
The Suggested Fees
Broadcasts a transaction to the network/blockchain
Kind: global function
Returns:
The Transaction Id
Param | Description |
---|---|
signedTransactionPayload | The signed transaction payload encoded in base64 |
Get a transaction from the network/blockchain
Kind: global function
Returns:
The Transaction
Param | Description |
---|---|
transactionId | The transaction Id |
Sends burst to the blockchain
The message will be broadcasted in two steps.
Kind: global function
Returns:
The Transaction
Param | Description |
---|---|
transaction | The unsigned transaction |
senderPublicKey | The senders public key for sending an unsigned message |
senderPrivateKey | The senders private key to sign the message |
recipientAddress | The recipients RS Address |
FAQs
Burst-related functions and models for building Burstcoin applications.
The npm package @burstjs/core receives a total of 7 weekly downloads. As such, @burstjs/core popularity was classified as not popular.
We found that @burstjs/core demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.