@ethernauta/eth
v0.0.3
Published
This module aims to be an un-opinionated representation of the defined:
Downloads
11
Readme
Philosophy
This module aims to be an un-opinionated representation of the defined:
Table of contents
API
import { eip155_1, eth_getBlockByHash } from "@ethernauta/eth";
import { createReader, encodeChainId, http } from "@ethernauta/transport";
const reader = createReader([
{
chainId: "eip155:1",
transports: [
http(
"https://snowy-fragrant-haze.ethereum-sepolia.quiknode.pro/71bd09c56eb85b1c709871faa17483fa65ba8177/"
),
],
},
{
chainId: "eip155:1",
transports: [
http(
"https://snowy-fragrant-haze.ethereum-sepolia.quiknode.pro/x3bdg0c56ebg5b1c70957bfaa17483faxaba81z1/"
),
],
},
]);
const readable = eth_getBlockByHash([
"0x31386e6cfba70bb4d8a95404bdb740572b758a15c62e51ee912071a7b5be9e26",
false,
]);
const chainId = encodeChainId({
namespace: "eip155",
reference: eip155_1.chainId,
});
const block = await readable(reader(chainId));
Files to pay attention
core
block
client
filter
receipt
state
withdrawal
address
addresses
base
- base/byte/byte.ts
- base/bytes/bytes/ts
- base/bytes-8/bytes-8.ts
- base/bytes-32/bytes-32.ts
- base/bytes-48/bytes-48.ts
- base/bytes-65/bytes-65.ts
- base/bytes-256/bytes-256.ts
- base/bytes-max-32/bytes-max-32.ts
- base/hash-32/hash-32.ts
- base/not-found/not-found.ts
- base/ratio/ratio.ts
- base/uint/uint.ts
- base/uint-64/uint-64.ts
- base/uint-256/uint-256.ts
transaction
- transaction/1559/1559.ts
- transaction/2930/2930.ts
- transaction/4844/4844.ts
- transaction/access-list/access-list.ts
- transaction/generic/generic.ts
- transaction/info/info.ts
- transaction/legacy/legacy.ts
- transaction/signed/signed.ts
- transaction/unsigned/unsigned.ts
chain
abi
error
client
shared
function
- function/shared/shared.ts
- function/function/function.ts
- function/constructor/constructor.ts
- function/fallback/fallback.ts
- function/receive/receive.ts
- error/error.ts
client
shared
function
- function/shared/shared.ts
- function/function/function.ts
- function/constructor/constructor.ts
- function/fallback/fallback.ts
- function/receive/receive.ts
method
eip-1102
block
- block/get-block-by-hash/get-block-by-hash.ts
- block/get-block-by-number/get-block-by-number.ts
- block/get-block-receipts/get-block-receipts.ts
- block/get-block-transaction-count-by-hash/get-block-transaction-count-by-hash.ts
- block/get-block-transaction-count-by-number/get-block-transaction-count-by-number.ts
- block/get-uncle-count-by-block-hash/get-uncle-count-by-block-hash.ts
- block/get-uncle-count-by-block-number/get-uncle-count-by-block-number.ts
- block/get-block-by-hash/get-block-by-hash.ts
- block/get-block-by-number/get-block-by-number.ts
client
- client/accounts/accounts.ts
- client/block-number/block-number.ts
- client/chain-id/chain-id.ts
- client/coinbase/coinbase.ts
- client/syncing/syncing.ts
execute
- execute/call/call.ts
- execute/create-access-list/create-access-list.ts
- execute/estimate-gas/estimate-gas.ts
fee-market
- fee-market/fee-history/fee-history.ts
- fee-market/gas-price/gas-price.ts
- fee-market/max-priority-fee-per-gas/max-priority-fee-per-gas.ts
filter
- filter/get-filter-changes/get-filter-changes.ts
- filter/get-filter-logs/get-filter-logs.ts
- filter/get-logs/get-logs.ts
- filter/new-block-filter/new-block-filter.ts
- filter/new-filter/new-filter.ts
- filter/new-pending-transaction-filter/new-pending-transaction-filter.ts
- filter/uninstall-filter/uninstall-filter.ts
sign
state
- state/get-balance/get-balance.ts
- state/get-code/get-code.ts
- state/get-proof/get-proof.ts
- state/get-storage-at/get-storage-at.ts
- state/get-transaction-count/get-transaction-count.ts
submit
transaction
- transaction/get-transaction-by-block-hash-and-index/get-transaction-by-block-hash-and-index.ts
- transaction/get-transaction-by-block-number-and-index/get-transaction-by-block-number-and-index.ts
- transaction/get-transaction-by-hash/get-transaction-by-hash.ts
- transaction/get-transaction-receipt/get-transaction-receipt.ts