-
Notifications
You must be signed in to change notification settings - Fork 25
Open
Milestone
Description
This is the old API:
synapse-sdk/packages/synapse-sdk/src/session/key.ts
Lines 11 to 21 in 3abd5c9
| * ```typescript | |
| * const sessionKey = synapse.createSessionkey(privateKey) | |
| * const expiries = await sessionKey.fetchExpiries([ADD_PIECES_TYPEHASH]) | |
| * if (expiries[ADD_PIECES_TYPEHASH] * BigInt(1000) < BigInt(Date.now()) + HOUR_MILLIS) { | |
| * const DAY_MILLIS = BigInt(24) * HOUR_MILLIS | |
| * const loginTx = await sessionKey.login(BigInt(Date.now()) / BigInt(1000 + 30 * DAY_MILLIS), PDP_PERMISSIONS, "example.com") | |
| * const loginReceipt = await loginTx.wait() | |
| * } | |
| * synapse.setSession(sessionKey) | |
| * const context = await synapse.storage.createContext() | |
| * ``` |
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
🐱 Todo