1 | export declare type Input = string | number | bigint | Uint8Array | Array<Input> | null | undefined;
|
2 | export declare type NestedUint8Array = Array<Uint8Array | NestedUint8Array>;
|
3 | export interface Decoded {
|
4 | data: Uint8Array | NestedUint8Array;
|
5 | remainder: Uint8Array;
|
6 | }
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 | export declare function encode(input: Input): Uint8Array;
|
15 |
|
16 |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 | export declare function decode(input: Input, stream?: false): Uint8Array | NestedUint8Array;
|
22 | export declare function decode(input: Input, stream?: true): Decoded;
|
23 | declare function bytesToHex(uint8a: Uint8Array): string;
|
24 | declare function hexToBytes(hex: string): Uint8Array;
|
25 |
|
26 | declare function concatBytes(...arrays: Uint8Array[]): Uint8Array;
|
27 | declare function utf8ToBytes(utf: string): Uint8Array;
|
28 | export declare const utils: {
|
29 | bytesToHex: typeof bytesToHex;
|
30 | concatBytes: typeof concatBytes;
|
31 | hexToBytes: typeof hexToBytes;
|
32 | utf8ToBytes: typeof utf8ToBytes;
|
33 | };
|
34 | declare const RLP: {
|
35 | encode: typeof encode;
|
36 | decode: typeof decode;
|
37 | };
|
38 | export default RLP;
|