@daosign/core
TypeScript icon, indicating that this package has built-in type declarations

0.1.8 • Public • Published

Daosign Core

DAOsign Core

This core package includes basic functional to create, validate both signing proof payload and proof itself.

Usage

To use, follow these steps:

  1. Install core package:

    npm install @daosign/cre
    
  2. Import create payload function:

    import { createProofOfAuthorityPayload } from "@daosign/core"
    

Example

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;
}

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
0.1.80latest

Version History

VersionDownloads (Last 7 Days)Published
0.1.80
0.1.70
0.1.60
0.1.50
0.1.40
0.1.30
0.1.20
0.1.10
0.1.00

Package Sidebar

Install

npm i @daosign/core

Weekly Downloads

0

Version

0.1.8

License

ISC

Unpacked Size

59.4 kB

Total Files

33

Last publish

Collaborators

  • daosign