Files
lodestar/packages/api/README.md
Phil Ngo 6bd0310a96 Removing eth2 mentions in documentation and fix links (#3848)
* Remove architecture.md from docs

* Update mkdocs.yml to remove architecture.md

* Remove architecture link from readme

* Remove architecture.md links from depgraph.md

* Remove architecture overview from readme

* Remove eth2 terminology on contributing.md

* remove eth2 references from docs
2022-03-13 17:31:26 -05:00

1.9 KiB

Lodestar Eth Consensus API

Discord ETH Beacon APIs Spec v2.1.0 ES Version Node Version

This package is part of ChainSafe's Lodestar project

Typescript REST client for the Ethereum Consensus API spec

Usage

import {getClient} from "@chainsafe/lodestar-api";
import {config} from "@chainsafe/lodestar-config/default";

const api = getClient(config, {
  baseUrl: "http://localhost:9596",
});

api.beacon
  .getStateValidator(
    "head",
    "0x933ad9491b62059dd065b560d256d8957a8c402cc6e8d8ee7290ae11e8f7329267a8811c397529dac52ae1342ba58c95"
  )
  .then((res) => console.log("Your balance is:", res.data.balance));

Prerequisites

What you need

You will need to go over the specification. You will also need to have a basic understanding of sharding.

Getting started

Contributors

Read our contributors document, submit an issue or talk to us on our discord!

License

Apache-2.0 ChainSafe Systems