Bytes
Namespace: Bytes
Table of contents
Variables
Variables
from
• from: (data: Uint8Array | Bytes | (number | bigint | UInt8)[]) => Bytes
Type declaration
▸ (data): Bytes
Coerce the input to Bytes.
Inputs smaller than this.size are padded with zero bytes.
Parameters
| Name | Type |
|---|---|
data | Uint8Array | Bytes | (number | bigint | UInt8)[] |
Returns
Bytes
Defined in
lib/provable-types/provable-types.ts:19
fromHex
• fromHex: (xs: string) => Bytes
Type declaration
▸ (xs): Bytes
Create Bytes from a hex string.
Inputs smaller than this.size are padded with zero bytes.
Parameters
| Name | Type |
|---|---|
xs | string |
Returns
Bytes
Defined in
lib/provable-types/provable-types.ts:20
fromString
• fromString: (s: string) => Bytes
Type declaration
▸ (s): Bytes
Create Bytes from a string.
Inputs smaller than this.size are padded with zero bytes.
Parameters
| Name | Type |
|---|---|
s | string |
Returns
Bytes