π§΅ 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:
- πΉ Generate typed data for EIP712 signature for the account recovery.
- πΉ Sign the generated EIP712 object using the custodian account.
- πΉ Recover the lost account and its tokens using the signed data.
π Workflow Steps Tableβ
Step | API Operation | Method | Parameters | Outputs | Description |
---|---|---|---|---|---|
Generate EIP712 Typed Data | POST /erc3643/{tokenId}/recovery-address/eip712-typed-data | - | tokenId , newAccountAddress | typedData | Prepares the typed data needed for EIP712 signing |
Sign EIP712 Object | POST /accounts/{accountId}/signEip712 | - | typedData | signature | Signs the typed EIP712 object with the custodian account |
Recover Lost Account | POST /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)