Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@burstjs/util

Package Overview
Dependencies
Maintainers
2
Versions
52
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@burstjs/util

Useful utilities and tools for building Burstcoin applications

  • 0.5.0-beta.8
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
18
decreased by-28%
Maintainers
2
Weekly downloads
 
Created
Source

@burstjs/util

Useful utilities and tools for building Burstcoin applications

Installation

@burstjs/http 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/util

or using yarn:

yarn add @burstjs/util
Example
import {convertNumberToNQTString} from '@burstjs/util'

const value = convertNumberToNQTString(1000)
console.log(value)

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/util/dist/util.crypto.min.js'></script>

Example
const value = b$util.convertNumberToNQTString(1000)
console.log(value)

See more here:

@burstjs/util Online Documentation


API Reference

Modules

util

util

util.isValid ⇒ boolean

Check for valid Burst address (format: BURST-XXXX-XXXX-XXXX-XXXXX, XXXX-XXXX-XXXX-XXXXX)

Kind: static property of util
Returns: boolean -

true, if is a valid address, else false


Note: This is with prior quick check

ParamTypeDescription
addressstring

The address

util~convertAddressToNumericId(address) ⇒

Converts BURST-XXXX-XXXX-XXXX-XXXXX into numeric Id

Kind: inner method of util
Returns:

The numeric id, or undefined if address is invalid

ParamDescription
address

The BURST address

util~convertBurstTimeToDate(burstTimestamp) ⇒

Converts a Burst/Block Time (seconds since genesis block) into Date

Kind: inner method of util
Returns:

Date

ParamDescription
burstTimestamp

The numeric Id

util~convertBurstTimeToEpochTime(burstTimestamp) ⇒

Converts a Burst/Block Time (seconds since genesis block) into Unix Epoch Time (milliseconds since 01.01.1970)

Kind: inner method of util
Returns:

Unix Epoch Time (milliseconds since 01.01.1970)

ParamDescription
burstTimestamp

The numeric Id

util~convertByteArrayToHexString(bytes, uppercase) ⇒ string

Converts byte array to hexadecimal string Inverse operation of [[convertHexStringToByteArray]]

Kind: inner method of util
Returns: string -

A hex string representing the byte array input

ParamDefaultDescription
bytes

The (unsigned) byte array to be converted

uppercasefalse

If true, converts hex string with uppercase characters (Default: false)

util~convertByteArrayToString(byteArray, startIndex, length) ⇒ string

Converts a byte array into string Inverse function [[convertStringToByteArray]]

Kind: inner method of util
Returns: string -

The converted string

ParamDefaultDescription
byteArray

The byte array to be converted

startIndex0

The starting index of array to be converted (Default: 0)

length

The number of bytes to be considered, iff startIndex is given. If null the byte array's length is considered

util~convertDateToBurstTime(date) ⇒

Converts a Date into Burst/Block Time (seconds since genesis block)

Kind: inner method of util
Returns:

The Burst Timestamp

ParamDescription
date

The date to be converted

util~convertHexEndianess(hexString) ⇒

Converts the endianess of a hex string. If string is little Endianess it turns into Big Endianess, and vice versa

Kind: inner method of util
Returns:

The converted string as hex string

ParamDescription
hexString

The hex string to be converted

util~convertHexStringToByteArray(hex) ⇒ Array.<number>

Converts an hexadecimal string to byte array

Kind: inner method of util
Returns: Array.<number> -

An byte array representing the hexadecimal input

ParamDescription
hex

The hexadecimal string to be converted

util~convertHexStringToDecString(hexStr) ⇒

Arbitrary length hexadecimal to decimal conversion https://stackoverflow.com/questions/21667377/javascript-hexadecimal-string-to-decimal-string

Kind: inner method of util
Returns:

A decimal string

ParamDescription
hexStr

A hexadecimal string

util~convertHexStringToString(hex) ⇒ string

Converts a Hexadecimally encoded string into String Inverse function [[convertStringToHexString]]

Kind: inner method of util
Returns: string -

The string represented by the Hex String

ParamDescription
hex

The Hex string to be converted

util~convertNQTStringToNumber(amount) ⇒

Helper method to convert a String to number

Kind: inner method of util
Returns:

A number expressed in Burst (not NQT)


Throws:

  • exception if argument is invalid

ParamDescription
amount

The amount in NQT

util~convertNumberToNQTString(n) ⇒

Helper method to Number to String(8 decimals) representation

Kind: inner method of util
Returns:

a NQT number string

ParamDescription
n

the number

util~convertNumericIdToAddress(numericId) ⇒

Encode a numeric id into BURST-XXXX-XXXX-XXXX-XXXXX

Kind: inner method of util
Returns:

the BURST address in Reed-Solomon encoding, or undefined if passed null, undefined

ParamDescription
numericId

The numeric Id

util~convertStringToByteArray(str) ⇒ Array.<number>

Converts a string into byte array Inverse function [[convertByteArrayToString]]

Kind: inner method of util
Returns: Array.<number> -

A byte array representing the string input

ParamDescription
str

The string to be converted

util~convertStringToHexString(str) ⇒ string

Converts/Encode a String into Hexadecimally encoded Inverse function [[convertHexStringToString]]

Kind: inner method of util
Returns: string -

The Hex String representing the input string

ParamDescription
str

The Hex string to be converted

util~isValid(address) ⇒ boolean

Check for valid Burst address (format: BURST-XXXX-XXXX-XXXX-XXXXX, XXXX-XXXX-XXXX-XXXXX)

Kind: inner method of util
Returns: boolean -

true, if is a valid address, else false

ParamTypeDescription
addressstring

The address

util~sumNQTStringToNumber(...nqts) ⇒

Sums various NQT values and returns in Burst

Kind: inner method of util
Returns:

The sum of all amounts in BURST

ParamDescription
...nqts

Variable amount list with NQT string

util

util.isValid ⇒ boolean

Check for valid Burst address (format: BURST-XXXX-XXXX-XXXX-XXXXX, XXXX-XXXX-XXXX-XXXXX)

Kind: static property of util
Returns: boolean -

true, if is a valid address, else false


Note: This is with prior quick check

ParamTypeDescription
addressstring

The address

util~convertAddressToNumericId(address) ⇒

Converts BURST-XXXX-XXXX-XXXX-XXXXX into numeric Id

Kind: inner method of util
Returns:

The numeric id, or undefined if address is invalid

ParamDescription
address

The BURST address

util~convertBurstTimeToDate(burstTimestamp) ⇒

Converts a Burst/Block Time (seconds since genesis block) into Date

Kind: inner method of util
Returns:

Date

ParamDescription
burstTimestamp

The numeric Id

util~convertBurstTimeToEpochTime(burstTimestamp) ⇒

Converts a Burst/Block Time (seconds since genesis block) into Unix Epoch Time (milliseconds since 01.01.1970)

Kind: inner method of util
Returns:

Unix Epoch Time (milliseconds since 01.01.1970)

ParamDescription
burstTimestamp

The numeric Id

util~convertByteArrayToHexString(bytes, uppercase) ⇒ string

Converts byte array to hexadecimal string Inverse operation of [[convertHexStringToByteArray]]

Kind: inner method of util
Returns: string -

A hex string representing the byte array input

ParamDefaultDescription
bytes

The (unsigned) byte array to be converted

uppercasefalse

If true, converts hex string with uppercase characters (Default: false)

util~convertByteArrayToString(byteArray, startIndex, length) ⇒ string

Converts a byte array into string Inverse function [[convertStringToByteArray]]

Kind: inner method of util
Returns: string -

The converted string

ParamDefaultDescription
byteArray

The byte array to be converted

startIndex0

The starting index of array to be converted (Default: 0)

length

The number of bytes to be considered, iff startIndex is given. If null the byte array's length is considered

util~convertDateToBurstTime(date) ⇒

Converts a Date into Burst/Block Time (seconds since genesis block)

Kind: inner method of util
Returns:

The Burst Timestamp

ParamDescription
date

The date to be converted

util~convertHexEndianess(hexString) ⇒

Converts the endianess of a hex string. If string is little Endianess it turns into Big Endianess, and vice versa

Kind: inner method of util
Returns:

The converted string as hex string

ParamDescription
hexString

The hex string to be converted

util~convertHexStringToByteArray(hex) ⇒ Array.<number>

Converts an hexadecimal string to byte array

Kind: inner method of util
Returns: Array.<number> -

An byte array representing the hexadecimal input

ParamDescription
hex

The hexadecimal string to be converted

util~convertHexStringToDecString(hexStr) ⇒

Arbitrary length hexadecimal to decimal conversion https://stackoverflow.com/questions/21667377/javascript-hexadecimal-string-to-decimal-string

Kind: inner method of util
Returns:

A decimal string

ParamDescription
hexStr

A hexadecimal string

util~convertHexStringToString(hex) ⇒ string

Converts a Hexadecimally encoded string into String Inverse function [[convertStringToHexString]]

Kind: inner method of util
Returns: string -

The string represented by the Hex String

ParamDescription
hex

The Hex string to be converted

util~convertNQTStringToNumber(amount) ⇒

Helper method to convert a String to number

Kind: inner method of util
Returns:

A number expressed in Burst (not NQT)


Throws:

  • exception if argument is invalid

ParamDescription
amount

The amount in NQT

util~convertNumberToNQTString(n) ⇒

Helper method to Number to String(8 decimals) representation

Kind: inner method of util
Returns:

a NQT number string

ParamDescription
n

the number

util~convertNumericIdToAddress(numericId) ⇒

Encode a numeric id into BURST-XXXX-XXXX-XXXX-XXXXX

Kind: inner method of util
Returns:

the BURST address in Reed-Solomon encoding, or undefined if passed null, undefined

ParamDescription
numericId

The numeric Id

util~convertStringToByteArray(str) ⇒ Array.<number>

Converts a string into byte array Inverse function [[convertByteArrayToString]]

Kind: inner method of util
Returns: Array.<number> -

A byte array representing the string input

ParamDescription
str

The string to be converted

util~convertStringToHexString(str) ⇒ string

Converts/Encode a String into Hexadecimally encoded Inverse function [[convertHexStringToString]]

Kind: inner method of util
Returns: string -

The Hex String representing the input string

ParamDescription
str

The Hex string to be converted

util~isValid(address) ⇒ boolean

Check for valid Burst address (format: BURST-XXXX-XXXX-XXXX-XXXXX, XXXX-XXXX-XXXX-XXXXX)

Kind: inner method of util
Returns: boolean -

true, if is a valid address, else false

ParamTypeDescription
addressstring

The address

util~sumNQTStringToNumber(...nqts) ⇒

Sums various NQT values and returns in Burst

Kind: inner method of util
Returns:

The sum of all amounts in BURST

ParamDescription
...nqts

Variable amount list with NQT string

util

util.isValid ⇒ boolean

Check for valid Burst address (format: BURST-XXXX-XXXX-XXXX-XXXXX, XXXX-XXXX-XXXX-XXXXX)

Kind: static property of util
Returns: boolean -

true, if is a valid address, else false


Note: This is with prior quick check

ParamTypeDescription
addressstring

The address

util~convertAddressToNumericId(address) ⇒

Converts BURST-XXXX-XXXX-XXXX-XXXXX into numeric Id

Kind: inner method of util
Returns:

The numeric id, or undefined if address is invalid

ParamDescription
address

The BURST address

util~convertBurstTimeToDate(burstTimestamp) ⇒

Converts a Burst/Block Time (seconds since genesis block) into Date

Kind: inner method of util
Returns:

Date

ParamDescription
burstTimestamp

The numeric Id

util~convertBurstTimeToEpochTime(burstTimestamp) ⇒

Converts a Burst/Block Time (seconds since genesis block) into Unix Epoch Time (milliseconds since 01.01.1970)

Kind: inner method of util
Returns:

Unix Epoch Time (milliseconds since 01.01.1970)

ParamDescription
burstTimestamp

The numeric Id

util~convertByteArrayToHexString(bytes, uppercase) ⇒ string

Converts byte array to hexadecimal string Inverse operation of [[convertHexStringToByteArray]]

Kind: inner method of util
Returns: string -

A hex string representing the byte array input

ParamDefaultDescription
bytes

The (unsigned) byte array to be converted

uppercasefalse

If true, converts hex string with uppercase characters (Default: false)

util~convertByteArrayToString(byteArray, startIndex, length) ⇒ string

Converts a byte array into string Inverse function [[convertStringToByteArray]]

Kind: inner method of util
Returns: string -

The converted string

ParamDefaultDescription
byteArray

The byte array to be converted

startIndex0

The starting index of array to be converted (Default: 0)

length

The number of bytes to be considered, iff startIndex is given. If null the byte array's length is considered

util~convertDateToBurstTime(date) ⇒

Converts a Date into Burst/Block Time (seconds since genesis block)

Kind: inner method of util
Returns:

The Burst Timestamp

ParamDescription
date

The date to be converted

util~convertHexEndianess(hexString) ⇒

Converts the endianess of a hex string. If string is little Endianess it turns into Big Endianess, and vice versa

Kind: inner method of util
Returns:

The converted string as hex string

ParamDescription
hexString

The hex string to be converted

util~convertHexStringToByteArray(hex) ⇒ Array.<number>

Converts an hexadecimal string to byte array

Kind: inner method of util
Returns: Array.<number> -

An byte array representing the hexadecimal input

ParamDescription
hex

The hexadecimal string to be converted

util~convertHexStringToDecString(hexStr) ⇒

Arbitrary length hexadecimal to decimal conversion https://stackoverflow.com/questions/21667377/javascript-hexadecimal-string-to-decimal-string

Kind: inner method of util
Returns:

A decimal string

ParamDescription
hexStr

A hexadecimal string

util~convertHexStringToString(hex) ⇒ string

Converts a Hexadecimally encoded string into String Inverse function [[convertStringToHexString]]

Kind: inner method of util
Returns: string -

The string represented by the Hex String

ParamDescription
hex

The Hex string to be converted

util~convertNQTStringToNumber(amount) ⇒

Helper method to convert a String to number

Kind: inner method of util
Returns:

A number expressed in Burst (not NQT)


Throws:

  • exception if argument is invalid

ParamDescription
amount

The amount in NQT

util~convertNumberToNQTString(n) ⇒

Helper method to Number to String(8 decimals) representation

Kind: inner method of util
Returns:

a NQT number string

ParamDescription
n

the number

util~convertNumericIdToAddress(numericId) ⇒

Encode a numeric id into BURST-XXXX-XXXX-XXXX-XXXXX

Kind: inner method of util
Returns:

the BURST address in Reed-Solomon encoding, or undefined if passed null, undefined

ParamDescription
numericId

The numeric Id

util~convertStringToByteArray(str) ⇒ Array.<number>

Converts a string into byte array Inverse function [[convertByteArrayToString]]

Kind: inner method of util
Returns: Array.<number> -

A byte array representing the string input

ParamDescription
str

The string to be converted

util~convertStringToHexString(str) ⇒ string

Converts/Encode a String into Hexadecimally encoded Inverse function [[convertHexStringToString]]

Kind: inner method of util
Returns: string -

The Hex String representing the input string

ParamDescription
str

The Hex string to be converted

util~isValid(address) ⇒ boolean

Check for valid Burst address (format: BURST-XXXX-XXXX-XXXX-XXXXX, XXXX-XXXX-XXXX-XXXXX)

Kind: inner method of util
Returns: boolean -

true, if is a valid address, else false

ParamTypeDescription
addressstring

The address

util~sumNQTStringToNumber(...nqts) ⇒

Sums various NQT values and returns in Burst

Kind: inner method of util
Returns:

The sum of all amounts in BURST

ParamDescription
...nqts

Variable amount list with NQT string

util

util.isValid ⇒ boolean

Check for valid Burst address (format: BURST-XXXX-XXXX-XXXX-XXXXX, XXXX-XXXX-XXXX-XXXXX)

Kind: static property of util
Returns: boolean -

true, if is a valid address, else false


Note: This is with prior quick check

ParamTypeDescription
addressstring

The address

util~convertAddressToNumericId(address) ⇒

Converts BURST-XXXX-XXXX-XXXX-XXXXX into numeric Id

Kind: inner method of util
Returns:

The numeric id, or undefined if address is invalid

ParamDescription
address

The BURST address

util~convertBurstTimeToDate(burstTimestamp) ⇒

Converts a Burst/Block Time (seconds since genesis block) into Date

Kind: inner method of util
Returns:

Date

ParamDescription
burstTimestamp

The numeric Id

util~convertBurstTimeToEpochTime(burstTimestamp) ⇒

Converts a Burst/Block Time (seconds since genesis block) into Unix Epoch Time (milliseconds since 01.01.1970)

Kind: inner method of util
Returns:

Unix Epoch Time (milliseconds since 01.01.1970)

ParamDescription
burstTimestamp

The numeric Id

util~convertByteArrayToHexString(bytes, uppercase) ⇒ string

Converts byte array to hexadecimal string Inverse operation of [[convertHexStringToByteArray]]

Kind: inner method of util
Returns: string -

A hex string representing the byte array input

ParamDefaultDescription
bytes

The (unsigned) byte array to be converted

uppercasefalse

If true, converts hex string with uppercase characters (Default: false)

util~convertByteArrayToString(byteArray, startIndex, length) ⇒ string

Converts a byte array into string Inverse function [[convertStringToByteArray]]

Kind: inner method of util
Returns: string -

The converted string

ParamDefaultDescription
byteArray

The byte array to be converted

startIndex0

The starting index of array to be converted (Default: 0)

length

The number of bytes to be considered, iff startIndex is given. If null the byte array's length is considered

util~convertDateToBurstTime(date) ⇒

Converts a Date into Burst/Block Time (seconds since genesis block)

Kind: inner method of util
Returns:

The Burst Timestamp

ParamDescription
date

The date to be converted

util~convertHexEndianess(hexString) ⇒

Converts the endianess of a hex string. If string is little Endianess it turns into Big Endianess, and vice versa

Kind: inner method of util
Returns:

The converted string as hex string

ParamDescription
hexString

The hex string to be converted

util~convertHexStringToByteArray(hex) ⇒ Array.<number>

Converts an hexadecimal string to byte array

Kind: inner method of util
Returns: Array.<number> -

An byte array representing the hexadecimal input

ParamDescription
hex

The hexadecimal string to be converted

util~convertHexStringToDecString(hexStr) ⇒

Arbitrary length hexadecimal to decimal conversion https://stackoverflow.com/questions/21667377/javascript-hexadecimal-string-to-decimal-string

Kind: inner method of util
Returns:

A decimal string

ParamDescription
hexStr

A hexadecimal string

util~convertHexStringToString(hex) ⇒ string

Converts a Hexadecimally encoded string into String Inverse function [[convertStringToHexString]]

Kind: inner method of util
Returns: string -

The string represented by the Hex String

ParamDescription
hex

The Hex string to be converted

util~convertNQTStringToNumber(amount) ⇒

Helper method to convert a String to number

Kind: inner method of util
Returns:

A number expressed in Burst (not NQT)


Throws:

  • exception if argument is invalid

ParamDescription
amount

The amount in NQT

util~convertNumberToNQTString(n) ⇒

Helper method to Number to String(8 decimals) representation

Kind: inner method of util
Returns:

a NQT number string

ParamDescription
n

the number

util~convertNumericIdToAddress(numericId) ⇒

Encode a numeric id into BURST-XXXX-XXXX-XXXX-XXXXX

Kind: inner method of util
Returns:

the BURST address in Reed-Solomon encoding, or undefined if passed null, undefined

ParamDescription
numericId

The numeric Id

util~convertStringToByteArray(str) ⇒ Array.<number>

Converts a string into byte array Inverse function [[convertByteArrayToString]]

Kind: inner method of util
Returns: Array.<number> -

A byte array representing the string input

ParamDescription
str

The string to be converted

util~convertStringToHexString(str) ⇒ string

Converts/Encode a String into Hexadecimally encoded Inverse function [[convertHexStringToString]]

Kind: inner method of util
Returns: string -

The Hex String representing the input string

ParamDescription
str

The Hex string to be converted

util~isValid(address) ⇒ boolean

Check for valid Burst address (format: BURST-XXXX-XXXX-XXXX-XXXXX, XXXX-XXXX-XXXX-XXXXX)

Kind: inner method of util
Returns: boolean -

true, if is a valid address, else false

ParamTypeDescription
addressstring

The address

util~sumNQTStringToNumber(...nqts) ⇒

Sums various NQT values and returns in Burst

Kind: inner method of util
Returns:

The sum of all amounts in BURST

ParamDescription
...nqts

Variable amount list with NQT string

util

util.isValid ⇒ boolean

Check for valid Burst address (format: BURST-XXXX-XXXX-XXXX-XXXXX, XXXX-XXXX-XXXX-XXXXX)

Kind: static property of util
Returns: boolean -

true, if is a valid address, else false


Note: This is with prior quick check

ParamTypeDescription
addressstring

The address

util~convertAddressToNumericId(address) ⇒

Converts BURST-XXXX-XXXX-XXXX-XXXXX into numeric Id

Kind: inner method of util
Returns:

The numeric id, or undefined if address is invalid

ParamDescription
address

The BURST address

util~convertBurstTimeToDate(burstTimestamp) ⇒

Converts a Burst/Block Time (seconds since genesis block) into Date

Kind: inner method of util
Returns:

Date

ParamDescription
burstTimestamp

The numeric Id

util~convertBurstTimeToEpochTime(burstTimestamp) ⇒

Converts a Burst/Block Time (seconds since genesis block) into Unix Epoch Time (milliseconds since 01.01.1970)

Kind: inner method of util
Returns:

Unix Epoch Time (milliseconds since 01.01.1970)

ParamDescription
burstTimestamp

The numeric Id

util~convertByteArrayToHexString(bytes, uppercase) ⇒ string

Converts byte array to hexadecimal string Inverse operation of [[convertHexStringToByteArray]]

Kind: inner method of util
Returns: string -

A hex string representing the byte array input

ParamDefaultDescription
bytes

The (unsigned) byte array to be converted

uppercasefalse

If true, converts hex string with uppercase characters (Default: false)

util~convertByteArrayToString(byteArray, startIndex, length) ⇒ string

Converts a byte array into string Inverse function [[convertStringToByteArray]]

Kind: inner method of util
Returns: string -

The converted string

ParamDefaultDescription
byteArray

The byte array to be converted

startIndex0

The starting index of array to be converted (Default: 0)

length

The number of bytes to be considered, iff startIndex is given. If null the byte array's length is considered

util~convertDateToBurstTime(date) ⇒

Converts a Date into Burst/Block Time (seconds since genesis block)

Kind: inner method of util
Returns:

The Burst Timestamp

ParamDescription
date

The date to be converted

util~convertHexEndianess(hexString) ⇒

Converts the endianess of a hex string. If string is little Endianess it turns into Big Endianess, and vice versa

Kind: inner method of util
Returns:

The converted string as hex string

ParamDescription
hexString

The hex string to be converted

util~convertHexStringToByteArray(hex) ⇒ Array.<number>

Converts an hexadecimal string to byte array

Kind: inner method of util
Returns: Array.<number> -

An byte array representing the hexadecimal input

ParamDescription
hex

The hexadecimal string to be converted

util~convertHexStringToDecString(hexStr) ⇒

Arbitrary length hexadecimal to decimal conversion https://stackoverflow.com/questions/21667377/javascript-hexadecimal-string-to-decimal-string

Kind: inner method of util
Returns:

A decimal string

ParamDescription
hexStr

A hexadecimal string

util~convertHexStringToString(hex) ⇒ string

Converts a Hexadecimally encoded string into String Inverse function [[convertStringToHexString]]

Kind: inner method of util
Returns: string -

The string represented by the Hex String

ParamDescription
hex

The Hex string to be converted

util~convertNQTStringToNumber(amount) ⇒

Helper method to convert a String to number

Kind: inner method of util
Returns:

A number expressed in Burst (not NQT)


Throws:

  • exception if argument is invalid

ParamDescription
amount

The amount in NQT

util~convertNumberToNQTString(n) ⇒

Helper method to Number to String(8 decimals) representation

Kind: inner method of util
Returns:

a NQT number string

ParamDescription
n

the number

util~convertNumericIdToAddress(numericId) ⇒

Encode a numeric id into BURST-XXXX-XXXX-XXXX-XXXXX

Kind: inner method of util
Returns:

the BURST address in Reed-Solomon encoding, or undefined if passed null, undefined

ParamDescription
numericId

The numeric Id

util~convertStringToByteArray(str) ⇒ Array.<number>

Converts a string into byte array Inverse function [[convertByteArrayToString]]

Kind: inner method of util
Returns: Array.<number> -

A byte array representing the string input

ParamDescription
str

The string to be converted

util~convertStringToHexString(str) ⇒ string

Converts/Encode a String into Hexadecimally encoded Inverse function [[convertHexStringToString]]

Kind: inner method of util
Returns: string -

The Hex String representing the input string

ParamDescription
str

The Hex string to be converted

util~isValid(address) ⇒ boolean

Check for valid Burst address (format: BURST-XXXX-XXXX-XXXX-XXXXX, XXXX-XXXX-XXXX-XXXXX)

Kind: inner method of util
Returns: boolean -

true, if is a valid address, else false

ParamTypeDescription
addressstring

The address

util~sumNQTStringToNumber(...nqts) ⇒

Sums various NQT values and returns in Burst

Kind: inner method of util
Returns:

The sum of all amounts in BURST

ParamDescription
...nqts

Variable amount list with NQT string

util

util.isValid ⇒ boolean

Check for valid Burst address (format: BURST-XXXX-XXXX-XXXX-XXXXX, XXXX-XXXX-XXXX-XXXXX)

Kind: static property of util
Returns: boolean -

true, if is a valid address, else false


Note: This is with prior quick check

ParamTypeDescription
addressstring

The address

util~convertAddressToNumericId(address) ⇒

Converts BURST-XXXX-XXXX-XXXX-XXXXX into numeric Id

Kind: inner method of util
Returns:

The numeric id, or undefined if address is invalid

ParamDescription
address

The BURST address

util~convertBurstTimeToDate(burstTimestamp) ⇒

Converts a Burst/Block Time (seconds since genesis block) into Date

Kind: inner method of util
Returns:

Date

ParamDescription
burstTimestamp

The numeric Id

util~convertBurstTimeToEpochTime(burstTimestamp) ⇒

Converts a Burst/Block Time (seconds since genesis block) into Unix Epoch Time (milliseconds since 01.01.1970)

Kind: inner method of util
Returns:

Unix Epoch Time (milliseconds since 01.01.1970)

ParamDescription
burstTimestamp

The numeric Id

util~convertByteArrayToHexString(bytes, uppercase) ⇒ string

Converts byte array to hexadecimal string Inverse operation of [[convertHexStringToByteArray]]

Kind: inner method of util
Returns: string -

A hex string representing the byte array input

ParamDefaultDescription
bytes

The (unsigned) byte array to be converted

uppercasefalse

If true, converts hex string with uppercase characters (Default: false)

util~convertByteArrayToString(byteArray, startIndex, length) ⇒ string

Converts a byte array into string Inverse function [[convertStringToByteArray]]

Kind: inner method of util
Returns: string -

The converted string

ParamDefaultDescription
byteArray

The byte array to be converted

startIndex0

The starting index of array to be converted (Default: 0)

length

The number of bytes to be considered, iff startIndex is given. If null the byte array's length is considered

util~convertDateToBurstTime(date) ⇒

Converts a Date into Burst/Block Time (seconds since genesis block)

Kind: inner method of util
Returns:

The Burst Timestamp

ParamDescription
date

The date to be converted

util~convertHexEndianess(hexString) ⇒

Converts the endianess of a hex string. If string is little Endianess it turns into Big Endianess, and vice versa

Kind: inner method of util
Returns:

The converted string as hex string

ParamDescription
hexString

The hex string to be converted

util~convertHexStringToByteArray(hex) ⇒ Array.<number>

Converts an hexadecimal string to byte array

Kind: inner method of util
Returns: Array.<number> -

An byte array representing the hexadecimal input

ParamDescription
hex

The hexadecimal string to be converted

util~convertHexStringToDecString(hexStr) ⇒

Arbitrary length hexadecimal to decimal conversion https://stackoverflow.com/questions/21667377/javascript-hexadecimal-string-to-decimal-string

Kind: inner method of util
Returns:

A decimal string

ParamDescription
hexStr

A hexadecimal string

util~convertHexStringToString(hex) ⇒ string

Converts a Hexadecimally encoded string into String Inverse function [[convertStringToHexString]]

Kind: inner method of util
Returns: string -

The string represented by the Hex String

ParamDescription
hex

The Hex string to be converted

util~convertNQTStringToNumber(amount) ⇒

Helper method to convert a String to number

Kind: inner method of util
Returns:

A number expressed in Burst (not NQT)


Throws:

  • exception if argument is invalid

ParamDescription
amount

The amount in NQT

util~convertNumberToNQTString(n) ⇒

Helper method to Number to String(8 decimals) representation

Kind: inner method of util
Returns:

a NQT number string

ParamDescription
n

the number

util~convertNumericIdToAddress(numericId) ⇒

Encode a numeric id into BURST-XXXX-XXXX-XXXX-XXXXX

Kind: inner method of util
Returns:

the BURST address in Reed-Solomon encoding, or undefined if passed null, undefined

ParamDescription
numericId

The numeric Id

util~convertStringToByteArray(str) ⇒ Array.<number>

Converts a string into byte array Inverse function [[convertByteArrayToString]]

Kind: inner method of util
Returns: Array.<number> -

A byte array representing the string input

ParamDescription
str

The string to be converted

util~convertStringToHexString(str) ⇒ string

Converts/Encode a String into Hexadecimally encoded Inverse function [[convertHexStringToString]]

Kind: inner method of util
Returns: string -

The Hex String representing the input string

ParamDescription
str

The Hex string to be converted

util~isValid(address) ⇒ boolean

Check for valid Burst address (format: BURST-XXXX-XXXX-XXXX-XXXXX, XXXX-XXXX-XXXX-XXXXX)

Kind: inner method of util
Returns: boolean -

true, if is a valid address, else false

ParamTypeDescription
addressstring

The address

util~sumNQTStringToNumber(...nqts) ⇒

Sums various NQT values and returns in Burst

Kind: inner method of util
Returns:

The sum of all amounts in BURST

ParamDescription
...nqts

Variable amount list with NQT string

util

util.isValid ⇒ boolean

Check for valid Burst address (format: BURST-XXXX-XXXX-XXXX-XXXXX, XXXX-XXXX-XXXX-XXXXX)

Kind: static property of util
Returns: boolean -

true, if is a valid address, else false


Note: This is with prior quick check

ParamTypeDescription
addressstring

The address

util~convertAddressToNumericId(address) ⇒

Converts BURST-XXXX-XXXX-XXXX-XXXXX into numeric Id

Kind: inner method of util
Returns:

The numeric id, or undefined if address is invalid

ParamDescription
address

The BURST address

util~convertBurstTimeToDate(burstTimestamp) ⇒

Converts a Burst/Block Time (seconds since genesis block) into Date

Kind: inner method of util
Returns:

Date

ParamDescription
burstTimestamp

The numeric Id

util~convertBurstTimeToEpochTime(burstTimestamp) ⇒

Converts a Burst/Block Time (seconds since genesis block) into Unix Epoch Time (milliseconds since 01.01.1970)

Kind: inner method of util
Returns:

Unix Epoch Time (milliseconds since 01.01.1970)

ParamDescription
burstTimestamp

The numeric Id

util~convertByteArrayToHexString(bytes, uppercase) ⇒ string

Converts byte array to hexadecimal string Inverse operation of [[convertHexStringToByteArray]]

Kind: inner method of util
Returns: string -

A hex string representing the byte array input

ParamDefaultDescription
bytes

The (unsigned) byte array to be converted

uppercasefalse

If true, converts hex string with uppercase characters (Default: false)

util~convertByteArrayToString(byteArray, startIndex, length) ⇒ string

Converts a byte array into string Inverse function [[convertStringToByteArray]]

Kind: inner method of util
Returns: string -

The converted string

ParamDefaultDescription
byteArray

The byte array to be converted

startIndex0

The starting index of array to be converted (Default: 0)

length

The number of bytes to be considered, iff startIndex is given. If null the byte array's length is considered

util~convertDateToBurstTime(date) ⇒

Converts a Date into Burst/Block Time (seconds since genesis block)

Kind: inner method of util
Returns:

The Burst Timestamp

ParamDescription
date

The date to be converted

util~convertHexEndianess(hexString) ⇒

Converts the endianess of a hex string. If string is little Endianess it turns into Big Endianess, and vice versa

Kind: inner method of util
Returns:

The converted string as hex string

ParamDescription
hexString

The hex string to be converted

util~convertHexStringToByteArray(hex) ⇒ Array.<number>

Converts an hexadecimal string to byte array

Kind: inner method of util
Returns: Array.<number> -

An byte array representing the hexadecimal input

ParamDescription
hex

The hexadecimal string to be converted

util~convertHexStringToDecString(hexStr) ⇒

Arbitrary length hexadecimal to decimal conversion https://stackoverflow.com/questions/21667377/javascript-hexadecimal-string-to-decimal-string

Kind: inner method of util
Returns:

A decimal string

ParamDescription
hexStr

A hexadecimal string

util~convertHexStringToString(hex) ⇒ string

Converts a Hexadecimally encoded string into String Inverse function [[convertStringToHexString]]

Kind: inner method of util
Returns: string -

The string represented by the Hex String

ParamDescription
hex

The Hex string to be converted

util~convertNQTStringToNumber(amount) ⇒

Helper method to convert a String to number

Kind: inner method of util
Returns:

A number expressed in Burst (not NQT)


Throws:

  • exception if argument is invalid

ParamDescription
amount

The amount in NQT

util~convertNumberToNQTString(n) ⇒

Helper method to Number to String(8 decimals) representation

Kind: inner method of util
Returns:

a NQT number string

ParamDescription
n

the number

util~convertNumericIdToAddress(numericId) ⇒

Encode a numeric id into BURST-XXXX-XXXX-XXXX-XXXXX

Kind: inner method of util
Returns:

the BURST address in Reed-Solomon encoding, or undefined if passed null, undefined

ParamDescription
numericId

The numeric Id

util~convertStringToByteArray(str) ⇒ Array.<number>

Converts a string into byte array Inverse function [[convertByteArrayToString]]

Kind: inner method of util
Returns: Array.<number> -

A byte array representing the string input

ParamDescription
str

The string to be converted

util~convertStringToHexString(str) ⇒ string

Converts/Encode a String into Hexadecimally encoded Inverse function [[convertHexStringToString]]

Kind: inner method of util
Returns: string -

The Hex String representing the input string

ParamDescription
str

The Hex string to be converted

util~isValid(address) ⇒ boolean

Check for valid Burst address (format: BURST-XXXX-XXXX-XXXX-XXXXX, XXXX-XXXX-XXXX-XXXXX)

Kind: inner method of util
Returns: boolean -

true, if is a valid address, else false

ParamTypeDescription
addressstring

The address

util~sumNQTStringToNumber(...nqts) ⇒

Sums various NQT values and returns in Burst

Kind: inner method of util
Returns:

The sum of all amounts in BURST

ParamDescription
...nqts

Variable amount list with NQT string

util

util.isValid ⇒ boolean

Check for valid Burst address (format: BURST-XXXX-XXXX-XXXX-XXXXX, XXXX-XXXX-XXXX-XXXXX)

Kind: static property of util
Returns: boolean -

true, if is a valid address, else false


Note: This is with prior quick check

ParamTypeDescription
addressstring

The address

util~convertAddressToNumericId(address) ⇒

Converts BURST-XXXX-XXXX-XXXX-XXXXX into numeric Id

Kind: inner method of util
Returns:

The numeric id, or undefined if address is invalid

ParamDescription
address

The BURST address

util~convertBurstTimeToDate(burstTimestamp) ⇒

Converts a Burst/Block Time (seconds since genesis block) into Date

Kind: inner method of util
Returns:

Date

ParamDescription
burstTimestamp

The numeric Id

util~convertBurstTimeToEpochTime(burstTimestamp) ⇒

Converts a Burst/Block Time (seconds since genesis block) into Unix Epoch Time (milliseconds since 01.01.1970)

Kind: inner method of util
Returns:

Unix Epoch Time (milliseconds since 01.01.1970)

ParamDescription
burstTimestamp

The numeric Id

util~convertByteArrayToHexString(bytes, uppercase) ⇒ string

Converts byte array to hexadecimal string Inverse operation of [[convertHexStringToByteArray]]

Kind: inner method of util
Returns: string -

A hex string representing the byte array input

ParamDefaultDescription
bytes

The (unsigned) byte array to be converted

uppercasefalse

If true, converts hex string with uppercase characters (Default: false)

util~convertByteArrayToString(byteArray, startIndex, length) ⇒ string

Converts a byte array into string Inverse function [[convertStringToByteArray]]

Kind: inner method of util
Returns: string -

The converted string

ParamDefaultDescription
byteArray

The byte array to be converted

startIndex0

The starting index of array to be converted (Default: 0)

length

The number of bytes to be considered, iff startIndex is given. If null the byte array's length is considered

util~convertDateToBurstTime(date) ⇒

Converts a Date into Burst/Block Time (seconds since genesis block)

Kind: inner method of util
Returns:

The Burst Timestamp

ParamDescription
date

The date to be converted

util~convertHexEndianess(hexString) ⇒

Converts the endianess of a hex string. If string is little Endianess it turns into Big Endianess, and vice versa

Kind: inner method of util
Returns:

The converted string as hex string

ParamDescription
hexString

The hex string to be converted

util~convertHexStringToByteArray(hex) ⇒ Array.<number>

Converts an hexadecimal string to byte array

Kind: inner method of util
Returns: Array.<number> -

An byte array representing the hexadecimal input

ParamDescription
hex

The hexadecimal string to be converted

util~convertHexStringToDecString(hexStr) ⇒

Arbitrary length hexadecimal to decimal conversion https://stackoverflow.com/questions/21667377/javascript-hexadecimal-string-to-decimal-string

Kind: inner method of util
Returns:

A decimal string

ParamDescription
hexStr

A hexadecimal string

util~convertHexStringToString(hex) ⇒ string

Converts a Hexadecimally encoded string into String Inverse function [[convertStringToHexString]]

Kind: inner method of util
Returns: string -

The string represented by the Hex String

ParamDescription
hex

The Hex string to be converted

util~convertNQTStringToNumber(amount) ⇒

Helper method to convert a String to number

Kind: inner method of util
Returns:

A number expressed in Burst (not NQT)


Throws:

  • exception if argument is invalid

ParamDescription
amount

The amount in NQT

util~convertNumberToNQTString(n) ⇒

Helper method to Number to String(8 decimals) representation

Kind: inner method of util
Returns:

a NQT number string

ParamDescription
n

the number

util~convertNumericIdToAddress(numericId) ⇒

Encode a numeric id into BURST-XXXX-XXXX-XXXX-XXXXX

Kind: inner method of util
Returns:

the BURST address in Reed-Solomon encoding, or undefined if passed null, undefined

ParamDescription
numericId

The numeric Id

util~convertStringToByteArray(str) ⇒ Array.<number>

Converts a string into byte array Inverse function [[convertByteArrayToString]]

Kind: inner method of util
Returns: Array.<number> -

A byte array representing the string input

ParamDescription
str

The string to be converted

util~convertStringToHexString(str) ⇒ string

Converts/Encode a String into Hexadecimally encoded Inverse function [[convertHexStringToString]]

Kind: inner method of util
Returns: string -

The Hex String representing the input string

ParamDescription
str

The Hex string to be converted

util~isValid(address) ⇒ boolean

Check for valid Burst address (format: BURST-XXXX-XXXX-XXXX-XXXXX, XXXX-XXXX-XXXX-XXXXX)

Kind: inner method of util
Returns: boolean -

true, if is a valid address, else false

ParamTypeDescription
addressstring

The address

util~sumNQTStringToNumber(...nqts) ⇒

Sums various NQT values and returns in Burst

Kind: inner method of util
Returns:

The sum of all amounts in BURST

ParamDescription
...nqts

Variable amount list with NQT string

util

util.isValid ⇒ boolean

Check for valid Burst address (format: BURST-XXXX-XXXX-XXXX-XXXXX, XXXX-XXXX-XXXX-XXXXX)

Kind: static property of util
Returns: boolean -

true, if is a valid address, else false


Note: This is with prior quick check

ParamTypeDescription
addressstring

The address

util~convertAddressToNumericId(address) ⇒

Converts BURST-XXXX-XXXX-XXXX-XXXXX into numeric Id

Kind: inner method of util
Returns:

The numeric id, or undefined if address is invalid

ParamDescription
address

The BURST address

util~convertBurstTimeToDate(burstTimestamp) ⇒

Converts a Burst/Block Time (seconds since genesis block) into Date

Kind: inner method of util
Returns:

Date

ParamDescription
burstTimestamp

The numeric Id

util~convertBurstTimeToEpochTime(burstTimestamp) ⇒

Converts a Burst/Block Time (seconds since genesis block) into Unix Epoch Time (milliseconds since 01.01.1970)

Kind: inner method of util
Returns:

Unix Epoch Time (milliseconds since 01.01.1970)

ParamDescription
burstTimestamp

The numeric Id

util~convertByteArrayToHexString(bytes, uppercase) ⇒ string

Converts byte array to hexadecimal string Inverse operation of [[convertHexStringToByteArray]]

Kind: inner method of util
Returns: string -

A hex string representing the byte array input

ParamDefaultDescription
bytes

The (unsigned) byte array to be converted

uppercasefalse

If true, converts hex string with uppercase characters (Default: false)

util~convertByteArrayToString(byteArray, startIndex, length) ⇒ string

Converts a byte array into string Inverse function [[convertStringToByteArray]]

Kind: inner method of util
Returns: string -

The converted string

ParamDefaultDescription
byteArray

The byte array to be converted

startIndex0

The starting index of array to be converted (Default: 0)

length

The number of bytes to be considered, iff startIndex is given. If null the byte array's length is considered

util~convertDateToBurstTime(date) ⇒

Converts a Date into Burst/Block Time (seconds since genesis block)

Kind: inner method of util
Returns:

The Burst Timestamp

ParamDescription
date

The date to be converted

util~convertHexEndianess(hexString) ⇒

Converts the endianess of a hex string. If string is little Endianess it turns into Big Endianess, and vice versa

Kind: inner method of util
Returns:

The converted string as hex string

ParamDescription
hexString

The hex string to be converted

util~convertHexStringToByteArray(hex) ⇒ Array.<number>

Converts an hexadecimal string to byte array

Kind: inner method of util
Returns: Array.<number> -

An byte array representing the hexadecimal input

ParamDescription
hex

The hexadecimal string to be converted

util~convertHexStringToDecString(hexStr) ⇒

Arbitrary length hexadecimal to decimal conversion https://stackoverflow.com/questions/21667377/javascript-hexadecimal-string-to-decimal-string

Kind: inner method of util
Returns:

A decimal string

ParamDescription
hexStr

A hexadecimal string

util~convertHexStringToString(hex) ⇒ string

Converts a Hexadecimally encoded string into String Inverse function [[convertStringToHexString]]

Kind: inner method of util
Returns: string -

The string represented by the Hex String

ParamDescription
hex

The Hex string to be converted

util~convertNQTStringToNumber(amount) ⇒

Helper method to convert a String to number

Kind: inner method of util
Returns:

A number expressed in Burst (not NQT)


Throws:

  • exception if argument is invalid

ParamDescription
amount

The amount in NQT

util~convertNumberToNQTString(n) ⇒

Helper method to Number to String(8 decimals) representation

Kind: inner method of util
Returns:

a NQT number string

ParamDescription
n

the number

util~convertNumericIdToAddress(numericId) ⇒

Encode a numeric id into BURST-XXXX-XXXX-XXXX-XXXXX

Kind: inner method of util
Returns:

the BURST address in Reed-Solomon encoding, or undefined if passed null, undefined

ParamDescription
numericId

The numeric Id

util~convertStringToByteArray(str) ⇒ Array.<number>

Converts a string into byte array Inverse function [[convertByteArrayToString]]

Kind: inner method of util
Returns: Array.<number> -

A byte array representing the string input

ParamDescription
str

The string to be converted

util~convertStringToHexString(str) ⇒ string

Converts/Encode a String into Hexadecimally encoded Inverse function [[convertHexStringToString]]

Kind: inner method of util
Returns: string -

The Hex String representing the input string

ParamDescription
str

The Hex string to be converted

util~isValid(address) ⇒ boolean

Check for valid Burst address (format: BURST-XXXX-XXXX-XXXX-XXXXX, XXXX-XXXX-XXXX-XXXXX)

Kind: inner method of util
Returns: boolean -

true, if is a valid address, else false

ParamTypeDescription
addressstring

The address

util~sumNQTStringToNumber(...nqts) ⇒

Sums various NQT values and returns in Burst

Kind: inner method of util
Returns:

The sum of all amounts in BURST

ParamDescription
...nqts

Variable amount list with NQT string

util

util.isValid ⇒ boolean

Check for valid Burst address (format: BURST-XXXX-XXXX-XXXX-XXXXX, XXXX-XXXX-XXXX-XXXXX)

Kind: static property of util
Returns: boolean -

true, if is a valid address, else false


Note: This is with prior quick check

ParamTypeDescription
addressstring

The address

util~convertAddressToNumericId(address) ⇒

Converts BURST-XXXX-XXXX-XXXX-XXXXX into numeric Id

Kind: inner method of util
Returns:

The numeric id, or undefined if address is invalid

ParamDescription
address

The BURST address

util~convertBurstTimeToDate(burstTimestamp) ⇒

Converts a Burst/Block Time (seconds since genesis block) into Date

Kind: inner method of util
Returns:

Date

ParamDescription
burstTimestamp

The numeric Id

util~convertBurstTimeToEpochTime(burstTimestamp) ⇒

Converts a Burst/Block Time (seconds since genesis block) into Unix Epoch Time (milliseconds since 01.01.1970)

Kind: inner method of util
Returns:

Unix Epoch Time (milliseconds since 01.01.1970)

ParamDescription
burstTimestamp

The numeric Id

util~convertByteArrayToHexString(bytes, uppercase) ⇒ string

Converts byte array to hexadecimal string Inverse operation of [[convertHexStringToByteArray]]

Kind: inner method of util
Returns: string -

A hex string representing the byte array input

ParamDefaultDescription
bytes

The (unsigned) byte array to be converted

uppercasefalse

If true, converts hex string with uppercase characters (Default: false)

util~convertByteArrayToString(byteArray, startIndex, length) ⇒ string

Converts a byte array into string Inverse function [[convertStringToByteArray]]

Kind: inner method of util
Returns: string -

The converted string

ParamDefaultDescription
byteArray

The byte array to be converted

startIndex0

The starting index of array to be converted (Default: 0)

length

The number of bytes to be considered, iff startIndex is given. If null the byte array's length is considered

util~convertDateToBurstTime(date) ⇒

Converts a Date into Burst/Block Time (seconds since genesis block)

Kind: inner method of util
Returns:

The Burst Timestamp

ParamDescription
date

The date to be converted

util~convertHexEndianess(hexString) ⇒

Converts the endianess of a hex string. If string is little Endianess it turns into Big Endianess, and vice versa

Kind: inner method of util
Returns:

The converted string as hex string

ParamDescription
hexString

The hex string to be converted

util~convertHexStringToByteArray(hex) ⇒ Array.<number>

Converts an hexadecimal string to byte array

Kind: inner method of util
Returns: Array.<number> -

An byte array representing the hexadecimal input

ParamDescription
hex

The hexadecimal string to be converted

util~convertHexStringToDecString(hexStr) ⇒

Arbitrary length hexadecimal to decimal conversion https://stackoverflow.com/questions/21667377/javascript-hexadecimal-string-to-decimal-string

Kind: inner method of util
Returns:

A decimal string

ParamDescription
hexStr

A hexadecimal string

util~convertHexStringToString(hex) ⇒ string

Converts a Hexadecimally encoded string into String Inverse function [[convertStringToHexString]]

Kind: inner method of util
Returns: string -

The string represented by the Hex String

ParamDescription
hex

The Hex string to be converted

util~convertNQTStringToNumber(amount) ⇒

Helper method to convert a String to number

Kind: inner method of util
Returns:

A number expressed in Burst (not NQT)


Throws:

  • exception if argument is invalid

ParamDescription
amount

The amount in NQT

util~convertNumberToNQTString(n) ⇒

Helper method to Number to String(8 decimals) representation

Kind: inner method of util
Returns:

a NQT number string

ParamDescription
n

the number

util~convertNumericIdToAddress(numericId) ⇒

Encode a numeric id into BURST-XXXX-XXXX-XXXX-XXXXX

Kind: inner method of util
Returns:

the BURST address in Reed-Solomon encoding, or undefined if passed null, undefined

ParamDescription
numericId

The numeric Id

util~convertStringToByteArray(str) ⇒ Array.<number>

Converts a string into byte array Inverse function [[convertByteArrayToString]]

Kind: inner method of util
Returns: Array.<number> -

A byte array representing the string input

ParamDescription
str

The string to be converted

util~convertStringToHexString(str) ⇒ string

Converts/Encode a String into Hexadecimally encoded Inverse function [[convertHexStringToString]]

Kind: inner method of util
Returns: string -

The Hex String representing the input string

ParamDescription
str

The Hex string to be converted

util~isValid(address) ⇒ boolean

Check for valid Burst address (format: BURST-XXXX-XXXX-XXXX-XXXXX, XXXX-XXXX-XXXX-XXXXX)

Kind: inner method of util
Returns: boolean -

true, if is a valid address, else false

ParamTypeDescription
addressstring

The address

util~sumNQTStringToNumber(...nqts) ⇒

Sums various NQT values and returns in Burst

Kind: inner method of util
Returns:

The sum of all amounts in BURST

ParamDescription
...nqts

Variable amount list with NQT string

util

util.isValid ⇒ boolean

Check for valid Burst address (format: BURST-XXXX-XXXX-XXXX-XXXXX, XXXX-XXXX-XXXX-XXXXX)

Kind: static property of util
Returns: boolean -

true, if is a valid address, else false


Note: This is with prior quick check

ParamTypeDescription
addressstring

The address

util~convertAddressToNumericId(address) ⇒

Converts BURST-XXXX-XXXX-XXXX-XXXXX into numeric Id

Kind: inner method of util
Returns:

The numeric id, or undefined if address is invalid

ParamDescription
address

The BURST address

util~convertBurstTimeToDate(burstTimestamp) ⇒

Converts a Burst/Block Time (seconds since genesis block) into Date

Kind: inner method of util
Returns:

Date

ParamDescription
burstTimestamp

The numeric Id

util~convertBurstTimeToEpochTime(burstTimestamp) ⇒

Converts a Burst/Block Time (seconds since genesis block) into Unix Epoch Time (milliseconds since 01.01.1970)

Kind: inner method of util
Returns:

Unix Epoch Time (milliseconds since 01.01.1970)

ParamDescription
burstTimestamp

The numeric Id

util~convertByteArrayToHexString(bytes, uppercase) ⇒ string

Converts byte array to hexadecimal string Inverse operation of [[convertHexStringToByteArray]]

Kind: inner method of util
Returns: string -

A hex string representing the byte array input

ParamDefaultDescription
bytes

The (unsigned) byte array to be converted

uppercasefalse

If true, converts hex string with uppercase characters (Default: false)

util~convertByteArrayToString(byteArray, startIndex, length) ⇒ string

Converts a byte array into string Inverse function [[convertStringToByteArray]]

Kind: inner method of util
Returns: string -

The converted string

ParamDefaultDescription
byteArray

The byte array to be converted

startIndex0

The starting index of array to be converted (Default: 0)

length

The number of bytes to be considered, iff startIndex is given. If null the byte array's length is considered

util~convertDateToBurstTime(date) ⇒

Converts a Date into Burst/Block Time (seconds since genesis block)

Kind: inner method of util
Returns:

The Burst Timestamp

ParamDescription
date

The date to be converted

util~convertHexEndianess(hexString) ⇒

Converts the endianess of a hex string. If string is little Endianess it turns into Big Endianess, and vice versa

Kind: inner method of util
Returns:

The converted string as hex string

ParamDescription
hexString

The hex string to be converted

util~convertHexStringToByteArray(hex) ⇒ Array.<number>

Converts an hexadecimal string to byte array

Kind: inner method of util
Returns: Array.<number> -

An byte array representing the hexadecimal input

ParamDescription
hex

The hexadecimal string to be converted

util~convertHexStringToDecString(hexStr) ⇒

Arbitrary length hexadecimal to decimal conversion https://stackoverflow.com/questions/21667377/javascript-hexadecimal-string-to-decimal-string

Kind: inner method of util
Returns:

A decimal string

ParamDescription
hexStr

A hexadecimal string

util~convertHexStringToString(hex) ⇒ string

Converts a Hexadecimally encoded string into String Inverse function [[convertStringToHexString]]

Kind: inner method of util
Returns: string -

The string represented by the Hex String

ParamDescription
hex

The Hex string to be converted

util~convertNQTStringToNumber(amount) ⇒

Helper method to convert a String to number

Kind: inner method of util
Returns:

A number expressed in Burst (not NQT)


Throws:

  • exception if argument is invalid

ParamDescription
amount

The amount in NQT

util~convertNumberToNQTString(n) ⇒

Helper method to Number to String(8 decimals) representation

Kind: inner method of util
Returns:

a NQT number string

ParamDescription
n

the number

util~convertNumericIdToAddress(numericId) ⇒

Encode a numeric id into BURST-XXXX-XXXX-XXXX-XXXXX

Kind: inner method of util
Returns:

the BURST address in Reed-Solomon encoding, or undefined if passed null, undefined

ParamDescription
numericId

The numeric Id

util~convertStringToByteArray(str) ⇒ Array.<number>

Converts a string into byte array Inverse function [[convertByteArrayToString]]

Kind: inner method of util
Returns: Array.<number> -

A byte array representing the string input

ParamDescription
str

The string to be converted

util~convertStringToHexString(str) ⇒ string

Converts/Encode a String into Hexadecimally encoded Inverse function [[convertHexStringToString]]

Kind: inner method of util
Returns: string -

The Hex String representing the input string

ParamDescription
str

The Hex string to be converted

util~isValid(address) ⇒ boolean

Check for valid Burst address (format: BURST-XXXX-XXXX-XXXX-XXXXX, XXXX-XXXX-XXXX-XXXXX)

Kind: inner method of util
Returns: boolean -

true, if is a valid address, else false

ParamTypeDescription
addressstring

The address

util~sumNQTStringToNumber(...nqts) ⇒

Sums various NQT values and returns in Burst

Kind: inner method of util
Returns:

The sum of all amounts in BURST

ParamDescription
...nqts

Variable amount list with NQT string

util

util.isValid ⇒ boolean

Check for valid Burst address (format: BURST-XXXX-XXXX-XXXX-XXXXX, XXXX-XXXX-XXXX-XXXXX)

Kind: static property of util
Returns: boolean -

true, if is a valid address, else false


Note: This is with prior quick check

ParamTypeDescription
addressstring

The address

util~convertAddressToNumericId(address) ⇒

Converts BURST-XXXX-XXXX-XXXX-XXXXX into numeric Id

Kind: inner method of util
Returns:

The numeric id, or undefined if address is invalid

ParamDescription
address

The BURST address

util~convertBurstTimeToDate(burstTimestamp) ⇒

Converts a Burst/Block Time (seconds since genesis block) into Date

Kind: inner method of util
Returns:

Date

ParamDescription
burstTimestamp

The numeric Id

util~convertBurstTimeToEpochTime(burstTimestamp) ⇒

Converts a Burst/Block Time (seconds since genesis block) into Unix Epoch Time (milliseconds since 01.01.1970)

Kind: inner method of util
Returns:

Unix Epoch Time (milliseconds since 01.01.1970)

ParamDescription
burstTimestamp

The numeric Id

util~convertByteArrayToHexString(bytes, uppercase) ⇒ string

Converts byte array to hexadecimal string Inverse operation of [[convertHexStringToByteArray]]

Kind: inner method of util
Returns: string -

A hex string representing the byte array input

ParamDefaultDescription
bytes

The (unsigned) byte array to be converted

uppercasefalse

If true, converts hex string with uppercase characters (Default: false)

util~convertByteArrayToString(byteArray, startIndex, length) ⇒ string

Converts a byte array into string Inverse function [[convertStringToByteArray]]

Kind: inner method of util
Returns: string -

The converted string

ParamDefaultDescription
byteArray

The byte array to be converted

startIndex0

The starting index of array to be converted (Default: 0)

length

The number of bytes to be considered, iff startIndex is given. If null the byte array's length is considered

util~convertDateToBurstTime(date) ⇒

Converts a Date into Burst/Block Time (seconds since genesis block)

Kind: inner method of util
Returns:

The Burst Timestamp

ParamDescription
date

The date to be converted

util~convertHexEndianess(hexString) ⇒

Converts the endianess of a hex string. If string is little Endianess it turns into Big Endianess, and vice versa

Kind: inner method of util
Returns:

The converted string as hex string

ParamDescription
hexString

The hex string to be converted

util~convertHexStringToByteArray(hex) ⇒ Array.<number>

Converts an hexadecimal string to byte array

Kind: inner method of util
Returns: Array.<number> -

An byte array representing the hexadecimal input

ParamDescription
hex

The hexadecimal string to be converted

util~convertHexStringToDecString(hexStr) ⇒

Arbitrary length hexadecimal to decimal conversion https://stackoverflow.com/questions/21667377/javascript-hexadecimal-string-to-decimal-string

Kind: inner method of util
Returns:

A decimal string

ParamDescription
hexStr

A hexadecimal string

util~convertHexStringToString(hex) ⇒ string

Converts a Hexadecimally encoded string into String Inverse function [[convertStringToHexString]]

Kind: inner method of util
Returns: string -

The string represented by the Hex String

ParamDescription
hex

The Hex string to be converted

util~convertNQTStringToNumber(amount) ⇒

Helper method to convert a String to number

Kind: inner method of util
Returns:

A number expressed in Burst (not NQT)


Throws:

  • exception if argument is invalid

ParamDescription
amount

The amount in NQT

util~convertNumberToNQTString(n) ⇒

Helper method to Number to String(8 decimals) representation

Kind: inner method of util
Returns:

a NQT number string

ParamDescription
n

the number

util~convertNumericIdToAddress(numericId) ⇒

Encode a numeric id into BURST-XXXX-XXXX-XXXX-XXXXX

Kind: inner method of util
Returns:

the BURST address in Reed-Solomon encoding, or undefined if passed null, undefined

ParamDescription
numericId

The numeric Id

util~convertStringToByteArray(str) ⇒ Array.<number>

Converts a string into byte array Inverse function [[convertByteArrayToString]]

Kind: inner method of util
Returns: Array.<number> -

A byte array representing the string input

ParamDescription
str

The string to be converted

util~convertStringToHexString(str) ⇒ string

Converts/Encode a String into Hexadecimally encoded Inverse function [[convertHexStringToString]]

Kind: inner method of util
Returns: string -

The Hex String representing the input string

ParamDescription
str

The Hex string to be converted

util~isValid(address) ⇒ boolean

Check for valid Burst address (format: BURST-XXXX-XXXX-XXXX-XXXXX, XXXX-XXXX-XXXX-XXXXX)

Kind: inner method of util
Returns: boolean -

true, if is a valid address, else false

ParamTypeDescription
addressstring

The address

util~sumNQTStringToNumber(...nqts) ⇒

Sums various NQT values and returns in Burst

Kind: inner method of util
Returns:

The sum of all amounts in BURST

ParamDescription
...nqts

Variable amount list with NQT string

util

util.isValid ⇒ boolean

Check for valid Burst address (format: BURST-XXXX-XXXX-XXXX-XXXXX, XXXX-XXXX-XXXX-XXXXX)

Kind: static property of util
Returns: boolean -

true, if is a valid address, else false


Note: This is with prior quick check

ParamTypeDescription
addressstring

The address

util~convertAddressToNumericId(address) ⇒

Converts BURST-XXXX-XXXX-XXXX-XXXXX into numeric Id

Kind: inner method of util
Returns:

The numeric id, or undefined if address is invalid

ParamDescription
address

The BURST address

util~convertBurstTimeToDate(burstTimestamp) ⇒

Converts a Burst/Block Time (seconds since genesis block) into Date

Kind: inner method of util
Returns:

Date

ParamDescription
burstTimestamp

The numeric Id

util~convertBurstTimeToEpochTime(burstTimestamp) ⇒

Converts a Burst/Block Time (seconds since genesis block) into Unix Epoch Time (milliseconds since 01.01.1970)

Kind: inner method of util
Returns:

Unix Epoch Time (milliseconds since 01.01.1970)

ParamDescription
burstTimestamp

The numeric Id

util~convertByteArrayToHexString(bytes, uppercase) ⇒ string

Converts byte array to hexadecimal string Inverse operation of [[convertHexStringToByteArray]]

Kind: inner method of util
Returns: string -

A hex string representing the byte array input

ParamDefaultDescription
bytes

The (unsigned) byte array to be converted

uppercasefalse

If true, converts hex string with uppercase characters (Default: false)

util~convertByteArrayToString(byteArray, startIndex, length) ⇒ string

Converts a byte array into string Inverse function [[convertStringToByteArray]]

Kind: inner method of util
Returns: string -

The converted string

ParamDefaultDescription
byteArray

The byte array to be converted

startIndex0

The starting index of array to be converted (Default: 0)

length

The number of bytes to be considered, iff startIndex is given. If null the byte array's length is considered

util~convertDateToBurstTime(date) ⇒

Converts a Date into Burst/Block Time (seconds since genesis block)

Kind: inner method of util
Returns:

The Burst Timestamp

ParamDescription
date

The date to be converted

util~convertHexEndianess(hexString) ⇒

Converts the endianess of a hex string. If string is little Endianess it turns into Big Endianess, and vice versa

Kind: inner method of util
Returns:

The converted string as hex string

ParamDescription
hexString

The hex string to be converted

util~convertHexStringToByteArray(hex) ⇒ Array.<number>

Converts an hexadecimal string to byte array

Kind: inner method of util
Returns: Array.<number> -

An byte array representing the hexadecimal input

ParamDescription
hex

The hexadecimal string to be converted

util~convertHexStringToDecString(hexStr) ⇒

Arbitrary length hexadecimal to decimal conversion https://stackoverflow.com/questions/21667377/javascript-hexadecimal-string-to-decimal-string

Kind: inner method of util
Returns:

A decimal string

ParamDescription
hexStr

A hexadecimal string

util~convertHexStringToString(hex) ⇒ string

Converts a Hexadecimally encoded string into String Inverse function [[convertStringToHexString]]

Kind: inner method of util
Returns: string -

The string represented by the Hex String

ParamDescription
hex

The Hex string to be converted

util~convertNQTStringToNumber(amount) ⇒

Helper method to convert a String to number

Kind: inner method of util
Returns:

A number expressed in Burst (not NQT)


Throws:

  • exception if argument is invalid

ParamDescription
amount

The amount in NQT

util~convertNumberToNQTString(n) ⇒

Helper method to Number to String(8 decimals) representation

Kind: inner method of util
Returns:

a NQT number string

ParamDescription
n

the number

util~convertNumericIdToAddress(numericId) ⇒

Encode a numeric id into BURST-XXXX-XXXX-XXXX-XXXXX

Kind: inner method of util
Returns:

the BURST address in Reed-Solomon encoding, or undefined if passed null, undefined

ParamDescription
numericId

The numeric Id

util~convertStringToByteArray(str) ⇒ Array.<number>

Converts a string into byte array Inverse function [[convertByteArrayToString]]

Kind: inner method of util
Returns: Array.<number> -

A byte array representing the string input

ParamDescription
str

The string to be converted

util~convertStringToHexString(str) ⇒ string

Converts/Encode a String into Hexadecimally encoded Inverse function [[convertHexStringToString]]

Kind: inner method of util
Returns: string -

The Hex String representing the input string

ParamDescription
str

The Hex string to be converted

util~isValid(address) ⇒ boolean

Check for valid Burst address (format: BURST-XXXX-XXXX-XXXX-XXXXX, XXXX-XXXX-XXXX-XXXXX)

Kind: inner method of util
Returns: boolean -

true, if is a valid address, else false

ParamTypeDescription
addressstring

The address

util~sumNQTStringToNumber(...nqts) ⇒

Sums various NQT values and returns in Burst

Kind: inner method of util
Returns:

The sum of all amounts in BURST

ParamDescription
...nqts

Variable amount list with NQT string

util

util.isValid ⇒ boolean

Check for valid Burst address (format: BURST-XXXX-XXXX-XXXX-XXXXX, XXXX-XXXX-XXXX-XXXXX)

Kind: static property of util
Returns: boolean -

true, if is a valid address, else false


Note: This is with prior quick check

ParamTypeDescription
addressstring

The address

util~convertAddressToNumericId(address) ⇒

Converts BURST-XXXX-XXXX-XXXX-XXXXX into numeric Id

Kind: inner method of util
Returns:

The numeric id, or undefined if address is invalid

ParamDescription
address

The BURST address

util~convertBurstTimeToDate(burstTimestamp) ⇒

Converts a Burst/Block Time (seconds since genesis block) into Date

Kind: inner method of util
Returns:

Date

ParamDescription
burstTimestamp

The numeric Id

util~convertBurstTimeToEpochTime(burstTimestamp) ⇒

Converts a Burst/Block Time (seconds since genesis block) into Unix Epoch Time (milliseconds since 01.01.1970)

Kind: inner method of util
Returns:

Unix Epoch Time (milliseconds since 01.01.1970)

ParamDescription
burstTimestamp

The numeric Id

util~convertByteArrayToHexString(bytes, uppercase) ⇒ string

Converts byte array to hexadecimal string Inverse operation of [[convertHexStringToByteArray]]

Kind: inner method of util
Returns: string -

A hex string representing the byte array input

ParamDefaultDescription
bytes

The (unsigned) byte array to be converted

uppercasefalse

If true, converts hex string with uppercase characters (Default: false)

util~convertByteArrayToString(byteArray, startIndex, length) ⇒ string

Converts a byte array into string Inverse function [[convertStringToByteArray]]

Kind: inner method of util
Returns: string -

The converted string

ParamDefaultDescription
byteArray

The byte array to be converted

startIndex0

The starting index of array to be converted (Default: 0)

length

The number of bytes to be considered, iff startIndex is given. If null the byte array's length is considered

util~convertDateToBurstTime(date) ⇒

Converts a Date into Burst/Block Time (seconds since genesis block)

Kind: inner method of util
Returns:

The Burst Timestamp

ParamDescription
date

The date to be converted

util~convertHexEndianess(hexString) ⇒

Converts the endianess of a hex string. If string is little Endianess it turns into Big Endianess, and vice versa

Kind: inner method of util
Returns:

The converted string as hex string

ParamDescription
hexString

The hex string to be converted

util~convertHexStringToByteArray(hex) ⇒ Array.<number>

Converts an hexadecimal string to byte array

Kind: inner method of util
Returns: Array.<number> -

An byte array representing the hexadecimal input

ParamDescription
hex

The hexadecimal string to be converted

util~convertHexStringToDecString(hexStr) ⇒

Arbitrary length hexadecimal to decimal conversion https://stackoverflow.com/questions/21667377/javascript-hexadecimal-string-to-decimal-string

Kind: inner method of util
Returns:

A decimal string

ParamDescription
hexStr

A hexadecimal string

util~convertHexStringToString(hex) ⇒ string

Converts a Hexadecimally encoded string into String Inverse function [[convertStringToHexString]]

Kind: inner method of util
Returns: string -

The string represented by the Hex String

ParamDescription
hex

The Hex string to be converted

util~convertNQTStringToNumber(amount) ⇒

Helper method to convert a String to number

Kind: inner method of util
Returns:

A number expressed in Burst (not NQT)


Throws:

  • exception if argument is invalid

ParamDescription
amount

The amount in NQT

util~convertNumberToNQTString(n) ⇒

Helper method to Number to String(8 decimals) representation

Kind: inner method of util
Returns:

a NQT number string

ParamDescription
n

the number

util~convertNumericIdToAddress(numericId) ⇒

Encode a numeric id into BURST-XXXX-XXXX-XXXX-XXXXX

Kind: inner method of util
Returns:

the BURST address in Reed-Solomon encoding, or undefined if passed null, undefined

ParamDescription
numericId

The numeric Id

util~convertStringToByteArray(str) ⇒ Array.<number>

Converts a string into byte array Inverse function [[convertByteArrayToString]]

Kind: inner method of util
Returns: Array.<number> -

A byte array representing the string input

ParamDescription
str

The string to be converted

util~convertStringToHexString(str) ⇒ string

Converts/Encode a String into Hexadecimally encoded Inverse function [[convertHexStringToString]]

Kind: inner method of util
Returns: string -

The Hex String representing the input string

ParamDescription
str

The Hex string to be converted

util~isValid(address) ⇒ boolean

Check for valid Burst address (format: BURST-XXXX-XXXX-XXXX-XXXXX, XXXX-XXXX-XXXX-XXXXX)

Kind: inner method of util
Returns: boolean -

true, if is a valid address, else false

ParamTypeDescription
addressstring

The address

util~sumNQTStringToNumber(...nqts) ⇒

Sums various NQT values and returns in Burst

Kind: inner method of util
Returns:

The sum of all amounts in BURST

ParamDescription
...nqts

Variable amount list with NQT string

util

util.isValid ⇒ boolean

Check for valid Burst address (format: BURST-XXXX-XXXX-XXXX-XXXXX, XXXX-XXXX-XXXX-XXXXX)

Kind: static property of util
Returns: boolean -

true, if is a valid address, else false


Note: This is with prior quick check

ParamTypeDescription
addressstring

The address

util~convertAddressToNumericId(address) ⇒

Converts BURST-XXXX-XXXX-XXXX-XXXXX into numeric Id

Kind: inner method of util
Returns:

The numeric id, or undefined if address is invalid

ParamDescription
address

The BURST address

util~convertBurstTimeToDate(burstTimestamp) ⇒

Converts a Burst/Block Time (seconds since genesis block) into Date

Kind: inner method of util
Returns:

Date

ParamDescription
burstTimestamp

The numeric Id

util~convertBurstTimeToEpochTime(burstTimestamp) ⇒

Converts a Burst/Block Time (seconds since genesis block) into Unix Epoch Time (milliseconds since 01.01.1970)

Kind: inner method of util
Returns:

Unix Epoch Time (milliseconds since 01.01.1970)

ParamDescription
burstTimestamp

The numeric Id

util~convertByteArrayToHexString(bytes, uppercase) ⇒ string

Converts byte array to hexadecimal string Inverse operation of [[convertHexStringToByteArray]]

Kind: inner method of util
Returns: string -

A hex string representing the byte array input

ParamDefaultDescription
bytes

The (unsigned) byte array to be converted

uppercasefalse

If true, converts hex string with uppercase characters (Default: false)

util~convertByteArrayToString(byteArray, startIndex, length) ⇒ string

Converts a byte array into string Inverse function [[convertStringToByteArray]]

Kind: inner method of util
Returns: string -

The converted string

ParamDefaultDescription
byteArray

The byte array to be converted

startIndex0

The starting index of array to be converted (Default: 0)

length

The number of bytes to be considered, iff startIndex is given. If null the byte array's length is considered

util~convertDateToBurstTime(date) ⇒

Converts a Date into Burst/Block Time (seconds since genesis block)

Kind: inner method of util
Returns:

The Burst Timestamp

ParamDescription
date

The date to be converted

util~convertHexEndianess(hexString) ⇒

Converts the endianess of a hex string. If string is little Endianess it turns into Big Endianess, and vice versa

Kind: inner method of util
Returns:

The converted string as hex string

ParamDescription
hexString

The hex string to be converted

util~convertHexStringToByteArray(hex) ⇒ Array.<number>

Converts an hexadecimal string to byte array

Kind: inner method of util
Returns: Array.<number> -

An byte array representing the hexadecimal input

ParamDescription
hex

The hexadecimal string to be converted

util~convertHexStringToDecString(hexStr) ⇒

Arbitrary length hexadecimal to decimal conversion https://stackoverflow.com/questions/21667377/javascript-hexadecimal-string-to-decimal-string

Kind: inner method of util
Returns:

A decimal string

ParamDescription
hexStr

A hexadecimal string

util~convertHexStringToString(hex) ⇒ string

Converts a Hexadecimally encoded string into String Inverse function [[convertStringToHexString]]

Kind: inner method of util
Returns: string -

The string represented by the Hex String

ParamDescription
hex

The Hex string to be converted

util~convertNQTStringToNumber(amount) ⇒

Helper method to convert a String to number

Kind: inner method of util
Returns:

A number expressed in Burst (not NQT)


Throws:

  • exception if argument is invalid

ParamDescription
amount

The amount in NQT

util~convertNumberToNQTString(n) ⇒

Helper method to Number to String(8 decimals) representation

Kind: inner method of util
Returns:

a NQT number string

ParamDescription
n

the number

util~convertNumericIdToAddress(numericId) ⇒

Encode a numeric id into BURST-XXXX-XXXX-XXXX-XXXXX

Kind: inner method of util
Returns:

the BURST address in Reed-Solomon encoding, or undefined if passed null, undefined

ParamDescription
numericId

The numeric Id

util~convertStringToByteArray(str) ⇒ Array.<number>

Converts a string into byte array Inverse function [[convertByteArrayToString]]

Kind: inner method of util
Returns: Array.<number> -

A byte array representing the string input

ParamDescription
str

The string to be converted

util~convertStringToHexString(str) ⇒ string

Converts/Encode a String into Hexadecimally encoded Inverse function [[convertHexStringToString]]

Kind: inner method of util
Returns: string -

The Hex String representing the input string

ParamDescription
str

The Hex string to be converted

util~isValid(address) ⇒ boolean

Check for valid Burst address (format: BURST-XXXX-XXXX-XXXX-XXXXX, XXXX-XXXX-XXXX-XXXXX)

Kind: inner method of util
Returns: boolean -

true, if is a valid address, else false

ParamTypeDescription
addressstring

The address

util~sumNQTStringToNumber(...nqts) ⇒

Sums various NQT values and returns in Burst

Kind: inner method of util
Returns:

The sum of all amounts in BURST

ParamDescription
...nqts

Variable amount list with NQT string

util

util.isValid ⇒ boolean

Check for valid Burst address (format: BURST-XXXX-XXXX-XXXX-XXXXX, XXXX-XXXX-XXXX-XXXXX)

Kind: static property of util
Returns: boolean -

true, if is a valid address, else false


Note: This is with prior quick check

ParamTypeDescription
addressstring

The address

util~convertAddressToNumericId(address) ⇒

Converts BURST-XXXX-XXXX-XXXX-XXXXX into numeric Id

Kind: inner method of util
Returns:

The numeric id, or undefined if address is invalid

ParamDescription
address

The BURST address

util~convertBurstTimeToDate(burstTimestamp) ⇒

Converts a Burst/Block Time (seconds since genesis block) into Date

Kind: inner method of util
Returns:

Date

ParamDescription
burstTimestamp

The numeric Id

util~convertBurstTimeToEpochTime(burstTimestamp) ⇒

Converts a Burst/Block Time (seconds since genesis block) into Unix Epoch Time (milliseconds since 01.01.1970)

Kind: inner method of util
Returns:

Unix Epoch Time (milliseconds since 01.01.1970)

ParamDescription
burstTimestamp

The numeric Id

util~convertByteArrayToHexString(bytes, uppercase) ⇒ string

Converts byte array to hexadecimal string Inverse operation of [[convertHexStringToByteArray]]

Kind: inner method of util
Returns: string -

A hex string representing the byte array input

ParamDefaultDescription
bytes

The (unsigned) byte array to be converted

uppercasefalse

If true, converts hex string with uppercase characters (Default: false)

util~convertByteArrayToString(byteArray, startIndex, length) ⇒ string

Converts a byte array into string Inverse function [[convertStringToByteArray]]

Kind: inner method of util
Returns: string -

The converted string

ParamDefaultDescription
byteArray

The byte array to be converted

startIndex0

The starting index of array to be converted (Default: 0)

length

The number of bytes to be considered, iff startIndex is given. If null the byte array's length is considered

util~convertDateToBurstTime(date) ⇒

Converts a Date into Burst/Block Time (seconds since genesis block)

Kind: inner method of util
Returns:

The Burst Timestamp

ParamDescription
date

The date to be converted

util~convertHexEndianess(hexString) ⇒

Converts the endianess of a hex string. If string is little Endianess it turns into Big Endianess, and vice versa

Kind: inner method of util
Returns:

The converted string as hex string

ParamDescription
hexString

The hex string to be converted

util~convertHexStringToByteArray(hex) ⇒ Array.<number>

Converts an hexadecimal string to byte array

Kind: inner method of util
Returns: Array.<number> -

An byte array representing the hexadecimal input

ParamDescription
hex

The hexadecimal string to be converted

util~convertHexStringToDecString(hexStr) ⇒

Arbitrary length hexadecimal to decimal conversion https://stackoverflow.com/questions/21667377/javascript-hexadecimal-string-to-decimal-string

Kind: inner method of util
Returns:

A decimal string

ParamDescription
hexStr

A hexadecimal string

util~convertHexStringToString(hex) ⇒ string

Converts a Hexadecimally encoded string into String Inverse function [[convertStringToHexString]]

Kind: inner method of util
Returns: string -

The string represented by the Hex String

ParamDescription
hex

The Hex string to be converted

util~convertNQTStringToNumber(amount) ⇒

Helper method to convert a String to number

Kind: inner method of util
Returns:

A number expressed in Burst (not NQT)


Throws:

  • exception if argument is invalid

ParamDescription
amount

The amount in NQT

util~convertNumberToNQTString(n) ⇒

Helper method to Number to String(8 decimals) representation

Kind: inner method of util
Returns:

a NQT number string

ParamDescription
n

the number

util~convertNumericIdToAddress(numericId) ⇒

Encode a numeric id into BURST-XXXX-XXXX-XXXX-XXXXX

Kind: inner method of util
Returns:

the BURST address in Reed-Solomon encoding, or undefined if passed null, undefined

ParamDescription
numericId

The numeric Id

util~convertStringToByteArray(str) ⇒ Array.<number>

Converts a string into byte array Inverse function [[convertByteArrayToString]]

Kind: inner method of util
Returns: Array.<number> -

A byte array representing the string input

ParamDescription
str

The string to be converted

util~convertStringToHexString(str) ⇒ string

Converts/Encode a String into Hexadecimally encoded Inverse function [[convertHexStringToString]]

Kind: inner method of util
Returns: string -

The Hex String representing the input string

ParamDescription
str

The Hex string to be converted

util~isValid(address) ⇒ boolean

Check for valid Burst address (format: BURST-XXXX-XXXX-XXXX-XXXXX, XXXX-XXXX-XXXX-XXXXX)

Kind: inner method of util
Returns: boolean -

true, if is a valid address, else false

ParamTypeDescription
addressstring

The address

util~sumNQTStringToNumber(...nqts) ⇒

Sums various NQT values and returns in Burst

Kind: inner method of util
Returns:

The sum of all amounts in BURST

ParamDescription
...nqts

Variable amount list with NQT string

util

util.isValid ⇒ boolean

Check for valid Burst address (format: BURST-XXXX-XXXX-XXXX-XXXXX, XXXX-XXXX-XXXX-XXXXX)

Kind: static property of util
Returns: boolean -

true, if is a valid address, else false


Note: This is with prior quick check

ParamTypeDescription
addressstring

The address

util~convertAddressToNumericId(address) ⇒

Converts BURST-XXXX-XXXX-XXXX-XXXXX into numeric Id

Kind: inner method of util
Returns:

The numeric id, or undefined if address is invalid

ParamDescription
address

The BURST address

util~convertBurstTimeToDate(burstTimestamp) ⇒

Converts a Burst/Block Time (seconds since genesis block) into Date

Kind: inner method of util
Returns:

Date

ParamDescription
burstTimestamp

The numeric Id

util~convertBurstTimeToEpochTime(burstTimestamp) ⇒

Converts a Burst/Block Time (seconds since genesis block) into Unix Epoch Time (milliseconds since 01.01.1970)

Kind: inner method of util
Returns:

Unix Epoch Time (milliseconds since 01.01.1970)

ParamDescription
burstTimestamp

The numeric Id

util~convertByteArrayToHexString(bytes, uppercase) ⇒ string

Converts byte array to hexadecimal string Inverse operation of [[convertHexStringToByteArray]]

Kind: inner method of util
Returns: string -

A hex string representing the byte array input

ParamDefaultDescription
bytes

The (unsigned) byte array to be converted

uppercasefalse

If true, converts hex string with uppercase characters (Default: false)

util~convertByteArrayToString(byteArray, startIndex, length) ⇒ string

Converts a byte array into string Inverse function [[convertStringToByteArray]]

Kind: inner method of util
Returns: string -

The converted string

ParamDefaultDescription
byteArray

The byte array to be converted

startIndex0

The starting index of array to be converted (Default: 0)

length

The number of bytes to be considered, iff startIndex is given. If null the byte array's length is considered

util~convertDateToBurstTime(date) ⇒

Converts a Date into Burst/Block Time (seconds since genesis block)

Kind: inner method of util
Returns:

The Burst Timestamp

ParamDescription
date

The date to be converted

util~convertHexEndianess(hexString) ⇒

Converts the endianess of a hex string. If string is little Endianess it turns into Big Endianess, and vice versa

Kind: inner method of util
Returns:

The converted string as hex string

ParamDescription
hexString

The hex string to be converted

util~convertHexStringToByteArray(hex) ⇒ Array.<number>

Converts an hexadecimal string to byte array

Kind: inner method of util
Returns: Array.<number> -

An byte array representing the hexadecimal input

ParamDescription
hex

The hexadecimal string to be converted

util~convertHexStringToDecString(hexStr) ⇒

Arbitrary length hexadecimal to decimal conversion https://stackoverflow.com/questions/21667377/javascript-hexadecimal-string-to-decimal-string

Kind: inner method of util
Returns:

A decimal string

ParamDescription
hexStr

A hexadecimal string

util~convertHexStringToString(hex) ⇒ string

Converts a Hexadecimally encoded string into String Inverse function [[convertStringToHexString]]

Kind: inner method of util
Returns: string -

The string represented by the Hex String

ParamDescription
hex

The Hex string to be converted

util~convertNQTStringToNumber(amount) ⇒

Helper method to convert a String to number

Kind: inner method of util
Returns:

A number expressed in Burst (not NQT)


Throws:

  • exception if argument is invalid

ParamDescription
amount

The amount in NQT

util~convertNumberToNQTString(n) ⇒

Helper method to Number to String(8 decimals) representation

Kind: inner method of util
Returns:

a NQT number string

ParamDescription
n

the number

util~convertNumericIdToAddress(numericId) ⇒

Encode a numeric id into BURST-XXXX-XXXX-XXXX-XXXXX

Kind: inner method of util
Returns:

the BURST address in Reed-Solomon encoding, or undefined if passed null, undefined

ParamDescription
numericId

The numeric Id

util~convertStringToByteArray(str) ⇒ Array.<number>

Converts a string into byte array Inverse function [[convertByteArrayToString]]

Kind: inner method of util
Returns: Array.<number> -

A byte array representing the string input

ParamDescription
str

The string to be converted

util~convertStringToHexString(str) ⇒ string

Converts/Encode a String into Hexadecimally encoded Inverse function [[convertHexStringToString]]

Kind: inner method of util
Returns: string -

The Hex String representing the input string

ParamDescription
str

The Hex string to be converted

util~isValid(address) ⇒ boolean

Check for valid Burst address (format: BURST-XXXX-XXXX-XXXX-XXXXX, XXXX-XXXX-XXXX-XXXXX)

Kind: inner method of util
Returns: boolean -

true, if is a valid address, else false

ParamTypeDescription
addressstring

The address

util~sumNQTStringToNumber(...nqts) ⇒

Sums various NQT values and returns in Burst

Kind: inner method of util
Returns:

The sum of all amounts in BURST

ParamDescription
...nqts

Variable amount list with NQT string

util

util.isValid ⇒ boolean

Check for valid Burst address (format: BURST-XXXX-XXXX-XXXX-XXXXX, XXXX-XXXX-XXXX-XXXXX)

Kind: static property of util
Returns: boolean -

true, if is a valid address, else false


Note: This is with prior quick check

ParamTypeDescription
addressstring

The address

util~convertAddressToNumericId(address) ⇒

Converts BURST-XXXX-XXXX-XXXX-XXXXX into numeric Id

Kind: inner method of util
Returns:

The numeric id, or undefined if address is invalid

ParamDescription
address

The BURST address

util~convertBurstTimeToDate(burstTimestamp) ⇒

Converts a Burst/Block Time (seconds since genesis block) into Date

Kind: inner method of util
Returns:

Date

ParamDescription
burstTimestamp

The numeric Id

util~convertBurstTimeToEpochTime(burstTimestamp) ⇒

Converts a Burst/Block Time (seconds since genesis block) into Unix Epoch Time (milliseconds since 01.01.1970)

Kind: inner method of util
Returns:

Unix Epoch Time (milliseconds since 01.01.1970)

ParamDescription
burstTimestamp

The numeric Id

util~convertByteArrayToHexString(bytes, uppercase) ⇒ string

Converts byte array to hexadecimal string Inverse operation of [[convertHexStringToByteArray]]

Kind: inner method of util
Returns: string -

A hex string representing the byte array input

ParamDefaultDescription
bytes

The (unsigned) byte array to be converted

uppercasefalse

If true, converts hex string with uppercase characters (Default: false)

util~convertByteArrayToString(byteArray, startIndex, length) ⇒ string

Converts a byte array into string Inverse function [[convertStringToByteArray]]

Kind: inner method of util
Returns: string -

The converted string

ParamDefaultDescription
byteArray

The byte array to be converted

startIndex0

The starting index of array to be converted (Default: 0)

length

The number of bytes to be considered, iff startIndex is given. If null the byte array's length is considered

util~convertDateToBurstTime(date) ⇒

Converts a Date into Burst/Block Time (seconds since genesis block)

Kind: inner method of util
Returns:

The Burst Timestamp

ParamDescription
date

The date to be converted

util~convertHexEndianess(hexString) ⇒

Converts the endianess of a hex string. If string is little Endianess it turns into Big Endianess, and vice versa

Kind: inner method of util
Returns:

The converted string as hex string

ParamDescription
hexString

The hex string to be converted

util~convertHexStringToByteArray(hex) ⇒ Array.<number>

Converts an hexadecimal string to byte array

Kind: inner method of util
Returns: Array.<number> -

An byte array representing the hexadecimal input

ParamDescription
hex

The hexadecimal string to be converted

util~convertHexStringToDecString(hexStr) ⇒

Arbitrary length hexadecimal to decimal conversion https://stackoverflow.com/questions/21667377/javascript-hexadecimal-string-to-decimal-string

Kind: inner method of util
Returns:

A decimal string

ParamDescription
hexStr

A hexadecimal string

util~convertHexStringToString(hex) ⇒ string

Converts a Hexadecimally encoded string into String Inverse function [[convertStringToHexString]]

Kind: inner method of util
Returns: string -

The string represented by the Hex String

ParamDescription
hex

The Hex string to be converted

util~convertNQTStringToNumber(amount) ⇒

Helper method to convert a String to number

Kind: inner method of util
Returns:

A number expressed in Burst (not NQT)


Throws:

  • exception if argument is invalid

ParamDescription
amount

The amount in NQT

util~convertNumberToNQTString(n) ⇒

Helper method to Number to String(8 decimals) representation

Kind: inner method of util
Returns:

a NQT number string

ParamDescription
n

the number

util~convertNumericIdToAddress(numericId) ⇒

Encode a numeric id into BURST-XXXX-XXXX-XXXX-XXXXX

Kind: inner method of util
Returns:

the BURST address in Reed-Solomon encoding, or undefined if passed null, undefined

ParamDescription
numericId

The numeric Id

util~convertStringToByteArray(str) ⇒ Array.<number>

Converts a string into byte array Inverse function [[convertByteArrayToString]]

Kind: inner method of util
Returns: Array.<number> -

A byte array representing the string input

ParamDescription
str

The string to be converted

util~convertStringToHexString(str) ⇒ string

Converts/Encode a String into Hexadecimally encoded Inverse function [[convertHexStringToString]]

Kind: inner method of util
Returns: string -

The Hex String representing the input string

ParamDescription
str

The Hex string to be converted

util~isValid(address) ⇒ boolean

Check for valid Burst address (format: BURST-XXXX-XXXX-XXXX-XXXXX, XXXX-XXXX-XXXX-XXXXX)

Kind: inner method of util
Returns: boolean -

true, if is a valid address, else false

ParamTypeDescription
addressstring

The address

util~sumNQTStringToNumber(...nqts) ⇒

Sums various NQT values and returns in Burst

Kind: inner method of util
Returns:

The sum of all amounts in BURST

ParamDescription
...nqts

Variable amount list with NQT string

Keywords

FAQs

Package last updated on 09 May 2020

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc