Skip to content

Mapping relationship between multi-chain's addresses and accounts

License

Notifications You must be signed in to change notification settings

zgayjjf/das-account-indexer

 
 

Repository files navigation

Das-Account-Indexer

This repo introduces a simple server, which provided some APIs for search DAS account's records or reverse records

Prerequisites

  • Ubuntu >= 18.04
  • MYSQL >= 8.0
  • go version >= 1.15.0
  • Redis >= 5.0 (for cache, not necessary)
  • ckb-node + ckb-indexer

ckb-node: https://github.com/nervosnetwork/ckb

ckb-indexer: https://github.com/nervosnetwork/ckb-indexer

ckb-node and ckb-indexer need to be synchronized to the latest height.

Install & Run

Source Compile

# get the code
git clone https://github.com/dotbitHQ/das-account-indexer.git

# init config/config.yaml for your own convenient
cp config/config.example.yaml config/config.yaml

# create mysql database
mysql -uroot -p
> create database das_account_indexer;
> quit;

# compile and run
cd das-account-indexer
make default
./das_account_indexer_server --config=config/config.yaml
# it will take about 3 hours to synchronize to the latest data(Dec 15, 2021)

Docker

  • docker >= 20.10
  • docker-compose >= 2.2.2
sudo curl -L "https://github.com/docker/compose/releases/download/v2.2.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
docker-compose up -d

if you already have a mysql installed, just run

docker run -dp 8121-8123:8121-8123 -v $PWD/config/config.yaml:/app/config/config.yaml --name das-indexer-server slagga/das-indexer

API Usage

Here are the APIs details.

  • If you are a newcomer, just read API List
  • If you are come from das_account_indexer, you probably need do nothing, the new APIs are compatible with the old ones. More details see deprecated-api-list, but we still suggest you replace with the corresponding new APIs

Others

About

Mapping relationship between multi-chain's addresses and accounts

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 98.6%
  • Other 1.4%