First Attempt in XBOM (eXtensible Blockchain Object Model)

Introduction

Some Concepts about XBOM

XBOM at a Glance

Transaction at object level

Account, Ownership and Containment

Tree structure for objects, owned by an account.
Our demonstration is to create a new Account object with System Account.

Demonstration and Illustration

Step 1: Bring Up Class Manager Infrastructure

./classmanager.sh up createChannelor./classmanager.sh up createChannel -s couchdb
./classmanager.sh deployCC
Inside ledger, mychannel_classmanager is the database holding all objects.
./classmanager.sh InitBootstrap -loid default
We see some objects are created after bootstrap completes.

Step 2: Interacting with Class Manager Infrastructure

./classmanager.sh Invoke -ic '{"Args":["GetSystemAccountObject"]}'
./classmanager.sh Invoke -ic '{"Args":["GetRootDictionary"]}'
./classmanager.sh Invoke -ic '{"Args":["ObjectSend","[83,121,115,116,101,109,65,99,99,111,117,110,116,79,98,106,101,99,116,0,0,0,0,0,0,0,0,0,0,0,0,0]","[82,111,111,116,68,105,99,116,105,111,110,97,114,121,76,79,73,68,0,0,0,0,0,0,0,0,0,0,0,0,0,0]","{\"Mtdstring\":\"ClassDictionary_GetObjectByName\"}","{\"ObjectPathName\":\"RootAccountManager\"}"]}'
How Class Manager Infrastructure interacts with the Fabric.
./classmanager.sh Invoke -ic '{"Args":["ObjectSend","[83,121,115,116,101,109,65,99,99,111,117,110,116,79,98,106,101,99,116,0,0,0,0,0,0,0,0,0,0,0,0,0]","[44,32,80,101,53,74,36,52,35,113,59,53,46,50,89,84,97,56,35,92,98,95,35,66,96,32,90,118,81,80,89,68]","{\"Mtdstring\":\"ClassFactory_NewObject\"}","{\"NewCount\":1}"]}'
./classmanager.sh Invoke -ic '{"Args":["ObjectSend","[83,121,115,116,101,109,65,99,99,111,117,110,116,79,98,106,101,99,116,0,0,0,0,0,0,0,0,0,0,0,0,0]","[45,38,60,97,79,122,35,32,42,105,59,110,88,54,43,43,80,80,49,116,38,43,55,123,58,33,102,79,50,44,95,43]","{\"Mtdstring\":\"ClassObject_Inspect\"}","{\"Unused\":0}"]}'

Summary

Visit http://www.ledgertech.biz/kcarticles.html for all my works. Reach me on https://www.linkedin.com/in/ktam1/ or follow me @kctheservant in Twitter.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store