2019-05-14 18:48:48 -04:00
|
|
|
export declare type Bytes = ArrayLike<number>;
|
|
|
|
export declare type BytesLike = Bytes | string;
|
|
|
|
export declare type DataOptions = {
|
|
|
|
allowMissingPrefix?: boolean;
|
2019-09-28 02:36:19 -04:00
|
|
|
hexPad?: "left" | "right" | null;
|
2019-05-14 18:48:48 -04:00
|
|
|
};
|
|
|
|
export interface Hexable {
|
|
|
|
toHexString(): string;
|
|
|
|
}
|
|
|
|
export declare type SignatureLike = {
|
|
|
|
r: string;
|
|
|
|
s?: string;
|
|
|
|
_vs?: string;
|
|
|
|
recoveryParam?: number;
|
|
|
|
v?: number;
|
|
|
|
} | BytesLike;
|
|
|
|
export interface Signature {
|
|
|
|
r: string;
|
|
|
|
s: string;
|
|
|
|
_vs: string;
|
|
|
|
recoveryParam: number;
|
|
|
|
v: number;
|
|
|
|
}
|
|
|
|
export declare function isBytesLike(value: any): value is BytesLike;
|
|
|
|
export declare function isBytes(value: any): value is Bytes;
|
|
|
|
export declare function arrayify(value: BytesLike | Hexable | number, options?: DataOptions): Uint8Array;
|
|
|
|
export declare function concat(items: Array<BytesLike>): Uint8Array;
|
|
|
|
export declare function stripZeros(value: BytesLike): Uint8Array;
|
|
|
|
export declare function zeroPad(value: BytesLike, length: number): Uint8Array;
|
|
|
|
export declare function isHexString(value: any, length?: number): boolean;
|
|
|
|
export declare function hexlify(value: BytesLike | Hexable | number, options?: DataOptions): string;
|
|
|
|
export declare function hexDataLength(data: BytesLike): number;
|
|
|
|
export declare function hexDataSlice(data: BytesLike, offset: number, endOffset?: number): string;
|
|
|
|
export declare function hexConcat(items: Array<BytesLike>): string;
|
|
|
|
export declare function hexValue(value: BytesLike | Hexable | number): string;
|
|
|
|
export declare function hexStripZeros(value: BytesLike): string;
|
|
|
|
export declare function hexZeroPad(value: BytesLike, length: number): string;
|
|
|
|
export declare function splitSignature(signature: SignatureLike): Signature;
|
2020-01-10 03:19:21 -05:00
|
|
|
export declare function joinSignature(signature: SignatureLike): string;
|