viem
Version:
551 lines (546 loc) • 15.7 kB
text/typescript
// biome-ignore lint/performance/noBarrelFile: entrypoint module
export {
type RequestErrorType,
buildRequest,
} from './buildRequest.js'
export {
type OffchainLookupErrorType,
ccipRequest,
/** @deprecated Use `ccipRequest`. */
ccipRequest as ccipFetch,
offchainLookup,
offchainLookupAbiItem,
offchainLookupSignature,
} from './ccip.js'
export {
type AssertCurrentChainErrorType,
type AssertCurrentChainParameters,
assertCurrentChain,
} from './chain/assertCurrentChain.js'
export { defineChain } from './chain/defineChain.js'
export {
type ExtractChainErrorType,
type ExtractChainParameters,
type ExtractChainReturnType,
extractChain,
} from './chain/extractChain.js'
export {
type GetChainContractAddressErrorType,
getChainContractAddress,
} from './chain/getChainContractAddress.js'
export { arrayRegex, bytesRegex, integerRegex } from './regex.js'
export {
type WebSocketAsyncErrorType,
type WebSocketAsyncOptions,
type WebSocketAsyncReturnType,
type WebSocketErrorType,
type WebSocketOptions,
type WebSocketReturnType,
getSocket,
rpc,
} from './rpc/compat.js'
export {
type HttpRpcClient,
type HttpRpcClientOptions,
type HttpRequestErrorType,
type HttpRequestParameters,
type HttpRequestReturnType,
getHttpRpcClient,
} from './rpc/http.js'
export {
type GetSocketRpcClientErrorType,
type GetSocketRpcClientParameters,
type GetSocketParameters,
type Socket,
type SocketRpcClient,
getSocketRpcClient,
socketClientCache,
} from './rpc/socket.js'
export { getWebSocketRpcClient } from './rpc/webSocket.js'
export { type StringifyErrorType, stringify } from './stringify.js'
export {
type DomainSeparatorErrorType,
type SerializeTypedDataErrorType,
type ValidateTypedDataErrorType,
serializeTypedData,
validateTypedData,
} from './typedData.js'
export {
type DecodeAbiParametersErrorType,
type DecodeAbiParametersReturnType,
decodeAbiParameters,
} from './abi/decodeAbiParameters.js'
export {
type DecodeErrorResultErrorType,
type DecodeErrorResultParameters,
type DecodeErrorResultReturnType,
decodeErrorResult,
} from './abi/decodeErrorResult.js'
export {
type DecodeEventLogErrorType,
type DecodeEventLogParameters,
type DecodeEventLogReturnType,
decodeEventLog,
} from './abi/decodeEventLog.js'
export {
type DecodeFunctionDataErrorType,
type DecodeFunctionDataParameters,
type DecodeFunctionDataReturnType,
decodeFunctionData,
} from './abi/decodeFunctionData.js'
export {
type DecodeFunctionResultErrorType,
type DecodeFunctionResultParameters,
type DecodeFunctionResultReturnType,
decodeFunctionResult,
} from './abi/decodeFunctionResult.js'
export {
type EncodeAbiParametersErrorType,
type EncodeAbiParametersReturnType,
encodeAbiParameters,
} from './abi/encodeAbiParameters.js'
export {
type EncodeDeployDataErrorType,
type EncodeDeployDataParameters,
encodeDeployData,
} from './abi/encodeDeployData.js'
export {
type EncodeErrorResultErrorType,
type EncodeErrorResultParameters,
encodeErrorResult,
} from './abi/encodeErrorResult.js'
export {
type EncodeArgErrorType,
type EncodeEventTopicsParameters,
type EncodeEventTopicsReturnType,
encodeEventTopics,
} from './abi/encodeEventTopics.js'
export {
type EncodeFunctionDataErrorType,
type EncodeFunctionDataParameters,
encodeFunctionData,
} from './abi/encodeFunctionData.js'
export {
type EncodeFunctionResultErrorType,
type EncodeFunctionResultParameters,
encodeFunctionResult,
} from './abi/encodeFunctionResult.js'
export {
type ParseEventLogsErrorType,
type ParseEventLogsParameters,
type ParseEventLogsReturnType,
parseEventLogs,
} from './abi/parseEventLogs.js'
export {
type GetAbiItemErrorType,
type GetAbiItemParameters,
getAbiItem,
} from './abi/getAbiItem.js'
export {
type ParseAbi,
type ParseAbiItem,
type ParseAbiParameter,
type ParseAbiParameters,
parseAbi,
parseAbiItem,
parseAbiParameter,
parseAbiParameters,
} from 'abitype'
export { type EncodePackedErrorType, encodePacked } from './abi/encodePacked.js'
export {
type FormatAbiItemWithArgsErrorType,
formatAbiItemWithArgs,
} from './abi/formatAbiItemWithArgs.js'
export {
type FormatAbiItemErrorType,
type FormatAbiParamErrorType,
type FormatAbiParamsErrorType,
formatAbiItem,
formatAbiParams,
} from './abi/formatAbiItem.js'
export {
type HashAuthorizationErrorType,
type HashAuthorizationParameters,
type HashAuthorizationReturnType,
hashAuthorization,
} from './authorization/hashAuthorization.js'
export {
type RecoverAuthorizationAddressErrorType,
type RecoverAuthorizationAddressParameters,
type RecoverAuthorizationAddressReturnType,
recoverAuthorizationAddress,
} from './authorization/recoverAuthorizationAddress.js'
export {
type SerializeAuthorizationListErrorType,
type SerializeAuthorizationListReturnType,
serializeAuthorizationList,
} from './authorization/serializeAuthorizationList.js'
export {
type VerifyAuthorizationErrorType,
type VerifyAuthorizationParameters,
type VerifyAuthorizationReturnType,
verifyAuthorization,
} from './authorization/verifyAuthorization.js'
export {
type ParseAccountErrorType,
parseAccount,
} from '../accounts/utils/parseAccount.js'
export {
type PublicKeyToAddressErrorType,
publicKeyToAddress,
} from '../accounts/utils/publicKeyToAddress.js'
export {
type GetContractAddressOptions,
type GetCreate2AddressErrorType,
type GetCreate2AddressOptions,
type GetCreateAddressErrorType,
type GetCreateAddressOptions,
getContractAddress,
getCreateAddress,
getCreate2Address,
} from './address/getContractAddress.js'
export {
type ChecksumAddressErrorType,
getAddress,
} from './address/getAddress.js'
export { type IsAddressErrorType, isAddress } from './address/isAddress.js'
export {
type IsAddressEqualErrorType,
isAddressEqual,
} from './address/isAddressEqual.js'
export {
type ConcatBytesErrorType,
type ConcatErrorType,
type ConcatHexErrorType,
concat,
concatBytes,
concatHex,
} from './data/concat.js'
export { type IsBytesErrorType, isBytes } from './data/isBytes.js'
export { type IsHexErrorType, isHex } from './data/isHex.js'
export {
type PadBytesErrorType,
type PadErrorType,
type PadHexErrorType,
pad,
padBytes,
padHex,
} from './data/pad.js'
export { type SizeErrorType, size } from './data/size.js'
export {
type AssertEndOffsetErrorType,
type AssertStartOffsetErrorType,
type SliceBytesErrorType,
type SliceErrorType,
type SliceHexErrorType,
type SliceReturnType,
slice,
sliceBytes,
sliceHex,
} from './data/slice.js'
export { type TrimErrorType, type TrimReturnType, trim } from './data/trim.js'
export {
type DefineBlockErrorType,
type FormattedBlock,
type FormatBlockErrorType,
defineBlock,
formatBlock,
} from './formatters/block.js'
export {
type DefineTransactionErrorType,
type FormattedTransaction,
type FormatTransactionErrorType,
defineTransaction,
formatTransaction,
transactionType,
} from './formatters/transaction.js'
export { type FormatLogErrorType, formatLog } from './formatters/log.js'
export {
type DefineTransactionReceiptErrorType,
type FormatTransactionReceiptErrorType,
type FormattedTransactionReceipt,
defineTransactionReceipt,
} from './formatters/transactionReceipt.js'
export {
type DefineTransactionRequestErrorType,
type FormatTransactionRequestErrorType,
type FormattedTransactionRequest,
defineTransactionRequest,
formatTransactionRequest,
} from './formatters/transactionRequest.js'
export { type ExtractErrorType, extract } from './formatters/extract.js'
export {
type BytesToRlpErrorType,
type HexToRlpErrorType,
type ToRlpErrorType,
type ToRlpReturnType,
toRlp,
} from './encoding/toRlp.js'
export {
type BoolToBytesErrorType,
type BoolToBytesOpts,
type HexToBytesErrorType,
type HexToBytesOpts,
type NumberToBytesErrorType,
type StringToBytesErrorType,
type StringToBytesOpts,
type ToBytesErrorType,
type ToBytesParameters,
boolToBytes,
toBytes,
hexToBytes,
numberToBytes,
stringToBytes,
} from './encoding/toBytes.js'
export {
type BoolToHexErrorType,
type BoolToHexOpts,
type BytesToHexErrorType,
type BytesToHexOpts,
type NumberToHexErrorType,
type NumberToHexOpts,
type StringToHexErrorType,
type StringToHexOpts,
type ToHexErrorType,
type ToHexParameters,
boolToHex,
bytesToHex,
toHex,
numberToHex,
stringToHex,
} from './encoding/toHex.js'
export {
type BytesToBigIntErrorType,
type BytesToBigIntOpts,
type BytesToBoolErrorType,
type BytesToBoolOpts,
type BytesToNumberErrorType,
type BytesToNumberOpts,
type BytesToStringErrorType,
type BytesToStringOpts,
type FromBytesErrorType,
type FromBytesParameters,
type FromBytesReturnType,
bytesToBigInt,
bytesToBigInt as bytesToBigint,
bytesToBool,
bytesToNumber,
bytesToString,
fromBytes,
} from './encoding/fromBytes.js'
export {
type AssertSizeErrorType,
type FromHexErrorType,
type FromHexParameters,
type FromHexReturnType,
type HexToBigIntErrorType,
type HexToBigIntOpts,
type HexToBoolErrorType,
type HexToBoolOpts,
type HexToNumberErrorType,
type HexToNumberOpts,
type HexToStringErrorType,
type HexToStringOpts,
fromHex,
hexToBool,
hexToBigInt,
hexToNumber,
hexToString,
} from './encoding/fromHex.js'
export {
type FromRlpErrorType,
fromRlp,
} from './encoding/fromRlp.js'
export {
type GetNodeErrorParameters,
type GetNodeErrorReturnType,
containsNodeError,
getNodeError,
} from './errors/getNodeError.js'
export {
type GetCallErrorReturnType,
getCallError,
} from './errors/getCallError.js'
export {
type GetContractErrorReturnType,
getContractError,
} from './errors/getContractError.js'
export {
type GetEstimateGasErrorReturnType,
getEstimateGasError,
} from './errors/getEstimateGasError.js'
export {
type GetTransactionErrorParameters,
type GetTransactionErrorReturnType,
getTransactionError,
} from './errors/getTransactionError.js'
export { getAction } from './getAction.js'
export {
type DefineFormatterErrorType,
defineFormatter,
} from './formatters/formatter.js'
export {
type ToEventSelectorErrorType,
toEventSelector,
/** @deprecated use `ToEventSelectorErrorType`. */
type ToEventSelectorErrorType as GetEventSelectorErrorType,
/** @deprecated use `toEventSelector`. */
toEventSelector as getEventSelector,
} from './hash/toEventSelector.js'
export {
type ToFunctionSelectorErrorType,
toFunctionSelector,
/** @deprecated use `ToFunctionSelectorErrorType`. */
type ToFunctionSelectorErrorType as GetFunctionSelectorErrorType,
/** @deprecated use `toFunctionSelector`. */
toFunctionSelector as getFunctionSelector,
} from './hash/toFunctionSelector.js'
export {
type ToEventSignatureErrorType,
toEventSignature,
/** @deprecated use `ToEventSignatureErrorType`. */
type ToEventSignatureErrorType as GetEventSignatureErrorType,
/** @deprecated use `toEventSignature`. */
toEventSignature as getEventSignature,
} from './hash/toEventSignature.js'
export {
type ToFunctionSignatureErrorType,
toFunctionSignature,
/** @deprecated use `ToFunctionSignatureErrorType`. */
type ToFunctionSignatureErrorType as GetFunctionSignatureErrorType,
/** @deprecated use `toFunctionSignature`. */
toFunctionSignature as getFunctionSignature,
} from './hash/toFunctionSignature.js'
export {
type ToEventHashErrorType,
toEventHash,
} from './hash/toEventHash.js'
export {
type ToFunctionHashErrorType,
toFunctionHash,
} from './hash/toFunctionHash.js'
export { type IsHashErrorType, isHash } from './hash/isHash.js'
export { type Keccak256ErrorType, keccak256 } from './hash/keccak256.js'
export { type Sha256ErrorType, sha256 } from './hash/sha256.js'
export { type Ripemd160ErrorType, ripemd160 } from './hash/ripemd160.js'
export {
type HashDomainErrorType,
type HashStructErrorType,
type HashTypedDataParameters,
type HashTypedDataReturnType,
hashStruct,
hashTypedData,
} from './signature/hashTypedData.js'
export {
type RecoverAddressErrorType,
type RecoverAddressParameters,
type RecoverAddressReturnType,
recoverAddress,
} from './signature/recoverAddress.js'
export {
type RecoverMessageAddressErrorType,
type RecoverMessageAddressParameters,
type RecoverMessageAddressReturnType,
recoverMessageAddress,
} from './signature/recoverMessageAddress.js'
export {
type RecoverPublicKeyErrorType,
type RecoverPublicKeyParameters,
type RecoverPublicKeyReturnType,
recoverPublicKey,
} from './signature/recoverPublicKey.js'
export {
type RecoverTypedDataAddressErrorType,
type RecoverTypedDataAddressParameters,
type RecoverTypedDataAddressReturnType,
recoverTypedDataAddress,
} from './signature/recoverTypedDataAddress.js'
export {
type VerifyHashErrorType,
type VerifyHashParameters,
type VerifyHashReturnType,
verifyHash,
} from './signature/verifyHash.js'
export {
type VerifyMessageErrorType,
type VerifyMessageParameters,
type VerifyMessageReturnType,
verifyMessage,
} from './signature/verifyMessage.js'
export {
type VerifyTypedDataErrorType,
type VerifyTypedDataParameters,
type VerifyTypedDataReturnType,
verifyTypedData,
} from './signature/verifyTypedData.js'
export {
type HashMessageReturnType,
type HashMessageErrorType,
hashMessage,
} from './signature/hashMessage.js'
export {
type ParseErc6492SignatureErrorType,
type ParseErc6492SignatureParameters,
type ParseErc6492SignatureReturnType,
parseErc6492Signature,
} from './signature/parseErc6492Signature.js'
export {
type IsErc6492SignatureErrorType,
type IsErc6492SignatureParameters,
type IsErc6492SignatureReturnType,
isErc6492Signature,
} from './signature/isErc6492Signature.js'
export {
type SerializeErc6492SignatureErrorType,
type SerializeErc6492SignatureParameters,
type SerializeErc6492SignatureReturnType,
serializeErc6492Signature,
} from './signature/serializeErc6492Signature.js'
export {
type GetSerializedTransactionTypeErrorType,
type GetSerializedTransactionType,
getSerializedTransactionType,
} from './transaction/getSerializedTransactionType.js'
export {
type GetTransactionTypeErrorType,
type GetTransactionType,
getTransactionType,
} from './transaction/getTransactionType.js'
export {
type AssertRequestErrorType,
assertRequest,
} from './transaction/assertRequest.js'
export {
type AssertTransactionEIP1559ErrorType,
type AssertTransactionEIP2930ErrorType,
type AssertTransactionLegacyErrorType,
assertTransactionEIP1559,
assertTransactionEIP2930,
assertTransactionLegacy,
} from './transaction/assertTransaction.js'
export {
type ParseTransactionErrorType,
parseTransaction,
} from './transaction/parseTransaction.js'
export {
serializeTransaction,
type SerializeTransactionErrorType,
type SerializeTransactionFn,
} from './transaction/serializeTransaction.js'
export {
type SerializeAccessListErrorType,
serializeAccessList,
} from './transaction/serializeAccessList.js'
export { type FormatEtherErrorType, formatEther } from './unit/formatEther.js'
export { type FormatGweiErrorType, formatGwei } from './unit/formatGwei.js'
export { type FormatUnitsErrorType, formatUnits } from './unit/formatUnits.js'
export { type ParseUnitsErrorType, parseUnits } from './unit/parseUnits.js'
export { type ParseEtherErrorType, parseEther } from './unit/parseEther.js'
export { type ParseGweiErrorType, parseGwei } from './unit/parseGwei.js'
export {
type CreateNonceManagerParameters,
type NonceManager,
type NonceManagerSource,
createNonceManager,
nonceManager,
} from './nonceManager.js'