mikehw / chia-signing-tools

Chia Network message signing tools

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Chia DID Signing Tools

Proposed Signing Protocol

As a first step to establishing a decentralized DID reputation and trust graph system, this package demonstrates a protocol for signing and verifying messages from Chia DIDs using the Chia Wallet RPC.

DID-Signed messages are JSON strings in the format

{
  "did": "DID",
  "msg": "body",
  "sig": "signature"
}

sig is generated by DID's Wallet signing the msg string.

NFT-Signed messages are JSON strings in the format

{
  "nft": "nft1...",
  "col": "col1...",
  "msg": "body",
  "sig": "signature",
  "pubkey": "public key used to sign"
}

sig is generated by NFT signing the msg string.

Using the utility

For version 0.2.x you must be running the chia wallet to sign and verify the message.

chia-agent is used to interact with the chia daemon and wallet.

Sign a message

Execute npx -p chia-signing-cli did-sign

If you have more than one key, you will be prompted to select the key to sign with.

Verify a message

Execute npx -p chia-signing-cli verify

Version Compatibility

Version 0.1.x used the property "message" instead of "msg" in the JSON message format, and signed both the did and the message. Version 0.2.x uses the property "msg" and only signs the message. The verify command will accept either format.

About

Chia Network message signing tools


Languages

Language:TypeScript 95.3%Language:JavaScript 4.7%