UNPKG

vasku

Version:

TVM-Solidity contract development framework

47 lines 1.08 kB
import { type AbiContract } from '@eversdk/core'; /** * Add `0x` to string or number * @param number * @example * x0('123') * @return * '0x123' */ export declare function x0(number: string | number | bigint): string; /** * Convert abi to hex * @param abi * @example * abiToHex('{ABI ver...') * @return * '7b0a0922...' */ export declare function abiToHex(abi: AbiContract): string; /** * Convert string to hex * @param string * @example * stringToHex('XYZ123') * @return * '58595a313233' */ export declare function stringToHex(string: string): string; /** * Convert array of strings to hex. Actual for string[] or bytes[] parameter in Solidity * @param strings * @example * stringsToHex(['XYZ123', 'ABC456']) * @return * ['58595a313233', '414243343536'] */ export declare function stringsToHex(strings: string[]): string[]; /** * Convert number to hex * @param number * @example * numberToHex(1_000_000_000) * @return * '0x3b9aca00' */ export declare function numberToHex(number: number): string; //# sourceMappingURL=hex.d.ts.map