feat: new types for directed identity, improved grant#24
Conversation
🦋 Changeset detectedLatest commit: 042f2d4 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
| export type Client = | ||
| | string | ||
| | { walletAddress: string; jwk?: never } | ||
| | { jwk: JWK; walletAddress?: never } |
There was a problem hiding this comment.
New client type for the directed identity support.
Directed identity changes and the grant spent amount fixes were both included in new 1.3 version of spec. Perhaps they should have been more granular versions (grant spent amount fix, then directed identity).
If this is released before Rafiki is updated then the jwk option wont work. However, it may also give clients more time to update to the new pattern (string -> {walletAddress: string}. I guess if we wanted we could simply omit the { jwk: JWK; walletAddress?: never } item here for now and include once implemented in rafiki?
There was a problem hiding this comment.
I assume that the "string" format is to be interpreted as a wallet address url, correct?
There was a problem hiding this comment.
That is correct - for backwards compatibility purposes. Should be removed at some point in favor of the object only.
475c90e to
042f2d4
Compare
| export type Client = | ||
| | string | ||
| | { walletAddress: string; jwk?: never } | ||
| | { jwk: JWK; walletAddress?: never } |
There was a problem hiding this comment.
I assume that the "string" format is to be interpreted as a wallet address url, correct?
Updates to latest open payments spec (grant spent amount fix, directed identity).
GrantWithAccessToken,GrantWithSubject)spentReceiveAmount: Amount | null)clientfield to be string (as currently) or new object with string/jwk.