Skip to content

Commit

Permalink
Fix wasm ts imports and bump version
Browse files Browse the repository at this point in the history
Signed-off-by: lovesh <[email protected]>
  • Loading branch information
lovesh committed Nov 1, 2023
1 parent f1924ad commit 0ac51ed
Show file tree
Hide file tree
Showing 12 changed files with 13 additions and 22 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@docknetwork/sdk",
"version": "6.7.0",
"version": "6.8.0",
"main": "index.js",
"license": "MIT",
"repository": {
Expand Down
4 changes: 1 addition & 3 deletions src/presentation.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,10 @@ import {
isWasmInitialized,
BBSPublicKey,
PSPublicKey,
PresentationBuilder,
} from '@docknetwork/crypto-wasm-ts';
import b58 from 'bs58';
import { stringToU8a } from '@polkadot/util';
import {
PresentationBuilder,
} from '@docknetwork/crypto-wasm-ts/lib/anonymous-credentials';
import { ensureArray } from './utils/type-helpers';

import Bls12381BBSSignatureDock2022 from './utils/vc/crypto/Bls12381BBSSignatureDock2022';
Expand Down
3 changes: 1 addition & 2 deletions src/utils/vc/credentials.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ import jsigs from 'jsonld-signatures';
import { statusTypeMatches, checkStatus } from '@digitalbazaar/vc-status-list';

import base64url from 'base64url';
import { CredentialBuilder } from '@docknetwork/crypto-wasm-ts';
import { CredentialSchema } from '@docknetwork/crypto-wasm-ts/lib/anonymous-credentials';
import { CredentialBuilder, CredentialSchema } from '@docknetwork/crypto-wasm-ts';
import CredentialIssuancePurpose from './CredentialIssuancePurpose';
import defaultDocumentLoader from './document-loader';
import { getAndValidateSchemaIfPresent } from './schema';
Expand Down
3 changes: 1 addition & 2 deletions src/utils/vc/crypto/Bls12381BBSKeyPairDock2023.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@ import {
BBSPublicKey,
BBSSecretKey,
BBSSignatureParams,
BBS_SIGNATURE_PARAMS_LABEL_BYTES,
} from '@docknetwork/crypto-wasm-ts';

import { BBS_SIGNATURE_PARAMS_LABEL_BYTES } from '@docknetwork/crypto-wasm-ts/lib/anonymous-credentials';

import { Bls12381BBS23DockVerKeyName } from './constants';
import DockCryptoKeyPair from './common/DockCryptoKeyPair';

Expand Down
2 changes: 1 addition & 1 deletion src/utils/vc/crypto/Bls12381BBSSignatureDock2022.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {
BBSPlusCredential,
BBSPlusCredentialBuilder,
} from '@docknetwork/crypto-wasm-ts/lib/anonymous-credentials';
} from '@docknetwork/crypto-wasm-ts';

import { Bls12381BBSSigDockSigName } from './constants';

Expand Down
2 changes: 1 addition & 1 deletion src/utils/vc/crypto/Bls12381BBSSignatureDock2023.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {
BBSCredential,
BBSCredentialBuilder,
} from '@docknetwork/crypto-wasm-ts/lib/anonymous-credentials';
} from '@docknetwork/crypto-wasm-ts';

import { Bls12381BBS23SigDockSigName } from './constants';

Expand Down
5 changes: 1 addition & 4 deletions src/utils/vc/crypto/Bls12381G2KeyPairDock2022.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,8 @@ import {
BBSPlusSecretKey,
BBSPlusSignatureParamsG1,
BBSPlusPublicKeyG2,
} from '@docknetwork/crypto-wasm-ts';

import {
BBS_PLUS_SIGNATURE_PARAMS_LABEL_BYTES,
} from '@docknetwork/crypto-wasm-ts/lib/anonymous-credentials';
} from '@docknetwork/crypto-wasm-ts';

import { Bls12381BBSDockVerKeyName } from './constants';
import DockCryptoKeyPair from './common/DockCryptoKeyPair';
Expand Down
3 changes: 1 addition & 2 deletions src/utils/vc/crypto/Bls12381PSKeyPairDock2023.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@ import {
PSPublicKey,
PSSecretKey,
PSSignatureParams,
PS_SIGNATURE_PARAMS_LABEL_BYTES,
} from '@docknetwork/crypto-wasm-ts';

import { PS_SIGNATURE_PARAMS_LABEL_BYTES } from '@docknetwork/crypto-wasm-ts/lib/anonymous-credentials';

import { Bls12381PSDockVerKeyName } from './constants';
import DockCryptoKeyPair from './common/DockCryptoKeyPair';

Expand Down
2 changes: 1 addition & 1 deletion src/utils/vc/crypto/Bls12381PSSignatureDock2023.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {
PSCredential,
PSCredentialBuilder,
} from '@docknetwork/crypto-wasm-ts/lib/anonymous-credentials';
} from '@docknetwork/crypto-wasm-ts';

import { Bls12381PSSigDockSigName } from './constants';

Expand Down
3 changes: 1 addition & 2 deletions src/utils/vc/crypto/common/DockCryptoSignature.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { CredentialSchema, DefaultSchemaParsingOpts } from '@docknetwork/crypto-wasm-ts/lib/anonymous-credentials';
import { initializeWasm, CredentialSchema, DefaultSchemaParsingOpts } from '@docknetwork/crypto-wasm-ts';
import * as _ from 'underscore';
import { initializeWasm } from '@docknetwork/crypto-wasm-ts';

import jsonld from 'jsonld';
import { SECURITY_CONTEXT_URL } from 'jsonld-signatures';
Expand Down
2 changes: 1 addition & 1 deletion src/utils/vc/crypto/common/DockCryptoSignatureProof.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Presentation } from '@docknetwork/crypto-wasm-ts/lib/anonymous-credentials/presentation';
import { Presentation } from '@docknetwork/crypto-wasm-ts';
import b58 from 'bs58';
import { withExtendedStaticProperties } from '../../../inheritance';

Expand Down
4 changes: 2 additions & 2 deletions src/utils/vc/presentations.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import {
BBSPlusPublicKeyG2,
BBSPublicKey,
PSPublicKey,
Presentation,
CredentialSchema,
} from '@docknetwork/crypto-wasm-ts';
import { Presentation } from '@docknetwork/crypto-wasm-ts/lib/anonymous-credentials/presentation';
import b58 from 'bs58';
import { CredentialSchema } from '@docknetwork/crypto-wasm-ts/lib/anonymous-credentials';
import { getPrivateStatus, verifyCredential } from './credentials';
import DIDResolver from "../../resolver/did/did-resolver"; // eslint-disable-line

Expand Down

0 comments on commit 0ac51ed

Please sign in to comment.