Skip to main content

Signing Documents (CLI)

graph TD;
subgraph Z[" "]
direction LR
A(Overview)-->B(Creating a DID);
B-->C(Configuring DNS);
C-->D(Creating Raw Document);
D -- CLI -->E(Wrapping Documents - CLI);
D -- Code -->F(Wrapping Documents - Code);
E-->G(Signing Documents - CLI);
F-->H(Signing Documents - Code);
G-->I(Revoking Documents);
H-->I;

click A href "/docs/how-tos/open-attestation/verifiable-documents/dns-did/overview"
click B href "/docs/how-tos/open-attestation/verifiable-documents/dns-did/create"
click C href "/docs/how-tos/open-attestation/verifiable-documents/dns-did/dns"
click D href "/docs/how-tos/open-attestation/verifiable-documents/dns-did/raw-document"
click E href "/docs/how-tos/open-attestation/verifiable-documents/dns-did/wrapping-document/wrapping-document-cli"
click F href "/docs/how-tos/open-attestation/verifiable-documents/dns-did/wrapping-document/wrapping-document-code"
click G href "/docs/how-tos/open-attestation/verifiable-documents/dns-did/signing-document/signing-document-cli"
click H href "/docs/how-tos/open-attestation/verifiable-documents/dns-did/signing-document/signing-document-code"
click I href "/docs/how-tos/open-attestation/verifiable-documents/dns-did/revoking-document"
end

For the current step, you can either opt to use the CLI or Code.

After wrapping the documents and obtaining a merkle root, the documents are ready to be signed. Each documents will be signed individually, and the proof of the signature will be appended into the signed documents.

Signing the documents

tradetrust sign ./wrapped-documents --od ./signed-documents --public-key did:ethr:0xaCc51f664D647C9928196c4e33D46fd98FDaA91D#controller --key 0x7b227ac59116f3eeb2b265422cf3cbfbd244c525961fb297eb52153ec62aa845

In the example above:

✔ success Signed documents saved to ./signed-documents

Verifying the documents

Head over to dev.tradetrust.io, drag and drop in one of the signed documents. The document will be verified, then displayed like in the image below.

Successful verification

🎉 Congratulations, you have completed the getting started guide to create your own Verifiable Document!

Additional information: Revocation of Verifiable Documents

Revoking of Verifiable Documents