Methods
(inner) addHexPrefix(msg)
Add hex prefix to msg
Parameters:
Name | Type | Description |
---|---|---|
msg |
string | a msg string |
- Source:
(inner) bufferToHex(buf, withPrefix)
Convert byte buffer to hex string
Parameters:
Name | Type | Default | Description |
---|---|---|---|
buf |
Buffer | byte buffer | |
withPrefix |
boolean | true | whether or not to add "0x" hex prefix |
- Source:
(inner) concatHex(…hexStrings)
Concatenate hex string
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
hexStrings |
string |
<repeatable> |
zero or more hex strings to concatenate |
- Source:
(inner) etherToWei(amount)
Convert ether to wei
Parameters:
Name | Type | Description |
---|---|---|
amount |
number | the amount in ether |
- Source:
(inner) hexToBuffer(v)
Attempts to turn a value into a `Buffer`. As input it supports `Buffer`, `String`, `Number`, null/undefined, `BN` and other objects with a `toArray()` method.
Parameters:
Name | Type | Description |
---|---|---|
v |
* | the value |
- Source:
(inner) removeHexPrefix(msg)
Remove hex prefix from msg
Parameters:
Name | Type | Description |
---|---|---|
msg |
string | a msg string |
- Source:
(inner) weiToEther(amount)
Convert wei to ether
Parameters:
Name | Type | Description |
---|---|---|
amount |
number | the amount in wei |
- Source: