An HTTP server and CLI tool for performing Azimuth PKI operations for Urbit IDs
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
- generate a json wallet with key information
curl http://localhost:8080/v1/gen/wallet\?ship=\~satmun-wacnup\&ticket=\~sampel-ticket-sampel-ticket\&life\=2
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)
- generate a
@uv
-encoded keyfile to boot a ship
curl http://localhost:8080/v1/gen/wallet\?ship=\~satmun-wacnup\&ticket=\~sampel-ticket-sampel-ticket\&life\=2
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 the azimuth state of a point
curl http://localhost:8080/v1/get/point\?point=\~satmun-wacnup
perigee get-point --point=sampel-palnet
- get all pending rollup txos
curl http://localhost:8080/v1/get/pending
perigee get-pending
- continuity breach
curl http://localhost:8080/v1/mod/breach?point=sampel-palnet\&ticket=~sampel-palnet-sampel-palnet
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 to a new sponsor
curl http://localhost:8080/v1/mod/escape?point=\~satmun-wacnup\&ticket=\~sampel-ticket-sampel-ticket\&sponsor=sampel
perigee escape --point=sampel-palnet --sponsor=sampel --master-ticket=sampel-palnet-sampel-palnet
- cancel an escape request
curl http://localhost:8080/v1/mod/cancel-escape?ship=\~satmun-wacnup\&ticket=\~sampel-ticket-sampel-ticket\&sponsor=sampel
perigee cancel-escape --point=sampel-palnet adoptee=sampel --master-ticket=sampel-palnet-sampel-palnet
- accept an escape request as a sponsor
curl http://localhost:8080/v1/mod/escape?ship=\~satmun\&ticket=\~sampel-ticket-sampel-ticket\&adoptee=sampel-palnet
perigee adopt --point=sampel adoptee=sampel-palnet --master-ticket=sampel-palnet-sampel-palnet
- L1 breaches