You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.
abstractclassBaseRecoveryClient{private_apiClient!: apiClient.APIClient;private_queryKeys!: Set<string>;publicconnect(_connectionObj: ConnectionObj){// check for mode of connection and use connectionString to connect to the relevant client}publicasyncgetInclusionProof(_keys: string[]){// Call RPC to get inclusionProof and return in appropriate format// await this._apiClient.invoke('state_prove', {});}publicaddQueryKeyForInclusionProof(queryKey: string){this._queryKeys.add(queryKey);}publiccollectInclusionProofs(){// subscribe to chain_newBlock event and on every new block query the client with all the proofsthis._apiClient.subscribe('chain_newBlock',_=>{this.getInclusionProof([...this._queryKeys.values()]);// save proof for each key in stateRecoveryDB with key { sidechainID+queryKey }});}publicremoveQueryKey(queryKey: string){this._queryKeys.delete(queryKey);}// Based on finalized height and last certificate on the other chain delete irrelevant recovery datapubliccleanupStateRecoveryData(){}// Disconnect client and release resourcespublicdisconnectClient(){}}classMainchainRecoveryClientextendsBaseRecoveryClient{// Collect new CCMs from the on-chain events// Collect inclusionProofs for the sidechain outbox for the CCMs: This part is done by calling addQueryKeyForInclusionProof from the manager classpubliccollectCCMsAndProofs(){// collect CCMs on every newBlock and by calling getEvents for the block height and save them in messageRecoveryDB}// Based on finalized height and last certificate on the other chain delete irrelevant message recovery datapubliccleanupMessageRecoveryData(){}}classSidechainRecoveryClientextendsBaseRecoveryClient{}
Acceptance Criteria
Should have all the method definition
Should have all the unit tests for the implemented methods
The text was updated successfully, but these errors were encountered:
Description
SidechainRecoveryClient
classAcceptance Criteria
The text was updated successfully, but these errors were encountered: