The constructor of the Session class.
SessionOptions
ReadonlyabiReadonlyabisReadonlyallowOptional ReadonlyappReadonlyawaitReadonlybroadcastOptional ReadonlybroadcastReadonlychainReadonlyexpireReadonlyfetchOptional ReadonlyonReadonlypermissionOptional ReadonlysessionOptional ReadonlystorageReadonlytransactReadonlytransactOptional ReadonlyuiReturns the name of the actor that is being used for this session.
Returns an APIClient configured for this session.
Get the data stored in this session instance.
Set the data stored in this session instance.
Returns the name of the permission that is being used for this session.
Get the wallet plugin for this session.
Create a clone of the given SigningRequest
The SigningRequest to clone
The ABICacheInterface to use for the clone
Returns a cloned SigningRequest with updated abiCache and zlib
Convert any provided form of TransactArgs to a SigningRequest
Returns a SigningRequest
Optionaloptions: TransactOptionsGet the current status of the session key for this session.
SessionKeyStatus indicating whether a session key is active, inactive, has a mismatch, or is not set up
Check if this session has a session key wallet. Type guard that narrows walletPlugin to SessionKeyWalletInterface.
True if the wallet plugin is a session key wallet
Rewrite action authorizations to use the session key permission instead of the primary permission. Only rewrites actions that match the session permission and are whitelisted.
The transaction arguments to rewrite
Modified TransactArgs with session key permissions, or original args if not applicable
Serialize the session to a plain object for storage.
SerializedSession object containing chain, actor, permission, and wallet plugin data
Alters the session config to change the API endpoint in use
Set up a session key for this session, creating a new permission with a generated key. Shows consent UI if configured, handles conflicts with existing keys, and persists the session.
SessionKeySetupResult containing the public key and permission name
Request a signature for a given transaction.
This function will NOT use plugins and will NOT broadcast the transaction.
A full transaction-like object
The signature(s) for the transaction
Perform a transaction using this session.
Optionaloptions: TransactOptionsThe status and data gathered during the operation.
Update a SigningRequest, ensuring its old metadata is retained.
Templates in any missing fields from partial transactions.
TransactArgs
TransactArgs
Validate the session key whitelist against the on-chain permission links. Returns any mismatches between configured whitelist and actual blockchain state.
SessionKeyMismatch if there are differences, undefined if in sync or no session key
Determine if the given transaction will be signed using the session key. Checks if session has a session key and all relevant actions are whitelisted.
The transaction arguments to check
True if the session key will be used for signing
StaticmatchesCheck if two sessions match by comparing chain, actor, and permission.
Session or SerializedSession
Session or SerializedSession
boolean indicating if the sessions match
A representation of a session to interact with a specific blockchain account.