From 55567025c06440d3c2d4b2e62f27ab731ddd0c19 Mon Sep 17 00:00:00 2001 From: eum602 Date: Thu, 26 Sep 2024 12:53:00 -0500 Subject: [PATCH 1/2] Fix: Update import statements when when loading did registry ABIs Signed-off-by: eum602 --- lib/lac1/lac1Did.js | 4 ++-- lib/lac1/lac1registry.js | 4 ++-- lib/lac1/resolver.js | 2 +- lib/registry.js | 4 ++-- lib/registryrecoverable.js | 2 +- lib/resolver.js | 2 +- package-lock.json | 4 ++-- 7 files changed, 11 insertions(+), 11 deletions(-) diff --git a/lib/lac1/lac1Did.js b/lib/lac1/lac1Did.js index f81266e..1210b8c 100644 --- a/lib/lac1/lac1Did.js +++ b/lib/lac1/lac1Did.js @@ -3,8 +3,8 @@ import DID from "../did.js"; import * as ethers from "ethers"; import base58 from "bs58"; import lacchain from "@lacchain/gas-model-provider"; -import DIDRegistryContractGM from "./DIDRegistryRecoverableGM-270-RC1-1f3dc10f.json"; -import DIDRegistryContract from "./DIDRegistry.json"; +import DIDRegistryContractGM from "./DIDRegistryRecoverableGM-270-RC1-1f3dc10f.json" assert { type: 'json'}; +import DIDRegistryContract from "./DIDRegistry.json" assert { type: 'json'}; import { getResolver } from "./resolver.js"; import Lac1DIDRegistry from "./lac1registry.js"; import basex from "base-x"; diff --git a/lib/lac1/lac1registry.js b/lib/lac1/lac1registry.js index 7f0ff2d..37c3689 100644 --- a/lib/lac1/lac1registry.js +++ b/lib/lac1/lac1registry.js @@ -6,8 +6,8 @@ import { stringToBytes, signData, } from "../utils.js"; -import DIDRegistryContractGM from "./DIDRegistryRecoverableGM-270-RC1-1f3dc10f.json"; -import DIDRegistryContract from "./DIDRegistry.json"; +import DIDRegistryContractGM from "./DIDRegistryRecoverableGM-270-RC1-1f3dc10f.json" assert { type: 'json'}; +import DIDRegistryContract from "./DIDRegistry.json" assert { type: 'json'}; export default class Lac1DIDRegistry extends DIDRegistry { constructor(conf = {}) { super(conf); diff --git a/lib/lac1/resolver.js b/lib/lac1/resolver.js index dc7dc6a..1b19fd1 100644 --- a/lib/lac1/resolver.js +++ b/lib/lac1/resolver.js @@ -1,5 +1,5 @@ import * as ethers from "ethers"; -import DIDRegistryContractGM from "./DIDRegistryRecoverableGM-270-RC1-1f3dc10f.json"; +import DIDRegistryContractGM from "./DIDRegistryRecoverableGM-270-RC1-1f3dc10f.json" assert { type: 'json'}; import lacchain from "@lacchain/gas-model-provider"; import { wrapDidDocument } from "./lac1resolverUtils.js"; import DIDLac1 from "./lac1Did.js"; diff --git a/lib/registry.js b/lib/registry.js index aee96ec..8b09d22 100644 --- a/lib/registry.js +++ b/lib/registry.js @@ -1,7 +1,7 @@ import * as ethers from 'ethers'; import lacchain from "@lacchain/gas-model-provider"; -import DIDRegistryContract from './DIDRegistry.json'; -import DIDRegistryContractOld from './DIDRegistry_old.json'; +import DIDRegistryContract from './DIDRegistry.json' assert { type: 'json'}; +import DIDRegistryContractOld from './DIDRegistry_old.json' assert { type: 'json'}; import { Buffer } from 'buffer' import { attributeToHex, signData, stringToBytes, stripHexPrefix } from "./utils.js"; diff --git a/lib/registryrecoverable.js b/lib/registryrecoverable.js index 943fc89..55fca58 100644 --- a/lib/registryrecoverable.js +++ b/lib/registryrecoverable.js @@ -1,6 +1,6 @@ import DIDRegistry from "./registry.js"; import * as ethers from "ethers"; -import DIDRegistryRecoverableContract from "./DIDRegistryRecoverable.json"; +import DIDRegistryRecoverableContract from "./DIDRegistryRecoverable.json" assert { type: 'json'}; export default class DIDRegistryRecoverable extends DIDRegistry { constructor(conf = {}) { diff --git a/lib/resolver.js b/lib/resolver.js index e122b42..2564050 100644 --- a/lib/resolver.js +++ b/lib/resolver.js @@ -1,6 +1,6 @@ import bs58 from "bs58"; import * as ethers from "ethers"; -import DIDRegistryContract from "./DIDRegistry.json"; +import DIDRegistryContract from "./DIDRegistry.json" assert { type: 'json'}; import DIDDocument from "./document.js"; import { bytes32toString, keyAlgorithms, parseDID } from "./utils.js"; import lacchain from "@lacchain/gas-model-provider"; diff --git a/package-lock.json b/package-lock.json index 2305a9e..5f9b40a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@lacchain/did", - "version": "1.6.3", + "version": "1.7.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@lacchain/did", - "version": "1.6.3", + "version": "1.7.0", "license": "Apache-2.0", "dependencies": { "@lacchain/gas-model-provider": "^1.1.0", From bcb324dd8a16429218d82d7fc883b4c5bf58345f Mon Sep 17 00:00:00 2001 From: eum602 Date: Thu, 26 Sep 2024 13:17:20 -0500 Subject: [PATCH 2/2] Docs: Update supported versions Signed-off-by: eum602 --- README.md | 2 +- package-lock.json | 13 +++++++++++-- package.json | 2 +- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index d5e3e50..0eac9ec 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ It provides the necessary methods and functions to interact with a DID and resol ## Pre-requisites -- NodeJS > 14.4 +- NodeJS > 16.20 or above ## Usage diff --git a/package-lock.json b/package-lock.json index 5f9b40a..a275a07 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@lacchain/did", - "version": "1.7.0", + "version": "1.8.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@lacchain/did", - "version": "1.7.0", + "version": "1.8.0", "license": "Apache-2.0", "dependencies": { "@lacchain/gas-model-provider": "^1.1.0", @@ -2124,6 +2124,7 @@ "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", "dev": true, "dependencies": { "once": "^1.3.0", @@ -2297,6 +2298,7 @@ "version": "7.1.6", "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "deprecated": "Glob versions prior to v9 are no longer supported", "dev": true, "dependencies": { "fs.realpath": "^1.0.0", @@ -2326,6 +2328,7 @@ "version": "3.0.2", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "deprecated": "Rimraf versions prior to v4 are no longer supported", "dev": true, "dependencies": { "glob": "^7.1.3" @@ -2870,6 +2873,7 @@ "version": "7.1.6", "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "deprecated": "Glob versions prior to v9 are no longer supported", "dev": true, "dependencies": { "fs.realpath": "^1.0.0", @@ -3271,6 +3275,7 @@ "version": "7.1.6", "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "deprecated": "Glob versions prior to v9 are no longer supported", "dev": true, "dependencies": { "fs.realpath": "^1.0.0", @@ -3348,6 +3353,7 @@ "version": "3.0.2", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "deprecated": "Rimraf versions prior to v4 are no longer supported", "dev": true, "dependencies": { "glob": "^7.1.3" @@ -3815,6 +3821,7 @@ "version": "7.1.6", "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "deprecated": "Glob versions prior to v9 are no longer supported", "dev": true, "dependencies": { "fs.realpath": "^1.0.0", @@ -3835,6 +3842,7 @@ "version": "3.0.2", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "deprecated": "Rimraf versions prior to v4 are no longer supported", "dev": true, "dependencies": { "glob": "^7.1.3" @@ -3951,6 +3959,7 @@ "version": "7.1.6", "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "deprecated": "Glob versions prior to v9 are no longer supported", "dev": true, "dependencies": { "fs.realpath": "^1.0.0", diff --git a/package.json b/package.json index d53bb80..1eb5863 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@lacchain/did", - "version": "1.7.0", + "version": "1.8.0", "description": "The LACChain DID Method NodeJS Implementation", "author": "Sergio Ceron Figueroa ", "keywords": [