Skip to content

Commit

Permalink
documentation of the wrapper contract
Browse files Browse the repository at this point in the history
document(satp-hermes): Wrapper documentation

document(satp-hermes): Wrapper documentation

document(satp-hermes): Example contracts  documentation

docs: README changes

Signed-off-by: Carlos Amaro <[email protected]>
  • Loading branch information
LordKubaya committed Dec 14, 2024
1 parent 7f99648 commit a73ade3
Show file tree
Hide file tree
Showing 8 changed files with 465 additions and 38 deletions.
40 changes: 24 additions & 16 deletions packages/cactus-plugin-satp-hermes/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,27 +55,35 @@ Firstly let us identify the different entities involved in the protocol and what

The sequence diagram of SATP is pictured below.

![satp-sequence-diagram](https://i.imgur.com/SOdXFEt.png)
![satp-sequence-diagram](images/SATP-Protocol.jpg))

### Application-to-Gateway API (API Type 1)
We

### Gateway-to-Gateway API (API Type 2)
This plugin uses OpenAPI to generate the API paths.
There are Client and Server Endpoints for each type of message detailed in the SATP protocol:

- TransferInitializationV1Request
- TransferInitializationV1Response
- TransferCommenceV1Request
- TransferCommenceV1Response
- LockEvidenceV1Request
- LockEvidenceV1Response
- CommitPreparationV1Request
- CommitPreparationV1Response
- CommitFinalV1Request
- CommitFinalV1Response
- TransferCompleteV1Request
- ClientV1Request
This plugin in the Gateway-to-Gateway communication uses grpc.

There are Client and Server GRPC Endpoints for each type of message detailed in the SATP protocol:

- Stage 0:
- NewSessionRequest
- NewSessionResponse
- PreSATPTransferRequest
- PreSATPTransferResponse
- Stage 1:
- TransferProposalRequestMessage
- TransferProposalReceiptMessage
- TransferCommenceRequestMessage
- TransferCommenceResponseMessage
- Stage 2:
- LockAssertionRequestMessage
- LockAssertionReceiptMessage
- Stage 3:
- CommitPreparationRequestMessage
- CommitReadyResponseMessage
- CommitFinalAssertionRequestMessage
- CommitFinalAcknowledgementReceiptResponseMessage
- TransferCompleteRequestMessage

There are also defined the endpoints for the crash recovery procedure (there is still missing the endpoint to receive the Rollback mesage):
- RecoverV1Message
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
* SPDX-License-Identifier: Apache-2.0
*/

/**
* InteractionSignatureType is an enum that represents the type of the interaction signature.
*/
export enum InteractionSignatureType {
MINT = 0,
BURN = 1,
Expand All @@ -11,6 +14,9 @@ export enum InteractionSignatureType {
UNLOCK = 5,
}

/**
* VarType is an enum that represents the type of the variables.
*/
export enum VarType {
CONTRACTNAME = 0,
CHANNELNAME = 1,
Expand Down
Loading

0 comments on commit a73ade3

Please sign in to comment.