Skip to main content

🧡 Recover a Lost Account and Tokens

Welcome to the complete guide for the "Recover a Lost Account" workflow for the Token City Blockchain API.

This workflow enables you to recover a lost blockchain account along with its associated tokens, by generating the appropriate EIP712 signature and executing the recovery operation.

🌟 Objective: Securely recover a user's blockchain account and its token assets in case of account loss.


πŸ“š OpenAPI Documentation​


✨ Workflow Summary​

This workflow automates the recovery process of a lost account on the Token City blockchain:

  1. πŸ”Ή Generate typed data for EIP712 signature for the account recovery.
  2. πŸ”Ή Sign the generated EIP712 object using the custodian account.
  3. πŸ”Ή Recover the lost account and its tokens using the signed data.

πŸ“‹ Workflow Steps Table​

StepAPI OperationMethodParametersOutputsDescription
Generate EIP712 Typed DataPOST /erc3643/{tokenId}/recovery-address/eip712-typed-data-tokenId, newAccountAddresstypedDataPrepares the typed data needed for EIP712 signing
Sign EIP712 ObjectPOST /accounts/{accountId}/signEip712-typedDatasignatureSigns the typed EIP712 object with the custodian account
Recover Lost AccountPOST /erc3643/{tokenId}/recovery-address-tokenId, newAccountAddress, signature-Executes the account recovery and transfers tokens

🎨 Workflow Visualizations​

sequenceDiagram
participant Client
participant API

Client->>API: POST /erc3643/{tokenId}/recovery-address/eip712-typed-data
API-->>Client: typedData

Client->>API: POST /accounts/{accountId}/signEip712
API-->>Client: signature

Client->>API: POST /erc3643/{tokenId}/recovery-address
API-->>Client: Success (Account Recovered)