Integrate and manage sessions in your Solana Programs
Session
trait is derived on the Increment
struct, enabling session functionality.
SessionToken
account, specifying the signer and authority for the session.
session_auth_or
macro:increment
function.
It checks for a valid session token, or if not present, verifies that the signer is the counter’s authority.
solana-test-validator
, you need to start it with the session keys program and account.
-r
- reset the ledger to genesis-ud
- URL for Solana’s JSON RPC or moniker (-ud = DEVNET)--clone
- Copy an account from the cluster--bpf-program
- add a SBF program to the genesis configuration