Skip to content

Commit

Permalink
updated readme
Browse files Browse the repository at this point in the history
  • Loading branch information
parisyup committed Jul 7, 2024
1 parent 312dce5 commit ce0705a
Show file tree
Hide file tree
Showing 8 changed files with 82 additions and 6 deletions.
44 changes: 41 additions & 3 deletions java-samples/sendAndRecieveTransaction/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Go to `POST /flow/{holdingidentityshorthash}`, enter the identity short hash(Ali
```

After trigger the create-IOU flow, hop to `GET /flow/{holdingidentityshorthash}/{clientrequestid}` and enter the short hash(Alice's hash) and client request id to view the flow result
The stateRef of the transaction will be returned as a result of the flow query. Which is the "flowResult"
The stateRef of the transaction will be returned as a result of the flow query. Which is the "flowResult".

#### Step 2: Sending a copy of the transaction to a third party.
If a member needs to share a copy of their transaction with another member,
Expand All @@ -65,5 +65,43 @@ we can execute the following request body with her short hash:
}
```

Ensure to replace the stateRef with the stateRef of the transaction.
After running this flow Dave will have the transaction in his vault.
Ensure to replace the stateRef variable with the stateRef of the transaction in the requestbody
of the transaction.
After running this flow Dave will have the transaction in his vault.


Results

Currently, Alice has two transactions stored in her vault.
The transaction we aim to send to Charlie is identified by the ID SHA-256D:8DFDD672….
You can view Alice's transactions in the image provided below:

<p align="center">
<img width="1000" alt="Encumbrance Flow" src="./aliceVault.png">
</p>

On the other hand, Charlie’s vault currently holds no transactions,
as illustrated in the image below:

<p align="center">
<img width="1000" alt="Encumbrance Flow" src="./charlieBefore.png">
</p>

Once Alice executes the flow, Charlie’s vault is updated to include the transaction,
which is displayed as follows:

<p align="center">
<img width="1000" alt="Encumbrance Flow" src="./charlieAfter.png">
</p>

All images of the vault were sourced through DBeaver by establishing a connection
to the Cordapp using PostgreSQL. The credentials utilized for this connection are as follows:

POSTGRES_DB = cordacluster <br>
POSTGRES_USER = postgres <br>
POSTGRES_PASSWORD = password

To access the vault, navigate through the hierarchy in
PostgreSQL: Databases > cordacluster > Schemas > vnode_vault_(HASH_ID_OF_VNODE) >
Tables > utxo_transaction. To view the transactions,
simply double-click on utxo_transaction.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
44 changes: 41 additions & 3 deletions kotlin-samples/sendAndRecieveTransaction/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Go to `POST /flow/{holdingidentityshorthash}`, enter the identity short hash(Ali
```

After trigger the create-IOU flow, hop to `GET /flow/{holdingidentityshorthash}/{clientrequestid}` and enter the short hash(Alice's hash) and client request id to view the flow result
The stateRef of the transaction will be returned as a result of the flow query. Which is the "flowResult"
The stateRef of the transaction will be returned as a result of the flow query. Which is the "flowResult".

#### Step 2: Sending a copy of the transaction to a third party.
If a member needs to share a copy of their transaction with another member,
Expand All @@ -65,5 +65,43 @@ we can execute the following request body with her short hash:
}
```

Ensure to replace the stateRef with the stateRef of the transaction.
After running this flow Dave will have the transaction in his vault.
Ensure to replace the stateRef variable with the stateRef of the transaction in the requestbody
of the transaction.
After running this flow Dave will have the transaction in his vault.


Results

Currently, Alice has two transactions stored in her vault.
The transaction we aim to send to Charlie is identified by the ID SHA-256D:8DFDD672….
You can view Alice's transactions in the image provided below:

<p align="center">
<img width="1000" alt="Encumbrance Flow" src="./aliceVault.png">
</p>

On the other hand, Charlie’s vault currently holds no transactions,
as illustrated in the image below:

<p align="center">
<img width="1000" alt="Encumbrance Flow" src="./charlieBefore.png">
</p>

Once Alice executes the flow, Charlie’s vault is updated to include the transaction,
which is displayed as follows:

<p align="center">
<img width="1000" alt="Encumbrance Flow" src="./charlieAfter.png">
</p>

All images of the vault were sourced through DBeaver by establishing a connection
to the Cordapp using PostgreSQL. The credentials utilized for this connection are as follows:

POSTGRES_DB = cordacluster <br>
POSTGRES_USER = postgres <br>
POSTGRES_PASSWORD = password

To access the vault, navigate through the hierarchy in
PostgreSQL: Databases > cordacluster > Schemas > vnode_vault_(HASH_ID_OF_VNODE) >
Tables > utxo_transaction. To view the transactions,
simply double-click on utxo_transaction.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit ce0705a

Please sign in to comment.