-
Notifications
You must be signed in to change notification settings - Fork 80
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
Adding Session Storage Interface #256
Adding Session Storage Interface #256
Conversation
SMA-60 Add session storage feature in the sdk
Add classes related to session storage with support for local storage initially and then later remote storage at some persistent storage 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.
I was thinking maybe we should another method as resetState
which sets the data to null so if there is a mismatch in dapp the dapp wil reset the data and agar merkle with just one root value will be set?
A method to reset the state can be added, but when will the client call this method? I hope this will be checked by the implementation of session storage interface which will check this matching of merkle root in storage with on-chain data |
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.
reviewed
sessionValidationModule: string | ||
sessionKeyData: string | ||
signerPublicKey: string | ||
sessionID: 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.
would this not be optional?
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.
Done.
validAfter: number | ||
sessionValidationModule: string | ||
sessionKeyData: string | ||
signerPublicKey: 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.
can we rename to sessionPublicKey
status: SessionStatus | ||
} | ||
|
||
export type SessionSearchParam = { |
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.
from where we will get scw address information?
yesterday we discussed scw address, session validation module address and session pubkey will give a unique leaf.
but not just scw address and validation module address - as there may be two different session pub keys active in different browser for the same user for same session.
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.
When user will create an instance of SessionLocalStorage then in that constructor user will pass SCW address and the json data that'll be stored in the storage will be against that scw address.
So if user uses a different SCW address tomorrow, then a new key and data will be created in local storage for that user. You'll see once you see the implementation of this interface.
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.
LGTM
Description
Please include a summary of the changes and the related issue. Please also include relevant motivation and context. List any dependencies that are required for this change.
Fixes # (issue)
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Test Configuration:
Checklist: