diff options
author | Florian Dold <florian@dold.me> | 2021-04-19 14:50:09 +0200 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2021-04-19 14:50:09 +0200 |
commit | 5e1be48814d87374dcd1fecbeab57071ed278fd6 (patch) | |
tree | dd362bd30c1b03b64d06d8bfaef7f3f827c7b069 | |
parent | fb9a5e4d286058d4ce4ad82949bdc0455c6e5d5d (diff) | |
download | docs-5e1be48814d87374dcd1fecbeab57071ed278fd6.tar.gz docs-5e1be48814d87374dcd1fecbeab57071ed278fd6.tar.bz2 docs-5e1be48814d87374dcd1fecbeab57071ed278fd6.zip |
purse state machine
-rw-r--r-- | design-documents/013-peer-to-peer-payments.rst | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/design-documents/013-peer-to-peer-payments.rst b/design-documents/013-peer-to-peer-payments.rst index 5797a72d..1724605a 100644 --- a/design-documents/013-peer-to-peer-payments.rst +++ b/design-documents/013-peer-to-peer-payments.rst @@ -269,6 +269,33 @@ Cross-exchange payment offer: Dave's exchange receives the wad, and credits Dave's account with the money. +State machine for Purses +------------------------ + +.. code-block:: none + + // The "OPEN" starte state requires funding + // the purse either from an account or from + // a coin. + -> OPEN + + // "Filled" means that it is filled with as many coins + // as indicated in the creation request. + OPEN -> FILLED + + // Canceled, all coins put into the purse are refunded + FILLED -> CLOSED_REFUNDED + + // Sent via a wad to a different exchange + FILLED -> PENDING_WAD + + // The associated wad transfer succeeded. + PENDING_WAD -> CLOSED_WAD + + // Merged into an account at the same exchange + FILLED -> CLOSED_MERGE + + Additional considerations ------------------------- |