Tooling
Module SDK
Modules
extractRecoveredAccountFromAcceptanceCommand

⚠️ 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)

extractRecoveredAccountFromAcceptanceCommand

Extract the account address from an acceptance email command's parameters.

Usage

const recoveredAccount = await extractRecoveredAccountFromAcceptanceCommand({
  client: publicClient,
  commandParams: ['0x...'],
  templateIdx: 0n
})

Parameters

client

  • Type: PublicClient

The public client instance used to interact with the blockchain.

commandParams

  • Type: Hex[]

Array of hex-encoded command parameters from the acceptance email.

templateIdx

  • Type: bigint

Template index parameter.

Returns

recoveredAccount

  • Type: Promise<Address>

Returns the decoded account address from the command parameters.

If the contract call fails, returns the zero address (0x0000000000000000000000000000000000000000).