@proof.com/proof-vc-common 0.2.0 → 0.3.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 (81) hide show
  1. package/dist/client.d.ts +13 -0
  2. package/dist/client.d.ts.map +1 -0
  3. package/dist/client.js +39 -0
  4. package/dist/client.js.map +1 -0
  5. package/dist/constants.d.ts +4 -0
  6. package/dist/constants.d.ts.map +1 -0
  7. package/dist/constants.js +3 -0
  8. package/dist/constants.js.map +1 -0
  9. package/dist/dcql.d.ts +14 -0
  10. package/dist/dcql.d.ts.map +1 -0
  11. package/dist/dcql.js +11 -0
  12. package/dist/dcql.js.map +1 -0
  13. package/dist/index.d.ts +7 -0
  14. package/dist/index.d.ts.map +1 -0
  15. package/dist/index.js +4 -0
  16. package/dist/index.js.map +1 -0
  17. package/dist/internal.d.ts +27 -0
  18. package/dist/internal.d.ts.map +1 -0
  19. package/dist/internal.js +42 -0
  20. package/dist/internal.js.map +1 -0
  21. package/dist/types.d.ts +0 -9
  22. package/dist/types.d.ts.map +1 -1
  23. package/package.json +13 -35
  24. package/LICENSE +0 -201
  25. package/README.md +0 -299
  26. package/dist/certificates/chain_validator.d.ts +0 -3
  27. package/dist/certificates/chain_validator.d.ts.map +0 -1
  28. package/dist/certificates/chain_validator.js +0 -29
  29. package/dist/certificates/chain_validator.js.map +0 -1
  30. package/dist/certificates/trust_store/index.d.ts +0 -4
  31. package/dist/certificates/trust_store/index.d.ts.map +0 -1
  32. package/dist/certificates/trust_store/index.js +0 -14
  33. package/dist/certificates/trust_store/index.js.map +0 -1
  34. package/dist/certificates/trust_store/proof_root_ca_r1.d.ts +0 -2
  35. package/dist/certificates/trust_store/proof_root_ca_r1.d.ts.map +0 -1
  36. package/dist/certificates/trust_store/proof_root_ca_r1.js +0 -16
  37. package/dist/certificates/trust_store/proof_root_ca_r1.js.map +0 -1
  38. package/dist/certificates/trust_store/proof_root_ca_r1_development.d.ts +0 -2
  39. package/dist/certificates/trust_store/proof_root_ca_r1_development.d.ts.map +0 -1
  40. package/dist/certificates/trust_store/proof_root_ca_r1_development.js +0 -17
  41. package/dist/certificates/trust_store/proof_root_ca_r1_development.js.map +0 -1
  42. package/dist/index.browser.d.ts +0 -6
  43. package/dist/index.browser.d.ts.map +0 -1
  44. package/dist/index.browser.js +0 -3
  45. package/dist/index.browser.js.map +0 -1
  46. package/dist/index.node.d.ts +0 -8
  47. package/dist/index.node.d.ts.map +0 -1
  48. package/dist/index.node.js +0 -4
  49. package/dist/index.node.js.map +0 -1
  50. package/dist/presentation/base_client.d.ts +0 -36
  51. package/dist/presentation/base_client.d.ts.map +0 -1
  52. package/dist/presentation/base_client.js +0 -88
  53. package/dist/presentation/base_client.js.map +0 -1
  54. package/dist/presentation/node_client.d.ts +0 -34
  55. package/dist/presentation/node_client.d.ts.map +0 -1
  56. package/dist/presentation/node_client.js +0 -152
  57. package/dist/presentation/node_client.js.map +0 -1
  58. package/dist/proof_credential_factory.d.ts +0 -4
  59. package/dist/proof_credential_factory.d.ts.map +0 -1
  60. package/dist/proof_credential_factory.js +0 -37
  61. package/dist/proof_credential_factory.js.map +0 -1
  62. package/dist/proof_credentials.d.ts +0 -37
  63. package/dist/proof_credentials.d.ts.map +0 -1
  64. package/dist/proof_credentials.js +0 -43
  65. package/dist/proof_credentials.js.map +0 -1
  66. package/dist/transaction_data.d.ts +0 -73
  67. package/dist/transaction_data.d.ts.map +0 -1
  68. package/dist/transaction_data.js +0 -51
  69. package/dist/transaction_data.js.map +0 -1
  70. package/dist/utils.d.ts +0 -3
  71. package/dist/utils.d.ts.map +0 -1
  72. package/dist/utils.js +0 -10
  73. package/dist/utils.js.map +0 -1
  74. package/dist/vc_presentation.browser.d.ts +0 -4
  75. package/dist/vc_presentation.browser.d.ts.map +0 -1
  76. package/dist/vc_presentation.browser.js +0 -13
  77. package/dist/vc_presentation.browser.js.map +0 -1
  78. package/dist/vc_presentation.node.d.ts +0 -8
  79. package/dist/vc_presentation.node.d.ts.map +0 -1
  80. package/dist/vc_presentation.node.js +0 -23
  81. package/dist/vc_presentation.node.js.map +0 -1
package/README.md DELETED
@@ -1,299 +0,0 @@
1
- # Proof Digital Credentials
2
-
3
- <img src="docs/proof-logo.svg" alt="drawing" width="450"/>
4
-
5
- _A digital passport. Verified once, usable everywhere._
6
-
7
- Read our [documentation](https://dev.proof.com/docs/digital-credentials-overview) or [try it](https://demo.next.proof.com)!
8
-
9
- ## Table of Contents
10
-
11
- - [Installation](#installation)
12
- - [Getting Started](#getting-started)
13
- - [Response Modes](#response-modes)
14
- - [Pushed Authorization Requests](#pushed-authorization-requests)
15
- - [Verifiable Credential Presentation](#verifiable-credential-presentation)
16
- - [Credential Types](#credential-type)
17
- - [Request](#request)
18
- - [Scopes](#scopes)
19
- - [Transaction Templates](#transaction-templates)
20
- - [Verify](#verify)
21
- - [Certificate Authority](#certificate-authority)
22
- - [Documentation](#documentation)
23
- - [Contributing](#contributing)
24
-
25
- ## Installation
26
-
27
- ```
28
- npm install @proof.com/proof-vc-common
29
- ```
30
-
31
- The library provides 2 distinct browser and Node.js distributions, see [package.json](package.json) `exports`. The browser distribution has **0 dependencies** :white_check_mark:
32
-
33
- ## Getting Started
34
-
35
- Proof implements the [OpenID for Verifiable Presentations 1.0](https://openid.net/specs/openid-4-verifiable-presentations-1_0.html) specification.
36
- [Setup an OAuth Application](https://dev.proof.com/docs/oauth-client-credentials) in your Proof account to get your `client_id`.
37
-
38
- Initialize the library at the start of your application:
39
-
40
- ```javascript
41
- import { init } from "@proof.com/proof-vc-common";
42
-
43
- init({
44
- environment: "sandbox",
45
- clientId: "verifier-demo",
46
- responseMode: "direct_post",
47
- callbackUri: "http://localhost/verify_vp_token",
48
- });
49
- ```
50
-
51
- ### Response Modes
52
-
53
- Proof supports `fragment` and `direct_post` response modes.
54
-
55
- #### fragment
56
-
57
- Using `fragment` the `vp_token` is returned as a fragment of the `callbackUri` when the user is 302 redirected from Proof to your website.
58
-
59
- ```
60
- GET http://localhost/verify_vp_token#vp_token=eyJwcm9vZl9pZF9...
61
- ```
62
-
63
- #### direct_post
64
-
65
- Using `direct_post` the `vp_token` is returned in the JSON body of a POST request to the `callbackUri` from Proof to your website. See the [OID4VP specification](https://openid.net/specs/openid-4-verifiable-presentations-1_0.html#name-response-mode-direct_post) for more details.
66
-
67
- ```
68
- POST http://localhost/verify_vp_token
69
- { "vp_token": "eyJwcm9vZl9pZF9..." }
70
- ```
71
-
72
- ### Pushed Authorization Requests
73
-
74
- Proof supports [Pushed Authorization Requests](https://datatracker.ietf.org/doc/html/rfc9126) (PAR).
75
- You may want to use this feature when using [Transaction Templates](#transaction-templates) to avoid hitting URL size limits.
76
- Note that PAR is available **only from the Node.js distribution**.
77
-
78
- ```javascript
79
- init({
80
- environment: "sandbox",
81
- clientId: "caxdw5a7d",
82
- clientSecret: "…",
83
- responseMode: "direct_post",
84
- callbackUri: "http://localhost/verify_vp_token",
85
- usePushedAuthorizationRequest: true,
86
- });
87
- ```
88
-
89
- ## Verifiable Credential Presentation
90
-
91
- ### Credential Type
92
-
93
- Proof issues Verifiable Credentials according to the [SD-JWT-VC specification](https://www.ietf.org/archive/id/draft-ietf-oauth-sd-jwt-vc-16.html) and publishes its [OID4VCI Credential Issuer Metadata](https://openid.net/specs/openid-4-verifiable-credential-issuance-1_0.html#name-credential-issuer-metadata) at https://api.proof.com/.well-known/openid-credential-issuer.
94
-
95
- `ProofCredentialV1`
96
-
97
- | claim | type | description |
98
- | -------------- | ------- | ------------------------------------------------------------------ |
99
- | given_name | string | user's given name as it appears on the verified identity document |
100
- | family_name | string | user's family name as it appears on the verified identity document |
101
- | birthdate | string | user's date of birth in ISO 8601 format (`YYYY-MM-DD`) |
102
- | age_is_over.18 | boolean | boolean confirming the user is 18 or older |
103
- | age_is_over.21 | boolean | boolean confirming the user is 21 or older |
104
- | age_is_over.65 | boolean | boolean confirming the user is 65 or older |
105
-
106
- All attributes are selectively disclosable and will return `undefined` if the claim wasn't disclosed.
107
-
108
- ### Request
109
-
110
- Request a Verifiable Credential Presentation with an [OAuth 2.0](https://datatracker.ietf.org/doc/html/rfc6749) Authorization Request:
111
-
112
- ```javascript
113
- import { getAuthorizationRequestURL } from "@proof.com/proof-vc-common";
114
-
115
- const redirect = await getAuthorizationRequestURL({
116
- nonce: "3e8e4918-e9fb-453a-a538-81152be15c1b",
117
- scope: "urn:proof:params:scope:verifiable-credentials:basic",
118
- state: "6A2B4CD830",
119
- loginHint: "frodo.baggins@theshire",
120
- });
121
-
122
- window.location.href = redirect;
123
- ```
124
-
125
- #### Scopes
126
-
127
- Proof supports the `scope` parameter of the [OID4VP specification](https://openid.net/specs/openid-4-verifiable-presentations-1_0.html#name-using-scope-parameter-to-re). Each scope maps to a pre-defined DCQL query and returns a specific [Credential Type](#credential-type).
128
-
129
- Supported `scope` and their associated [Credential Type](#credential-type):
130
-
131
- | scope | Credential Type |
132
- | ----------------------------------------------------- | ------------------- |
133
- | `urn:proof:params:scope:verifiable-credentials:basic` | `ProofCredentialV1` |
134
-
135
- #### Transaction Templates
136
-
137
- _Transaction Templates_ allow you to bind specific data to a Verifiable Credential Presentation. Proof uses the [Transaction Data](https://openid.net/specs/openid-4-verifiable-presentations-1_0.html#name-transaction-data) parameter of the OID4VP specification.
138
- The data is shown to the user during the Presentation flow and the user signs it with a Key Binding JWT (KB-JWT). The KB-JWT is returned as part of the [Presentation](https://dev.proof.com/docs/sd-jwt-vc-format).
139
-
140
- The following _Transaction Templates_ are available:
141
-
142
- **urn:proof:params:vc:transaction-data:wire-instructions:v1**
143
-
144
- ```javascript
145
- import {
146
- getAuthorizationRequestURL,
147
- transactionData,
148
- } from "@proof.com/proof-vc-common";
149
-
150
- const data = transactionData.wireInstructions({
151
- recipient: {
152
- institution_name: "Crestline Financial",
153
- individual_name: "Acme Corp LLC",
154
- routing_number: "055000123",
155
- account_number: "7293",
156
- },
157
- source: {
158
- institution_name: "Sterling & Union",
159
- individual_name: "Sterling & Union",
160
- account_number: "4821",
161
- routing_number: "091000456",
162
- },
163
- amount: 5000,
164
- currency: "USD",
165
- memo: "Invoice #2024-089",
166
- });
167
- const redirect = await getAuthorizationRequestURL({
168
- nonce: "3e8e4918-e9fb-453a-a538-81152be15c1b",
169
- scope: "urn:proof:params:scope:verifiable-credentials:basic",
170
- state: "6A2B4CD830",
171
- loginHint: "frodo.baggins@theshire",
172
- transactionData: data,
173
- });
174
- ```
175
-
176
- ---
177
-
178
- **urn:proof:params:vc:transaction-data:payment-itemized:v1**
179
-
180
- ```javascript
181
- import {
182
- getAuthorizationRequestURL,
183
- transactionData,
184
- } from "@proof.com/proof-vc-common";
185
-
186
- const data = transactionData.paymentItemized({
187
- title: "Drive Shaft",
188
- description: "The Roadhouse (18+), May 6 2026",
189
- currency: "USD",
190
- items: [
191
- { quantity: 2, unit_cost: 40.0, label: "General Admission" },
192
- { quantity: 2, unit_cost: 11.4, label: "Fees" },
193
- ],
194
- });
195
- const redirect = await getAuthorizationRequestURL({
196
- nonce: "3e8e4918-e9fb-453a-a538-81152be15c1b",
197
- scope: "urn:proof:params:scope:verifiable-credentials:basic",
198
- state: "6A2B4CD830",
199
- loginHint: "frodo.baggins@theshire",
200
- transactionData: data,
201
- });
202
- ```
203
-
204
- ---
205
-
206
- **urn:proof:params:vc:transaction-data:payment-mandate:v1**
207
-
208
- ```javascript
209
- import {
210
- getAuthorizationRequestURL,
211
- transactionData,
212
- } from "@proof.com/proof-vc-common";
213
-
214
- const data = transactionData.paymentMandate({
215
- payment_instrument: {
216
- type: "wallet",
217
- id: "did:example:visa-token-7829",
218
- description: "Visa ••••7829",
219
- },
220
- payee: {
221
- id: "did:example:summitco",
222
- name: "Summit Co",
223
- website: "summitco.com",
224
- },
225
- prompt_summary:
226
- "Find me a 4-season backpacking tent from Summit Co under $500",
227
- amount: 500,
228
- currency: "USD",
229
- });
230
- const redirect = await getAuthorizationRequestURL({
231
- nonce: "3e8e4918-e9fb-453a-a538-81152be15c1b",
232
- scope: "urn:proof:params:scope:verifiable-credentials:basic",
233
- state: "6A2B4CD830",
234
- loginHint: "frodo.baggins@theshire",
235
- transactionData: data,
236
- });
237
- ```
238
-
239
- ### Verify
240
-
241
- Decode and verify a Verifiable Presentation's `vp_token` server-side:
242
-
243
- ```javascript
244
- import { init, verifyVPToken } from "@proof.com/proof-vc-common";
245
-
246
- init({ trustRoot: "production" });
247
-
248
- const vpToken = "eyJwcm9vZl9pZ...";
249
- const presentation = await verifyVPToken({
250
- encodedVPToken: vpToken,
251
- nonce: "3e8e4918-e9fb-453a-a538-81152be15c1b",
252
- });
253
- const verifiableCredential = presentation["proof_id_default"][0];
254
-
255
- if (verifiableCredential.isOver18) {
256
- purchaseItem();
257
- } else {
258
- userNotOver18();
259
- }
260
- ```
261
-
262
- Verify a single SD-JWT-VC:
263
-
264
- ```javascript
265
- import { init, verify } from "@proof.com/proof-vc-common";
266
-
267
- init({ trustRoot: "production" });
268
-
269
- const encodedSDJWT = "eyJraWQiOiI3...";
270
- const verifiableCredential = await verify({
271
- encodedSDJWT,
272
- nonce: "3e8e4918-e9fb-453a-a538-81152be15c1b",
273
- });
274
-
275
- if (verifiableCredential.isOver18) {
276
- purchaseItem();
277
- } else {
278
- userNotOver18();
279
- }
280
- ```
281
-
282
- ## Certificate Authority
283
-
284
- Proof's Verifiable Credentials are issued by our [Certificate Authority](https://www.proof.com/legal/certificate-policy)
285
- following the CA/B Forum Baseline Requirements for the Issuance and Management of Publicly-Trusted TLS Server Certificates published at https://www.cabforum.org.
286
-
287
- The Proof Root CA R1 Certificate is published at http://cert.proof.com/proof-root-ca-r1.crt and
288
- is also committed in this repository [proof-root-ca-r1.crt](src/certificates/trust_store/proof_root_ca_r1.ts).
289
-
290
- The sandbox Root CA R1 Development certificate is also committed in this repository [proof-root-ca-r1-development.crt](src/certificates/trust_store/proof_root_ca_r1_development.ts) and used when `trustRoot: "development"`.
291
-
292
- ## Documentation
293
-
294
- _Digital Credentials_ guides https://dev.proof.com/docs/digital-credentials-overview \
295
- _API Documentation_ https://dev.proof.com/reference/authorizeverifiablecredentialpresentation
296
-
297
- ## Contributing
298
-
299
- [Contribution guidelines for this project](CONTRIBUTING.md)
@@ -1,3 +0,0 @@
1
- import type { X509Certificate } from "node:crypto";
2
- export declare function verifyChain(chain: X509Certificate[], root: X509Certificate): void;
3
- //# sourceMappingURL=chain_validator.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"chain_validator.d.ts","sourceRoot":"","sources":["../../src/certificates/chain_validator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEnD,wBAAgB,WAAW,CACzB,KAAK,EAAE,eAAe,EAAE,EACxB,IAAI,EAAE,eAAe,GACpB,IAAI,CA+BN"}
@@ -1,29 +0,0 @@
1
- export function verifyChain(chain, root) {
2
- if (chain.length === 0) {
3
- throw "verifyChain: empty chain";
4
- }
5
- const full = [...chain, root];
6
- const now = new Date();
7
- for (let i = 0; i < full.length - 1; i++) {
8
- const cert = full[i];
9
- const issuer = full[i + 1];
10
- const validFrom = new Date(cert.validFromDate);
11
- const validTo = new Date(cert.validToDate);
12
- if (now < validFrom || now > validTo) {
13
- throw `Certificate at index ${i} is expired or not yet valid`;
14
- }
15
- if (!cert.checkIssued(issuer)) {
16
- throw `Certificate at index ${i} not issued by next in chain`;
17
- }
18
- if (!cert.verify(issuer.publicKey)) {
19
- throw `Certificate at index ${i} has invalid signature`;
20
- }
21
- }
22
- if (now > new Date(root.validToDate)) {
23
- throw "Root certificate expired";
24
- }
25
- if (!root.verify(root.publicKey)) {
26
- throw "Root is not self-signed";
27
- }
28
- }
29
- //# sourceMappingURL=chain_validator.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"chain_validator.js","sourceRoot":"","sources":["../../src/certificates/chain_validator.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,WAAW,CACzB,KAAwB,EACxB,IAAqB;IAErB,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACvB,MAAM,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rustRoot(trustRoot: TrustRoot): X509Certificate;
4
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/certificates/trust_store/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAOhD,wBAAgB,YAAY,CAAC,SAAS,EAAE,SAAS,GAAG,eAAe,CAOlE"}
@@ -1,14 +0,0 @@
1
- import { X509Certificate } from "node:crypto";
2
- import { PROOF_ROOT_CA_R1_PEM } from "./proof_root_ca_r1.js";
3
- import { PROOF_ROOT_CA_R1_DEVELOPMENT_PEM } from "./proof_root_ca_r1_development.js";
4
- const PRODUCTION_ROOT = new X509Certificate(PROOF_ROOT_CA_R1_PEM);
5
- const DEVELOPMENT_ROOT = new X509Certificate(PROOF_ROOT_CA_R1_DEVELOPMENT_PEM);
6
- export function getTrustRoot(trustRoot) {
7
- switch (trustRoot) {
8
- case "production":
9
- return PRODUCTION_ROOT;
10
- case "development":
11
- return DEVELOPMENT_ROOT;
12
- }
13
- }
14
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/certificates/trust_store/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAE9C,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,EAAE,gCAAgC,EAAE,MAAM,mCAAmC,CAAC;AAErF,MAAM,eAAe,GAAG,IAAI,eAAe,CAAC,oBAAoB,CAAC,CAAC;AAClE,MAAM,gBAAgB,GAAG,IAAI,eAAe,CAAC,gCAAgC,CAAC,CAAC;AAE/E,MAAM,UAAU,YAAY,CAAC,SAAoB;IAC/C,QAAQ,SAAS,EAAE,CAAC;QAClB,KAAK,YAAY;YACf,OAAO,eAAe,CAAC;QACzB,KAAK,aAAa;YAChB,OAAO,gBAAgB,CAAC;IAC5B,CAAC;AACH,CAAC"}
@@ -1,2 +0,0 @@
1
- export declare const PROOF_ROOT_CA_R1_PEM = "-----BEGIN CERTIFICATE-----\nMIICaDCCAcmgAwIBAgIUZQN0R5EVDjRy5wVPCzhsV/fTC0swCgYIKoZIzj0EAwQw\nPDELMAkGA1UEBhMCVVMxEjAQBgNVBAoMCVByb29mLmNvbTEZMBcGA1UEAwwQUHJv\nb2YgUm9vdCBDQSBSMTAeFw0yNTA3MTYwMDAwMDBaFw00NTA3MTYwMDAwMDBaMDwx\nCzAJBgNVBAYTAlVTMRIwEAYDVQQKDAlQcm9vZi5jb20xGTAXBgNVBAMMEFByb29m\nIFJvb3QgQ0EgUjEwgZswEAYHKoZIzj0CAQYFK4EEACMDgYYABAC58cq5SFUdb3sU\npD/26o6VwWPPbBhWembs+Ynyx7lJzynoI/JLbdj/m4aLf8OFPAqK6M5xGV/NKlj1\nVG0MeyQ/JgAnzkX8FZMJlILNi6z8jm7Dw6wBOnt2fOeSx4CdYWfVvJzSYTtcqzqD\nTDqDUHyW+NpA4ulSPE1md/hOq0jzZz4+ZaNmMGQwDgYDVR0PAQH/BAQDAgEGMBIG\nA1UdEwEB/wQIMAYBAf8CAQIwHQYDVR0OBBYEFBwMLyXY2aMAAOHzNtrbIkfi/b7K\nMB8GA1UdIwQYMBaAFBwMLyXY2aMAAOHzNtrbIkfi/b7KMAoGCCqGSM49BAMEA4GM\nADCBiAJCALbYDcwIET9C43d4+CXHGSEiurEFLQOn1wpukSyCiIQC/HRyJ8yW6ok5\nS6yDXqiS07q1yimBzoJXIHTO9w4iYruUAkIAx77dgeh8XXmR785O7hTtWpJj2IDt\nP/CSJ1VERYWD12mh2xvxNbI1HxansQuqLHN2b8ijqnZmK2vdYa2U7mSkfJY=\n-----END CERTIFICATE-----";
2
- //# sourceMappingURL=proof_root_ca_r1.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"proof_root_ca_r1.d.ts","sourceRoot":"","sources":["../../../src/certificates/trust_store/proof_root_ca_r1.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,oBAAoB,i5BAcP,CAAC"}
@@ -1,16 +0,0 @@
1
- export const PROOF_ROOT_CA_R1_PEM = `-----BEGIN CERTIFICATE-----
2
- MIICaDCCAcmgAwIBAgIUZQN0R5EVDjRy5wVPCzhsV/fTC0swCgYIKoZIzj0EAwQw
3
- PDELMAkGA1UEBhMCVVMxEjAQBgNVBAoMCVByb29mLmNvbTEZMBcGA1UEAwwQUHJv
4
- b2YgUm9vdCBDQSBSMTAeFw0yNTA3MTYwMDAwMDBaFw00NTA3MTYwMDAwMDBaMDwx
5
- CzAJBgNVBAYTAlVTMRIwEAYDVQQKDAlQcm9vZi5jb20xGTAXBgNVBAMMEFByb29m
6
- IFJvb3QgQ0EgUjEwgZswEAYHKoZIzj0CAQYFK4EEACMDgYYABAC58cq5SFUdb3sU
7
- pD/26o6VwWPPbBhWembs+Ynyx7lJzynoI/JLbdj/m4aLf8OFPAqK6M5xGV/NKlj1
8
- VG0MeyQ/JgAnzkX8FZMJlILNi6z8jm7Dw6wBOnt2fOeSx4CdYWfVvJzSYTtcqzqD
9
- TDqDUHyW+NpA4ulSPE1md/hOq0jzZz4+ZaNmMGQwDgYDVR0PAQH/BAQDAgEGMBIG
10
- A1UdEwEB/wQIMAYBAf8CAQIwHQYDVR0OBBYEFBwMLyXY2aMAAOHzNtrbIkfi/b7K
11
- MB8GA1UdIwQYMBaAFBwMLyXY2aMAAOHzNtrbIkfi/b7KMAoGCCqGSM49BAMEA4GM
12
- ADCBiAJCALbYDcwIET9C43d4+CXHGSEiurEFLQOn1wpukSyCiIQC/HRyJ8yW6ok5
13
- S6yDXqiS07q1yimBzoJXIHTO9w4iYruUAkIAx77dgeh8XXmR785O7hTtWpJj2IDt
14
- P/CSJ1VERYWD12mh2xvxNbI1HxansQuqLHN2b8ijqnZmK2vdYa2U7mSkfJY=
15
- -----END CERTIFICATE-----`;
16
- //# sourceMappingURL=proof_root_ca_r1.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"proof_root_ca_r1.js","sourceRoot":"","sources":["../../../src/certificates/trust_store/proof_root_ca_r1.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,oBAAoB,GAAG;;;;;;;;;;;;;;0BAcV,CAAC"}
@@ -1,2 +0,0 @@
1
- export declare const PROOF_ROOT_CA_R1_DEVELOPMENT_PEM = "-----BEGIN CERTIFICATE-----\nMIICgDCCAeGgAwIBAgIUY25Mz7nqI55wZDd09Jv3qPORyIEwCgYIKoZIzj0EAwQw\nSDELMAkGA1UEBhMCVVMxEjAQBgNVBAoMCVByb29mLmNvbTElMCMGA1UEAwwcUHJv\nb2YgUm9vdCBDQSBSMSBEZXZlbG9wbWVudDAeFw0yNTA2MjYwMDAwMDBaFw00NTA2\nMjYwMDAwMDBaMEgxCzAJBgNVBAYTAlVTMRIwEAYDVQQKDAlQcm9vZi5jb20xJTAj\nBgNVBAMMHFByb29mIFJvb3QgQ0EgUjEgRGV2ZWxvcG1lbnQwgZswEAYHKoZIzj0C\nAQYFK4EEACMDgYYABAAWdWHGBOxrvDXqu3sgYBBGNnH31kB1DgHaKE4YMxu2YE3p\nqHjLZQxBUlXAWoapthkujZEEbqj3wH1nfPOmafl6rgDdtB6vjEeJRbwnIq26gy27\nrxLxtgCiJgS8/tcQARlENogzXHR6pxNxJp8e26qIgx2L/mokmiwgS4YRdJTXEzel\n0aNmMGQwDgYDVR0PAQH/BAQDAgEGMBIGA1UdEwEB/wQIMAYBAf8CAQIwHQYDVR0O\nBBYEFB8o85b43sVVc3m6PGyD67JEVvToMB8GA1UdIwQYMBaAFB8o85b43sVVc3m6\nPGyD67JEVvToMAoGCCqGSM49BAMEA4GMADCBiAJCAS0QLpYdjzShTuOPqex0R9Dx\nGrMeHkvtDmG2LsIZnly5yyUMDyV3HcW/Ex190nnCwLAV4I55EytZxBfi0B4a/M6n\nAkIBOTl1ataSokAQZ40lFxZeEIFvUWOOKW7ORuS2zb/hIrXLVVctw+Lp/CuzBHhq\nWcJQb7JVud5os3ZzD6zNDgMevdo=\n-----END CERTIFICATE-----";
2
- //# sourceMappingURL=proof_root_ca_r1_development.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"proof_root_ca_r1_development.d.ts","sourceRoot":"","sources":["../../../src/certificates/trust_store/proof_root_ca_r1_development.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gCAAgC,m7BAenB,CAAC"}
@@ -1,17 +0,0 @@
1
- export const PROOF_ROOT_CA_R1_DEVELOPMENT_PEM = `-----BEGIN CERTIFICATE-----
2
- MIICgDCCAeGgAwIBAgIUY25Mz7nqI55wZDd09Jv3qPORyIEwCgYIKoZIzj0EAwQw
3
- SDELMAkGA1UEBhMCVVMxEjAQBgNVBAoMCVByb29mLmNvbTElMCMGA1UEAwwcUHJv
4
- b2YgUm9vdCBDQSBSMSBEZXZlbG9wbWVudDAeFw0yNTA2MjYwMDAwMDBaFw00NTA2
5
- MjYwMDAwMDBaMEgxCzAJBgNVBAYTAlVTMRIwEAYDVQQKDAlQcm9vZi5jb20xJTAj
6
- BgNVBAMMHFByb29mIFJvb3QgQ0EgUjEgRGV2ZWxvcG1lbnQwgZswEAYHKoZIzj0C
7
- AQYFK4EEACMDgYYABAAWdWHGBOxrvDXqu3sgYBBGNnH31kB1DgHaKE4YMxu2YE3p
8
- qHjLZQxBUlXAWoapthkujZEEbqj3wH1nfPOmafl6rgDdtB6vjEeJRbwnIq26gy27
9
- rxLxtgCiJgS8/tcQARlENogzXHR6pxNxJp8e26qIgx2L/mokmiwgS4YRdJTXEzel
10
- 0aNmMGQwDgYDVR0PAQH/BAQDAgEGMBIGA1UdEwEB/wQIMAYBAf8CAQIwHQYDVR0O
11
- BBYEFB8o85b43sVVc3m6PGyD67JEVvToMB8GA1UdIwQYMBaAFB8o85b43sVVc3m6
12
- PGyD67JEVvToMAoGCCqGSM49BAMEA4GMADCBiAJCAS0QLpYdjzShTuOPqex0R9Dx
13
- GrMeHkvtDmG2LsIZnly5yyUMDyV3HcW/Ex190nnCwLAV4I55EytZxBfi0B4a/M6n
14
- AkIBOTl1ataSokAQZ40lFxZeEIFvUWOOKW7ORuS2zb/hIrXLVVctw+Lp/CuzBHhq
15
- WcJQb7JVud5os3ZzD6zNDgMevdo=
16
- -----END CERTIFICATE-----`;
17
- //# sourceMappingURL=proof_root_ca_r1_development.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"proof_root_ca_r1_development.js","sourceRoot":"","sources":["../../../src/certificates/trust_store/proof_root_ca_r1_development.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,gCAAgC,GAAG;;;;;;;;;;;;;;;0BAetB,CAAC"}
@@ -1,6 +0,0 @@
1
- export type * from "./types.ts";
2
- export type { TransactionData, WireInstructionsTransactionData, PaymentMandateTransactionData, PaymentItemizedTransactionData, SessionDataTransactionData, WireInstructionsPayload, PaymentMandatePayload, PaymentItemizedPayload, PaymentItemizedItem, SessionDataPayload, } from "./transaction_data.ts";
3
- export { TX_DATA_TYPE, transactionData } from "./transaction_data.ts";
4
- export type { BrowserInitParams, AuthorizationRequestParams, } from "./presentation/base_client.ts";
5
- export { init, getAuthorizationRequestURL } from "./vc_presentation.browser.ts";
6
- //# sourceMappingURL=index.browser.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.browser.d.ts","sourceRoot":"","sources":["../src/index.browser.ts"],"names":[],"mappings":"AAAA,mBAAmB,YAAY,CAAC;AAChC,YAAY,EACV,eAAe,EACf,+BAA+B,EAC/B,6BAA6B,EAC7B,8BAA8B,EAC9B,0BAA0B,EAC1B,uBAAuB,EACvB,qBAAqB,EACrB,sBAAsB,EACtB,mBAAmB,EACnB,kBAAkB,GACnB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAEtE,YAAY,EACV,iBAAiB,EACjB,0BAA0B,GAC3B,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EAAE,IAAI,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC"}
@@ -1,3 +0,0 @@
1
- export { TX_DATA_TYPE, transactionData } from "./transaction_data.js";
2
- export { init, getAuthorizationRequestURL } from "./vc_presentation.browser.js";
3
- //# sourceMappingURL=index.browser.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.browser.js","sourceRoot":"","sources":["../src/index.browser.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAOtE,OAAO,EAAE,IAAI,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC"}
@@ -1,8 +0,0 @@
1
- export type * from "./types.ts";
2
- export type { TransactionData, WireInstructionsTransactionData, PaymentMandateTransactionData, PaymentItemizedTransactionData, SessionDataTransactionData, WireInstructionsPayload, PaymentMandatePayload, PaymentItemizedPayload, PaymentItemizedItem, SessionDataPayload, } from "./transaction_data.ts";
3
- export { TX_DATA_TYPE, transactionData } from "./transaction_data.ts";
4
- export { ProofCredentialV1 } from "./proof_credentials.ts";
5
- export type { AuthorizationRequestParams } from "./presentation/base_client.ts";
6
- export type { NodeInitParams, VerifyParams, VerifyVPTokenParams, } from "./presentation/node_client.ts";
7
- export { init, getAuthorizationRequestURL, verify, verifyVPToken, } from "./vc_presentation.node.ts";
8
- //# sourceMappingURL=index.node.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.node.d.ts","sourceRoot":"","sources":["../src/index.node.ts"],"names":[],"mappings":"AAAA,mBAAmB,YAAY,CAAC;AAChC,YAAY,EACV,eAAe,EACf,+BAA+B,EAC/B,6BAA6B,EAC7B,8BAA8B,EAC9B,0BAA0B,EAC1B,uBAAuB,EACvB,qBAAqB,EACrB,sBAAsB,EACtB,mBAAmB,EACnB,kBAAkB,GACnB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAEtE,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAE3D,YAAY,EAAE,0BAA0B,EAAE,MAAM,+BAA+B,CAAC;AAChF,YAAY,EACV,cAAc,EACd,YAAY,EACZ,mBAAmB,GACpB,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EACL,IAAI,EACJ,0BAA0B,EAC1B,MAAM,EACN,aAAa,GACd,MAAM,2BAA2B,CAAC"}
@@ -1,4 +0,0 @@
1
- export { TX_DATA_TYPE, transactionData } from "./transaction_data.js";
2
- export { ProofCredentialV1 } from "./proof_credentials.js";
3
- export { init, getAuthorizationRequestURL, verify, verifyVPToken, } from "./vc_presentation.node.js";
4
- //# sourceMappingURL=index.node.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.node.js","sourceRoot":"","sources":["../src/index.node.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAEtE,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAS3D,OAAO,EACL,IAAI,EACJ,0BAA0B,EAC1B,MAAM,EACN,aAAa,GACd,MAAM,2BAA2B,CAAC"}
@@ -1,36 +0,0 @@
1
- import type { Environment, ResponseMode, ResponseType, Scope } from "../types.ts";
2
- import { type TransactionData } from "../transaction_data.ts";
3
- export type BrowserInitParams = {
4
- environment: Environment;
5
- clientId: string;
6
- callbackUri: string;
7
- responseMode?: ResponseMode;
8
- };
9
- export type AuthorizationRequestParams = {
10
- scope: Scope;
11
- nonce: string;
12
- state?: string;
13
- loginHint?: string;
14
- transactionData?: TransactionData | string;
15
- };
16
- export declare class VCPresentationClient {
17
- protected readonly environment?: Environment;
18
- protected readonly clientId?: string;
19
- protected readonly responseMode: ResponseMode;
20
- protected readonly responseType: ResponseType;
21
- protected readonly callbackUri?: string;
22
- protected readonly oid4vpUri = "/verifiable-credentials/v1/presentation";
23
- constructor(params: {
24
- environment?: Environment;
25
- clientId?: string;
26
- responseMode?: ResponseMode;
27
- callbackUri?: string;
28
- });
29
- getAuthorizationRequestURL(params: AuthorizationRequestParams): Promise<string>;
30
- protected requireRequestConfig(): void;
31
- protected baseURL(): string;
32
- protected buildAuthorizeURL(params: AuthorizationRequestParams): string;
33
- protected buildParameters({ scope, nonce, state, loginHint, transactionData, }: AuthorizationRequestParams): URLSearchParams;
34
- protected defaultAuthorizationRequestParameters(): Record<string, string>;
35
- }
36
- //# sourceMappingURL=base_client.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"base_client.d.ts","sourceRoot":"","sources":["../../src/presentation/base_client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,WAAW,EACX,YAAY,EACZ,YAAY,EACZ,KAAK,EACN,MAAM,aAAa,CAAC;AACrB,OAAO,EAEL,KAAK,eAAe,EACrB,MAAM,wBAAwB,CAAC;AAEhC,MAAM,MAAM,iBAAiB,GAAG;IAC9B,WAAW,EAAE,WAAW,CAAC;IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,YAAY,CAAC;CAC7B,CAAC;AAEF,MAAM,MAAM,0BAA0B,GAAG;IACvC,KAAK,EAAE,KAAK,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,eAAe,CAAC,EAAE,eAAe,GAAG,MAAM,CAAC;CAC5C,CAAC;AAEF,qBAAa,oBAAoB;IAC/B,SAAS,CAAC,QAAQ,CAAC,WAAW,CAAC,EAAE,WAAW,CAAC;IAC7C,SAAS,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IACrC,SAAS,CAAC,QAAQ,CAAC,YAAY,EAAE,YAAY,CAAc;IAC3D,SAAS,CAAC,QAAQ,CAAC,YAAY,EAAE,YAAY,CAAc;IAC3D,SAAS,CAAC,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IACxC,SAAS,CAAC,QAAQ,CAAC,SAAS,6CAA6C;gBAE7D,MAAM,EAAE;QAClB,WAAW,CAAC,EAAE,WAAW,CAAC;QAC1B,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,YAAY,CAAC,EAAE,YAAY,CAAC;QAC5B,WAAW,CAAC,EAAE,MAAM,CAAC;KACtB;IAeY,0BAA0B,CACrC,MAAM,EAAE,0BAA0B,GACjC,OAAO,CAAC,MAAM,CAAC;IAKlB,SAAS,CAAC,oBAAoB,IAAI,IAAI;IAYtC,SAAS,CAAC,OAAO,IAAI,MAAM;IAiB3B,SAAS,CAAC,iBAAiB,CAAC,MAAM,EAAE,0BAA0B,GAAG,MAAM;IAMvE,SAAS,CAAC,eAAe,CAAC,EACxB,KAAK,EACL,KAAK,EACL,KAAK,EACL,SAAS,EACT,eAAe,GAChB,EAAE,0BAA0B,GAAG,eAAe;IAiB/C,SAAS,CAAC,qCAAqC,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;CAa1E"}
@@ -1,88 +0,0 @@
1
- import { encodeTransactionData, } from "../transaction_data.js";
2
- export class VCPresentationClient {
3
- environment;
4
- clientId;
5
- responseMode = "fragment";
6
- responseType = "vp_token";
7
- callbackUri;
8
- oid4vpUri = "/verifiable-credentials/v1/presentation";
9
- constructor(params) {
10
- if (params.environment !== undefined) {
11
- this.environment = params.environment;
12
- }
13
- if (params.clientId !== undefined) {
14
- this.clientId = params.clientId;
15
- }
16
- if (params.callbackUri !== undefined) {
17
- this.callbackUri = params.callbackUri;
18
- }
19
- if (params.responseMode !== undefined) {
20
- this.responseMode = params.responseMode;
21
- }
22
- }
23
- async getAuthorizationRequestURL(params) {
24
- this.requireRequestConfig();
25
- return this.buildAuthorizeURL(params);
26
- }
27
- requireRequestConfig() {
28
- if (this.environment === undefined) {
29
- throw "getAuthorizationRequestURL requires `environment` in init()";
30
- }
31
- if (this.clientId === undefined) {
32
- throw "getAuthorizationRequestURL requires `clientId` in init()";
33
- }
34
- if (this.callbackUri === undefined) {
35
- throw "getAuthorizationRequestURL requires `callbackUri` in init()";
36
- }
37
- }
38
- baseURL() {
39
- switch (this.environment) {
40
- case "localhost":
41
- return "https://api.local.dev-notarize.com";
42
- case "next":
43
- return "https://api.next.proof.com";
44
- case "staging":
45
- return "https://api.staging.proof.com";
46
- case "sandbox":
47
- return "https://api.fairfax.proof.com";
48
- case "production":
49
- return "https://api.proof.com";
50
- default:
51
- throw "getAuthorizationRequestURL requires `environment` in init()";
52
- }
53
- }
54
- buildAuthorizeURL(params) {
55
- const url = new URL(`${this.oid4vpUri}/authorize`, this.baseURL());
56
- url.search = this.buildParameters(params).toString();
57
- return url.toString();
58
- }
59
- buildParameters({ scope, nonce, state, loginHint, transactionData, }) {
60
- const encodedTransactionData = typeof transactionData === "object"
61
- ? encodeTransactionData(transactionData)
62
- : transactionData;
63
- return new URLSearchParams({
64
- ...this.defaultAuthorizationRequestParameters(),
65
- scope,
66
- nonce,
67
- ...(state !== undefined && { state }),
68
- ...(loginHint !== undefined && { login_hint: loginHint }),
69
- ...(encodedTransactionData !== undefined && {
70
- transaction_data: encodedTransactionData,
71
- }),
72
- });
73
- }
74
- defaultAuthorizationRequestParameters() {
75
- return {
76
- client_id: this.clientId,
77
- response_mode: this.responseMode,
78
- response_type: this.responseType,
79
- ...(this.responseMode === "fragment" && {
80
- redirect_uri: this.callbackUri,
81
- }),
82
- ...(this.responseMode === "direct_post" && {
83
- response_uri: this.callbackUri,
84
- }),
85
- };
86
- }
87
- }
88
- //# sourceMappingURL=base_client.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"base_client.js","sourceRoot":"","sources":["../../src/presentation/base_client.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,qBAAqB,GAEtB,MAAM,wBAAwB,CAAC;AAiBhC,MAAM,OAAO,oBAAoB;IACZ,WAAW,CAAe;IAC1B,QAAQ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EAAE,IAAI,CAAC,WAAY;aAChC,CAAC;YACF,GAAG,CAAC,IAAI,CAAC,YAAY,KAAK,aAAa,IAAI;gBACzC,YAAY,EAAE,IAAI,CAAC,WAAY;aAChC,CAAC;SACH,CAAC;IACJ,CAAC;CACF"}
@@ -1,34 +0,0 @@
1
- import type { Environment, ProofCredential, ResponseMode, TrustRoot, VPToken } from "../types.ts";
2
- import { VCPresentationClient, type AuthorizationRequestParams } from "./base_client.ts";
3
- export type NodeInitParams = {
4
- trustRoot?: TrustRoot;
5
- environment?: Environment;
6
- clientId?: string;
7
- clientSecret?: string;
8
- callbackUri?: string;
9
- responseMode?: ResponseMode;
10
- usePushedAuthorizationRequest?: boolean;
11
- };
12
- export type VerifyParams = {
13
- encodedSDJWT: string;
14
- nonce?: string;
15
- aud?: string;
16
- };
17
- export type VerifyVPTokenParams = {
18
- encodedVPToken: string;
19
- nonce?: string;
20
- aud?: string;
21
- };
22
- export declare class NodeVCPresentationClient extends VCPresentationClient {
23
- protected readonly clientSecret?: string;
24
- protected readonly usePushedAuthorizationRequest: boolean;
25
- protected readonly trustRoot?: TrustRoot;
26
- constructor(params: NodeInitParams);
27
- getAuthorizationRequestURL(params: AuthorizationRequestParams): Promise<string>;
28
- protected defaultAuthorizationRequestParameters(): Record<string, string>;
29
- protected pushAuthorizationRequest(params: AuthorizationRequestParams): Promise<string>;
30
- protected requireTrustRoot(): TrustRoot;
31
- verify({ encodedSDJWT, nonce, aud, }: VerifyParams): Promise<ProofCredential>;
32
- verifyVPToken({ encodedVPToken, nonce, aud, }: VerifyVPTokenParams): Promise<VPToken>;
33
- }
34
- //# sourceMappingURL=node_client.d.ts.map