@trustvc/trustvc 1.7.1 → 1.7.3

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.
@@ -8,7 +8,7 @@ var tokenRegistryV4$1 = require('@tradetrust-tt/token-registry-v4');
8
8
  var tokenRegistryV5$1 = require('@tradetrust-tt/token-registry-v5');
9
9
  var tokenRegistryV4 = require('../token-registry-v4');
10
10
  var tokenRegistryV5 = require('../token-registry-v5');
11
- var tradetrustUtils = require('@tradetrust-tt/tradetrust-utils');
11
+ var utils = require('../utils');
12
12
 
13
13
  var __defProp = Object.defineProperty;
14
14
  var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
@@ -181,7 +181,7 @@ class DocumentBuilder {
181
181
  // Private helper method to verify that the token registry supports the required interface for transferable records.
182
182
  async verifyTokenRegistry() {
183
183
  const chainId = this.document.credentialStatus.tokenNetwork.chainId;
184
- if (!(chainId in tradetrustUtils.SUPPORTED_CHAINS)) {
184
+ if (!(chainId in utils.SUPPORTED_CHAINS)) {
185
185
  throw new Error(`Unsupported Chain: Chain ID ${chainId} is not supported.`);
186
186
  }
187
187
  try {
@@ -1,10 +1,14 @@
1
1
  'use strict';
2
2
 
3
3
  var tradetrustUtils = require('@tradetrust-tt/tradetrust-utils');
4
+ var types = require('./types');
4
5
 
6
+ const errorMessages = tradetrustUtils.CONSTANTS;
5
7
 
6
-
7
- Object.defineProperty(exports, "errorMessages", {
8
- enumerable: true,
9
- get: function () { return tradetrustUtils.CONSTANTS; }
8
+ exports.errorMessages = errorMessages;
9
+ Object.keys(types).forEach(function (k) {
10
+ if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
11
+ enumerable: true,
12
+ get: function () { return types[k]; }
13
+ });
10
14
  });
@@ -0,0 +1,2 @@
1
+ 'use strict';
2
+
@@ -6,7 +6,7 @@ import { constants } from '@tradetrust-tt/token-registry-v4';
6
6
  import { constants as constants$1 } from '@tradetrust-tt/token-registry-v5';
7
7
  import { v4Contracts } from '../token-registry-v4';
8
8
  import { v5Contracts } from '../token-registry-v5';
9
- import { SUPPORTED_CHAINS } from '@tradetrust-tt/tradetrust-utils';
9
+ import { SUPPORTED_CHAINS } from '../utils';
10
10
 
11
11
  var __defProp = Object.defineProperty;
12
12
  var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
@@ -1 +1,6 @@
1
- export { CONSTANTS as errorMessages } from '@tradetrust-tt/tradetrust-utils';
1
+ import { CONSTANTS } from '@tradetrust-tt/tradetrust-utils';
2
+ export * from './types';
3
+
4
+ const errorMessages = CONSTANTS;
5
+
6
+ export { errorMessages };
@@ -39,14 +39,16 @@ export { errorMessageHandling, w3cCredentialStatusRevoked, w3cCredentialStatusSu
39
39
  export * from '@tradetrust-tt/tradetrust-utils/constants/network';
40
40
  export { generate12ByteNonce, generate32ByteKey, stringToUint8Array } from './utils/stringUtils/index.js';
41
41
  export * from '@tradetrust-tt/tradetrust-utils/constants/supportedChains';
42
- export { GasStationFeeData, GasStationFunction, calculateMaxFee, CONSTANTS as errorMessages, gasStation, interpretFragments, scaleBigNumber } from '@tradetrust-tt/tradetrust-utils';
42
+ export { errorMessages } from './utils/errorMessages/index.js';
43
43
  export { WrappedOrSignedOpenAttestationDocument, getChainId, getTokenId, getTokenRegistryAddress, getTransferableRecordsCredentialStatus, isTransferableRecord } from './utils/documents/index.js';
44
+ export { GasStationFeeData, GasStationFunction, calculateMaxFee, gasStation, interpretFragments, scaleBigNumber } from '@tradetrust-tt/tradetrust-utils';
44
45
  export { AwsKmsSigner, AwsKmsSignerCredentials } from '@tradetrust-tt/ethers-aws-kms-signer';
45
46
  export { CustomDnsResolver, IDNSQueryResponse, IDNSRecord, OpenAttestationDNSTextRecord, OpenAttestationDnsDidRecord, defaultDnsResolvers, getDnsDidRecords, getDocumentStoreRecords, parseDnsDidResults, parseDocumentStoreResults, parseOpenAttestationRecord, queryDns } from '@tradetrust-tt/dnsprove';
46
47
  export { OpenAttestationDocument, SUPPORTED_SIGNING_ALGORITHM, SchemaId, SignedWrappedDocument, WrappedDocument, getData as getDataV2, isSchemaValidationError, obfuscateDocument, v2, v3, validateSchema, __unsafe__use__it__at__your__own__risks__wrapDocument as wrapOADocumentV3, __unsafe__use__it__at__your__own__risks__wrapDocuments as wrapOADocumentsV3 } from '@tradetrust-tt/tradetrust';
47
48
  export { DiagnoseError } from '@tradetrust-tt/tradetrust/dist/types/shared/utils';
48
49
  export { createResolver, getIdentifier, isValid, openAttestationDidIdentityProof, utils, verificationBuilder, verify } from '@tradetrust-tt/tt-verify';
49
50
  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';
51
+ export { ErrorMessage, ErrorMessageTypes, ErrorMessages, MessagesDictionary } from './utils/errorMessages/types.js';
50
52
  import '@tradetrust-tt/token-registry-v4/contracts';
51
53
  import 'ethers';
52
54
  import '@typechain/ethers-v5/static/common';
@@ -1 +1,6 @@
1
- export { CONSTANTS as errorMessages } from '@tradetrust-tt/tradetrust-utils';
1
+ import { ErrorMessages } from './types.js';
2
+ export { ErrorMessage, ErrorMessageTypes, MessagesDictionary } from './types.js';
3
+
4
+ declare const errorMessages: ErrorMessages;
5
+
6
+ export { ErrorMessages, errorMessages };
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Type definitions matching the structure in @tradetrust-tt/tradetrust-utils/VerificationErrorMessages.ts
3
+ */
4
+ interface ErrorMessage {
5
+ failureTitle: string;
6
+ failureMessage: string;
7
+ successTitle: string;
8
+ }
9
+ interface MessagesDictionary {
10
+ [key: string]: ErrorMessage;
11
+ }
12
+ interface ErrorMessageTypes {
13
+ [key: string]: string;
14
+ }
15
+ interface ErrorMessages {
16
+ MESSAGES: MessagesDictionary;
17
+ TYPES: ErrorMessageTypes;
18
+ }
19
+
20
+ export type { ErrorMessage, ErrorMessageTypes, ErrorMessages, MessagesDictionary };
@@ -2,9 +2,11 @@ export { errorMessageHandling, w3cCredentialStatusRevoked, w3cCredentialStatusSu
2
2
  export * from '@tradetrust-tt/tradetrust-utils/constants/network';
3
3
  export { generate12ByteNonce, generate32ByteKey, stringToUint8Array } from './stringUtils/index.js';
4
4
  export * from '@tradetrust-tt/tradetrust-utils/constants/supportedChains';
5
- export { GasStationFeeData, GasStationFunction, calculateMaxFee, CONSTANTS as errorMessages, gasStation, interpretFragments, scaleBigNumber } from '@tradetrust-tt/tradetrust-utils';
5
+ export { errorMessages } from './errorMessages/index.js';
6
6
  export { WrappedOrSignedOpenAttestationDocument, getChainId, getTokenId, getTokenRegistryAddress, getTransferableRecordsCredentialStatus, isTransferableRecord } from './documents/index.js';
7
+ export { GasStationFeeData, GasStationFunction, calculateMaxFee, gasStation, interpretFragments, scaleBigNumber } from '@tradetrust-tt/tradetrust-utils';
7
8
  export { AwsKmsSigner, AwsKmsSignerCredentials } from '@tradetrust-tt/ethers-aws-kms-signer';
9
+ export { ErrorMessage, ErrorMessageTypes, ErrorMessages, MessagesDictionary } from './errorMessages/types.js';
8
10
  import '@tradetrust-tt/tt-verify';
9
11
  import '@tradetrust-tt/tradetrust';
10
12
  import '@trustvc/w3c-vc';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trustvc/trustvc",
3
- "version": "1.7.1",
3
+ "version": "1.7.3",
4
4
  "description": "TrustVC library",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -110,13 +110,13 @@
110
110
  }
111
111
  },
112
112
  "dependencies": {
113
- "@tradetrust-tt/dnsprove": "^2.17.0",
113
+ "@tradetrust-tt/dnsprove": "^2.18.0",
114
114
  "@tradetrust-tt/ethers-aws-kms-signer": "^2.1.4",
115
115
  "@tradetrust-tt/token-registry-v4": "npm:@tradetrust-tt/token-registry@^4.16.0",
116
- "@tradetrust-tt/token-registry-v5": "npm:@tradetrust-tt/token-registry@^5.3.0",
116
+ "@tradetrust-tt/token-registry-v5": "npm:@tradetrust-tt/token-registry@^5.5.0",
117
117
  "@tradetrust-tt/tradetrust": "^6.10.2",
118
- "@tradetrust-tt/tradetrust-utils": "^2.3.2",
119
- "@tradetrust-tt/tt-verify": "^9.4.0",
118
+ "@tradetrust-tt/tradetrust-utils": "^2.4.1",
119
+ "@tradetrust-tt/tt-verify": "^9.5.1",
120
120
  "@trustvc/w3c-context": "^1.2.13",
121
121
  "@trustvc/w3c-credential-status": "^1.2.13",
122
122
  "@trustvc/w3c-issuer": "^1.2.4",