@trustvc/trustvc 1.8.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +144 -48
- package/dist/cjs/core/documentBuilder.js +38 -14
- package/dist/cjs/open-attestation/utils.js +0 -2
- package/dist/cjs/token-registry-functions/returnToken.js +1 -1
- package/dist/cjs/utils/documents/index.js +27 -0
- package/dist/cjs/verify/fragments/document-integrity/ecdsaW3CSignatureIntegrity.js +87 -0
- package/dist/cjs/verify/fragments/document-integrity/w3cSignatureIntegrity.js +2 -2
- package/dist/cjs/verify/fragments/index.js +5 -0
- package/dist/cjs/verify/verify.js +2 -0
- package/dist/cjs/w3c/derive.js +11 -0
- package/dist/cjs/w3c/index.js +7 -0
- package/dist/cjs/w3c/sign.js +2 -2
- package/dist/esm/core/documentBuilder.js +39 -15
- package/dist/esm/open-attestation/utils.js +1 -2
- package/dist/esm/token-registry-functions/returnToken.js +1 -1
- package/dist/esm/utils/documents/index.js +26 -1
- package/dist/esm/verify/fragments/document-integrity/ecdsaW3CSignatureIntegrity.js +85 -0
- package/dist/esm/verify/fragments/document-integrity/w3cSignatureIntegrity.js +1 -1
- package/dist/esm/verify/fragments/index.js +1 -0
- package/dist/esm/verify/verify.js +2 -0
- package/dist/esm/w3c/derive.js +9 -0
- package/dist/esm/w3c/index.js +1 -0
- package/dist/esm/w3c/sign.js +2 -2
- package/dist/types/core/documentBuilder.d.ts +14 -4
- package/dist/types/core/index.d.ts +1 -1
- package/dist/types/{index-Bc5NlE8f.d.ts → index-1ws_BWZW.d.ts} +2 -2
- package/dist/types/{index-CRVFHzes.d.ts → index-LpXMEhhr.d.ts} +3 -1
- package/dist/types/index.d.ts +7 -5
- package/dist/types/open-attestation/index.d.ts +1 -2
- package/dist/types/open-attestation/utils.d.ts +1 -3
- package/dist/types/utils/documents/index.d.ts +4 -2
- package/dist/types/utils/index.d.ts +2 -2
- package/dist/types/verify/fragments/document-integrity/ecdsaW3CSignatureIntegrity.d.ts +5 -0
- package/dist/types/verify/fragments/index.d.ts +1 -0
- package/dist/types/verify/index.d.ts +2 -1
- package/dist/types/w3c/derive.d.ts +11 -0
- package/dist/types/w3c/index.d.ts +2 -1
- package/dist/types/w3c/sign.d.ts +7 -3
- package/package.json +6 -5
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
export { openAttestationVerifiers, verifiers, w3cVerifiers } from './verify.js';
|
|
2
|
-
export { i as fragments } from '../index-
|
|
2
|
+
export { i as fragments } from '../index-LpXMEhhr.js';
|
|
3
3
|
export { createResolver, getIdentifier, isValid, openAttestationDidIdentityProof, utils, verificationBuilder, verify } from '@tradetrust-tt/tt-verify';
|
|
4
4
|
export { DocumentsToVerify, ErrorVerificationFragment, InvalidVerificationFragment, ProviderDetails, providerType as ProviderType, SkippedVerificationFragment, ValidVerificationFragment, VerificationBuilderOptions, VerificationFragment, VerificationFragmentStatus, VerificationFragmentType, VerificationFragmentWithData, Verifier, VerifierOptions } from '@tradetrust-tt/tt-verify/dist/types/src/types/core';
|
|
5
5
|
import './fragments/document-status/transferableRecords/transferableRecordVerifier.types.js';
|
|
6
6
|
import './fragments/document-integrity/w3cSignatureIntegrity.js';
|
|
7
|
+
import './fragments/document-integrity/ecdsaW3CSignatureIntegrity.js';
|
|
7
8
|
import './fragments/document-status/transferableRecords/transferableRecordVerifier.js';
|
|
8
9
|
import './fragments/document-status/w3cCredentialStatus.js';
|
|
9
10
|
import './fragments/issuer-identity/w3cIssuerIdentity.js';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { SignedVerifiableCredential, ContextDocument, DerivedResult } from '@trustvc/w3c-vc';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Derives a credential with selective disclosure based on revealed attributes.
|
|
5
|
+
* @param {object} credential - The verifiable credential to be selectively disclosed.
|
|
6
|
+
* @param {object|string[]} revealedAttributes - For BBS+: The attributes from the credential that should be revealed. For ECDSA-SD-2023: Array of selective pointers.
|
|
7
|
+
* @returns {Promise<DerivedResult>} A DerivedResult containing the derived proof or an error message.
|
|
8
|
+
*/
|
|
9
|
+
declare const deriveW3C: (credential: SignedVerifiableCredential, revealedAttributes: ContextDocument | string[]) => Promise<DerivedResult>;
|
|
10
|
+
|
|
11
|
+
export { deriveW3C };
|
|
@@ -4,7 +4,8 @@ export { i as issuer } from '../index-ClF4_Nqk.js';
|
|
|
4
4
|
export { signW3C } from './sign.js';
|
|
5
5
|
export { RawVerifiableCredential, SignedVerifiableCredential, SigningResult, VerificationResult } from '@trustvc/w3c-vc';
|
|
6
6
|
export { PrivateKeyPair } from '@trustvc/w3c-issuer';
|
|
7
|
-
export { i as vc } from '../index-
|
|
7
|
+
export { i as vc } from '../index-1ws_BWZW.js';
|
|
8
8
|
export { verifyW3CSignature } from './verify.js';
|
|
9
|
+
export { deriveW3C } from './derive.js';
|
|
9
10
|
import '@trustvc/w3c-context';
|
|
10
11
|
import '@trustvc/w3c-credential-status';
|
package/dist/types/w3c/sign.d.ts
CHANGED
|
@@ -1,13 +1,17 @@
|
|
|
1
|
-
import { RawVerifiableCredential, SigningResult } from '@trustvc/w3c-vc';
|
|
1
|
+
import { RawVerifiableCredential, CryptoSuiteName, SigningResult } from '@trustvc/w3c-vc';
|
|
2
2
|
import { PrivateKeyPair } from '@trustvc/w3c-issuer';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Signs a W3C Verifiable Credential using the provided cryptographic suite and key pair.
|
|
6
6
|
* @param {RawVerifiableCredential} credential - The verifiable credential object that needs to be signed.
|
|
7
7
|
* @param {PrivateKeyPair} keyPair - The private and public key pair used for signing the credential.
|
|
8
|
-
* @param {
|
|
8
|
+
* @param {CryptoSuiteName} [cryptoSuite='ecdsa-sd-2023'] - The cryptographic suite to be used for signing (default is 'ecdsa-sd-2023').
|
|
9
|
+
* @param {object} [options] - Optional parameters including mandatoryPointers for ECDSA-SD-2023.
|
|
10
|
+
* @param {string[]} [options.mandatoryPointers] - Optional mandatory pointers for ECDSA-SD-2023.
|
|
9
11
|
* @returns {Promise<SigningResult>} A promise that resolves to the result of the signing operation, which includes the signed credential.
|
|
10
12
|
*/
|
|
11
|
-
declare const signW3C: (credential: RawVerifiableCredential, keyPair: PrivateKeyPair, cryptoSuite?:
|
|
13
|
+
declare const signW3C: (credential: RawVerifiableCredential, keyPair: PrivateKeyPair, cryptoSuite?: CryptoSuiteName, options?: {
|
|
14
|
+
mandatoryPointers?: string[];
|
|
15
|
+
}) => Promise<SigningResult>;
|
|
12
16
|
|
|
13
17
|
export { signW3C };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trustvc/trustvc",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "TrustVC library",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -121,10 +121,11 @@
|
|
|
121
121
|
"@tradetrust-tt/tradetrust": "^6.10.2",
|
|
122
122
|
"@tradetrust-tt/tradetrust-utils": "^2.4.2",
|
|
123
123
|
"@tradetrust-tt/tt-verify": "^9.5.1",
|
|
124
|
-
"@trustvc/w3c
|
|
125
|
-
"@trustvc/w3c-
|
|
126
|
-
"@trustvc/w3c-
|
|
127
|
-
"@trustvc/w3c-
|
|
124
|
+
"@trustvc/w3c": "^1.3.0-alpha.7",
|
|
125
|
+
"@trustvc/w3c-context": "^1.3.0-alpha.7",
|
|
126
|
+
"@trustvc/w3c-credential-status": "^1.3.0-alpha.7",
|
|
127
|
+
"@trustvc/w3c-issuer": "^1.3.0-alpha.5",
|
|
128
|
+
"@trustvc/w3c-vc": "^1.3.0-alpha.7",
|
|
128
129
|
"ethers": "^5.8.0",
|
|
129
130
|
"ethersV6": "npm:ethers@^6.14.4",
|
|
130
131
|
"js-sha3": "^0.9.3",
|