@lit-protocol/vincent-app-sdk 0.0.6-mma → 0.0.7-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.
- package/CHANGELOG.md +7 -7
- package/CONTRIBUTING.md +4 -5
- package/README.md +41 -41
- package/dist/CHANGELOG.md +7 -7
- package/dist/CONTRIBUTING.md +4 -5
- package/dist/README.md +41 -41
- package/dist/package.json +6 -6
- package/dist/src/abilityClient/constants.d.ts.map +1 -0
- package/dist/src/abilityClient/constants.js.map +1 -0
- package/dist/src/{toolClient/execute/generateVincentToolSessionSigs.d.ts → abilityClient/execute/generateVincentAbilitySessionSigs.d.ts} +2 -2
- package/dist/src/abilityClient/execute/generateVincentAbilitySessionSigs.d.ts.map +1 -0
- package/dist/src/{toolClient/execute/generateVincentToolSessionSigs.js → abilityClient/execute/generateVincentAbilitySessionSigs.js} +5 -5
- package/dist/src/abilityClient/execute/generateVincentAbilitySessionSigs.js.map +1 -0
- package/dist/src/{toolClient → abilityClient}/execute/resultCreators.d.ts +14 -14
- package/dist/src/abilityClient/execute/resultCreators.d.ts.map +1 -0
- package/dist/src/{toolClient → abilityClient}/execute/resultCreators.js +9 -9
- 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/{toolClient → abilityClient}/execute/types.js +1 -1
- 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/{toolClient → abilityClient}/precheck/resultCreators.d.ts +14 -14
- package/dist/src/abilityClient/precheck/resultCreators.d.ts.map +1 -0
- package/dist/src/{toolClient → abilityClient}/precheck/resultCreators.js +9 -9
- 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/{toolClient → abilityClient}/precheck/runPolicyPrechecks.js +14 -14
- package/dist/src/abilityClient/precheck/runPolicyPrechecks.js.map +1 -0
- package/dist/src/{toolClient → abilityClient}/precheck/types.d.ts +15 -15
- package/dist/src/abilityClient/precheck/types.d.ts.map +1 -0
- package/dist/src/{toolClient → abilityClient}/precheck/types.js +1 -1
- 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/{toolClient → abilityClient}/types.js +1 -1
- 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/{toolClient/vincentToolClient.js → abilityClient/vincentAbilityClient.js} +96 -96
- package/dist/src/abilityClient/vincentAbilityClient.js.map +1 -0
- package/dist/src/jwt/core/validate.js +2 -2
- package/dist/src/jwt/core/validate.js.map +1 -1
- package/dist/src/jwt/types.d.ts +1 -1
- package/dist/src/type-inference-verification/{tool-client-inference.d.ts → ability-client-inference.d.ts} +1 -1
- package/dist/src/type-inference-verification/ability-client-inference.d.ts.map +1 -0
- package/dist/src/type-inference-verification/{tool-client-inference.js → ability-client-inference.js} +47 -47
- package/dist/src/type-inference-verification/ability-client-inference.js.map +1 -0
- package/dist/src/webAuthClient/app.d.ts.map +1 -1
- package/dist/src/webAuthClient/app.js +9 -9
- package/dist/src/webAuthClient/app.js.map +1 -1
- package/dist/src/webAuthClient/internal/uriHelpers.d.ts +2 -2
- package/dist/src/webAuthClient/internal/uriHelpers.d.ts.map +1 -1
- package/dist/src/webAuthClient/internal/uriHelpers.js +8 -8
- package/dist/src/webAuthClient/internal/uriHelpers.js.map +1 -1
- package/dist/src/webAuthClient/types.d.ts +21 -21
- package/dist/src/webAuthClient/types.d.ts.map +1 -1
- package/package.json +7 -7
- package/dist/src/toolClient/constants.d.ts.map +0 -1
- package/dist/src/toolClient/constants.js.map +0 -1
- package/dist/src/toolClient/execute/generateVincentToolSessionSigs.d.ts.map +0 -1
- package/dist/src/toolClient/execute/generateVincentToolSessionSigs.js.map +0 -1
- package/dist/src/toolClient/execute/resultCreators.d.ts.map +0 -1
- package/dist/src/toolClient/execute/resultCreators.js.map +0 -1
- package/dist/src/toolClient/execute/types.d.ts +0 -38
- package/dist/src/toolClient/execute/types.d.ts.map +0 -1
- package/dist/src/toolClient/execute/types.js.map +0 -1
- package/dist/src/toolClient/index.d.ts +0 -19
- package/dist/src/toolClient/index.d.ts.map +0 -1
- package/dist/src/toolClient/index.js +0 -26
- package/dist/src/toolClient/index.js.map +0 -1
- package/dist/src/toolClient/precheck/resultCreators.d.ts.map +0 -1
- package/dist/src/toolClient/precheck/resultCreators.js.map +0 -1
- package/dist/src/toolClient/precheck/runPolicyPrechecks.d.ts +0 -14
- package/dist/src/toolClient/precheck/runPolicyPrechecks.d.ts.map +0 -1
- package/dist/src/toolClient/precheck/runPolicyPrechecks.js.map +0 -1
- package/dist/src/toolClient/precheck/types.d.ts.map +0 -1
- package/dist/src/toolClient/precheck/types.js.map +0 -1
- package/dist/src/toolClient/typeGuards.d.ts +0 -28
- package/dist/src/toolClient/typeGuards.d.ts.map +0 -1
- package/dist/src/toolClient/typeGuards.js +0 -67
- package/dist/src/toolClient/typeGuards.js.map +0 -1
- package/dist/src/toolClient/types.d.ts +0 -50
- package/dist/src/toolClient/types.d.ts.map +0 -1
- package/dist/src/toolClient/types.js.map +0 -1
- package/dist/src/toolClient/vincentToolClient.d.ts +0 -76
- package/dist/src/toolClient/vincentToolClient.d.ts.map +0 -1
- package/dist/src/toolClient/vincentToolClient.js.map +0 -1
- package/dist/src/type-inference-verification/tool-client-inference.d.ts.map +0 -1
- package/dist/src/type-inference-verification/tool-client-inference.js.map +0 -1
- /package/dist/src/{toolClient → abilityClient}/constants.d.ts +0 -0
- /package/dist/src/{toolClient → abilityClient}/constants.js +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,18 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
### 🩹 Fixes
|
|
4
4
|
|
|
5
|
-
- ####
|
|
5
|
+
- #### VincentAbilityClient Precheck fixes ([8da32df2](https://github.com/LIT-Protocol/Vincent/commit/8da32df2))
|
|
6
6
|
|
|
7
7
|
- Fix a case where deny results from `precheck()` were not correctly bubbled to the caller
|
|
8
8
|
- Fixed incorrect return type shape - `error` is a sibling of `result` in the policiesContext- Ensured `error` is bubbled up to the caller when provided
|
|
9
9
|
|
|
10
|
-
- -
|
|
11
|
-
- - `
|
|
12
|
-
- - `
|
|
10
|
+
- - VincentAbilityClient - Expose correct policiesContext type when calling `precheck()` ([812d4fe9](https://github.com/LIT-Protocol/Vincent/commit/812d4fe9))
|
|
11
|
+
- - `VincentAbilityClient` - Fixed case where an ability without its own `precheck()` function would return `success` result even if a policy returned an `deny` result from its `precheck()` ([71380b89](https://github.com/LIT-Protocol/Vincent/commit/71380b89))
|
|
12
|
+
- - `VincentAbilityClient` - Fixed case where a fail response did not return the `error` or `result` response to the caller correctly ([30e32f1e](https://github.com/LIT-Protocol/Vincent/commit/30e32f1e))
|
|
13
13
|
|
|
14
14
|
### 🧱 Updated Dependencies
|
|
15
15
|
|
|
16
|
-
- Updated
|
|
16
|
+
- Updated ability-sdk to 1.0.2
|
|
17
17
|
|
|
18
18
|
### ❤️ Thank You
|
|
19
19
|
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
- **vincent-app-sdk:** Add sdk-docs TypeDocs to root of repo ([fb15599](https://github.com/LIT-Protocol/Vincent/commit/fb15599))
|
|
40
40
|
- **vincent-app-sdk:** Return both the original JWT string and the decoded JWT object from `decodeVincentLoginJWT()` - Also fixed inverted logic check for `isLoginUri()`, and converted to object params for `isLoginUri()` ([c2f3a19](https://github.com/LIT-Protocol/Vincent/commit/c2f3a19))
|
|
41
41
|
- **vincent-app-sdk:** Add `removeLoginJWTFromURI()` method to `VincentWebAppClient` ([17072f4](https://github.com/LIT-Protocol/Vincent/commit/17072f4))
|
|
42
|
-
- **vincent-app-sdk:** Replace `pkp/delegatee-sigs` with a `
|
|
42
|
+
- **vincent-app-sdk:** Replace `pkp/delegatee-sigs` with a `VincentAbilityClient` - Exposes a single method, `getVincentAbilityClient()`, which Vincent app developers will use to interact with Vincent Ability LIT actions - Fixes existing code that created new instances of LitNodeClient and connecting to them every time the ability is interacted with, using newly minted singleton module - Initial TSDoc configurations for exposing the ability client construction and usage under a 'Vincent Abilities' category. ([2052ebe](https://github.com/LIT-Protocol/Vincent/commit/2052ebe))
|
|
43
43
|
- **vincent-app-sdk:** Define an internal module for managing a singleton instance of a LitNodeClient ([d297b0c](https://github.com/LIT-Protocol/Vincent/commit/d297b0c))
|
|
44
44
|
- update vincent sdk readme ([090614d](https://github.com/LIT-Protocol/Vincent/commit/090614d))
|
|
45
45
|
- added contracts class ([ef1851e](https://github.com/LIT-Protocol/Vincent/commit/ef1851e))
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
- ZodSchemmaMap typo ([095f38e](https://github.com/LIT-Protocol/Vincent/commit/095f38e))
|
|
50
50
|
- doc reference ([b1450f8](https://github.com/LIT-Protocol/Vincent/commit/b1450f8))
|
|
51
51
|
- remove unnecessary type annotation ([c71eeac](https://github.com/LIT-Protocol/Vincent/commit/c71eeac))
|
|
52
|
-
- sdk nx project linting
|
|
52
|
+
- sdk nx project linting ability ([82dd819](https://github.com/LIT-Protocol/Vincent/commit/82dd819))
|
|
53
53
|
- **docs:** rename (remove API) ([a4b8e83](https://github.com/LIT-Protocol/Vincent/commit/a4b8e83))
|
|
54
54
|
- **docs:** formatting fixes, custom css for :::info ([6f2fcef](https://github.com/LIT-Protocol/Vincent/commit/6f2fcef))
|
|
55
55
|
- **vincent-app-sdk:** Fix import of `JWT_ERROR` to import from root of `did-jwt` package ([dd96111](https://github.com/LIT-Protocol/Vincent/commit/dd96111))
|
package/CONTRIBUTING.md
CHANGED
|
@@ -4,7 +4,7 @@ This document provides guidelines for contributing to the Vincent SDK project.
|
|
|
4
4
|
|
|
5
5
|
## Overview
|
|
6
6
|
|
|
7
|
-
The Vincent SDK is a TypeScript SDK that exposes useful
|
|
7
|
+
The Vincent SDK is a TypeScript SDK that exposes useful abilities to interact with Vincent systems in web or Node.js environments. It provides client libraries for both frontend applications and backend services.
|
|
8
8
|
|
|
9
9
|
## Setup
|
|
10
10
|
|
|
@@ -39,17 +39,16 @@ pnpm typedoc
|
|
|
39
39
|
- `app/`: Web utilities to authenticate against Vincent Apps in clients
|
|
40
40
|
- `express-authentication-middleware/`: Express middleware wrapper to properly validate clients JWT server side
|
|
41
41
|
- `jwt/`: Utility functions to work with Vincent JWT between Vincent Apps client and server
|
|
42
|
-
- `tool/`: Utility functions to work with Vincent Tools
|
|
43
42
|
|
|
44
43
|
## SDK Components
|
|
45
44
|
|
|
46
45
|
### WebAuthClient
|
|
47
46
|
|
|
48
|
-
The Vincent Web Auth Client provides methods for managing user authentication, JWT tokens, and
|
|
47
|
+
The Vincent Web Auth Client provides methods for managing user authentication, JWT tokens, and connect flows in Vincent applications.
|
|
49
48
|
|
|
50
|
-
###
|
|
49
|
+
### VincentAbilityClient
|
|
51
50
|
|
|
52
|
-
The Vincent
|
|
51
|
+
The Vincent Ability Client uses an ethers signer for your delegatee account to run Vincent Abilities on behalf of your app users.
|
|
53
52
|
|
|
54
53
|
## Coding Standards
|
|
55
54
|
|
package/README.md
CHANGED
|
@@ -12,34 +12,34 @@ npm install @lit-protocol/vincent-app-sdk
|
|
|
12
12
|
|
|
13
13
|
## WebAuthClient
|
|
14
14
|
|
|
15
|
-
The Vincent Web Auth Client provides methods for managing user authentication, JWT tokens, and
|
|
15
|
+
The Vincent Web Auth Client provides methods for managing user authentication, JWT tokens, and connect flows in Vincent applications.
|
|
16
16
|
|
|
17
17
|
### Methods
|
|
18
18
|
|
|
19
|
-
####
|
|
19
|
+
#### redirectToConnectPage()
|
|
20
20
|
|
|
21
|
-
Redirects the user to the Vincent
|
|
21
|
+
Redirects the user to the Vincent connect page to obtain authorization. Once the user has completed the vincent connect flow
|
|
22
22
|
they will be redirected back to your app with a signed JWT that you can use to authenticate requests against your backend APIs
|
|
23
23
|
|
|
24
24
|
- When a JWT is expired, you need to use this method to get a new JWT
|
|
25
25
|
|
|
26
|
-
####
|
|
26
|
+
#### uriContainsVincentJWT()
|
|
27
27
|
|
|
28
|
-
Checks if the current window location contains a Vincent
|
|
28
|
+
Checks if the current window location contains a Vincent connect JWT. You can use this method to know that you should update connect state with the newly provided JWT
|
|
29
29
|
|
|
30
|
-
- Returns: Boolean indicating if the URI contains a
|
|
30
|
+
- Returns: Boolean indicating if the URI contains a connect JWT
|
|
31
31
|
|
|
32
|
-
####
|
|
32
|
+
#### decodeVincentJWT(expectedAudience)
|
|
33
33
|
|
|
34
|
-
Decodes a Vincent
|
|
34
|
+
Decodes a Vincent connect JWT. Performs basic sanity check but does not perform full verify() logic. You will want to run `verify()` from the jwt abilities to verify the JWT is fully valid and not expired etc.
|
|
35
35
|
|
|
36
36
|
- The expected audience is typically your app's domain -- it should be one of your valid redirectUri values from your Vincent app configuration
|
|
37
37
|
|
|
38
38
|
- Returns: An object containing both the original JWT string and the decoded JWT object
|
|
39
39
|
|
|
40
|
-
####
|
|
40
|
+
#### removeVincentJWTFromURI()
|
|
41
41
|
|
|
42
|
-
Removes the
|
|
42
|
+
Removes the connect JWT parameter from the current URI. Call this after you have verified and stored the JWT for later usage.
|
|
43
43
|
|
|
44
44
|
### Basic Usage
|
|
45
45
|
|
|
@@ -49,9 +49,9 @@ import { isExpired } from '@lit-protocol/vincent-app-sdk/jwt';
|
|
|
49
49
|
|
|
50
50
|
const vincentAppClient = getWebAuthClient({ appId: MY_APP_ID });
|
|
51
51
|
// ... In your app logic:
|
|
52
|
-
if (vincentAppClient.
|
|
52
|
+
if (vincentAppClient.uriContainsVincentJWT()) {
|
|
53
53
|
// Handle app logic for the user has just logged in
|
|
54
|
-
const { decoded, jwt } = vincentAppClient.
|
|
54
|
+
const { decoded, jwt } = vincentAppClient.decodeVincentJWT(window.location.origin);
|
|
55
55
|
// Store `jwt` for later usage; the user is now logged in.
|
|
56
56
|
} else {
|
|
57
57
|
// Handle app logic for the user is _already logged in_ (check for stored & unexpired JWT)
|
|
@@ -59,12 +59,12 @@ if (vincentAppClient.isLogin()) {
|
|
|
59
59
|
const jwt = localStorage.getItem('VINCENT_AUTH_JWT');
|
|
60
60
|
if (jwt && isExpired(jwt)) {
|
|
61
61
|
// User must re-log in
|
|
62
|
-
vincentAppClient.
|
|
62
|
+
vincentAppClient.redirectToConnectPage({ redirectUri: window.location.href });
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
if (!jwt) {
|
|
66
66
|
// Handle app logic for the user is not yet logged in
|
|
67
|
-
vincentAppClient.
|
|
67
|
+
vincentAppClient.redirectToConnectPage({ redirectUri: window.location.href });
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
70
|
```
|
|
@@ -73,63 +73,63 @@ if (vincentAppClient.isLogin()) {
|
|
|
73
73
|
|
|
74
74
|
In your backend, you will have to verify the JWT to make sure the user has granted you the required permissions to act on their behalf.
|
|
75
75
|
|
|
76
|
-
##
|
|
76
|
+
## VincentAbilityClient
|
|
77
77
|
|
|
78
|
-
The Vincent
|
|
78
|
+
The Vincent Ability Client uses an ethers signer for your delegatee account to run Vincent Abilities on behalf of your app users.
|
|
79
79
|
|
|
80
|
-
This client will typically be used by an AI agent or your app backend service, as it requires a signer that conforms to the ethers v5 signer API, and with access to your delegatee account's private key to authenticate with the LIT network when executing the Vincent
|
|
80
|
+
This client will typically be used by an AI agent or your app backend service, as it requires a signer that conforms to the ethers v5 signer API, and with access to your delegatee account's private key to authenticate with the LIT network when executing the Vincent Ability.
|
|
81
81
|
|
|
82
82
|
### Configuration
|
|
83
83
|
|
|
84
84
|
```typescript
|
|
85
|
-
interface
|
|
85
|
+
interface VincentAbilityClientConfig {
|
|
86
86
|
ethersSigner: ethers.Signer; // An ethers v5 compatible signer
|
|
87
|
-
|
|
87
|
+
vincentAbilityCid: string; // The CID of the Vincent Ability to execute
|
|
88
88
|
}
|
|
89
89
|
```
|
|
90
90
|
|
|
91
91
|
### Methods
|
|
92
92
|
|
|
93
|
-
#### execute(params:
|
|
93
|
+
#### execute(params: VincentAbilityParams): Promise<ExecuteJsResponse>
|
|
94
94
|
|
|
95
|
-
Executes a Vincent
|
|
95
|
+
Executes a Vincent Ability with the provided parameters.
|
|
96
96
|
|
|
97
|
-
- `params`: Record<string, unknown> - Parameters to pass to the Vincent
|
|
97
|
+
- `params`: Record<string, unknown> - Parameters to pass to the Vincent Ability
|
|
98
98
|
- Returns: Promise resolving to an ExecuteJsResponse from the LIT network
|
|
99
99
|
|
|
100
|
-
###
|
|
100
|
+
### Ability execution
|
|
101
101
|
|
|
102
102
|
```typescript
|
|
103
|
-
import {
|
|
104
|
-
// Import the
|
|
105
|
-
import {
|
|
103
|
+
import { getVincentAbilityClient } from '@lit-protocol/vincent-app-sdk/abilityClient';
|
|
104
|
+
// Import the ability you want to execute
|
|
105
|
+
import { bundledVincentAbility as erc20BundledAbility } from '@lit-protocol/vincent-ability-erc20-approval';
|
|
106
106
|
|
|
107
107
|
// One of delegatee signers from your app's Vincent Dashboard
|
|
108
108
|
const delegateeSigner = new ethers.Wallet('YOUR_DELEGATEE_PRIVATE_KEY');
|
|
109
109
|
|
|
110
|
-
// Initialize the Vincent
|
|
111
|
-
const
|
|
110
|
+
// Initialize the Vincent Ability Client
|
|
111
|
+
const abilityClient = getVincentAbilityClient({
|
|
112
112
|
ethersSigner: delegateeSigner,
|
|
113
|
-
|
|
113
|
+
bundledVincentAbility: erc20BundledAbility,
|
|
114
114
|
});
|
|
115
115
|
const delegatorPkpEthAddress = '0x09182301238';
|
|
116
116
|
|
|
117
|
-
const
|
|
118
|
-
// Fill with the params your
|
|
117
|
+
const abilityParams = {
|
|
118
|
+
// Fill with the params your ability needs
|
|
119
119
|
};
|
|
120
120
|
|
|
121
|
-
// Run precheck to see if
|
|
122
|
-
const precheckResult = await client.precheck(
|
|
121
|
+
// Run precheck to see if ability should be executed
|
|
122
|
+
const precheckResult = await client.precheck(abilityParams, {
|
|
123
123
|
delegatorPkpEthAddress,
|
|
124
124
|
});
|
|
125
125
|
|
|
126
126
|
if (precheckResult.success === true) {
|
|
127
|
-
// Execute the Vincent
|
|
128
|
-
const executeResult = await client.execute(
|
|
127
|
+
// Execute the Vincent Ability
|
|
128
|
+
const executeResult = await client.execute(abilityParams, {
|
|
129
129
|
delegatorPkpEthAddress,
|
|
130
130
|
});
|
|
131
131
|
|
|
132
|
-
// ...
|
|
132
|
+
// ...ability has executed, you can check `executeResult` for details
|
|
133
133
|
}
|
|
134
134
|
```
|
|
135
135
|
|
|
@@ -176,13 +176,13 @@ app.get('/profile', authenticateUser, authenticatedRequestHandler(getUserProfile
|
|
|
176
176
|
|
|
177
177
|
### Overview
|
|
178
178
|
|
|
179
|
-
The JWT authentication system in Vincent SDK allows for secure communication between user applications and Vincent
|
|
179
|
+
The JWT authentication system in Vincent SDK allows for secure communication between user applications and Vincent Abilities. JWTs are used to verify user connect and authorize ability executions.
|
|
180
180
|
|
|
181
181
|
### Authentication Flow
|
|
182
182
|
|
|
183
|
-
1. User initiates an action requiring Vincent
|
|
184
|
-
2. Application redirects to the Vincent
|
|
185
|
-
3. User provides
|
|
183
|
+
1. User initiates an action requiring Vincent Ability access
|
|
184
|
+
2. Application redirects to the Vincent connect page using `VincentWebAppClient.redirectToConnectPage()`
|
|
185
|
+
3. User provides login for the requested abilities/policies
|
|
186
186
|
4. User is redirected back to the application with a JWT in the URL
|
|
187
187
|
5. Application validates and stores the JWT using `VincentWebAppClient` methods
|
|
188
188
|
6. JWT is used to authenticate with the app backend
|
|
@@ -202,7 +202,7 @@ When JWT validation fails, descriptive error messages are thrown to help with tr
|
|
|
202
202
|
### Usage Notes
|
|
203
203
|
|
|
204
204
|
- JWTs have an expiration time after which they are no longer valid
|
|
205
|
-
- When a JWT expires, redirect the user to the
|
|
205
|
+
- When a JWT expires, redirect the user to the connect page to obtain a new one using the `VincentWebAppClient`
|
|
206
206
|
|
|
207
207
|
## Release
|
|
208
208
|
|
package/dist/CHANGELOG.md
CHANGED
|
@@ -2,18 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
### 🩹 Fixes
|
|
4
4
|
|
|
5
|
-
- ####
|
|
5
|
+
- #### VincentAbilityClient Precheck fixes ([8da32df2](https://github.com/LIT-Protocol/Vincent/commit/8da32df2))
|
|
6
6
|
|
|
7
7
|
- Fix a case where deny results from `precheck()` were not correctly bubbled to the caller
|
|
8
8
|
- Fixed incorrect return type shape - `error` is a sibling of `result` in the policiesContext- Ensured `error` is bubbled up to the caller when provided
|
|
9
9
|
|
|
10
|
-
- -
|
|
11
|
-
- - `
|
|
12
|
-
- - `
|
|
10
|
+
- - VincentAbilityClient - Expose correct policiesContext type when calling `precheck()` ([812d4fe9](https://github.com/LIT-Protocol/Vincent/commit/812d4fe9))
|
|
11
|
+
- - `VincentAbilityClient` - Fixed case where an ability without its own `precheck()` function would return `success` result even if a policy returned an `deny` result from its `precheck()` ([71380b89](https://github.com/LIT-Protocol/Vincent/commit/71380b89))
|
|
12
|
+
- - `VincentAbilityClient` - Fixed case where a fail response did not return the `error` or `result` response to the caller correctly ([30e32f1e](https://github.com/LIT-Protocol/Vincent/commit/30e32f1e))
|
|
13
13
|
|
|
14
14
|
### 🧱 Updated Dependencies
|
|
15
15
|
|
|
16
|
-
- Updated
|
|
16
|
+
- Updated ability-sdk to 1.0.2
|
|
17
17
|
|
|
18
18
|
### ❤️ Thank You
|
|
19
19
|
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
- **vincent-app-sdk:** Add sdk-docs TypeDocs to root of repo ([fb15599](https://github.com/LIT-Protocol/Vincent/commit/fb15599))
|
|
40
40
|
- **vincent-app-sdk:** Return both the original JWT string and the decoded JWT object from `decodeVincentLoginJWT()` - Also fixed inverted logic check for `isLoginUri()`, and converted to object params for `isLoginUri()` ([c2f3a19](https://github.com/LIT-Protocol/Vincent/commit/c2f3a19))
|
|
41
41
|
- **vincent-app-sdk:** Add `removeLoginJWTFromURI()` method to `VincentWebAppClient` ([17072f4](https://github.com/LIT-Protocol/Vincent/commit/17072f4))
|
|
42
|
-
- **vincent-app-sdk:** Replace `pkp/delegatee-sigs` with a `
|
|
42
|
+
- **vincent-app-sdk:** Replace `pkp/delegatee-sigs` with a `VincentAbilityClient` - Exposes a single method, `getVincentAbilityClient()`, which Vincent app developers will use to interact with Vincent Ability LIT actions - Fixes existing code that created new instances of LitNodeClient and connecting to them every time the ability is interacted with, using newly minted singleton module - Initial TSDoc configurations for exposing the ability client construction and usage under a 'Vincent Abilities' category. ([2052ebe](https://github.com/LIT-Protocol/Vincent/commit/2052ebe))
|
|
43
43
|
- **vincent-app-sdk:** Define an internal module for managing a singleton instance of a LitNodeClient ([d297b0c](https://github.com/LIT-Protocol/Vincent/commit/d297b0c))
|
|
44
44
|
- update vincent sdk readme ([090614d](https://github.com/LIT-Protocol/Vincent/commit/090614d))
|
|
45
45
|
- added contracts class ([ef1851e](https://github.com/LIT-Protocol/Vincent/commit/ef1851e))
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
- ZodSchemmaMap typo ([095f38e](https://github.com/LIT-Protocol/Vincent/commit/095f38e))
|
|
50
50
|
- doc reference ([b1450f8](https://github.com/LIT-Protocol/Vincent/commit/b1450f8))
|
|
51
51
|
- remove unnecessary type annotation ([c71eeac](https://github.com/LIT-Protocol/Vincent/commit/c71eeac))
|
|
52
|
-
- sdk nx project linting
|
|
52
|
+
- sdk nx project linting ability ([82dd819](https://github.com/LIT-Protocol/Vincent/commit/82dd819))
|
|
53
53
|
- **docs:** rename (remove API) ([a4b8e83](https://github.com/LIT-Protocol/Vincent/commit/a4b8e83))
|
|
54
54
|
- **docs:** formatting fixes, custom css for :::info ([6f2fcef](https://github.com/LIT-Protocol/Vincent/commit/6f2fcef))
|
|
55
55
|
- **vincent-app-sdk:** Fix import of `JWT_ERROR` to import from root of `did-jwt` package ([dd96111](https://github.com/LIT-Protocol/Vincent/commit/dd96111))
|
package/dist/CONTRIBUTING.md
CHANGED
|
@@ -4,7 +4,7 @@ This document provides guidelines for contributing to the Vincent SDK project.
|
|
|
4
4
|
|
|
5
5
|
## Overview
|
|
6
6
|
|
|
7
|
-
The Vincent SDK is a TypeScript SDK that exposes useful
|
|
7
|
+
The Vincent SDK is a TypeScript SDK that exposes useful abilities to interact with Vincent systems in web or Node.js environments. It provides client libraries for both frontend applications and backend services.
|
|
8
8
|
|
|
9
9
|
## Setup
|
|
10
10
|
|
|
@@ -39,17 +39,16 @@ pnpm typedoc
|
|
|
39
39
|
- `app/`: Web utilities to authenticate against Vincent Apps in clients
|
|
40
40
|
- `express-authentication-middleware/`: Express middleware wrapper to properly validate clients JWT server side
|
|
41
41
|
- `jwt/`: Utility functions to work with Vincent JWT between Vincent Apps client and server
|
|
42
|
-
- `tool/`: Utility functions to work with Vincent Tools
|
|
43
42
|
|
|
44
43
|
## SDK Components
|
|
45
44
|
|
|
46
45
|
### WebAuthClient
|
|
47
46
|
|
|
48
|
-
The Vincent Web Auth Client provides methods for managing user authentication, JWT tokens, and
|
|
47
|
+
The Vincent Web Auth Client provides methods for managing user authentication, JWT tokens, and connect flows in Vincent applications.
|
|
49
48
|
|
|
50
|
-
###
|
|
49
|
+
### VincentAbilityClient
|
|
51
50
|
|
|
52
|
-
The Vincent
|
|
51
|
+
The Vincent Ability Client uses an ethers signer for your delegatee account to run Vincent Abilities on behalf of your app users.
|
|
53
52
|
|
|
54
53
|
## Coding Standards
|
|
55
54
|
|
package/dist/README.md
CHANGED
|
@@ -12,34 +12,34 @@ npm install @lit-protocol/vincent-app-sdk
|
|
|
12
12
|
|
|
13
13
|
## WebAuthClient
|
|
14
14
|
|
|
15
|
-
The Vincent Web Auth Client provides methods for managing user authentication, JWT tokens, and
|
|
15
|
+
The Vincent Web Auth Client provides methods for managing user authentication, JWT tokens, and connect flows in Vincent applications.
|
|
16
16
|
|
|
17
17
|
### Methods
|
|
18
18
|
|
|
19
|
-
####
|
|
19
|
+
#### redirectToConnectPage()
|
|
20
20
|
|
|
21
|
-
Redirects the user to the Vincent
|
|
21
|
+
Redirects the user to the Vincent connect page to obtain authorization. Once the user has completed the vincent connect flow
|
|
22
22
|
they will be redirected back to your app with a signed JWT that you can use to authenticate requests against your backend APIs
|
|
23
23
|
|
|
24
24
|
- When a JWT is expired, you need to use this method to get a new JWT
|
|
25
25
|
|
|
26
|
-
####
|
|
26
|
+
#### uriContainsVincentJWT()
|
|
27
27
|
|
|
28
|
-
Checks if the current window location contains a Vincent
|
|
28
|
+
Checks if the current window location contains a Vincent connect JWT. You can use this method to know that you should update connect state with the newly provided JWT
|
|
29
29
|
|
|
30
|
-
- Returns: Boolean indicating if the URI contains a
|
|
30
|
+
- Returns: Boolean indicating if the URI contains a connect JWT
|
|
31
31
|
|
|
32
|
-
####
|
|
32
|
+
#### decodeVincentJWT(expectedAudience)
|
|
33
33
|
|
|
34
|
-
Decodes a Vincent
|
|
34
|
+
Decodes a Vincent connect JWT. Performs basic sanity check but does not perform full verify() logic. You will want to run `verify()` from the jwt abilities to verify the JWT is fully valid and not expired etc.
|
|
35
35
|
|
|
36
36
|
- The expected audience is typically your app's domain -- it should be one of your valid redirectUri values from your Vincent app configuration
|
|
37
37
|
|
|
38
38
|
- Returns: An object containing both the original JWT string and the decoded JWT object
|
|
39
39
|
|
|
40
|
-
####
|
|
40
|
+
#### removeVincentJWTFromURI()
|
|
41
41
|
|
|
42
|
-
Removes the
|
|
42
|
+
Removes the connect JWT parameter from the current URI. Call this after you have verified and stored the JWT for later usage.
|
|
43
43
|
|
|
44
44
|
### Basic Usage
|
|
45
45
|
|
|
@@ -49,9 +49,9 @@ import { isExpired } from '@lit-protocol/vincent-app-sdk/jwt';
|
|
|
49
49
|
|
|
50
50
|
const vincentAppClient = getWebAuthClient({ appId: MY_APP_ID });
|
|
51
51
|
// ... In your app logic:
|
|
52
|
-
if (vincentAppClient.
|
|
52
|
+
if (vincentAppClient.uriContainsVincentJWT()) {
|
|
53
53
|
// Handle app logic for the user has just logged in
|
|
54
|
-
const { decoded, jwt } = vincentAppClient.
|
|
54
|
+
const { decoded, jwt } = vincentAppClient.decodeVincentJWT(window.location.origin);
|
|
55
55
|
// Store `jwt` for later usage; the user is now logged in.
|
|
56
56
|
} else {
|
|
57
57
|
// Handle app logic for the user is _already logged in_ (check for stored & unexpired JWT)
|
|
@@ -59,12 +59,12 @@ if (vincentAppClient.isLogin()) {
|
|
|
59
59
|
const jwt = localStorage.getItem('VINCENT_AUTH_JWT');
|
|
60
60
|
if (jwt && isExpired(jwt)) {
|
|
61
61
|
// User must re-log in
|
|
62
|
-
vincentAppClient.
|
|
62
|
+
vincentAppClient.redirectToConnectPage({ redirectUri: window.location.href });
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
if (!jwt) {
|
|
66
66
|
// Handle app logic for the user is not yet logged in
|
|
67
|
-
vincentAppClient.
|
|
67
|
+
vincentAppClient.redirectToConnectPage({ redirectUri: window.location.href });
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
70
|
```
|
|
@@ -73,63 +73,63 @@ if (vincentAppClient.isLogin()) {
|
|
|
73
73
|
|
|
74
74
|
In your backend, you will have to verify the JWT to make sure the user has granted you the required permissions to act on their behalf.
|
|
75
75
|
|
|
76
|
-
##
|
|
76
|
+
## VincentAbilityClient
|
|
77
77
|
|
|
78
|
-
The Vincent
|
|
78
|
+
The Vincent Ability Client uses an ethers signer for your delegatee account to run Vincent Abilities on behalf of your app users.
|
|
79
79
|
|
|
80
|
-
This client will typically be used by an AI agent or your app backend service, as it requires a signer that conforms to the ethers v5 signer API, and with access to your delegatee account's private key to authenticate with the LIT network when executing the Vincent
|
|
80
|
+
This client will typically be used by an AI agent or your app backend service, as it requires a signer that conforms to the ethers v5 signer API, and with access to your delegatee account's private key to authenticate with the LIT network when executing the Vincent Ability.
|
|
81
81
|
|
|
82
82
|
### Configuration
|
|
83
83
|
|
|
84
84
|
```typescript
|
|
85
|
-
interface
|
|
85
|
+
interface VincentAbilityClientConfig {
|
|
86
86
|
ethersSigner: ethers.Signer; // An ethers v5 compatible signer
|
|
87
|
-
|
|
87
|
+
vincentAbilityCid: string; // The CID of the Vincent Ability to execute
|
|
88
88
|
}
|
|
89
89
|
```
|
|
90
90
|
|
|
91
91
|
### Methods
|
|
92
92
|
|
|
93
|
-
#### execute(params:
|
|
93
|
+
#### execute(params: VincentAbilityParams): Promise<ExecuteJsResponse>
|
|
94
94
|
|
|
95
|
-
Executes a Vincent
|
|
95
|
+
Executes a Vincent Ability with the provided parameters.
|
|
96
96
|
|
|
97
|
-
- `params`: Record<string, unknown> - Parameters to pass to the Vincent
|
|
97
|
+
- `params`: Record<string, unknown> - Parameters to pass to the Vincent Ability
|
|
98
98
|
- Returns: Promise resolving to an ExecuteJsResponse from the LIT network
|
|
99
99
|
|
|
100
|
-
###
|
|
100
|
+
### Ability execution
|
|
101
101
|
|
|
102
102
|
```typescript
|
|
103
|
-
import {
|
|
104
|
-
// Import the
|
|
105
|
-
import {
|
|
103
|
+
import { getVincentAbilityClient } from '@lit-protocol/vincent-app-sdk/abilityClient';
|
|
104
|
+
// Import the ability you want to execute
|
|
105
|
+
import { bundledVincentAbility as erc20BundledAbility } from '@lit-protocol/vincent-ability-erc20-approval';
|
|
106
106
|
|
|
107
107
|
// One of delegatee signers from your app's Vincent Dashboard
|
|
108
108
|
const delegateeSigner = new ethers.Wallet('YOUR_DELEGATEE_PRIVATE_KEY');
|
|
109
109
|
|
|
110
|
-
// Initialize the Vincent
|
|
111
|
-
const
|
|
110
|
+
// Initialize the Vincent Ability Client
|
|
111
|
+
const abilityClient = getVincentAbilityClient({
|
|
112
112
|
ethersSigner: delegateeSigner,
|
|
113
|
-
|
|
113
|
+
bundledVincentAbility: erc20BundledAbility,
|
|
114
114
|
});
|
|
115
115
|
const delegatorPkpEthAddress = '0x09182301238';
|
|
116
116
|
|
|
117
|
-
const
|
|
118
|
-
// Fill with the params your
|
|
117
|
+
const abilityParams = {
|
|
118
|
+
// Fill with the params your ability needs
|
|
119
119
|
};
|
|
120
120
|
|
|
121
|
-
// Run precheck to see if
|
|
122
|
-
const precheckResult = await client.precheck(
|
|
121
|
+
// Run precheck to see if ability should be executed
|
|
122
|
+
const precheckResult = await client.precheck(abilityParams, {
|
|
123
123
|
delegatorPkpEthAddress,
|
|
124
124
|
});
|
|
125
125
|
|
|
126
126
|
if (precheckResult.success === true) {
|
|
127
|
-
// Execute the Vincent
|
|
128
|
-
const executeResult = await client.execute(
|
|
127
|
+
// Execute the Vincent Ability
|
|
128
|
+
const executeResult = await client.execute(abilityParams, {
|
|
129
129
|
delegatorPkpEthAddress,
|
|
130
130
|
});
|
|
131
131
|
|
|
132
|
-
// ...
|
|
132
|
+
// ...ability has executed, you can check `executeResult` for details
|
|
133
133
|
}
|
|
134
134
|
```
|
|
135
135
|
|
|
@@ -176,13 +176,13 @@ app.get('/profile', authenticateUser, authenticatedRequestHandler(getUserProfile
|
|
|
176
176
|
|
|
177
177
|
### Overview
|
|
178
178
|
|
|
179
|
-
The JWT authentication system in Vincent SDK allows for secure communication between user applications and Vincent
|
|
179
|
+
The JWT authentication system in Vincent SDK allows for secure communication between user applications and Vincent Abilities. JWTs are used to verify user connect and authorize ability executions.
|
|
180
180
|
|
|
181
181
|
### Authentication Flow
|
|
182
182
|
|
|
183
|
-
1. User initiates an action requiring Vincent
|
|
184
|
-
2. Application redirects to the Vincent
|
|
185
|
-
3. User provides
|
|
183
|
+
1. User initiates an action requiring Vincent Ability access
|
|
184
|
+
2. Application redirects to the Vincent connect page using `VincentWebAppClient.redirectToConnectPage()`
|
|
185
|
+
3. User provides login for the requested abilities/policies
|
|
186
186
|
4. User is redirected back to the application with a JWT in the URL
|
|
187
187
|
5. Application validates and stores the JWT using `VincentWebAppClient` methods
|
|
188
188
|
6. JWT is used to authenticate with the app backend
|
|
@@ -202,7 +202,7 @@ When JWT validation fails, descriptive error messages are thrown to help with tr
|
|
|
202
202
|
### Usage Notes
|
|
203
203
|
|
|
204
204
|
- JWTs have an expiration time after which they are no longer valid
|
|
205
|
-
- When a JWT expires, redirect the user to the
|
|
205
|
+
- When a JWT expires, redirect the user to the connect page to obtain a new one using the `VincentWebAppClient`
|
|
206
206
|
|
|
207
207
|
## Release
|
|
208
208
|
|
package/dist/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lit-protocol/vincent-app-sdk",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "Vincent SDK for browser and backend",
|
|
5
5
|
"author": "Lit Protocol",
|
|
6
6
|
"license": "ISC",
|
|
@@ -20,10 +20,10 @@
|
|
|
20
20
|
"require": "./dist/src/jwt/index.js",
|
|
21
21
|
"types": "./dist/src/jwt/index.d.ts"
|
|
22
22
|
},
|
|
23
|
-
"./
|
|
24
|
-
"import": "./dist/src/
|
|
25
|
-
"require": "./dist/src/
|
|
26
|
-
"types": "./dist/src/
|
|
23
|
+
"./abilityClient": {
|
|
24
|
+
"import": "./dist/src/abilityClient/index.js",
|
|
25
|
+
"require": "./dist/src/abilityClient/index.js",
|
|
26
|
+
"types": "./dist/src/abilityClient/index.d.ts"
|
|
27
27
|
},
|
|
28
28
|
"./webAuthClient": {
|
|
29
29
|
"import": "./dist/src/webAuthClient/index.js",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"@lit-protocol/constants": "^7.0.8",
|
|
57
57
|
"@lit-protocol/lit-node-client": "^7.0.8",
|
|
58
58
|
"@lit-protocol/vincent-contracts-sdk": "workspace:*",
|
|
59
|
-
"@lit-protocol/vincent-
|
|
59
|
+
"@lit-protocol/vincent-ability-sdk": "workspace:*",
|
|
60
60
|
"@noble/secp256k1": "^2.2.3",
|
|
61
61
|
"did-jwt": "^8.0.8",
|
|
62
62
|
"ethers": "5.8.0",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/abilityClient/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,wBAAwB,UAAU,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/abilityClient/constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,wBAAwB,GAAG,OAAO,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { ethers } from 'ethers';
|
|
2
2
|
import type { LitNodeClient } from '@lit-protocol/lit-node-client';
|
|
3
3
|
/** @hidden */
|
|
4
|
-
export declare const
|
|
4
|
+
export declare const generateVincentAbilitySessionSigs: ({ litNodeClient, ethersSigner, }: {
|
|
5
5
|
litNodeClient: LitNodeClient;
|
|
6
6
|
ethersSigner: ethers.Signer;
|
|
7
7
|
}) => Promise<import("@lit-protocol/types").SessionSigsMap>;
|
|
8
|
-
//# sourceMappingURL=
|
|
8
|
+
//# sourceMappingURL=generateVincentAbilitySessionSigs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generateVincentAbilitySessionSigs.d.ts","sourceRoot":"","sources":["../../../../src/abilityClient/execute/generateVincentAbilitySessionSigs.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,iCAAiC,GAAU,kCAGrD;IACD,aAAa,EAAE,aAAa,CAAC;IAC7B,YAAY,EAAE,MAAM,CAAC,MAAM,CAAC;CAC7B,0DAyBA,CAAC"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
// src/
|
|
2
|
+
// src/abilityClient/execute/generateVincentAbilitySessionSigs.ts
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.
|
|
4
|
+
exports.generateVincentAbilitySessionSigs = void 0;
|
|
5
5
|
const auth_helpers_1 = require("@lit-protocol/auth-helpers");
|
|
6
6
|
const constants_1 = require("@lit-protocol/constants");
|
|
7
7
|
/** @hidden */
|
|
8
|
-
const
|
|
8
|
+
const generateVincentAbilitySessionSigs = async ({ litNodeClient, ethersSigner, }) => {
|
|
9
9
|
return litNodeClient.getSessionSigs({
|
|
10
10
|
chain: 'ethereum',
|
|
11
11
|
resourceAbilityRequests: [
|
|
@@ -29,5 +29,5 @@ const generateVincentToolSessionSigs = async ({ litNodeClient, ethersSigner, })
|
|
|
29
29
|
},
|
|
30
30
|
});
|
|
31
31
|
};
|
|
32
|
-
exports.
|
|
33
|
-
//# sourceMappingURL=
|
|
32
|
+
exports.generateVincentAbilitySessionSigs = generateVincentAbilitySessionSigs;
|
|
33
|
+
//# sourceMappingURL=generateVincentAbilitySessionSigs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generateVincentAbilitySessionSigs.js","sourceRoot":"","sources":["../../../../src/abilityClient/execute/generateVincentAbilitySessionSigs.ts"],"names":[],"mappings":";AAAA,iEAAiE;;;AAMjE,6DAKoC;AACpC,uDAAsD;AAEtD,cAAc;AACP,MAAM,iCAAiC,GAAG,KAAK,EAAE,EACtD,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,iCAAiC,qCA+B5C"}
|