This is a standalone server which implements the Rosetta API
When complete this will allow cryptocurrency exchanges with this binary to read and write ICPT transactions using a standard interface.
The Rosetta API uses slightly different terminology to us: * Accounts are canisters on our system * Shards are subnets * Mempools are the ingress queue
You can build the Docker image with a GitHub ic
repo checkout:
cd rs/rosetta-api
docker build . \
--file docker/ic-rosetta-api.Dockerfile \
--tag dfinity/rosetta-api
Once the image is built, start Rosetta API server with
docker run \
--interactive \
--tty \
--user $(id -u) \
--publish 8080:8080 \
--rm \
dfinity/rosetta-api
You need nghttp2
. If you have nix,
it’s avaiable as nixpkgs.nghttp2
.
After installing it, assuming dfx
replica is listening at 8080
port,
run this command in another terminal session:
$ nghttpx --backend "127.0.0.1,8080" --frontend "127.0.0.1,2053;no-tls"
This will reforward the connections to 2053
port, supporting
plain-text http2. You can then pass --ic-url http://127.0.0.1:2053
to
ic-rosetta-api
.