GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - shapeshift/unchained: Unchained is a multi-blockchain backend interface

BranchesTags
Open more actions menu

Latest commit

 

History

1,464 Commits
1,464 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
.husky
.husky
 
 
.yarn
.yarn
 
 
docs
docs
 
 
go
go
 
 
node
node
 
 
.eslintignore
.eslintignore
 
 
.eslintrc
.eslintrc
 
 
.gitignore
.gitignore
 
 
.lintstagedrc.json
.lintstagedrc.json
 
 
.nvmrc
.nvmrc
 
 
.prettierignore
.prettierignore
 
 
.prettierrc
.prettierrc
 
 
.yarnrc.yml
.yarnrc.yml
 
 
CLAUDE.md
CLAUDE.md
 
 
CONTRIBUTING.MD
CONTRIBUTING.MD
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
docker-compose.yml
docker-compose.yml
 
 
package.json
package.json
 
 
tsconfig.json
tsconfig.json
 
 
yarn.lock
yarn.lock
 
 

Repository files navigation

Introduction

ShapeShift ShapeShift ShapeShift CI

Unchained is a multi-blockchain backend interface with three main goals:

  1. Provide a common interface to multiple blockchains
  2. Provide additional information not always accessible from the node directly
  3. Provide realtime updates about blockchain transactions (pending and confirmed)

Table Of Contents

  • Introduction
  • Table Of Contents
  • Helpful Docs
  • Coin Stack Components
  • Architecture Diagrams
  • Deployment
  • Local Networking
  • Setup
  • Docker-Compose Local Dev Instructions
    • Prerequisites
    • Running
  • Common Issues

Helpful Docs

  • Railway
  • OpenAPI

Coin Stack Components

  • Node - coin specific node daemon providing historical blockchain data (ex. bitcoind, geth, etc)
  • Indexer - optional service that indexes transaction and balance history by address, or any other applicable information, if not provided by the node directly
  • API - provides a base set of functionality via REST and WebSocket that can be extended with coin specific logic

Architecture Diagrams

With Indexer No Indexer

Deployment

Coinstacks are deployed to Railway. Each coinstack API has a railway.json config in its api/ directory that defines the build and deploy settings. Railway auto-deploys from the repository on push.

Notes

  • The ethereum coinstack is used in all examples. If you wish to run a different coinstack, just replace ethereum with the coinstack name you wish to run
  • All paths are relative to the root unchained project directory (ex. unchained/[go|node]/{path})

Local Networking

We use traefik as a reverse-proxy to expose all of our docker containers. Traefik is exposed at port 80. Traefik Dashboard is exposed at port 8080

Traefik routes requests based on host name. which includes the coinstack name. For Example:

  • api.ethereum.localhost

Setup

  • Each language subdirectory has setup requirements before running a coinstack locally
    • Go - unchained/go
    • Node - unchained/node
  • Both go and node module have linter installed in git pre-commit hook. To set up the hook:
    yarn

Docker-Compose Local Dev Instructions

Prerequisites

  • Install docker-compose

Running

  • Install node dependencies

    yarn
  • Start the reverse proxy and any common service (ex. hot reloading):

    docker-compose up -d

    Note: -d runs the containers in daemon (background) mode. If you want to see logs, -d can be omitted.

  • Start a coinstack:

    cd node/coinstacks/ethereum
    cp sample.env .env // make sure to populate the .env file with valid API keys if required
    docker-compose up
  • Visit http://api.ethereum.localhost/docs to view the OpenAPI documentation for the API

  • Tear down a coinstack (including docker volumes):

    cd node/coinstacks/ethereum && docker-compose down

Common Issues

  • If you are running Docker Desktop and see any SIGKILL errors, increase your resource limits in the Resources Tab.

  • Mac OS: when running one of the go coinstacks via docker-compose on, you might encounter an issue with the service failing to start indefinitely. This is due to Mac OS network security blocking the service from starting. To work around that issue, run the coinstack directly from CLI:

    cd go && go run cmd/cosmos/main.go -env=cmd/cosmos/.env

    This will trigger the security popup, allow the go process to make the network calls. Once you approve it, you can kill the process and restart docker-compose. The app should start immediately.

  • Mac OS: once you start a coinstack you should be able to access unchained in the browser without further config, but for CLI access to work you need to modify /etc/hosts and add a valid DNS entry:

    127.0.0.1 localhost api.cosmos.localhost // add a new alias for the coinstack

About

Unchained is a multi-blockchain backend interface

Topics

blockbookblockchaindocker-composeopenapipulumi-kubernetes

Resources

Readme
MIT license

Contributing

Contributing
Activity
Custom properties

Stars

91 stars

Watchers

10 watching

Forks

49 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.