Skip to content

Commit

Permalink
[uml] refs fibercrypto#130 - Wallet classes in API v2
Browse files Browse the repository at this point in the history
  • Loading branch information
olemis committed Dec 9, 2019
1 parent b2d3391 commit 98c5857
Showing 1 changed file with 189 additions and 0 deletions.
189 changes: 189 additions & 0 deletions content/diagrams/plantuml/core.v2.simple.uml
Original file line number Diff line number Diff line change
@@ -0,0 +1,189 @@

@startuml
skinparam ClassBorderColor<< CryptoCurrencyToken >> Black
skinparam ClassBackgroundColor<< CryptoCurrencyToken >> White


interface CryptoAccount
interface Address
interface Iterator<ItemType>
interface FiniteIterator<ItemType>
interface AddressIterator
interface TxnSigner
interface TxnSignerIterator
class Timestamp <<uint64>>
enum TransactionStatus
interface Transaction
interface TransactionIterator
interface TransactionInput
interface TransactionInputIterator
interface TransactionOutput
interface TransactionOutputIterator
interface Block
interface AltcoinPlugin
interface AltcoinManager
enum CoinValueMetric
interface BlockchainStatus
interface PEX
interface PexNodeIterator
interface PexNodeSet
interface PexNode
interface KeyValueStorage
interface WalletSet
interface WalletStorage
interface WalletIterator
enum AddressType
interface Wallet
interface DistWallet
interface HDAddressGenerator
interface HardwareWallet
interface CollectionWallet
interface BlockchainWallet
interface FullWallet
interface SeedGenerator
interface WalletEnv
interface BlockchainTransactionAPI
interface BlockchainSignService
interface WalletOutput
interface WalletAddress

TxnSignerIterator --|> FiniteIterator : bind <ItemType=TxnSigner>
AddressIterator --|> Iterator : bind <ItemType=Address>
TransactionInputIterator --|> Iterator : bind <ItemType=TransactionInput>
TransactionOutputIterator --|> Iterator : bind <ItemType=TransactionOutput>
TransactionIterator --|> Iterator : bind <ItemType=Transaction>
PexNodeIterator --|> Iterator : bind <ItemType=PexNode>
WalletIterator --|> Iterator : bind <ItemType=Wallet>

class AltcoinMetadata {
Name string
Ticker string
Family string
HasBip44 bool
Bip44CoinType int32
Accuracy int32
}

class InputSignDescriptor {
InputIndex string
SignerID UID
Wallet Wallet
}

CryptoAccount --> TransactionOutputIterator
CryptoAccount --> TransactionIterator

Address --> CryptoAccount
Wallet --> CryptoAccount

TxnSigner --> Transaction : sign
TxnSigner ..> PasswordReader

Iterator : Value() ItemType
Iterator : Next() bool
Iterator : HasNext() bool

FiniteIterator : Count() int

Iterator <|- FiniteIterator

Transaction --> Timestamp
Transaction --> TransactionStatus
Transaction "1" *--> "*" TransactionInput
Transaction "1" *--> "*" TransactionOutput

TransactionInput "1" --> "1" TransactionOutput : spend

TransactionOutput "*" --> "1" Address : fund

Block "*" *--> Transaction
Block --> Timestamp
Block --> TransactionIterator

class CryptoCurrencyToken

AltcoinPlugin "1" - "*" CryptoCurrencyToken : implements
AltcoinManager "registry" <-- "plugin" AltcoinPlugin : registration
AltcoinPlugin "1" --> "*" WalletEnv
AltcoinPlugin --> PEX

(AltcoinPlugin, CryptoCurrencyToken) .. AltcoinMetadata

AltcoinManager "1" o--> "*" AltcoinPlugin
AltcoinManager "cache" --> "record" AltcoinMetadata

BlockchainStatus --> Block
BlockchainStatus ..> CoinValueMetric

PEX --> TransactionIterator
PEX --> PexNodeSet
PEX ..> Transaction : P2P broadcast

PexNodeSet --> PexNodeIterator
PexNodeSet "*" o--> "*" PexNode

WalletSet --> WalletIterator
WalletSet o--> Wallet
WalletSet ..> PasswordReader

WalletStorage ..> PasswordReader

AltcoinPlugin --> BlockchainTransactionAPI
AltcoinPlugin --> BlockchainSignService

FullWallet -|> Wallet
FullWallet --|> HDAddressGenerator
FullWallet --|> TxnSigner
FullWallet --|> BlockchainWallet
HardwareWallet --|> TxnSigner
HardwareWallet --|> HDAddressGenerator
Wallet <|-- DistWallet
Wallet <|-- CollectionWallet
Wallet <|-- HDAddressGenerator
Wallet <|-- TxnSigner
Wallet <|-- BlockchainWallet
DistWallet <|-- CollectionWallet
DistWallet <|-- HDAddressGenerator

CollectionWallet "1" o--> "*" Address
HDAddressGenerator "1" *--> "∞" Address

TxnSigner ..> PasswordReader
BlockchainWallet ..> KeyValueStorage
BlockchainWallet ..> TransactionOutput
BlockchainWallet --> Transaction : create
AlcoinManager "1" ..> "*" TxnSigner
DistWallet ..> Address
DistWallet --> AddressIterator
CollectionWallet ..> Address
HDAddressGenerator ..> AddressType
HDAddressGenerator --> AddressIterator

AltcoinManager --> TxnSignerIterator

WalletEnv "1" o--> "1" WalletStorage
WalletEnv "1" o--> "1" WalletSet
WalletSet ..> SeedGenerator

BlockchainTransactionAPI ..> WalletAddress
BlockchainTransactionAPI ..> TransactionOutput
BlockchainTransactionAPI ..> WalletOutput
BlockchainTransactionAPI ..> Address
BlockchainTransactionAPI ..> KeyValueStorage
BlockchainTransactionAPI --> Transaction

BlockchainSignService ..> Transaction
BlockchainSignService ..> InputSignDescriptor
BlockchainSignService ..> PasswordReader
BlockchainSignService --> Transaction

WalletOutput o--> Wallet
WalletOutput o--> TransactionOutput

WalletEnv "1" o--> "1" WalletStorage
WalletEnv "1" o--> "1" WalletSet

WalletAddress o--> Wallet
WalletAddress o--> Address
@enduml

0 comments on commit 98c5857

Please sign in to comment.