@elrondnetwork/attest.web
The Browser implementation of the Elrond Attest service, built using Node.js and Typescript.
Requirements
- Node.js version 14.16.0+
- Npm version 6.14.0+
- Typescript version 4.2.3+
Dependencies
Usage
import { hash } from '@elrondnetwork/attest.web'
const hashResult = await hash(file)
import { attest } from '@elrondnetwork/attest.web'
const authorization = {
token: 'sampleToken',
}
const client = attest({ authorization })
const account = await client.account()
const parameter = {
sha256: 'some hash',
timeStamp: 'some timestamp'
}
const attestations = await client.attestations(parameter)
const input = {
file,
options: {
shouldStoreObject: true
}
}
const createResponse = await client.create(input)
const input = "some existing hash"
const verifyResponse = await client.verify(input)
Exposed types
TokenAuthorization: { baseUrl: string, token: string }
Type to be used for authorizing the client by access token
AttestWeb: { attestations, account, create, verify }
Type of the attest client