@lit-protocol/vincent-app-sdk 0.0.4-ea

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 (169) hide show
  1. package/CHANGELOG.md +207 -0
  2. package/CONTRIBUTING.md +114 -0
  3. package/README.md +216 -0
  4. package/dist/package.json +86 -0
  5. package/dist/src/abilityClient/constants.d.ts +2 -0
  6. package/dist/src/abilityClient/constants.d.ts.map +1 -0
  7. package/dist/src/abilityClient/constants.js +5 -0
  8. package/dist/src/abilityClient/constants.js.map +1 -0
  9. package/dist/src/abilityClient/execute/generateVincentAbilitySessionSigs.d.ts +8 -0
  10. package/dist/src/abilityClient/execute/generateVincentAbilitySessionSigs.d.ts.map +1 -0
  11. package/dist/src/abilityClient/execute/generateVincentAbilitySessionSigs.js +33 -0
  12. package/dist/src/abilityClient/execute/generateVincentAbilitySessionSigs.js.map +1 -0
  13. package/dist/src/abilityClient/execute/resultCreators.d.ts +71 -0
  14. package/dist/src/abilityClient/execute/resultCreators.d.ts.map +1 -0
  15. package/dist/src/abilityClient/execute/resultCreators.js +57 -0
  16. package/dist/src/abilityClient/execute/resultCreators.js.map +1 -0
  17. package/dist/src/abilityClient/execute/types.d.ts +38 -0
  18. package/dist/src/abilityClient/execute/types.d.ts.map +1 -0
  19. package/dist/src/abilityClient/execute/types.js +4 -0
  20. package/dist/src/abilityClient/execute/types.js.map +1 -0
  21. package/dist/src/abilityClient/index.d.ts +19 -0
  22. package/dist/src/abilityClient/index.d.ts.map +1 -0
  23. package/dist/src/abilityClient/index.js +26 -0
  24. package/dist/src/abilityClient/index.js.map +1 -0
  25. package/dist/src/abilityClient/precheck/resultCreators.d.ts +71 -0
  26. package/dist/src/abilityClient/precheck/resultCreators.d.ts.map +1 -0
  27. package/dist/src/abilityClient/precheck/resultCreators.js +57 -0
  28. package/dist/src/abilityClient/precheck/resultCreators.js.map +1 -0
  29. package/dist/src/abilityClient/precheck/runPolicyPrechecks.d.ts +14 -0
  30. package/dist/src/abilityClient/precheck/runPolicyPrechecks.d.ts.map +1 -0
  31. package/dist/src/abilityClient/precheck/runPolicyPrechecks.js +98 -0
  32. package/dist/src/abilityClient/precheck/runPolicyPrechecks.js.map +1 -0
  33. package/dist/src/abilityClient/precheck/types.d.ts +82 -0
  34. package/dist/src/abilityClient/precheck/types.d.ts.map +1 -0
  35. package/dist/src/abilityClient/precheck/types.js +4 -0
  36. package/dist/src/abilityClient/precheck/types.js.map +1 -0
  37. package/dist/src/abilityClient/typeGuards.d.ts +28 -0
  38. package/dist/src/abilityClient/typeGuards.d.ts.map +1 -0
  39. package/dist/src/abilityClient/typeGuards.js +67 -0
  40. package/dist/src/abilityClient/typeGuards.js.map +1 -0
  41. package/dist/src/abilityClient/types.d.ts +50 -0
  42. package/dist/src/abilityClient/types.d.ts.map +1 -0
  43. package/dist/src/abilityClient/types.js +4 -0
  44. package/dist/src/abilityClient/types.js.map +1 -0
  45. package/dist/src/abilityClient/vincentAbilityClient.d.ts +76 -0
  46. package/dist/src/abilityClient/vincentAbilityClient.d.ts.map +1 -0
  47. package/dist/src/abilityClient/vincentAbilityClient.js +285 -0
  48. package/dist/src/abilityClient/vincentAbilityClient.js.map +1 -0
  49. package/dist/src/expressMiddleware/express.d.ts +63 -0
  50. package/dist/src/expressMiddleware/express.d.ts.map +1 -0
  51. package/dist/src/expressMiddleware/express.js +125 -0
  52. package/dist/src/expressMiddleware/express.js.map +1 -0
  53. package/dist/src/expressMiddleware/index.d.ts +14 -0
  54. package/dist/src/expressMiddleware/index.d.ts.map +1 -0
  55. package/dist/src/expressMiddleware/index.js +17 -0
  56. package/dist/src/expressMiddleware/index.js.map +1 -0
  57. package/dist/src/expressMiddleware/types.d.ts +31 -0
  58. package/dist/src/expressMiddleware/types.d.ts.map +1 -0
  59. package/dist/src/expressMiddleware/types.js +3 -0
  60. package/dist/src/expressMiddleware/types.js.map +1 -0
  61. package/dist/src/index.d.ts +2 -0
  62. package/dist/src/index.d.ts.map +1 -0
  63. package/dist/src/index.js +3 -0
  64. package/dist/src/index.js.map +1 -0
  65. package/dist/src/internal/LitNodeClient/LitNodeClientInstance.d.ts +14 -0
  66. package/dist/src/internal/LitNodeClient/LitNodeClientInstance.d.ts.map +1 -0
  67. package/dist/src/internal/LitNodeClient/LitNodeClientInstance.js +67 -0
  68. package/dist/src/internal/LitNodeClient/LitNodeClientInstance.js.map +1 -0
  69. package/dist/src/internal/LitNodeClient/getLitNodeClient.d.ts +7 -0
  70. package/dist/src/internal/LitNodeClient/getLitNodeClient.d.ts.map +1 -0
  71. package/dist/src/internal/LitNodeClient/getLitNodeClient.js +25 -0
  72. package/dist/src/internal/LitNodeClient/getLitNodeClient.js.map +1 -0
  73. package/dist/src/jwt/accessors.d.ts +8 -0
  74. package/dist/src/jwt/accessors.d.ts.map +1 -0
  75. package/dist/src/jwt/accessors.js +15 -0
  76. package/dist/src/jwt/accessors.js.map +1 -0
  77. package/dist/src/jwt/core/create.d.ts +24 -0
  78. package/dist/src/jwt/core/create.d.ts.map +1 -0
  79. package/dist/src/jwt/core/create.js +95 -0
  80. package/dist/src/jwt/core/create.js.map +1 -0
  81. package/dist/src/jwt/core/isExpired.d.ts +9 -0
  82. package/dist/src/jwt/core/isExpired.d.ts.map +1 -0
  83. package/dist/src/jwt/core/isExpired.js +20 -0
  84. package/dist/src/jwt/core/isExpired.js.map +1 -0
  85. package/dist/src/jwt/core/utils/base64.d.ts +14 -0
  86. package/dist/src/jwt/core/utils/base64.d.ts.map +1 -0
  87. package/dist/src/jwt/core/utils/base64.js +54 -0
  88. package/dist/src/jwt/core/utils/base64.js.map +1 -0
  89. package/dist/src/jwt/core/utils/definedObject.d.ts +2 -0
  90. package/dist/src/jwt/core/utils/definedObject.d.ts.map +1 -0
  91. package/dist/src/jwt/core/utils/definedObject.js +7 -0
  92. package/dist/src/jwt/core/utils/definedObject.js.map +1 -0
  93. package/dist/src/jwt/core/utils/index.d.ts +5 -0
  94. package/dist/src/jwt/core/utils/index.d.ts.map +1 -0
  95. package/dist/src/jwt/core/utils/index.js +12 -0
  96. package/dist/src/jwt/core/utils/index.js.map +1 -0
  97. package/dist/src/jwt/core/utils/processJWTSignature.d.ts +8 -0
  98. package/dist/src/jwt/core/utils/processJWTSignature.d.ts.map +1 -0
  99. package/dist/src/jwt/core/utils/processJWTSignature.js +14 -0
  100. package/dist/src/jwt/core/utils/processJWTSignature.js.map +1 -0
  101. package/dist/src/jwt/core/utils/splitJWT.d.ts +11 -0
  102. package/dist/src/jwt/core/utils/splitJWT.d.ts.map +1 -0
  103. package/dist/src/jwt/core/utils/splitJWT.js +21 -0
  104. package/dist/src/jwt/core/utils/splitJWT.js.map +1 -0
  105. package/dist/src/jwt/core/utils/validateJWTTime.d.ts +12 -0
  106. package/dist/src/jwt/core/utils/validateJWTTime.d.ts.map +1 -0
  107. package/dist/src/jwt/core/utils/validateJWTTime.js +24 -0
  108. package/dist/src/jwt/core/utils/validateJWTTime.js.map +1 -0
  109. package/dist/src/jwt/core/validate.d.ts +29 -0
  110. package/dist/src/jwt/core/validate.d.ts.map +1 -0
  111. package/dist/src/jwt/core/validate.js +143 -0
  112. package/dist/src/jwt/core/validate.js.map +1 -0
  113. package/dist/src/jwt/index.d.ts +21 -0
  114. package/dist/src/jwt/index.d.ts.map +1 -0
  115. package/dist/src/jwt/index.js +32 -0
  116. package/dist/src/jwt/index.js.map +1 -0
  117. package/dist/src/jwt/typeGuards.d.ts +14 -0
  118. package/dist/src/jwt/typeGuards.d.ts.map +1 -0
  119. package/dist/src/jwt/typeGuards.js +32 -0
  120. package/dist/src/jwt/typeGuards.js.map +1 -0
  121. package/dist/src/jwt/types.d.ts +82 -0
  122. package/dist/src/jwt/types.d.ts.map +1 -0
  123. package/dist/src/jwt/types.js +3 -0
  124. package/dist/src/jwt/types.js.map +1 -0
  125. package/dist/src/type-inference-verification/ability-client-inference.d.ts +3 -0
  126. package/dist/src/type-inference-verification/ability-client-inference.d.ts.map +1 -0
  127. package/dist/src/type-inference-verification/ability-client-inference.js +220 -0
  128. package/dist/src/type-inference-verification/ability-client-inference.js.map +1 -0
  129. package/dist/src/utils/delegation.d.ts +7 -0
  130. package/dist/src/utils/delegation.d.ts.map +1 -0
  131. package/dist/src/utils/delegation.js +18 -0
  132. package/dist/src/utils/delegation.js.map +1 -0
  133. package/dist/src/utils/index.d.ts +3 -0
  134. package/dist/src/utils/index.d.ts.map +1 -0
  135. package/dist/src/utils/index.js +6 -0
  136. package/dist/src/utils/index.js.map +1 -0
  137. package/dist/src/utils/typedocRoot.d.ts +7 -0
  138. package/dist/src/utils/typedocRoot.d.ts.map +1 -0
  139. package/dist/src/utils/typedocRoot.js +13 -0
  140. package/dist/src/utils/typedocRoot.js.map +1 -0
  141. package/dist/src/utils/types.d.ts +15 -0
  142. package/dist/src/utils/types.d.ts.map +1 -0
  143. package/dist/src/utils/types.js +3 -0
  144. package/dist/src/utils/types.js.map +1 -0
  145. package/dist/src/webAuthClient/app.d.ts +7 -0
  146. package/dist/src/webAuthClient/app.d.ts.map +1 -0
  147. package/dist/src/webAuthClient/app.js +39 -0
  148. package/dist/src/webAuthClient/app.js.map +1 -0
  149. package/dist/src/webAuthClient/constants.d.ts +3 -0
  150. package/dist/src/webAuthClient/constants.d.ts.map +1 -0
  151. package/dist/src/webAuthClient/constants.js +6 -0
  152. package/dist/src/webAuthClient/constants.js.map +1 -0
  153. package/dist/src/webAuthClient/index.d.ts +13 -0
  154. package/dist/src/webAuthClient/index.d.ts.map +1 -0
  155. package/dist/src/webAuthClient/index.js +15 -0
  156. package/dist/src/webAuthClient/index.js.map +1 -0
  157. package/dist/src/webAuthClient/internal/index.d.ts +3 -0
  158. package/dist/src/webAuthClient/internal/index.d.ts.map +1 -0
  159. package/dist/src/webAuthClient/internal/index.js +7 -0
  160. package/dist/src/webAuthClient/internal/index.js.map +1 -0
  161. package/dist/src/webAuthClient/internal/uriHelpers.d.ts +15 -0
  162. package/dist/src/webAuthClient/internal/uriHelpers.d.ts.map +1 -0
  163. package/dist/src/webAuthClient/internal/uriHelpers.js +38 -0
  164. package/dist/src/webAuthClient/internal/uriHelpers.js.map +1 -0
  165. package/dist/src/webAuthClient/types.d.ts +109 -0
  166. package/dist/src/webAuthClient/types.d.ts.map +1 -0
  167. package/dist/src/webAuthClient/types.js +3 -0
  168. package/dist/src/webAuthClient/types.js.map +1 -0
  169. package/package.json +82 -0
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.removeSearchParam = exports.uriContainsVincentJWT = exports.decodeVincentJWTFromUri = void 0;
4
+ exports.composeConnectUrl = composeConnectUrl;
5
+ const validate_1 = require("../../jwt/core/validate");
6
+ const constants_1 = require("../constants");
7
+ const decodeVincentJWTFromUri = ({ uri, expectedAudience, requiredAppId, }) => {
8
+ const url = new URL(uri);
9
+ const jwt = url.searchParams.get(constants_1.JWT_URL_KEY);
10
+ if (!jwt) {
11
+ return null;
12
+ }
13
+ try {
14
+ return { decodedJWT: (0, validate_1.verify)({ jwt, expectedAudience, requiredAppId }), jwtStr: jwt };
15
+ }
16
+ catch (error) {
17
+ // Explicitly throw if the JWT doesn't contain the required appId
18
+ throw new Error(`Failed to decode JWT: ${error.message}`);
19
+ }
20
+ };
21
+ exports.decodeVincentJWTFromUri = decodeVincentJWTFromUri;
22
+ const uriContainsVincentJWT = (uri) => {
23
+ const url = new URL(uri);
24
+ const connectJwt = url.searchParams.get(constants_1.JWT_URL_KEY);
25
+ return !!connectJwt;
26
+ };
27
+ exports.uriContainsVincentJWT = uriContainsVincentJWT;
28
+ function composeConnectUrl(appId, redirectUri, connectPageUrl) {
29
+ return new URL(`/user/appId/${String(appId)}/connect?redirectUri=${redirectUri}`, connectPageUrl || constants_1.PRODUCTION_VINCENT_DASHBOARD_URL);
30
+ }
31
+ const removeSearchParam = ({ paramName, uri, }) => {
32
+ const url = new URL(uri);
33
+ url.searchParams.delete(paramName);
34
+ // Update the browser's history without reloading the page
35
+ return url.toString();
36
+ };
37
+ exports.removeSearchParam = removeSearchParam;
38
+ //# sourceMappingURL=uriHelpers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"uriHelpers.js","sourceRoot":"","sources":["../../../../src/webAuthClient/internal/uriHelpers.ts"],"names":[],"mappings":";;;AAkCA,8CAKC;AAvCD,sDAAiD;AACjD,4CAA6E;AAEtE,MAAM,uBAAuB,GAAG,CAAC,EACtC,GAAG,EACH,gBAAgB,EAChB,aAAa,GAKd,EAAE,EAAE;IACH,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC,CAAC;IACzB,MAAM,GAAG,GAAG,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,uBAAW,CAAC,CAAC;IAE9C,IAAI,CAAC,GAAG,EAAE,CAAC;QACT,OAAO,IAAI,CAAC;IACd,CAAC;IAED,IAAI,CAAC;QACH,OAAO,EAAE,UAAU,EAAE,IAAA,iBAAM,EAAC,EAAE,GAAG,EAAE,gBAAgB,EAAE,aAAa,EAAE,CAAC,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC;IACvF,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,iEAAiE;QACjE,MAAM,IAAI,KAAK,CAAC,yBAA0B,KAAe,CAAC,OAAO,EAAE,CAAC,CAAC;IACvE,CAAC;AACH,CAAC,CAAC;AAtBW,QAAA,uBAAuB,2BAsBlC;AAEK,MAAM,qBAAqB,GAAG,CAAC,GAAW,EAAE,EAAE;IACnD,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC,CAAC;IACzB,MAAM,UAAU,GAAG,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,uBAAW,CAAC,CAAC;IAErD,OAAO,CAAC,CAAC,UAAU,CAAC;AACtB,CAAC,CAAC;AALW,QAAA,qBAAqB,yBAKhC;AAEF,SAAgB,iBAAiB,CAAC,KAAa,EAAE,WAAmB,EAAE,cAAuB;IAC3F,OAAO,IAAI,GAAG,CACZ,eAAe,MAAM,CAAC,KAAK,CAAC,wBAAwB,WAAW,EAAE,EACjE,cAAc,IAAI,4CAAgC,CACnD,CAAC;AACJ,CAAC;AAEM,MAAM,iBAAiB,GAAG,CAAC,EAChC,SAAS,EACT,GAAG,GAIJ,EAAU,EAAE;IACX,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC,CAAC;IACzB,GAAG,CAAC,YAAY,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;IACnC,0DAA0D;IAC1D,OAAO,GAAG,CAAC,QAAQ,EAAE,CAAC;AACxB,CAAC,CAAC;AAXW,QAAA,iBAAiB,qBAW5B"}
@@ -0,0 +1,109 @@
1
+ import type { VincentJWTAppSpecific } from '../jwt/types';
2
+ export interface WebAuthClientConfig {
3
+ appId: number;
4
+ }
5
+ export interface RedirectToVincentDelegationPageParams {
6
+ redirectUri: string;
7
+ /** This only needs to be provided for local development with the entire stack
8
+ * @hidden
9
+ * */
10
+ connectPageUrl?: string;
11
+ }
12
+ /**
13
+ * The Vincent Web Application Client is used in web apps to handle interactions with the Vincent app portal.
14
+ *
15
+ * - Connect page redirection
16
+ * - Authentication helpers that are browser specific
17
+ *
18
+ */
19
+ export interface WebAuthClient {
20
+ /**
21
+ * Redirects the user to the Vincent Connect page.
22
+ *
23
+ * If the user approves your app permissions, they will be redirected back to the `redirectUri`.
24
+ *
25
+ * Use {@link WebAuthClient.uriContainsVincentJWT} to detect if a user has just opened your app via the Connect page
26
+ *
27
+ * Use {@link WebAuthClient.decodeVincentJWT} to decode and verify the {@link VincentJWT} from the page URI, and store it for later usage
28
+ *
29
+ * NOTE: You must register the `redirectUri` on your Vincent app for it to be considered a valid redirect target
30
+ *
31
+ * @example
32
+ * ```typescript
33
+ * import { getWebAuthClient } from '@lit-protocol/vincent-app-sdk/webAuthClient';
34
+ *
35
+ * const vincentAppClient = getWebAuthClient({ appId: MY_APP_ID });
36
+ * // ... In your app logic:
37
+ * if(vincentAppClient.uriContainsVincentJWT()) {
38
+ * // Handle app logic for the user has just logged in
39
+ * const { decoded, jwtStr } = vincentAppClient.decodeVincentJWT(EXPECTED_AUDIENCE);
40
+ * // Store `jwtStr` for later usage; the user is now logged in.
41
+ * } else {
42
+ * // Handle app logic for the user is already logged in (check for stored & unexpired JWT)
43
+ * // ...
44
+ * * // Handle app logic for the user is not yet logged in
45
+ * vincentAppClient.redirectToConnectPage({ redirectUri: window.location.href });
46
+ * }
47
+ * ```
48
+ * @function
49
+ * @inline
50
+ */
51
+ redirectToConnectPage: (redirectConfig: RedirectToVincentDelegationPageParams) => void;
52
+ /**
53
+ * Determines whether the current window location contains a Vincent JWT
54
+
55
+ * You can use this to detect if a user is loading your app as a result of approving permissions
56
+ * on the Vincent Connect page -- e.g. they just logged in
57
+ *
58
+ * See: {@link WebAuthClient.redirectToConnectPage} for example usage
59
+ *
60
+ * @function
61
+ * @inline
62
+ * @returns `true` if the current window URI contains a Vincent JWT, otherwise `false`.
63
+ */
64
+ uriContainsVincentJWT: () => boolean;
65
+ /**
66
+ * Extracts a decoded/parsed Vincent JWT (JSON Web Token) from the current window location
67
+ *
68
+ * The token is verified as part of this process; if the token is invalid or expired, this method will throw.
69
+ *
70
+ * See: {@link WebAuthClient.redirectToConnectPage} for example usage
71
+ *
72
+ * @param expectedAudience Provide a valid `redirectUri` for your app; this is typically your app's origin
73
+ * @function
74
+ * @inline
75
+ * @returns {decodedJWT: VincentJWTAppSpecific; jwtStr: string | null} `null` if no JWT is found, otherwise both the decoded jwt and the original JWT string is returned
76
+ * @throws {Error} If there was a JWT in the page URL, but it was invalid / could not be verified
77
+ */
78
+ decodeVincentJWT: (expectedAudience: string) => {
79
+ decodedJWT: VincentJWTAppSpecific;
80
+ jwtStr: string;
81
+ } | null;
82
+ /**
83
+ * Removes the Vincent connect JWT from the current window URI.
84
+ *
85
+ * This is useful for cleaning up the URL after decoding and storing the JWT,
86
+ * ensuring the redirect URL looks clean for the user and no sensitive information
87
+ * is exposed in the URI.
88
+ *
89
+ * @example
90
+ * ```typescript
91
+ * import { getWebAuthClient } from '@lit-protocol/vincent-app-sdk/webAuthClient';
92
+ *
93
+ * const vincentAppClient = getWebAuthClient({ appId: MY_APP_ID });
94
+ *
95
+ * if (vincentAppClient.uriContainsVincentJWT()) {
96
+ * const { decodedJWT, jwtStr } = vincentAppClient.decodeVincentJWT();
97
+ * // Store the JWT and use it for authentication
98
+ *
99
+ * // Now we can remove the JWT from the URL searchParams
100
+ * vincentAppClient.removeVincentJWTFromURI();
101
+ * }
102
+ * ```
103
+ *
104
+ * @function
105
+ * @inline
106
+ */
107
+ removeVincentJWTFromURI: () => void;
108
+ }
109
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/webAuthClient/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAc,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAEtE,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,qCAAqC;IACpD,WAAW,EAAE,MAAM,CAAC;IACpB;;SAEK;IACL,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED;;;;;;GAMG;AACH,MAAM,WAAW,aAAa;IAC5B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA8BG;IACH,qBAAqB,EAAE,CAAC,cAAc,EAAE,qCAAqC,KAAK,IAAI,CAAC;IAEvF;;;;;;;;;;;OAWG;IACH,qBAAqB,EAAE,MAAM,OAAO,CAAC;IAErC;;;;;;;;;;;;OAYG;IACH,gBAAgB,EAAE,CAChB,gBAAgB,EAAE,MAAM,KACrB;QAAE,UAAU,EAAE,qBAAqB,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IAElE;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACH,uBAAuB,EAAE,MAAM,IAAI,CAAC;CACrC"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/webAuthClient/types.ts"],"names":[],"mappings":""}
package/package.json ADDED
@@ -0,0 +1,82 @@
1
+ {
2
+ "name": "@lit-protocol/vincent-app-sdk",
3
+ "version": "0.0.4-ea",
4
+ "description": "Vincent SDK for browser and backend",
5
+ "author": "Lit Protocol",
6
+ "license": "ISC",
7
+ "access": "public",
8
+ "publishConfig": {
9
+ "access": "public"
10
+ },
11
+ "engines": {
12
+ "node": "^20.11.1",
13
+ "pnpm": "10.7.0"
14
+ },
15
+ "exports": {
16
+ "./package.json": "./package.json",
17
+ "./jwt": {
18
+ "import": "./dist/src/jwt/index.js",
19
+ "require": "./dist/src/jwt/index.js",
20
+ "types": "./dist/src/jwt/index.d.ts"
21
+ },
22
+ "./abilityClient": {
23
+ "import": "./dist/src/abilityClient/index.js",
24
+ "require": "./dist/src/abilityClient/index.js",
25
+ "types": "./dist/src/abilityClient/index.d.ts"
26
+ },
27
+ "./webAuthClient": {
28
+ "import": "./dist/src/webAuthClient/index.js",
29
+ "require": "./dist/src/webAuthClient/index.js",
30
+ "types": "./dist/src/webAuthClient/index.d.ts"
31
+ },
32
+ "./expressMiddleware": {
33
+ "import": "./dist/src/expressMiddleware/index.js",
34
+ "require": "./dist/src/expressMiddleware/index.js",
35
+ "types": "./dist/src/expressMiddleware/index.d.ts"
36
+ },
37
+ "./utils": {
38
+ "import": "./dist/src/utils/index.js",
39
+ "require": "./dist/src/utils/index.js",
40
+ "types": "./dist/src/utils/index.d.ts"
41
+ }
42
+ },
43
+ "keywords": [
44
+ "jwt",
45
+ "authentication",
46
+ "sdk"
47
+ ],
48
+ "dependencies": {
49
+ "@lit-protocol/auth-helpers": "^7.0.9",
50
+ "@lit-protocol/constants": "^7.0.8",
51
+ "@lit-protocol/lit-node-client": "^7.0.8",
52
+ "@lit-protocol/vincent-contracts-sdk": "0.0.4-ea",
53
+ "@lit-protocol/vincent-ability-sdk": "0.0.4-ea",
54
+ "@noble/secp256k1": "^2.2.3",
55
+ "did-jwt": "^8.0.8",
56
+ "ethers": "5.8.0",
57
+ "tslib": "^2.8.1",
58
+ "zod": "3.25.64"
59
+ },
60
+ "sideEffects": false,
61
+ "files": [
62
+ "dist/**/*",
63
+ "*.md"
64
+ ],
65
+ "devDependencies": {
66
+ "@lit-protocol/pkp-ethers": "^7.2.0",
67
+ "@lit-protocol/types": "^7.0.8",
68
+ "@types/express": "^5.0.1",
69
+ "chokidar-cli": "^3.0.0",
70
+ "live-server": "^1.2.2",
71
+ "typedoc": "0.27.9",
72
+ "typedoc-material-theme": "1.3.0",
73
+ "typedoc-plugin-extras": "^4.0.0",
74
+ "typedoc-plugin-zod": "^1.4.1",
75
+ "vercel": "^41.6.2"
76
+ },
77
+ "scripts": {
78
+ "type-tests": "./scripts/run-typecheck.sh",
79
+ "watch:type-tests": "chokidar 'src/**/*' --initial --await-write-finish --delay 100 --silent -c './scripts/run-typecheck.sh'",
80
+ "typecheck": "./scripts/precommit-check.sh"
81
+ }
82
+ }