Skip to content

freakymind/BlockProv

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

105 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Provenance System based on BlockChain

To use bigchainDb wrapper functions, assuming we are accessing from base directory

let bcwrapper = require('./app/bigchain/index.js')

Objects

View object

	let view = bcwrapper.getViewObject();
	//Returns the array of Asset objects which are currently owned by the publicKey
	view.getAllCurrentlyOwnedAssetsForPublicKey(publicKey).then((arrayOfAsstObjects)=>{
		...
	}
	//Returns the array of Asset objects which were previously owned by the publicKey
	view.getAllPreviouslyOwnedAssetsForPublicKey(publicKey).then((arrayOfAsstObjects)=>{
		...
	}

Asset Object

	let asset = bcwrapper.getAssetObject();
	//Create an asset
	asset.createAsset(privateKey, publicKey, assetdata, metadata).then((responseObject)=>{
		...
	});

	//Get the data in the asset object
	asset.assetdata

	//Get the metadata from the object
	asset.metadata

About

Prov System

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •