Skip to content

Session key inline docs outdated #590

@juliangruber

Description

@juliangruber

This is the old API:

* ```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()
* ```

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    🐱 Todo

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions