This core package includes basic functional to create, validate both signing proof payload and proof itself.
To use, follow these steps:
-
Install core package:
npm install @daosign/cre
-
Import create payload function:
import { createProofOfAuthorityPayload } from "@daosign/core"
Example usage:
import { createProofOfAuthorityPayload, createSignedProof } from "@daosign/core"
//create payload
function createPayload(signer ,agreementCID, agreementSigners) {
const payload = createProofOfAuthorityPayload({from: signer, agreementCID: agreementCID, signers: agreementSigners});
return payload;
}
function createSignedProof(signer, signingPayload, signature){
const signedPayload = { address:signer, data: signingPayload, sig: signature};
const proofPayload = createSignedProofPayload(signedPayload);
return proofPayload;
}