UNPKG

ccxt

Version:

A JavaScript / TypeScript / Python / C# / PHP cryptocurrency trading library with support for 100+ exchanges

39 lines (36 loc) 1.95 kB
// ---------------------------------------------------------------------------- // PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN: // https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code // EDIT THE CORRESPONDENT .ts FILE INSTEAD /** * There are many simple utilities required to interact with * Ethereum and to simplify the library, without increasing * the library dependencies for simple functions. * * @_section api/utils:Utilities [about-utils] */ export { decodeBase58, encodeBase58 } from "./base58.js"; export { decodeBase64, encodeBase64 } from "./base64.js"; export { getBytes, getBytesCopy, isHexString, isBytesLike, hexlify, concat, dataLength, dataSlice, stripZerosLeft, zeroPadValue, zeroPadBytes } from "./data.js"; export { isCallException, isError, assert, assertArgument, assertArgumentCount, assertPrivate, assertNormalize, makeError } from "./errors.js"; export { EventPayload } from "./events.js"; export { FixedNumber } from "./fixednumber.js"; export { fromTwos, toTwos, mask, getBigInt, getNumber, getUint, toBigInt, toNumber, toBeHex, toBeArray, toQuantity } from "./maths.js"; export { resolveProperties, defineProperties } from "./properties.js"; export { decodeRlp } from "./rlp-decode.js"; export { encodeRlp } from "./rlp-encode.js"; export { formatEther, parseEther, formatUnits, parseUnits } from "./units.js"; export { toUtf8Bytes, toUtf8CodePoints, toUtf8String, Utf8ErrorFuncs, } from "./utf8.js"; export { uuidV4 } from "./uuid.js"; import { hash } from '../../../base/functions.js'; import { keccak_256 } from '../../noble-hashes/sha3.js'; import { sha256 as sha_256 } from '../../noble-hashes/sha256.js'; export function id(value) { return '0x' + hash(value, keccak_256, 'hex'); } export function keccak256(value) { return '0x' + hash(value, keccak_256, 'hex'); } export function sha256(value) { return '0x' + hash(value, sha_256, 'hex'); }