@hyperledger/anoncreds-nodejs
TypeScript icon, indicating that this package has built-in type declarations

0.2.2 • Public • Published

Anoncreds NodeJS

Wrapper for Nodejs around anoncreds-rs

Requirements

This library requires (and has been tested extensively with) Node.js version 18.x. Newer versions might also work, but they have not been tested.

Installation

yarn add @hyperledger/anoncreds-nodejs

Usage

You can import all types and classes from the @hyperledger/anoncreds-nodejs library:

import { Schema } from '@hyperledger/anoncreds-nodejs'

const schema = Schema.create({
  name: 'test',
  version: '1.0',
  issuerId: 'mock:uri',
  attributeNames: ['name', 'age', 'address']
})

// JSON representation
const schemaJson = schema.toJson()

// This can be used as a deconstructor to clear the internal reference to
// the anoncreds object
schema.handle.clear()

Note: If you want to use this library in a cross-platform environment you need to import methods from the @hyperledger/anoncreds-shared package instead. This is a platform independent package that allows to register the native bindings. The @hyperledger/anoncreds-nodejs package uses this package under the hood. See the Anoncreds Shared README for documentation on how to use this package.

Readme

Keywords

none

Package Sidebar

Install

npm i @hyperledger/anoncreds-nodejs

Weekly Downloads

722

Version

0.2.2

License

Apache-2.0

Unpacked Size

156 kB

Total Files

40

Last publish

Collaborators

  • peter.somogyvari
  • hyperledger-ghci
  • hyperledger-lf