@anima-protocol/anima
TypeScript icon, indicating that this package has built-in type declarations

0.1.7 • Public • Published

Anima logo Anima logo
JavaScript Implementation

npm version

Anima protocol implementation in JavaScript

This module implements the anima protocol client side, allowing you to generate issuing and sharing request in the browser or in NodeJS.

Install

Anima.js can be installed through the npm registry:

npm install @anima-protocol/anima

Or with yarn:

yarn add @anima-protocol/anima

Create an issuing request

Creating an issuing request is as simple as:

import { Challenges } from "@anima-protocol/anima";

const challenge = Challenges.GetIssuingRequest(
  "anima:schema:your-schema-id",
  // The fields you want to issue
  {
    name: "John Doe",
  },
  // The owner's information
  {
    public_address: "0x0000000000000000000000000000000000000000",
    chain: "EVM",
  },
  // The issuer's information
  {
    id: "your-issuer-id",
    public_address: "0x0000000000000000000000000000000000000000",
    chain: "EVM",
  }
);

console.log(challenge);

The challenge variable will contain the issuing request, which you can then send to your API.

Examples

You can find more examples in the examples folder.

Documentation

You can find the documentation about the anima protocol here.

Readme

Keywords

none

Package Sidebar

Install

npm i @anima-protocol/anima

Weekly Downloads

272

Version

0.1.7

License

MIT

Unpacked Size

25.3 kB

Total Files

34

Last publish

Collaborators

  • afourcat-synaps
  • lucaskeur
  • pierricksynaps
  • raphdal