
Security News
Another Round of TEA Protocol Spam Floods npm, But It’s Not a Worm
Recent coverage mislabels the latest TEA protocol spam as a worm. Here’s what’s actually happening.
@suku/doc-auth-lib
Advanced tools
This is the SUKU Blockchain Document Authenticator Library. It can be used to write blockchain proofs (signed hashes) of files to the blockchain. It expects a deployed version of the [SUKU Ethereum Node API](https://github.com/SukuLab/suku-ethereum-node-a
This is the SUKU Blockchain Document Authenticator Library. It can be used to write blockchain proofs (signed hashes) of files to the blockchain. It expects a deployed version of the SUKU Ethereum Node API.
Note: Before you start, please make sure that you need a deployed version of SUKU Ethereum Node API.
The document authenticator ships as an npm package. It requires the document authenticator smart contract to be deployed to the blockchain.
This package uses SUKU Ethereum Node API Client Lib to connect to an instance of SUKU Ethereum Node API.
@suku/doc-auth-lib is available as an NPM Package.
Use the following command to install the library.
npm i --save @suku/doc-auth-lib
The Doc Authenticator requires a contract that needs to be deployed to the blockchain. If the contract has already been deployed to your network, please skip this section.
If you still need to deploy the contract, you can deploy it manually or use our deploymenty script.
To deploy the contract manually, copy the smart contract code from ./blockchain/contracts/Docauth.sol. Use Remix and MetaMask to deploy the contract to your network. Connect remix to the network of your choice. We recommend Ganache for test purposes.
The document authenticator comes with a helper script that allows for flexible deployment.
deployDocAuth(nodeUrl, privateKey) function to deploy the smart contract to your blockchain.import deployDocAuth from '@suku/doc-auth-lib/dist/deploydocauthenticator';
const nodeUrl = "HTTP://xyz"; // SUKU Ethereum Node API instance
const privateKey = "abc";
deployDocAuth(nodeUrl,privateKey)
.then( async receipt => {
logger.info("Contract deployed. Contract address: " + receipt.contractAddress);
});
The import depends on you ECMAScript version.
For ECMAScript <= ES5 (CommonJS require())
const docAuthLibrary = require('@suku/doc-auth-lib');
For ECMAScript >= ES6 (import)
import DocAuthenicator from '@suku/doc-auth-lib';
CommonJS Example:
const docAuthLibrary = require('@suku/doc-auth-lib');
let docauth = new docAuthLibrary.default(
nodeUrl, // SUKU Ethereum Node API instance
receipt.contractAddress, // contractAddress
privateKey // private key that is used for signing
);
let proofReceipt = await docauth.addProof(fileBuffer, uid);
let docHash = proofReceipt.docHash;
let txReceipt = proofReceipt.txReceipt;
CommonJS Example:
const docAuthLibrary = require('@suku/doc-auth-lib');
let docauth = new docAuthLibrary.default(
nodeUrl, // SUKU Ethereum Node API instance
receipt.contractAddress, // contractAddress
privateKey // private key that is used for signing
);
let docProof = docauth.readProof(buffer);
[2.1.0] - 2020-06-08
@suku/suku-ethereum-node-api-client-lib dependency addedFAQs
This is the SUKU Blockchain Document Authenticator Library. It can be used to write blockchain proofs (signed hashes) of files to the blockchain. It expects a deployed version of the [SUKU Ethereum Node API](https://github.com/SukuLab/suku-ethereum-node-a
We found that @suku/doc-auth-lib demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?

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.

Security News
Recent coverage mislabels the latest TEA protocol spam as a worm. Here’s what’s actually happening.

Security News
PyPI adds Trusted Publishing support for GitLab Self-Managed as adoption reaches 25% of uploads

Research
/Security News
A malicious Chrome extension posing as an Ethereum wallet steals seed phrases by encoding them into Sui transactions, enabling full wallet takeover.