Document BCHBull integration process for third-parties
There's been a bit of interest in TG channels about Bull Integration.
It may be a good idea to document the general flow/integration steps for this.
The below is a starting point for a Sequence Diagram (should be more thorough) to give integrators a high-level overview of how the interaction should look.
title BCHBull Integration - Contract Creation Flow
Client App->Liquidity Provider: prepareContractPosition
Liquidity Provider->Client App: [PayoutDetailsFromLiquidityProvider]
Client App->Client App: createContract
note right of Client App: We must generate contract locally to get the address.
Client App->Liquidity Provider: proposeContract
note right of Client App: This step attempts to register the Contract with the LP...
Liquidity Provider->Settlement Service: registerContract (or something)
Settlement Service->Liquidity Provider: response
Liquidity Provider->Client App: [ContractProposalResponseFromLiquidityProvider]
note right of Client App: Fetch final contract data from SS (inc's fees).
Client App->Settlement Service: getContractStatus
Settlement Service->Client App: response
Wallet->Client App: Send Taker UTXO
Client App->Liquidity Provider: fundContract
Liquidity Provider->Blockchain: Broadcast Contract
Blockchain->Liquidity Provider: response
Liquidity Provider->Client App: [CompletedFundingFromLiquidityProvider]