Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
neon-jsで始めるNEO dApps開発入門
Search
GENM
September 30, 2018
Programming
460
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
neon-jsで始めるNEO dApps開発入門
ブロックチェーンNEOの開発をするにあたって、有力な選択肢であるJavascript SDKのneon-jsについて紹介
GENM
September 30, 2018
Other Decks in Programming
See All in Programming
作って学ぶSpring BootのAuto Configuration / JJUG Night Seminar 2026-10-19
rshindo
0
150
JIS keyboard support in Omarchy
lef237
0
120
AWS CDKのカスタムリソースでContinuum(旧Security Agent)を実装した話 | Implementing Continuum (formerly Security Agent) via AWS CDK Custom Resource
akihisaikeda
2
150
全ての永続トークンを、生まれる前に消し去りたい!
sylph01
2
960
AIに “答え“を書かせるのを やめてみた
___akari11
0
120
S3 TablesのIcebergデータに、AIエージェントからアクセスしてみた / 20261016developersio2026joetsu-accessing-iceberg-in-s3tables-via-agent
kasacchiful
PRO
0
160
SalesForceを内製化!? ~ HR事業を支える顧客管理基盤のインフラを大公開 ~
oku053
0
180
PumaからFalconに移行したRailsアプリケーションでの実践
falcon8823
0
170
JAWS-UG 東京支部が始める、JAWS-UG支部コラボ / JAWS-UG lunchtime LT Collaboration
y0hgi
0
280
golang-bob.pdf
iwatsukayura
0
130
dotNET_vulnclicker_intro.pdf
deka_morita
0
140
Agentic Software Factoryに、すごく賢いIF文を。 / super smart IF statement into the Agentic Software Factory.
rkaga
8
2.2k
Featured
See All Featured
The Cost Of JavaScript in 2023
addyosmani
55
10k
Art, The Web, and Tiny UX
lynnandtonic
304
22k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
320
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
1
800
We Are The Robots
honzajavorek
0
400
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
22k
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
280
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
2
730
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.5k
How to Think Like a Performance Engineer
csswizardry
28
2.9k
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
760
Transcript
neon-jsͰ࢝ΊΔdApps։ൃೖ JS SDK for NEO blockchain
NEO Keymakers Japan @genm ࣗݾհ ࠓా େ(23) ܚጯٛक़େֶϝσΟΞσβΠϯݚڀՊ म࢜1 Taisei
Imada ৯ΔΓ NEO Keymakers Japanॴଐ ࡢ·ͰΧϯηϦϯάϩϘοτͷ։ൃ ݱࡏNEOΛத৺ʹϒϩοΫνΣʔϯͷษڧத ిࢠ࡞ Facebook: taisei_imada
NEO Keymakers Japan @genm neon-js: NEO BlockchainͷͨΊͷJavascript SDK ΥϨοτػೳ τϥϯβΫγϣϯ
ͦͷଞศརػೳ neon-js ϥΠτΥϨοτΛ࡞͢Δͷʹेͳػೳ
NEO Keymakers Japan @genm ϥΠτΥϨοτͱϑϧϊʔυͷҧ͍ ϥΠτΥϨοτ ϑϧϊʔυ neo-python ඞཁͳ༰ྔ͕গͳ͍ͷͰεϚϗɺϒϥβͰ͍͍͢ neo-GUI
neo-CLI ϥΠτΥϨοτɺϒϩοΫνΣʔϯͷσʔλΛ࣋ͨͳ͍ ϑϧϊʔυʹґଘ͢ΔΘΓʹ༰ྔগɺػೳγϯϓϧ ϥΠτΥϨοτϑϧϊʔυΛհͯ͠ϒϩοΫνΣʔϯͱΓऔΓΛߦ͏ ϒϩοΫνΣʔϯ طଘϊʔυ
NEO Keymakers Japan @genm Πϯετʔϧ npm i @cityofzion/neon-js <script src="https://unpkg.com/@cityofzion/neon-js"
/> npm ϒϥβ(CDN)
NEO Keymakers Japan @genm neon-js 4.0+ͷߏ Core Module Plugin Module
ɾAPI ɾNEP5 ɾWallet ɾTransactions ɾRPC ɾSmart Contract ɾUtility ɾConstants ɾSettings ɾLogging ϒϩοΫνΣʔϯͱͷΓऔΓʹඞཁͳجຊػೳ ֎෦Ϧιʔεʹґଘ͢Δิॿతͳͷ
NEO Keymakers Japan @genm Core Modules Wallet: wallet import {
wallet } from “@cityofzion/neon-js"; ϓϥΠϕʔτΩʔ͔ΒΥϨοτΛੜͯ͠෮߸Խ const c = new wallet.Account( ɹ“6PYLHmDf6AjF4AsVtosmxHuPYeuyJL3SLuw7J1U8i7HxKAnYNsp61HYRfF” ); // ҉߸Խ͞ΕͨΩʔɾΞυϨεͷදࣔ console.log(c.encrypted); // encrypted key console.log(c.address); // throws error // ύεϫʔυΛೖྗͯ͠ΥϨοτͷ෮߸Խ c.decrypt("city of zion"); console.log(c.address); // ALq7AWrhAueN6mJNqk6FHJjnsEoPRytLdW
NEO Keymakers Japan @genm Core Modules Transactions: tx // τϥϯβΫγϣϯͷੜͱγϦΞϥΠζ
import { tx } from “@cityofzion/neon-js"; let tx = Neon.create.tx({ type: 128 }); const serializedTx = tx.serialize(); RPC: rpc // ΫΤϦΛ࡞ͯ͠ϊʔυʹ໋ྩΛૹ৴͢Δɻ import { rpc } from "@cityofzion/neon-js"; const client = new rpc.rpcClient(URL); let query = Neon.create.query({method: 'custommethod'} client.execute(query)
NEO Keymakers Japan @genm Core Modules Smart Contract: sc Utility:
u // εϚʔτίϯτϥΫτͷςετ(test invoke) import { sc, rpc } from “@cityofzion/neon-js"; const sb = new sc.scriptBuilder() sb.emitAppCall(scriptHash, operation, args[]) rpc.Query.invokeScript(sb.str).execute(nodeURL) // Invoke // จࣈྻΛHEXʹͨ͠ΓɺHEX͔Βจࣈྻʹͨ͠Γ import { u } from “@cityofzion/neon-js"; u.str2hexstring(“normalString”); //string→Hex u.hexstring2str("6e6f726d616c537472696e67"); // Hex→string
NEO Keymakers Japan @genm Core Modules Constants: CONST Settings: settings
Logging: logging // ఆ͕৭ʑೖ͍ͬͯΔ import { CONST } from “@cityofzion/neon-js"; const rpcVersion = CONST.RPC_VERSION // ωοτϫʔΫͷొ import Neon, { settings } from “@cityofzion/neon-js"; const newNet = new Neon.rpc.Network({ name: "NewNet" }); Neon.add.network(newNet); // ϩάͷઃఆ import { logging } from “@cityofzion/neon-js"; logging.logger.setAll('info')
NEO Keymakers Japan @genm Plugin Module ֎෦APIαʔό(neoscan͋Δ͍neonDB)͕ແ͍ͱಈ͔ͳ͍ API NEP5 εϚʔτίϯτϥΫτ͕NEP5ͷن֨ʹͦͬͨߏΛ͍ͯ͠Δඞཁ͕͋Δ
// Balanceͷऔಘ import { api } from “@cityofzion/neon-js”; api.neoscan.getBalance("http://www.neoscan-testnet.io/test_net/v1/", address); // NEP5τʔΫϯͷใऔಘ api.nep5.getTokenInfo("http://seed1.neo.org:20332", rpxScriptHash);
NEO Keymakers Japan @genm neon-jsΛͬͨΞϓϦߏ NEO Blockchain neoscan ΫϥΠΞϯτ PluginModuleܥͷૢ࡞
InvokeɺBalanceͳͲ ϒϩοΫνΣʔϯͷૢ࡞ CoreModuleܥͷૢ࡞ WalletɺTransactionɺRPC
NEO Keymakers Japan @genm neoscanͱ NEO Blockchain neoscan ಉظ άϥϑΟΧϧͳWEBΞϓϦέʔγϣϯ͖ͷAPIαʔό
શͯͷτϥϯβΫγϣϯཤྺ͔ΒͦΕͧΕͷΞΧϯτͷߴΛࢉग़
NEO Keymakers Japan @genm ϓϥΠϕʔτωοτͰָʹ։ൃ͢Δ https://github.com/keymakers/neo-scan-docker NEOSCAN DOCKER $ git
clone https://github.com/keymakers/neo-scan-docker.git $ cd neo-scan-docker $ docker-compose up -d Private net neoscan DockerCompose
NEO Keymakers Japan @genm ऴΘΓʹ neon-jsɺϒϥβElectronͰಈ͔͢ dApps։ൃʹ͓͍ͯݱঢ়࠷༗ྗͳબࢶ
NEO Keymakers Japan @genm ࢀߟࢿྉ 1. neon-js(Github) https://github.com/CityOfZion/neon-js 2. neon-js(Document)
http://cityofzion.io/neon-js/ 3. neon wallet https://neonwallet.com/ 4. neoscan https://neoscan.io/ 5. neoscan docker https://github.com/slipo/neo-scan-docker