UNPKG

924 BTypeScriptView Raw
1declare module 'uint8arrays' {
2 export function compare(a: Uint8Array, b: Uint8Array): 0 | 1 | -1
3 export function concat(arrays: Array<ArrayLike<number>>, length?: number | undefined): Uint8Array
4 export type SupportedEncodings =
5 | 'utf8'
6 | 'utf-8'
7 | 'hex'
8 | 'ascii'
9 | 'base10'
10 | 'base16'
11 | 'base16upper'
12 | 'base58btc'
13 | 'base64'
14 | 'base64url'
15 | 'base64pad'
16 export function fromString(string: string, encoding?: SupportedEncodings | undefined): Uint8Array
17 export function toString(array: Uint8Array, encoding?: SupportedEncodings | undefined): string
18}
19
20declare module 'multiformats' {
21 declare namespace varint {
22 export function decode(data: Uint8Array, offset?: number | undefined): [number, number]
23 export function encodeTo(int: number, target: Uint8Array, offset?: number | undefined): Uint8Array
24 export function encodingLength(int: number): number
25 }
26}
27
\No newline at end of file