@aeternity/aepp-sdk
Version:
SDK for the æternity blockchain
54 lines (37 loc) • 1.77 kB
Markdown
<a id="module_@aeternity/aepp-sdk/es/utils/bytes"></a>
## /aepp-sdk/es/utils/bytes
Bytes module
**Example**
```js
import * as Crypto from '@aeternity/aepp-sdk/es/utils/bytes'
```
* [/aepp-sdk/es/utils/bytes](#module_/aepp-sdk/es/utils/bytes)
* [.leftPad(length, inputBuffer)](#module_/aepp-sdk/es/utils/bytes.leftPad) ⇒
* [.rightPad(length, inputBuffer)](#module_/aepp-sdk/es/utils/bytes.rightPad) ⇒
* [.bigNumberToByteArray(x)](#module_/aepp-sdk/es/utils/bytes.bigNumberToByteArray) ⇒
<a id="module_@aeternity/aepp-sdk/es/utils/bytes.leftPad"></a>
### /aepp-sdk/es/utils/bytes.leftPad(length, inputBuffer) ⇒
Left pad the input data with 0 bytes
**Kind**: static method of [`/aepp-sdk/es/utils/bytes`](#module_/aepp-sdk/es/utils/bytes)
**Returns**: the padded data
| Param | Description |
| --- | --- |
| length | to pad to |
| inputBuffer | data to pad |
<a id="module_@aeternity/aepp-sdk/es/utils/bytes.rightPad"></a>
### /aepp-sdk/es/utils/bytes.rightPad(length, inputBuffer) ⇒
Right pad the input data with 0 bytes
**Kind**: static method of [`/aepp-sdk/es/utils/bytes`](#module_/aepp-sdk/es/utils/bytes)
**Returns**: the padded data
| Param | Description |
| --- | --- |
| length | to pad to |
| inputBuffer | data to pad |
<a id="module_@aeternity/aepp-sdk/es/utils/bytes.bigNumberToByteArray"></a>
### /aepp-sdk/es/utils/bytes.bigNumberToByteArray(x) ⇒
Convert bignumber to byte array
**Kind**: static method of [`/aepp-sdk/es/utils/bytes`](#module_/aepp-sdk/es/utils/bytes)
**Returns**: Buffer
| Param | Description |
| --- | --- |
| x | bignumber instance |