@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.
- package/CHANGELOG.md +207 -0
- package/CONTRIBUTING.md +114 -0
- package/README.md +216 -0
- package/dist/package.json +86 -0
- package/dist/src/abilityClient/constants.d.ts +2 -0
- package/dist/src/abilityClient/constants.d.ts.map +1 -0
- package/dist/src/abilityClient/constants.js +5 -0
- package/dist/src/abilityClient/constants.js.map +1 -0
- package/dist/src/abilityClient/execute/generateVincentAbilitySessionSigs.d.ts +8 -0
- package/dist/src/abilityClient/execute/generateVincentAbilitySessionSigs.d.ts.map +1 -0
- package/dist/src/abilityClient/execute/generateVincentAbilitySessionSigs.js +33 -0
- package/dist/src/abilityClient/execute/generateVincentAbilitySessionSigs.js.map +1 -0
- package/dist/src/abilityClient/execute/resultCreators.d.ts +71 -0
- package/dist/src/abilityClient/execute/resultCreators.d.ts.map +1 -0
- package/dist/src/abilityClient/execute/resultCreators.js +57 -0
- package/dist/src/abilityClient/execute/resultCreators.js.map +1 -0
- package/dist/src/abilityClient/execute/types.d.ts +38 -0
- package/dist/src/abilityClient/execute/types.d.ts.map +1 -0
- package/dist/src/abilityClient/execute/types.js +4 -0
- package/dist/src/abilityClient/execute/types.js.map +1 -0
- package/dist/src/abilityClient/index.d.ts +19 -0
- package/dist/src/abilityClient/index.d.ts.map +1 -0
- package/dist/src/abilityClient/index.js +26 -0
- package/dist/src/abilityClient/index.js.map +1 -0
- package/dist/src/abilityClient/precheck/resultCreators.d.ts +71 -0
- package/dist/src/abilityClient/precheck/resultCreators.d.ts.map +1 -0
- package/dist/src/abilityClient/precheck/resultCreators.js +57 -0
- package/dist/src/abilityClient/precheck/resultCreators.js.map +1 -0
- package/dist/src/abilityClient/precheck/runPolicyPrechecks.d.ts +14 -0
- package/dist/src/abilityClient/precheck/runPolicyPrechecks.d.ts.map +1 -0
- package/dist/src/abilityClient/precheck/runPolicyPrechecks.js +98 -0
- package/dist/src/abilityClient/precheck/runPolicyPrechecks.js.map +1 -0
- package/dist/src/abilityClient/precheck/types.d.ts +82 -0
- package/dist/src/abilityClient/precheck/types.d.ts.map +1 -0
- package/dist/src/abilityClient/precheck/types.js +4 -0
- package/dist/src/abilityClient/precheck/types.js.map +1 -0
- package/dist/src/abilityClient/typeGuards.d.ts +28 -0
- package/dist/src/abilityClient/typeGuards.d.ts.map +1 -0
- package/dist/src/abilityClient/typeGuards.js +67 -0
- package/dist/src/abilityClient/typeGuards.js.map +1 -0
- package/dist/src/abilityClient/types.d.ts +50 -0
- package/dist/src/abilityClient/types.d.ts.map +1 -0
- package/dist/src/abilityClient/types.js +4 -0
- package/dist/src/abilityClient/types.js.map +1 -0
- package/dist/src/abilityClient/vincentAbilityClient.d.ts +76 -0
- package/dist/src/abilityClient/vincentAbilityClient.d.ts.map +1 -0
- package/dist/src/abilityClient/vincentAbilityClient.js +285 -0
- package/dist/src/abilityClient/vincentAbilityClient.js.map +1 -0
- package/dist/src/expressMiddleware/express.d.ts +63 -0
- package/dist/src/expressMiddleware/express.d.ts.map +1 -0
- package/dist/src/expressMiddleware/express.js +125 -0
- package/dist/src/expressMiddleware/express.js.map +1 -0
- package/dist/src/expressMiddleware/index.d.ts +14 -0
- package/dist/src/expressMiddleware/index.d.ts.map +1 -0
- package/dist/src/expressMiddleware/index.js +17 -0
- package/dist/src/expressMiddleware/index.js.map +1 -0
- package/dist/src/expressMiddleware/types.d.ts +31 -0
- package/dist/src/expressMiddleware/types.d.ts.map +1 -0
- package/dist/src/expressMiddleware/types.js +3 -0
- package/dist/src/expressMiddleware/types.js.map +1 -0
- package/dist/src/index.d.ts +2 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/index.js +3 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/internal/LitNodeClient/LitNodeClientInstance.d.ts +14 -0
- package/dist/src/internal/LitNodeClient/LitNodeClientInstance.d.ts.map +1 -0
- package/dist/src/internal/LitNodeClient/LitNodeClientInstance.js +67 -0
- package/dist/src/internal/LitNodeClient/LitNodeClientInstance.js.map +1 -0
- package/dist/src/internal/LitNodeClient/getLitNodeClient.d.ts +7 -0
- package/dist/src/internal/LitNodeClient/getLitNodeClient.d.ts.map +1 -0
- package/dist/src/internal/LitNodeClient/getLitNodeClient.js +25 -0
- package/dist/src/internal/LitNodeClient/getLitNodeClient.js.map +1 -0
- package/dist/src/jwt/accessors.d.ts +8 -0
- package/dist/src/jwt/accessors.d.ts.map +1 -0
- package/dist/src/jwt/accessors.js +15 -0
- package/dist/src/jwt/accessors.js.map +1 -0
- package/dist/src/jwt/core/create.d.ts +24 -0
- package/dist/src/jwt/core/create.d.ts.map +1 -0
- package/dist/src/jwt/core/create.js +95 -0
- package/dist/src/jwt/core/create.js.map +1 -0
- package/dist/src/jwt/core/isExpired.d.ts +9 -0
- package/dist/src/jwt/core/isExpired.d.ts.map +1 -0
- package/dist/src/jwt/core/isExpired.js +20 -0
- package/dist/src/jwt/core/isExpired.js.map +1 -0
- package/dist/src/jwt/core/utils/base64.d.ts +14 -0
- package/dist/src/jwt/core/utils/base64.d.ts.map +1 -0
- package/dist/src/jwt/core/utils/base64.js +54 -0
- package/dist/src/jwt/core/utils/base64.js.map +1 -0
- package/dist/src/jwt/core/utils/definedObject.d.ts +2 -0
- package/dist/src/jwt/core/utils/definedObject.d.ts.map +1 -0
- package/dist/src/jwt/core/utils/definedObject.js +7 -0
- package/dist/src/jwt/core/utils/definedObject.js.map +1 -0
- package/dist/src/jwt/core/utils/index.d.ts +5 -0
- package/dist/src/jwt/core/utils/index.d.ts.map +1 -0
- package/dist/src/jwt/core/utils/index.js +12 -0
- package/dist/src/jwt/core/utils/index.js.map +1 -0
- package/dist/src/jwt/core/utils/processJWTSignature.d.ts +8 -0
- package/dist/src/jwt/core/utils/processJWTSignature.d.ts.map +1 -0
- package/dist/src/jwt/core/utils/processJWTSignature.js +14 -0
- package/dist/src/jwt/core/utils/processJWTSignature.js.map +1 -0
- package/dist/src/jwt/core/utils/splitJWT.d.ts +11 -0
- package/dist/src/jwt/core/utils/splitJWT.d.ts.map +1 -0
- package/dist/src/jwt/core/utils/splitJWT.js +21 -0
- package/dist/src/jwt/core/utils/splitJWT.js.map +1 -0
- package/dist/src/jwt/core/utils/validateJWTTime.d.ts +12 -0
- package/dist/src/jwt/core/utils/validateJWTTime.d.ts.map +1 -0
- package/dist/src/jwt/core/utils/validateJWTTime.js +24 -0
- package/dist/src/jwt/core/utils/validateJWTTime.js.map +1 -0
- package/dist/src/jwt/core/validate.d.ts +29 -0
- package/dist/src/jwt/core/validate.d.ts.map +1 -0
- package/dist/src/jwt/core/validate.js +143 -0
- package/dist/src/jwt/core/validate.js.map +1 -0
- package/dist/src/jwt/index.d.ts +21 -0
- package/dist/src/jwt/index.d.ts.map +1 -0
- package/dist/src/jwt/index.js +32 -0
- package/dist/src/jwt/index.js.map +1 -0
- package/dist/src/jwt/typeGuards.d.ts +14 -0
- package/dist/src/jwt/typeGuards.d.ts.map +1 -0
- package/dist/src/jwt/typeGuards.js +32 -0
- package/dist/src/jwt/typeGuards.js.map +1 -0
- package/dist/src/jwt/types.d.ts +82 -0
- package/dist/src/jwt/types.d.ts.map +1 -0
- package/dist/src/jwt/types.js +3 -0
- package/dist/src/jwt/types.js.map +1 -0
- package/dist/src/type-inference-verification/ability-client-inference.d.ts +3 -0
- package/dist/src/type-inference-verification/ability-client-inference.d.ts.map +1 -0
- package/dist/src/type-inference-verification/ability-client-inference.js +220 -0
- package/dist/src/type-inference-verification/ability-client-inference.js.map +1 -0
- package/dist/src/utils/delegation.d.ts +7 -0
- package/dist/src/utils/delegation.d.ts.map +1 -0
- package/dist/src/utils/delegation.js +18 -0
- package/dist/src/utils/delegation.js.map +1 -0
- package/dist/src/utils/index.d.ts +3 -0
- package/dist/src/utils/index.d.ts.map +1 -0
- package/dist/src/utils/index.js +6 -0
- package/dist/src/utils/index.js.map +1 -0
- package/dist/src/utils/typedocRoot.d.ts +7 -0
- package/dist/src/utils/typedocRoot.d.ts.map +1 -0
- package/dist/src/utils/typedocRoot.js +13 -0
- package/dist/src/utils/typedocRoot.js.map +1 -0
- package/dist/src/utils/types.d.ts +15 -0
- package/dist/src/utils/types.d.ts.map +1 -0
- package/dist/src/utils/types.js +3 -0
- package/dist/src/utils/types.js.map +1 -0
- package/dist/src/webAuthClient/app.d.ts +7 -0
- package/dist/src/webAuthClient/app.d.ts.map +1 -0
- package/dist/src/webAuthClient/app.js +39 -0
- package/dist/src/webAuthClient/app.js.map +1 -0
- package/dist/src/webAuthClient/constants.d.ts +3 -0
- package/dist/src/webAuthClient/constants.d.ts.map +1 -0
- package/dist/src/webAuthClient/constants.js +6 -0
- package/dist/src/webAuthClient/constants.js.map +1 -0
- package/dist/src/webAuthClient/index.d.ts +13 -0
- package/dist/src/webAuthClient/index.d.ts.map +1 -0
- package/dist/src/webAuthClient/index.js +15 -0
- package/dist/src/webAuthClient/index.js.map +1 -0
- package/dist/src/webAuthClient/internal/index.d.ts +3 -0
- package/dist/src/webAuthClient/internal/index.d.ts.map +1 -0
- package/dist/src/webAuthClient/internal/index.js +7 -0
- package/dist/src/webAuthClient/internal/index.js.map +1 -0
- package/dist/src/webAuthClient/internal/uriHelpers.d.ts +15 -0
- package/dist/src/webAuthClient/internal/uriHelpers.d.ts.map +1 -0
- package/dist/src/webAuthClient/internal/uriHelpers.js +38 -0
- package/dist/src/webAuthClient/internal/uriHelpers.js.map +1 -0
- package/dist/src/webAuthClient/types.d.ts +109 -0
- package/dist/src/webAuthClient/types.d.ts.map +1 -0
- package/dist/src/webAuthClient/types.js +3 -0
- package/dist/src/webAuthClient/types.js.map +1 -0
- 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 @@
|
|
|
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
|
+
}
|