Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@lodestar/api

Package Overview
Dependencies
Maintainers
0
Versions
1680
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lodestar/api

A Typescript REST client for the Ethereum Consensus API

  • 1.23.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
441
decreased by-73.47%
Maintainers
0
Weekly downloads
 
Created
Source

Lodestar Eth Consensus API

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

This package is part of ChainSafe's Lodestar project

Typescript REST client for the Ethereum Consensus API

Usage

The REST client extends the native Fetch API, it behaves very similar in terms of error and response handling. It returns the same Response object with additional methods to simplify usage and it allows to override all Request options if needed.

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

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

const res = await api.beacon.getStateValidator({stateId: "head", validatorId: 0});

const validator = res.value();

console.log("The validator balance is: ", validator.balance);

Prerequisites

  • NodeJS (LTS)
  • Yarn

What you need

You will need to go over the specification.

Getting started

Contributors

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

License

Apache-2.0 ChainSafe Systems

Keywords

FAQs

Package last updated on 11 Nov 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc