Categorygithub.com/statechannels/go-nitro
modulepackage
0.1.2
Repository: https://github.com/statechannels/go-nitro.git
Documentation: pkg.go.dev

# README


go-nitro

Implementation of the Nitro State Channels Framework in Golang and Solidity.

go-nitro is an implementation of a node in a nitro state channel network. It is software that:

  • manages a secret "channel" key
  • crafts blockchain transactions (to allow the user to join and exit the network)
  • crafts, signs, and sends state channel updates to counterparties in the network
  • listens to blockchain events
  • listens for counterparty messages
  • stores important data to allow for recovery from counterparty inactivity / malice
  • understands how to perform these functions safely without risking any funds

Usage

⚠️ Go-nitro is pre-production software ⚠️

Go-nitro can be consumed either as library code or started in an independent process and interfaced with remote procedure calls (recommended).

Contributing

Please see contributing.md

ADRs

Architectural decision records may be viewed here.

Testing

To run unit tests locally, you will need to generate a TLS certificate. Details are here.

On-chain code

The on-chain component of Nitro (i.e. the solidity contracts) are housed in the nitro-protocol directory. This directory contains an yarn workspace with a hardhat / typechain / jest toolchain.

License

Dual-licensed under MIT + Apache 2.0

# Packages

Package abi contains constants which are useful when performing abi encoding and decoding.
Package channel defines types and methods for state channels.
No description provided by the author
Package crypto contains types and functions for creating Ethereum private keys and accounts, and creating/recovering signatures made with such keys.
Package node contains imperative library code for running a go-nitro node inside another application.
No description provided by the author
No description provided by the author
No description provided by the author
Package protocols defines the off-chain protocols for managing channels.
Package rand is a convenience wrapper aroung golang rand go math/rand is deterministic unless a random seed is provided see https://gobyexample.com/random-numbers.
No description provided by the author
Package types defines common types.