# ethect > A viem alternative built on Effect v4, with a near zero-dependency state of mind: contracts, calls, transactions, events and wallets, on transports that are layers. Underneath, every Ethereum JSON-RPC method is a typed function. Errors are values: no effect throws. ethect (`@ethect/core`) has four entry points. `@ethect/core` holds the main APIs: Abi, Fn, Err, Ev and Contract define a contract, Erc20, Erc721, Erc1155 and Erc4626 are built in, Call reads it, Tx sends transactions, Signer signs with a key or a wallet, Signature checks what was signed, Wallets and Connection are for a browser. It also holds what every program uses: the transports (a transport is a Layer), the tagged errors and the primitives (Address, Hex, Hash, Quantity). `@ethect/core/rpc` is the low-level JSON-RPC layer: the eth, anvil, evm, txpool, debug, net, web3 and wallet methods as functions that return an Effect, checked by Schema in both directions, with the wire types. `@ethect/core/ens` is for ENS names. `@ethect/core/testing` holds the test tools: AnvilNode, MockProvider, TestWallet and TestSigner. There is no React package, no WalletConnect connector, and no unit helpers: Effect's BigDecimal does that. Every documentation page is also served as plain Markdown: append `.md` to its path without the trailing slash (`/rpc/eth/get-balance/` is `/rpc/eth/get-balance.md`; the landing page is `/index.md`). ## Introduction - [Why ethect](https://ethect.dev/getting-started/why-ethect.md): ethect is a viem alternative built on Effect, with a near zero-dependency state of mind. What you get from it, what it holds today, and what it does not have. - [Installation](https://ethect.dev/getting-started/installation.md): Install @ethect/core together with effect, its one peer dependency, and add the platform layer each transport needs. - [Quick start](https://ethect.dev/getting-started/quick-start.md): Read three values from a local node in one typed program, then sign and send a transaction to it. - [Coming from viem](https://ethect.dev/getting-started/coming-from-viem.md): Each viem and wagmi function you know and its counterpart in ethect, for contracts, transactions, events, wallets, units and names. What works differently, and what has no counterpart yet. ## Guides: Start here - [Read and write a contract](https://ethect.dev/guides/contracts.md): Read a balance of an ERC-20 and send a transfer to it, with the contract that is built in. What a call is, how to describe a contract that is not a standard, and how to extend one. - [Read many things at once](https://ethect.dev/guides/reading.md): Twenty token balances and the number of their block, in one eth_call. What merges into one request, what does not, and what a read sees inside a multicall. - [Send transactions](https://ethect.dev/guides/transactions.md): Approve a token then deposit it in a vault, from a script. What comes back, every failure and what to do about it, and when to use plan, submit and wait. - [Decode and watch events](https://ethect.dev/guides/events.md): The deposits of a vault, three ways. From the past with Ev.logs, from a receipt with Ev.decode, and live with Ev.watch, pushed or polled by the same line. - [Errors](https://ethect.dev/guides/errors.md): No effect throws. A failure is a tagged value with a message. How to catch the custom error of a contract in a read and in a send, and every failure the library has. - [Amounts and decimals](https://ethect.dev/guides/amounts.md): A token amount is a bigint of its smallest units. Effect's BigDecimal shows 1500000 units of USDC as 1.5, and turns the 1.5 a user typed back into units. Two traps to know. ## Guides: Effect and transports - [Effect essentials](https://ethect.dev/guides/effect-essentials.md): The five things to know about Effect to use ethect. A program is a description, yield* reads a step, a failure is a value in the type, what a program needs is provided, and it runs once at the edge. - [Transports](https://ethect.dev/guides/transports.md): A transport carries the calls of a program to a node or a wallet. Choose HTTP, WebSocket, IPC or EIP-1193, provide it once, and the program stays the same. - [Custom transports](https://ethect.dev/guides/custom-transports.md): A transport is a Layer that provides one function, request. Wrap an existing transport to log or fall back, or write one from scratch. ## Guides: In a browser - [Let the user pick a wallet](https://ethect.dev/guides/wallet-selection.md): A wallet picker in React. The list of installed wallets, a click that connects, and a state that follows the account and the chain as the user changes them in the wallet. - [A button with steps](https://ethect.dev/guides/transaction-button.md): An approval and a deposit behind one button in React. One row and one click on a wallet that batches, one row per call otherwise. A refused signature, a declined upgrade and a reload are handled. - [Render on the server](https://ethect.dev/guides/ssr.md): A server has no wallet, and a page still has to show the account in its first HTML. The state of the connection is stored in a cookie, read on the server, and confirmed by the wallet in the browser. - [Talk to a wallet directly](https://ethect.dev/guides/wallets.md): The low-level way to a wallet. One EIP-1193 provider as a transport, and each wallet method as a typed function, for what Connection and Tx do not cover. ## Guides: Scripts and bots - [How nonces are managed](https://ethect.dev/guides/nonces.md): Send twenty transactions at once from one key. The signer keeps one counter per account, asks the node once, and knows what to do with each answer of the node. - [An indexer that survives reorgs](https://ethect.dev/guides/indexer.md): Save every deposit of a vault into a store, stop, and start again where you stopped. Reorgs are handled by waiting for blocks to be deep, or by one rule in the function that saves. - [Simulate before sending](https://ethect.dev/guides/simulation.md): Show the shares a deposit would give before the user signs anything. Tx.simulate runs calls in order on the state of the chain, each seeing the ones before it, and writes nothing. - [Send fast](https://ethect.dev/guides/fast-sending.md): A bot that reacts to a block with a transaction in the next one. Set every field so that nothing is asked before the send, sign everything first, and send through a relay. - [Several chains](https://ethect.dev/guides/multi-chain.md): An app on two chains. One node per chain, each part of the program says which chain it is on, and a send is for that chain whatever chain the wallet is on. - [Resolve ENS names](https://ethect.dev/guides/names.md): A form field that takes a name or an address. The names get a mainnet node of their own, and a name that has no address is an answer, not a failure. - [Testing](https://ethect.dev/guides/testing.md): Test a send against a real local node, with a wallet whose user is the test. A fresh anvil per test, a contract of your own on it, and a reorg when you want one. ## Concepts - [How it works](https://ethect.dev/concepts/how-it-works.md): Two services do the work. Transport is the node and Signer is the wallet. Who is asked what, and how a function of a contract becomes a JSON-RPC request. - [Connection lifecycle](https://ethect.dev/concepts/connection-lifecycle.md): A socket transport holds one connection for every call and subscription. What happens to each when the connection drops, how it comes back, and what a subscription misses in between. ## Contracts - [Contracts (Contract)](https://ethect.dev/reference/contract.md): The functions, events and errors of a contract under one name, its functions bound to an address, and the contract it makes with another. - [ERC-20 token (Erc20)](https://ethect.dev/reference/standards/erc20.md): The ERC-20 token, built in. Its functions and its events at any address, with no ABI to write, and what a token adds to them. - [ERC-721 token (Erc721)](https://ethect.dev/reference/standards/erc721.md): The ERC-721 non-fungible token, built in. Its functions and its events at any address, the two safeTransferFrom under one name, and what a token adds to them. - [ERC-1155 token (Erc1155)](https://ethect.dev/reference/standards/erc1155.md): The ERC-1155 multi-token, built in. Its functions and its events at any address, with no ABI to write, and what a token adds to them. - [ERC-4626 vault (Erc4626)](https://ethect.dev/reference/standards/erc4626.md): The ERC-4626 tokenized vault, built in. Its functions and its events at any address, those of the ERC-20 of its shares included, and what a vault adds to them. - [Reverts (Revert)](https://ethect.dev/reference/revert.md): What a call reverts with when it is none of the errors its function declares. A message, a panic, or data that nothing reads. ## Contracts: Functions (Fn) - [Functions (Fn)](https://ethect.dev/reference/fn.md): A function of a contract as a definition. Its name, the types it takes and returns, and the errors it reverts with. A definition at an address builds calls. - [Fn.view](https://ethect.dev/reference/fn/view.md): Defines a function of a contract. One definer per mutability, Fn.view, Fn.pure, Fn.nonpayable and Fn.payable, with the same shape. - [Fn.parse](https://ethect.dev/reference/fn/parse.md): Builds one function from its human-readable signature. - [fn.at](https://ethect.dev/reference/fn/at.md): Gives a function at a contract. Calling the result with the arguments builds a call, a plain value that nothing has encoded yet. - [Fn.encodeInput](https://ethect.dev/reference/fn/encode-input.md): Encodes the arguments of a function to the calldata of a call. The selector, then the arguments. - [Fn.decodeOutput](https://ethect.dev/reference/fn/decode-output.md): Decodes what a function returned, from the bytes a node answered a call with. ## Contracts: Events (Ev) - [Events (Ev)](https://ethect.dev/reference/ev.md): Events of a contract. Each one is a class, decoded from logs, asked for over a range of blocks, or watched as it happens. - [Ev.make](https://ethect.dev/reference/ev/make.md): Defines an event of a contract. The result is a class to extend, and its instances are the decoded logs of the event. - [Ev.decode](https://ethect.dev/reference/ev/decode.md): Decodes logs to events, in one pass. One event or several, in the order of the logs or sorted by event. - [Ev.logs](https://ethect.dev/reference/ev/logs.md): Past events, over a range of blocks, in one array. A range the node refuses is read in pieces it accepts. - [Ev.watch](https://ethect.dev/reference/ev/watch.md): Events as they happen, as a stream. With a block to start from, the past ones first. - [Ev.pages](https://ethect.dev/reference/ev/pages.md): Past then live events, one range of blocks at a time. Each page says where it ends, so an indexer can stop and start again. - [Ev.Source](https://ethect.dev/reference/ev/source.md): How the logs of Ev.watch arrive. Pushed by the node, collected by a filter, or read block by block. The default picks from what the transport can do. ## Contracts: Custom errors (Err) - [Custom errors (Err)](https://ethect.dev/reference/err.md): Custom errors of a contract. Each one is a tagged error class, decoded from revert data and caught by its tag. - [Err.make](https://ethect.dev/reference/err/make.md): Defines a custom error of a contract. The result is a class to extend, and its instances are failures caught by their tag. - [Err.decode](https://ethect.dev/reference/err/decode.md): Reads revert data as one of the errors you give, or as a plain revert. It never fails. - [Err.of](https://ethect.dev/reference/err/of.md): Gives the custom errors that a set of calls declares, each once. ## Contracts: ABI types (Abi) - [ABI types (Abi)](https://ethect.dev/reference/abi.md): Solidity types as values, and the encoding of what they hold. A type is an Effect Schema, and a whole contract can come from signatures or from a JSON ABI. - [Elementary types](https://ethect.dev/reference/abi/types.md): The Solidity types that hold one value, and what each one is in TypeScript. - [Abi.array](https://ethect.dev/reference/abi/array.md): An array of a Solidity type, of any length or of a fixed one. - [Abi.tuple](https://ethect.dev/reference/abi/tuple.md): Several values as one, by position. A value is a readonly tuple. - [Abi.struct](https://ethect.dev/reference/abi/struct.md): Several values as one, by name. A value is a readonly object, and the fields are laid out in the order you write them. - [Abi.Class](https://ethect.dev/reference/abi/class.md): A struct as a class. Its values are instances, so they can have methods. - [Abi.indexed](https://ethect.dev/reference/abi/indexed.md): Marks a field of an event as stored in a topic, which is what lets a filter match it. - [Abi.encode](https://ethect.dev/reference/abi/encode.md): Encodes one value, or several, to the bytes abi.encode gives. - [Abi.decode](https://ethect.dev/reference/abi/decode.md): Decodes ABI bytes to one value, or to several, as strictly as abi.decode does. - [Abi.parse](https://ethect.dev/reference/abi/parse.md): Builds a contract from human-readable signatures. Its functions, events and errors are the definitions you would write by hand. - [Abi.fromJson](https://ethect.dev/reference/abi/from-json.md): Builds a contract from a JSON ABI. Declared as const, the ABI types the contract. Otherwise each item is read when the program runs. ## Reading and sending - [Blocks (Block)](https://ethect.dev/reference/block.md): New blocks, as one stream per transport that everyone who watches shares. ## Reading and sending: Calls and reads (Call) - [Calls and reads (Call)](https://ethect.dev/reference/call.md): A call is a message to a contract, as a plain value. A call of a view function is also the effect of reading it, and any call can be sent as a transaction. - [Call.read](https://ethect.dev/reference/call/read.md): Reads a call of a view function. It gives what the function returns, or fails with the error it reverts with. - [Call.all](https://ethect.dev/reference/call/all.md): Reads several calls together, in one request and at one block. A tuple of calls gives a tuple, a record a record, an array an array. - [Call.batching](https://ethect.dev/reference/call/batching.md): Reads are merged into multicalls without asking. Call.batching is the layer that tunes how, or turns it off with false. - [Call.blockNumber](https://ethect.dev/reference/call/state.md): The state of the chain, as calls. Call.blockNumber, Call.timestamp, Call.chainId, Call.baseFee, Call.gasLimit, Call.balance and Call.blockHash are read like any call. Beside others, they are read inside the same eth_call, so they are of the same block. - [Call.make](https://ethect.dev/reference/call/make.md): Builds a raw call. No function and no ABI, the bytes as they are, to an address or as a deployment. - [Call.encode](https://ethect.dev/reference/call/encode.md): Encodes a call as a transaction carries it. The address, the calldata and the value. - [Call.key](https://ethect.dev/reference/call/key.md): Gives a stable name for a call. The same call has the same key, so it can be a cache key. It cannot fail. - [Call.withBlock](https://ethect.dev/reference/call/with-block.md): Makes every read inside an effect at one block. A program reads a consistent state, without passing the block to each read. - [Call.Reader](https://ethect.dev/reference/call/reader.md): The service that runs reads. Call.read builds a request and asks it. Call.direct is the reader that sends one request per read. ## Reading and sending: Transactions (Tx) - [Transactions (Tx)](https://ethect.dev/reference/tx.md): Sending calls as transactions, in four functions. plan says how many signatures the calls take, submit asks for one, wait follows it into a block, and send is the three together. receipt says where one transaction stands now. - [Tx.send](https://ethect.dev/reference/tx/send.md): Sends calls and waits for them to be in a block. One call gives its receipt, several give their receipts in order. - [Tx.plan](https://ethect.dev/reference/tx/plan.md): Says how many signatures the calls take, and what is in each. Nothing is signed, simulated or asked of the user. - [Tx.submit](https://ethect.dev/reference/tx/submit.md): Asks for one signature and hands the calls to the network. It gives what to wait for, and does not wait. - [Tx.wait](https://ethect.dev/reference/tx/wait.md): Waits for what was submitted to be in a block, as deep as asked, and gives the receipts. Fails if a transaction reverted or was dropped. - [Tx.receipt](https://ethect.dev/reference/tx/receipt.md): Says where one transaction stands now, in one request. Its receipt when it is in a block, none when it is not. It waits for nothing, and fails if the transaction reverted. - [Failures](https://ethect.dev/reference/tx/failures.md): What sending fails with. Each failure is a value with a tag and a message, and says what was sent before it. - [Tx.Broadcast](https://ethect.dev/reference/tx/broadcast.md): How the bytes a local signer signed reach the network. The default is eth_sendRawTransaction on the transport, and one function replaces it. - [Tx.simulate](https://ethect.dev/reference/tx/simulate.md): Runs calls in order, each seeing the ones before it, and gives what each returns. Nothing is sent, and no signer is needed. ## Wallets and signing - [Installed wallets (Wallets)](https://ethect.dev/reference/wallets.md): The wallets a page can talk to. A list, and a stream of that list which tells when a wallet announces itself. ## Wallets and signing: Signers (Signer) - [Signers (Signer)](https://ethect.dev/reference/signer.md): A signer holds accounts and makes them sign. A local key, a wallet, or the wallet an app is connected to, each a Layer that provides the Signer service. - [Signer.privateKey](https://ethect.dev/reference/signer/private-key.md): A signer over a private key the program holds. The key is always a Redacted, and is never written anywhere. - [Signer.fromSign](https://ethect.dev/reference/signer/from-sign.md): A signer over anything that signs a digest, such as a KMS or an HSM. The key never enters the program. - [Signer.make](https://ethect.dev/reference/signer/make.md): A signer over an account that signs transactions, messages and typed data itself, such as a hardware wallet. - [Signer.all](https://ethect.dev/reference/signer/all.md): Several signers as one. The sender of a transaction says which of them signs it. - [Signer.wallet](https://ethect.dev/reference/signer/wallet.md): A signer over an EIP-1193 wallet. One call is one eth_sendTransaction, and several calls are one EIP-5792 batch. - [Signer.connected](https://ethect.dev/reference/signer/connected.md): A signer that follows the connection of an app. It signs with the wallet that is connected, whichever it is at the time. - [Signer.Nonces](https://ethect.dev/reference/signer/nonces.md): How a local signer hands out nonces, and how many transactions of an account may be on their way at once. - [Signer.accounts](https://ethect.dev/reference/signer/accounts.md): The accounts the signer in context holds, the first of them, and what the signer can do for an account on a chain. - [Signer.signMessage](https://ethect.dev/reference/signer/sign-message.md): Signs a message with an account of the signer, as personal_sign does (EIP-191). Nothing is sent. - [Signer.signTypedData](https://ethect.dev/reference/signer/sign-typed-data.md): Signs EIP-712 typed data with an account of the signer, such as a permit or an order. Nothing is sent. - [Signer.signTransaction](https://ethect.dev/reference/signer/sign-transaction.md): Signs a call as a transaction and sends nothing. It gives the signed bytes, their hash and the nonce they carry. ## Wallets and signing: Signatures (Signature) - [Signatures (Signature)](https://ethect.dev/reference/signature.md): Checks a signature. Signature.recover gives the address whose key signed, with no node. Signature.verify says whether an account signed, also when the account is a contract. - [Signature.verifyMessage](https://ethect.dev/reference/signature/verify-message.md): Says whether an account signed a message, as Signer.signMessage and personal_sign sign it. The account can be a key or a contract, deployed or not yet. - [Signature.verifyTypedData](https://ethect.dev/reference/signature/verify-typed-data.md): Says whether an account signed EIP-712 typed data, such as a permit or an order. The account can be a key or a contract, deployed or not yet. - [Signature.verify](https://ethect.dev/reference/signature/verify.md): Says whether an account signed a digest. A key's signature is checked with no request. Any other is asked of the node in one eth_call, which covers a contract account, deployed or not yet. - [Signature.recoverMessage](https://ethect.dev/reference/signature/recover-message.md): Gives the address whose key signed a message, as Signer.signMessage and personal_sign sign it. It is arithmetic. No node is asked. - [Signature.recoverTypedData](https://ethect.dev/reference/signature/recover-typed-data.md): Gives the address whose key signed EIP-712 typed data, such as a permit or an order. It is arithmetic. No node is asked. - [Signature.recover](https://ethect.dev/reference/signature/recover.md): Gives the address whose key signed a digest. It is arithmetic. No node is asked. - [Signature.fromHex](https://ethect.dev/reference/signature/from-hex.md): Reads the 65 bytes of a signature as r, s and yParity, and Signature.toHex writes them back. For a contract or a transaction that takes a signature in parts. ## Wallets and signing: Wallet connection (Connection) - [Wallet connection (Connection)](https://ethect.dev/reference/connection.md): Which wallet an app is connected to, with which accounts, on which chain. One state, as plain data that can be stored and rendered from. - [Connection.layer](https://ethect.dev/reference/connection/layer.md): The connection of an app, as a layer over its wallets. It starts from what storage held, and asks no wallet anything until you connect. - [Connection.State](https://ethect.dev/reference/connection/state.md): The state of a connection. Plain data that says which wallet the app is connected to, with which accounts, on which chain, in one of four cases. - [Connection.connect](https://ethect.dev/reference/connection/connect.md): Connects the app to a wallet. connect asks the wallet for its accounts with a prompt, reconnect confirms a stored connection without one, and disconnect ends it. - [Connection.switchChain](https://ethect.dev/reference/connection/switch-chain.md): Asks the connected wallet to change chain. Given a Chain, a wallet that does not know the chain is offered to add it. - [Connection.toCookie](https://ethect.dev/reference/connection/cookie.md): The state of a connection as a cookie, and Connection.fromCookie to read it back from document.cookie or from a Cookie header. Neither fails, and neither throws. - [Connection.toJson](https://ethect.dev/reference/connection/json.md): The state of a connection as text, for local storage or any other place that holds text. Connection.fromJson reads it back, and never fails. ## Nodes and chains - [Chains (Chain)](https://ethect.dev/reference/chain.md): A chain as plain data that an application writes. What a wallet or a page needs to know about it. ## Nodes and chains: Transports (Transport) - [Transports (Transport)](https://ethect.dev/reference/transport.md): A transport carries JSON-RPC calls to a node or a wallet. Each one is a Layer that provides the Transport service, and the Subscriptions service when its connection can push. - [Transport.http](https://ethect.dev/reference/transport/http.md): A transport that POSTs each call to a URL, with optional JSON-RPC batching. It uses the HttpClient in context. - [Transport.webSocket](https://ethect.dev/reference/transport/web-socket.md): A transport over one WebSocket connection, shared by every call and subscription. It reconnects when the connection drops and keeps an idle connection alive. - [Transport.ipc](https://ethect.dev/reference/transport/ipc.md): A transport over a node's IPC socket, for a node on the same machine. It serves calls and subscriptions on one connection and reconnects when it drops. - [Transport.eip1193](https://ethect.dev/reference/transport/eip1193.md): A transport over an EIP-1193 provider, such as the object a browser wallet injects. Calls go to the provider's request function and subscription items come from its message events. - [Transport.chains](https://ethect.dev/reference/transport/chains.md): Every chain of an app, each with its node. Transport.on says which chain a part of a program is on. - [Transport.subscriptionsOver](https://ethect.dev/reference/transport/subscriptions-over.md): Builds the Subscriptions service of a transport of your own, from a way to send calls and the items its connection pushes. - [Wallet providers (Eip1193)](https://ethect.dev/reference/eip1193.md): The EIP-1193 provider type and the provider's events as streams. Account changes, chain changes, connect and disconnect. ## Nodes and chains: ENS names (Ens) - [ENS names (Ens)](https://ethect.dev/reference/ens.md): ENS names, from the @ethect/core/ens entry point. A name to an address and back, text records and avatars. - [Ens.layer](https://ethect.dev/reference/ens/layer.md): ENS through its Universal Resolver, on the chain of the transport it is given. - [Ens.address](https://ethect.dev/reference/ens/address.md): The address a name points to, or none when the name has no resolver or no address. - [Ens.name](https://ethect.dev/reference/ens/name.md): The primary name of an address, only if it resolves back to that address. - [Ens.text](https://ethect.dev/reference/ens/text.md): A text record of a name, or none when the record is empty. - [Ens.avatar](https://ethect.dev/reference/ens/avatar.md): The avatar record of a name, turned into a URL an image can be loaded from. ## Values and errors: Values - [Address](https://ethect.dev/reference/primitives/address.md): A 20-byte account address. An Address is a branded string, lowercase in memory so that two addresses compare with ===, written in its EIP-55 form, and read in any case. - [Hex](https://ethect.dev/reference/primitives/hex.md): A 0x-prefixed hexadecimal string, the wire format of every byte value in Ethereum JSON-RPC. The module has the type, its schemas, and the conversions to and from bytes. - [Hash](https://ethect.dev/reference/primitives/hash.md): A 32-byte hash as hex. The hash of a block or a transaction, a storage root, a log topic. The module also has Keccak-256. - [Quantity](https://ethect.dev/reference/primitives/quantity.md): A JSON-RPC quantity, a non-negative integer sent as hex with no leading zeros. The module has two schemas. One decodes to bigint, the other to number. ## Values and errors: Errors - [Errors](https://ethect.dev/reference/errors.md): The three tagged errors a call can fail with. RpcError when the node answered with an error, TransportError when no answer came back, CodecError when a value does not match its schema. - [RpcError](https://ethect.dev/reference/errors/rpc-error.md): The error a node or wallet answers a call with. It keeps the JSON-RPC code, message and data, and classifies them into a reason. - [TransportError](https://ethect.dev/reference/errors/transport-error.md): A call that produced no JSON-RPC answer. The node could not be reached, the connection dropped, or what came back was not JSON-RPC. - [CodecError](https://ethect.dev/reference/errors/codec-error.md): A value that does not match its method's schema. Params that cannot be encoded, in which case nothing was sent, or a result the node sent in an unexpected shape. - [AbiError](https://ethect.dev/reference/errors/abi-error.md): A value that is not what its Solidity type allows, or bytes that are not the ABI encoding of it. ## Testing - [Testing](https://ethect.dev/reference/testing.md): The @ethect/core/testing entry point. A real local node per test, a provider that answers from typed handlers, and a wallet and a signer that a test controls. - [AnvilNode](https://ethect.dev/reference/testing/anvil-node.md): A local anvil node as a scoped resource. It starts when its layer is built, on a port of its own, and is stopped with its files removed when the scope closes or the process that started it dies. - [AnvilNode.reorg](https://ethect.dev/reference/testing/reorg.md): Replaces the last blocks of an anvil chain by empty ones, as a reorg does. What they held is gone, neither mined nor pending. - [AnvilNode.placeMulticall3](https://ethect.dev/reference/testing/place-multicall3.md): Puts the code of Multicall3 on an anvil chain, where every chain has it. Reads that are merged are then one plain eth_call, as on a real chain. - [MockProvider](https://ethect.dev/reference/testing/mock-provider.md): An EIP-1193 provider that answers from handlers written against the method definitions. A wallet or node double for tests. - [TestWallet](https://ethect.dev/reference/testing/test-wallet.md): A wallet a test controls, over a node. An EIP-1193 provider that behaves as a browser wallet does, with what its user answers and which account and chain it is on set by the test, as EIP-5792 writes it or as Ambire, MetaMask, Rainbow or Rabby answer. - [TestSigner](https://ethect.dev/reference/testing/test-signer.md): A Signer over the accounts a node has unlocked, for tests of sending. No key and no signing code. ## Using the layer - [JSON-RPC layer](https://ethect.dev/rpc.md): The low-level layer of ethect. One typed definition per JSON-RPC method and per subscription kind, in the namespaces nodes and wallets serve, imported from @ethect/core/rpc. - [Calling methods](https://ethect.dev/rpc/guides/calling-methods.md): Every JSON-RPC method is a function. Pass its params in wire order with native types, and get the decoded result back in an Effect. - [Batching](https://ethect.dev/rpc/guides/batching.md): With batching on, the HTTP transport sends the calls made together as one JSON-RPC batch. What "together" means, how to widen it, and what happens when part of a batch fails. - [Subscriptions](https://ethect.dev/rpc/guides/subscriptions.md): A subscription is a Stream of what the node pushes. It needs a transport that can push, it unsubscribes when the stream ends, and it carries on over a reconnection. - [Custom methods](https://ethect.dev/rpc/guides/custom-methods.md): Define a JSON-RPC method the library does not have, or one whose result your chain shapes differently. A definition is written once with Method.make, typed in both directions. - [Values on the wire](https://ethect.dev/rpc/guides/values.md): Ethereum JSON-RPC sends everything as hex strings. ethect decodes each value to a native type by one set of rules, for every method and every wire type. ## Namespaces: Eth - [The eth_ methods (Eth)](https://ethect.dev/rpc/eth.md): The eth namespace. Every eth_ method an execution client serves, as a typed function, with the eth_subscribe kinds under Eth.subscribe. - [Eth.chainId](https://ethect.dev/rpc/eth/chain-id.md): Returns the chain id of the network the node is on, as a number. - [Eth.blockNumber](https://ethect.dev/rpc/eth/block-number.md): Returns the number of the most recent block the node has. - [Eth.syncing](https://ethect.dev/rpc/eth/syncing.md): Returns false when the node is in sync, or how far it has come while it is still syncing. - [Eth.accounts](https://ethect.dev/rpc/eth/accounts.md): Returns the accounts the node or wallet holds keys for, the ones it can sign and send from. - [Node information](https://ethect.dev/rpc/eth/node.md): Four methods that describe the node itself. Its fee recipient, its wire protocol version, the forks it runs and the history it keeps. - [Eth.getBlockByNumber](https://ethect.dev/rpc/eth/get-block-by-number.md): Returns a block by number or tag, with its transactions as hashes or in full, or null when the node does not have the block. - [Eth.getBlockByHash](https://ethect.dev/rpc/eth/get-block-by-hash.md): Returns a block by its hash, with its transactions as hashes or in full, or null when the node does not have the block. - [Eth.getBlockReceipts](https://ethect.dev/rpc/eth/get-block-receipts.md): Returns the receipts of every transaction in a block, in the order of the block, or null when the node does not have the block. - [Headers, counts & uncles](https://ethect.dev/rpc/eth/block-details.md): The methods that read one part of a block. Its header, how many transactions and uncles it has, one of its uncles, and its access list. - [Eth.getTransactionByHash](https://ethect.dev/rpc/eth/get-transaction-by-hash.md): Returns a transaction by its hash, pending or mined, or null when the node does not know it. - [Eth.getTransactionReceipt](https://ethect.dev/rpc/eth/get-transaction-receipt.md): Returns the receipt of a mined transaction, or null while the transaction is pending or when the node does not know it. - [More lookups](https://ethect.dev/rpc/eth/transaction-lookups.md): The other ways to find a transaction. By its position in a block, by its sender and nonce, in its signed and encoded form, and all those in the pending pool. - [Eth.getBalance](https://ethect.dev/rpc/eth/get-balance.md): Returns the balance of an account in wei, at the latest block or at a block you name. - [Eth.getTransactionCount](https://ethect.dev/rpc/eth/get-transaction-count.md): Returns the number of transactions an account has sent, which is the nonce its next transaction must carry. - [Eth.getCode](https://ethect.dev/rpc/eth/get-code.md): Returns the code of a contract as hex, or 0x for an account without code. - [Eth.getStorageAt](https://ethect.dev/rpc/eth/get-storage-at.md): Returns the value of one storage slot of a contract, as a 32-byte word. - [Eth.getStorageValues](https://ethect.dev/rpc/eth/get-storage-values.md): Returns the values of several storage slots of several contracts in one request, in the order asked. - [Eth.getProof](https://ethect.dev/rpc/eth/get-proof.md): Returns the Merkle proof of an account and of the storage slots you name, as defined by EIP-1186. - [Eth.getAccount](https://ethect.dev/rpc/eth/get-account.md): Returns the nonce, the balance, the storage root and the code hash of an account in one call. Not served by every client. - [Eth.call](https://ethect.dev/rpc/eth/call.md): Runs a call against the state of a block without sending a transaction, and returns its return data as hex. It is how you read a contract. - [Eth.estimateGas](https://ethect.dev/rpc/eth/estimate-gas.md): Returns the gas a transaction would need, found by running it against the state of a block without sending it. - [Eth.createAccessList](https://ethect.dev/rpc/eth/create-access-list.md): Returns the access list a transaction would use, which is the addresses and storage slots it touches, and the gas it uses when sent with that list. - [Eth.simulateV1](https://ethect.dev/rpc/eth/simulate-v1.md): Simulates calls in a sequence of made-up blocks on top of a block you name, each with its own overrides, and returns the blocks with the outcome of every call. - [Eth.feeHistory](https://ethect.dev/rpc/eth/fee-history.md): Returns the base fees, the gas usage and the priority fees paid over a range of blocks that ends at a block you name. - [Gas prices](https://ethect.dev/rpc/eth/fees.md): The four methods that return one fee figure each. The node's gas price and priority fee suggestions, and the base fee and blob base fee of the next block. - [Eth.getLogs](https://ethect.dev/rpc/eth/get-logs.md): Returns the event logs matching a filter. Logs are matched by contract and by topics, over a range of blocks or in one block. - [Filters](https://ethect.dev/rpc/eth/filters.md): The six methods that install a filter on the node, poll it and remove it. A filter collects logs, block hashes or pending transaction hashes between two polls. - [Eth.sendTransaction](https://ethect.dev/rpc/eth/send-transaction.md): Asks the node or wallet to sign a transaction with an account it holds the key of, and to send it. Returns the transaction hash. - [Eth.sendTransactionSync](https://ethect.dev/rpc/eth/send-transaction-sync.md): Asks the node to sign and send a transaction like Eth.sendTransaction, then waits for it to be mined and returns its receipt. Not every client serves it. - [Eth.sendRawTransaction](https://ethect.dev/rpc/eth/send-raw-transaction.md): Sends a transaction that is already signed and encoded. Returns its hash. - [Eth.sendRawTransactionSync](https://ethect.dev/rpc/eth/send-raw-transaction-sync.md): Sends a signed, encoded transaction, then waits for it to be mined and returns its receipt (EIP-7966). Not every client serves it. - [Eth.fillTransaction](https://ethect.dev/rpc/eth/fill-transaction.md): Fills in what a transaction request leaves out, such as the nonce, the gas and the fees, and returns the complete transaction without signing or sending it. - [Eth.signTransaction](https://ethect.dev/rpc/eth/sign-transaction.md): Asks the node or wallet to sign a transaction with an account it holds the key of, without sending it. Returns the signed transaction, encoded. - [Eth.sign](https://ethect.dev/rpc/eth/sign.md): Asks the node or wallet to sign a message with the key of an account, as an EIP-191 personal message. Returns the signature, 65 bytes of hex. - [Eth.signTypedDataV4](https://ethect.dev/rpc/eth/sign-typed-data-v4.md): Asks the node or wallet to sign EIP-712 typed data with the key of an account. Returns the signature, 65 bytes of hex. - [Eth.subscribe](https://ethect.dev/rpc/eth/subscribe.md): The five kinds of eth_subscribe, each as a function that returns a Stream of the items the node pushes. - [Eth.subscribe.newHeads](https://ethect.dev/rpc/eth/subscribe/new-heads.md): A stream of the header of each block added to the chain, pushed by the node as it happens. - [Eth.subscribe.logs](https://ethect.dev/rpc/eth/subscribe/logs.md): A stream of the event logs matching a filter, pushed by the node as blocks are added to the chain. - [Eth.subscribe.newPendingTransactions](https://ethect.dev/rpc/eth/subscribe/new-pending-transactions.md): A stream of the transactions entering the node's pending pool. The items are their hashes, or the transactions in full when you ask for them. - [Eth.subscribe.transactionReceipts](https://ethect.dev/rpc/eth/subscribe/transaction-receipts.md): A stream of the receipts of each block added to the chain. All of them, or only those of the transactions you name. - [Eth.subscribe.syncing](https://ethect.dev/rpc/eth/subscribe/syncing.md): A stream of the node's sync status, pushed each time the node starts or stops syncing. ## Namespaces: Wallet - [Wallet methods (Wallet)](https://ethect.dev/rpc/wallet.md): The wallet namespace. What a wallet serves through an EIP-1193 provider, each method as a typed function, with the eth_ methods a wallet shares with a node re-exported from Eth. - [Wallet.requestAccounts](https://ethect.dev/rpc/wallet/request-accounts.md): Asks the user to connect accounts to the app, and returns the ones they chose (EIP-1102). - [Connections](https://ethect.dev/rpc/wallet/connections.md): The three methods that manage the accounts an app is connected to. Connect with capabilities, disconnect, and add a sub-account. They follow two ERCs that are still drafts. - [Permissions](https://ethect.dev/rpc/wallet/permissions.md): The four methods about what the user lets an app do. Read, ask for and give back the permissions on methods (EIP-2255), and ask for a session key to act for the user (ERC-7715, a draft). - [Wallet.switchEthereumChain](https://ethect.dev/rpc/wallet/switch-ethereum-chain.md): Asks the wallet to make a chain its active one (EIP-3326). A wallet that does not know the chain fails with the reason UnrecognizedChain. - [Wallet.addEthereumChain](https://ethect.dev/rpc/wallet/add-ethereum-chain.md): Suggests a chain for the wallet to add (EIP-3085). Adding a chain does not switch to it. - [Wallet.watchAsset](https://ethect.dev/rpc/wallet/watch-asset.md): Suggests a token for the wallet to track (EIP-747). It is the one method whose params are sent by name, as an object and not as an array. - [Wallet.getAssets](https://ethect.dev/rpc/wallet/get-assets.md): Returns the assets the wallet holds for an account, by chain (ERC-7811, a draft). - [Wallet.personalSign](https://ethect.dev/rpc/wallet/personal-sign.md): Signs a message with an account's key, as an EIP-191 personal_sign message. The message comes first and the address second, the reverse of Eth.sign. - [Wallet.walletSendTransaction](https://ethect.dev/rpc/wallet/wallet-send-transaction.md): Signs and sends a transaction under the wire name wallet_sendTransaction, which some wallets serve instead of eth_sendTransaction. It returns the transaction hash. - [Wallet.sendCalls](https://ethect.dev/rpc/wallet/send-calls.md): Asks the wallet to send a batch of calls, and returns the id of the batch (EIP-5792). - [Call status](https://ethect.dev/rpc/wallet/calls-status.md): The two methods that follow a batch sent with Wallet.sendCalls (EIP-5792). One returns where the batch stands, the other has the wallet show it to the user. - [Wallet.getCapabilities](https://ethect.dev/rpc/wallet/get-capabilities.md): Returns what the wallet can do for an account, by chain. Whether it runs batches atomically, sponsors gas, and so on (EIP-5792). ## Namespaces: Anvil - [The anvil_ methods (Anvil)](https://ethect.dev/rpc/anvil.md): The anvil namespace. What a local test node offers to stage a chain, by setting accounts and state, mining, moving the clock and rewriting history. - [Accounts](https://ethect.dev/rpc/anvil/accounts.md): The five methods that act as an account the node holds no key for. Impersonation, a signature that recovers to any address, and a transaction sent without a signature. - [State](https://ethect.dev/rpc/anvil/state.md): The eight methods that write the state of an account directly. Its balance, its ERC-20 balances and allowances, its code, its nonce and its storage. - [Chain](https://ethect.dev/rpc/anvil/chain.md): The seven methods that change what the chain is and what its next block holds. The chain id, the coinbase, the gas limit, the fees and two header fields. - [Mining](https://ethect.dev/rpc/anvil/mining.md): The eight methods that decide when blocks are mined. Per transaction, on a timer or on request, with mining paused or not. - [Pool](https://ethect.dev/rpc/anvil/pool.md): The three methods that remove transactions from the node's pool before they are mined. One transaction, every transaction of a sender, or all of them. - [Time](https://ethect.dev/rpc/anvil/time.md): The seven methods that read and move the clock of a test node. The timestamp its next blocks get, and the real time at which it mined the latest one. - [History](https://ethect.dev/rpc/anvil/history.md): The five methods that save the chain and bring it back. Snapshots to revert to, the whole state as a blob to load again, and a rollback of the latest blocks. - [Anvil.reorg](https://ethect.dev/rpc/anvil/reorg.md): Replaces the latest blocks of a test node with new ones, and puts the transactions you give in the new blocks you name. - [Node](https://ethect.dev/rpc/anvil/node.md): The three methods about the test node itself. How it is set up, what identifies it, and whether it logs the requests it gets. - [Fork](https://ethect.dev/rpc/anvil/fork.md): The two methods that make a running test node a fork of another chain, or start its chain anew. The endpoint to fork from, and the reset that applies it. - [Blobs](https://ethect.dev/rpc/anvil/blobs.md): The two methods that return the blobs of EIP-4844 transactions a test node has seen. One blob by its versioned hash, or every blob of a transaction. ## Namespaces: Debug - [The debug_ methods (Debug)](https://ethect.dev/rpc/debug.md): The debug namespace. Blocks, transactions and receipts in their encoded form, and executions traced with geth's tracers. - [Raw data](https://ethect.dev/rpc/debug/raw.md): The seven methods that return chain data in its encoded form. A header, a block, transactions, receipts and a block access list as the bytes a node stores and hashes. - [Debug.traceTransaction](https://ethect.dev/rpc/debug/trace-transaction.md): Runs a mined transaction again and traces it. The options name the tracer, and the tracer decides the type of the result. - [Debug.traceCall](https://ethect.dev/rpc/debug/trace-call.md): Runs a call without sending a transaction and traces it, on the state of a block you name, with state and block overrides if you give them. - [Tracing blocks](https://ethect.dev/rpc/debug/trace-block.md): The three methods that run a block again and trace each of its transactions. The block is named by number or tag, by hash, or given RLP-encoded. - [Tracers](https://ethect.dev/rpc/debug/tracers.md): The tracers a Debug.trace call can run. The options of the call select the tracer, and with it the type of the result. ## Namespaces: More namespaces - [The evm_ methods (Evm)](https://ethect.dev/rpc/evm.md): The evm namespace. The names Ganache gave to driving a test node, as anvil serves them. All but mine are an Anvil method under another name. - [The txpool_ methods (Txpool)](https://ethect.dev/rpc/txpool.md): The txpool namespace. What waits in the node's transaction pool, as counts, as transactions in full or as one line of text each. - [The net_ methods (Net)](https://ethect.dev/rpc/net.md): The net namespace. The node's place in the peer-to-peer network, as three methods. Its network id, whether it listens for peers, and how many it has. - [The web3_ methods (Web3)](https://ethect.dev/rpc/web3.md): The web3 namespace. What software the node runs, and a Keccak-256 hash computed by the node. ## Definitions: Method - [Method definitions (Method)](https://ethect.dev/rpc/method.md): A method definition. The wire name of a JSON-RPC method with the schemas of its params and result, which is also the function that calls it. - [Method.make](https://ethect.dev/rpc/method/make.md): Defines a JSON-RPC method with positional params, from the names of its params, its wire name, the schemas of its params and the schema of its result. - [Method.makeByName](https://ethect.dev/rpc/method/make-by-name.md): Defines a JSON-RPC method whose params are one object sent by name, such as wallet_watchAsset. - [Method.overload](https://ethect.dev/rpc/method/overload.md): Groups several definitions of one JSON-RPC method into a single function whose result type depends on its params. ## Definitions: Subscription - [Subscription definitions (Subscription)](https://ethect.dev/rpc/subscription.md): A subscription definition. A kind of eth_subscribe with the schemas of its params and of the items the node pushes, which is also the function that opens it. - [Subscription.make](https://ethect.dev/rpc/subscription/make.md): Defines a kind of eth_subscribe from the names of its params, its name, the schemas of its params and the schema of the items the node pushes. - [Subscription.overload](https://ethect.dev/rpc/subscription/overload.md): Groups several definitions of one subscription kind into a single function whose items depend on its params. ## Wire types - [Types](https://ethect.dev/rpc/types.md): The wire types. What a node or wallet sends and receives, each as an Effect Schema with the TypeScript type it decodes to. ## Wire types: Chain - [Block](https://ethect.dev/rpc/types/block.md): A block as a node returns it, in three shapes. The header alone, the block with the hashes of its transactions, and the block with its transactions in full. - [BlockId](https://ethect.dev/rpc/types/block-id.md): How a call names the block it is about. A block number, a tag such as latest, or an object that names the block by number or by hash. - [Transaction](https://ethect.dev/rpc/types/transaction.md): A transaction as a node returns it. Signed, with its place in the chain, in one of six shapes told apart by their type. - [TransactionRequest](https://ethect.dev/rpc/types/transaction-request.md): A transaction as a caller describes it, for the methods that run, estimate, fill, sign or send one. Every field is optional, and the node or wallet fills in what is missing. - [Receipt](https://ethect.dev/rpc/types/receipt.md): The receipt of a mined transaction. Whether it succeeded, the gas it used, the logs it emitted and the contract it created. - [Log](https://ethect.dev/rpc/types/log.md): An event log as a node returns it. It has the contract that emitted it, its topics and data, and its place in the chain. - [Filter](https://ethect.dev/rpc/types/filter.md): A log filter. It says which logs to match by contract and by topics, over a range of blocks or in one block. - [FeeHistory](https://ethect.dev/rpc/types/fee-history.md): What Eth.feeHistory returns. It holds the base fees, the gas usage and the priority fees of a range of blocks, one array per figure. - [AccessList](https://ethect.dev/rpc/types/access-list.md): An EIP-2930 access list, which names the addresses and storage slots a transaction declares it touches, and the result of Eth.createAccessList. - [Authorization](https://ethect.dev/rpc/types/authorization.md): An EIP-7702 authorization, which is an account's signed permission to run the code of a contract as its own. - [Withdrawal](https://ethect.dev/rpc/types/withdrawal.md): A validator withdrawal, pushed into a block by the consensus layer since the Shanghai fork (EIP-4895). - [Proof](https://ethect.dev/rpc/types/proof.md): The Merkle proof of an account and of some of its storage slots, as eth_getProof returns it (EIP-1186). - [Account](https://ethect.dev/rpc/types/account.md): The state of an account as eth_getAccount returns it. The four fields an account has in the state trie. - [SyncStatus](https://ethect.dev/rpc/types/sync-status.md): What a node reports about its sync. The literal false once it is in sync, or its progress as three block numbers while it is syncing. - [ChainConfig](https://ethect.dev/rpc/types/chain-config.md): The fork configuration a node runs, as eth_config returns it (EIP-7910). The fork in effect, the next one scheduled and the last one the node knows. - [Capabilities](https://ethect.dev/rpc/types/capabilities.md): What history a node keeps, as eth_capabilities returns it. Its head and, for each kind of data, whether the node serves it and from which block. - [BlockAccessList](https://ethect.dev/rpc/types/block-access-list.md): What a block read and wrote, account by account, as eth_getBlockAccessList returns it (EIP-7928). ## Wire types: Execution - [StateOverride](https://ethect.dev/rpc/types/state-override.md): State a call pretends is on chain, per account. It can replace a balance, a nonce, the code or storage slots for the time of one call. - [BlockOverride](https://ethect.dev/rpc/types/block-override.md): Header fields a call pretends its block has. It can replace the number, the timestamp, the gas limit, the fee recipient and the fees for the time of one call. - [Simulate](https://ethect.dev/rpc/types/simulate.md): The types of Eth.simulateV1. A payload says which calls to run in which made-up blocks, and the result is those blocks with the outcome of each call. ## Wire types: Tracing - [Trace](https://ethect.dev/rpc/types/trace.md): The tracers a Debug.trace call can run, as data. The options that select each one, the schema of what it returns, and the shape of a traced block. - [StructLog](https://ethect.dev/rpc/types/struct-log.md): The result of the struct logger, the tracer a Debug.trace call runs when its options name none. One log per opcode executed, and the settings that say what each log captures. - [CallFrame](https://ethect.dev/rpc/types/call-frame.md): The result of the callTracer. An execution as the tree of the calls it made, each call a frame that holds the frames of the calls it made itself. - [Prestate](https://ethect.dev/rpc/types/prestate.md): The result of the prestateTracer. The accounts an execution touched as they were before it and, in diff mode, what became of the ones it changed. ## Wire types: Test node - [MineOptions](https://ethect.dev/rpc/types/mine-options.md): What to mine on a test node. How many blocks, and the timestamp of the first. - [MinedBlock](https://ethect.dev/rpc/types/mined-block.md): A block as a test node returns it right after mining it. The block in full, each transaction with the data its execution returned and why it reverted. - [NodeInfo](https://ethect.dev/rpc/types/node-info.md): How a test node is set up. Its head, its hard fork, its fees and blob parameters, and the endpoint it forks. - [NodeMetadata](https://ethect.dev/rpc/types/node-metadata.md): What identifies a test node. Its version, its chain and head, the chain it was forked from and the snapshots it holds. - [TransactionPool](https://ethect.dev/rpc/types/transaction-pool.md): The node's transaction pool, in four shapes. Its counts, its transactions in full by sender and nonce, those of one sender, and one line of text per transaction. ## Wire types: Wallet - [WalletChain](https://ethect.dev/rpc/types/wallet-chain.md): A chain as an app describes it to a wallet, for wallet_addEthereumChain (EIP-3085). - [WatchAsset](https://ethect.dev/rpc/types/watch-asset.md): A token an app suggests a wallet track, for wallet_watchAsset (EIP-747). - [Permission](https://ethect.dev/rpc/types/permission.md): A wallet permission (EIP-2255). A method the user lets an app call, with the caveats that restrict it, and the request an app makes to get or give back permissions. - [PermissionGrant](https://ethect.dev/rpc/types/permission-grant.md): Permissions for a session key or account to act for a user, as wallet_grantPermissions exchanges them (ERC-7715, a draft). What the app asks for, and what the wallet granted. - [Calls](https://ethect.dev/rpc/types/calls.md): A batch of calls for a wallet to send in order on one chain, and what the wallet answers (EIP-5792). - [CallsStatus](https://ethect.dev/rpc/types/calls-status.md): The status of a batch of calls, as wallet_getCallsStatus returns it (EIP-5792). A status code, whether the batch ran atomically, and the receipts of its transactions. - [WalletCapabilities](https://ethect.dev/rpc/types/wallet-capabilities.md): The optional features of a wallet (EIP-5792), by name. What a wallet reports, what an app asks for with a request, and the capabilities of a wallet by chain. - [WalletAsset](https://ethect.dev/rpc/types/wallet-asset.md): An asset a wallet holds for an account, as wallet_getAssets reports it (ERC-7811, a draft), with the filter that selects assets and the result by chain. - [SubAccount](https://ethect.dev/rpc/types/sub-account.md): A sub-account, a smart account owned by a wallet's main account, for wallet_addSubAccount (ERC-7895, a draft). The account an app asks the wallet to add, and the one the wallet tracks. ## Documentation sets - [Complete documentation](https://ethect.dev/llms-full.txt): every page in one file - [Guides only](https://ethect.dev/llms-small.txt): the introduction, guides and concepts, and the guides of the JSON-RPC layer, without the reference ## Optional - [GitHub repository](https://github.com/maxencerb/ethect) - [npm package](https://www.npmjs.com/package/@ethect/core)