Giter Site home page Giter Site logo

ckb-rich-node's Introduction

ckb-rich-node

A ckb node with indexer

Usage

Local build

docker build -t ckb-rich-node .
docker run --name ckb-rich-node-mainnet -d -e CKB_VERSION=0.32.0 -e NETWORK=mainnet -p 8117:8117 -v "$PWD/data":/data ckb-rich-node
docker run --name ckb-rich-node-testnet -d -e CKB_VERSION=0.32.0 -e NETWORK=testnet -p 8117:8117 -v "$PWD/data":/data ckb-rich-node

Pull from DockerHub

docker pull ququzone/ckb-rich-node
docker run --name ckb-rich-node-mainnet -d -e CKB_VERSION=0.32.0 -e NETWORK=mainnet -p 8117:8117 -v "$PWD/data":/data ququzone/ckb-rich-node
docker run --name ckb-rich-node-testnet -d -e CKB_VERSION=0.32.0 -e NETWORK=testnet -p 8117:8117 -v "$PWD/data":/data ququzone/ckb-rich-node

CKB node RPC

echo '{
    "id": 2,
    "jsonrpc": "2.0",
    "method": "get_blockchain_info",
    "params": []
}' \
| tr -d '\n' \
| curl -H 'content-type: application/json' -d @- \
http://localhost:8117/rpc

More RPC method can be refer ckb rpc docs

CKB indexer RPC

echo '{
    "id": 2,
    "jsonrpc": "2.0",
    "method": "get_cells",
    "params": [
        {
            "script": {
                "code_hash": "0x9bd7e06f3ecf4be0f2fcd2188b23f1b9fcc88e5d4b65a8637b17723bbda3cce8",
                "hash_type": "type",
                "args": "0x8211f1b938a107cd53b6302cc752a6fc3965638d"
            },
            "script_type": "lock"
        },
        "asc",
        "0x64"
    ]
}' \
| tr -d '\n' \
| curl -H 'content-type: application/json' -d @- \
http://localhost:8117/indexer

More RPC method can be refer ckb-indexer

ckb-rich-node's People

Contributors

muxueqz avatar ququzone avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.