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

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 (172) hide show
  1. package/CHANGELOG.md +74 -0
  2. package/CONTRIBUTING.md +115 -0
  3. package/README.md +216 -0
  4. package/dist/CHANGELOG.md +74 -0
  5. package/dist/CONTRIBUTING.md +115 -0
  6. package/dist/README.md +216 -0
  7. package/dist/package.json +86 -0
  8. package/dist/src/expressMiddleware/express.d.ts +63 -0
  9. package/dist/src/expressMiddleware/express.d.ts.map +1 -0
  10. package/dist/src/expressMiddleware/express.js +125 -0
  11. package/dist/src/expressMiddleware/express.js.map +1 -0
  12. package/dist/src/expressMiddleware/index.d.ts +14 -0
  13. package/dist/src/expressMiddleware/index.d.ts.map +1 -0
  14. package/dist/src/expressMiddleware/index.js +17 -0
  15. package/dist/src/expressMiddleware/index.js.map +1 -0
  16. package/dist/src/expressMiddleware/types.d.ts +31 -0
  17. package/dist/src/expressMiddleware/types.d.ts.map +1 -0
  18. package/dist/src/expressMiddleware/types.js +3 -0
  19. package/dist/src/expressMiddleware/types.js.map +1 -0
  20. package/dist/src/index.d.ts +2 -0
  21. package/dist/src/index.d.ts.map +1 -0
  22. package/dist/src/index.js +3 -0
  23. package/dist/src/index.js.map +1 -0
  24. package/dist/src/internal/LitNodeClient/LitNodeClientInstance.d.ts +14 -0
  25. package/dist/src/internal/LitNodeClient/LitNodeClientInstance.d.ts.map +1 -0
  26. package/dist/src/internal/LitNodeClient/LitNodeClientInstance.js +67 -0
  27. package/dist/src/internal/LitNodeClient/LitNodeClientInstance.js.map +1 -0
  28. package/dist/src/internal/LitNodeClient/getLitNodeClient.d.ts +7 -0
  29. package/dist/src/internal/LitNodeClient/getLitNodeClient.d.ts.map +1 -0
  30. package/dist/src/internal/LitNodeClient/getLitNodeClient.js +25 -0
  31. package/dist/src/internal/LitNodeClient/getLitNodeClient.js.map +1 -0
  32. package/dist/src/jwt/accessors.d.ts +8 -0
  33. package/dist/src/jwt/accessors.d.ts.map +1 -0
  34. package/dist/src/jwt/accessors.js +15 -0
  35. package/dist/src/jwt/accessors.js.map +1 -0
  36. package/dist/src/jwt/core/create.d.ts +24 -0
  37. package/dist/src/jwt/core/create.d.ts.map +1 -0
  38. package/dist/src/jwt/core/create.js +95 -0
  39. package/dist/src/jwt/core/create.js.map +1 -0
  40. package/dist/src/jwt/core/isExpired.d.ts +9 -0
  41. package/dist/src/jwt/core/isExpired.d.ts.map +1 -0
  42. package/dist/src/jwt/core/isExpired.js +20 -0
  43. package/dist/src/jwt/core/isExpired.js.map +1 -0
  44. package/dist/src/jwt/core/utils/base64.d.ts +14 -0
  45. package/dist/src/jwt/core/utils/base64.d.ts.map +1 -0
  46. package/dist/src/jwt/core/utils/base64.js +54 -0
  47. package/dist/src/jwt/core/utils/base64.js.map +1 -0
  48. package/dist/src/jwt/core/utils/definedObject.d.ts +2 -0
  49. package/dist/src/jwt/core/utils/definedObject.d.ts.map +1 -0
  50. package/dist/src/jwt/core/utils/definedObject.js +7 -0
  51. package/dist/src/jwt/core/utils/definedObject.js.map +1 -0
  52. package/dist/src/jwt/core/utils/index.d.ts +5 -0
  53. package/dist/src/jwt/core/utils/index.d.ts.map +1 -0
  54. package/dist/src/jwt/core/utils/index.js +12 -0
  55. package/dist/src/jwt/core/utils/index.js.map +1 -0
  56. package/dist/src/jwt/core/utils/processJWTSignature.d.ts +8 -0
  57. package/dist/src/jwt/core/utils/processJWTSignature.d.ts.map +1 -0
  58. package/dist/src/jwt/core/utils/processJWTSignature.js +14 -0
  59. package/dist/src/jwt/core/utils/processJWTSignature.js.map +1 -0
  60. package/dist/src/jwt/core/utils/splitJWT.d.ts +11 -0
  61. package/dist/src/jwt/core/utils/splitJWT.d.ts.map +1 -0
  62. package/dist/src/jwt/core/utils/splitJWT.js +21 -0
  63. package/dist/src/jwt/core/utils/splitJWT.js.map +1 -0
  64. package/dist/src/jwt/core/utils/validateJWTTime.d.ts +12 -0
  65. package/dist/src/jwt/core/utils/validateJWTTime.d.ts.map +1 -0
  66. package/dist/src/jwt/core/utils/validateJWTTime.js +24 -0
  67. package/dist/src/jwt/core/utils/validateJWTTime.js.map +1 -0
  68. package/dist/src/jwt/core/validate.d.ts +29 -0
  69. package/dist/src/jwt/core/validate.d.ts.map +1 -0
  70. package/dist/src/jwt/core/validate.js +143 -0
  71. package/dist/src/jwt/core/validate.js.map +1 -0
  72. package/dist/src/jwt/index.d.ts +21 -0
  73. package/dist/src/jwt/index.d.ts.map +1 -0
  74. package/dist/src/jwt/index.js +32 -0
  75. package/dist/src/jwt/index.js.map +1 -0
  76. package/dist/src/jwt/typeGuards.d.ts +14 -0
  77. package/dist/src/jwt/typeGuards.d.ts.map +1 -0
  78. package/dist/src/jwt/typeGuards.js +32 -0
  79. package/dist/src/jwt/typeGuards.js.map +1 -0
  80. package/dist/src/jwt/types.d.ts +82 -0
  81. package/dist/src/jwt/types.d.ts.map +1 -0
  82. package/dist/src/jwt/types.js +3 -0
  83. package/dist/src/jwt/types.js.map +1 -0
  84. package/dist/src/toolClient/constants.d.ts +2 -0
  85. package/dist/src/toolClient/constants.d.ts.map +1 -0
  86. package/dist/src/toolClient/constants.js +5 -0
  87. package/dist/src/toolClient/constants.js.map +1 -0
  88. package/dist/src/toolClient/execute/generateVincentToolSessionSigs.d.ts +8 -0
  89. package/dist/src/toolClient/execute/generateVincentToolSessionSigs.d.ts.map +1 -0
  90. package/dist/src/toolClient/execute/generateVincentToolSessionSigs.js +33 -0
  91. package/dist/src/toolClient/execute/generateVincentToolSessionSigs.js.map +1 -0
  92. package/dist/src/toolClient/execute/resultCreators.d.ts +71 -0
  93. package/dist/src/toolClient/execute/resultCreators.d.ts.map +1 -0
  94. package/dist/src/toolClient/execute/resultCreators.js +57 -0
  95. package/dist/src/toolClient/execute/resultCreators.js.map +1 -0
  96. package/dist/src/toolClient/execute/types.d.ts +38 -0
  97. package/dist/src/toolClient/execute/types.d.ts.map +1 -0
  98. package/dist/src/toolClient/execute/types.js +4 -0
  99. package/dist/src/toolClient/execute/types.js.map +1 -0
  100. package/dist/src/toolClient/index.d.ts +19 -0
  101. package/dist/src/toolClient/index.d.ts.map +1 -0
  102. package/dist/src/toolClient/index.js +26 -0
  103. package/dist/src/toolClient/index.js.map +1 -0
  104. package/dist/src/toolClient/precheck/resultCreators.d.ts +71 -0
  105. package/dist/src/toolClient/precheck/resultCreators.d.ts.map +1 -0
  106. package/dist/src/toolClient/precheck/resultCreators.js +57 -0
  107. package/dist/src/toolClient/precheck/resultCreators.js.map +1 -0
  108. package/dist/src/toolClient/precheck/runPolicyPrechecks.d.ts +14 -0
  109. package/dist/src/toolClient/precheck/runPolicyPrechecks.d.ts.map +1 -0
  110. package/dist/src/toolClient/precheck/runPolicyPrechecks.js +98 -0
  111. package/dist/src/toolClient/precheck/runPolicyPrechecks.js.map +1 -0
  112. package/dist/src/toolClient/precheck/types.d.ts +82 -0
  113. package/dist/src/toolClient/precheck/types.d.ts.map +1 -0
  114. package/dist/src/toolClient/precheck/types.js +4 -0
  115. package/dist/src/toolClient/precheck/types.js.map +1 -0
  116. package/dist/src/toolClient/typeGuards.d.ts +28 -0
  117. package/dist/src/toolClient/typeGuards.d.ts.map +1 -0
  118. package/dist/src/toolClient/typeGuards.js +67 -0
  119. package/dist/src/toolClient/typeGuards.js.map +1 -0
  120. package/dist/src/toolClient/types.d.ts +50 -0
  121. package/dist/src/toolClient/types.d.ts.map +1 -0
  122. package/dist/src/toolClient/types.js +4 -0
  123. package/dist/src/toolClient/types.js.map +1 -0
  124. package/dist/src/toolClient/vincentToolClient.d.ts +76 -0
  125. package/dist/src/toolClient/vincentToolClient.d.ts.map +1 -0
  126. package/dist/src/toolClient/vincentToolClient.js +285 -0
  127. package/dist/src/toolClient/vincentToolClient.js.map +1 -0
  128. package/dist/src/type-inference-verification/tool-client-inference.d.ts +3 -0
  129. package/dist/src/type-inference-verification/tool-client-inference.d.ts.map +1 -0
  130. package/dist/src/type-inference-verification/tool-client-inference.js +220 -0
  131. package/dist/src/type-inference-verification/tool-client-inference.js.map +1 -0
  132. package/dist/src/utils/delegation.d.ts +7 -0
  133. package/dist/src/utils/delegation.d.ts.map +1 -0
  134. package/dist/src/utils/delegation.js +18 -0
  135. package/dist/src/utils/delegation.js.map +1 -0
  136. package/dist/src/utils/index.d.ts +3 -0
  137. package/dist/src/utils/index.d.ts.map +1 -0
  138. package/dist/src/utils/index.js +6 -0
  139. package/dist/src/utils/index.js.map +1 -0
  140. package/dist/src/utils/typedocRoot.d.ts +7 -0
  141. package/dist/src/utils/typedocRoot.d.ts.map +1 -0
  142. package/dist/src/utils/typedocRoot.js +13 -0
  143. package/dist/src/utils/typedocRoot.js.map +1 -0
  144. package/dist/src/utils/types.d.ts +15 -0
  145. package/dist/src/utils/types.d.ts.map +1 -0
  146. package/dist/src/utils/types.js +3 -0
  147. package/dist/src/utils/types.js.map +1 -0
  148. package/dist/src/webAuthClient/app.d.ts +7 -0
  149. package/dist/src/webAuthClient/app.d.ts.map +1 -0
  150. package/dist/src/webAuthClient/app.js +39 -0
  151. package/dist/src/webAuthClient/app.js.map +1 -0
  152. package/dist/src/webAuthClient/constants.d.ts +3 -0
  153. package/dist/src/webAuthClient/constants.d.ts.map +1 -0
  154. package/dist/src/webAuthClient/constants.js +6 -0
  155. package/dist/src/webAuthClient/constants.js.map +1 -0
  156. package/dist/src/webAuthClient/index.d.ts +13 -0
  157. package/dist/src/webAuthClient/index.d.ts.map +1 -0
  158. package/dist/src/webAuthClient/index.js +15 -0
  159. package/dist/src/webAuthClient/index.js.map +1 -0
  160. package/dist/src/webAuthClient/internal/index.d.ts +3 -0
  161. package/dist/src/webAuthClient/internal/index.d.ts.map +1 -0
  162. package/dist/src/webAuthClient/internal/index.js +7 -0
  163. package/dist/src/webAuthClient/internal/index.js.map +1 -0
  164. package/dist/src/webAuthClient/internal/uriHelpers.d.ts +15 -0
  165. package/dist/src/webAuthClient/internal/uriHelpers.d.ts.map +1 -0
  166. package/dist/src/webAuthClient/internal/uriHelpers.js +38 -0
  167. package/dist/src/webAuthClient/internal/uriHelpers.js.map +1 -0
  168. package/dist/src/webAuthClient/types.d.ts +109 -0
  169. package/dist/src/webAuthClient/types.d.ts.map +1 -0
  170. package/dist/src/webAuthClient/types.js +3 -0
  171. package/dist/src/webAuthClient/types.js.map +1 -0
  172. package/package.json +82 -0
@@ -0,0 +1,143 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.verify = verify;
4
+ exports.decode = decode;
5
+ const tslib_1 = require("tslib");
6
+ const secp256k1 = tslib_1.__importStar(require("@noble/secp256k1"));
7
+ const didJWT = tslib_1.__importStar(require("did-jwt"));
8
+ const did_jwt_1 = require("did-jwt");
9
+ const ethers_1 = require("ethers");
10
+ const utils_1 = require("ethers/lib/utils");
11
+ const typeGuards_1 = require("../typeGuards");
12
+ const isExpired_1 = require("./isExpired");
13
+ const utils_2 = require("./utils");
14
+ /**
15
+ * Decodes and verifies an {@link VincentJWT} token in string form
16
+ *
17
+ * This function returns the decoded {@link VincentJWT} object only if:
18
+ * 1. The JWT signature is valid
19
+ * 2. The JWT is not expired
20
+ * 3. All time claims (nbf, iat) are valid
21
+ * 4. The JWT has an audience claim that includes the expected audience
22
+ *
23
+ * @param params
24
+ * @param jwt - The JWT string to verify
25
+ * @param expectedAudience - String that should be in the audience claim(s)
26
+ * @param requiredAppId - The appId that should be in the payload of the JWT. If app is not defined, or app.id is different, this method will throw.
27
+ *
28
+ * @returns {VincentJWT} The decoded VincentJWT object if it was verified successfully
29
+ *
30
+ * @category API
31
+ * @inline
32
+ * @expand
33
+ * @function
34
+ *
35
+ * @example
36
+ * ```typescript
37
+ * import { verify } from '@lit-protocol/vincent-app-sdk/jwt';
38
+ *
39
+ * try {
40
+ * const decodedAndVerifiedVincentJWT = verify({ jwt, expectedAudience: 'https://myapp.com', requiredAppId: 555 });
41
+ * } catch(e) {
42
+ * // Handle invalid/expired JWT casew
43
+ * }
44
+ * ```
45
+ */
46
+ function verify({ jwt, expectedAudience, requiredAppId, }) {
47
+ if (!expectedAudience) {
48
+ throw new Error(`You must provide an expectedAudience`);
49
+ }
50
+ const decoded = decode({ jwt, requiredAppId });
51
+ const { aud, exp, pkp } = decoded.payload;
52
+ if (!exp) {
53
+ throw new Error(`${did_jwt_1.JWT_ERROR.INVALID_JWT}: JWT does not contain an expiration claim (exp)`);
54
+ }
55
+ const expired = (0, isExpired_1.isExpired)(decoded);
56
+ if (expired) {
57
+ throw new Error(`${did_jwt_1.JWT_ERROR.INVALID_JWT}: JWT expired at ${exp}`);
58
+ }
59
+ (0, utils_2.validateJWTTime)(decoded.payload, Math.floor(Date.now() / 1000));
60
+ // Always validate audience - reject if no audience claim or expected audience isn't included
61
+ if (!aud) {
62
+ throw new Error(`${did_jwt_1.JWT_ERROR.INVALID_JWT}: JWT does not contain an audience claim (aud)`);
63
+ }
64
+ const audiences = Array.isArray(aud) ? aud : [aud];
65
+ if (!audiences.includes(expectedAudience)) {
66
+ throw new Error(`${did_jwt_1.JWT_ERROR.INVALID_AUDIENCE}: Expected audience ${expectedAudience} not found in aud claim`);
67
+ }
68
+ try {
69
+ const { signedData, signature } = (0, utils_2.splitJWT)(jwt);
70
+ // Process signature from base64url to binary
71
+ const signatureBytes = (0, utils_2.processJWTSignature)(signature);
72
+ // Extract r and s values from the signature
73
+ const r = signatureBytes.slice(0, 32);
74
+ const s = signatureBytes.slice(32, 64);
75
+ const publicKeyBytes = (0, utils_1.arrayify)(pkp.publicKey);
76
+ // PKPEthersWallet.signMessage() adds Ethereum prefix, so we need to add it here too
77
+ const ethPrefixedMessage = '\x19Ethereum Signed Message:\n' + signedData.length + signedData;
78
+ const messageHash = ethers_1.ethers.utils.keccak256((0, utils_1.toUtf8Bytes)(ethPrefixedMessage));
79
+ const messageHashBytes = (0, utils_1.arrayify)(messageHash);
80
+ const signatureForSecp = new Uint8Array([...r, ...s]);
81
+ // Verify the signature against the public key
82
+ const isVerified = secp256k1.verify(signatureForSecp, messageHashBytes, publicKeyBytes);
83
+ if (!isVerified) {
84
+ throw new Error(`Signature verify() did not pass for ${signature}`);
85
+ }
86
+ return decoded;
87
+ }
88
+ catch (error) {
89
+ throw new Error(`${did_jwt_1.JWT_ERROR.INVALID_SIGNATURE}: Invalid signature: ${error.message}`);
90
+ }
91
+ }
92
+ /** Decodes a Vincent JWT in string form and returns an {@link VincentJWT} decoded object for your use
93
+ *
94
+ * @param jwt - The jwt in string form. It will be decoded and checked to be sure it is not malformed.
95
+ * @param requiredAppId - The appId that should be in the payload of the JWT. If app is not defined, or app.id is different, this method will throw.
96
+ *
97
+ * <div class="box info-box">
98
+ * <p class="box-title info-box-title">
99
+ * <span class="box-icon info-icon">Info</span> Note
100
+ * </p>
101
+ * This method only <i><b>decodes</b></i> the JWT_ -- you still need to {@link verify} the JWT to be sure it is valid!
102
+ * If the JWT is expired, you need to use a {@link webAuthClient.WebAuthClient | WebAuthClient} to get a new JWT.
103
+ *
104
+ * See {@link webAuthClient.getWebAuthClient | getWebAuthClient}
105
+ *
106
+ * </div>
107
+ * @inline
108
+ * @expand
109
+ * @function
110
+ * @category API
111
+ *
112
+ * @example
113
+ * ```typescript
114
+ * import { decode, isExpired } from '@lit-protocol/vincent-app-sdk/jwt';
115
+ *
116
+ * const decodedVincentJWT = decode({ jwt, requiredAppId: 555 });
117
+ * const isJWTExpired = isExpired(decodedVincentJWT);
118
+ *
119
+ * if(!isJWTExpired) {
120
+ * // User is logged in
121
+ * // You still need to verify the JWT!
122
+ * } else {
123
+ * // User needs to get a new JWT
124
+ * webAuthClient.redirectToDelegationAuthPage({redirectUri: window.location.href });
125
+ * }
126
+ *
127
+ * ```
128
+ * */
129
+ function decode({ jwt, requiredAppId, }) {
130
+ const decodedJwt = didJWT.decodeJWT(jwt);
131
+ (0, typeGuards_1.assertIsVincentJWT)(decodedJwt);
132
+ if (requiredAppId) {
133
+ if (!(0, typeGuards_1.isAppSpecificJWT)(decodedJwt)) {
134
+ throw new Error(`${did_jwt_1.JWT_ERROR.INVALID_JWT}: JWT is not app specific; cannot verify requiredAppId`);
135
+ }
136
+ const { app } = decodedJwt.payload;
137
+ if (requiredAppId != app.id) { // TODO temp loose equality to support dashboard not yet migrated to use this as numbers
138
+ throw new Error(`${did_jwt_1.JWT_ERROR.INVALID_JWT}: appId in JWT does not match requiredAppId. Expected ${requiredAppId}, got ${app.id} `);
139
+ }
140
+ }
141
+ return decodedJwt;
142
+ }
143
+ //# sourceMappingURL=validate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validate.js","sourceRoot":"","sources":["../../../../src/jwt/core/validate.ts"],"names":[],"mappings":";;AAyEA,wBAwEC;AA+DD,wBA2BC;;AA3OD,oEAA8C;AAC9C,wDAAkC;AAClC,qCAAoC;AACpC,mCAAgC;AAChC,4CAAyD;AAIzD,8CAAqE;AACrE,2CAAwC;AACxC,mCAAyE;AA+BzE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,SAAgB,MAAM,CAAC,EACrB,GAAG,EACH,gBAAgB,EAChB,aAAa,GAKd;IACC,IAAI,CAAC,gBAAgB,EAAE,CAAC;QACtB,MAAM,IAAI,KAAK,CAAC,sCAAsC,CAAC,CAAC;IAC1D,CAAC;IAED,MAAM,OAAO,GAAG,MAAM,CAAC,EAAE,GAAG,EAAE,aAAa,EAAE,CAAC,CAAC;IAC/C,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC,OAAO,CAAC;IAE1C,IAAI,CAAC,GAAG,EAAE,CAAC;QACT,MAAM,IAAI,KAAK,CAAC,GAAG,mBAAS,CAAC,WAAW,kDAAkD,CAAC,CAAC;IAC9F,CAAC;IAED,MAAM,OAAO,GAAG,IAAA,qBAAS,EAAC,OAAO,CAAC,CAAC;IACnC,IAAI,OAAO,EAAE,CAAC;QACZ,MAAM,IAAI,KAAK,CAAC,GAAG,mBAAS,CAAC,WAAW,oBAAoB,GAAG,EAAE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IAED,OAAO,UAAU,CAAC;AACpB,CAAC"}
@@ -0,0 +1,21 @@
1
+ /** The `jwt` module provides helper methods that allow you to decode and validate Vincent-specific JWTs.
2
+ *
3
+ * Vincent JWTs are composed using the `did-jwt` library, but have a custom `alg` of `ES256K`, and are signed using
4
+ * PKP ethereum keys.
5
+ *
6
+ * Vincent JWTs are issued by the Vincent Dashboard when a user provides delegation permission for your app to their agent PKP.
7
+ * They are passed to your web app using a redirectUri which you configure on your app.
8
+ *
9
+ * The methods exported by the `jwt` module are low-level - you probably will just want to use {@link webAuthClient.getWebAuthClient | getWebAuthClient} to get
10
+ * a {@link webAuthClient.WebAuthClient | WebAuthClient} which handles the redirect process, parsing the JWT from the URL, and verifying it for you.
11
+ *
12
+ * @packageDocumentation
13
+ *
14
+ */
15
+ export { create } from './core/create';
16
+ export { isExpired } from './core/isExpired';
17
+ export { decode, verify } from './core/validate';
18
+ export { isGeneralJWT, isAppSpecificJWT, assertIsVincentJWT } from './typeGuards';
19
+ export type { JWTConfig, VincentJWT, VincentJWTAppSpecific } from './types';
20
+ export { getAppInfo, getPKPInfo } from './accessors';
21
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/jwt/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACvC,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAElF,YAAY,EAAE,SAAS,EAAE,UAAU,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAC5E,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC"}
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getPKPInfo = exports.getAppInfo = exports.assertIsVincentJWT = exports.isAppSpecificJWT = exports.isGeneralJWT = exports.verify = exports.decode = exports.isExpired = exports.create = void 0;
4
+ /** The `jwt` module provides helper methods that allow you to decode and validate Vincent-specific JWTs.
5
+ *
6
+ * Vincent JWTs are composed using the `did-jwt` library, but have a custom `alg` of `ES256K`, and are signed using
7
+ * PKP ethereum keys.
8
+ *
9
+ * Vincent JWTs are issued by the Vincent Dashboard when a user provides delegation permission for your app to their agent PKP.
10
+ * They are passed to your web app using a redirectUri which you configure on your app.
11
+ *
12
+ * The methods exported by the `jwt` module are low-level - you probably will just want to use {@link webAuthClient.getWebAuthClient | getWebAuthClient} to get
13
+ * a {@link webAuthClient.WebAuthClient | WebAuthClient} which handles the redirect process, parsing the JWT from the URL, and verifying it for you.
14
+ *
15
+ * @packageDocumentation
16
+ *
17
+ */
18
+ var create_1 = require("./core/create");
19
+ Object.defineProperty(exports, "create", { enumerable: true, get: function () { return create_1.create; } });
20
+ var isExpired_1 = require("./core/isExpired");
21
+ Object.defineProperty(exports, "isExpired", { enumerable: true, get: function () { return isExpired_1.isExpired; } });
22
+ var validate_1 = require("./core/validate");
23
+ Object.defineProperty(exports, "decode", { enumerable: true, get: function () { return validate_1.decode; } });
24
+ Object.defineProperty(exports, "verify", { enumerable: true, get: function () { return validate_1.verify; } });
25
+ var typeGuards_1 = require("./typeGuards");
26
+ Object.defineProperty(exports, "isGeneralJWT", { enumerable: true, get: function () { return typeGuards_1.isGeneralJWT; } });
27
+ Object.defineProperty(exports, "isAppSpecificJWT", { enumerable: true, get: function () { return typeGuards_1.isAppSpecificJWT; } });
28
+ Object.defineProperty(exports, "assertIsVincentJWT", { enumerable: true, get: function () { return typeGuards_1.assertIsVincentJWT; } });
29
+ var accessors_1 = require("./accessors");
30
+ Object.defineProperty(exports, "getAppInfo", { enumerable: true, get: function () { return accessors_1.getAppInfo; } });
31
+ Object.defineProperty(exports, "getPKPInfo", { enumerable: true, get: function () { return accessors_1.getPKPInfo; } });
32
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/jwt/index.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;GAaG;AACH,wCAAuC;AAA9B,gGAAA,MAAM,OAAA;AACf,8CAA6C;AAApC,sGAAA,SAAS,OAAA;AAClB,4CAAiD;AAAxC,kGAAA,MAAM,OAAA;AAAE,kGAAA,MAAM,OAAA;AACvB,2CAAkF;AAAzE,0GAAA,YAAY,OAAA;AAAE,8GAAA,gBAAgB,OAAA;AAAE,gHAAA,kBAAkB,OAAA;AAG3D,yCAAqD;AAA5C,uGAAA,UAAU,OAAA;AAAE,uGAAA,UAAU,OAAA"}
@@ -0,0 +1,14 @@
1
+ import type { JWTDecoded, VincentJWT, VincentJWTAppSpecific } from './types';
2
+ /** Use this typeguard function to identify if the JWT is appId specific and make subsequent type-safe
3
+ * references into the payload of the JWT
4
+ */
5
+ export declare function isAppSpecificJWT(decodedJWT: VincentJWT): decodedJWT is VincentJWTAppSpecific;
6
+ /** Use this typeguard function to identify if the JWT is a general authentication JWT that has no specific app target */
7
+ export declare function isGeneralJWT(decodedJWT: VincentJWT): decodedJWT is VincentJWT;
8
+ /** This assert function is used internally to throw if decoding a JWT that is expected to be a VincentJWT gives a malformed response.
9
+ * You probably don't need it -- use `decode()` and `verify()`
10
+ *
11
+ * @hidden
12
+ */
13
+ export declare function assertIsVincentJWT(decodedJWT: JWTDecoded): asserts decodedJWT is VincentJWT | VincentJWTAppSpecific;
14
+ //# sourceMappingURL=typeGuards.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"typeGuards.d.ts","sourceRoot":"","sources":["../../../src/jwt/typeGuards.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAI7E;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,UAAU,GAAG,UAAU,IAAI,qBAAqB,CAE5F;AAED,yHAAyH;AACzH,wBAAgB,YAAY,CAAC,UAAU,EAAE,UAAU,GAAG,UAAU,IAAI,UAAU,CAE7E;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAChC,UAAU,EAAE,UAAU,GACrB,OAAO,CAAC,UAAU,IAAI,UAAU,GAAG,qBAAqB,CAU1D"}
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isAppSpecificJWT = isAppSpecificJWT;
4
+ exports.isGeneralJWT = isGeneralJWT;
5
+ exports.assertIsVincentJWT = assertIsVincentJWT;
6
+ const did_jwt_1 = require("did-jwt");
7
+ const index_1 = require("./core/utils/index");
8
+ /** Use this typeguard function to identify if the JWT is appId specific and make subsequent type-safe
9
+ * references into the payload of the JWT
10
+ */
11
+ function isAppSpecificJWT(decodedJWT) {
12
+ return decodedJWT.payload.app && decodedJWT.payload.app.id;
13
+ }
14
+ /** Use this typeguard function to identify if the JWT is a general authentication JWT that has no specific app target */
15
+ function isGeneralJWT(decodedJWT) {
16
+ return !isAppSpecificJWT(decodedJWT);
17
+ }
18
+ /** This assert function is used internally to throw if decoding a JWT that is expected to be a VincentJWT gives a malformed response.
19
+ * You probably don't need it -- use `decode()` and `verify()`
20
+ *
21
+ * @hidden
22
+ */
23
+ function assertIsVincentJWT(decodedJWT) {
24
+ const { authentication, pkp } = decodedJWT.payload;
25
+ if (!(0, index_1.isDefinedObject)(authentication)) {
26
+ throw new Error(`${did_jwt_1.JWT_ERROR.INVALID_JWT}: Missing "authentication" field in JWT payload.`);
27
+ }
28
+ if (!(0, index_1.isDefinedObject)(pkp)) {
29
+ throw new Error(`${did_jwt_1.JWT_ERROR.INVALID_JWT}: Missing "pkp" field in JWT payload.`);
30
+ }
31
+ }
32
+ //# sourceMappingURL=typeGuards.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"typeGuards.js","sourceRoot":"","sources":["../../../src/jwt/typeGuards.ts"],"names":[],"mappings":";;AASA,4CAEC;AAGD,oCAEC;AAOD,gDAYC;AAnCD,qCAAoC;AAIpC,8CAAqD;AAErD;;GAEG;AACH,SAAgB,gBAAgB,CAAC,UAAsB;IACrD,OAAO,UAAU,CAAC,OAAO,CAAC,GAAG,IAAI,UAAU,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC;AAC7D,CAAC;AAED,yHAAyH;AACzH,SAAgB,YAAY,CAAC,UAAsB;IACjD,OAAO,CAAC,gBAAgB,CAAC,UAAU,CAAC,CAAC;AACvC,CAAC;AAED;;;;GAIG;AACH,SAAgB,kBAAkB,CAChC,UAAsB;IAEtB,MAAM,EAAE,cAAc,EAAE,GAAG,EAAE,GAAG,UAAU,CAAC,OAAO,CAAC;IAEnD,IAAI,CAAC,IAAA,uBAAe,EAAC,cAAc,CAAC,EAAE,CAAC;QACrC,MAAM,IAAI,KAAK,CAAC,GAAG,mBAAS,CAAC,WAAW,kDAAkD,CAAC,CAAC;IAC9F,CAAC;IAED,IAAI,CAAC,IAAA,uBAAe,EAAC,GAAG,CAAC,EAAE,CAAC;QAC1B,MAAM,IAAI,KAAK,CAAC,GAAG,mBAAS,CAAC,WAAW,uCAAuC,CAAC,CAAC;IACnF,CAAC;AACH,CAAC"}
@@ -0,0 +1,82 @@
1
+ import type { JWTHeader, JWTPayload } from 'did-jwt';
2
+ import type { PKPEthersWallet } from '@lit-protocol/pkp-ethers';
3
+ import type { IRelayPKP } from '@lit-protocol/types';
4
+ export interface JWTDecoded {
5
+ header: JWTHeader;
6
+ payload: JWTPayload;
7
+ signature: string;
8
+ data: string;
9
+ }
10
+ /**
11
+ * Configuration interface for creating a JWT (JSON Web Token) signed by a PKP wallet.
12
+ * Vincent App developers will likely never need this function, as the provider of the JWT is the Vincent delegation auth page frontend
13
+ *
14
+ * @interface JWTConfig
15
+ * @hidden
16
+ * @property pkpWallet - The PKP Ethers wallet instance used for signing the JWT
17
+ * @property pkp - The PKP object
18
+ * @property payload - Custom claims to include in the JWT payload
19
+ * @property expiresInMinutes - Token expiration time in minutes from current time
20
+ * @property [app] - The app / appversion that the JWT is limited to (if it is at all)
21
+ * @property audience - The domain(s) this token is intended for (aud claim)
22
+ * @property authentication - The authentication method used to generate the JWT.
23
+ *
24
+ */
25
+ export interface JWTConfig {
26
+ pkpWallet: PKPEthersWallet;
27
+ pkp: IRelayPKP;
28
+ payload: Record<string, unknown>;
29
+ expiresInMinutes: number;
30
+ audience: string | string[];
31
+ app?: {
32
+ id: number;
33
+ version: number;
34
+ };
35
+ authentication: {
36
+ type: string;
37
+ value?: string;
38
+ };
39
+ }
40
+ /**
41
+ * Extended payload interface for Vincent-specific JWTs.
42
+ *
43
+ * @interface BaseVincentJWTPayload
44
+ * @extends {JWTPayload} Extends the JWTPayload type from `did-jwt` with Vincent-specific properties
45
+ *
46
+ * @property pkp - The PKP details associated with the JWT.
47
+ * @property authentication - The authentication method that was used to authenticate with the PKP that generated the JWT.
48
+ *
49
+ * @category Interfaces
50
+ */
51
+ export interface BaseVincentJWTPayload extends JWTPayload {
52
+ pkp: IRelayPKP;
53
+ authentication: {
54
+ type: string;
55
+ value?: string;
56
+ };
57
+ }
58
+ /**
59
+ * Interface representing a decoded Vincent JWT
60
+ *
61
+ * @interface VincentJWT
62
+ * @property { BaseVincentJWTPayload } payload - The payload of the JWT
63
+ *
64
+ * @category Interfaces
65
+ */
66
+ export interface VincentJWT extends JWTDecoded {
67
+ payload: BaseVincentJWTPayload;
68
+ }
69
+ /** App-specific Vincent JWT payloads are used to authenticate with a specific app @ a specific version */
70
+ interface VincentJWTAppSpecificPayload extends BaseVincentJWTPayload {
71
+ app: {
72
+ id: number;
73
+ version: number;
74
+ };
75
+ }
76
+ /** VincentJWTAppSpecific type JWTs are used to signal authorization from a user to use a specific app / appVersion
77
+ */
78
+ export interface VincentJWTAppSpecific extends VincentJWT {
79
+ payload: VincentJWTAppSpecificPayload;
80
+ }
81
+ export {};
82
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/jwt/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAErD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAGrD,MAAM,WAAW,UAAU;IACzB,MAAM,EAAE,SAAS,CAAC;IAClB,OAAO,EAAE,UAAU,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;;;;;;;;;;;;;GAcG;AACH,MAAM,WAAW,SAAS;IACxB,SAAS,EAAE,eAAe,CAAC;IAC3B,GAAG,EAAE,SAAS,CAAC;IACf,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACjC,gBAAgB,EAAE,MAAM,CAAC;IACzB,QAAQ,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAC5B,GAAG,CAAC,EAAE;QACJ,EAAE,EAAE,MAAM,CAAC;QACX,OAAO,EAAE,MAAM,CAAC;KACjB,CAAC;IACF,cAAc,EAAE;QACd,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC;CACH;AAED;;;;;;;;;;GAUG;AACH,MAAM,WAAW,qBAAsB,SAAQ,UAAU;IACvD,GAAG,EAAE,SAAS,CAAC;IACf,cAAc,EAAE;QACd,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC;CACH;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,UAAW,SAAQ,UAAU;IAC5C,OAAO,EAAE,qBAAqB,CAAC;CAChC;AAED,0GAA0G;AAC1G,UAAU,4BAA6B,SAAQ,qBAAqB;IAClE,GAAG,EAAE;QACH,EAAE,EAAE,MAAM,CAAC;QACX,OAAO,EAAE,MAAM,CAAC;KACjB,CAAC;CACH;AAED;GACG;AACH,MAAM,WAAW,qBAAsB,SAAQ,UAAU;IACvD,OAAO,EAAE,4BAA4B,CAAC;CACvC"}
@@ -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/jwt/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export declare const VINCENT_TOOL_API_VERSION = "2.0.0";
2
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/toolClient/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,wBAAwB,UAAU,CAAC"}
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.VINCENT_TOOL_API_VERSION = void 0;
4
+ exports.VINCENT_TOOL_API_VERSION = '2.0.0';
5
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/toolClient/constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,wBAAwB,GAAG,OAAO,CAAC"}
@@ -0,0 +1,8 @@
1
+ import type { ethers } from 'ethers';
2
+ import type { LitNodeClient } from '@lit-protocol/lit-node-client';
3
+ /** @hidden */
4
+ export declare const generateVincentToolSessionSigs: ({ litNodeClient, ethersSigner, }: {
5
+ litNodeClient: LitNodeClient;
6
+ ethersSigner: ethers.Signer;
7
+ }) => Promise<import("@lit-protocol/types").SessionSigsMap>;
8
+ //# sourceMappingURL=generateVincentToolSessionSigs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generateVincentToolSessionSigs.d.ts","sourceRoot":"","sources":["../../../../src/toolClient/execute/generateVincentToolSessionSigs.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAErC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAUnE,cAAc;AACd,eAAO,MAAM,8BAA8B,GAAU,kCAGlD;IACD,aAAa,EAAE,aAAa,CAAC;IAC7B,YAAY,EAAE,MAAM,CAAC,MAAM,CAAC;CAC7B,0DAyBA,CAAC"}
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ // src/toolClient/execute/generateVincentToolSessionSigs.ts
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.generateVincentToolSessionSigs = void 0;
5
+ const auth_helpers_1 = require("@lit-protocol/auth-helpers");
6
+ const constants_1 = require("@lit-protocol/constants");
7
+ /** @hidden */
8
+ const generateVincentToolSessionSigs = async ({ litNodeClient, ethersSigner, }) => {
9
+ return litNodeClient.getSessionSigs({
10
+ chain: 'ethereum',
11
+ resourceAbilityRequests: [
12
+ { resource: new auth_helpers_1.LitPKPResource('*'), ability: constants_1.LIT_ABILITY.PKPSigning },
13
+ { resource: new auth_helpers_1.LitActionResource('*'), ability: constants_1.LIT_ABILITY.LitActionExecution },
14
+ ],
15
+ authNeededCallback: async ({ resourceAbilityRequests, uri }) => {
16
+ const [walletAddress, nonce] = await Promise.all([
17
+ ethersSigner.getAddress(),
18
+ litNodeClient.getLatestBlockhash(),
19
+ ]);
20
+ const toSign = await (0, auth_helpers_1.createSiweMessageWithRecaps)({
21
+ uri: uri || 'http://localhost:3000',
22
+ expiration: new Date(Date.now() + 1000 * 60 * 10).toISOString(),
23
+ resources: resourceAbilityRequests || [],
24
+ walletAddress,
25
+ nonce,
26
+ litNodeClient,
27
+ });
28
+ return await (0, auth_helpers_1.generateAuthSig)({ signer: ethersSigner, toSign });
29
+ },
30
+ });
31
+ };
32
+ exports.generateVincentToolSessionSigs = generateVincentToolSessionSigs;
33
+ //# sourceMappingURL=generateVincentToolSessionSigs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generateVincentToolSessionSigs.js","sourceRoot":"","sources":["../../../../src/toolClient/execute/generateVincentToolSessionSigs.ts"],"names":[],"mappings":";AAAA,2DAA2D;;;AAM3D,6DAKoC;AACpC,uDAAsD;AAEtD,cAAc;AACP,MAAM,8BAA8B,GAAG,KAAK,EAAE,EACnD,aAAa,EACb,YAAY,GAIb,EAAE,EAAE;IACH,OAAO,aAAa,CAAC,cAAc,CAAC;QAClC,KAAK,EAAE,UAAU;QACjB,uBAAuB,EAAE;YACvB,EAAE,QAAQ,EAAE,IAAI,6BAAc,CAAC,GAAG,CAAC,EAAE,OAAO,EAAE,uBAAW,CAAC,UAAU,EAAE;YACtE,EAAE,QAAQ,EAAE,IAAI,gCAAiB,CAAC,GAAG,CAAC,EAAE,OAAO,EAAE,uBAAW,CAAC,kBAAkB,EAAE;SAClF;QACD,kBAAkB,EAAE,KAAK,EAAE,EAAE,uBAAuB,EAAE,GAAG,EAAE,EAAE,EAAE;YAC7D,MAAM,CAAC,aAAa,EAAE,KAAK,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;gBAC/C,YAAY,CAAC,UAAU,EAAE;gBACzB,aAAa,CAAC,kBAAkB,EAAE;aACnC,CAAC,CAAC;YAEH,MAAM,MAAM,GAAG,MAAM,IAAA,0CAA2B,EAAC;gBAC/C,GAAG,EAAE,GAAG,IAAI,uBAAuB;gBACnC,UAAU,EAAE,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,IAAI,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC,WAAW,EAAE;gBAC/D,SAAS,EAAE,uBAAuB,IAAI,EAAE;gBACxC,aAAa;gBACb,KAAK;gBACL,aAAa;aACd,CAAC,CAAC;YAEH,OAAO,MAAM,IAAA,8BAAe,EAAC,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,CAAC,CAAC;QACjE,CAAC;KACF,CAAC,CAAC;AACL,CAAC,CAAC;AA/BW,QAAA,8BAA8B,kCA+BzC"}
@@ -0,0 +1,71 @@
1
+ import type { z } from 'zod';
2
+ import type { BaseToolContext, PolicyEvaluationResultContext, SchemaValidationError } from '@lit-protocol/vincent-tool-sdk';
3
+ import type { ToolExecuteResponseFailure, ToolExecuteResponseFailureNoResult, ToolExecuteResponseSuccess, ToolExecuteResponseSuccessNoResult } from './types';
4
+ export declare function createAllowEvaluationResult<PoliciesByPackageName extends Record<string, any>>(evaluatedPolicies: Array<keyof PoliciesByPackageName>, allowedPolicies: {
5
+ [K in keyof PoliciesByPackageName]?: {
6
+ result: PoliciesByPackageName[K]['__schemaTypes'] extends {
7
+ evalAllowResultSchema: infer Schema;
8
+ } ? Schema extends z.ZodType ? z.infer<Schema> : never : never;
9
+ };
10
+ }): {
11
+ allow: true;
12
+ evaluatedPolicies: Array<keyof PoliciesByPackageName>;
13
+ allowedPolicies: {
14
+ [K in keyof PoliciesByPackageName]?: {
15
+ result: PoliciesByPackageName[K]['__schemaTypes'] extends {
16
+ evalAllowResultSchema: infer Schema;
17
+ } ? Schema extends z.ZodType ? z.infer<Schema> : never : never;
18
+ };
19
+ };
20
+ };
21
+ export declare function createDenyEvaluationResult<PoliciesByPackageName extends Record<string, any>>(evaluatedPolicies: Array<keyof PoliciesByPackageName>, allowedPolicies: {
22
+ [K in keyof PoliciesByPackageName]?: {
23
+ result: PoliciesByPackageName[K]['__schemaTypes'] extends {
24
+ evalAllowResultSchema: infer Schema;
25
+ } ? Schema extends z.ZodType ? z.infer<Schema> : never : never;
26
+ };
27
+ }, deniedPolicy: {
28
+ packageName: keyof PoliciesByPackageName;
29
+ runtimeError?: string;
30
+ schemaValidationError?: SchemaValidationError;
31
+ result: PoliciesByPackageName[keyof PoliciesByPackageName]['__schemaTypes'] extends {
32
+ evalDenyResultSchema: infer Schema;
33
+ } ? Schema extends z.ZodType ? z.infer<Schema> : undefined : undefined;
34
+ }): {
35
+ allow: false;
36
+ evaluatedPolicies: Array<keyof PoliciesByPackageName>;
37
+ allowedPolicies: {
38
+ [K in keyof PoliciesByPackageName]?: {
39
+ result: PoliciesByPackageName[K]['__schemaTypes'] extends {
40
+ evalAllowResultSchema: infer Schema;
41
+ } ? Schema extends z.ZodType ? z.infer<Schema> : never : never;
42
+ };
43
+ };
44
+ deniedPolicy: {
45
+ packageName: keyof PoliciesByPackageName;
46
+ runtimeError?: string;
47
+ schemaValidationError?: SchemaValidationError;
48
+ result: PoliciesByPackageName[keyof PoliciesByPackageName]['__schemaTypes'] extends {
49
+ evalDenyResultSchema: infer Schema;
50
+ } ? Schema extends z.ZodType ? z.infer<Schema> : undefined : undefined;
51
+ };
52
+ };
53
+ export declare function createToolExecuteResponseSuccess<Success, Policies extends Record<any, any>>(params: {
54
+ result: Success;
55
+ context?: BaseToolContext<PolicyEvaluationResultContext<Policies>>;
56
+ }): ToolExecuteResponseSuccess<Success, Policies>;
57
+ export declare function createToolExecuteResponseSuccessNoResult<Policies extends Record<any, any>>(params?: {
58
+ context?: BaseToolContext<PolicyEvaluationResultContext<Policies>>;
59
+ }): ToolExecuteResponseSuccessNoResult<Policies>;
60
+ export declare function createToolExecuteResponseFailure<Fail, Policies extends Record<any, any>>(params: {
61
+ result: Fail;
62
+ runtimeError?: string;
63
+ schemaValidationError?: SchemaValidationError;
64
+ context?: BaseToolContext<PolicyEvaluationResultContext<Policies>>;
65
+ }): ToolExecuteResponseFailure<Fail, Policies>;
66
+ export declare function createToolExecuteResponseFailureNoResult<Policies extends Record<any, any>>(params: {
67
+ runtimeError?: string;
68
+ schemaValidationError?: SchemaValidationError;
69
+ context?: BaseToolContext<PolicyEvaluationResultContext<Policies>>;
70
+ }): ToolExecuteResponseFailureNoResult<Policies>;
71
+ //# sourceMappingURL=resultCreators.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resultCreators.d.ts","sourceRoot":"","sources":["../../../../src/toolClient/exec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,CAAC,EAAE,eAAe,CAAC,6BAA6B,CAAC,QAAQ,CAAC,CAAC,CAAC;CACpE,GAAG,kCAAkC,CAAC,QAAQ,CAAC,CAQ/C"}
@@ -0,0 +1,57 @@
1
+ "use strict";
2
+ // src/toolClient/execute/resultCreators.ts
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.createAllowEvaluationResult = createAllowEvaluationResult;
5
+ exports.createDenyEvaluationResult = createDenyEvaluationResult;
6
+ exports.createToolExecuteResponseSuccess = createToolExecuteResponseSuccess;
7
+ exports.createToolExecuteResponseSuccessNoResult = createToolExecuteResponseSuccessNoResult;
8
+ exports.createToolExecuteResponseFailure = createToolExecuteResponseFailure;
9
+ exports.createToolExecuteResponseFailureNoResult = createToolExecuteResponseFailureNoResult;
10
+ function createAllowEvaluationResult(evaluatedPolicies, allowedPolicies) {
11
+ return {
12
+ allow: true,
13
+ evaluatedPolicies,
14
+ allowedPolicies,
15
+ };
16
+ }
17
+ function createDenyEvaluationResult(evaluatedPolicies, allowedPolicies, deniedPolicy) {
18
+ return {
19
+ allow: false,
20
+ evaluatedPolicies,
21
+ allowedPolicies,
22
+ deniedPolicy,
23
+ };
24
+ }
25
+ function createToolExecuteResponseSuccess(params) {
26
+ return {
27
+ success: true,
28
+ result: params.result,
29
+ context: params.context,
30
+ };
31
+ }
32
+ function createToolExecuteResponseSuccessNoResult(params) {
33
+ return {
34
+ success: true,
35
+ result: undefined,
36
+ context: params === null || params === void 0 ? void 0 : params.context,
37
+ };
38
+ }
39
+ function createToolExecuteResponseFailure(params) {
40
+ return {
41
+ success: false,
42
+ runtimeError: params.runtimeError,
43
+ schemaValidationError: params.schemaValidationError,
44
+ result: params.result,
45
+ context: params.context,
46
+ };
47
+ }
48
+ function createToolExecuteResponseFailureNoResult(params) {
49
+ return {
50
+ success: false,
51
+ runtimeError: params.runtimeError,
52
+ schemaValidationError: params.schemaValidationError,
53
+ result: undefined,
54
+ context: params.context,
55
+ };
56
+ }
57
+ //# sourceMappingURL=resultCreators.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resultCreators.js","sourceRoot":"","sources":["../../../../src/toolClient/execute/resultCreators.ts"],"names":[],"mappings":";AAAA,2CAA2C;;AAiB3C,kEAiCC;AAED,gEA0DC;AAED,4EAYC;AAED,4FAUC;AAED,4EAaC;AAED,4FAcC;AAtJD,SAAgB,2BAA2B,CACzC,iBAAqD,EACrD,eAUC;IAgBD,OAAO;QACL,KAAK,EAAE,IAAI;QACX,iBAAiB;QACjB,eAAe;KAChB,CAAC;AACJ,CAAC;AAED,SAAgB,0BAA0B,CACxC,iBAAqD,EACrD,eAUC,EACD,YAWC;IA4BD,OAAO;QACL,KAAK,EAAE,KAAK;QACZ,iBAAiB;QACjB,eAAe;QACf,YAAY;KACb,CAAC;AACJ,CAAC;AAED,SAAgB,gCAAgC,CAG9C,MAGD;IACC,OAAO;QACL,OAAO,EAAE,IAAI;QACb,MAAM,EAAE,MAAM,CAAC,MAAM;QACrB,OAAO,EAAE,MAAM,CAAC,OAAO;KACxB,CAAC;AACJ,CAAC;AAED,SAAgB,wCAAwC,CAEtD,MAED;IACC,OAAO;QACL,OAAO,EAAE,IAAI;QACb,MAAM,EAAE,SAAS;QACjB,OAAO,EAAE,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,OAAO;KACzB,CAAC;AACJ,CAAC;AAED,SAAgB,gCAAgC,CAA0C,MAKzF;IACC,OAAO;QACL,OAAO,EAAE,KAAK;QACd,YAAY,EAAE,MAAM,CAAC,YAAY;QACjC,qBAAqB,EAAE,MAAM,CAAC,qBAAqB;QACnD,MAAM,EAAE,MAAM,CAAC,MAAM;QACrB,OAAO,EAAE,MAAM,CAAC,OAAO;KACxB,CAAC;AACJ,CAAC;AAED,SAAgB,wCAAwC,CAEtD,MAID;IACC,OAAO;QACL,OAAO,EAAE,KAAK;QACd,YAAY,EAAE,MAAM,CAAC,YAAY;QACjC,qBAAqB,EAAE,MAAM,CAAC,qBAAqB;QACnD,MAAM,EAAE,SAAS;QACjB,OAAO,EAAE,MAAM,CAAC,OAAO;KACxB,CAAC;AACJ,CAAC"}
@@ -0,0 +1,38 @@
1
+ import type { z } from 'zod';
2
+ import type { BaseToolContext, PolicyEvaluationResultContext, SchemaValidationError } from '@lit-protocol/vincent-tool-sdk';
3
+ /** @category Interfaces */
4
+ export interface ToolExecuteResponseSuccess<Result, Policies extends Record<string, any>> {
5
+ success: true;
6
+ result: Result;
7
+ context?: BaseToolContext<PolicyEvaluationResultContext<Policies>>;
8
+ }
9
+ /** @category Interfaces */
10
+ export interface ToolExecuteResponseSuccessNoResult<Policies extends Record<string, any>> {
11
+ success: true;
12
+ result?: never;
13
+ context?: BaseToolContext<PolicyEvaluationResultContext<Policies>>;
14
+ }
15
+ /** @category Interfaces */
16
+ export interface ToolExecuteResponseFailure<Result, Policies extends Record<string, any>> {
17
+ success: false;
18
+ runtimeError?: string;
19
+ schemaValidationError?: SchemaValidationError;
20
+ result: Result;
21
+ context?: BaseToolContext<PolicyEvaluationResultContext<Policies>>;
22
+ }
23
+ /** @category Interfaces */
24
+ export interface ToolExecuteResponseFailureNoResult<Policies extends Record<string, any>> {
25
+ success: false;
26
+ runtimeError?: string;
27
+ schemaValidationError?: SchemaValidationError;
28
+ result?: never;
29
+ context?: BaseToolContext<PolicyEvaluationResultContext<Policies>>;
30
+ }
31
+ /** @category Interfaces */
32
+ export type ToolExecuteResponse<SuccessSchema extends z.ZodType | undefined, FailSchema extends z.ZodType | undefined, Policies extends Record<string, any>> = (SuccessSchema extends z.ZodType ? ToolExecuteResponseSuccess<z.infer<SuccessSchema>, Policies> : ToolExecuteResponseSuccessNoResult<Policies>) | (FailSchema extends z.ZodType ? ToolExecuteResponseFailure<z.infer<FailSchema>, Policies> : ToolExecuteResponseFailureNoResult<Policies>);
33
+ /** @hidden */
34
+ export interface RemoteVincentToolExecutionResult<SuccessSchema extends z.ZodType | undefined, FailSchema extends z.ZodType | undefined, Policies extends Record<string, any>> {
35
+ toolExecutionResult: ToolExecuteResponse<SuccessSchema, FailSchema, Policies>;
36
+ toolContext: BaseToolContext<PolicyEvaluationResultContext<Policies>>;
37
+ }
38
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/toolClient/execute/types.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAE7B,OAAO,KAAK,EACV,eAAe,EACf,6BAA6B,EAC7B,qBAAqB,EACtB,MAAM,gCAAgC,CAAC;AAExC,2BAA2B;AAC3B,MAAM,WAAW,0BAA0B,CAAC,MAAM,EAAE,QAAQ,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;IACtF,OAAO,EAAE,IAAI,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,eAAe,CAAC,6BAA6B,CAAC,QAAQ,CAAC,CAAC,CAAC;CACpE;AAED,2BAA2B;AAC3B,MAAM,WAAW,kCAAkC,CAAC,QAAQ,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;IACtF,OAAO,EAAE,IAAI,CAAC;IACd,MAAM,CAAC,EAAE,KAAK,CAAC;IACf,OAAO,CAAC,EAAE,eAAe,CAAC,6BAA6B,CAAC,QAAQ,CAAC,CAAC,CAAC;CACpE;AAED,2BAA2B;AAC3B,MAAM,WAAW,0BAA0B,CAAC,MAAM,EAAE,QAAQ,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;IACtF,OAAO,EAAE,KAAK,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,qBAAqB,CAAC,EAAE,qBAAqB,CAAC;IAC9C,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,eAAe,CAAC,6BAA6B,CAAC,QAAQ,CAAC,CAAC,CAAC;CACpE;AAED,2BAA2B;AAC3B,MAAM,WAAW,kCAAkC,CAAC,QAAQ,SAAS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appingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/toolClient/execute/types.ts"],"names":[],"mappings":";AAAA,kCAAkC"}