p2u-wallet-1-2.uml 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. @startuml
  2. title "P2U Wallet API"
  3. boundary User_Page as up
  4. participant Frontend_Server as fe
  5. participant Backend_Server as be
  6. autonumber
  7. note over up
  8. (1) GetBalance
  9. end note
  10. up->fe: MyBalance of MyPage or Checkout Page
  11. note over fe
  12. request
  13. { "TokenType": "MSQXP" }
  14. end note
  15. fe->be: /p2u-balance-get
  16. note over be
  17. Get Current Balance for Tokens
  18. end note
  19. be->fe: current accout balance
  20. note over fe
  21. response
  22. {"Balance": "13l4343000000000",
  23. "UnitPoint": "12,
  24. "DecimalPoint":"2"
  25. "TokenType": "MSQXP"
  26. }
  27. !! Balance should be string because
  28. doesn't have bigNumber Format
  29. end note
  30. fe->up: show account balance
  31. note over up:
  32. note over up:
  33. note over up
  34. (2) Token Transfer
  35. end note
  36. up->fe: Checkout Page
  37. note over fe
  38. request
  39. {
  40. "TokenType": "MSQXP"
  41. "FromAddr": "13l4343000000000",
  42. "ToAddr": "13l4343000000000",
  43. "TransactionAmt":"12340331000"
  44. }
  45. end note
  46. fe->be: /p2u-transfer
  47. note over be
  48. Transger Tokens
  49. end note
  50. be->fe: Deduced accout balance
  51. note over fe
  52. response
  53. {"Balance": "13l4343000000000",
  54. "UnitPoint": "12,
  55. "DecimalPoint":"2"
  56. "TokenType": "MSQXP"
  57. }
  58. end note
  59. fe->up: show transger result and deduced balance
  60. @enduml