New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.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.7-20170503110301 to 0.0.7-20170503123741

6

package.json
{
"name": "carauction-network",
"version": "0.0.7-20170503110301",
"version": "0.0.7-20170503123741",
"description": "Car Auction Business Network",

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

"type": "git",
"url": "https://github.com/fabric-composer/sample-networks.git"
"url": "https://github.com/hyperledger/composer-sample-networks.git"
},

@@ -25,3 +25,3 @@ "keywords": [

],
"author": "Fabric Composer",
"author": "Hyperledger Composer",
"license": "Apache-2.0",

@@ -28,0 +28,0 @@ "devDependencies": {

@@ -1,2 +0,2 @@

# Fabric Composer Car Auction Demo
# Hyperledger Composer Car Auction Demo

@@ -7,9 +7,9 @@ This is an interactive, distributed, car auction demo, backed by Hyperledger Fabric. Invite participants to join your distributed auction, list assets for sale (setting a reserve price), and watch as assets that have met their reserve price are automatically transferred to the highest bidder at the end of the auction.

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 easiest way to interact with the demo is using our work-in-progress [Hyperledger Composer web application](http://composer-playground.mybluemix.net). Hyperledger 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/carauction-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/hyperledger/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/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.
The business logic is defined in a single Javascript file [here](https://github.com/hyperledger/composer-sample-networks/blob/master/packages/carauction-network/lib/logic.js). The logic consists of two Javascript functions that are automatically invoked by the Hyperledger Composer runtime chain code when transactions are submitted for processing.

@@ -20,7 +20,7 @@ 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/carauction-network/permissions.acl).
Access control for the business network is defined [here](https://github.com/hyperledger/composer-sample-networks/blob/master/packages/carauction-network/permissions.acl).
### Developer Unit Testing
> Note that if you `git clone` the [repository](https://github.com/fabric-composer/sample-networks) for the Business Network you can run a unit tests for the logic in the business network using the Fabric Composer embedded runtime which simulates a Hyperledger Fabric using a pure Javascript runtime. Simply run:
> Note that if you `git clone` the [repository](https://github.com/hyperledger/composer-sample-networks) for the Business Network you can run a unit tests for the logic in the business network using the Hyperledger Composer embedded runtime which simulates a Hyperledger Fabric using a pure Javascript runtime. Simply run:

@@ -33,11 +33,11 @@ ```

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/hyperledger/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://composer-playground.mybluemix.net). If you have used Composer before you may need to clear your cached browser data.
You can connect to Hyperledger Composer [here](http://composer-playground.mybluemix.net). If you have used Hyperledger Composer before you may need to clear your cached browser data.
> Playground currently only supports the web profile.
> Hyperledger Composer currently only supports the web profile.
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.
After you are connected make sure that Hyperledger 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 Hyperledger Composer deployed to bluemix.

@@ -57,3 +57,3 @@ ## Setting Up the Demo

"$class": "org.acme.vehicle.auction.User",
"email": "daniel.selman@uk.ibm.com",
"email": "a.participant@example.com",
"firstName": "Daniel",

@@ -65,7 +65,7 @@ "lastName": "Selman",

Substitute `daniel.selman@uk.ibm.com` with your email address. Congratulations you are now a participant in this business network!
Substitute `a.participant@example.com` with your email address. Congratulations you are now a participant in this business network!
> Playground does not yet support issuing and managing Fabric identifies.
> Hyperledger Composer does not yet support issuing and managing Hyperledger Fabric identities.
You now need to issue an identity card for this participant. Click the green ID card icon to the right of your participant. Enter an user id, for example `daniel.selman` and select the "Identity can be used to issue other identities?" checkbox so that this user has permission to invite other users into the business network.
You now need to issue an identity card for this participant. Click the green ID card icon to the right of your participant. Enter an user id, for example `a.participant` and select the "Identity can be used to issue other identities?" checkbox so that this user has permission to invite other users into the business network.

@@ -90,7 +90,7 @@ You can switch between identities using the menu option at the top right of the screen.

"vin": "CAR_001",
"owner": "daniel.selman@uk.ibm.com"
"owner": "a.owner@example.com"
}
```
Substitute `daniel.selman@uk.ibm.com` for the id of the participant you created above. Congratulations you are now the owner of the vehicle `CAR_001`!
Substitute `a.owner@example.com` for the id of the participant you created above. Congratulations you are now the owner of the vehicle `CAR_001`!

@@ -120,7 +120,7 @@ #### Create a Vehicle Listing

> Playground does not yet support inviting participants via a URL
> Hyperledger Composer does not yet support inviting participants via a URL
An auction with one person is not much fun, so you need to either invite people to use Composer to create their own participants and identities, or you can do it for them. To make it easy for participants that you've created to join the business network (auction) when an identity is issued a personalised URL is generated that you can send to allow participants to join the business network in a single click.
An auction with one person is not much fun, so you need to either invite people to use Hyperledger Composer to create their own participants and identities, or you can do it for them. To make it easy for participants that you've created to join the business network (auction) when an identity is issued a personalised URL is generated that you can send to allow participants to join the business network in a single click.
You can send this text via email or Slack to give people an easy mechanism to launch Composer and join your business network.
You can send this text via email or Slack to give people an easy mechanism to launch Hyperledger Composer and join your business network.

@@ -140,7 +140,7 @@ ## Bidding on a VehicleListing

"listing": "LISTING_001",
"user": "daniel.selman@uk.ibm.com"
"user": "a.bidder@example.com"
}
```
Substitute the id of the participant submitting the transaction for `daniel.selman@uk.ibm.com` and set the bid price as high as you'd like to bid. Remember the vehicle will only be sold if the reserve price is met and it will go to the highest bidder!
Substitute the id of the participant submitting the transaction for `a.bidder@example.com` and set the bid price as high as you'd like to bid. Remember the vehicle will only be sold if the reserve price is met and it will go to the highest bidder!

@@ -177,3 +177,3 @@ The `Offer` transaction is processed by the `makeOffer` function described above.

> Not yet supported in Playground
> Not yet supported in Hyperledger Composer

@@ -180,0 +180,0 @@ You can inspect the blocks and transaction created by Hyperledger during the course of the auction using the Hyperledger Explorer. Details TBD.

@@ -61,3 +61,3 @@ /*

// create the auctioneer
const seller = factory.newResource(NS, 'Member', 'daniel.selman@uk.ibm.com');
const seller = factory.newResource(NS, 'Member', 'daniel.selman@example.com');
seller.firstName = 'Dan';

@@ -79,3 +79,3 @@ seller.lastName = 'Selman';

// create the buyer
const buyer = factory.newResource(NS, 'Member', 'sstone1@uk.ibm.com');
const buyer = factory.newResource(NS, 'Member', 'sstone1@example.com');
buyer.firstName = 'Simon';

@@ -86,3 +86,3 @@ buyer.lastName = 'Stone';

// create another potential buyer
const buyer2 = factory.newResource(NS, 'Member', 'whitemat@uk.ibm.com');
const buyer2 = factory.newResource(NS, 'Member', 'whitemat@example.com');
buyer2.firstName = 'Matthew';

@@ -89,0 +89,0 @@ buyer2.lastName = 'White';

Sorry, the diff of this file is not supported yet

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