You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+83-51Lines changed: 83 additions & 51 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,7 +22,7 @@ A demo dapp using both sessions and offchain sessions can be found here [https:/
22
22
23
23
First you need to have a deployed account. This is the account that will authorise the session and interact with the contracts of your dapp.
24
24
25
-
To sign the session message the method needed is `openSession`. After the user sign the message, a session account can be created using `buildSessionAccount`.
25
+
To sign the session message the method needed is `createSession`. After the user sign the message, a session account can be created using `buildSessionAccount`.
26
26
27
27
This example session will allow the dapp to execute an example endpoint on an example contract without asking the user to approve the transaction again. After signing the session the dapp can execute all transactions listed in `allowedMethods` whenever it wants and as many times as it wants.
28
28
@@ -45,8 +45,8 @@ export type SessionMetadata = {
45
45
projectSignature?:Signature
46
46
}
47
47
48
-
typeSessionParams= {
49
-
dappKey?:Uint8Array// this is optional. This sdk generate a dappKey using ec.starkCurve.utils.randomPrivateKey() if not provided
48
+
typeCreateSessionParams= {
49
+
sessionKey?:Uint8Array// this is optional. This sdk generate a sessionKey using ec.starkCurve.utils.randomPrivateKey() if not provided
50
50
allowedMethods:AllowedMethod[]
51
51
expiry:bigint
52
52
metaData:SessionMetadata
@@ -58,13 +58,21 @@ The following snippet show how to create and use a session account
0 commit comments