@lit-protocol/vincent-app-sdk 1.0.1 → 1.0.3-beta.0
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 +21 -0
- package/CONTRIBUTING.md +2 -2
- package/README.md +12 -11
- package/dist/CHANGELOG.md +21 -0
- package/dist/CONTRIBUTING.md +2 -2
- package/dist/README.md +12 -11
- package/dist/package.json +32 -3
- 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.map +1 -0
- package/dist/src/index.d.ts +1 -17
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +0 -16
- package/dist/src/index.js.map +1 -1
- package/dist/src/internal/LitNodeClient/LitNodeClientInstance.d.ts +1 -1
- package/dist/src/internal/LitNodeClient/LitNodeClientInstance.d.ts.map +1 -1
- package/dist/src/internal/LitNodeClient/LitNodeClientInstance.js +3 -2
- package/dist/src/internal/LitNodeClient/LitNodeClientInstance.js.map +1 -1
- package/dist/src/internal/LitNodeClient/getLitNodeClient.d.ts +2 -2
- package/dist/src/internal/LitNodeClient/getLitNodeClient.d.ts.map +1 -1
- 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 +2 -19
- package/dist/src/jwt/core/create.d.ts.map +1 -1
- package/dist/src/jwt/core/create.js +9 -28
- package/dist/src/jwt/core/create.js.map +1 -1
- 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/{utils/isJWTExpired.js → isExpired.js} +4 -3
- 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/index.d.ts +0 -1
- package/dist/src/jwt/core/utils/index.d.ts.map +1 -1
- package/dist/src/jwt/core/utils/index.js +1 -3
- package/dist/src/jwt/core/utils/index.js.map +1 -1
- package/dist/src/jwt/core/utils/processJWTSignature.d.ts.map +1 -1
- package/dist/src/jwt/core/utils/processJWTSignature.js +2 -9
- package/dist/src/jwt/core/utils/processJWTSignature.js.map +1 -1
- package/dist/src/jwt/core/validate.d.ts +28 -22
- package/dist/src/jwt/core/validate.d.ts.map +1 -1
- package/dist/src/jwt/core/validate.js +82 -35
- package/dist/src/jwt/core/validate.js.map +1 -1
- package/dist/src/jwt/index.d.ts +15 -63
- package/dist/src/jwt/index.d.ts.map +1 -1
- package/dist/src/jwt/index.js +24 -64
- package/dist/src/jwt/index.js.map +1 -1
- 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 +32 -22
- package/dist/src/jwt/types.d.ts.map +1 -1
- package/dist/src/toolClient/constants.d.ts +2 -0
- package/dist/src/toolClient/constants.d.ts.map +1 -0
- package/dist/src/toolClient/constants.js +5 -0
- package/dist/src/toolClient/constants.js.map +1 -0
- package/dist/src/toolClient/execute/generateVincentToolSessionSigs.d.ts +8 -0
- package/dist/src/toolClient/execute/generateVincentToolSessionSigs.d.ts.map +1 -0
- package/dist/src/toolClient/execute/generateVincentToolSessionSigs.js +33 -0
- package/dist/src/toolClient/execute/generateVincentToolSessionSigs.js.map +1 -0
- package/dist/src/toolClient/{resultCreators.d.ts → execute/resultCreators.d.ts} +22 -20
- package/dist/src/toolClient/execute/resultCreators.d.ts.map +1 -0
- package/dist/src/toolClient/{resultCreators.js → execute/resultCreators.js} +14 -12
- package/dist/src/toolClient/execute/resultCreators.js.map +1 -0
- package/dist/src/toolClient/execute/types.d.ts +38 -0
- package/dist/src/toolClient/execute/types.d.ts.map +1 -0
- package/dist/src/toolClient/execute/types.js +4 -0
- package/dist/src/toolClient/execute/types.js.map +1 -0
- package/dist/src/toolClient/index.d.ts +17 -1
- package/dist/src/toolClient/index.d.ts.map +1 -1
- package/dist/src/toolClient/index.js +21 -1
- package/dist/src/toolClient/index.js.map +1 -1
- package/dist/src/toolClient/precheck/resultCreators.d.ts +71 -0
- package/dist/src/toolClient/precheck/resultCreators.d.ts.map +1 -0
- package/dist/src/toolClient/precheck/resultCreators.js +57 -0
- package/dist/src/toolClient/precheck/resultCreators.js.map +1 -0
- package/dist/src/toolClient/precheck/runPolicyPrechecks.d.ts +14 -0
- package/dist/src/toolClient/precheck/runPolicyPrechecks.d.ts.map +1 -0
- package/dist/src/toolClient/precheck/runPolicyPrechecks.js +97 -0
- package/dist/src/toolClient/precheck/runPolicyPrechecks.js.map +1 -0
- package/dist/src/toolClient/precheck/types.d.ts +82 -0
- package/dist/src/toolClient/precheck/types.d.ts.map +1 -0
- package/dist/src/toolClient/precheck/types.js +4 -0
- package/dist/src/toolClient/precheck/types.js.map +1 -0
- package/dist/src/toolClient/typeGuards.d.ts +26 -17
- package/dist/src/toolClient/typeGuards.d.ts.map +1 -1
- package/dist/src/toolClient/typeGuards.js +32 -13
- package/dist/src/toolClient/typeGuards.js.map +1 -1
- package/dist/src/toolClient/types.d.ts +5 -35
- package/dist/src/toolClient/types.d.ts.map +1 -1
- package/dist/src/toolClient/types.js +1 -0
- package/dist/src/toolClient/types.js.map +1 -1
- package/dist/src/toolClient/vincentToolClient.d.ts +54 -6
- package/dist/src/toolClient/vincentToolClient.d.ts.map +1 -1
- package/dist/src/toolClient/vincentToolClient.js +132 -138
- package/dist/src/toolClient/vincentToolClient.js.map +1 -1
- package/dist/src/type-inference-verification/tool-client-inference.d.ts.map +1 -1
- package/dist/src/type-inference-verification/tool-client-inference.js +11 -6
- package/dist/src/type-inference-verification/tool-client-inference.js.map +1 -1
- 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/{app → utils}/types.js.map +1 -1
- 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.map +1 -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.map +1 -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/{app → webAuthClient}/internal/uriHelpers.js +12 -6
- package/dist/src/webAuthClient/internal/uriHelpers.js.map +1 -0
- package/dist/src/{app → webAuthClient}/types.d.ts +33 -41
- package/dist/src/webAuthClient/types.d.ts.map +1 -0
- package/dist/src/{types.js.map → webAuthClient/types.js.map} +1 -1
- package/package.json +31 -4
- package/dist/src/app/app.d.ts +0 -9
- package/dist/src/app/app.d.ts.map +0 -1
- package/dist/src/app/app.js +0 -33
- package/dist/src/app/app.js.map +0 -1
- package/dist/src/app/constants.d.ts.map +0 -1
- package/dist/src/app/constants.js.map +0 -1
- package/dist/src/app/index.d.ts +0 -3
- package/dist/src/app/index.d.ts.map +0 -1
- package/dist/src/app/index.js +0 -6
- package/dist/src/app/index.js.map +0 -1
- package/dist/src/app/internal/index.d.ts.map +0 -1
- package/dist/src/app/internal/index.js.map +0 -1
- package/dist/src/app/internal/uriHelpers.d.ts +0 -11
- package/dist/src/app/internal/uriHelpers.d.ts.map +0 -1
- package/dist/src/app/internal/uriHelpers.js.map +0 -1
- package/dist/src/app/types.d.ts.map +0 -1
- package/dist/src/express-authentication-middleware/express.d.ts +0 -79
- package/dist/src/express-authentication-middleware/express.d.ts.map +0 -1
- package/dist/src/express-authentication-middleware/express.js +0 -137
- package/dist/src/express-authentication-middleware/express.js.map +0 -1
- package/dist/src/express-authentication-middleware/index.d.ts +0 -43
- package/dist/src/express-authentication-middleware/index.d.ts.map +0 -1
- package/dist/src/express-authentication-middleware/index.js +0 -47
- package/dist/src/express-authentication-middleware/index.js.map +0 -1
- package/dist/src/express-authentication-middleware/types.d.ts +0 -25
- package/dist/src/express-authentication-middleware/types.d.ts.map +0 -1
- package/dist/src/express-authentication-middleware/types.js.map +0 -1
- package/dist/src/jwt/core/utils/isJWTExpired.d.ts +0 -8
- package/dist/src/jwt/core/utils/isJWTExpired.d.ts.map +0 -1
- package/dist/src/jwt/core/utils/isJWTExpired.js.map +0 -1
- package/dist/src/toolClient/resultCreators.d.ts.map +0 -1
- package/dist/src/toolClient/resultCreators.js.map +0 -1
- package/dist/src/types.d.ts +0 -5
- package/dist/src/types.d.ts.map +0 -1
- /package/dist/src/{app → expressMiddleware}/types.js +0 -0
- /package/dist/src/{express-authentication-middleware → utils}/types.js +0 -0
- /package/dist/src/{app → webAuthClient}/constants.d.ts +0 -0
- /package/dist/src/{app → webAuthClient}/constants.js +0 -0
- /package/dist/src/{app → webAuthClient}/internal/index.d.ts +0 -0
- /package/dist/src/{app → webAuthClient}/internal/index.js +0 -0
- /package/dist/src/{types.js → webAuthClient/types.js} +0 -0
|
@@ -44,6 +44,7 @@ const toolParamsSchema = zod_1.z.object({
|
|
|
44
44
|
});
|
|
45
45
|
const tool = (0, vincent_tool_sdk_1.createVincentTool)({
|
|
46
46
|
packageName: '@lit-protocol/yestool3@1.0.0',
|
|
47
|
+
toolDescription: 'Yes Tool',
|
|
47
48
|
toolParamsSchema,
|
|
48
49
|
supportedPolicies: (0, vincent_tool_sdk_1.supportedPoliciesForTool)([currencyToolPolicy, rateLimitToolPolicy]),
|
|
49
50
|
execute: async ({ toolParams }, ctx) => ctx.succeed({ ok: true }),
|
|
@@ -54,7 +55,6 @@ const client = (0, vincentToolClient_1.getVincentToolClient)({
|
|
|
54
55
|
ethersSigner: {}, // stubbed
|
|
55
56
|
});
|
|
56
57
|
async function run() {
|
|
57
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
58
58
|
const toolParams = {
|
|
59
59
|
currency: 'USD',
|
|
60
60
|
userId: 'user-123',
|
|
@@ -70,17 +70,19 @@ async function run() {
|
|
|
70
70
|
// @ts-expect-error - no properties defined on undefined schema
|
|
71
71
|
console.log(successResult.foo);
|
|
72
72
|
}
|
|
73
|
-
const policiesContext =
|
|
73
|
+
const policiesContext = precheckResult?.context?.policiesContext;
|
|
74
74
|
if (precheckResult && policiesContext && policiesContext.allow) {
|
|
75
75
|
const p = policiesContext.allowedPolicies;
|
|
76
76
|
// ✅ Should infer currency-policy result shape
|
|
77
77
|
if (p['currency-policy']) {
|
|
78
|
+
// @ts-expect-error There is no precheck result schema; result must be undefined
|
|
78
79
|
p['currency-policy'].result.approvedCurrency.toUpperCase();
|
|
79
80
|
// @ts-expect-error - no commit on currency-policy
|
|
80
81
|
p['currency-policy'].commit();
|
|
81
82
|
}
|
|
82
83
|
// ✅ Should infer rate-limit result shape and commit
|
|
83
84
|
if (p['rate-limit']) {
|
|
85
|
+
// @ts-expect-error There is no precheck result schema; result must be undefined
|
|
84
86
|
const val = p['rate-limit'].result.allowed;
|
|
85
87
|
console.log(val);
|
|
86
88
|
}
|
|
@@ -94,13 +96,15 @@ async function run() {
|
|
|
94
96
|
// @ts-expect-error - fail is z.undefined(), cannot have properties
|
|
95
97
|
console.log(fail.reason);
|
|
96
98
|
// Can still access error message
|
|
97
|
-
|
|
99
|
+
precheckResult.runtimeError?.toUpperCase();
|
|
98
100
|
// Should still be optional policiesContext
|
|
99
|
-
const deniedPolicy =
|
|
101
|
+
const deniedPolicy = precheckResult.context?.policiesContext?.deniedPolicy;
|
|
100
102
|
if (deniedPolicy) {
|
|
101
103
|
if (deniedPolicy.packageName === 'currency-policy' &&
|
|
102
104
|
deniedPolicy.result &&
|
|
105
|
+
// @ts-expect-error There's no precheck deny schema!
|
|
103
106
|
deniedPolicy.result.borked) {
|
|
107
|
+
// @ts-expect-error There's no precheck deny schema!
|
|
104
108
|
console.log(deniedPolicy.result.borked);
|
|
105
109
|
}
|
|
106
110
|
console.log(deniedPolicy.result);
|
|
@@ -115,7 +119,7 @@ async function run() {
|
|
|
115
119
|
const val = executeResult.result;
|
|
116
120
|
// @ts-expect-error - invalid field on success result
|
|
117
121
|
console.log(val.failureReason);
|
|
118
|
-
const result =
|
|
122
|
+
const result = executeResult.context?.policiesContext?.allowedPolicies;
|
|
119
123
|
if (result) {
|
|
120
124
|
const currencyPolicyResult = result['currency-policy'];
|
|
121
125
|
if (currencyPolicyResult) {
|
|
@@ -125,7 +129,7 @@ async function run() {
|
|
|
125
129
|
}
|
|
126
130
|
}
|
|
127
131
|
else {
|
|
128
|
-
console.log(
|
|
132
|
+
console.log(executeResult.context?.policiesContext?.deniedPolicy?.result);
|
|
129
133
|
}
|
|
130
134
|
}
|
|
131
135
|
const fullSchemaPolicy = (0, vincent_tool_sdk_1.createVincentPolicy)({
|
|
@@ -151,6 +155,7 @@ const fullSchemaToolPolicy = (0, vincent_tool_sdk_1.createVincentToolPolicy)({
|
|
|
151
155
|
});
|
|
152
156
|
const fullTool = (0, vincent_tool_sdk_1.createVincentTool)({
|
|
153
157
|
packageName: '@lit-protocol/yestool3@1.0.0',
|
|
158
|
+
toolDescription: 'Yes Tool',
|
|
154
159
|
toolParamsSchema: zod_1.z.object({ count: zod_1.z.number() }),
|
|
155
160
|
supportedPolicies: (0, vincent_tool_sdk_1.supportedPoliciesForTool)([fullSchemaToolPolicy]),
|
|
156
161
|
precheck: async ({ toolParams }, ctx) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool-client-inference.js","sourceRoot":"","sources":["../../../src/type-inference-verification/tool-client-inference.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"tool-client-inference.js","sourceRoot":"","sources":["../../../src/type-inference-verification/tool-client-inference.ts"],"names":[],"mappings":";;AAqEA,kBA6FC;AAwDD,oBAiCC;AA3PD,6BAAwB;AAExB,qEAOwC;AAExC,uEAAuE;AAEvE,MAAM,cAAc,GAAG,IAAA,sCAAmB,EAAC;IACzC,WAAW,EAAE,iBAAiB;IAC9B,gBAAgB,EAAE,OAAC,CAAC,MAAM,CAAC,EAAE,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE,EAAE,CAAC;IACpD,QAAQ,EAAE,KAAK,EAAE,EAAE,UAAU,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,gBAAgB,EAAE,UAAU,CAAC,QAAQ,EAAE,CAAC;IAC7F,qBAAqB,EAAE,OAAC,CAAC,MAAM,CAAC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MAAM,CAAC,EAAE,CAAC,CAAC;IACjC,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { GetDelegatorsAgentPkpsParams } from './types';
|
|
2
|
+
/** Get a (paginated) list of delegator agent PKPs for a specific app version
|
|
3
|
+
*
|
|
4
|
+
* See documentation at {@link vincent-contracts-sdk!getDelegatedPkpEthAddresses | vincent-contracts-sdk/getDelegatedPkpEthAddresses}
|
|
5
|
+
*/
|
|
6
|
+
export declare function getDelegatorsAgentPkpAddresses(params: GetDelegatorsAgentPkpsParams): Promise<string[]>;
|
|
7
|
+
//# sourceMappingURL=delegation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delegation.d.ts","sourceRoot":"","sources":["../../../src/utils/delegation.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,SAAS,CAAC;AAE5D;;;GAGG;AACH,wBAAsB,8BAA8B,CAAC,MAAM,EAAE,4BAA4B,qBASxF"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getDelegatorsAgentPkpAddresses = getDelegatorsAgentPkpAddresses;
|
|
4
|
+
const vincent_contracts_sdk_1 = require("@lit-protocol/vincent-contracts-sdk");
|
|
5
|
+
/** Get a (paginated) list of delegator agent PKPs for a specific app version
|
|
6
|
+
*
|
|
7
|
+
* See documentation at {@link vincent-contracts-sdk!getDelegatedPkpEthAddresses | vincent-contracts-sdk/getDelegatedPkpEthAddresses}
|
|
8
|
+
*/
|
|
9
|
+
async function getDelegatorsAgentPkpAddresses(params) {
|
|
10
|
+
const { appId, appVersion, signer, pageOpts } = params;
|
|
11
|
+
const contractClient = (0, vincent_contracts_sdk_1.getClient)({ signer });
|
|
12
|
+
return await contractClient.getDelegatedPkpEthAddresses({
|
|
13
|
+
appId,
|
|
14
|
+
version: appVersion,
|
|
15
|
+
pageOpts,
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=delegation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delegation.js","sourceRoot":"","sources":["../../../src/utils/delegation.ts"],"names":[],"mappings":";;AAQA,wEASC;AAjBD,+EAAgE;AAIhE;;;GAGG;AACI,KAAK,UAAU,8BAA8B,CAAC,MAAoC;IACvF,MAAM,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,MAAM,CAAC;IAEvD,MAAM,cAAc,GAAG,IAAA,iCAAS,EAAC,EAAE,MAAM,EAAE,CAAC,CAAC;IAC7C,OAAO,MAAM,cAAc,CAAC,2BAA2B,CAAC;QACtD,KAAK;QACL,OAAO,EAAE,UAAU;QACnB,QAAQ;KACT,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,8BAA8B,EAAE,MAAM,cAAc,CAAC;AAE9D,YAAY,EAAE,4BAA4B,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getDelegatorsAgentPkpAddresses = void 0;
|
|
4
|
+
var delegation_1 = require("./delegation");
|
|
5
|
+
Object.defineProperty(exports, "getDelegatorsAgentPkpAddresses", { enumerable: true, get: function () { return delegation_1.getDelegatorsAgentPkpAddresses; } });
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":";;;AAAA,2CAA8D;AAArD,4HAAA,8BAA8B,OAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"typedocRoot.d.ts","sourceRoot":"","sources":["../../../src/utils/typedocRoot.ts"],"names":[],"mappings":"AAGA;;;;GAIG;AAEH,OAAO,EAAE,8BAA8B,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file exists because the function params and options are inlined and expanded, and delegated to the docs in the contracts-sdk
|
|
3
|
+
// We don't want them to be 'root-level' exports for Typedoc purpose, or they appear under an 'Other' category and are not navigable
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.getDelegatorsAgentPkpAddresses = void 0;
|
|
6
|
+
/** Utility functions for interacting with the Vincent delegation backend
|
|
7
|
+
*
|
|
8
|
+
* @module utils
|
|
9
|
+
* @packageDocumentation
|
|
10
|
+
*/
|
|
11
|
+
var delegation_1 = require("./delegation");
|
|
12
|
+
Object.defineProperty(exports, "getDelegatorsAgentPkpAddresses", { enumerable: true, get: function () { return delegation_1.getDelegatorsAgentPkpAddresses; } });
|
|
13
|
+
//# sourceMappingURL=typedocRoot.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"typedocRoot.js","sourceRoot":"","sources":["../../../src/utils/typedocRoot.ts"],"names":[],"mappings":";AAAA,oIAAoI;AACpI,oIAAoI;;;AAEpI;;;;GAIG;AAEH,2CAA8D;AAArD,4HAAA,8BAA8B,OAAA"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { Signer } from 'ethers';
|
|
2
|
+
/**
|
|
3
|
+
* @inline
|
|
4
|
+
* @expand
|
|
5
|
+
*/
|
|
6
|
+
export interface GetDelegatorsAgentPkpsParams {
|
|
7
|
+
appId: number;
|
|
8
|
+
appVersion: number;
|
|
9
|
+
signer: Signer;
|
|
10
|
+
pageOpts?: {
|
|
11
|
+
offset?: number;
|
|
12
|
+
limit?: number;
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/utils/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAErC;;;GAGG;AACH,MAAM,WAAW,4BAA4B;IAC3C,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CAChD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/utils/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { WebAuthClientConfig, WebAuthClient } from './types';
|
|
2
|
+
/** Create a new {@link WebAuthClient} instance.
|
|
3
|
+
*
|
|
4
|
+
* - `appId` is the numeric app ID displayed for your app on the Vincent Dashboard
|
|
5
|
+
* */
|
|
6
|
+
export declare const getWebAuthClient: (appClientConfig: WebAuthClientConfig) => WebAuthClient;
|
|
7
|
+
//# sourceMappingURL=app.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../../../src/webAuthClient/app.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,mBAAmB,EACnB,aAAa,EACd,MAAM,SAAS,CAAC;AAsBjB;;;KAGK;AACL,eAAO,MAAM,gBAAgB,GAAI,iBAAiB,mBAAmB,KAAG,aA6BvE,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getWebAuthClient = void 0;
|
|
4
|
+
const constants_1 = require("./constants");
|
|
5
|
+
const internal_1 = require("./internal");
|
|
6
|
+
const { isLoginUri, composeDelegationAuthUrl, removeSearchParam, decodeVincentJWTFromUri } = internal_1.uriHelpers;
|
|
7
|
+
const redirectToDelegationAuthPage = ({ appId, redirectUri, delegationAuthPageUrl, }) => window.open(composeDelegationAuthUrl(appId, redirectUri, delegationAuthPageUrl).toString(), '_self');
|
|
8
|
+
/** Create a new {@link WebAuthClient} instance.
|
|
9
|
+
*
|
|
10
|
+
* - `appId` is the numeric app ID displayed for your app on the Vincent Dashboard
|
|
11
|
+
* */
|
|
12
|
+
const getWebAuthClient = (appClientConfig) => {
|
|
13
|
+
const { appId } = appClientConfig;
|
|
14
|
+
return {
|
|
15
|
+
redirectToDelegationAuthPage: (redirectDelegationAuthPageConfig) => {
|
|
16
|
+
const { delegationAuthPageUrl, redirectUri } = redirectDelegationAuthPageConfig;
|
|
17
|
+
redirectToDelegationAuthPage({
|
|
18
|
+
appId,
|
|
19
|
+
delegationAuthPageUrl,
|
|
20
|
+
redirectUri,
|
|
21
|
+
});
|
|
22
|
+
},
|
|
23
|
+
isLogin: () => isLoginUri(window.location.href),
|
|
24
|
+
decodeVincentLoginJWT: (expectedAudience) => decodeVincentJWTFromUri({
|
|
25
|
+
uri: window.location.href,
|
|
26
|
+
expectedAudience: expectedAudience,
|
|
27
|
+
requiredAppId: appId,
|
|
28
|
+
}),
|
|
29
|
+
removeLoginJWTFromURI: () => {
|
|
30
|
+
const urlWithoutJWTSearchParam = removeSearchParam({
|
|
31
|
+
paramName: constants_1.JWT_URL_KEY,
|
|
32
|
+
uri: window.location.href,
|
|
33
|
+
});
|
|
34
|
+
window.history.replaceState({}, document.title, urlWithoutJWTSearchParam);
|
|
35
|
+
},
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
exports.getWebAuthClient = getWebAuthClient;
|
|
39
|
+
//# sourceMappingURL=app.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"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AC,KAAK,EAAE,wBAAwB,CAAC,CAAC;QAC5E,CAAC;KACF,CAAC;AACJ,CAAC,CAAC;AA7BW,QAAA,gBAAgB,oBA6B3B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/webAuthClient/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gCAAgC,qCAAqC,CAAC;AACnF,eAAO,MAAM,WAAW,QAAQ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/webAuthClient/constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,gCAAgC,GAAG,kCAAkC,CAAC;AACtE,QAAA,WAAW,GAAG,KAAK,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/** The webAuthClient module contains methods and types that are used to implement authentication in Vincent web apps
|
|
2
|
+
* Authentication is handled via redirects to the Vincent dashboard portal that return JWTs with authentication information
|
|
3
|
+
* that can be used to secure your backend Vincent app UI.
|
|
4
|
+
*
|
|
5
|
+
* ```typescript
|
|
6
|
+
* import { getWebAuthClient } from '@lit-protocol/vincent-app-sdk/webAuthClient';
|
|
7
|
+
* ```
|
|
8
|
+
* @packageDocumentation
|
|
9
|
+
*/
|
|
10
|
+
import { getWebAuthClient } from './app';
|
|
11
|
+
export { getWebAuthClient };
|
|
12
|
+
export type { WebAuthClient, WebAuthClientConfig, RedirectToVincentDelegationPageParams, } from './types';
|
|
13
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/webAuthClient/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EAAE,gBAAgB,EAAE,MAAM,OAAO,CAAC;AAEzC,OAAO,EAAE,gBAAgB,EAAE,CAAC;AAE5B,YAAY,EACV,aAAa,EACb,mBAAmB,EACnB,qCAAqC,GACtC,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getWebAuthClient = void 0;
|
|
4
|
+
/** The webAuthClient module contains methods and types that are used to implement authentication in Vincent web apps
|
|
5
|
+
* Authentication is handled via redirects to the Vincent dashboard portal that return JWTs with authentication information
|
|
6
|
+
* that can be used to secure your backend Vincent app UI.
|
|
7
|
+
*
|
|
8
|
+
* ```typescript
|
|
9
|
+
* import { getWebAuthClient } from '@lit-protocol/vincent-app-sdk/webAuthClient';
|
|
10
|
+
* ```
|
|
11
|
+
* @packageDocumentation
|
|
12
|
+
*/
|
|
13
|
+
const app_1 = require("./app");
|
|
14
|
+
Object.defineProperty(exports, "getWebAuthClient", { enumerable: true, get: function () { return app_1.getWebAuthClient; } });
|
|
15
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/webAuthClient/index.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;GAQG;AACH,+BAAyC;AAEhC,iGAFA,sBAAgB,OAEA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/webAuthClient/internal/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,UAAU,MAAM,cAAc,CAAC;AAE3C,OAAO,EAAE,UAAU,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/webAuthClient/internal/index.ts"],"names":[],"mappings":";;;;AAAA,iEAA2C;AAElC,gCAAU"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare const decodeVincentJWTFromUri: ({ uri, expectedAudience, requiredAppId, }: {
|
|
2
|
+
uri: string;
|
|
3
|
+
expectedAudience: string;
|
|
4
|
+
requiredAppId: number;
|
|
5
|
+
}) => {
|
|
6
|
+
decodedJWT: import("../../jwt").VincentJWTAppSpecific;
|
|
7
|
+
jwtStr: string;
|
|
8
|
+
} | null;
|
|
9
|
+
export declare const isLoginUri: (uri: string) => boolean;
|
|
10
|
+
export declare function composeDelegationAuthUrl(appId: number, redirectUri: string, delegationAuthPageUrl?: string): URL;
|
|
11
|
+
export declare const removeSearchParam: ({ paramName, uri, }: {
|
|
12
|
+
paramName: string;
|
|
13
|
+
uri: string;
|
|
14
|
+
}) => string;
|
|
15
|
+
//# sourceMappingURL=uriHelpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"uriHelpers.d.ts","sourceRoot":"","sources":["../../../../src/webAuthClient/internal/uriHelpers.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,uBAAuB,GAAI,2CAIrC;IACD,GAAG,EAAE,MAAM,CAAC;IACZ,gBAAgB,EAAE,MAAM,CAAC;IACzB,aAAa,EAAE,MAAM,CAAC;CACvB;;;QAcA,CAAC;AAEF,eAAO,MAAM,UAAU,GAAI,KAAK,MAAM,YAKrC,CAAC;AAEF,wBAAgB,wBAAwB,CACtC,KAAK,EAAE,MAAM,EACb,WAAW,EAAE,MAAM,EACnB,qBAAqB,CAAC,EAAE,MAAM,OAM/B;AAED,eAAO,MAAM,iBAAiB,GAAI,qBAG/B;IACD,SAAS,EAAE,MAAM,CAAC;IAClB,GAAG,EAAE,MAAM,CAAC;CACb,KAAG,MAKH,CAAC"}
|
|
@@ -1,16 +1,22 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.removeSearchParam = exports.isLoginUri = exports.decodeVincentJWTFromUri = void 0;
|
|
4
|
-
exports.
|
|
5
|
-
const constants_1 = require("../constants");
|
|
4
|
+
exports.composeDelegationAuthUrl = composeDelegationAuthUrl;
|
|
6
5
|
const validate_1 = require("../../jwt/core/validate");
|
|
7
|
-
const
|
|
6
|
+
const constants_1 = require("../constants");
|
|
7
|
+
const decodeVincentJWTFromUri = ({ uri, expectedAudience, requiredAppId, }) => {
|
|
8
8
|
const url = new URL(uri);
|
|
9
9
|
const jwt = url.searchParams.get(constants_1.JWT_URL_KEY);
|
|
10
10
|
if (!jwt) {
|
|
11
11
|
return null;
|
|
12
12
|
}
|
|
13
|
-
|
|
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
|
+
}
|
|
14
20
|
};
|
|
15
21
|
exports.decodeVincentJWTFromUri = decodeVincentJWTFromUri;
|
|
16
22
|
const isLoginUri = (uri) => {
|
|
@@ -19,8 +25,8 @@ const isLoginUri = (uri) => {
|
|
|
19
25
|
return !!loginJwt;
|
|
20
26
|
};
|
|
21
27
|
exports.isLoginUri = isLoginUri;
|
|
22
|
-
function
|
|
23
|
-
return new URL(`/appId/${appId}/consent?redirectUri=${redirectUri}`,
|
|
28
|
+
function composeDelegationAuthUrl(appId, redirectUri, delegationAuthPageUrl) {
|
|
29
|
+
return new URL(`/appId/${String(appId)}/consent?redirectUri=${redirectUri}`, delegationAuthPageUrl || constants_1.PRODUCTION_VINCENT_DASHBOARD_URL);
|
|
24
30
|
}
|
|
25
31
|
const removeSearchParam = ({ paramName, uri, }) => {
|
|
26
32
|
const url = new URL(uri);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"uriHelpers.js","sourceRoot":"","sources":["../../../../src/webAuthClient/internal/uriHelpers.ts"],"names":[],"mappings":";;;AAkCA,4DASC;AA3CD,sDAAiD;AACjD,4CAA6E;AAEtE,MAAM,uBAAuB,GAAG,CAAC,EACtC,GAAG,EACH,gBAAgB,EAChB,aAAa,GAKd,EAAE,E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AC1D,OAAO,GAAG,CAAC,QAAQ,EAAE,CAAC;AACxB,CAAC,CAAC;AAXW,QAAA,iBAAiB,qBAW5B"}
|
|
@@ -1,69 +1,61 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
*/
|
|
5
|
-
export interface VincentAppClientConfig {
|
|
6
|
-
appId: string;
|
|
1
|
+
import type { VincentJWTAppSpecific } from '../jwt/types';
|
|
2
|
+
export interface WebAuthClientConfig {
|
|
3
|
+
appId: number;
|
|
7
4
|
}
|
|
8
|
-
|
|
9
|
-
* @category Interfaces
|
|
10
|
-
*/
|
|
11
|
-
export interface RedirectToVincentConsentPageParams {
|
|
5
|
+
export interface RedirectToVincentDelegationPageParams {
|
|
12
6
|
redirectUri: string;
|
|
13
7
|
/** This only needs to be provided for local development with the entire stack
|
|
14
8
|
* @hidden
|
|
15
9
|
* */
|
|
16
|
-
|
|
10
|
+
delegationAuthPageUrl?: string;
|
|
17
11
|
}
|
|
18
12
|
/**
|
|
19
13
|
* The Vincent Web Application Client is used in web apps to handle interactions with the Vincent app portal.
|
|
20
14
|
*
|
|
21
|
-
* -
|
|
15
|
+
* - Delegation authorization page redirection
|
|
22
16
|
* - Authentication helpers that are browser specific
|
|
23
17
|
*
|
|
24
|
-
* @category Interfaces
|
|
25
18
|
*/
|
|
26
|
-
export interface
|
|
19
|
+
export interface WebAuthClient {
|
|
27
20
|
/**
|
|
28
|
-
* Redirects the user to the Vincent
|
|
21
|
+
* Redirects the user to the Vincent delegation auth page.
|
|
29
22
|
*
|
|
30
23
|
* If the user approves your app permissions, they will be redirected back to the `redirectUri`.
|
|
31
24
|
*
|
|
32
|
-
* Use {@link
|
|
25
|
+
* Use {@link WebAuthClient.isLogin} to detect if a user has just opened your app via the delegation auth page
|
|
33
26
|
*
|
|
34
|
-
* Use {@link
|
|
27
|
+
* Use {@link WebAuthClient.decodeVincentLoginJWT} to decode and verify the {@link VincentJWT} from the page URI, and store it for later usage
|
|
35
28
|
*
|
|
36
29
|
* NOTE: You must register the `redirectUri` on your Vincent app for it to be considered a valid redirect target
|
|
37
30
|
*
|
|
38
31
|
* @example
|
|
39
32
|
* ```typescript
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
* }
|
|
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.isLogin()) {
|
|
38
|
+
* // Handle app logic for the user has just logged in
|
|
39
|
+
* const { decoded, jwtStr } = vincentAppClient.decodeVincentLoginJWT(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.redirectToDelegationAuthPage({ redirectUri: window.location.href });
|
|
46
|
+
* }
|
|
55
47
|
* ```
|
|
56
48
|
* @function
|
|
57
49
|
* @inline
|
|
58
50
|
*/
|
|
59
|
-
|
|
51
|
+
redirectToDelegationAuthPage: (redirectConfig: RedirectToVincentDelegationPageParams) => void;
|
|
60
52
|
/**
|
|
61
53
|
* Determines whether the current window location is a login URI associated with Vincent
|
|
62
54
|
|
|
63
55
|
* You can use this to detect if a user is loading your app as a result of approving permissions
|
|
64
|
-
* on the Vincent
|
|
56
|
+
* on the Vincent delegation auth page -- e.g. they just logged in
|
|
65
57
|
*
|
|
66
|
-
* See: {@link
|
|
58
|
+
* See: {@link WebAuthClient.redirectToDelegationAuthPage} for example usage
|
|
67
59
|
*
|
|
68
60
|
* @function
|
|
69
61
|
* @inline
|
|
@@ -75,16 +67,16 @@ export interface VincentWebAppClient {
|
|
|
75
67
|
*
|
|
76
68
|
* The token is verified as part of this process; if the token is invalid or expired, this method will throw.
|
|
77
69
|
*
|
|
78
|
-
* See: {@link
|
|
70
|
+
* See: {@link WebAuthClient.redirectToDelegationAuthPage} for example usage
|
|
79
71
|
*
|
|
80
|
-
* @param
|
|
72
|
+
* @param expectedAudience Provide a valid `redirectUri` for your app; this is typically your app's origin
|
|
81
73
|
* @function
|
|
82
74
|
* @inline
|
|
83
|
-
* @returns {decodedJWT:
|
|
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
|
|
84
76
|
* @throws {Error} If there was a JWT in the page URL, but it was invalid / could not be verified
|
|
85
77
|
*/
|
|
86
78
|
decodeVincentLoginJWT: (expectedAudience: string) => {
|
|
87
|
-
decodedJWT:
|
|
79
|
+
decodedJWT: VincentJWTAppSpecific;
|
|
88
80
|
jwtStr: string;
|
|
89
81
|
} | null;
|
|
90
82
|
/**
|
|
@@ -96,9 +88,9 @@ export interface VincentWebAppClient {
|
|
|
96
88
|
*
|
|
97
89
|
* @example
|
|
98
90
|
* ```typescript
|
|
99
|
-
* import {
|
|
91
|
+
* import { getWebAuthClient } from '@lit-protocol/vincent-app-sdk/webAuthClient';
|
|
100
92
|
*
|
|
101
|
-
* const vincentAppClient =
|
|
93
|
+
* const vincentAppClient = getWebAuthClient({ appId: MY_APP_ID });
|
|
102
94
|
*
|
|
103
95
|
* if (vincentAppClient.isLogin()) {
|
|
104
96
|
* const { decodedJWT, jwtStr } = vincentAppClient.decodeVincentLoginJWT();
|
|
@@ -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,qBAAqB,CAAC,EAAE,MAAM,CAAC;CAChC;AAED;;;;;;GAMG;AACH,MAAM,WAAW,aAAa;IAC5B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA8BG;IACH,4BAA4B,EAAE,CAAC,cAAc,EAAE,qCAAqC,KAAK,IAAI,CAAC;IAE9F;;;;;;;;;;;OAWG;IACH,OAAO,EAAE,MAAM,OAAO,CAAC;IAEvB;;;;;;;;;;;;OAYG;IACH,qBAAqB,EAAE,CACrB,gBAAgB,EAAE,MAAM,KACrB;QAAE,UAAU,EAAE,qBAAqB,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IAElE;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACH,qBAAqB,EAAE,MAAM,IAAI,CAAC;CACnC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/webAuthClient/types.ts"],"names":[],"mappings":""}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lit-protocol/vincent-app-sdk",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3-beta.0",
|
|
4
4
|
"description": "Vincent SDK for browser and backend",
|
|
5
5
|
"author": "Lit Protocol",
|
|
6
6
|
"license": "ISC",
|
|
@@ -12,8 +12,34 @@
|
|
|
12
12
|
"node": "^20.11.1",
|
|
13
13
|
"pnpm": "10.7.0"
|
|
14
14
|
},
|
|
15
|
-
"
|
|
16
|
-
|
|
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
|
+
"./toolClient": {
|
|
23
|
+
"import": "./dist/src/toolClient/index.js",
|
|
24
|
+
"require": "./dist/src/toolClient/index.js",
|
|
25
|
+
"types": "./dist/src/toolClient/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
|
+
},
|
|
17
43
|
"keywords": [
|
|
18
44
|
"jwt",
|
|
19
45
|
"authentication",
|
|
@@ -28,7 +54,8 @@
|
|
|
28
54
|
"ethers": "5.8.0",
|
|
29
55
|
"tslib": "^2.8.1",
|
|
30
56
|
"zod": "3.25.64",
|
|
31
|
-
"@lit-protocol/vincent-
|
|
57
|
+
"@lit-protocol/vincent-contracts-sdk": "1.0.0-4",
|
|
58
|
+
"@lit-protocol/vincent-tool-sdk": "1.0.2"
|
|
32
59
|
},
|
|
33
60
|
"sideEffects": false,
|
|
34
61
|
"files": [
|
package/dist/src/app/app.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { VincentAppClientConfig, VincentWebAppClient } from './types';
|
|
2
|
-
/** Create a new {@link VincentWebAppClient} instance.
|
|
3
|
-
*
|
|
4
|
-
* - `appId` is the numeric app ID displayed for your app on the Vincent Dashboard
|
|
5
|
-
*
|
|
6
|
-
* @category API Methods
|
|
7
|
-
* */
|
|
8
|
-
export declare const getVincentWebAppClient: (appClientConfig: VincentAppClientConfig) => VincentWebAppClient;
|
|
9
|
-
//# sourceMappingURL=app.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../../../src/app/app.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,sBAAsB,EACtB,mBAAmB,EACpB,MAAM,SAAS,CAAC;AAgBjB;;;;;KAKK;AACL,eAAO,MAAM,sBAAsB,GACjC,iBAAiB,sBAAsB,KACtC,mBAmBF,CAAC"}
|