essential-contributions / essential-integration

Integration of Pint and the Essential protocol.
Apache License 2.0
3 stars 1 forks source link

Add minimal CLI tool for content-addressing and signing intent sets #4

Closed mitchmindtree closed 5 months ago

mitchmindtree commented 5 months ago

First raised in https://github.com/essential-contributions/essential-integration/pull/3, we need some minimal, temporary tool (in lieu of better, more comprehensive tooling) that can:

Examples

Intent Set Addresses

Given some compiled intent-set in the form of a JSON file serialized from Vec<Intent>, output the full intent address of each address within a serialized list matching the indices of the original (i.e. Vec<IntentAddress>). This will mean there's some duplication of the set address, but this is probably fine.

essential-intent-address ./intent-set.json

Generate keypair

Generate a new public, private keypair on the CLI.

essential-sign generate-key-pair

Signing intent sets

Similar to above, but serializes to a Signed<Vec<Intent>> after signing with some private key.

essential-sign --private-key $PRIV_KEY intent-set ./intent-set.json
mitchmindtree commented 5 months ago

Closed via #6.