Hyperledger Fabric
- 安裝 tpl-hlf-cp-install-v1.iuml
- 實體化 tpl-hlf-cp-instantiate-v1.iuml
- 應用開發 tpl-hlf-cp-app-v1.iuml
- 系統說明 tpl-hlf-cp-seq-v1.iuml
- 狀態 tpl-hlf-cp-state-v1.iuml
- 網路 tpl-hlf-pnet-seq-v1.iuml
安裝 tpl-hlf-cp-install-v1.iuml
內容
' Commercial paper tutorial
' https://hyperledger-fabric.readthedocs.io/en/release-1.4/tutorial/commercial_paper.html
'
@startuml
folder MagnetoCorp {
agent "Admin\nConsole" as MAC
artifact "Paper\nContract" as MPC
}
folder PaperNet {
node CA
node Orderer
folder "MagnetoCorp" as PNMC {
package "Peer" as MPEER {
node "Ledger\nDatabase" as LDB
artifact "Paper\nContract" as PNPC
}
}
}
MPC -> MAC
MAC --> MPEER: install
PNPC <-> LDB: getState/putState
@enduml
引用
!include https://dltdojo.github.io/taichu-crypto/puml/tpl-hlf-cp-install-v1.iuml
實體化 tpl-hlf-cp-instantiate-v1.iuml
內容
' Commercial paper tutorial
' https://hyperledger-fabric.readthedocs.io/en/release-1.4/tutorial/commercial_paper.html
'
@startuml
folder MagnetoCorp {
agent "Admin\nConsole" as MAC
}
folder PaperNet {
node CA
node Orderer
folder "MagnetoCorp" as PNMC {
package "Peer" as MPEER {
artifact "Paper\nContract" as PNPC
}
package "Chaincode\nContainer" as CC {
artifact "Paper\nContract" as PNPC_CC
}
}
}
MAC --> MPEER: = 1. Instantiate
MPEER --> CC : = 2. Create
PNPC --> PNPC_CC: = 3. Copy
@enduml
引用
!include https://dltdojo.github.io/taichu-crypto/puml/tpl-hlf-cp-instantiate-v1.iuml
應用開發 tpl-hlf-cp-app-v1.iuml
內容
' Commercial paper tutorial
' https://hyperledger-fabric.readthedocs.io/en/release-1.4/tutorial/commercial_paper.html
'
@startuml
folder MagnetoCorp {
actor Alice
agent "Issue App" as IAPP
agent "Gateway" as MGW
agent "Wallet" as WALLET
}
folder PaperNet {
node CA
node Orderer
folder "MagnetoCorp" as PNMC {
package "Peer" as MPEER {
artifact "Paper\nContract" as PNPC
}
package "Chaincode\nContainer" as CC {
artifact "Paper\nContract" as PNPC_CC
}
}
}
IAPP <- WALLET: = 1 retrieve
IAPP --> MGW: = 2 submit
MGW <--> MPEER: = 3 propose/endorse
MGW --> Orderer: = 4 order
Orderer --> MPEER: = 5 distribute
MPEER -> MGW: = 6 notify
MGW -> IAPP: = 7 response
@enduml
引用
!include https://dltdojo.github.io/taichu-crypto/puml/tpl-hlf-cp-app-v1.iuml
系統說明 tpl-hlf-cp-seq-v1.iuml
內容
' Commercial paper tutorial
' https://hyperledger-fabric.readthedocs.io/en/release-1.4/tutorial/commercial_paper.html
'
@startuml
participant MagnetoCorp as COM
actor Alice as Alice #red
collections PaperNet as NET
actor Bob as Bob #Yellow
participant DigiBank as BANK
COM -> Alice: Authz
BANK -> Bob: Authz
Alice -> NET: Issue
Bob -> NET: Buy
Bob -> NET: Redeem
@enduml
引用
!include https://dltdojo.github.io/taichu-crypto/puml/tpl-hlf-cp-seq-v1.iuml
狀態 tpl-hlf-cp-state-v1.iuml
內容
' https://hyperledger-fabric.readthedocs.io/en/release-1.4/developapps/architecture.html
' Lifecycle
'
@startuml
'hide empty description
[*] --> issued : issue
note top
Commercial papers transition between
issued, trading and redeemed states
by means of the issue, buy and redeem
transactions.
end note
issued -> trading : buy
trading -> trading: buy
trading -down-> redeemed: redeem
redeemed --> [*]
@enduml
引用
!include https://dltdojo.github.io/taichu-crypto/puml/tpl-hlf-cp-state-v1.iuml
網路 tpl-hlf-pnet-seq-v1.iuml
內容
' https://hyperledger-fabric.readthedocs.io/en/release-1.4/developapps/scenario.html
' The PaperNet commercial paper network. Six organizations currently use PaperNet network to
' issue, buy, sell, redeem and rate commercial paper.
' MagentoCorp issues and redeems commercial paper.
' DigiBank, BigFund, BrokerHouse and HedgeMatic all trade commercial paper with each other.
' RateM provides various measures of risk for commercial paper.
'
@startuml
participant MagentoCorp #yellow
participant DigiBank
collections PaperNet #green
participant BigFund
participant BrokerHouse
participant HedgeMatic
participant RateM
== 100 PaperNet commercial paper network ==
MagentoCorp <-> PaperNet: issue/redeem
note right #aqua
MagentoCorp issues and
redeems commercial paper.
end note
DigiBank <-> PaperNet: buy/sell/redeem
note right
DigiBank, BigFund, BrokerHouse and HedgeMatic
all trade commercial paper with each other.
end note
BigFund <-> PaperNet: buy/sell/redeem
BrokerHouse <-> PaperNet: buy/sell/redeem
HedgeMatic <-> PaperNet: buy/sell/redeem
RateM <-> PaperNet: rate/notify
note left #red
RateM provides various measures of risk
for commercial paper.
end note
@enduml
引用
!include https://dltdojo.github.io/taichu-crypto/puml/tpl-hlf-pnet-seq-v1.iuml