Skip to content

Commit

Permalink
Merge pull request #470 from docknetwork/fix-missing-exports
Browse files Browse the repository at this point in the history
 Fix remaining exports from the `vc` module
  • Loading branch information
cykoder authored Nov 5, 2024
2 parents ff0c181 + d1d0c2e commit 12abd95
Show file tree
Hide file tree
Showing 21 changed files with 76 additions and 119 deletions.
9 changes: 9 additions & 0 deletions examples/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# @docknetwork/sdk-examples

## 0.4.1

### Patch Changes

- Updated dependencies
- @docknetwork/credential-sdk@0.6.0
- @docknetwork/dock-blockchain-api@0.4.1
- @docknetwork/dock-blockchain-modules@0.5.1

## 0.4.0

### Minor Changes
Expand Down
8 changes: 4 additions & 4 deletions examples/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@docknetwork/sdk-examples",
"private": true,
"type": "module",
"version": "0.4.0",
"version": "0.4.1",
"scripts": {
"bbs-dock-example": "babel-node ./bbs-dock.js",
"claim-deduction-example": "babel-node ./claim-deduction.js",
Expand All @@ -19,9 +19,9 @@
"lint": "eslint \"*.js\""
},
"dependencies": {
"@docknetwork/credential-sdk": "0.5.0",
"@docknetwork/dock-blockchain-api": "0.4.0",
"@docknetwork/dock-blockchain-modules": "0.5.0"
"@docknetwork/credential-sdk": "0.6.0",
"@docknetwork/dock-blockchain-api": "0.4.1",
"@docknetwork/dock-blockchain-modules": "0.5.1"
},
"devDependencies": {
"babel-eslint": "^10.1.0",
Expand Down
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.5.0",
"version": "0.6.0",
"private": true,
"workspaces": [
"packages/*",
Expand Down
7 changes: 7 additions & 0 deletions packages/cheqd-blockchain-modules/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# @docknetwork/cheqd-blockchain-modules

## 0.5.1

### Patch Changes

- Updated dependencies
- @docknetwork/credential-sdk@0.6.0

## 0.5.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.5.0",
"version": "0.5.1",
"type": "module",
"license": "MIT",
"main": "./dist/esm/index.js",
Expand Down Expand Up @@ -28,7 +28,7 @@
"node": ">=18.0.0"
},
"dependencies": {
"@docknetwork/credential-sdk": "0.5.0"
"@docknetwork/credential-sdk": "0.6.0"
},
"devDependencies": {
"@babel/cli": "^7.24.1",
Expand Down
6 changes: 6 additions & 0 deletions packages/credential-sdk/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @docknetwork/credential-sdk

## 0.6.0

### Minor Changes

- Fix remaining exports from the `vc` module

## 0.5.0

### Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/credential-sdk/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@docknetwork/credential-sdk",
"version": "0.5.0",
"version": "0.6.0",
"license": "MIT",
"type": "module",
"files": [
Expand Down
2 changes: 1 addition & 1 deletion packages/credential-sdk/src/types/did/document.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import {
Ed255192020VerKeyName,
Ed25519VerKeyName,
Sr25519VerKeyName,
} from '../../vc/custom_crypto';
} from '../../vc/crypto';
import {
PublicKeyEd25519,
PublicKeySecp256k1,
Expand Down
2 changes: 1 addition & 1 deletion packages/credential-sdk/src/types/did/onchain/did-key.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import {
Bls12381BBS23DockVerKeyName,
Bls12381BBSDockVerKeyName,
Bls12381PSDockVerKeyName,
} from '../../../vc/custom_crypto';
} from '../../../vc/crypto';

/**
* Class representing either of possible DidKeys.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {
Bls12381BBS23DockVerKeyName,
Bls12381BBSDockVerKeyName,
Bls12381PSDockVerKeyName,
} from '../../../vc/custom_crypto';
} from '../../../vc/crypto';
import {
BBSPublicKeyValue,
BBSPlusPublicKeyValue,
Expand Down
20 changes: 10 additions & 10 deletions packages/credential-sdk/src/vc/credentials.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,27 +15,27 @@ import defaultDocumentLoader from './document-loader';
import { getAndValidateSchemaIfPresent } from './schema';
import {
checkRevocationRegistryStatus,
DockRevRegQualifier,
getCredentialStatus,
isAccumulatorRevocationStatus,
isRegistryRevocationStatus,
RevRegType,
} from './revocation';

import {
getSuiteFromKeyDoc,
expandJSONLD,
getKeyFromDIDDocument,
processIfKvac,
} from './helpers';
import {
DockRevRegQualifier,
RevRegType,
DEFAULT_CONTEXT_V1_URL,
credentialContextField,
PrivateStatusList2021EntryType,
DockStatusList2021Qualifier,
StatusList2021EntryType,
PrivateStatusList2021Qualifier,
} from './constants';

import {
getSuiteFromKeyDoc,
expandJSONLD,
getKeyFromDIDDocument,
processIfKvac,
} from './helpers';
import { ensureValidDatetime } from '../utils/type-helpers';

import {
Expand All @@ -58,7 +58,7 @@ import {
Bls12381BBS23SigDockSigName,
Bls12381BBDT16MacDockName,
Bls12381BBDT16MacProofDockName,
} from './custom_crypto';
} from './crypto';
import { signJWS } from './jws';
import Bls12381BBDT16MACProofDock2024 from './crypto/Bls12381BBDT16MACProofDock2024';

Expand Down
72 changes: 0 additions & 72 deletions packages/credential-sdk/src/vc/custom_crypto.js

This file was deleted.

2 changes: 1 addition & 1 deletion packages/credential-sdk/src/vc/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {
Bls12381PSDockVerKeyName,
JsonWebSignature2020,
Ed25519Signature2020,
} from './custom_crypto';
} from './crypto';
import {
Bls12381BBDT16DockVerKeyName,
Bls12381BBDT16MacDockName,
Expand Down
26 changes: 11 additions & 15 deletions packages/credential-sdk/src/vc/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import { signPresentation, verifyPresentation } from './presentations';
import { issueCredential, verifyCredential } from './credentials';

import { DEFAULT_TYPE, DEFAULT_CONTEXT } from './constants';
import { verifyPresentation } from './presentations';
import { verifyCredential } from './credentials';

/**
* Check that credential is verified, i.e. the credential has VCDM compliant structure and the `proof`
Expand All @@ -28,20 +26,18 @@ export async function isVerifiedPresentation(presentation, params) {
return result.verified;
}

// TODO: export more methods supplied in revocation/credentials
export {
verifyCredential,
issueCredential,
signPresentation,
verifyPresentation,
DEFAULT_TYPE,
DEFAULT_CONTEXT,
};

export { default as Presentation } from './presentation';
export { default as VerifiableCredential } from './verifiable-credential';
export { default as VerifiablePresentation } from './verifiable-presentation';
export { default as StatusList2021Credential } from './status-list2021-credential';
export { default as PrivateStatusList2021Credential } from './private-status-list2021-credential';
export * from './credentials';
export * from './helpers';
export { validateCredentialSchema } from './schema';
export * from './schema';
export * from './constants';
export { default as CredentialIssuancePurpose } from './CredentialIssuancePurpose';
export { default as documentLoader } from './document-loader';
export * from './jws';
export * from './presentations';
export * from './revocation';
export * from './crypto';
2 changes: 1 addition & 1 deletion packages/credential-sdk/src/vc/presentation.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import defaultDocumentLoader from './document-loader';
import {
Bls12381BBSSignatureDock2023,
Bls12381PSSignatureDock2023,
} from './custom_crypto';
} from './crypto';
import Bls12381BBDT16MACDock2024 from './crypto/Bls12381BBDT16MACDock2024';

import { isCredVerGte060 } from './crypto/common/DockCryptoSignature';
Expand Down
2 changes: 1 addition & 1 deletion packages/credential-sdk/src/vc/presentations.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ import {
Bls12381BBSSignatureDock2022,
Bls12381BBSSignatureDock2023,
Bls12381PSSignatureDock2023,
} from './custom_crypto';
} from './crypto';

const { AuthenticationProofPurpose } = jsigs.purposes;

Expand Down
3 changes: 0 additions & 3 deletions packages/credential-sdk/src/vc/revocation.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import {
KB_UNI_ACCUMULATOR_24,
} from '@docknetwork/crypto-wasm-ts';
import { randomAsHex, u8aToHex } from '../utils/bytes';
import { OneOfPolicy } from '../types/policy';

import {
RevRegType,
Expand Down Expand Up @@ -142,5 +141,3 @@ export async function checkRevocationRegistryStatus(

return { verified: true };
}

export { OneOfPolicy, RevRegType, DockRevRegQualifier };
7 changes: 7 additions & 0 deletions packages/dock-blockchain-api/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# @docknetwork/dock-blockchain-api

## 0.4.1

### Patch Changes

- Updated dependencies
- @docknetwork/credential-sdk@0.6.0

## 0.4.0

### Minor Changes
Expand Down
4 changes: 2 additions & 2 deletions packages/dock-blockchain-api/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@docknetwork/dock-blockchain-api",
"version": "0.4.0",
"version": "0.4.1",
"license": "MIT",
"main": "./dist/esm/index.js",
"type": "module",
Expand Down Expand Up @@ -84,7 +84,7 @@
"@polkadot/api": "10.12.4"
},
"dependencies": {
"@docknetwork/credential-sdk": "0.5.0",
"@docknetwork/credential-sdk": "0.6.0",
"@docknetwork/node-types": "^0.17.0",
"@juanelas/base64": "^1.0.5",
"@polkadot/api": "10.12.4",
Expand Down
7 changes: 7 additions & 0 deletions packages/dock-blockchain-modules/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# @docknetwork/dock-blockchain-modules

## 0.5.1

### Patch Changes

- Updated dependencies
- @docknetwork/credential-sdk@0.6.0

## 0.5.0

### Minor Changes
Expand Down
6 changes: 3 additions & 3 deletions packages/dock-blockchain-modules/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@docknetwork/dock-blockchain-modules",
"version": "0.5.0",
"version": "0.5.1",
"license": "MIT",
"type": "module",
"main": "./dist/esm/index.js",
Expand Down Expand Up @@ -28,7 +28,7 @@
"node": ">=18.0.0"
},
"dependencies": {
"@docknetwork/credential-sdk": "0.5.0"
"@docknetwork/credential-sdk": "0.6.0"
},
"devDependencies": {
"@babel/cli": "^7.24.1",
Expand All @@ -37,7 +37,7 @@
"@babel/plugin-syntax-import-attributes": "^7.25.6",
"@babel/plugin-transform-modules-commonjs": "^7.24.1",
"@babel/preset-env": "^7.24.3",
"@docknetwork/dock-blockchain-api": "0.4.0",
"@docknetwork/dock-blockchain-api": "0.4.1",
"@rollup/plugin-alias": "^4.0.2",
"@rollup/plugin-babel": "^6.0.4",
"@rollup/plugin-commonjs": "^24.0.0",
Expand Down

0 comments on commit 12abd95

Please sign in to comment.