Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@suku/doc-auth-lib

Package Overview
Dependencies
Maintainers
3
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@suku/doc-auth-lib

## Usage as a library After contract deployment it can be used as a library.

  • 1.0.5
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-50%
Maintainers
3
Weekly downloads
 
Created
Source

SUKU Doc Authenticator Lib

Usage as a library

After contract deployment it can be used as a library.

Adding a Proof

let docauth = new DocAuthenicator(
        nodeUrl, // nodeUrl
        receipt.contractAddress, // contractAddress
        privateKey // private key that is used for signing
    );

let txReceipt = await docauth.addProof(fileBuffer, uid);

Reading a Proof

let docProof = docauth.readProof(buffer);

Contract Deployment

The Doc Authenticator requires a contract that needs to be deployed to the blockchain. The ./deploydocauthenticator file allows for flexible contract deployment on any blockchain.

import deployDocAuth from './deploydocauthenticator';

const nodeUrl = "HTTP://xyz";
const privateKey = "abc";

deployDocAuth(nodeUrl,privateKey)
.then( async receipt => {
    logger.info("Contract deployed. Contract address: " + receipt.contractAddress);
});

FAQs

Package last updated on 06 Feb 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc