Files
heartwood/radicle-cli/examples/rad-delegate.md
T
Fintan Halpenny 5477a3615f radicle-cli: use Did across CLI
The CLI commands and output use PublicKey, ActorId, and NodeId for
peer identifiers.

Instead Did should be standardised for use in CLI arguments and
outputs.

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2023-02-16 17:07:14 +01:00

1.3 KiB

Delegates are the authorized keys that can manage a project's metadata, including adding a new delegate.

Let's list the current set of delegates for a project.

$ rad delegate list rad:z42hL2jL4XNk6K8oHQaSWfMgCL7ji
[
  "did:key:z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi"
]

We want to add a new maintainer to the project to help out with the work.

$ rad delegate add did:key:z6MkjchhfUsD6mmvni8mCdXHw216Xrm9bQe2mBH1P5RDjVJG --to rad:z42hL2jL4XNk6K8oHQaSWfMgCL7ji
Added delegate 'did:key:z6MkjchhfUsD6mmvni8mCdXHw216Xrm9bQe2mBH1P5RDjVJG'
ok Update successful!

Let's convince ourselves that there's another delegate.

$ rad delegate list rad:z42hL2jL4XNk6K8oHQaSWfMgCL7ji
[
  "did:key:z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi",
  "did:key:z6MkjchhfUsD6mmvni8mCdXHw216Xrm9bQe2mBH1P5RDjVJG"
]

And finally, we no longer want to be part of the project so we pass on the torch and remove ourselves from the delegate set.

$ rad delegate remove did:key:z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi --to rad:z42hL2jL4XNk6K8oHQaSWfMgCL7ji
Removed delegate 'did:key:z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi'
ok Update successful!
$ rad delegate list rad:z42hL2jL4XNk6K8oHQaSWfMgCL7ji
[
  "did:key:z6MkjchhfUsD6mmvni8mCdXHw216Xrm9bQe2mBH1P5RDjVJG"
]