Upgrade to Pro — share decks privately, control downloads, hide ads and more …

NEMのAPIとモザイクであそぼう

 NEMのAPIとモザイクであそぼう

D96c7e61d2f394f1d0af66945181a230?s=128

きりみん

June 03, 2018
Tweet

Transcript

  1. NEMͷAPIͱϞβΠΫ Ͱ͋ͦ΅͏ ˏkirimin

  2. NEMͬͯʁ • ҉߸௨՟ɺϒϩοΫνΣʔϯϓϥοτϑΥʔϜ • XEMͱ͍͏ϝΠϯ௨՟͕͋Δ • mosaicͱ͍͏τʔΫϯΛ؆୯ʹ࡞ΕΔ • GUI্Ͱ༷ʑͳػೳΛఏڙ͍ͯ͠Δ •

    REST API͕༻ҙ͞Ε͍ͯΔͱ͍͏ͷ΋େ͖ͳಛ௃
  3. REST API͕༻ҙ͞Ε͍ͯΔ • NEM APIαʔόʔΛNIS(The NEM Infrastructure Server) ͱ͍͏Β͍͠ https://nemproject.github.io/

    • ී௨ͷAPIͱಉ͡Α͏ʹGET΍POSTͰୟ͘͜ͱ͕Ͱ͖Δ • ྫ • account/get?address=xxxxxxx • account/mosaic/owned?address=xxxxxx
  4. APIͷୟ͖ํ • NIS͸ଘࡏ͢Δεʔύʔϊʔυʹରͯ͠ୟ͘ • http://hugealice.nem.ninja:7890/account/ get?address=xxxxxxxx • 7890͸ϙʔτ൪߸Ͱݻఆ

  5. account/get ?address=xxxxxxx { "meta": { "cosignatories": [], "cosignatoryOf": [], "status":

    "LOCKED", "remoteStatus": "ACTIVE" }, "account": { "address": "", "harvestedBlocks": 0, "balance": 15495200352, "importance": 0.000008611776145299385, "vestedBalance": 10093992821, "publicKey": "", "label": null, "multisigInfo": {} } }
  6. account/mosaic/owned? address=xxxxxx { "data": [ { "quantity": 15495200352, "mosaicId": {

    "namespaceId": "nem", "name": "xem" } }, { "quantity": 3939000000, "mosaicId": { "namespaceId": "soralis", "name": "coin" } }, { "quantity": 1, "mosaicId": { "namespaceId": "nemket.nemket2017", "name": "entry" } }, }] }
  7. REST API͕༻ҙ͞Ε͍ͯΔ • POSTܥAPIͳͲʹ͸ॺ໊ͱख਺ྉ͕ඞཁ • ৄ͘͠͸ެࣜυΩϡϝϯτ • ΘΓͱ໘౗

  8. nem-Kotlin • KotlinɺJava༻ͷNEM APIϥοϓϥΠϒϥϦ • https://github.com/ryuta46/nem-kotlin • ॺ໊·ΘΓͳͲ΋ϥοϓͯ͘͠Ε͍ͯΔ • ΂ΜΓʂʂʂʂʂʂʂʂʂ

  9. nem-Kotlin • ࢼͯ͠͠ΈͨΒ؆୯ͩͬͨ

  10. ϞβΠΫʹ͍ͭͯ

  11. mosaicʹ͍ͭͯ • NEMͷػೳͰಠࣗͷτʔΫϯΛ࡞ΕΔػೳ • ·ͣωʔϜεϖʔε(υϝΠϯΈ͍ͨͳ΋ͷ)Λ ങ͍ɺͦͷ഑ԼʹϞβΠΫΛ࡞੒͢Δ • XEM΋ϞβΠΫͷҰͭͱ͍͏Ґஔ͚ͮ

  12. mosaicͷ࡞Γํ • ωʔϜεϖʔεΛआΓΔ • ༗ޮظݶ͸Ұ೥Ͱɺߋ৽ʹࣦഊ͢Δͱ mosaic΋͢΂ͯഁغ͞Εͯ͠·͏ • ख਺ྉɿ೥ؒ100XEM

  13. mosaicͷ࡞Γํ • mosaicΛ࡞Δ • ख਺ྉɿ೥ؒ10xem • ڙڅྔ΍ৡ౉Մ൱ͳͲΛઃఆͰ͖Δ • ख਺ྉ΋ઃఆͰ͖Δ •

    ख਺ྉΛઃఆ͢Δͱ୭͔͕ૹ৴Λ͢Δ౓ʹख਺ྉ͕࡞੒ऀʹೖͬͯ͘Δ • ख਺ྉ͸xemͰ΋ϞβΠΫͰ΋͍͍ • Ϗδωενϟϯεͷ༧ײʁ
  14. mosaicͷ࡞Γํ • kirimin-tokenͭͬͯ͘Έͨ

  15. NEM͸͔ΜͨΜͨͷ͍͠ʂ

  16. ࢀߟهࣄ • ެࣜυΩϡϝϯτ • https://nemproject.github.io/ • AndroidͰNEMΛ࢖ͬͯૹۚ͢Δ • https://ryuta46.com/693 •

    NEMͷωʔϜεϖʔεͱϞβΠΫͬͯԿͳͷ͔ʁ • https://www.cryptostream.jp/nem-namespace-mosaic-3551/