arrayify
arrayify(
value,options?):Uint8Array
Defined in: utils/bytes.ts:184
Converts DataHexStringOrArrayish to a Uint8Array
Same as ethers.utils.arrayify
Parameters
Section titled “Parameters”number | bigint | BytesLike | Hexable
the value to convert to a Uint8Array
options?
Section titled “options?”options to use when converting the value to a Uint8Array
Returns
Section titled “Returns”Uint8Array
the value represented as a Uint8Array
Examples
Section titled “Examples”arrayify(1);// Uint8Array(1) [ 1 ]arrayify(0x1234);// Uint8Array(2) [ 18, 52 ]arrayify('0x1', { hexPad: 'right' });// Uint8Array(1) [ 16 ]