MCPcopy Index your code
hub / github.com/blockcypher/libgrin

github.com/blockcypher/libgrin @v5.1.1

Chat with this repo
repository ↗ · DeepWiki ↗ · release v5.1.1 ↗ · + Follow
337 symbols 690 edges 59 files 262 documented · 78%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

libgrin

CI ISC License Go Reference

libgrin is a golang Grin library for building Grin applications. Currently, it contains the basic consensus parameters, chain, slate structures and proof of work verification code.

The client package contains wrappers around the Grin node foreign/owner API and the wallet foreign/owner API using libgrin.

Requirements

Go 1.14 or newer.

Installation

Linux/macOS

  • Install Go according to the installation instructions here.

  • Run the following commands to obtain libgrin, all dependencies, and build it:

cd $GOPATH/src/github.com/blockcypher/libgrin
go get ./...
go build ./...
  • libgrin (and utilities) is now built and can be used in your program.

Issue Tracker

The integrated github issue tracker is used for this project.

Contributing

Any contribution is more than welcome. Currently libgrin has:

  • Minimal API types.
  • Minimal Core package which includes PoW verification.
  • Client package containing wrappers around Node API (Foreign and Owner) and wallet API (Foreign and Owner).
  • Minimal keychain types
  • Minimal libwallet
  • Minimal p2p types
  • Minimal pool types

Missing parts:

  • Complete wallet
  • Complete keychain
  • All the rest

This project tries to follow as much as possible the official Grin node code structure and Grin-Wallet code structure.

License

libgrin is licensed under the Apache 2.0 license.

Extension points exported contracts — how you extend this code

PowContext (Interface)
PowContext is a generic interface for a solver/verifier providing common interface into Cuckoo-family PoW [5 implementers]
core/pow/types.go

Core symbols most depended-on inside this repo

ValidHeaderVersion
called by 28
core/consensus/consensus.go
new
called by 26
core/pow/types.go
createPoWContext
called by 25
core/pow.go
GraphWeight
called by 25
core/consensus/consensus.go
Request
called by 24
client/rpchttp.go
SecondaryPoWRatio
called by 23
core/consensus/consensus.go
Verify
called by 21
core/pow/types.go
EncryptedRequest
called by 19
client/rpchttp.go

Shape

Method 123
Function 119
Struct 75
TypeAlias 19
Interface 1

Languages

Go100%

Modules by API surface

client/wallet_owner_api.go26 symbols
libwallet/slateversions/v4.go20 symbols
core/consensus/global.go18 symbols
core/transaction.go17 symbols
client/rpchttp.go14 symbols
client/node_foreign_api.go14 symbols
libwallet/types.go13 symbols
core/consensus/types.go13 symbols
core/pow/types.go12 symbols
api/types.go12 symbols
libwallet/slate.go11 symbols
core/consensus/consensus.go10 symbols

For agents

$ claude mcp add libgrin \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact