Skip to content

altharp/marbles

Repository files navigation

#SimpleStuff

an NBM Company

##OBC - Javascript Demo

  • examples of using sdk are in app.js near bottom

Run:

> npm install
> gulp
> open browser to localhost:3000

Alternative Run:

> npm install
> node app.js
> open browser to localhost:3000

##Projects Contents

  1. sdk, obc-js.js
  2. chaincode investigator
  3. obc demo aka SimpelStuff

##Demo Description This is a simple asset transfer and asset permission example.

##Goals Phase 1

  1. User can create a ball and store it in the chaincode state
  2. User can read all balls in the chaincode state
  3. User can transfer ball to another user
  4. User can see the owner of a ball

##Goals Phase 2

  1. ^^
  2. Can trade multiple balls at once
  3. User's loan balls for timeperiod, auto lose ownership

##Goals Phase 3

  1. ^^
  2. User's can advertise to trade their balls

###Permissions:

  1. Owner – can add/remove all permissions to the ball

###Attributes of a ball:

  1. name
  2. color
  3. size
  4. user

##ChainCode / SDK To Do:

  • Write("name", "val", cb);
  • [?] ReadNames(cb)
  • init_thing(json);
  • edit_thing(json);
  • need multi var read in sdk! ie read(["car1", "car2"]); ... what if we do a lot here, like SQL syntax?
  • [?] remember the name of all the saved vars in cc, and export this list so sdk can get it
  • check permissions of requesting user in cc
  • verify user identityf, ie public private key stuff
  • website to test cc, real basic
  • demo app website
  • make sdk proper npm module
  • change downloading zip to git clone
  • custom custom function on UI
  • load json in UI
  • mocha test for sdk
  • browsify sdk and tie cci into it
  • follow redirect on zip download...
  • unzip may have project name as root... need to go down 1 lvl
  • check inputs on load if they dne, error
  • poll after chain deploy for cc up in peer
  • add block event to sdk

###ChainCode Notes:

  1. Due to performance issues, we probably want resuable chaincode contracts. ie 1 chaincode describe/constrains multiple people assets. ie ie many people and cars exist in 1 chaincode
  2. Any functionality that parties need to agree on should be in the chaincode. ie do not move it to the application b/c this then the moving parts beomce unenforceable.
  3. Chaincode should keep track of all key's that get their state saved. Have init clear these

###Junk Notes:

About

IBM Blockchain - Marbles Demo

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 53.8%
  • CSS 19.8%
  • Go 18.4%
  • HTML 8.0%