Skip to content

octopus-network/near-light-client-rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

near-light-client-rs

A light client implementation of NEAR protocol, written in Rust language.

Crate near-light-client

This crate defines a minimal interface for NEAR light client and provides default implementation of light client header verification, on-chain state verification and transaction/receipt verification.

This crate is implemented as no-std and tries to keep minimal dependencies. It doesn't include any implementation for data persistence too.

This crate can be used in other Rust based applications which need basic NEAR light client implementation, like Substrate or IBC implementations.

Crate light-client-app-sample

This crate provides a basic implementation of a NEAR light client instance, which uses files to store the state data. It's a CLI application based on abscissa. It provides the following sample functions:

  • Sub-command start - to start a NEAR light client instance which will cache a certain count of consensus states in files.
  • Sub-command verify-membership - to verify the value of a certain storage key of a NEAR account with proof data and optional block height.
  • Sub-command verify-non-membership - to verify that a certain storage key of a NEAR account has NO value with proof data and optional block height.
  • Sub-command verify-transaction - to verify a certain transaction with the latest light client head.
  • Sub-command view-head - to print the head data at a certain height.

The configuration file for the CLI is here.

About

Implementation of NEAR light client in Rust. With a sample cli app for testing.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages