Tooling
Module SDK
Modules
encodeUseOrEnableSmartSessionSignature

⚠️ Deprecation Notice

ModuleSDK was developed by Rhinestone and is no longer actively supported. For new projects, we recommend using the Rhinestone SDK instead.

Rhinestone SDK Documentation (opens in a new tab)

encodeUseOrEnableSmartSessionSignature

Get encoded smart session signature.

Usage

const encodedSig = encodeUseOrEnableSmartSessionSignature({
  account,
  client,
  permissionId: '0xabcd....',
  signature: '0x1234...',
  enableSessionData: {
    enableSession: {
      chainDigestIndex: 0,
      hashesAndChainIds,
      sessionToEnable,
      permissionEnableSig,
    },
    validator: OWNABLE_VALIDATOR_ADDRESS,
    accountType: account.type,
  },
})

Parameters

account

The account object.

client

  • Type: PublicClient

The rpc client to use for the chain you want.

permissionId

The permission ID of the session to enable.

signature

The signature of the session to enable.

enableSessionData

The data needed to enable a session in an account.

Returns

encodedSignature

  • Type: Hex

The encoded smart session signature.