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 - https-github-com-goodman-ops/blockatlas: Clean and lightweight cross-chain transaction API

BranchesTags
Open more actions menu
 
 

Latest commit

 

History

680 Commits
680 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
api
api
 
 
cmd
cmd
 
 
coin
coin
 
 
config
config
 
 
docs
docs
 
 
k8s
k8s
 
 
marketdata
marketdata
 
 
observer
observer
 
 
pkg
pkg
 
 
platform
platform
 
 
services/assets
services/assets
 
 
storage
storage
 
 
test
test
 
 
.editorconfig
.editorconfig
 
 
.gitignore
.gitignore
 
 
CODE_OF_CONDUCT.md
CODE_OF_CONDUCT.md
 
 
CONTRIBUTING.md
CONTRIBUTING.md
 
 
Dockerfile
Dockerfile
 
 
LICENSE
LICENSE
 
 
Makefile
Makefile
 
 
Procfile
Procfile
 
 
README.md
README.md
 
 
app.json
app.json
 
 
azure-pipelines.yml
azure-pipelines.yml
 
 
config.yml
config.yml
 
 
go.mod
go.mod
 
 
go.sum
go.sum
 
 
main.go
main.go
 
 

Repository files navigation

Block Atlas by Trust Wallet

Go Version GoDoc Build Status Codacy Badge Go Report Card Docker

BlockAtlas is a clean explorer API and transaction observer for cryptocurrencies.

BlockAtlas connects to nodes or explorer APIs of the supported coins and maps transaction data, account transaction history and market data into a generic, easy to work with JSON format. It is in production use at the Trust Wallet app, the official cryptocurrency wallet of Binance. Also is in production at the BUTTON Wallet, Telegram based non-custodial wallet. The observer API watches the chain for new transactions and generates notifications by webhooks.

Supported Coins

Setup

Requirements

  • Go Toolchain versions 1.13+
  • Redis instance (Transaction Observer only)

From Source

# Download source to $GOPATH
go get -u github.com/trustwallet/blockatlas
cd $(go env GOPATH)/src/github.com/trustwallet/blockatlas

# Start API server at port 8420
go build -o blockatlas . && ./blockatlas api :8420

# Start Observer
go build -o blockatlas . && ./blockatlas observer

# Start sync worker for market prices and rates
go build -o blockatlas . && ./blockatlas sync-markets

Docker

From Docker Hub:

docker run -it -p 8420:8420 trustwallet/blockatlas

Build and run from local Dockerfile:

docker build -t blockatlas .
docker run -p 8420:8420 blockatlas

Heroku

Deploy

Configuration

Block Atlas can run just fine without configuration. By default, all coins offering public RPC/explorer APIs are enabled.

If you want to use custom RPC endpoints, or enable coins without public RPC (like Nimiq), you can configure Block Atlas over config.yml or environment variables.

Config File

Config is loaded from config.yml if it exists in the working directory. The repository includes a default config for reference with all available config options.

Example (config.yml):

nimiq:
  api: http://localhost:8648
#...

Environment

The rest gets loaded from environment variables. Every config option is available under the ATLAS_ prefix. Nested keys are joined via _ (Example nimiq.api => NIMIQ_API)

Example:

ATLAS_NIMIQ_API=http://localhost:8648

Docs

Swagger API docs provided at path /swagger/index.html

Updating Docs

  • After creating a new route, add comments to your API source code, See Declarative Comments Format.

  • Download Swag for Go by using:

    $ go get -u github.com/swaggo/swag/cmd/swag

  • Run the Swag in your Go project root folder.

    $ swag init

Metrics

The Blockatlas can collect and expose by expvar's, metrics about the application healthy and clients and server requests. Prometheus or another service can collect metrics provided from the /metrics endpoint.

To protect the route, you can set the environment variables METRICS_API_TOKEN, and this route starts to require the auth bearer token.

Contributing

If you'd like to add support for a new blockchain, feel free to file a pull request. Note that most tokens that run on top of other chains are already supported and don't require code changes (e.g. ERC-20).

The best way to submit feedback and report bugs is to open a GitHub issue. Please be sure to include your operating system, version number, and steps to reproduce reported bugs.

More resources for developers are in CONTRIBUTING.md.

About

Clean and lightweight cross-chain transaction API

trustwallet.com

Resources

Readme
MIT license

Code of conduct

Code of conduct

Contributing

Contributing
Activity
Custom properties

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402520 — 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.