@lit-protocol/vincent-app-sdk 1.0.3-beta.7 → 2.0.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 +186 -0
- package/dist/CHANGELOG.md +186 -0
- package/dist/package.json +2 -2
- package/dist/src/jwt/core/create.d.ts +1 -2
- package/dist/src/jwt/core/create.d.ts.map +1 -1
- package/dist/src/jwt/core/create.js +6 -4
- package/dist/src/jwt/core/create.js.map +1 -1
- package/dist/src/jwt/core/utils/verifyES256KSignature.d.ts.map +1 -1
- package/dist/src/jwt/core/utils/verifyES256KSignature.js +1 -4
- package/dist/src/jwt/core/utils/verifyES256KSignature.js.map +1 -1
- package/dist/src/jwt/types.d.ts +1 -1
- package/dist/src/jwt/types.d.ts.map +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,189 @@
|
|
|
1
|
+
# 2.0.0 (2025-08-05)
|
|
2
|
+
|
|
3
|
+
### 🚀 Features
|
|
4
|
+
|
|
5
|
+
- Bug fix in app-sdk that kept a policy's allow result from being returned ([11325427](https://github.com/LIT-Protocol/Vincent/commit/11325427))
|
|
6
|
+
- ### Implement supported Vincent Ability API range ([14f0ece1](https://github.com/LIT-Protocol/Vincent/commit/14f0ece1))
|
|
7
|
+
|
|
8
|
+
Added basic Ability API handling to ensure abilities & policies are only used by compatible abilities and policies, and with the correct version of the vincentAbilityClient / app-sdk
|
|
9
|
+
|
|
10
|
+
- Added a new jsParam when VincentAbilityClient calls an ability, `vincentAbilityApiVersion`
|
|
11
|
+
- LIT action wrappers for abilities + policies compare `vincentAbilityApiVersion` to match the major semver range the handler was built with from the ability-sdk
|
|
12
|
+
- vincentAbilityHandler() is responsible for passing along the value when it evaluates supported policies
|
|
13
|
+
|
|
14
|
+
### 🩹 Fixes
|
|
15
|
+
|
|
16
|
+
- ### Fix ability failure response cases ([e2be50d9](https://github.com/LIT-Protocol/Vincent/commit/e2be50d9))
|
|
17
|
+
|
|
18
|
+
- Ensures that policy denial disables checking the ability result against its fail schema in the abilityClient, because it will always be undefined :)
|
|
19
|
+
- Ensures that `context` is returned in the response from the abilityClient.execute() method in cases where the ability response was a runtime or schemaValidationError
|
|
20
|
+
|
|
21
|
+
### ⚠️ Breaking Changes
|
|
22
|
+
|
|
23
|
+
- Add support for CBOR2 encoded policy parameters using the new vincent-contracts-sdk ([868c6c2a](https://github.com/LIT-Protocol/Vincent/commit/868c6c2a))
|
|
24
|
+
- ### Add support for explicit `schemaValidationError` ([337a4bde](https://github.com/LIT-Protocol/Vincent/commit/337a4bde))
|
|
25
|
+
|
|
26
|
+
- Previously, a failure to validate either input or results of lifecycle method would result in `result: { zodError }` being returned
|
|
27
|
+
- Now, `result` will be `undefined` and there will be an explicit `schemaValidationError` in the result of the ability / policy
|
|
28
|
+
|
|
29
|
+
```typescript
|
|
30
|
+
export interface SchemaValidationError {
|
|
31
|
+
zodError: ZodError<unknown>; // The result of `zod.safeParse().error`
|
|
32
|
+
phase: string; // Policies: `precheck`|`evaluate`|`commit` - Abilities: `precheck` | `execute`
|
|
33
|
+
stage: string; // `input` | `output`
|
|
34
|
+
}
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
- ### `error` is now `runtimeError` and can only be set by `throw ...` ([337a4bde](https://github.com/LIT-Protocol/Vincent/commit/337a4bde))
|
|
38
|
+
|
|
39
|
+
- Previously, if you had not defined a `deny` or `fail` schema, you could call `deny()` or `fail()` with a string
|
|
40
|
+
- That string would end up in the ability/policy response as the `error` property instead of `result`
|
|
41
|
+
- This was problematic because there was no consistent way to identify _un-handled_ error vs. _explicitly returned fail/deny results_
|
|
42
|
+
- If you don't define a deny or fail schema, you can no longer call those methods with a string.
|
|
43
|
+
- `error` is now `runtimeError`, and is _only_ set if a lifecycle method `throw`s an Error - in that case it will be the `message` property of the error
|
|
44
|
+
- If you want to be able to return simple errors in your _result_, you can define a simple deny or fail schema like `z.object({ error: z.string() }`
|
|
45
|
+
|
|
46
|
+
- ### Create vincentAbilityClient namespace ([b94ca569](https://github.com/LIT-Protocol/Vincent/commit/b94ca569))
|
|
47
|
+
|
|
48
|
+
Previously, `getVincentAbilityClient()` and `disconnectVincentAbilityClients()` were exported from the root of the `vincent-app-sdk` package.
|
|
49
|
+
These methods, along with several other methods are now exported from the `@lit-protocol/app-sdk/abilityClient` namespace
|
|
50
|
+
|
|
51
|
+
```typescript
|
|
52
|
+
import {
|
|
53
|
+
getVincentAbilityClient,
|
|
54
|
+
disconnectVincentAbilityClients,
|
|
55
|
+
isAbilityResponseFailure,
|
|
56
|
+
isAbilityResponseRuntimeFailure,
|
|
57
|
+
isAbilityResponseSchemaValidationFailure,
|
|
58
|
+
isAbilityResponseSuccess,
|
|
59
|
+
} from '@lit-protocol/app-sdk/abilityClient';
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
- #### Standardized `app` property on on JWT payload to be a number instead of a string. ([b94ca569](https://github.com/LIT-Protocol/Vincent/commit/b94ca569))
|
|
63
|
+
- #### Renamed `consent page` to `delegation auth page` ([b94ca569](https://github.com/LIT-Protocol/Vincent/commit/b94ca569))
|
|
64
|
+
- #### Move utils exports to `@lit-protocol/vincent-app-sdk/utils` ([b94ca569](https://github.com/LIT-Protocol/Vincent/commit/b94ca569))
|
|
65
|
+
- #### Moved jwt exports to `@lit-protocol/vincent-app-sdk/jwt` ([b94ca569](https://github.com/LIT-Protocol/Vincent/commit/b94ca569))
|
|
66
|
+
|
|
67
|
+
- Enhanced typedocs for all methods and removed type aliases for core functions
|
|
68
|
+
|
|
69
|
+
- #### Move `VincentWebAppClient` exports to `@lit-protocol/vincent-app-sdk/webAppClient` ([b94ca569](https://github.com/LIT-Protocol/Vincent/commit/b94ca569))
|
|
70
|
+
|
|
71
|
+
- Renamed `VincentWebAppClient` to `WebAuthClient`
|
|
72
|
+
- Renamed `VincentAppClientConfig` to `WebAuthClientConfig`
|
|
73
|
+
- Renamed `RedirectToVincentConsentPageParams` to `RedirectToVincentDelegationPageParams`
|
|
74
|
+
- Renamed `redirectToConsentPage()` to `redirectToDelegationAuthPage()`
|
|
75
|
+
- Renamed `getVincentWebAppClient()` to `getWebAuthClient()`
|
|
76
|
+
|
|
77
|
+
- #### Move express-authentication-middleware exports to `@lit-protocol/vincent-app-sdk/expressMiddleware` ([b94ca569](https://github.com/LIT-Protocol/Vincent/commit/b94ca569))
|
|
78
|
+
|
|
79
|
+
- Removed `ExpressAuthHelpers` interface - its types are now directly exported from the `expressMiddleware` package sub-path
|
|
80
|
+
|
|
81
|
+
- #### Moved abilityClient exports to `@lit-protocol/vincent-app-sdk/abilityClient` ([b94ca569](https://github.com/LIT-Protocol/Vincent/commit/b94ca569))
|
|
82
|
+
- ### Update express middleware to support non-app-specific JWTs ([9dd1cd26](https://github.com/LIT-Protocol/Vincent/commit/9dd1cd26))
|
|
83
|
+
|
|
84
|
+
- Replaced individual function exports of `authenticatedRequestHandler()` and `getAuthenticateUserExpressHandler()` with a single `createVincentUserMiddleware()` function
|
|
85
|
+
|
|
86
|
+
#### createVincentUserMiddleware({ allowedAudience, userKey, requiredAppId? }) -> { middleware(), handler() }
|
|
87
|
+
|
|
88
|
+
- You can now configure the property on `req` where the vincent user JWT data will be placed using `userKey`
|
|
89
|
+
- You can now configure the authentication middleware to throw if `requiredAppId` does not match a specific appId you provide
|
|
90
|
+
- `allowedAudience` behaviour remains unchanged
|
|
91
|
+
- See example usage on the API docs for the package @ http://docs.heyvincent.ai
|
|
92
|
+
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
- ### Support JWTs that are not app-specific ([0553a934](https://github.com/LIT-Protocol/Vincent/commit/0553a934))
|
|
98
|
+
|
|
99
|
+
This release adds support for general authentication JWTs that are not tied to a specific app. This is a breaking change that requires updates to code that uses the JWT validation functions.
|
|
100
|
+
|
|
101
|
+
#### API Changes
|
|
102
|
+
|
|
103
|
+
- `verify` and `decode` functions now accept object parameters instead of separate parameters
|
|
104
|
+
- Their return values are strongly typed based on whether `requiredAppId` is provided.
|
|
105
|
+
- They throw if `requiredAppId` is provided but the jwt is either not app-specific or the app id on the token doesn't match the `requiredAppId`
|
|
106
|
+
- `appId` type changed from `string` to `number` in WebAuthClient configuration
|
|
107
|
+
- WebAuthClient now throws an error if the `appId` it was configured with isn't in the JWT it decodes
|
|
108
|
+
|
|
109
|
+
#### New Functions
|
|
110
|
+
|
|
111
|
+
- `isGeneralJWT`: Type guard to check if a JWT is Vincent JWT that has no app associated
|
|
112
|
+
- `isAppSpecificJWT`: Type guard to check if a JWT is a vincent JWT that is app-specific
|
|
113
|
+
- `assertIsVincentJWT`: Assertion function to validate if a decoded JWT is a valid Vincent JWT
|
|
114
|
+
- `getAppInfo`: Convenience method that returns the app ID and version from an app-specific JWT's payload
|
|
115
|
+
- `getPKPInfo`: Convenience method that returns PKP information from any Vincent JWT's payload
|
|
116
|
+
|
|
117
|
+
#### New Types
|
|
118
|
+
|
|
119
|
+
- `VincentJWT`: Interface for a decoded Vincent JWT without app-specific details (general authentication)
|
|
120
|
+
- `VincentJWTAppSpecific`: Interface for a decoded app-specific Vincent JWT
|
|
121
|
+
- `BaseVincentJWTPayload`: Payload that contains always-present properties on all Vincent JWTs
|
|
122
|
+
- `VincentAppSpecificJWTPayload`: Extends VincentJWTPayload with app-specific information
|
|
123
|
+
|
|
124
|
+
- ## JWT Refactor ([c21bc3c3](https://github.com/LIT-Protocol/Vincent/commit/c21bc3c3))
|
|
125
|
+
|
|
126
|
+
#### Refactored our JWT structure, composition, and verification logic.
|
|
127
|
+
|
|
128
|
+
- Removed dependency on `did-jwt`; since we are signing using EIP-191 compliant signatures, the presence of `did:ethr` was misleading.
|
|
129
|
+
- Added support for Delegatee JWTs
|
|
130
|
+
|
|
131
|
+
#### We now support 3 types of JWT:
|
|
132
|
+
|
|
133
|
+
- `VincentJWTAppUser`
|
|
134
|
+
- `role` claim in the JWT payload is `app-user`
|
|
135
|
+
- Contains PKP info
|
|
136
|
+
- Is app-specific
|
|
137
|
+
- Is provided to app end-users, so that they can authenticate with services that are provided by individual Vincent Apps
|
|
138
|
+
- `VincentJWTPlatformUser`
|
|
139
|
+
- `role` claim in the JWT payload is `platform-user`
|
|
140
|
+
- Contains PKP info
|
|
141
|
+
- Used to authenticate with Vincent platform services (e.g. the registry backend)
|
|
142
|
+
- Is not app-specific
|
|
143
|
+
- The Vincent dashboard uses these for App owners and Ability & Policy authors
|
|
144
|
+
- `VincentJWTDelegatee`
|
|
145
|
+
- `role` claim in the JWT payload is `app-delegatee`
|
|
146
|
+
- Does not contain PKP info; delegatees are not PKP-backed
|
|
147
|
+
- Is not app-specific
|
|
148
|
+
- Used to authenticate with services that require proof that they are being used by a specific delegatee who has permissions to act on behalf of a delegator (app user) account.
|
|
149
|
+
|
|
150
|
+
### API Changes
|
|
151
|
+
|
|
152
|
+
- Many classes and interfaces were renamed to clearly indicate which type of JWT that they apply to.
|
|
153
|
+
- Added `publicKey` to the `payload` of all JWTs for signature verification convenience
|
|
154
|
+
- `iss` and `sub` are now raw hex-formatted ethers addresses, without `did:ethr` prefixes
|
|
155
|
+
- JWT verification has been converted to be an async process, and explicit verify methods have been defined for each type of JWT
|
|
156
|
+
- `verifyVincentAppUserJWT()`
|
|
157
|
+
- `verifyVincentPlatformJWT()`
|
|
158
|
+
- `verifyVincentDelegateeJWT()`
|
|
159
|
+
- Type-guard functions have also been added to help identify the kind of JWT you are using and provide type-safe references to those JWTs, but for most use-cases you will probably just use the type-specific `verify` methods.
|
|
160
|
+
- `isVincentJWTAppSpecific()`
|
|
161
|
+
- `isVincentPlatformJWT()`
|
|
162
|
+
- `isVincentJWTDelegatee()`
|
|
163
|
+
- `isAnyVincentJWT()`
|
|
164
|
+
- Added accessor helper functions to facilitate easy, type-safe access to properties on supported JWTs
|
|
165
|
+
- `getRole()` - All Vincent JWTs
|
|
166
|
+
- `getPublicKey()` - All Vincent JWTs
|
|
167
|
+
- `getIssuerAddress()` - All Vincent JWTs
|
|
168
|
+
- `getAudience()` - All Vincent JWTs
|
|
169
|
+
- `getSubjectAddress()` - Only for `VincentJWTDelegatee`
|
|
170
|
+
- `getAppInfo()` - Only for `VincentJWTAppUser`
|
|
171
|
+
- `getPKPInfo()` - Only for `VincentJWTAppUser` or `VincentJWTPlatformUser`
|
|
172
|
+
- `getAuthentication()` - Only for `VincentJWTAppUser` or `VincentJWTPlatformUser`
|
|
173
|
+
- `decode` has been renamed to `decodeVincentJWT()`;
|
|
174
|
+
- You probably want to use the type-specific `verify` methods instead of calling decode directly, unless you're absolutely sure that you've already verified the JWT and are positive it hasn't expired!
|
|
175
|
+
- This function returns an `AnyVincentJWT` type which you must narrow using type-guard functions.
|
|
176
|
+
|
|
177
|
+
### 🧱 Updated Dependencies
|
|
178
|
+
|
|
179
|
+
- Updated ability-sdk to 2.0.0
|
|
180
|
+
- Updated contracts-sdk to 2.0.0
|
|
181
|
+
|
|
182
|
+
### ❤️ Thank You
|
|
183
|
+
|
|
184
|
+
- Daryl Collins
|
|
185
|
+
- Wyatt Barnes @spacesailor24
|
|
186
|
+
|
|
1
187
|
## 1.0.2 (2025-07-08)
|
|
2
188
|
|
|
3
189
|
### 🩹 Fixes
|
package/dist/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,189 @@
|
|
|
1
|
+
# 2.0.0 (2025-08-05)
|
|
2
|
+
|
|
3
|
+
### 🚀 Features
|
|
4
|
+
|
|
5
|
+
- Bug fix in app-sdk that kept a policy's allow result from being returned ([11325427](https://github.com/LIT-Protocol/Vincent/commit/11325427))
|
|
6
|
+
- ### Implement supported Vincent Ability API range ([14f0ece1](https://github.com/LIT-Protocol/Vincent/commit/14f0ece1))
|
|
7
|
+
|
|
8
|
+
Added basic Ability API handling to ensure abilities & policies are only used by compatible abilities and policies, and with the correct version of the vincentAbilityClient / app-sdk
|
|
9
|
+
|
|
10
|
+
- Added a new jsParam when VincentAbilityClient calls an ability, `vincentAbilityApiVersion`
|
|
11
|
+
- LIT action wrappers for abilities + policies compare `vincentAbilityApiVersion` to match the major semver range the handler was built with from the ability-sdk
|
|
12
|
+
- vincentAbilityHandler() is responsible for passing along the value when it evaluates supported policies
|
|
13
|
+
|
|
14
|
+
### 🩹 Fixes
|
|
15
|
+
|
|
16
|
+
- ### Fix ability failure response cases ([e2be50d9](https://github.com/LIT-Protocol/Vincent/commit/e2be50d9))
|
|
17
|
+
|
|
18
|
+
- Ensures that policy denial disables checking the ability result against its fail schema in the abilityClient, because it will always be undefined :)
|
|
19
|
+
- Ensures that `context` is returned in the response from the abilityClient.execute() method in cases where the ability response was a runtime or schemaValidationError
|
|
20
|
+
|
|
21
|
+
### ⚠️ Breaking Changes
|
|
22
|
+
|
|
23
|
+
- Add support for CBOR2 encoded policy parameters using the new vincent-contracts-sdk ([868c6c2a](https://github.com/LIT-Protocol/Vincent/commit/868c6c2a))
|
|
24
|
+
- ### Add support for explicit `schemaValidationError` ([337a4bde](https://github.com/LIT-Protocol/Vincent/commit/337a4bde))
|
|
25
|
+
|
|
26
|
+
- Previously, a failure to validate either input or results of lifecycle method would result in `result: { zodError }` being returned
|
|
27
|
+
- Now, `result` will be `undefined` and there will be an explicit `schemaValidationError` in the result of the ability / policy
|
|
28
|
+
|
|
29
|
+
```typescript
|
|
30
|
+
export interface SchemaValidationError {
|
|
31
|
+
zodError: ZodError<unknown>; // The result of `zod.safeParse().error`
|
|
32
|
+
phase: string; // Policies: `precheck`|`evaluate`|`commit` - Abilities: `precheck` | `execute`
|
|
33
|
+
stage: string; // `input` | `output`
|
|
34
|
+
}
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
- ### `error` is now `runtimeError` and can only be set by `throw ...` ([337a4bde](https://github.com/LIT-Protocol/Vincent/commit/337a4bde))
|
|
38
|
+
|
|
39
|
+
- Previously, if you had not defined a `deny` or `fail` schema, you could call `deny()` or `fail()` with a string
|
|
40
|
+
- That string would end up in the ability/policy response as the `error` property instead of `result`
|
|
41
|
+
- This was problematic because there was no consistent way to identify _un-handled_ error vs. _explicitly returned fail/deny results_
|
|
42
|
+
- If you don't define a deny or fail schema, you can no longer call those methods with a string.
|
|
43
|
+
- `error` is now `runtimeError`, and is _only_ set if a lifecycle method `throw`s an Error - in that case it will be the `message` property of the error
|
|
44
|
+
- If you want to be able to return simple errors in your _result_, you can define a simple deny or fail schema like `z.object({ error: z.string() }`
|
|
45
|
+
|
|
46
|
+
- ### Create vincentAbilityClient namespace ([b94ca569](https://github.com/LIT-Protocol/Vincent/commit/b94ca569))
|
|
47
|
+
|
|
48
|
+
Previously, `getVincentAbilityClient()` and `disconnectVincentAbilityClients()` were exported from the root of the `vincent-app-sdk` package.
|
|
49
|
+
These methods, along with several other methods are now exported from the `@lit-protocol/app-sdk/abilityClient` namespace
|
|
50
|
+
|
|
51
|
+
```typescript
|
|
52
|
+
import {
|
|
53
|
+
getVincentAbilityClient,
|
|
54
|
+
disconnectVincentAbilityClients,
|
|
55
|
+
isAbilityResponseFailure,
|
|
56
|
+
isAbilityResponseRuntimeFailure,
|
|
57
|
+
isAbilityResponseSchemaValidationFailure,
|
|
58
|
+
isAbilityResponseSuccess,
|
|
59
|
+
} from '@lit-protocol/app-sdk/abilityClient';
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
- #### Standardized `app` property on on JWT payload to be a number instead of a string. ([b94ca569](https://github.com/LIT-Protocol/Vincent/commit/b94ca569))
|
|
63
|
+
- #### Renamed `consent page` to `delegation auth page` ([b94ca569](https://github.com/LIT-Protocol/Vincent/commit/b94ca569))
|
|
64
|
+
- #### Move utils exports to `@lit-protocol/vincent-app-sdk/utils` ([b94ca569](https://github.com/LIT-Protocol/Vincent/commit/b94ca569))
|
|
65
|
+
- #### Moved jwt exports to `@lit-protocol/vincent-app-sdk/jwt` ([b94ca569](https://github.com/LIT-Protocol/Vincent/commit/b94ca569))
|
|
66
|
+
|
|
67
|
+
- Enhanced typedocs for all methods and removed type aliases for core functions
|
|
68
|
+
|
|
69
|
+
- #### Move `VincentWebAppClient` exports to `@lit-protocol/vincent-app-sdk/webAppClient` ([b94ca569](https://github.com/LIT-Protocol/Vincent/commit/b94ca569))
|
|
70
|
+
|
|
71
|
+
- Renamed `VincentWebAppClient` to `WebAuthClient`
|
|
72
|
+
- Renamed `VincentAppClientConfig` to `WebAuthClientConfig`
|
|
73
|
+
- Renamed `RedirectToVincentConsentPageParams` to `RedirectToVincentDelegationPageParams`
|
|
74
|
+
- Renamed `redirectToConsentPage()` to `redirectToDelegationAuthPage()`
|
|
75
|
+
- Renamed `getVincentWebAppClient()` to `getWebAuthClient()`
|
|
76
|
+
|
|
77
|
+
- #### Move express-authentication-middleware exports to `@lit-protocol/vincent-app-sdk/expressMiddleware` ([b94ca569](https://github.com/LIT-Protocol/Vincent/commit/b94ca569))
|
|
78
|
+
|
|
79
|
+
- Removed `ExpressAuthHelpers` interface - its types are now directly exported from the `expressMiddleware` package sub-path
|
|
80
|
+
|
|
81
|
+
- #### Moved abilityClient exports to `@lit-protocol/vincent-app-sdk/abilityClient` ([b94ca569](https://github.com/LIT-Protocol/Vincent/commit/b94ca569))
|
|
82
|
+
- ### Update express middleware to support non-app-specific JWTs ([9dd1cd26](https://github.com/LIT-Protocol/Vincent/commit/9dd1cd26))
|
|
83
|
+
|
|
84
|
+
- Replaced individual function exports of `authenticatedRequestHandler()` and `getAuthenticateUserExpressHandler()` with a single `createVincentUserMiddleware()` function
|
|
85
|
+
|
|
86
|
+
#### createVincentUserMiddleware({ allowedAudience, userKey, requiredAppId? }) -> { middleware(), handler() }
|
|
87
|
+
|
|
88
|
+
- You can now configure the property on `req` where the vincent user JWT data will be placed using `userKey`
|
|
89
|
+
- You can now configure the authentication middleware to throw if `requiredAppId` does not match a specific appId you provide
|
|
90
|
+
- `allowedAudience` behaviour remains unchanged
|
|
91
|
+
- See example usage on the API docs for the package @ http://docs.heyvincent.ai
|
|
92
|
+
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
- ### Support JWTs that are not app-specific ([0553a934](https://github.com/LIT-Protocol/Vincent/commit/0553a934))
|
|
98
|
+
|
|
99
|
+
This release adds support for general authentication JWTs that are not tied to a specific app. This is a breaking change that requires updates to code that uses the JWT validation functions.
|
|
100
|
+
|
|
101
|
+
#### API Changes
|
|
102
|
+
|
|
103
|
+
- `verify` and `decode` functions now accept object parameters instead of separate parameters
|
|
104
|
+
- Their return values are strongly typed based on whether `requiredAppId` is provided.
|
|
105
|
+
- They throw if `requiredAppId` is provided but the jwt is either not app-specific or the app id on the token doesn't match the `requiredAppId`
|
|
106
|
+
- `appId` type changed from `string` to `number` in WebAuthClient configuration
|
|
107
|
+
- WebAuthClient now throws an error if the `appId` it was configured with isn't in the JWT it decodes
|
|
108
|
+
|
|
109
|
+
#### New Functions
|
|
110
|
+
|
|
111
|
+
- `isGeneralJWT`: Type guard to check if a JWT is Vincent JWT that has no app associated
|
|
112
|
+
- `isAppSpecificJWT`: Type guard to check if a JWT is a vincent JWT that is app-specific
|
|
113
|
+
- `assertIsVincentJWT`: Assertion function to validate if a decoded JWT is a valid Vincent JWT
|
|
114
|
+
- `getAppInfo`: Convenience method that returns the app ID and version from an app-specific JWT's payload
|
|
115
|
+
- `getPKPInfo`: Convenience method that returns PKP information from any Vincent JWT's payload
|
|
116
|
+
|
|
117
|
+
#### New Types
|
|
118
|
+
|
|
119
|
+
- `VincentJWT`: Interface for a decoded Vincent JWT without app-specific details (general authentication)
|
|
120
|
+
- `VincentJWTAppSpecific`: Interface for a decoded app-specific Vincent JWT
|
|
121
|
+
- `BaseVincentJWTPayload`: Payload that contains always-present properties on all Vincent JWTs
|
|
122
|
+
- `VincentAppSpecificJWTPayload`: Extends VincentJWTPayload with app-specific information
|
|
123
|
+
|
|
124
|
+
- ## JWT Refactor ([c21bc3c3](https://github.com/LIT-Protocol/Vincent/commit/c21bc3c3))
|
|
125
|
+
|
|
126
|
+
#### Refactored our JWT structure, composition, and verification logic.
|
|
127
|
+
|
|
128
|
+
- Removed dependency on `did-jwt`; since we are signing using EIP-191 compliant signatures, the presence of `did:ethr` was misleading.
|
|
129
|
+
- Added support for Delegatee JWTs
|
|
130
|
+
|
|
131
|
+
#### We now support 3 types of JWT:
|
|
132
|
+
|
|
133
|
+
- `VincentJWTAppUser`
|
|
134
|
+
- `role` claim in the JWT payload is `app-user`
|
|
135
|
+
- Contains PKP info
|
|
136
|
+
- Is app-specific
|
|
137
|
+
- Is provided to app end-users, so that they can authenticate with services that are provided by individual Vincent Apps
|
|
138
|
+
- `VincentJWTPlatformUser`
|
|
139
|
+
- `role` claim in the JWT payload is `platform-user`
|
|
140
|
+
- Contains PKP info
|
|
141
|
+
- Used to authenticate with Vincent platform services (e.g. the registry backend)
|
|
142
|
+
- Is not app-specific
|
|
143
|
+
- The Vincent dashboard uses these for App owners and Ability & Policy authors
|
|
144
|
+
- `VincentJWTDelegatee`
|
|
145
|
+
- `role` claim in the JWT payload is `app-delegatee`
|
|
146
|
+
- Does not contain PKP info; delegatees are not PKP-backed
|
|
147
|
+
- Is not app-specific
|
|
148
|
+
- Used to authenticate with services that require proof that they are being used by a specific delegatee who has permissions to act on behalf of a delegator (app user) account.
|
|
149
|
+
|
|
150
|
+
### API Changes
|
|
151
|
+
|
|
152
|
+
- Many classes and interfaces were renamed to clearly indicate which type of JWT that they apply to.
|
|
153
|
+
- Added `publicKey` to the `payload` of all JWTs for signature verification convenience
|
|
154
|
+
- `iss` and `sub` are now raw hex-formatted ethers addresses, without `did:ethr` prefixes
|
|
155
|
+
- JWT verification has been converted to be an async process, and explicit verify methods have been defined for each type of JWT
|
|
156
|
+
- `verifyVincentAppUserJWT()`
|
|
157
|
+
- `verifyVincentPlatformJWT()`
|
|
158
|
+
- `verifyVincentDelegateeJWT()`
|
|
159
|
+
- Type-guard functions have also been added to help identify the kind of JWT you are using and provide type-safe references to those JWTs, but for most use-cases you will probably just use the type-specific `verify` methods.
|
|
160
|
+
- `isVincentJWTAppSpecific()`
|
|
161
|
+
- `isVincentPlatformJWT()`
|
|
162
|
+
- `isVincentJWTDelegatee()`
|
|
163
|
+
- `isAnyVincentJWT()`
|
|
164
|
+
- Added accessor helper functions to facilitate easy, type-safe access to properties on supported JWTs
|
|
165
|
+
- `getRole()` - All Vincent JWTs
|
|
166
|
+
- `getPublicKey()` - All Vincent JWTs
|
|
167
|
+
- `getIssuerAddress()` - All Vincent JWTs
|
|
168
|
+
- `getAudience()` - All Vincent JWTs
|
|
169
|
+
- `getSubjectAddress()` - Only for `VincentJWTDelegatee`
|
|
170
|
+
- `getAppInfo()` - Only for `VincentJWTAppUser`
|
|
171
|
+
- `getPKPInfo()` - Only for `VincentJWTAppUser` or `VincentJWTPlatformUser`
|
|
172
|
+
- `getAuthentication()` - Only for `VincentJWTAppUser` or `VincentJWTPlatformUser`
|
|
173
|
+
- `decode` has been renamed to `decodeVincentJWT()`;
|
|
174
|
+
- You probably want to use the type-specific `verify` methods instead of calling decode directly, unless you're absolutely sure that you've already verified the JWT and are positive it hasn't expired!
|
|
175
|
+
- This function returns an `AnyVincentJWT` type which you must narrow using type-guard functions.
|
|
176
|
+
|
|
177
|
+
### 🧱 Updated Dependencies
|
|
178
|
+
|
|
179
|
+
- Updated ability-sdk to 2.0.0
|
|
180
|
+
- Updated contracts-sdk to 2.0.0
|
|
181
|
+
|
|
182
|
+
### ❤️ Thank You
|
|
183
|
+
|
|
184
|
+
- Daryl Collins
|
|
185
|
+
- Wyatt Barnes @spacesailor24
|
|
186
|
+
|
|
1
187
|
## 1.0.2 (2025-07-08)
|
|
2
188
|
|
|
3
189
|
### 🩹 Fixes
|
package/dist/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lit-protocol/vincent-app-sdk",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "Vincent SDK for browser and backend",
|
|
5
5
|
"author": "Lit Protocol",
|
|
6
6
|
"license": "ISC",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"@lit-protocol/auth-helpers": "^7.0.9",
|
|
56
56
|
"@lit-protocol/constants": "^7.0.8",
|
|
57
57
|
"@lit-protocol/lit-node-client": "^7.0.8",
|
|
58
|
-
"@lit-protocol/vincent-ability-sdk": "
|
|
58
|
+
"@lit-protocol/vincent-ability-sdk": "workspace:*",
|
|
59
59
|
"@lit-protocol/vincent-contracts-sdk": "workspace:*",
|
|
60
60
|
"@noble/secp256k1": "^2.2.3",
|
|
61
61
|
"ethers": "5.8.0",
|
|
@@ -11,8 +11,7 @@ export declare function createAppUserJWT(config: CreateAppUserJWTParams): Promis
|
|
|
11
11
|
/**
|
|
12
12
|
* Creates a JWT for an app delegatee (Ethereum account that may act on behalf of a user).
|
|
13
13
|
*
|
|
14
|
-
*
|
|
15
|
-
* which should be a valid delegator for your Delegatee address.
|
|
14
|
+
* You must provide a valid `subjectAddress`, which must be a valid delegator for your Delegatee address.
|
|
16
15
|
*
|
|
17
16
|
* @category API > Create
|
|
18
17
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../../../src/jwt/core/create.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,sBAAsB,EACtB,wBAAwB,EACxB,2BAA2B,
|
|
1
|
+
{"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../../../src/jwt/core/create.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,sBAAsB,EACtB,wBAAwB,EACxB,2BAA2B,EAI5B,MAAM,UAAU,CAAC;AAuDlB;;;KAGK;AACL,wBAAsB,qBAAqB,CAAC,MAAM,EAAE,2BAA2B,GAAG,OAAO,CAAC,MAAM,CAAC,CAYhG;AAED;;KAEK;AACL,wBAAsB,gBAAgB,CAAC,MAAM,EAAE,sBAAsB,GAAG,OAAO,CAAC,MAAM,CAAC,CAqBtF;AAED;;;;;;GAMG;AACH,wBAAsB,kBAAkB,CAAC,MAAM,EAAE,wBAAwB,GAAG,OAAO,CAAC,MAAM,CAAC,CAQ1F"}
|
|
@@ -6,6 +6,7 @@ exports.createDelegateeJWT = createDelegateeJWT;
|
|
|
6
6
|
const utils_1 = require("ethers/lib/utils");
|
|
7
7
|
const constants_1 = require("../constants");
|
|
8
8
|
const base64_1 = require("./utils/base64");
|
|
9
|
+
const ensureHex = (s) => (0, utils_1.hexlify)(s, { allowMissingPrefix: true });
|
|
9
10
|
function createES256KSigner(wallet) {
|
|
10
11
|
return async (data) => {
|
|
11
12
|
const messageBytes = typeof data === 'string' ? (0, utils_1.toUtf8Bytes)(data) : data;
|
|
@@ -22,12 +23,14 @@ async function createJWS({ payload, wallet, config }) {
|
|
|
22
23
|
const iat = Math.floor(Date.now() / 1000);
|
|
23
24
|
const exp = (payload.nbf || Math.floor(Date.now() / 1000) + expiresInMinutes * 60);
|
|
24
25
|
const header = { alg: 'ES256K', typ: 'JWT' };
|
|
26
|
+
const iss = ensureHex(await wallet.getAddress());
|
|
27
|
+
const publicKey = ensureHex(wallet.publicKey);
|
|
25
28
|
const _payload = {
|
|
26
29
|
...payload,
|
|
27
30
|
iat,
|
|
28
31
|
exp,
|
|
29
|
-
iss
|
|
30
|
-
publicKey
|
|
32
|
+
iss,
|
|
33
|
+
publicKey,
|
|
31
34
|
aud: audience,
|
|
32
35
|
role,
|
|
33
36
|
...(subjectAddress ? { sub: subjectAddress } : {}),
|
|
@@ -77,8 +80,7 @@ async function createAppUserJWT(config) {
|
|
|
77
80
|
/**
|
|
78
81
|
* Creates a JWT for an app delegatee (Ethereum account that may act on behalf of a user).
|
|
79
82
|
*
|
|
80
|
-
*
|
|
81
|
-
* which should be a valid delegator for your Delegatee address.
|
|
83
|
+
* You must provide a valid `subjectAddress`, which must be a valid delegator for your Delegatee address.
|
|
82
84
|
*
|
|
83
85
|
* @category API > Create
|
|
84
86
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create.js","sourceRoot":"","sources":["../../../../src/jwt/core/create.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"create.js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EAAE,OAAO,GAAG,EAAE,EAAE,GAAG,MAAM,CAAC;IAEhG,OAAO,SAAS,CAAC;QACf,OAAO,EAAE;YACP,GAAG,OAAO;YACV,OAAO;YACP,cAAc;SACf;QACD,MAAM,EAAE,SAAS;QACjB,MAAM,EAAE,EAAE,QAAQ,EAAE,gBAAgB,EAAE,IAAI,EAAE,eAAe,EAAE;KAC9D,CAAC,CAAC;AACL,CAAC;AAED;;KAEK;AACE,KAAK,UAAU,gBAAgB,CAAC,MAA8B;IACnE,MAAM,EACJ,GAAG,EACH,SAAS,EACT,OAAO,EACP,cAAc,EACd,QAAQ,EACR,gBAAgB,EAChB,OAAO,GAAG,EAAE,GACb,GAAG,MAAM,CAAC;IAEX,OAAO,SAAS,CAAC;QACf,OAAO,EAAE;YACP,GAAG,OAAO;YACV,OAAO;YACP,GAAG;YACH,cAAc;SACf;QACD,MAAM,EAAE,SAAS;QACjB,MAAM,EAAE,EAAE,QAAQ,EAAE,gBAAgB,EAAE,IAAI,EAAE,UAAU,EAAE;KACzD,CAAC,CAAC;AACL,CAAC;AAED;;;;;;GAMG;AACI,KAAK,UAAU,kBAAkB,CAAC,MAAgC;IACvE,MAAM,EAAE,YAAY,EAAE,cAAc,EAAE,QAAQ,EAAE,gBAAgB,EAAE,OAAO,GAAG,EAAE,EAAE,GAAG,MAAM,CAAC;IAE1F,OAAO,SAAS,CAAC;QACf,OAAO;QACP,MAAM,EAAE,YAAY;QACpB,MAAM,EAAE,EAAE,QAAQ,EAAE,gBAAgB,EAAE,cAAc,EAAE,IAAI,EAAE,eAAe,EAAE;KAC9E,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verifyES256KSignature.d.ts","sourceRoot":"","sources":["../../../../../src/jwt/core/utils/verifyES256KSignature.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAKjD,wBAAsB,qBAAqB,CAAC,EAAE,OAAO,EAAE,EAAE;IAAE,OAAO,EAAE,aAAa,CAAA;CAAE,
|
|
1
|
+
{"version":3,"file":"verifyES256KSignature.d.ts","sourceRoot":"","sources":["../../../../../src/jwt/core/utils/verifyES256KSignature.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAKjD,wBAAsB,qBAAqB,CAAC,EAAE,OAAO,EAAE,EAAE;IAAE,OAAO,EAAE,aAAa,CAAA;CAAE,iBA8BlF"}
|
|
@@ -15,10 +15,7 @@ async function verifyES256KSignature({ decoded }) {
|
|
|
15
15
|
// Extract r and s values from the signature
|
|
16
16
|
const r = signatureBytes.slice(0, 32);
|
|
17
17
|
const s = signatureBytes.slice(32, 64);
|
|
18
|
-
const
|
|
19
|
-
? decoded.payload.publicKey
|
|
20
|
-
: `0x${decoded.payload.publicKey}`;
|
|
21
|
-
const publicKeyBytes = (0, utils_1.arrayify)(publicKeyHex);
|
|
18
|
+
const publicKeyBytes = (0, utils_1.arrayify)(decoded.payload.publicKey, { allowMissingPrefix: true });
|
|
22
19
|
// PKPEthersWallet.signMessage() adds Ethereum prefix, so we need to add it here too
|
|
23
20
|
const ethPrefixedMessage = '\x19Ethereum Signed Message:\n' + data.length + data;
|
|
24
21
|
const messageHashBytes = (0, utils_1.arrayify)(ethers_1.ethers.utils.keccak256((0, utils_1.toUtf8Bytes)(ethPrefixedMessage)));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verifyES256KSignature.js","sourceRoot":"","sources":["../../../../../src/jwt/core/utils/verifyES256KSignature.ts"],"names":[],"mappings":";;AASA,
|
|
1
|
+
{"version":3,"file":"verifyES256KSignature.js","sourceRoot":"","sources":["../../../../../src/jwt/core/utils/verifyES256KSignature.ts"],"names":[],"mappings":";;AASA,sDA8BC;;AAvCD,oEAA8C;AAC9C,mCAAgC;AAChC,4CAAyD;AAIzD,+CAA4C;AAC5C,qCAAsC;AAE/B,KAAK,UAAU,qBAAq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@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/jwt/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAErC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAErD,MAAM,MAAM,eAAe,GAAG,IAAI,CAAC,MAAM,EAAE,aAAa,GAAG,WAAW,CAAC,CAAC;AAExE;;;GAGG;AACH,MAAM,MAAM,wBAAwB,GAChC,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,WAAW,GACX,MAAM,GACN,wBAAwB,CAAC;AAE7B,KAAK,YAAY,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,GAAG,IAAI;KACzC,CAAC,IAAI,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CACjC,GAAG;KACD,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,KAAK;CACjB,CAAC;AAEF;;;;;;;;GAQG;AACH,MAAM,MAAM,+BAA+B,GAAG,YAAY,CACxD,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EACnB,wBAAwB,CACzB,CAAC;AAEF,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,+BAA+B,CAAC;IACzC,MAAM,EAAE,eAAe,CAAC;IACxB,MAAM,EAAE;QACN,QAAQ,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;QAC5B,gBAAgB,EAAE,MAAM,CAAC;QACzB,cAAc,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/jwt/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAErC,OAAO,KAAK,EAAE,eAAe,EA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MAAM,MAAM,aAAa,GAAG,sBAAsB,GAAG,iBAAiB,GAAG,mBAAmB,CAAC;AAE7F,UAAU,aAAa;IACrB,OAAO,CAAC,EAAE,+BAA+B,CAAC;IAC1C,QAAQ,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAC5B,gBAAgB,EAAE,MAAM,CAAC;CAC1B;AAED,UAAU,mBAAoB,SAAQ,aAAa;IACjD,SAAS,EAAE,eAAe,CAAC;IAC3B,OAAO,EAAE,SAAS,CAAC;IACnB,cAAc,EAAE,uBAAuB,CAAC;CACzC;AAED;;;GAGG;AACH,MAAM,MAAM,2BAA2B,GAAG,mBAAmB,CAAC;AAE9D;;;GAGG;AACH,MAAM,WAAW,sBAAuB,SAAQ,mBAAmB;IACjE,GAAG,EAAE;QACH,EAAE,EAAE,MAAM,CAAC;QACX,OAAO,EAAE,MAAM,CAAC;KACjB,CAAC;CACH;AAED;;;GAGG;AACH,MAAM,WAAW,wBAAyB,SAAQ,aAAa;IAC7D,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,KAAK,MAAM,EAAE,CAAC;CAC/B"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lit-protocol/vincent-app-sdk",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "Vincent SDK for browser and backend",
|
|
5
5
|
"author": "Lit Protocol",
|
|
6
6
|
"license": "ISC",
|
|
@@ -49,12 +49,12 @@
|
|
|
49
49
|
"@lit-protocol/auth-helpers": "^7.0.9",
|
|
50
50
|
"@lit-protocol/constants": "^7.0.8",
|
|
51
51
|
"@lit-protocol/lit-node-client": "^7.0.8",
|
|
52
|
-
"@lit-protocol/vincent-ability-sdk": "0.0.7-mma",
|
|
53
52
|
"@noble/secp256k1": "^2.2.3",
|
|
54
53
|
"ethers": "5.8.0",
|
|
55
54
|
"tslib": "^2.8.1",
|
|
56
55
|
"zod": "3.25.64",
|
|
57
|
-
"@lit-protocol/vincent-
|
|
56
|
+
"@lit-protocol/vincent-ability-sdk": "2.0.0",
|
|
57
|
+
"@lit-protocol/vincent-contracts-sdk": "1.0.1"
|
|
58
58
|
},
|
|
59
59
|
"sideEffects": false,
|
|
60
60
|
"files": [
|