0.2.2 • Published 1 year ago

chia-signing-tools v0.2.2

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

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 tools

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.

import { sign_message, verify } from 'chia-signing-tools';
// Log in with appropriate key and select DID wallet to sign with
const message = await sign_message(did, 'message to sign');
// Verify the signature of a message
const verified = await verify(JSON.stringify(message));
## 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.
0.2.2

1 year ago

0.2.1

1 year ago

0.2.0

1 year ago

0.1.2

1 year ago

0.1.1

1 year ago

0.1.0

1 year ago