Skip to content

Latest commit

 

History

History
146 lines (89 loc) · 3.84 KB

readme.md

File metadata and controls

146 lines (89 loc) · 3.84 KB

perigee

An HTTP server and CLI tool for performing Azimuth PKI operations for Urbit IDs

image

This is a pure Go utility that you can run as an HTTP server or as a one-off command line tool. It is a wrapper around the L2 roller RPC client spec, but can also do convenient stuff like generating valid networking keys using the default procedural method. This allows you to e.g. breach a ship with a single curl, knowing only the @p and the master ticket (or eth wallet private key). Additionally, it contains a library for casting to @uv in golang, which allows you to generate valid keyfiles to boot your ship -- this removes the dependency on Bridge and allows you to automate PKI updates.

For now it can only commit changes for L2 points.

Set the ROLLER_URL env var for custom roller. Set the ADMIN_TOKEN env var if you want authentication in server mode.

To build: go build -o perigee

To run docker container:

docker build -t perigee
docker run -v $(pwd)/out:/out -p 8080:8080 perigee

Note that you can use the privkey url parameter or --private-key cli arg instead of a master ticket and provide an ethereum wallet private key for an ownership or management address

get-wallet

  • generate a json wallet with key information
server

curl http://localhost:8080/v1/gen/wallet\?ship=\~satmun-wacnup\&ticket=\~sampel-ticket-sampel-ticket\&life\=2

cli
perigee generate-wallet --point=sampel-palnet --master-ticket=sampel-palnet-sampel-palnet

(optional flags: --life, --output-dir; also writes to ./out/sampel-palnet-1-wallet.json unless output path is overriden)


get-keyfile

  • generate a @uv-encoded keyfile to boot a ship
server

curl http://localhost:8080/v1/gen/wallet\?ship=\~satmun-wacnup\&ticket=\~sampel-ticket-sampel-ticket\&life\=2

cli
perigee generate-wallet --point=sampel-palnet --master-ticket=sampel-palnet-sampel-palnet

(optional flags: --life, --output-dir; also writes to ./out/sampel-palnet-1.key unless output path is overriden)


get-point

  • get the azimuth state of a point
server

curl http://localhost:8080/v1/get/point\?point=\~satmun-wacnup

cli
perigee get-point --point=sampel-palnet

get-pending

  • get all pending rollup txos
server

curl http://localhost:8080/v1/get/pending

cli
perigee get-pending

breach

  • continuity breach
server

curl http://localhost:8080/v1/mod/breach?point=sampel-palnet\&ticket=~sampel-palnet-sampel-palnet

cli
perigee breach --point=sampel-palnet --master-ticket=sampel-palnet-sampel-palnet

note you can also use the --wait flag with a length of time (eg 60m, 2h) to watch the roller until it clears the queue


escape

  • escape to a new sponsor
server

curl http://localhost:8080/v1/mod/escape?point=\~satmun-wacnup\&ticket=\~sampel-ticket-sampel-ticket\&sponsor=sampel

cli
perigee escape --point=sampel-palnet --sponsor=sampel --master-ticket=sampel-palnet-sampel-palnet

cancel-escape

  • cancel an escape request
server

curl http://localhost:8080/v1/mod/cancel-escape?ship=\~satmun-wacnup\&ticket=\~sampel-ticket-sampel-ticket\&sponsor=sampel

cli
perigee cancel-escape --point=sampel-palnet adoptee=sampel --master-ticket=sampel-palnet-sampel-palnet

adopt

  • accept an escape request as a sponsor
server

curl http://localhost:8080/v1/mod/escape?ship=\~satmun\&ticket=\~sampel-ticket-sampel-ticket\&adoptee=sampel-palnet

cli
perigee adopt --point=sampel adoptee=sampel-palnet --master-ticket=sampel-palnet-sampel-palnet

Todo

  • L1 breaches