Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix exports #469

Merged
merged 1 commit into from
Nov 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
"no-useless-constructor": "off",
"no-console": "off",
"no-else-return": "off",
"import/extensions": "off",
"no-restricted-syntax": [
"error",
{
Expand Down
13 changes: 13 additions & 0 deletions examples/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# @docknetwork/sdk-examples

## 0.4.0

### Minor Changes

- Fix exports

### Patch Changes

- Updated dependencies
- @docknetwork/[email protected]
- @docknetwork/[email protected]
- @docknetwork/[email protected]

## 0.3.0

### Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion examples/bbs-dock.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { initializeWasm } from '@docknetwork/credential-sdk/crypto';
import { Resolver } from '@docknetwork/credential-sdk/resolver';
import Bls12381G2KeyPairDock2022 from '@docknetwork/credential-sdk/vc/crypto/Bls12381G2KeyPairDock2022';
import { Bls12381G2KeyPairDock2022 } from '@docknetwork/credential-sdk/vc/crypto';
import {
issueCredential,
verifyCredential,
Expand Down
26 changes: 0 additions & 26 deletions examples/loader.mjs

This file was deleted.

28 changes: 14 additions & 14 deletions examples/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,26 @@
"name": "@docknetwork/sdk-examples",
"private": true,
"type": "module",
"version": "0.3.0",
"version": "0.4.0",
"scripts": {
"bbs-dock-example": "babel-node --loader=./loader.mjs ./bbs-dock.js",
"claim-deduction-example": "babel-node --loader=./loader.mjs ./claim-deduction.js",
"open-badges-example": "babel-node --loader=./loader.mjs ./open-badges.js",
"schema-validation-example": "babel-node --loader=./loader.mjs ./schema-validation.js",
"standard-schemas-example": "babel-node --loader=./loader.mjs ./standard-schemas.js",
"dock-did-example": "babel-node --loader=./loader.mjs ./dock-did.js",
"did-resolver-example": "babel-node --loader=./loader.mjs ./resolver.js",
"schema-example": "babel-node --loader=./loader.mjs ./schema.js",
"blob-example": "babel-node --loader=./loader.mjs ./blob.js",
"anchor-example": "babel-node --loader=./loader.mjs ./anchor.js",
"bbs-dock-example": "babel-node ./bbs-dock.js",
"claim-deduction-example": "babel-node ./claim-deduction.js",
"open-badges-example": "babel-node ./open-badges.js",
"schema-validation-example": "babel-node ./schema-validation.js",
"standard-schemas-example": "babel-node ./standard-schemas.js",
"dock-did-example": "babel-node ./dock-did.js",
"did-resolver-example": "babel-node ./resolver.js",
"schema-example": "babel-node ./schema.js",
"blob-example": "babel-node ./blob.js",
"anchor-example": "babel-node ./anchor.js",
"examples": "yarn bbs-dock-example && yarn claim-deduction-example && yarn open-badges-example && yarn schema-validation-example && yarn standard-schemas-example && yarn dock-did-example && yarn did-resolver-example && yarn schema-example && yarn blob-example && yarn anchor-example",
"examples-with-node": "../scripts/with_dock_docker_test_node yarn examples",
"lint": "eslint \"*.js\""
},
"dependencies": {
"@docknetwork/credential-sdk": "0.4.0",
"@docknetwork/dock-blockchain-api": "0.3.0",
"@docknetwork/dock-blockchain-modules": "0.4.0"
"@docknetwork/credential-sdk": "0.5.0",
"@docknetwork/dock-blockchain-api": "0.4.0",
"@docknetwork/dock-blockchain-modules": "0.5.0"
},
"devDependencies": {
"babel-eslint": "^10.1.0",
Expand Down
2 changes: 1 addition & 1 deletion examples/schema-validation.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Schema } from '@docknetwork/credential-sdk/modules/abstract/schema';

// BOL Schema, its valid
import bolSchema from './schemas/bol';
import bolSchema from './schemas/bol.js';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why the need to add .js here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


// Invalid example schema
const invalidSchema = {
Expand Down
2 changes: 1 addition & 1 deletion examples/schemas/immunity_event_record.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import proofOfHealthCoreSchema from "./proof_of_health_core";
import proofOfHealthCoreSchema from "./proof_of_health_core.js";

const schema = {
$schema: "http://json-schema.org/draft-07/schema#",
Expand Down
2 changes: 1 addition & 1 deletion examples/schemas/infection_diagnosis.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import proofOfHealthCoreSchema from "./proof_of_health_core";
import proofOfHealthCoreSchema from "./proof_of_health_core.js";

const schema = {
$schema: "http://json-schema.org/draft-07/schema#",
Expand Down
2 changes: 1 addition & 1 deletion examples/schemas/non_infection_check.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import proofOfHealthCoreSchema from "./proof_of_health_core";
import proofOfHealthCoreSchema from "./proof_of_health_core.js";

const schema = {
$schema: "http://json-schema.org/draft-07/schema#",
Expand Down
8 changes: 4 additions & 4 deletions examples/standard-schemas.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import {
validateCredentialSchema,
} from '@docknetwork/credential-sdk/vc';

import prCardSchema from './schemas/pr_card';
import infectionDiagnosisSchema from './schemas/infection_diagnosis';
import immunityEventRecordSchema from './schemas/immunity_event_record';
import noInfectionSchema from './schemas/non_infection_check';
import prCardSchema from './schemas/pr_card.js';
import infectionDiagnosisSchema from './schemas/infection_diagnosis.js';
import immunityEventRecordSchema from './schemas/immunity_event_record.js';
import noInfectionSchema from './schemas/non_infection_check.js';

// Schema from here https://github.com/w3c-ccg/vc-examples/blob/master/plugfest-2020/vendors/sicpa/credentials/PermanentResidentCard.json
const credPRCard = {
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.4.0",
"version": "0.5.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.4.0

### Minor Changes

- Fix exports

## 0.3.0

### Minor Changes
Expand Down
10 changes: 5 additions & 5 deletions 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.3.0",
"version": "0.4.0",
"license": "MIT",
"main": "./dist/esm/index.js",
"type": "module",
Expand All @@ -11,13 +11,13 @@
"exports": {
".": {
"import": "./dist/esm/index.js",
"require": "./dist/cjs/index.js",
"require": "./dist/cjs/index.cjs",
"default": "./dist/esm/index.js"
},
"./*": {
"import": "./dist/esm/*",
"require": "./dist/cjs/*",
"default": "./dist/esm/*"
"import": "./dist/esm/*/index.js",
"require": "./dist/cjs/*/index.cjs",
"default": "./dist/esm/*/index.js"
}
},
"repository": {
Expand Down
11 changes: 11 additions & 0 deletions packages/cheqd-blockchain-modules/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# @docknetwork/cheqd-blockchain-modules

## 0.5.0

### Minor Changes

- Fix exports

### Patch Changes

- Updated dependencies
- @docknetwork/[email protected]

## 0.4.0

### Minor Changes
Expand Down
14 changes: 7 additions & 7 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.4.0",
"version": "0.5.0",
"type": "module",
"license": "MIT",
"main": "./dist/esm/index.js",
Expand All @@ -11,13 +11,13 @@
"exports": {
".": {
"import": "./dist/esm/index.js",
"require": "./dist/cjs/index.js",
"require": "./dist/cjs/index.cjs",
"default": "./dist/esm/index.js"
},
"./*": {
"import": "./dist/esm/*",
"require": "./dist/cjs/*",
"default": "./dist/esm/*"
"import": "./dist/esm/*/index.js",
"require": "./dist/cjs/*/index.cjs",
"default": "./dist/esm/*/index.js"
}
},
"repository": {
Expand All @@ -28,7 +28,7 @@
"node": ">=18.0.0"
},
"dependencies": {
"@docknetwork/credential-sdk": "0.4.0"
"@docknetwork/credential-sdk": "0.5.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/cheqd-blockchain-api": "0.3.0",
"@docknetwork/cheqd-blockchain-api": "0.4.0",
"@rollup/plugin-alias": "^4.0.2",
"@rollup/plugin-babel": "^6.0.4",
"@rollup/plugin-commonjs": "^24.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/cheqd-blockchain-modules/src/attest/module.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import AbstractAttestModule from '@docknetwork/credential-sdk/modules/abstract/attest/module';
import { AbstractAttestModule } from '@docknetwork/credential-sdk/modules';
import { injectCheqd } from '../common';
import CheqdInternalAttestModule from './internal';

Expand Down
4 changes: 2 additions & 2 deletions packages/cheqd-blockchain-modules/src/blob/module.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import AbstractBlobModule from '@docknetwork/credential-sdk/modules/abstract/blob/module';
import { NoBlobError } from '@docknetwork/credential-sdk/modules/abstract/blob/errors';
import { AbstractBlobModule } from '@docknetwork/credential-sdk/modules';
import { NoBlobError } from '@docknetwork/credential-sdk/modules/abstract/blob';
import { CheqdBlobId } from '@docknetwork/credential-sdk/types';
import { injectCheqd } from '../common';
import CheqdInternalBlobModule from './internal';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ApiProvider } from '@docknetwork/credential-sdk/modules/abstract/common';
import { ensureInstanceOf } from '@docknetwork/credential-sdk/utils/type-helpers';
import { ensureInstanceOf } from '@docknetwork/credential-sdk/utils';

class CheqdApiProvider extends ApiProvider {
constructor(cheqd) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { withExtendedStaticProperties } from '@docknetwork/credential-sdk/utils/inheritance';
import { withExtendedStaticProperties } from '@docknetwork/credential-sdk/utils';
import CheqdAPIProvider from './cheqd-api-provider';

export default function injectCheqd(klass) {
Expand Down
2 changes: 1 addition & 1 deletion packages/cheqd-blockchain-modules/src/did/internal.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {
TypedUUID,
TypedStruct,
} from '@docknetwork/credential-sdk/types/generic';
import { DIDDocument } from '@docknetwork/credential-sdk/types/did/document';
import { DIDDocument } from '@docknetwork/credential-sdk/types/did';
import { createInternalCheqdModule } from '../common';

const parseDocument = (document) => DIDDocument.from(document).toCheqd();
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.5.0

### Minor Changes

- Fix exports

## 0.4.0

### Minor Changes
Expand Down
12 changes: 6 additions & 6 deletions 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.4.0",
"version": "0.5.0",
"license": "MIT",
"type": "module",
"files": [
Expand All @@ -9,13 +9,13 @@
"exports": {
".": {
"import": "./dist/esm/index.js",
"require": "./dist/cjs/index.js",
"require": "./dist/cjs/index.cjs",
"default": "./dist/esm/index.js"
},
"./*": {
"import": "./dist/esm/*",
"require": "./dist/cjs/*",
"default": "./dist/esm/*"
"import": "./dist/esm/*/index.js",
"require": "./dist/cjs/*/index.cjs",
"default": "./dist/esm/*/index.js"
}
},
"repository": {
Expand All @@ -30,7 +30,7 @@
"@digitalcredentials/vc-status-list": "^8.0.0",
"@docknetwork/crypto-wasm-ts": "^0.63.0",
"@juanelas/base64": "^1.1.5",
"@stablelib/ed25519": "^2.0.0",
"@stablelib/ed25519": "^1.0.0",
"@subsquid/ss58-codec": "latest",
"@transmute/json-web-signature": "^0.7.0-unstable.82",
"blakejs": "^1.2.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/credential-sdk/src/crypto/index.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export * from '@docknetwork/crypto-wasm-ts';
export * from '@docknetwork/crypto-wasm-ts/lib/index.js';
1 change: 1 addition & 0 deletions packages/credential-sdk/src/modules/abstract/blob/index.js
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export { default as AbstractBlobModule } from './module';
export * from './errors';
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
import {
BBDT16Credential,
BBDT16CredentialBuilder,
} from '@docknetwork/crypto-wasm-ts/';
import { BBDT16Credential, BBDT16CredentialBuilder } from '../../crypto';

import { Bls12381BBDT16MacDockName } from './constants';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
import {
BBDT16Credential,
BBDT16CredentialBuilder,
} from '@docknetwork/crypto-wasm-ts/';
import { BBDT16Credential, BBDT16CredentialBuilder } from '../../crypto';

import { Bls12381BBDT16MacDockName } from './constants';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import jsonld from 'jsonld';
import jsigs from 'jsonld-signatures';

import stringify from 'json-stringify-deterministic';
import semver from 'semver/preload';
import semver from 'semver/preload.js';
import { u8aToU8a } from '../../../utils/bytes';
import { withExtendedStaticProperties } from '../../../utils/inheritance';
import CustomLinkedDataSignature from './CustomLinkedDataSignature';
Expand Down
23 changes: 23 additions & 0 deletions packages/credential-sdk/src/vc/crypto/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
export { default as Bls12381BBDT16KeyPairDock2024 } from './Bls12381BBDT16KeyPairDock2024';
export { default as Bls12381BBDT16MACDock2024 } from './Bls12381BBDT16MACDock2024';
export { default as Bls12381BBDT16MACProofDock2024 } from './Bls12381BBDT16MACProofDock2024';
export { default as Bls12381BBSKeyPairDock2023 } from './Bls12381BBSKeyPairDock2023';
export { default as Bls12381BBSSignatureDock2022 } from './Bls12381BBSSignatureDock2022';
export { default as Bls12381BBSSignatureDock2023 } from './Bls12381BBSSignatureDock2023';
export { default as Bls12381BBSSignatureProofDock2022 } from './Bls12381BBSSignatureProofDock2022';
export { default as Bls12381BBSSignatureProofDock2023 } from './Bls12381BBSSignatureProofDock2023';
export { default as Bls12381BDDT16KeyPairDock2024 } from './Bls12381BDDT16KeyPairDock2024';
export { default as Bls12381BDDT16MACDock2024 } from './Bls12381BDDT16MACDock2024';
export { default as Bls12381BDDT16MACProofDock2024 } from './Bls12381BDDT16MACProofDock2024';
export { default as Bls12381G2KeyPairDock2022 } from './Bls12381G2KeyPairDock2022';
export { default as Bls12381PSKeyPairDock2023 } from './Bls12381PSKeyPairDock2023';
export { default as Bls12381PSSignatureDock2023 } from './Bls12381PSSignatureDock2023';
export { default as Bls12381PSSignatureProofDock2023 } from './Bls12381PSSignatureProofDock2023';
export { default as EcdsaSecp256k1Signature2019 } from './EcdsaSecp256k1Signature2019';
export { default as EcdsaSecp256k1VerificationKey2019 } from './EcdsaSecp256k1VerificationKey2019';
export { default as Ed25519Signature2018 } from './Ed25519Signature2018';
export { default as Ed25519Signature2020 } from './Ed25519Signature2020';
export { default as Ed25519VerificationKey2018 } from './Ed25519VerificationKey2018';
export { default as Ed25519VerificationKey2020 } from './Ed25519VerificationKey2020';
export { default as JsonWebSignature2020 } from './JsonWebSignature2020';
export * from './constants';
Loading
Loading