All files / ethers.js/src.ts/utils index.ts

100% Statements 95/95
100% Branches 0/0
100% Functions 0/0
100% Lines 95/95

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 961x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x  
/**
 *  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 {
    FetchRequest, FetchResponse, FetchCancelSignal,
} from "./fetch.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";
 
/////////////////////////////
// Types
 
export type { BytesLike } from "./data.js";
 
export type {
 
    //ErrorFetchRequestWithBody, ErrorFetchRequest,
    //ErrorFetchResponseWithBody, ErrorFetchResponse,
 
    ErrorCode,
 
    EthersError, UnknownError, NotImplementedError, UnsupportedOperationError, NetworkError,
    ServerError, TimeoutError, BadDataError, CancelledError, BufferOverrunError,
    NumericFaultError, InvalidArgumentError, MissingArgumentError, UnexpectedArgumentError,
    CallExceptionError, InsufficientFundsError, NonceExpiredError, OffchainFaultError,
    ReplacementUnderpricedError, TransactionReplacedError, UnconfiguredNameError,
    ActionRejectedError,
 
    CallExceptionAction, CallExceptionTransaction,
 
    CodedEthersError
} from "./errors.js"
 
export type { EventEmitterable, Listener } from "./events.js";
 
export type {
    GetUrlResponse,
    FetchPreflightFunc, FetchProcessFunc, FetchRetryFunc,
    FetchGatewayFunc, FetchGetUrlFunc
} from "./fetch.js";
 
export type { FixedFormat } from "./fixednumber.js"
 
export type { BigNumberish, Numeric } from "./maths.js";
 
export type { RlpStructuredData, RlpStructuredDataish } from "./rlp.js";
 
export type {
    Utf8ErrorFunc,
    UnicodeNormalizationForm,
    Utf8ErrorReason
} from "./utf8.js";