Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥

サービスデザインプロジェクトB 第6回「ウェブサービスデザイン 2」 / Web Servic...

Kenji Saito
November 16, 2020

サービスデザインプロジェクトB 第6回「ウェブサービスデザイン 2」 / Web Service Design 2

2020年11月16日、慶應義塾大学大学院メディアデザイン研究科の「サービスデザインプロジェクトB (2020 秋)」第6回にて使用したスライドです。

紹介している API/アプリを更新したので、2020年11月20日にアップデートしました。

Kenji Saito

November 16, 2020
Tweet

More Decks by Kenji Saito

Other Decks in Technology

Transcript

  1. B 2020 6 2 ( ) B 2020 — 6

    2 — 2020-11-16 – p.1/38
  2. https://speakerdeck.com/ks91 Discord Discord ( / / ) Zoom URL (

    ) B 2020 — 6 2 — 2020-11-16 – p.2/38
  3. ( ) 1 10 12 • 2 10 19 •

    3 10 26 • 4 11 2 • 5 11 9 1 • 6 11 16 2 • 7 11 30 8 12 7 3 ( 2 ) ( ) ↓ B 2020 — 6 2 — 2020-11-16 – p.3/38
  4. BBc-1 – Certify Web API & B 2020 — 6

    2 — 2020-11-16 – p.4/38
  5. 3. API (1) ( ) (2) Web API 2020 11

    14 ( ) 23:59 JST B 2020 — 6 2 — 2020-11-16 – p.6/38
  6. . . . . . . 12 7 ( 13:00

    ) ( ) API UI AP (Application Programming) vs. U (User) I (Interface) ( ) CRUD POST, GET, PUT, DELETE ( CRUD ) B 2020 — 6 2 — 2020-11-16 – p.7/38
  7. T ( ) ⇒ ( ) API B 2020 —

    6 2 — 2020-11-16 – p.8/38
  8. W W stack stack Stack ⇒ stack stack API B

    2020 — 6 2 — 2020-11-16 – p.10/38
  9. N ⇒ Bitcoin Ethereum ( ) 3 Ethereum API B

    2020 — 6 2 — 2020-11-16 – p.11/38
  10. ( Ethereum ) จॻ  จॻ  จॻ  จॻ

     จॻ O ཌ೔ͷ׭ใ μΠδΣετ μΠδΣετ μΠδΣετ μΠδΣετ μΠδΣετ μΠδΣετ μΠδΣετ ح਺ͷ৔߹͸ ෳ੡͢Δ ˞μΠδΣετ͸ݩͷ ɹσʔλ͕ ϏοτͰ΋ ɹҟͳΔͱશ͘ҟͳΔ஋ ɹͱͳΓɺ·ͨɺμΠδΣ ɹετ͔ΒݩͷσʔλΛ ɹਪଌ͢Δ͜ͱ͸Ͱ͖ͳ͍ɻ ɾจॻ Λ։ࣔ͞Εͨ " ࢯ͸ɺಉ࣌ʹϒϧʔͰࣔ͞ΕΔμΠδΣετͱͦΕ͕ࠨӈͷͲͪΒʹҐஔ͢Δ͔Λड͚औΔɻ ɾ" ࢯ͸จॻ  ͷμΠδΣετ͔Β࢝Ίͯɺ࿈݁͢΂͖Ұ࿈ͷμΠδΣετΛ஌Δ͜ͱʹͳΔͷͰɺϚʔΫϧϧʔτʹࢸΔ·Ͱͷ ɹܭࢉΛ࠶ݱͰ͖ɺಘΒΕͨϚʔΫϧϧʔτ͕จॻͷ࡞੒೔ͷཌ೔ͷ׭ใʹهࡌ͞Ε͍ͯΔ஋ͱҰக͢Δ͜ͱΛ֬ೝͰ͖Δɻ هࡌ͢Δ ੥ٻʹج͖ͮ ։ࣔ͞Ε͏Δ ৘ใ ެ։͞ΕΔ৘ใ ϚʔΫϧϧʔτ Ϛ ồ Ϋ ϧ ໦  ߦ ੓ ͕ อ ؅ ͠ ෦ ෼ త ʹ ։ ࣔ ͢ Δ ʜʜ ʜʜ ʜʜ ʜʜ ʜʜ μΠδΣετ μΠδΣετ μΠδΣετ μΠδΣετ μΠδΣετ μΠδΣετ B 2020 — 6 2 — 2020-11-16 – p.12/38
  11. BBc-1 – Certify Web API & ( ) 2020-11-20 ledger_subsystem

    0.15 git pull git clone setup.py pip install (0.15 ) : Ethereum https://speakerdeck.com/beyondblockchain/bbc-1-hands-on-ledger-subsystem-with-ethereum B 2020 — 6 2 — 2020-11-16 – p.13/38
  12. GitHub git clone $ git clone -b develop https://github.com/beyond-blockchain/bbc1-lib-std.git $

    cd bbc1-lib-std tar pip (Python ) $ python setup.py sdist $ pip install dist/bbc1-lib-std-0.19.tar.gz dist tar pip install B 2020 — 6 2 — 2020-11-16 – p.15/38
  13. ( OK) ( SQLite3 ) ( ) ( ) (

    ) ( ) B 2020 — 6 2 — 2020-11-16 – p.16/38
  14. GitHub git clone ( ) $ git clone -b develop

    https://github.com/beyond-blockchain/bbc1-lib-registry.git $ cd bbc1-lib-registry tar pip (Python ) $ python setup.py sdist $ pip install dist/bbc1-lib-registry-0.8.tar.gz dist tar pip install bbc_core.py B 2020 — 6 2 — 2020-11-16 – p.17/38
  15. ( OK) (registry) XML XML , etc. B 2020 —

    6 2 — 2020-11-16 – p.18/38
  16. Certify Web API & Certify Web B 2020 — 6

    2 — 2020-11-16 – p.19/38
  17. Certify Web Certify Web bbc1-lib-registry API & bbc-lib-std API JSON

    ( ) ( ) (= ) Certify Web API ( ) B 2020 — 6 2 — 2020-11-16 – p.20/38
  18. Certify Web GitHub git clone $ git clone https://github.com/beyond-blockchain/examples.git $

    cd examples/certify-web git pull git clone GitHub API & index.py BBc-1 $ python index.py (API ) http://localhost:5000 B 2020 — 6 2 — 2020-11-16 – p.21/38
  19. Certify Web / (1) Certify Web JSON { "id": "AR-1838B",

    "title": "I Am the Walrus", "artist": "The Beatles", "writer": "Lennon-McCartney", "year": "1967" } “proof” Merkle Proof ( ) B 2020 — 6 2 — 2020-11-16 – p.22/38
  20. Certify Web / (2) JSON “id”: (bbc1-lib-registry ) “digest”: SHA-256

    SHA-256 /api/digest API “_docs”: ( ; ) “proof”: ( ) Merkle Proof “privkey”: ( ) ( ) - /api/keypair API ( ) “pubkey”: ( ) “sig”: (pubkey ) “algo”: algo, sig, pubkey /api/sign API ( ) B 2020 — 6 2 — 2020-11-16 – p.23/38
  21. Certify Web / (3) “proof” "proof": { "spec": { "subsystem":

    "ethereum", "network": "ropsten", "contract": "BBcAnchor", "contract_address": "0x31e12b7b5214248184DaBa8071605CE3E92AcDa3", "block": 9098749 }, "subtree": [ { "position": "left", "digest": "6578c8c585be7aa25e5619cedfbc02820c223d667a2561b92c9de9656fded793" }, : ] } B 2020 — 6 2 — 2020-11-16 – p.24/38
  22. (1) ( ) (bbc_core.py ) $ curl -X POST http://localhost:5000/api/setup

    domain id (“certify_web_domain” ) 7bc5dc8c1f3c4dc16e165beac165d73e4cb60530ac0b11bc433f6fba517d67b7 “./.bbc1_app_support” index.py bbc1-lib-registry B 2020 — 6 2 — 2020-11-16 – p.25/38
  23. (2) bbc_core.py $ eth_subsystem_tool.py -w ∼/.bbc1 -d config_tree 100 30

    100 30 API/ bbc_core.py $ eth_subsystem_tool.py -w ∼/.bbc1 -d enable bbc_core.py index.py B 2020 — 6 2 — 2020-11-16 – p.26/38
  24. URL http://localhost:5000/cert/ (API : /api/register [POST]) (API : /api/proof [GET])

    (API : /api/verify [GET]) (API : /api/verify [GET]) “i-am-the-walrus-cert.json” “ishindenshin-cert.json” ( ) ( ) “i-am-the-walrus-cert.json” → Verify Certificate API Ethereum 1 ( ) B 2020 — 6 2 — 2020-11-16 – p.27/38
  25. (1) “beatles-singles-doc.json” → Register Document 30 Ethereum ( ) 1

    → Get Certificate “Download Certificate” proof JSON → Verify Certificate B 2020 — 6 2 — 2020-11-16 – p.29/38
  26. (2) JSON { "id": "5099920311971", "title": "Penny Lane", "artist": "The

    Beatles", "writer": "Lennon-McCartney", "year": "1967" } ( ) Generate Key Pair API Return Values “privkey” ( “pubkey” ) JSON “year” ( ) “privkey” Sign Document API Return Values “algo” “sig” “pubkey” 3 “privkey” 3 (“privkey” ) B 2020 — 6 2 — 2020-11-16 – p.30/38
  27. (1) ( ) “ishindenshin-cert.json” { "id": "YLR-709A", "title": " ",

    "artist": "YMO", "writer": [ {"name": " "}, {"name": " "}, {"name": " "}, {"name": " "} ], "year": "1983", : } B 2020 — 6 2 — 2020-11-16 – p.31/38
  28. (2) ( ) Get Digest { "writer": [ {"name": "

    "}, {"name": " "}, {"name": " "}, {"name": " "} ] } { "name": " " } “digest” “writer” “name” B 2020 — 6 2 — 2020-11-16 – p.32/38
  29. (3) ( ) { "id": "YLR-709A", "title": " ", "artist":

    "YMO", "digest": "bca7d161ae5fce25a55e888e4704f506282b402846132fa9b38d2fb6b72dc405", "year": "1983", : } “writer” B 2020 — 6 2 — 2020-11-16 – p.33/38
  30. (4) ( ) { "id": "YLR-709A", "title": " ", "artist":

    "YMO", "writer": [ {"digest": "5413e837a58878d2b077d14358f7769c8ae791f9deb0475d58d53ff8de1b8973"}, {"name": " "}, : } . . . ( ) ( ) ( ) B 2020 — 6 2 — 2020-11-16 – p.34/38
  31. API ( ) → → → Pet Adoption Platform →

    ( ) → → B 2020 — 6 2 — 2020-11-16 – p.35/38
  32. 4. API (1) ( ) (2) API Certify Web API

    2020 11 28 ( ) 23:59 JST B 2020 — 6 2 — 2020-11-16 – p.37/38