1.1.0 • Published 1 year ago

hashkeydid-js v1.1.0

Weekly downloads
-
License
ISC
Repository
-
Last release
1 year ago

HashKey DID JS SDK

Tag License

Javascript module to work with HashKey DID Protocol.

Installation

npm install hashkeydid-js

Usage

hashkeydid-js provides simple access to the HashKey DID Contracts.

DID

DIDSigner and DIDResolverSigner is the core objects to send transactions with HashKey DID Contracts

didSigner = new DIDSigner("private_key")
resolverSigner = new ResolverSigner("private_key")

Example1-register

Registering HashKey DID account with JS SDK.

didSigner.Claim("xxx.key")

Example2-GetName

Querying user address with did name

import {GetAddrByDIDName} from "hashkeydid-js"
// DID name: herro.key
// overrides(optional): {"blockTag": 16513266} (search at block number 16513266)
async function QueryAddrByDIDName(){
    let addr = await GetAddrByDIDName("herro.key", {"blockTag": 16513266})
}
1.1.0

1 year ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago