Skip to content

Commit

Permalink
cheqd import fix (#480)
Browse files Browse the repository at this point in the history
* Fix `prepublish` for `cheqd-blockchain-api`

* Fix `cheqd` import

* Bump up repository version

* Fixes
  • Loading branch information
olegnn authored Nov 18, 2024
1 parent a55d0f6 commit e44fd43
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 10 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "root",
"version": "0.10.0",
"version": "0.11.0",
"private": true,
"workspaces": [
"packages/*",
Expand Down
6 changes: 6 additions & 0 deletions packages/cheqd-blockchain-api/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @docknetwork/cheqd-blockchain-api

## 0.7.0

### Minor Changes

- Fix `cheqd` import

## 0.6.0

### Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/cheqd-blockchain-api/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@docknetwork/cheqd-blockchain-api",
"version": "0.6.0",
"version": "0.7.0",
"license": "MIT",
"main": "./dist/esm/index.js",
"type": "module",
Expand Down
13 changes: 7 additions & 6 deletions packages/cheqd-blockchain-api/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ import {
MsgUpdateDidDocPayload,
MsgDeactivateDidDocPayload,
protobufPackage as didProtobufPackage,
} from '@cheqd/ts-proto/cheqd/did/v2/index';
} from '@cheqd/ts-proto/cheqd/did/v2/index.js';
import {
MsgCreateResourcePayload,
protobufPackage as resourceProtobufPackage,
} from '@cheqd/ts-proto/cheqd/resource/v2/index';
} from '@cheqd/ts-proto/cheqd/resource/v2/index.js';
import { DIDRef, NamespaceDid } from '@docknetwork/credential-sdk/types';
import { TypedEnum } from '@docknetwork/credential-sdk/types/generic';

Expand Down Expand Up @@ -69,13 +69,14 @@ export class CheqdAPI extends AbstractApiProvider {
Object.values(CheqdNetwork),
)}\``,
);
} else if (!mnemonic) {
throw new Error('`mnemonic` must be provided');
}

this.ensureNotInitialized();
const wallet = mnemonic
&& (await DirectSecp256k1HdWallet.fromMnemonic(mnemonic, {
prefix: 'cheqd',
}));
const wallet = await DirectSecp256k1HdWallet.fromMnemonic(mnemonic, {
prefix: 'cheqd',
});
const options = {
modules: [DIDModule, ResourceModule],
rpcUrl: url,
Expand Down
6 changes: 6 additions & 0 deletions packages/cheqd-blockchain-modules/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @docknetwork/cheqd-blockchain-modules

## 0.7.1

### Patch Changes

- Fix `cheqd` import

## 0.7.0

### Minor Changes
Expand Down
4 changes: 2 additions & 2 deletions packages/cheqd-blockchain-modules/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@docknetwork/cheqd-blockchain-modules",
"version": "0.7.0",
"version": "0.7.1",
"type": "module",
"license": "MIT",
"main": "./dist/esm/index.js",
Expand Down Expand Up @@ -42,7 +42,7 @@
"@babel/plugin-syntax-import-attributes": "^7.25.6",
"@babel/plugin-transform-modules-commonjs": "^7.24.1",
"@babel/preset-env": "^7.24.3",
"@docknetwork/cheqd-blockchain-api": "0.6.0",
"@docknetwork/cheqd-blockchain-api": "0.7.0",
"@rollup/plugin-alias": "^4.0.2",
"@rollup/plugin-babel": "^6.0.4",
"@rollup/plugin-commonjs": "^24.0.0",
Expand Down

0 comments on commit e44fd43

Please sign in to comment.