This module aims to be an un-opinionated representation of the defined:
API
reader
import { createReader, http } from "@ethernauta/transport";
import { eip155_1, eip155_11155111 } from "@ethernauta/chain";
import { getBlockByHash } from "@ethernauta/eth";
const reader = createReader([
http(
"https://snowy-fragrant-haze.ethereum-sepolia.quiknode.pro/71bd09c56eb85b1c420871faa17483fa65ba8177"
),
]);
const currentChain = eip155_1;
const reader = createReader([
{
chain: eip155_1,
transports: [
http(
"https://doggy-hazelnut-hat.ethereum-mainnet.quiknode.pro/71bd09c56eb85b1c420871faa17483fa65ba4179"
),
http(
"https://doggy-hazelnut-hat.ethereum-mainnet.quiknode.pro/71bd09c56eb85b1c222871faa17483fa65ba6167"
),
],
},
{
chain: eip155_11155111,
transports: [
http(
"https://doggy-hazelnut-hat.ethereum-sepolia.quiknode.pro/71bd09c56eb85b1c420871faa17483fa65ba4179"
),
http(
"https://doggy-hazelnut-hat.ethereum-sepolia.quiknode.pro/71bd09c56eb85b1c222871faa17483fa65ba6167"
),
],
},
]);
const readable = getBlockByHash([
"0x31386e6cfba70bb4d8a95404bdb740572b758a15c62e51ee912071a7b5be9e26",
false,
]);
const block = await readable(reader(eip155_11155111));
const block = await readable(reader(eip155_1));
const block = await readable(reader(eip155_2));
writer
import { walletConnect } from "@ethernauta/connector";
import { createWriter, http } from "@ethernauta/transport";
const writer = createWriter(http(walletConnect()));
Files to pay attention
- base/call/call.ts
- http/http.ts
- json-rpc/json-rpc.ts
- reader/reader.ts
- writer/writer.ts