Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: moving the fx changes pr from documentation repo here #129

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
145 changes: 145 additions & 0 deletions assets/diagrams/sequence/figureFx1.plantuml
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
/'*****
License
--------------
Copyright © 2017 Bill & Melinda Gates Foundation
The Mojaloop files are made available by the Bill & Melinda Gates Foundation under the Apache License, Version 2.0 (the "License") and you may not use these files except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, the Mojaloop files are distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Contributors
--------------
This is the official list of the Mojaloop project contributors for this file.
Names of the original copyright holders (individuals or organizations)
should be listed with a '*' in the first column. People who have
contributed from an organization can be listed under the organization
that actually holds the copyright for their contributions (see the
Gates Foundation organization for an example). Those individuals should have
their names indented and be marked with a '-'. Email address can be added
optionally within square brackets <email>.
* Gates Foundation

- Name Surname <[email protected]>
--------------
******'/

@startuml

' define actor image
sprite $actor [25x48/16] {
0000000000010000000000000
0000000006CAC910000000000
0000000095101292000000000
0000000651000119000000000
0000000B10000018400000000
0000001A10000016600000000
0000000B10000017510000000
000000083100001A210000000
0000000191000176110000000
000000003A866A61100000000
0000000000466211100000000
0003333333334443333310000
0088888888888888888892000
0821111111111111111118200
8311111111111111111111A00
A111111111111111111111A20
A111111111111111111111A20
A111111111111111111111A20
A111111111111111111111A20
A111111111111111111111A20
A111111111111111111111A20
A111111111111111111111A20
A111111111111111111111A20
A111551111111111138111A20
A111661111111111139111A20
A211661111111111139111A20
A211661111111111139111A20
A211661111161111139111A20
A2116611111A2111139111A20
A2116611111A2111139111A20
A2116611111A2111139111A20
A7669611111A211113A666B20
36669611111A211113A666610
00016611111A2111139111110
00006611111A2111139100000
00006611111A2111139100000
00006611111A2111139100000
00006611111A2111139100000
00006611111A2111139100000
00006611111A2111139100000
00006611111A2111139100000
00006611111A2111139100000
00006611111A2111139100000
00006611111A2111139100000
00006966666B7666679100000
0000266666666666664100000
0000000111111111111100000
0000000000000000000000000
}

' declaring skinparam
skinparam sequenceMessageAlign center
skinparam shadowing false
skinparam defaultFontName Verdana
skinparam monochrome true
skinparam SequenceLifeLineBackgroundColor WhiteSmoke
skinparam SequenceLifeLineBorderColor Black
skinparam ActorFontStyle Bold
skinparam ActorFontSize 20
skinparam ParticipantFontStyle Bold
skinparam ParticipantFontSize 20
skinparam ParticipantBackgroundColor WhiteSmoke
skinparam ArrowColor Black

skinparam actor {
Bordercolor none
Backgroundcolor none
shadowing false
}

skinparam participant {
shadowing true
}

hide footbox

' declare title
' title Example process for currency conversion quotes

' Actor Keys:
' participant - Requester FSP, FXP and Switch

' declare actors
participant "Requester\nFSP" as FSP
participant "Optional\nSwitch" as Switch
participant "Foreign\nExchange\nProvider" as FXP

' start flow
activate FSP
FSP -> FSP:I need currency conversion\nfrom ZAR to KES.\nWho can provide it?
FSP->Switch:**GET /services/ZAR/KES**
activate Switch
Switch-->FSP:**HTTP 202** (Accepted)
deactivate FSP
Switch->Switch:Get list of FXPs\nwho offer this conversion
Switch->FSP:**PUT /services/ZAR/KES**\nReturn list of providers
activate FSP
FSP-->Switch:**HTTP 200** (OK)
deactivate Switch
FSP->Switch:**POST /fxQuotes**\n(Conversion details)
activate Switch
Switch-->FSP:**HTTP 202** (Accepted)
deactivate FSP
Switch ->> FXP: **POST /fxQuotes**\n(Transaction details)
activate FXP
Switch <<-- FXP: **HTTP 202** (Accepted)
FXP -> FXP: Set exchange rate and fees,\nand approve

Switch <<- FXP: ** PUT /fxQuotes/**<i><ID></i>\n(FXP exchange rate, fee/commission, condition)
Switch -->> FXP: **HTTP 200** (OK)
deactivate FXP
FSP <<- Switch: **PUT /fxQuotes/**<i><ID></i>\n(FXP exchange rate, fee/commission, condition)
activate FSP
FSP -->> Switch: **HTTP 200** (OK)
deactivate Switch
FSP -> FSP: Rate FXP quote\n(depending on fee model)
deactivate FSP
@enduml
156 changes: 156 additions & 0 deletions assets/diagrams/sequence/figureFx2.plantuml
Original file line number Diff line number Diff line change
@@ -0,0 +1,156 @@
/'*****
License
--------------
Copyright © 2017 Bill & Melinda Gates Foundation
The Mojaloop files are made available by the Bill & Melinda Gates Foundation under the Apache License, Version 2.0 (the "License") and you may not use these files except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, the Mojaloop files are distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Contributors
--------------
This is the official list of the Mojaloop project contributors for this file.
Names of the original copyright holders (individuals or organizations)
should be listed with a '*' in the first column. People who have
contributed from an organization can be listed under the organization
that actually holds the copyright for their contributions (see the
Gates Foundation organization for an example). Those individuals should have
their names indented and be marked with a '-'. Email address can be added
optionally within square brackets <email>.
* Gates Foundation

- Name Surname <[email protected]>
--------------
******'/

@startuml

' define actor image
sprite $actor [25x48/16] {
0000000000010000000000000
0000000006CAC910000000000
0000000095101292000000000
0000000651000119000000000
0000000B10000018400000000
0000001A10000016600000000
0000000B10000017510000000
000000083100001A210000000
0000000191000176110000000
000000003A866A61100000000
0000000000466211100000000
0003333333334443333310000
0088888888888888888892000
0821111111111111111118200
8311111111111111111111A00
A111111111111111111111A20
A111111111111111111111A20
A111111111111111111111A20
A111111111111111111111A20
A111111111111111111111A20
A111111111111111111111A20
A111111111111111111111A20
A111111111111111111111A20
A111551111111111138111A20
A111661111111111139111A20
A211661111111111139111A20
A211661111111111139111A20
A211661111161111139111A20
A2116611111A2111139111A20
A2116611111A2111139111A20
A2116611111A2111139111A20
A7669611111A211113A666B20
36669611111A211113A666610
00016611111A2111139111110
00006611111A2111139100000
00006611111A2111139100000
00006611111A2111139100000
00006611111A2111139100000
00006611111A2111139100000
00006611111A2111139100000
00006611111A2111139100000
00006611111A2111139100000
00006611111A2111139100000
00006611111A2111139100000
00006966666B7666679100000
0000266666666666664100000
0000000111111111111100000
0000000000000000000000000
}

' declaring skinparam
skinparam sequenceMessageAlign center
skinparam shadowing false
skinparam defaultFontName Verdana
skinparam monochrome true
skinparam SequenceLifeLineBackgroundColor WhiteSmoke
skinparam SequenceLifeLineBorderColor Black
skinparam ActorFontStyle Bold
skinparam ActorFontSize 20
skinparam ParticipantFontStyle Bold
skinparam ParticipantFontSize 20
skinparam ParticipantBackgroundColor WhiteSmoke
skinparam ArrowColor Black

skinparam actor {
Bordercolor none
Backgroundcolor none
shadowing false
}

skinparam participant {
shadowing true
}

hide footbox

' declare title
' title How to use the POST /fxTransfers service

' Actor Keys:
' participant - Requesting FSP, FXP and Switch

' declare actors
participant "Requesting\nFSP" as FSP
participant "Optional\nSwitch" as Switch
participant "Payee\nFSP" as FXP

' start flow
activate FSP
FSP -> FSP: Reserve transfer from Payer\naccount to Switch account
FSP -[hidden]> Switch
deactivate FSP
FSP -[hidden]> Switch
activate FSP
FSP ->> Switch: **POST /fxTransfers**\n(Conversion ID, conditions, ILP Packet\nincluding transaction details,\nexpiry=30 seconds)
activate Switch
FSP <<-- Switch: **HTTP 202** (Accepted)
deactivate FSP
Switch -> Switch: Reserve transfer from\nPayer FSP to Payee FSP
Switch ->> FXP: **POST /fxTransfers**\n(Conversion ID, conditions, ILP Packet\nincluding transaction details,\nexpiry=30 seconds)
activate FXP
Switch <<-- FXP: **HTTP 202** (Accepted)
deactivate Switch
alt If conversion is not dependent on a payment
FXP -> FXP: Perform transfer from Switch\naccount to Payee account
else Conversion is dependent on a payment
FXP ->FXP: Perform reservation on Switch account
end
FXP -> FXP: Create fulfilment
Switch <<- FXP: **PUT /fxTransfers/**<i><ID></i>\n(Fulfilment)
activate Switch
Switch -->> FXP: **HTTP 200** (OK)
deactivate FXP
alt If conversion is not dependent on a payment
Switch -> Switch: Commit transfer from\nPayer FSP to Payee FSP
else Conversion is dependent on a payment
Switch -> Switch: Mark conversion as complete
end

FSP <<- Switch: **PUT /fxTransfers/**<i><ID></i>\n(Fulfilment)
activate FSP
FSP -->> Switch: **HTTP 200** (OK)
deactivate Switch
FSP -> FSP: Commit transfer from Payer\naccount to Switch account
alt If conversion is not dependent on a payment
FSP -> FSP: Commit transfer from Payer\naccount to Payee FSP account
end
deactivate FSP
@enduml
Loading