UNPKG

1.64 kBTypeScriptView Raw
1/// <reference types="node" />
2import { BigNumber } from "bignumber.js";
3import { ERC20_CLEAR_SIGNED_SELECTORS, ERC721_CLEAR_SIGNED_SELECTORS, ERC1155_CLEAR_SIGNED_SELECTORS } from "@ledgerhq/evm-tools/selectors/index";
4import { LedgerEthTransactionResolution } from "./services/types";
5export { ERC20_CLEAR_SIGNED_SELECTORS, ERC721_CLEAR_SIGNED_SELECTORS, ERC1155_CLEAR_SIGNED_SELECTORS, };
6export declare const padHexString: (str: string) => string;
7export declare function splitPath(path: string): number[];
8export declare function hexBuffer(str: string): Buffer;
9export declare function maybeHexBuffer(str: string | null | undefined): Buffer | null | undefined;
10export declare const decodeTxInfo: (rawTx: Buffer) => {
11 decodedTx: any;
12 txType: number | null;
13 chainId: BigNumber;
14 chainIdTruncated: number;
15 vrsOffset: number;
16};
17/**
18 * @ignore for the README
19 *
20 * Helper to convert an integer as a hexadecimal string with the right amount of digits
21 * to respect the number of bytes given as parameter
22 *
23 * @param int Integer
24 * @param bytes Number of bytes it should be represented as (1 byte = 2 caraters)
25 * @returns The given integer as an hexa string padded with the right number of 0
26 */
27export declare const intAsHexBytes: (int: number, bytes: number) => string;
28export declare const tokenSelectors: ERC20_CLEAR_SIGNED_SELECTORS[];
29export declare const nftSelectors: (ERC721_CLEAR_SIGNED_SELECTORS | ERC1155_CLEAR_SIGNED_SELECTORS)[];
30export declare const mergeResolutions: (resolutionsArray: Partial<LedgerEthTransactionResolution>[]) => LedgerEthTransactionResolution;
31//# sourceMappingURL=utils.d.ts.map
\No newline at end of file