Security News
ESLint is Now Language-Agnostic: Linting JSON, Markdown, and Beyond
ESLint has added JSON and Markdown linting support with new officially-supported plugins, expanding its versatility beyond JavaScript.
@elrondnetwork/attest.node
Advanced tools
The Node implementation of the __Elrond Attest__ service, built using [Node.js](https://nodejs.org/en/) and [Typescript](https://www.typescriptlang.org/).
The Node implementation of the Elrond Attest service, built using Node.js and Typescript.
// Creating a hash
import { hash } from '@elrondnetwork/attest.node'
// (input: Input) => Promise<HashResult>
const hashResult = await hash({ path: 'path/to/file' })
// Creating the attest client
import { attest } from '@elrondnetwork/attest.node'
// Only one of the following fields should be used at once
const authorization = {
token: 'sampleToken', // if you want to authorize the client using an access token
apiKey: 'sampleApiKey' // if you want to authorize the client using an api key
}
const client = attest({ authorization })
// The client can then be used to access the attestation functions
// Creating an attestation
const input = {
path: '/path/to/file', // Path to the file to be attested
onProgress: progress => {}, // Optional callback to track attestation progress
options: {
shouldStoreObject: true // Flag to store generated object alongside attestation
}
}
// (input: Input) => Promise<Result>
const createResponse = await client.create(input)
// Verifying if a file is already attested
const input = {
sha256: 'some existing hash',
path: 'path/to/file', // To be used instead of the sha256 field
onProgress: progress => {} // Optional callback to track verification progress
}
const verifyResponse = await client.verify(input)
TokenAuthorization: { baseUrl: string, token: string }
Type to be used for authorizing the client by access token
ApiKeyAuthorization: { baseUrl: string, apiKey: string }
Type to be used fot authorizing the client by api key
NodeAttest: { create, verify }
Type of the attest client
FAQs
The Node implementation of the __Elrond Attest__ service, built using [Node.js](https://nodejs.org/en/) and [Typescript](https://www.typescriptlang.org/).
We found that @elrondnetwork/attest.node demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 12 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
ESLint has added JSON and Markdown linting support with new officially-supported plugins, expanding its versatility beyond JavaScript.
Security News
Members Hub is conducting large-scale campaigns to artificially boost Discord server metrics, undermining community trust and platform integrity.
Security News
NIST has failed to meet its self-imposed deadline of clearing the NVD's backlog by the end of the fiscal year. Meanwhile, CVE's awaiting analysis have increased by 33% since June.