UNPKG

800 BTypeScriptView Raw
1import type { U8aLike } from '../types.js';
2/** @internal */
3export declare const U8A_WRAP_ETHEREUM: Uint8Array;
4/** @internal */
5export declare const U8A_WRAP_PREFIX: Uint8Array;
6/** @internal */
7export declare const U8A_WRAP_POSTFIX: Uint8Array;
8/** @internal */
9export declare function u8aIsWrapped(u8a: Uint8Array, withEthereum: boolean): boolean;
10/**
11 * @name u8aUnwrapBytes
12 * @description Removes all <Bytes>...</Bytes> wrappers from the supplied value
13 */
14export declare function u8aUnwrapBytes(bytes: U8aLike): Uint8Array;
15/**
16 * @name u8aWrapBytes
17 * @description
18 * Adds a <Bytes>...</Bytes> wrapper to the supplied value, if
19 * - We don't already have a Bytes wrapper
20 * - The message is not an Ethereum-style message
21 */
22export declare function u8aWrapBytes(bytes: U8aLike): Uint8Array;