Skip to content

Latest commit

 

History

History
61 lines (41 loc) · 1.39 KB

crypto-currencies.md

File metadata and controls

61 lines (41 loc) · 1.39 KB

Status License

Crypto Currencies

classDiagram


class Network {
    +String network
}

class Currency {
    +String name
    +String symbol
    +toTheMoon()
}


class PublicKey {
    + verify(Bytes data, Bytes signature)
}

class PrivateKey {
    + sign(Bytes data)
}

class Account {
    +Address id
    +createTransaction(Currency currency, String amount, Address recipient) Transaction
    +balance(Currency currency) String
    + verify(Bytes data, Bytes signature)
}

class Transaction {
    +Bytes data
    +sign(PrivateKey privateKey)
}

class SignedTransaction {
    +send(String endpoint)
}



PrivateKey ..|> PublicKey
PublicKey <|.. Account

Account "1" ..> "many" Currency     : holds
Account "1" ..> "many" Transaction  : prepares

PrivateKey ..> Transaction : signs
Transaction ..|> SignedTransaction


SignedTransaction ..> Network : send

Network ..> Currency : updates
Loading

Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 International License.