Coder Social home page Coder Social logo

kyber-evm's Introduction

EVM Runtime Module

The EVM class in this module provides functionality related to the Ethereum Virtual Machine (EVM). It extends the IRuntime interface from the '@kyve/core' package and provides methods to fetch and format blockchain data.

Features

  • Fetching specific blockchain data items
  • Formatting fetched data
  • Setting network settings
  • Generating authorization headers for Coinbase Cloud endpoints

Details

Class Name and Version

The name and version properties are defined from the package.json file.

Method Descriptions

getDataItem(core: Node, key: string): Promise

This method takes a Node and a key as parameters and returns a Promise that resolves to a DataItem. This method is responsible for:

  • Setting up the network settings
  • Generating authorization headers for Coinbase Cloud endpoints
  • Setting up the web3 provider
  • Fetching the blockchain data item
  • Formatting and returning the fetched data

getNextKey(key: string): Promise

This method takes a key as a parameter and returns a Promise that resolves to a string. It's responsible for determining the next key.

formatValue(value: any): Promise

This method takes a value as a parameter and returns a Promise that resolves to a string. It formats the fetched value.

generateCoinbaseCloudHeaders(core: Node): Promise

This private method takes a Node as a parameter and returns a Promise that resolves to an object. It's responsible for generating the required authorization headers for Coinbase Cloud endpoints.

Usage

Please refer to the documentation in the respective methods for more details on their usage.

Dependencies

  • @kyve/core: This package is used for the 'IRuntime' interface and 'DataItem' and 'Node' types.
  • ethers: This package provides the Ethereum JavaScript API and is used for setting up the web3 provider.

Package Details

  • Name: EVM Runtime Module
  • Version: As defined in package.json

Installation

Before you can use the EVM runtime module, you need to install the required dependencies in your project.

npm install @kyve/core ethers

kyber-evm's People

Contributors

tigthor avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.