@velocitycareerlabs/vcl-react-native 1.12.1 → 1.14.1

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.
Files changed (78) hide show
  1. package/android/.gradle/7.4.2/checksums/checksums.lock +0 -0
  2. package/android/.gradle/7.4.2/checksums/md5-checksums.bin +0 -0
  3. package/android/.gradle/7.4.2/checksums/sha1-checksums.bin +0 -0
  4. package/android/build.gradle +2 -2
  5. package/android/src/main/java/io/velocitycareerlabs/reactnative/VclReactNativeModule.kt +17 -10
  6. package/android/src/main/java/io/velocitycareerlabs/reactnative/extensions/MapExtensions.kt +16 -1
  7. package/android/src/main/java/io/velocitycareerlabs/reactnative/utlis/Converter.kt +76 -26
  8. package/ios/Utils/Converter.swift +96 -33
  9. package/ios/VclReactNative.m +3 -0
  10. package/ios/VclReactNative.swift +16 -8
  11. package/lib/commonjs/api/VCLApi.js +6 -6
  12. package/lib/commonjs/api/VCLApi.js.map +1 -1
  13. package/lib/commonjs/api/VCLEnvironment.js +9 -9
  14. package/lib/commonjs/api/VCLEnvironment.js.map +1 -1
  15. package/lib/commonjs/api/VCLKeyServiceType.js +19 -0
  16. package/lib/commonjs/api/VCLKeyServiceType.js.map +1 -0
  17. package/lib/commonjs/api/VCLXVnfProtocolVersion.js +19 -0
  18. package/lib/commonjs/api/VCLXVnfProtocolVersion.js.map +1 -0
  19. package/lib/commonjs/api/entities/VCLCredentialManifest.js.map +1 -1
  20. package/lib/commonjs/api/entities/VCLDidJwk.js.map +1 -1
  21. package/lib/commonjs/api/entities/VCLErrorCode.js +7 -2
  22. package/lib/commonjs/api/entities/VCLErrorCode.js.map +1 -1
  23. package/lib/commonjs/api/entities/VCLFinalizeOffersDescriptor.js.map +1 -1
  24. package/lib/commonjs/api/entities/VCLInitializationDescriptor.js.map +1 -1
  25. package/lib/commonjs/api/entities/VCLJwtDescriptor.js.map +1 -1
  26. package/lib/commonjs/api/entities/VCLOffers.js.map +1 -1
  27. package/lib/commonjs/api/entities/VCLStatusCode.js +19 -0
  28. package/lib/commonjs/api/entities/VCLStatusCode.js.map +1 -0
  29. package/lib/commonjs/index.js +17 -3
  30. package/lib/commonjs/index.js.map +1 -1
  31. package/lib/module/api/VCLApi.js +6 -6
  32. package/lib/module/api/VCLApi.js.map +1 -1
  33. package/lib/module/api/VCLEnvironment.js +7 -7
  34. package/lib/module/api/VCLEnvironment.js.map +1 -1
  35. package/lib/module/api/VCLKeyServiceType.js +13 -0
  36. package/lib/module/api/VCLKeyServiceType.js.map +1 -0
  37. package/lib/module/api/VCLXVnfProtocolVersion.js +13 -0
  38. package/lib/module/api/VCLXVnfProtocolVersion.js.map +1 -0
  39. package/lib/module/api/entities/VCLCredentialManifest.js.map +1 -1
  40. package/lib/module/api/entities/VCLDidJwk.js.map +1 -1
  41. package/lib/module/api/entities/VCLErrorCode.js +7 -2
  42. package/lib/module/api/entities/VCLErrorCode.js.map +1 -1
  43. package/lib/module/api/entities/VCLFinalizeOffersDescriptor.js.map +1 -1
  44. package/lib/module/api/entities/VCLInitializationDescriptor.js.map +1 -1
  45. package/lib/module/api/entities/VCLJwtDescriptor.js.map +1 -1
  46. package/lib/module/api/entities/VCLOffers.js.map +1 -1
  47. package/lib/module/api/entities/VCLStatusCode.js +13 -0
  48. package/lib/module/api/entities/VCLStatusCode.js.map +1 -0
  49. package/lib/module/index.js +8 -3
  50. package/lib/module/index.js.map +1 -1
  51. package/lib/typescript/api/VCLApi.d.ts +3 -3
  52. package/lib/typescript/api/VCLEnvironment.d.ts +5 -8
  53. package/lib/typescript/api/VCLKeyServiceType.d.ts +10 -0
  54. package/lib/typescript/api/VCLXVnfProtocolVersion.d.ts +10 -0
  55. package/lib/typescript/api/entities/VCLCredentialManifest.d.ts +3 -0
  56. package/lib/typescript/api/entities/VCLDidJwk.d.ts +11 -0
  57. package/lib/typescript/api/entities/VCLErrorCode.d.ts +7 -2
  58. package/lib/typescript/api/entities/VCLFinalizeOffersDescriptor.d.ts +2 -0
  59. package/lib/typescript/api/entities/VCLInitializationDescriptor.d.ts +4 -0
  60. package/lib/typescript/api/entities/VCLJwtDescriptor.d.ts +18 -1
  61. package/lib/typescript/api/entities/VCLOffers.d.ts +2 -0
  62. package/lib/typescript/api/entities/VCLStatusCode.d.ts +10 -0
  63. package/lib/typescript/index.d.ts +5 -4
  64. package/package.json +1 -1
  65. package/src/api/VCLApi.ts +15 -5
  66. package/src/api/VCLEnvironment.ts +5 -9
  67. package/src/api/VCLKeyServiceType.ts +11 -0
  68. package/src/api/VCLXVnfProtocolVersion.ts +11 -0
  69. package/src/api/entities/VCLCredentialManifest.ts +3 -0
  70. package/src/api/entities/VCLDidJwk.ts +11 -0
  71. package/src/api/entities/VCLErrorCode.ts +8 -2
  72. package/src/api/entities/VCLFinalizeOffersDescriptor.ts +2 -0
  73. package/src/api/entities/VCLInitializationDescriptor.ts +4 -0
  74. package/src/api/entities/VCLJwtDescriptor.ts +18 -1
  75. package/src/api/entities/VCLOffers.ts +2 -0
  76. package/src/api/entities/VCLStatusCode.ts +11 -0
  77. package/src/index.tsx +9 -5
  78. package/vcl-react-native.podspec +1 -1
@@ -6,12 +6,17 @@
6
6
  */
7
7
 
8
8
  import { VclApi } from './api/VCLApi';
9
- import { VCLEnvTypes } from './api/VCLEnvironment';
9
+ import { VCLEnvironment } from './api/VCLEnvironment';
10
+ import { VCLXVnfProtocolVersion } from './api/VCLXVnfProtocolVersion';
11
+ // import type { VCLKeyServiceType } from './api/VCLKeyServiceType';
12
+ // import { VCLKeyServiceTypes } from './api/VCLKeyServiceType';
13
+
10
14
  import { VCLCountryCodes } from './api/entities/VCLCountries';
11
15
  import { VCLServiceType } from './api/entities/VCLServiceType';
12
16
  import { VCLIssuingType } from './api/entities/VCLIssuingType';
13
- import { VCLErrorCode } from './api/entities/VCLErrorCode';
14
17
  import { VCLError } from './api/entities/VCLError';
18
+ import { VCLStatusCode } from './api/entities/VCLStatusCode';
19
+ import { VCLErrorCode } from './api/entities/VCLErrorCode';
15
20
  export default VclApi;
16
- export { VCLEnvTypes, VCLCountryCodes, VCLServiceType, VCLIssuingType, VCLErrorCode, VCLError };
21
+ export { VCLEnvironment, VCLXVnfProtocolVersion, VCLCountryCodes, VCLServiceType, VCLIssuingType, VCLError, VCLStatusCode, VCLErrorCode };
17
22
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["VclApi","VCLEnvTypes","VCLCountryCodes","VCLServiceType","VCLIssuingType","VCLErrorCode","VCLError"],"sources":["index.tsx"],"sourcesContent":["/**\n * Created by Michael Avoyan.\n *\n * Copyright 2022 Velocity Career Labs inc.\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { VclApi } from './api/VCLApi';\nimport type { VCLEnvironment } from './api/VCLEnvironment';\nimport { VCLEnvTypes } from './api/VCLEnvironment';\nimport type { VCLCountry } from './api/entities/VCLCountry';\nimport type { VCLCountries } from './api/entities/VCLCountries';\nimport { VCLCountryCodes } from './api/entities/VCLCountries';\nimport type { VCLRegion } from './api/entities/VCLRegion';\nimport type { VCLRegions } from './api/entities/VCLRegions';\nimport type { VCLCredentialManifest } from './api/entities/VCLCredentialManifest';\nimport type { VCLCredentialManifestDescriptor } from './api/entities/VCLCredentialManifestDescriptor';\nimport type { VCLCredentialManifestDescriptorByDeepLink } from './api/entities/VCLCredentialManifestDescriptorByDeepLink';\nimport type { VCLCredentialManifestDescriptorByService } from './api/entities/VCLCredentialManifestDescriptorByService';\nimport type { VCLCredentialManifestDescriptorRefresh } from './api/entities/VCLCredentialManifestDescriptorRefresh';\nimport type { VCLCredentialType } from './api/entities/VCLCredentialType';\nimport type { VCLCredentialTypes } from './api/entities/VCLCredentialTypes';\nimport type { VCLCredentialTypeSchema } from './api/entities/VCLCredentialTypeSchema';\nimport type { VCLCredentialTypeSchemas } from './api/entities/VCLCredentialTypeSchemas';\nimport type { VCLCredentialTypesUIFormSchemaDescriptor } from './api/entities/VCLCredentialTypesUIFormSchemaDescriptor';\nimport type { VCLCredentialTypesUIFormSchema } from './api/entities/VCLCredentialTypesUIFormSchema';\nimport type { VCLDeepLink } from './api/entities/VCLDeepLink';\nimport type { VCLExchange } from './api/entities/VCLExchange';\nimport type { VCLExchangeDescriptor } from './api/entities/VCLExchangeDescriptor';\nimport type { VCLFilter } from './api/entities/VCLFilter';\nimport type { VCLFinalizeOffersDescriptor } from './api/entities/VCLFinalizeOffersDescriptor';\nimport type { VCLGenerateOffersDescriptor } from './api/entities/VCLGenerateOffersDescriptor';\nimport type { VCLJwt } from './api/entities/VCLJwt';\nimport type { VCLJwtVerifiableCredentials } from './api/entities/VCLJwtVerifiableCredentials';\nimport type { VCLOffers } from './api/entities/VCLOffers';\nimport type { VCLOrganization } from './api/entities/VCLOrganization';\nimport type { VCLOrganizations } from './api/entities/VCLOrganizations';\nimport type { VCLOrganizationsSearchDescriptor } from './api/entities/VCLOrganizationsSearchDescriptor';\nimport type { VCLPage } from './api/entities/VCLPage';\nimport type { VCLPresentationRequest } from './api/entities/VCLPresentationRequest';\nimport type { VCLPresentationSubmission } from './api/entities/VCLPresentationSubmission';\nimport type { VCLJwkPublic } from './api/entities/VCLJwkPublic';\nimport type { VCLPushDelegate } from './api/entities/VCLPushDelegate';\nimport type { VCLService } from './api/entities/VCLService';\nimport type { VCLServiceCredentialAgentIssuer } from './api/entities/VCLServiceCredentialAgentIssuer';\nimport { VCLServiceType } from './api/entities/VCLServiceType';\nimport type { VCLServiceTypes } from './api/entities/VCLServiceTypes';\nimport { VCLIssuingType } from './api/entities/VCLIssuingType';\nimport type { VCLSubmissionResult } from './api/entities/VCLSubmissionResult';\nimport type { VCLToken } from './api/entities/VCLToken';\nimport type { VCLVerifiableCredential } from './api/entities/VCLVerifiableCredential';\nimport type { VCLVerifiedProfile } from './api/entities/VCLVerifiedProfile';\nimport type { VCLVerifiedProfileDescriptor } from './api/entities/VCLVerifiedProfileDescriptor';\nimport type { Dictionary } from './api/Dictionary';\nimport type { VCLInitializationDescriptor } from './api/entities/VCLInitializationDescriptor';\nimport type { VCLPresentationRequestDescriptor } from './api/entities/VCLPresentationRequestDescriptor';\nimport type { VCLJwtDescriptor } from './api/entities/VCLJwtDescriptor';\nimport type { VCLDidJwk } from './api/entities/VCLDidJwk';\nimport { VCLErrorCode } from './api/entities/VCLErrorCode';\nimport { VCLError } from './api/entities/VCLError';\n\nexport default VclApi;\nexport {\n Dictionary,\n VCLEnvironment,\n VCLEnvTypes,\n VCLCountry,\n VCLCountries,\n VCLCountryCodes,\n VCLRegion,\n VCLRegions,\n VCLCredentialManifest,\n VCLCredentialManifestDescriptor,\n VCLCredentialManifestDescriptorByDeepLink,\n VCLCredentialManifestDescriptorByService,\n VCLCredentialType,\n VCLCredentialTypes,\n VCLCredentialTypeSchema,\n VCLCredentialTypeSchemas,\n VCLCredentialTypesUIFormSchema,\n VCLCredentialTypesUIFormSchemaDescriptor,\n VCLCredentialManifestDescriptorRefresh,\n VCLDeepLink,\n VCLExchange,\n VCLExchangeDescriptor,\n VCLFilter,\n VCLFinalizeOffersDescriptor,\n VCLGenerateOffersDescriptor,\n VCLJwt,\n VCLJwtVerifiableCredentials,\n VCLOffers,\n VCLOrganization,\n VCLOrganizations,\n VCLOrganizationsSearchDescriptor,\n VCLPage,\n VCLPresentationRequest,\n VCLPresentationSubmission,\n VCLJwkPublic,\n VCLPushDelegate,\n VCLService,\n VCLServiceCredentialAgentIssuer,\n VCLServiceType,\n VCLServiceTypes,\n VCLIssuingType,\n VCLSubmissionResult,\n VCLToken,\n VCLVerifiableCredential,\n VCLVerifiedProfile,\n VCLVerifiedProfileDescriptor,\n VCLInitializationDescriptor,\n VCLPresentationRequestDescriptor,\n VCLJwtDescriptor,\n VCLDidJwk,\n VCLErrorCode,\n VCLError,\n};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,MAAM,QAAQ,cAAc;AAErC,SAASC,WAAW,QAAQ,sBAAsB;AAGlD,SAASC,eAAe,QAAQ,6BAA6B;AAiC7D,SAASC,cAAc,QAAQ,+BAA+B;AAE9D,SAASC,cAAc,QAAQ,+BAA+B;AAW9D,SAASC,YAAY,QAAQ,6BAA6B;AAC1D,SAASC,QAAQ,QAAQ,yBAAyB;AAElD,eAAeN,MAAM;AACrB,SAGEC,WAAW,EAGXC,eAAe,EAiCfC,cAAc,EAEdC,cAAc,EAUdC,YAAY,EACZC,QAAQ"}
1
+ {"version":3,"names":["VclApi","VCLEnvironment","VCLXVnfProtocolVersion","VCLCountryCodes","VCLServiceType","VCLIssuingType","VCLError","VCLStatusCode","VCLErrorCode"],"sources":["index.tsx"],"sourcesContent":["/**\n * Created by Michael Avoyan.\n *\n * Copyright 2022 Velocity Career Labs inc.\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { VclApi } from './api/VCLApi';\nimport { VCLEnvironment } from './api/VCLEnvironment';\nimport { VCLXVnfProtocolVersion } from './api/VCLXVnfProtocolVersion';\n// import type { VCLKeyServiceType } from './api/VCLKeyServiceType';\n// import { VCLKeyServiceTypes } from './api/VCLKeyServiceType';\nimport type { VCLCountry } from './api/entities/VCLCountry';\nimport type { VCLCountries } from './api/entities/VCLCountries';\nimport { VCLCountryCodes } from './api/entities/VCLCountries';\nimport type { VCLRegion } from './api/entities/VCLRegion';\nimport type { VCLRegions } from './api/entities/VCLRegions';\nimport type { VCLCredentialManifest } from './api/entities/VCLCredentialManifest';\nimport type { VCLCredentialManifestDescriptor } from './api/entities/VCLCredentialManifestDescriptor';\nimport type { VCLCredentialManifestDescriptorByDeepLink } from './api/entities/VCLCredentialManifestDescriptorByDeepLink';\nimport type { VCLCredentialManifestDescriptorByService } from './api/entities/VCLCredentialManifestDescriptorByService';\nimport type { VCLCredentialManifestDescriptorRefresh } from './api/entities/VCLCredentialManifestDescriptorRefresh';\nimport type { VCLCredentialType } from './api/entities/VCLCredentialType';\nimport type { VCLCredentialTypes } from './api/entities/VCLCredentialTypes';\nimport type { VCLCredentialTypeSchema } from './api/entities/VCLCredentialTypeSchema';\nimport type { VCLCredentialTypeSchemas } from './api/entities/VCLCredentialTypeSchemas';\nimport type { VCLCredentialTypesUIFormSchemaDescriptor } from './api/entities/VCLCredentialTypesUIFormSchemaDescriptor';\nimport type { VCLCredentialTypesUIFormSchema } from './api/entities/VCLCredentialTypesUIFormSchema';\nimport type { VCLDeepLink } from './api/entities/VCLDeepLink';\nimport type { VCLExchange } from './api/entities/VCLExchange';\nimport type { VCLExchangeDescriptor } from './api/entities/VCLExchangeDescriptor';\nimport type { VCLFilter } from './api/entities/VCLFilter';\nimport type { VCLFinalizeOffersDescriptor } from './api/entities/VCLFinalizeOffersDescriptor';\nimport type { VCLGenerateOffersDescriptor } from './api/entities/VCLGenerateOffersDescriptor';\nimport type { VCLJwt } from './api/entities/VCLJwt';\nimport type { VCLJwtVerifiableCredentials } from './api/entities/VCLJwtVerifiableCredentials';\nimport type { VCLOffers } from './api/entities/VCLOffers';\nimport type { VCLOrganization } from './api/entities/VCLOrganization';\nimport type { VCLOrganizations } from './api/entities/VCLOrganizations';\nimport type { VCLOrganizationsSearchDescriptor } from './api/entities/VCLOrganizationsSearchDescriptor';\nimport type { VCLPage } from './api/entities/VCLPage';\nimport type { VCLPresentationRequest } from './api/entities/VCLPresentationRequest';\nimport type { VCLPresentationSubmission } from './api/entities/VCLPresentationSubmission';\nimport type { VCLJwkPublic } from './api/entities/VCLJwkPublic';\nimport type { VCLPushDelegate } from './api/entities/VCLPushDelegate';\nimport type { VCLService } from './api/entities/VCLService';\nimport type { VCLServiceCredentialAgentIssuer } from './api/entities/VCLServiceCredentialAgentIssuer';\nimport { VCLServiceType } from './api/entities/VCLServiceType';\nimport type { VCLServiceTypes } from './api/entities/VCLServiceTypes';\nimport { VCLIssuingType } from './api/entities/VCLIssuingType';\nimport type { VCLSubmissionResult } from './api/entities/VCLSubmissionResult';\nimport type { VCLToken } from './api/entities/VCLToken';\nimport type { VCLVerifiableCredential } from './api/entities/VCLVerifiableCredential';\nimport type { VCLVerifiedProfile } from './api/entities/VCLVerifiedProfile';\nimport type { VCLVerifiedProfileDescriptor } from './api/entities/VCLVerifiedProfileDescriptor';\nimport type { Dictionary } from './api/Dictionary';\nimport type { VCLInitializationDescriptor } from './api/entities/VCLInitializationDescriptor';\nimport type { VCLPresentationRequestDescriptor } from './api/entities/VCLPresentationRequestDescriptor';\nimport type { VCLJwtDescriptor } from './api/entities/VCLJwtDescriptor';\nimport type { VCLDidJwk } from './api/entities/VCLDidJwk';\nimport { VCLError } from './api/entities/VCLError';\nimport { VCLStatusCode } from './api/entities/VCLStatusCode';\nimport { VCLErrorCode } from './api/entities/VCLErrorCode';\n\nexport default VclApi;\nexport {\n Dictionary,\n VCLEnvironment,\n VCLXVnfProtocolVersion,\n VCLCountry,\n VCLCountries,\n VCLCountryCodes,\n VCLRegion,\n VCLRegions,\n VCLCredentialManifest,\n VCLCredentialManifestDescriptor,\n VCLCredentialManifestDescriptorByDeepLink,\n VCLCredentialManifestDescriptorByService,\n VCLCredentialType,\n VCLCredentialTypes,\n VCLCredentialTypeSchema,\n VCLCredentialTypeSchemas,\n VCLCredentialTypesUIFormSchema,\n VCLCredentialTypesUIFormSchemaDescriptor,\n VCLCredentialManifestDescriptorRefresh,\n VCLDeepLink,\n VCLExchange,\n VCLExchangeDescriptor,\n VCLFilter,\n VCLFinalizeOffersDescriptor,\n VCLGenerateOffersDescriptor,\n VCLJwt,\n VCLJwtVerifiableCredentials,\n VCLOffers,\n VCLOrganization,\n VCLOrganizations,\n VCLOrganizationsSearchDescriptor,\n VCLPage,\n VCLPresentationRequest,\n VCLPresentationSubmission,\n VCLJwkPublic,\n VCLPushDelegate,\n VCLService,\n VCLServiceCredentialAgentIssuer,\n VCLServiceType,\n VCLServiceTypes,\n VCLIssuingType,\n VCLSubmissionResult,\n VCLToken,\n VCLVerifiableCredential,\n VCLVerifiedProfile,\n VCLVerifiedProfileDescriptor,\n VCLInitializationDescriptor,\n VCLPresentationRequestDescriptor,\n VCLJwtDescriptor,\n VCLDidJwk,\n VCLError,\n VCLStatusCode,\n VCLErrorCode,\n};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,MAAM,QAAQ,cAAc;AACrC,SAASC,cAAc,QAAQ,sBAAsB;AACrD,SAASC,sBAAsB,QAAQ,8BAA8B;AACrE;AACA;;AAGA,SAASC,eAAe,QAAQ,6BAA6B;AAiC7D,SAASC,cAAc,QAAQ,+BAA+B;AAE9D,SAASC,cAAc,QAAQ,+BAA+B;AAW9D,SAASC,QAAQ,QAAQ,yBAAyB;AAClD,SAASC,aAAa,QAAQ,8BAA8B;AAC5D,SAASC,YAAY,QAAQ,6BAA6B;AAE1D,eAAeR,MAAM;AACrB,SAEEC,cAAc,EACdC,sBAAsB,EAGtBC,eAAe,EAiCfC,cAAc,EAEdC,cAAc,EAUdC,QAAQ,EACRC,aAAa,EACbC,YAAY"}
@@ -37,13 +37,13 @@ export declare const VclApi: {
37
37
  getCredentialTypes: () => Promise<VCLCredentialTypes>;
38
38
  getCredentialTypeSchemas: () => Promise<VCLCredentialTypeSchemas>;
39
39
  getPresentationRequest: (presentationRequestDescriptor: VCLPresentationRequestDescriptor) => Promise<VCLPresentationRequest>;
40
- submitPresentation: (presentationSubmission: VCLPresentationSubmission) => Promise<VCLSubmissionResult>;
40
+ submitPresentation: (presentationSubmission: VCLPresentationSubmission, didJwk?: VCLDidJwk) => Promise<VCLSubmissionResult>;
41
41
  getExchangeProgress: (exchangeDescriptor: VCLExchangeDescriptor) => Promise<VCLExchange>;
42
42
  searchForOrganizations: (organizationsSearchDescriptor: VCLOrganizationsSearchDescriptor) => Promise<VCLOrganizations>;
43
43
  getCredentialManifest: (credentialManifestDescriptor: VCLCredentialManifestDescriptor) => Promise<VCLCredentialManifest>;
44
- generateOffers: (generateOffersDescriptor: VCLGenerateOffersDescriptor) => Promise<VCLOffers>;
44
+ generateOffers: (generateOffersDescriptor: VCLGenerateOffersDescriptor, didJwk?: VCLDidJwk) => Promise<VCLOffers>;
45
45
  checkForOffers: (generateOffersDescriptor: VCLGenerateOffersDescriptor, token: VCLToken) => Promise<VCLOffers>;
46
- finalizeOffers: (finalizeOffersDescriptor: VCLFinalizeOffersDescriptor, token: VCLToken) => Promise<VCLJwtVerifiableCredentials>;
46
+ finalizeOffers: (finalizeOffersDescriptor: VCLFinalizeOffersDescriptor, token: VCLToken, didJwk?: VCLDidJwk) => Promise<VCLJwtVerifiableCredentials>;
47
47
  getCredentialTypesUIFormSchema: (credentialTypesUIFormSchemaDescriptor: VCLCredentialTypesUIFormSchemaDescriptor) => Promise<VCLCredentialTypesUIFormSchema>;
48
48
  getVerifiedProfile: (verifiedProfileDescriptor: VCLVerifiedProfileDescriptor) => Promise<VCLVerifiedProfile>;
49
49
  verifyJwt: (jwt: VCLJwt, jwkPublic: VCLJwkPublic) => Promise<boolean>;
@@ -4,12 +4,9 @@
4
4
  * Copyright 2022 Velocity Career Labs inc.
5
5
  * SPDX-License-Identifier: Apache-2.0
6
6
  */
7
- export interface VCLEnvironment {
8
- value: string;
9
- }
10
- export declare enum VCLEnvTypes {
11
- DEV = "dev",
12
- QA = "qa",
13
- STAGING = "staging",
14
- PROD = "prod"
7
+ export declare enum VCLEnvironment {
8
+ Dev = "dev",
9
+ Qa = "qa",
10
+ Staging = "staging",
11
+ Prod = "prod"
15
12
  }
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Created by Michael Avoyan.
3
+ *
4
+ * Copyright 2022 Velocity Career Labs inc.
5
+ * SPDX-License-Identifier: Apache-2.0
6
+ */
7
+ export declare enum VCLKeyServiceType {
8
+ Local = "local",
9
+ Remote = "remote"
10
+ }
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Created by Michael Avoyan.
3
+ *
4
+ * Copyright 2022 Velocity Career Labs inc.
5
+ * SPDX-License-Identifier: Apache-2.0
6
+ */
7
+ export declare enum VCLXVnfProtocolVersion {
8
+ XVnfProtocolVersion1 = "1.0",
9
+ XVnfProtocolVersion2 = "2.0"
10
+ }
@@ -5,8 +5,11 @@
5
5
  * SPDX-License-Identifier: Apache-2.0
6
6
  */
7
7
  import type { VCLJwt } from './VCLJwt';
8
+ import type { VCLVerifiedProfile } from './VCLVerifiedProfile';
8
9
  export interface VCLCredentialManifest {
9
10
  jwt: VCLJwt;
11
+ vendorOriginContext?: String;
12
+ verifiedProfile: VCLVerifiedProfile;
10
13
  iss: string;
11
14
  did: string;
12
15
  exchangeId: string;
@@ -5,5 +5,16 @@
5
5
  * SPDX-License-Identifier: Apache-2.0
6
6
  */
7
7
  export interface VCLDidJwk {
8
+ /**
9
+ * The id of private key save in secure enclave
10
+ */
11
+ keyId: string;
12
+ /**
13
+ * The did:jwk
14
+ */
8
15
  value: string;
16
+ /**
17
+ * kid of jwt - did:jwk suffixed with #0
18
+ */
19
+ kid: string;
9
20
  }
@@ -5,6 +5,11 @@
5
5
  * SPDX-License-Identifier: Apache-2.0
6
6
  */
7
7
  export declare enum VCLErrorCode {
8
- NetworkError = 1,
9
- VerificationError = 403
8
+ CredentialTypeNotRegistered = "credential_type_not_registered",
9
+ IssuerRequiresIdentityPermission = "issuer_requires_identity_permission",
10
+ IssuerRequiresNotaryPermission = "issuer_requires_notary_permission",
11
+ CredentialSubjectContextMissing = "credential_subject_context_missing",
12
+ InvalidCredentialSubjectType = "invalid_credential_subject_type",
13
+ InvalidCredentialSubjectContext = "invalid_credential_subject_context",
14
+ IssuerUnexpectedPermissionFailure = "issuer_unexpected_permission_failure"
10
15
  }
@@ -5,8 +5,10 @@
5
5
  * SPDX-License-Identifier: Apache-2.0
6
6
  */
7
7
  import type { VCLCredentialManifest } from './VCLCredentialManifest';
8
+ import type { VCLOffers } from './VCLOffers';
8
9
  export interface VCLFinalizeOffersDescriptor {
9
10
  credentialManifest: VCLCredentialManifest;
11
+ offers: VCLOffers;
10
12
  rejectedOfferIds: string[];
11
13
  approvedOfferIds: string[];
12
14
  }
@@ -5,7 +5,11 @@
5
5
  * SPDX-License-Identifier: Apache-2.0
6
6
  */
7
7
  import type { VCLEnvironment } from '../VCLEnvironment';
8
+ import type { VCLKeyServiceType } from '../VCLKeyServiceType';
9
+ import type { VCLXVnfProtocolVersion } from '../VCLXVnfProtocolVersion';
8
10
  export interface VCLInitializationDescriptor {
9
11
  environment?: VCLEnvironment;
12
+ keyServiceType?: VCLKeyServiceType;
13
+ xVnfProtocolVersion?: VCLXVnfProtocolVersion;
10
14
  cacheSequence?: number;
11
15
  }
@@ -6,7 +6,24 @@
6
6
  */
7
7
  import type { Dictionary } from '../Dictionary';
8
8
  export interface VCLJwtDescriptor {
9
+ /**
10
+ * The Id of the existing private key to sign with
11
+ */
12
+ keyId?: string;
13
+ /**
14
+ * Json formatted payload
15
+ */
9
16
  payload: Dictionary<any>;
10
- iss: string;
17
+ /**
18
+ * JWT ID
19
+ */
11
20
  jti: string;
21
+ /**
22
+ * The did of the wallet owner
23
+ */
24
+ iss: string;
25
+ /**
26
+ * The issuer DID
27
+ */
28
+ aud?: String;
12
29
  }
@@ -7,7 +7,9 @@
7
7
  import type { Dictionary } from '../Dictionary';
8
8
  import type { VCLToken } from './VCLToken';
9
9
  export interface VCLOffers {
10
+ payload: Dictionary<any>;
10
11
  all: Dictionary<any>[];
11
12
  responseCode: number;
12
13
  token: VCLToken;
14
+ challenge: string;
13
15
  }
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Created by Michael Avoyan.
3
+ *
4
+ * Copyright 2022 Velocity Career Labs inc.
5
+ * SPDX-License-Identifier: Apache-2.0
6
+ */
7
+ export declare enum VCLStatusCode {
8
+ NetworkError = 1,
9
+ VerificationError = 403
10
+ }
@@ -5,8 +5,8 @@
5
5
  * SPDX-License-Identifier: Apache-2.0
6
6
  */
7
7
  import { VclApi } from './api/VCLApi';
8
- import type { VCLEnvironment } from './api/VCLEnvironment';
9
- import { VCLEnvTypes } from './api/VCLEnvironment';
8
+ import { VCLEnvironment } from './api/VCLEnvironment';
9
+ import { VCLXVnfProtocolVersion } from './api/VCLXVnfProtocolVersion';
10
10
  import type { VCLCountry } from './api/entities/VCLCountry';
11
11
  import type { VCLCountries } from './api/entities/VCLCountries';
12
12
  import { VCLCountryCodes } from './api/entities/VCLCountries';
@@ -55,7 +55,8 @@ import type { VCLInitializationDescriptor } from './api/entities/VCLInitializati
55
55
  import type { VCLPresentationRequestDescriptor } from './api/entities/VCLPresentationRequestDescriptor';
56
56
  import type { VCLJwtDescriptor } from './api/entities/VCLJwtDescriptor';
57
57
  import type { VCLDidJwk } from './api/entities/VCLDidJwk';
58
- import { VCLErrorCode } from './api/entities/VCLErrorCode';
59
58
  import { VCLError } from './api/entities/VCLError';
59
+ import { VCLStatusCode } from './api/entities/VCLStatusCode';
60
+ import { VCLErrorCode } from './api/entities/VCLErrorCode';
60
61
  export default VclApi;
61
- export { Dictionary, VCLEnvironment, VCLEnvTypes, VCLCountry, VCLCountries, VCLCountryCodes, VCLRegion, VCLRegions, VCLCredentialManifest, VCLCredentialManifestDescriptor, VCLCredentialManifestDescriptorByDeepLink, VCLCredentialManifestDescriptorByService, VCLCredentialType, VCLCredentialTypes, VCLCredentialTypeSchema, VCLCredentialTypeSchemas, VCLCredentialTypesUIFormSchema, VCLCredentialTypesUIFormSchemaDescriptor, VCLCredentialManifestDescriptorRefresh, VCLDeepLink, VCLExchange, VCLExchangeDescriptor, VCLFilter, VCLFinalizeOffersDescriptor, VCLGenerateOffersDescriptor, VCLJwt, VCLJwtVerifiableCredentials, VCLOffers, VCLOrganization, VCLOrganizations, VCLOrganizationsSearchDescriptor, VCLPage, VCLPresentationRequest, VCLPresentationSubmission, VCLJwkPublic, VCLPushDelegate, VCLService, VCLServiceCredentialAgentIssuer, VCLServiceType, VCLServiceTypes, VCLIssuingType, VCLSubmissionResult, VCLToken, VCLVerifiableCredential, VCLVerifiedProfile, VCLVerifiedProfileDescriptor, VCLInitializationDescriptor, VCLPresentationRequestDescriptor, VCLJwtDescriptor, VCLDidJwk, VCLErrorCode, VCLError, };
62
+ export { Dictionary, VCLEnvironment, VCLXVnfProtocolVersion, VCLCountry, VCLCountries, VCLCountryCodes, VCLRegion, VCLRegions, VCLCredentialManifest, VCLCredentialManifestDescriptor, VCLCredentialManifestDescriptorByDeepLink, VCLCredentialManifestDescriptorByService, VCLCredentialType, VCLCredentialTypes, VCLCredentialTypeSchema, VCLCredentialTypeSchemas, VCLCredentialTypesUIFormSchema, VCLCredentialTypesUIFormSchemaDescriptor, VCLCredentialManifestDescriptorRefresh, VCLDeepLink, VCLExchange, VCLExchangeDescriptor, VCLFilter, VCLFinalizeOffersDescriptor, VCLGenerateOffersDescriptor, VCLJwt, VCLJwtVerifiableCredentials, VCLOffers, VCLOrganization, VCLOrganizations, VCLOrganizationsSearchDescriptor, VCLPage, VCLPresentationRequest, VCLPresentationSubmission, VCLJwkPublic, VCLPushDelegate, VCLService, VCLServiceCredentialAgentIssuer, VCLServiceType, VCLServiceTypes, VCLIssuingType, VCLSubmissionResult, VCLToken, VCLVerifiableCredential, VCLVerifiedProfile, VCLVerifiedProfileDescriptor, VCLInitializationDescriptor, VCLPresentationRequestDescriptor, VCLJwtDescriptor, VCLDidJwk, VCLError, VCLStatusCode, VCLErrorCode, };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@velocitycareerlabs/vcl-react-native",
3
- "version": "1.12.1",
3
+ "version": "1.14.1",
4
4
  "description": "Velocity Career Labs React Native SDK",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",
package/src/api/VCLApi.ts CHANGED
@@ -85,10 +85,14 @@ export const VclApi = {
85
85
  },
86
86
 
87
87
  submitPresentation: async (
88
- presentationSubmission: VCLPresentationSubmission
88
+ presentationSubmission: VCLPresentationSubmission,
89
+ didJwk?: VCLDidJwk
89
90
  ): Promise<VCLSubmissionResult> => {
90
91
  try {
91
- return await VclReactNative.submitPresentation(presentationSubmission);
92
+ return await VclReactNative.submitPresentation(
93
+ presentationSubmission,
94
+ didJwk
95
+ );
92
96
  } catch (e) {
93
97
  throw new VCLError(e);
94
98
  }
@@ -129,10 +133,14 @@ export const VclApi = {
129
133
  },
130
134
 
131
135
  generateOffers: async (
132
- generateOffersDescriptor: VCLGenerateOffersDescriptor
136
+ generateOffersDescriptor: VCLGenerateOffersDescriptor,
137
+ didJwk?: VCLDidJwk
133
138
  ): Promise<VCLOffers> => {
134
139
  try {
135
- return await VclReactNative.generateOffers(generateOffersDescriptor);
140
+ return await VclReactNative.generateOffers(
141
+ generateOffersDescriptor,
142
+ didJwk
143
+ );
136
144
  } catch (e) {
137
145
  throw new VCLError(e);
138
146
  }
@@ -154,11 +162,13 @@ export const VclApi = {
154
162
 
155
163
  finalizeOffers: async (
156
164
  finalizeOffersDescriptor: VCLFinalizeOffersDescriptor,
157
- token: VCLToken
165
+ token: VCLToken,
166
+ didJwk?: VCLDidJwk
158
167
  ): Promise<VCLJwtVerifiableCredentials> => {
159
168
  try {
160
169
  return await VclReactNative.finalizeOffers(
161
170
  finalizeOffersDescriptor,
171
+ didJwk,
162
172
  token
163
173
  );
164
174
  } catch (e) {
@@ -5,13 +5,9 @@
5
5
  * SPDX-License-Identifier: Apache-2.0
6
6
  */
7
7
 
8
- export interface VCLEnvironment {
9
- value: string;
10
- }
11
-
12
- export enum VCLEnvTypes {
13
- DEV = 'dev',
14
- QA = 'qa',
15
- STAGING = 'staging',
16
- PROD = 'prod',
8
+ export enum VCLEnvironment {
9
+ Dev = 'dev',
10
+ Qa = 'qa',
11
+ Staging = 'staging',
12
+ Prod = 'prod',
17
13
  }
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Created by Michael Avoyan.
3
+ *
4
+ * Copyright 2022 Velocity Career Labs inc.
5
+ * SPDX-License-Identifier: Apache-2.0
6
+ */
7
+
8
+ export enum VCLKeyServiceType {
9
+ Local = 'local',
10
+ Remote = 'remote',
11
+ }
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Created by Michael Avoyan.
3
+ *
4
+ * Copyright 2022 Velocity Career Labs inc.
5
+ * SPDX-License-Identifier: Apache-2.0
6
+ */
7
+
8
+ export enum VCLXVnfProtocolVersion {
9
+ XVnfProtocolVersion1 = '1.0',
10
+ XVnfProtocolVersion2 = '2.0',
11
+ }
@@ -6,9 +6,12 @@
6
6
  */
7
7
 
8
8
  import type { VCLJwt } from './VCLJwt';
9
+ import type { VCLVerifiedProfile } from './VCLVerifiedProfile';
9
10
 
10
11
  export interface VCLCredentialManifest {
11
12
  jwt: VCLJwt;
13
+ vendorOriginContext?: String;
14
+ verifiedProfile: VCLVerifiedProfile;
12
15
  iss: string;
13
16
  did: string;
14
17
  exchangeId: string;
@@ -6,5 +6,16 @@
6
6
  */
7
7
 
8
8
  export interface VCLDidJwk {
9
+ /**
10
+ * The id of private key save in secure enclave
11
+ */
12
+ keyId: string;
13
+ /**
14
+ * The did:jwk
15
+ */
9
16
  value: string;
17
+ /**
18
+ * kid of jwt - did:jwk suffixed with #0
19
+ */
20
+ kid: string;
10
21
  }
@@ -6,6 +6,12 @@
6
6
  */
7
7
 
8
8
  export enum VCLErrorCode {
9
- NetworkError = 1,
10
- VerificationError = 403,
9
+ // Credential issuer verification error codes:
10
+ CredentialTypeNotRegistered = 'credential_type_not_registered',
11
+ IssuerRequiresIdentityPermission = 'issuer_requires_identity_permission',
12
+ IssuerRequiresNotaryPermission = 'issuer_requires_notary_permission',
13
+ CredentialSubjectContextMissing = 'credential_subject_context_missing',
14
+ InvalidCredentialSubjectType = 'invalid_credential_subject_type',
15
+ InvalidCredentialSubjectContext = 'invalid_credential_subject_context',
16
+ IssuerUnexpectedPermissionFailure = 'issuer_unexpected_permission_failure',
11
17
  }
@@ -6,9 +6,11 @@
6
6
  */
7
7
 
8
8
  import type { VCLCredentialManifest } from './VCLCredentialManifest';
9
+ import type { VCLOffers } from './VCLOffers';
9
10
 
10
11
  export interface VCLFinalizeOffersDescriptor {
11
12
  credentialManifest: VCLCredentialManifest;
13
+ offers: VCLOffers;
12
14
  rejectedOfferIds: string[];
13
15
  approvedOfferIds: string[];
14
16
  }
@@ -6,8 +6,12 @@
6
6
  */
7
7
 
8
8
  import type { VCLEnvironment } from '../VCLEnvironment';
9
+ import type { VCLKeyServiceType } from '../VCLKeyServiceType';
10
+ import type { VCLXVnfProtocolVersion } from '../VCLXVnfProtocolVersion';
9
11
 
10
12
  export interface VCLInitializationDescriptor {
11
13
  environment?: VCLEnvironment;
14
+ keyServiceType?: VCLKeyServiceType;
15
+ xVnfProtocolVersion?: VCLXVnfProtocolVersion;
12
16
  cacheSequence?: number;
13
17
  }
@@ -8,7 +8,24 @@
8
8
  import type { Dictionary } from '../Dictionary';
9
9
 
10
10
  export interface VCLJwtDescriptor {
11
+ /**
12
+ * The Id of the existing private key to sign with
13
+ */
14
+ keyId?: string;
15
+ /**
16
+ * Json formatted payload
17
+ */
11
18
  payload: Dictionary<any>;
12
- iss: string;
19
+ /**
20
+ * JWT ID
21
+ */
13
22
  jti: string;
23
+ /**
24
+ * The did of the wallet owner
25
+ */
26
+ iss: string;
27
+ /**
28
+ * The issuer DID
29
+ */
30
+ aud?: String;
14
31
  }
@@ -9,7 +9,9 @@ import type { Dictionary } from '../Dictionary';
9
9
  import type { VCLToken } from './VCLToken';
10
10
 
11
11
  export interface VCLOffers {
12
+ payload: Dictionary<any>;
12
13
  all: Dictionary<any>[];
13
14
  responseCode: number;
14
15
  token: VCLToken;
16
+ challenge: string;
15
17
  }
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Created by Michael Avoyan.
3
+ *
4
+ * Copyright 2022 Velocity Career Labs inc.
5
+ * SPDX-License-Identifier: Apache-2.0
6
+ */
7
+
8
+ export enum VCLStatusCode {
9
+ NetworkError = 1,
10
+ VerificationError = 403,
11
+ }
package/src/index.tsx CHANGED
@@ -6,8 +6,10 @@
6
6
  */
7
7
 
8
8
  import { VclApi } from './api/VCLApi';
9
- import type { VCLEnvironment } from './api/VCLEnvironment';
10
- import { VCLEnvTypes } from './api/VCLEnvironment';
9
+ import { VCLEnvironment } from './api/VCLEnvironment';
10
+ import { VCLXVnfProtocolVersion } from './api/VCLXVnfProtocolVersion';
11
+ // import type { VCLKeyServiceType } from './api/VCLKeyServiceType';
12
+ // import { VCLKeyServiceTypes } from './api/VCLKeyServiceType';
11
13
  import type { VCLCountry } from './api/entities/VCLCountry';
12
14
  import type { VCLCountries } from './api/entities/VCLCountries';
13
15
  import { VCLCountryCodes } from './api/entities/VCLCountries';
@@ -56,14 +58,15 @@ import type { VCLInitializationDescriptor } from './api/entities/VCLInitializati
56
58
  import type { VCLPresentationRequestDescriptor } from './api/entities/VCLPresentationRequestDescriptor';
57
59
  import type { VCLJwtDescriptor } from './api/entities/VCLJwtDescriptor';
58
60
  import type { VCLDidJwk } from './api/entities/VCLDidJwk';
59
- import { VCLErrorCode } from './api/entities/VCLErrorCode';
60
61
  import { VCLError } from './api/entities/VCLError';
62
+ import { VCLStatusCode } from './api/entities/VCLStatusCode';
63
+ import { VCLErrorCode } from './api/entities/VCLErrorCode';
61
64
 
62
65
  export default VclApi;
63
66
  export {
64
67
  Dictionary,
65
68
  VCLEnvironment,
66
- VCLEnvTypes,
69
+ VCLXVnfProtocolVersion,
67
70
  VCLCountry,
68
71
  VCLCountries,
69
72
  VCLCountryCodes,
@@ -111,6 +114,7 @@ export {
111
114
  VCLPresentationRequestDescriptor,
112
115
  VCLJwtDescriptor,
113
116
  VCLDidJwk,
114
- VCLErrorCode,
115
117
  VCLError,
118
+ VCLStatusCode,
119
+ VCLErrorCode,
116
120
  };
@@ -20,5 +20,5 @@ Pod::Spec.new do |s|
20
20
  s.static_framework = true
21
21
 
22
22
  s.dependency "React"
23
- s.dependency "VCL", "1.12.1"
23
+ s.dependency "VCL", "1.14.1"
24
24
  end