ethers.js/packages/bytes/lib.esm/index.d.ts

40 lines
1.8 KiB
TypeScript
Raw Normal View History

2019-05-15 01:48:48 +03:00
export declare type Bytes = ArrayLike<number>;
export declare type BytesLike = Bytes | string;
export declare type DataOptions = {
allowMissingPrefix?: boolean;
2019-09-28 09:36:19 +03:00
hexPad?: "left" | "right" | null;
2019-05-15 01:48:48 +03: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;
2021-03-30 22:22:45 +03:00
export declare function concat(items: ReadonlyArray<BytesLike>): Uint8Array;
2019-05-15 01:48:48 +03:00
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;
2021-03-30 22:22:45 +03:00
export declare function hexConcat(items: ReadonlyArray<BytesLike>): string;
2019-05-15 01:48:48 +03:00
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 11:19:21 +03:00
export declare function joinSignature(signature: SignatureLike): string;
//# sourceMappingURL=index.d.ts.map