-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/lit 3017 auth unification migrate actual tests #440
Changes from 1 commit
9c4077b
e01e076
bcad173
451e0e7
d428bad
eaf014b
660759f
f30a10a
8b92666
b4a53db
1c17275
8a8694a
3b7de45
e424daf
6e0e4ef
2695204
7bc363d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -244,6 +244,11 @@ export interface BaseJsonExecutionRequest { | |
authMethods?: AuthMethod[]; | ||
} | ||
|
||
/** | ||
* FIXME: We should create a separate interface for JsExecutionRequestBody | ||
* a body that the SDK accepts, and another one the node actually accepts. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why can't we have a single interface? |
||
* | ||
*/ | ||
export interface WithAuthSig extends BaseJsonExecutionRequest { | ||
authSig: AuthSig; | ||
sessionSigs?: any; | ||
|
@@ -257,7 +262,7 @@ export interface WithSessionSigs extends BaseJsonExecutionRequest { | |
export type JsonExecutionRequest = WithAuthSig | WithSessionSigs; | ||
|
||
export interface JsExecutionRequestBody { | ||
Ansonhkg marked this conversation as resolved.
Show resolved
Hide resolved
|
||
authSig?: AuthSig; | ||
authSig: AuthSig; | ||
code?: string; | ||
ipfsId?: string; | ||
authMethods?: AuthMethod[]; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You can't provide authMethod any more There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @Ansonhkg this comment is remaining? |
||
|
@@ -313,7 +318,6 @@ export interface JsonSignSessionKeyRequestV1 { | |
sessionKey: string; | ||
authMethods: AuthMethod[]; | ||
pkpPublicKey?: string; | ||
authSig?: AuthSig; | ||
siweMessage: string; | ||
curveType: 'BLS'; | ||
code?: string; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Ansonhkg Can you please double check all you interfaces against the node counter parts eg: https://github.com/LIT-Protocol/lit-assets/blob/aff82c4381139476aeaa6faa814069b184d38d39/rust/lit-node/src/models/mod.rs#L177
Note, some params are still accepted in the nodes for backwards compatible reasons but they don't need to be present in the SDK as we're not making the SDK backwards compatible with the older node versions
For instance, we don't allow passing an AuthSig for signSessionKey: https://github.com/LIT-Protocol/lit-assets/blob/aff82c4381139476aeaa6faa814069b184d38d39/rust/lit-node/src/endpoints/versions/v1.rs#L59
There are bunch of other restrictions for the v1 endpoint in the above node file. We should make the SDK interfaces compatible with those restriction as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Ansonhkg this comment is remaining
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yea has been addressed in one of the comments below, will double check again here #435