Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

carauction-network

Package Overview
Dependencies
Maintainers
1
Versions
184
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

carauction-network - npm Package Compare versions

Comparing version 0.0.3-20170315101526 to 0.0.3-20170315120041

7

package.json
{
"name": "carauction-network",
"version": "0.0.3-20170315101526",
"version": "0.0.3-20170315120041",
"description": "Car Auction Business Network",

@@ -12,3 +12,3 @@ "scripts": {

"postlicchk": "npm run doc",
"doc": "jsdoc --pedantic --recurse -c jsdoc.conf .",
"doc": "jsdoc --pedantic --recurse -c jsdoc.conf",
"test": "mocha --recursive",

@@ -28,2 +28,4 @@ "deploy": "./scripts/deploy.sh"

"devDependencies": {
"browserfs": "^1.2.0",
"chai": "^3.5.0",
"composer-admin": "latest",

@@ -33,3 +35,2 @@ "composer-cli": "latest",

"composer-connector-embedded": "latest",
"chai": "^3.5.0",
"eslint": "^3.6.1",

@@ -36,0 +37,0 @@ "istanbul": "^0.4.5",

@@ -7,9 +7,9 @@ # Fabric Composer Car Auction Demo

The easiest way to interact with the demo is using our work-in-progress [Composer Playground web application](http://fabric-composer-next.mybluemix.net). Composer allows you to define a business network (defining the data model and writing transaction processing logic), manage assets & participants and submit transactions.
The easiest way to interact with the demo is using our work-in-progress [Composer Playground web application](http://composer-playground.mybluemix.net). Composer allows you to define a business network (defining the data model and writing transaction processing logic), manage assets & participants and submit transactions.
The data model for the auction business network is defined in a CTO model file, managed in GitHub [here](https://github.com/fabric-composer/sample-networks/blob/master/packages/CarAuction2-Network/models/auction.cto).
The data model for the auction business network is defined in a CTO model file, managed in GitHub [here](https://github.com/fabric-composer/sample-networks/blob/master/packages/carauction-network/models/auction.cto).
The data model is very simple (less than 50 lines). It defines the structure of the assets, participants and transactions for a very simple auction.
The business logic is defined in a single Javascript file [here](https://github.com/fabric-composer/sample-networks/blob/master/packages/CarAuction2-Network/lib/logic.js). The logic consists of two Javascript functions that are automatically invoked by the Fabric Composer runtime chain code when transactions are submitted for processing.
The business logic is defined in a single Javascript file [here](https://github.com/fabric-composer/sample-networks/blob/master/packages/carauction-network/lib/logic.js). The logic consists of two Javascript functions that are automatically invoked by the Fabric Composer runtime chain code when transactions are submitted for processing.

@@ -20,3 +20,3 @@ The `makeOffer` function is called when an `Offer` transaction is submitted. The logic simply checks that the listing for the offer is still for sale, and then adds the offer to the listing, and then updates the offer in the `VehicleListing` asset registry.

Access control for the business network is defined [here](https://github.com/fabric-composer/sample-networks/blob/master/packages/CarAuction2-Network/permissions.acl).
Access control for the business network is defined [here](https://github.com/fabric-composer/sample-networks/blob/master/packages/carauction-network/permissions.acl).

@@ -33,12 +33,12 @@ > ### Developer Unit Testing

> The unit test [here](https://github.com/fabric-composer/sample-networks/blob/master/packages/CarAuction-Network/test/CarAuction.js) simulates an entire auction and checks that the business logic functions as expected.
> The unit test [here](https://github.com/fabric-composer/sample-networks/blob/master/packages/carauction-network/test/CarAuction.js) simulates an entire auction and checks that the business logic functions as expected.
## Connect to Composer
You can connect to Composer [here](http://fabric-composer-next.mybluemix.net). If you have used Composer before you may need to clear your cached browser data (or use private/incognito mode).
You can connect to Composer [here](http://composer-playground.mybluemix.net). If you have used Composer before you may need to clear your cached browser data (or use private/incognito mode).
TBD - document how to add connection profiles to an instance of Fabric running on Bluemix.
After you are connected make sure that Composer is communicating with the **'hyperledger'** connection profile by clicking the network dropdown at the top-right of the menu. The web profile allows you to test in isolation using a simulated hyperledger, storing the ledger in browser local storage. The 'bluemix' connection profile is to a version of Fabric Composer deployed to bluemix.
> Note: Playground currently only supports the web profile.
## Setting Up the Demo

@@ -45,0 +45,0 @@

@@ -18,2 +18,3 @@ /*

const AdminConnection = require('composer-admin').AdminConnection;
const BrowserFS = require('browserfs/dist/node/index');
const BusinessNetworkConnection = require('composer-client').BusinessNetworkConnection;

@@ -25,2 +26,3 @@ const BusinessNetworkDefinition = require('composer-common').BusinessNetworkDefinition;

const bfs_fs = BrowserFS.BFSRequire('fs');
const NS = 'org.acme.vehicle.auction';

@@ -34,3 +36,4 @@

before(() => {
const adminConnection = new AdminConnection();
BrowserFS.initialize(new BrowserFS.FileSystem.InMemory());
const adminConnection = new AdminConnection({ fs: bfs_fs });
return adminConnection.createProfile('defaultProfile', {

@@ -49,3 +52,3 @@ type: 'embedded'

.then(() => {
businessNetworkConnection = new BusinessNetworkConnection();
businessNetworkConnection = new BusinessNetworkConnection({ fs: bfs_fs });
return businessNetworkConnection.connect('defaultProfile', 'carauction-network', 'WebAppAdmin', 'DJY27pEnl16d');

@@ -52,0 +55,0 @@ });

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc