diff --git a/README.md b/README.md index 9f7b657..6c145d9 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Sample Fabric Composer Business Network Definitions +# Sample Hyperledger Composer Business Network Definitions You must install [Lerna](https://lernajs.io) to build this multi-package repository. diff --git a/package.json b/package.json index 97456c6..3e9ff8b 100644 --- a/package.json +++ b/package.json @@ -22,13 +22,13 @@ }, "repository": { "type": "git", - "url": "https://github.com/fabric-composer/sample-networks.git" + "url": "https://github.com/hyperledger/composer-sample-networks" }, "keywords": [ "blockchain", "hyperledger", "solutions" ], - "author": "Fabric Composer", + "author": "Hyperledger Composer", "license": "Apache-2.0" } \ No newline at end of file diff --git a/packages/animaltracking-network/README.md b/packages/animaltracking-network/README.md index 0cc19ef..999f103 100644 --- a/packages/animaltracking-network/README.md +++ b/packages/animaltracking-network/README.md @@ -10,8 +10,8 @@ visibility into the locations of all animals and all animal movements between fa - Each Field contains a set of Animals owned by the Farmer - Animals can be transfered between Farmers or between Fields -## Demo inside Playground -Import the sample into Playground using the `Import/Replace` button. +## Demo inside Hyperledger Composer +Import the sample into Hyperledger Composer using the `Import/Replace` button. Submit a `SetupDemo` transaction to bootstrap a scenario to get you started. diff --git a/packages/animaltracking-network/jsdoc.conf b/packages/animaltracking-network/jsdoc.conf index a5204c7..86742fd 100644 --- a/packages/animaltracking-network/jsdoc.conf +++ b/packages/animaltracking-network/jsdoc.conf @@ -19,7 +19,7 @@ "outputSourcePath": true, "systemName": "Animal Tracking Network", "footer": "", - "copyright": "Copyright IBM Corp. 2016", + "copyright": "Released under the Apache License v2.0", "navType": "vertical", "theme": "spacelab", "linenums": true, diff --git a/packages/animaltracking-network/lib/mozart.cto.js b/packages/animaltracking-network/lib/mozart.cto.js index 02b0d8a..f993260 100644 --- a/packages/animaltracking-network/lib/mozart.cto.js +++ b/packages/animaltracking-network/lib/mozart.cto.js @@ -19,7 +19,7 @@ /** * - * @param {com.ibm.concerto.mozart.AnimalMovementDeparture} movementDeparture + * @param {com.biz.AnimalMovementDeparture} movementDeparture * @transaction */ function onAnimalMovementDeparture(movementDeparture) { @@ -32,7 +32,7 @@ function onAnimalMovementDeparture(movementDeparture) { movementDeparture.animal.movementStatus = 'IN_TRANSIT'; // save the animal - return getAssetRegistry('com.ibm.concerto.mozart.Animal') + return getAssetRegistry('com.biz.Animal') .then(function(ar) { return ar.update(movementDeparture.animal); }) @@ -46,7 +46,7 @@ function onAnimalMovementDeparture(movementDeparture) { } // save the business - return getAssetRegistry('com.ibm.concerto.mozart.Business') + return getAssetRegistry('com.biz.Business') }) .then(function(br) { return br.update(movementDeparture.to); @@ -55,7 +55,7 @@ function onAnimalMovementDeparture(movementDeparture) { /** * - * @param {com.ibm.concerto.mozart.AnimalMovementArrival} movementArrival + * @param {com.biz.AnimalMovementArrival} movementArrival * @transaction */ function onAnimalMovementArrival(movementArrival) { @@ -76,7 +76,7 @@ function onAnimalMovementArrival(movementArrival) { movementArrival.animal.location = movementArrival.arrivalField; // save the animal - return getAssetRegistry('com.ibm.concerto.mozart.Animal') + return getAssetRegistry('com.biz.Animal') .then(function(ar) { return ar.update(movementArrival.animal); }) @@ -93,7 +93,7 @@ function onAnimalMovementArrival(movementArrival) { }); // save the business - return getAssetRegistry('com.ibm.concerto.mozart.Business'); + return getAssetRegistry('com.biz.Business'); }) .then(function(br) { return br.update(movementArrival.to); @@ -102,12 +102,12 @@ function onAnimalMovementArrival(movementArrival) { /** * - * @param {com.ibm.concerto.mozart.SetupDemo} setupDemo + * @param {com.biz.SetupDemo} setupDemo * @transaction */ function setupDemo(setupDemo) { var factory = getFactory(); - var NS = 'com.ibm.concerto.mozart'; + var NS = 'com.biz'; var farmers = [ factory.newResource(NS, 'Farmer', 'FARMER_1'), diff --git a/packages/animaltracking-network/package.json b/packages/animaltracking-network/package.json index b6a0b09..4af601e 100644 --- a/packages/animaltracking-network/package.json +++ b/packages/animaltracking-network/package.json @@ -14,9 +14,9 @@ }, "repository": { "type": "git", - "url": "https://github.com/fabric-composer/fabric-composer.git" + "url": "https://github.com/hyperledger/composer" }, - "author": "Fabric Composer", + "author": "Hyperledger Composer", "license": "Apache-2.0", "keywords": [ "defra", diff --git a/packages/basic-sample-network/.travis.yml b/packages/basic-sample-network/.travis.yml deleted file mode 100644 index e4aa294..0000000 --- a/packages/basic-sample-network/.travis.yml +++ /dev/null @@ -1,23 +0,0 @@ -language: node_js -node_js: -- '4' -- '6' -dist: trusty -before_install: | - set -ev - set -o pipefail - npm install -g npm - npm config set @ibm:registry https://npm-registry.whitewater.ibm.com - npm config set //npm-registry.whitewater.ibm.com/:_authToken ${NPM_TOKEN} -deploy: - provider: script - script: npm run deploy - skip_cleanup: true - on: - all_branches: true -cache: - directories: - - $HOME/.npm -notifications: - slack: - secure: SbabRm/ooQcS2VZaXqvjjUK8kFLtyxpQj25GurGYLLLSFaktm+k3siAK+OR9TNkD0elqjqCr3e+Bt1uXV5cYJRGkKlwh/pj+lXiSyVzGRUnKHr/Td05jwd6Fs6erbg6QT/XuXsNpyCXSdWRVL+74yYm2rKGGBqE0WuXH6v8rWPgIIhw/kjMNYdB4hZmXll+jFgo3m2nNfM9ja5LG9Sy3Ya/ndVJRmqTSKyQ6+9GgkTznYVZGqCbenY+8KvP1E/i1uNbk/ilANq1oDZLOUxVHdCxVJbtnmQa5L48cftGnVcR/7RvuW6Nf3tlBVyS+VE9fxquYnsWi8lwKDRpUY7bBxlwl3xl+9UdkvBqXVKGUmqL2ztQTYMQ8svk8Y+MOFyubUC7uy2MMwWd81oqbpatvIblk4Yc3yIWRMozXDWTCriD4IbclnsYm93AHWt54nWjE2zTjm2A7Gr4X/eISqYCOa++YQORlq98cfzPmVkbM4FqXTD/O37wds2QPKhmaSUrc1GRhg4InJMffsTNEewa/mQ5T86s9li9DB1FR7/d90dp1OV4l6xIU2F7PXTLpKiQfFx6Wwjudtt78u9goaC95KT5zXnanzeh/b1UPKRWsVhjj8habw/c/myPhdk6CHGWiDJ1MGanTurQFShbWXTARr01EAS+2bajYq0M3QTc/ofs= diff --git a/packages/basic-sample-network/README.md b/packages/basic-sample-network/README.md index d0ff016..976af21 100644 --- a/packages/basic-sample-network/README.md +++ b/packages/basic-sample-network/README.md @@ -1,17 +1,17 @@ -# Welcome to Fabric Composer! +# Welcome to Hyperledger Composer! -This is the "Hello World" of Composer samples. +This is the "Hello World" of Hyperledger Composer samples. This sample defines a business network composed of a single asset type (`SampleAsset`), a single participant type (`SampleParticipant`), and a single transaction type (`SampleTransaction`). `SampleAssets` are owned by a `SampleParticipant`, and the value property on a `SampleAsset` can be modified by submitting a `SampleTransaction`. -To get started inside the Composer Playground you can click the Test tab and create instances of `SampleAsset` and `SampleParticipant`. Make sure that the owner property on the `SampleAsset` refers to a `SampleParticipant` that you have created. +To get started inside Hyperledger Composer you can click the Test tab and create instances of `SampleAsset` and `SampleParticipant`. Make sure that the owner property on the `SampleAsset` refers to a `SampleParticipant` that you have created. You can then submit a `SampleTransaction`, making sure that the asset property refers to an asset that you created earlier. After the transaction has been processed you should see that the value property on the asset has been modified. The logic for updating the asset when a `SampleTransaction` is processed is written in `logic.js`. -Don't forget you can import more advanced samples into the Composer Playground using the Import/Replace button. +Don't forget you can import more advanced samples into Hyperledger Composer using the Import/Replace button. -Have fun learning Fabric Composer! \ No newline at end of file +Have fun learning Hyperledger Composer! \ No newline at end of file diff --git a/packages/basic-sample-network/jsdoc.conf b/packages/basic-sample-network/jsdoc.conf index 3649d91..fd17212 100644 --- a/packages/basic-sample-network/jsdoc.conf +++ b/packages/basic-sample-network/jsdoc.conf @@ -19,7 +19,7 @@ "outputSourcePath": true, "systemName": "Sample Network", "footer": "", - "copyright": "Copyright IBM Corp. 2016", + "copyright": "Released under the Apache License v2.0", "navType": "vertical", "theme": "spacelab", "linenums": true, diff --git a/packages/basic-sample-network/package.json b/packages/basic-sample-network/package.json index 311f397..0222cd9 100644 --- a/packages/basic-sample-network/package.json +++ b/packages/basic-sample-network/package.json @@ -1,7 +1,7 @@ { "name": "basic-sample-network", "version": "0.0.7", - "description": "The Hello World of Fabric Composer samples", + "description": "The Hello World of Hyperledger Composer samples", "scripts": { "prepublish": "mkdirp ./dist && composer archive create --sourceType dir --sourceName . -a ./dist/basic-sample-network.bna", "pretest": "npm run lint", @@ -15,13 +15,13 @@ }, "repository": { "type": "git", - "url": "https://github.com/fabric-composer/sample-networks.git" + "url": "https://github.com/hyperledger/composer-sample-networks.git" }, "keywords": [ "sample", "network" ], - "author": "Fabric Composer", + "author": "Hyperledger Composer", "license": "Apache-2.0", "devDependencies": { "browserfs": "^1.2.0", diff --git a/packages/basic-sample-network/scripts/deploy.sh b/packages/basic-sample-network/scripts/deploy.sh deleted file mode 100755 index 9655942..0000000 --- a/packages/basic-sample-network/scripts/deploy.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/bash - -# Exit on first error, print all commands. -set -ev -set -o pipefail - -# Grab the Concerto directory. -DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )/.." && pwd )" - -# Check that this is the right node.js version. -if [ "${TRAVIS_NODE_VERSION}" != "" -a "${TRAVIS_NODE_VERSION}" != "4" ]; then - echo Not executing as not running primary node.js version. - exit 0 -fi - -# Check that this is not the system tests. -if [ "${SYSTEST}" != "" ]; then - echo Not executing as running system tests. - exit 0 -fi - -# Check that this is the main repository. -if [[ "${TRAVIS_REPO_SLUG}" != Blockchain-WW-Labs* ]]; then - echo "Skipping deploy; wrong repository slug." - exit 0 -fi - -# If this is not for a tagged (release) build, set the prerelease version. -if [ -z "${TRAVIS_TAG}" ]; then - node ${DIR}/scripts/timestamp.js ${DIR}/package.json -fi - -# Publish with latest tag (default). -echo "Pushing with tag latest" -npm publish --scope=@ibm diff --git a/packages/basic-sample-network/scripts/timestamp.js b/packages/basic-sample-network/scripts/timestamp.js deleted file mode 100755 index 772aeca..0000000 --- a/packages/basic-sample-network/scripts/timestamp.js +++ /dev/null @@ -1,32 +0,0 @@ -#!/usr/bin/env node -/* - * IBM Confidential - * OCO Source Materials - * IBM Mozart - Blockchain Solution Framework - * Copyright IBM Corp. 2016 - * The source code for this program is not published or otherwise - * divested of its trade secrets, irrespective of what has - * been deposited with the U.S. Copyright Office. - */ - -'use strict'; - -const fs = require('fs'); -const moment = require('moment'); - -if (process.argv.length !== 3) { - console.error('Usage: timestamp.js '); - process.exit(1); -} - -let fileName = process.argv[2]; -let fileContents = fs.readFileSync(fileName, 'utf8'); -let file = JSON.parse(fileContents); - -let timestamp = moment().format('YYYYMMDDHHmmss'); - -file.version = file.version.replace(/-.*/, ''); -file.version += '-' + timestamp; - -fileContents = JSON.stringify(file, null, 2); -fs.writeFileSync(fileName, fileContents, 'utf8'); diff --git a/packages/basic-sample-network/test/Sample.js b/packages/basic-sample-network/test/Sample.js index 241f3e1..016ac8a 100644 --- a/packages/basic-sample-network/test/Sample.js +++ b/packages/basic-sample-network/test/Sample.js @@ -57,7 +57,7 @@ describe('Sample', () => { const factory = businessNetworkConnection.getBusinessNetwork().getFactory(); // create the sample participant - const dan = factory.newResource(NS, 'SampleParticipant', 'daniel.selman@uk.ibm.com'); + const dan = factory.newResource(NS, 'SampleParticipant', 'a.person@example.com'); dan.firstName = 'Dan'; dan.lastName = 'Selman'; diff --git a/packages/bond-network/.travis.yml b/packages/bond-network/.travis.yml deleted file mode 100644 index e4aa294..0000000 --- a/packages/bond-network/.travis.yml +++ /dev/null @@ -1,23 +0,0 @@ -language: node_js -node_js: -- '4' -- '6' -dist: trusty -before_install: | - set -ev - set -o pipefail - npm install -g npm - npm config set @ibm:registry https://npm-registry.whitewater.ibm.com - npm config set //npm-registry.whitewater.ibm.com/:_authToken ${NPM_TOKEN} -deploy: - provider: script - script: npm run deploy - skip_cleanup: true - on: - all_branches: true -cache: - directories: - - $HOME/.npm -notifications: - slack: - secure: SbabRm/ooQcS2VZaXqvjjUK8kFLtyxpQj25GurGYLLLSFaktm+k3siAK+OR9TNkD0elqjqCr3e+Bt1uXV5cYJRGkKlwh/pj+lXiSyVzGRUnKHr/Td05jwd6Fs6erbg6QT/XuXsNpyCXSdWRVL+74yYm2rKGGBqE0WuXH6v8rWPgIIhw/kjMNYdB4hZmXll+jFgo3m2nNfM9ja5LG9Sy3Ya/ndVJRmqTSKyQ6+9GgkTznYVZGqCbenY+8KvP1E/i1uNbk/ilANq1oDZLOUxVHdCxVJbtnmQa5L48cftGnVcR/7RvuW6Nf3tlBVyS+VE9fxquYnsWi8lwKDRpUY7bBxlwl3xl+9UdkvBqXVKGUmqL2ztQTYMQ8svk8Y+MOFyubUC7uy2MMwWd81oqbpatvIblk4Yc3yIWRMozXDWTCriD4IbclnsYm93AHWt54nWjE2zTjm2A7Gr4X/eISqYCOa++YQORlq98cfzPmVkbM4FqXTD/O37wds2QPKhmaSUrc1GRhg4InJMffsTNEewa/mQ5T86s9li9DB1FR7/d90dp1OV4l6xIU2F7PXTLpKiQfFx6Wwjudtt78u9goaC95KT5zXnanzeh/b1UPKRWsVhjj8habw/c/myPhdk6CHGWiDJ1MGanTurQFShbWXTARr01EAS+2bajYq0M3QTc/ofs= diff --git a/packages/bond-network/README.md b/packages/bond-network/README.md index 0f4dd35..d3852a9 100644 --- a/packages/bond-network/README.md +++ b/packages/bond-network/README.md @@ -1,4 +1,4 @@ -# Fabric Composer Bond Reference Data Demo +# Hyperledger Composer Bond Reference Data Demo Example business network that stores information about financial bonds on the blockchain. It allows the issuer of a bond to update the bond information whilst other members of the business network can diff --git a/packages/bond-network/jsdoc.conf b/packages/bond-network/jsdoc.conf index 9c325e4..75a1099 100644 --- a/packages/bond-network/jsdoc.conf +++ b/packages/bond-network/jsdoc.conf @@ -19,7 +19,7 @@ "outputSourcePath": true, "systemName": "Financial Bond Network", "footer": "", - "copyright": "Copyright IBM Corp. 2016", + "copyright": "Released under the Apache License v2.0", "navType": "vertical", "theme": "spacelab", "linenums": true, diff --git a/packages/bond-network/package.json b/packages/bond-network/package.json index 4861f2b..f851e9d 100644 --- a/packages/bond-network/package.json +++ b/packages/bond-network/package.json @@ -15,14 +15,14 @@ }, "repository": { "type": "git", - "url": "https://github.com/fabric-composer/sample-networks.git" + "url": "https://github.com/hyperledger/composer-sample-networks.git" }, "keywords": [ "bonds", "reference data", "finance" ], - "author": "Fabric Composer", + "author": "Hyperledger Composer", "license": "Apache-2.0", "devDependencies": { "browserfs": "^1.2.0", diff --git a/packages/bond-network/scripts/deploy.sh b/packages/bond-network/scripts/deploy.sh deleted file mode 100755 index 9655942..0000000 --- a/packages/bond-network/scripts/deploy.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/bash - -# Exit on first error, print all commands. -set -ev -set -o pipefail - -# Grab the Concerto directory. -DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )/.." && pwd )" - -# Check that this is the right node.js version. -if [ "${TRAVIS_NODE_VERSION}" != "" -a "${TRAVIS_NODE_VERSION}" != "4" ]; then - echo Not executing as not running primary node.js version. - exit 0 -fi - -# Check that this is not the system tests. -if [ "${SYSTEST}" != "" ]; then - echo Not executing as running system tests. - exit 0 -fi - -# Check that this is the main repository. -if [[ "${TRAVIS_REPO_SLUG}" != Blockchain-WW-Labs* ]]; then - echo "Skipping deploy; wrong repository slug." - exit 0 -fi - -# If this is not for a tagged (release) build, set the prerelease version. -if [ -z "${TRAVIS_TAG}" ]; then - node ${DIR}/scripts/timestamp.js ${DIR}/package.json -fi - -# Publish with latest tag (default). -echo "Pushing with tag latest" -npm publish --scope=@ibm diff --git a/packages/bond-network/scripts/timestamp.js b/packages/bond-network/scripts/timestamp.js deleted file mode 100755 index 772aeca..0000000 --- a/packages/bond-network/scripts/timestamp.js +++ /dev/null @@ -1,32 +0,0 @@ -#!/usr/bin/env node -/* - * IBM Confidential - * OCO Source Materials - * IBM Mozart - Blockchain Solution Framework - * Copyright IBM Corp. 2016 - * The source code for this program is not published or otherwise - * divested of its trade secrets, irrespective of what has - * been deposited with the U.S. Copyright Office. - */ - -'use strict'; - -const fs = require('fs'); -const moment = require('moment'); - -if (process.argv.length !== 3) { - console.error('Usage: timestamp.js '); - process.exit(1); -} - -let fileName = process.argv[2]; -let fileContents = fs.readFileSync(fileName, 'utf8'); -let file = JSON.parse(fileContents); - -let timestamp = moment().format('YYYYMMDDHHmmss'); - -file.version = file.version.replace(/-.*/, ''); -file.version += '-' + timestamp; - -fileContents = JSON.stringify(file, null, 2); -fs.writeFileSync(fileName, fileContents, 'utf8'); diff --git a/packages/bond-network/test/Bond.js b/packages/bond-network/test/Bond.js index 60a608e..c6e2562 100644 --- a/packages/bond-network/test/Bond.js +++ b/packages/bond-network/test/Bond.js @@ -57,7 +57,7 @@ describe('Publish Bond', () => { const factory = businessNetworkConnection.getBusinessNetwork().getFactory(); // create the issuer - const issuer = factory.newResource(NS, 'Issuer', 'daniel.selman@uk.ibm.com'); + const issuer = factory.newResource(NS, 'Issuer', 'daniel.selman@example.com'); issuer.name = 'Dan Selman Holdings'; // create the bond @@ -65,7 +65,7 @@ describe('Publish Bond', () => { paymentFrequency.periodMultiplier = 6; paymentFrequency.period = 'MONTH'; const bond = factory.newConcept(NS, 'Bond'); - bond.instrumentId = ['IBM']; + bond.instrumentId = ['ACME']; bond.exchangeId = ['NYSE']; bond.maturity = new Date('2018-02-27T21:03:52+00:00'); bond.parValue = 1000; diff --git a/packages/carauction-network/.travis.yml b/packages/carauction-network/.travis.yml deleted file mode 100644 index e4aa294..0000000 --- a/packages/carauction-network/.travis.yml +++ /dev/null @@ -1,23 +0,0 @@ -language: node_js -node_js: -- '4' -- '6' -dist: trusty -before_install: | - set -ev - set -o pipefail - npm install -g npm - npm config set @ibm:registry https://npm-registry.whitewater.ibm.com - npm config set //npm-registry.whitewater.ibm.com/:_authToken ${NPM_TOKEN} -deploy: - provider: script - script: npm run deploy - skip_cleanup: true - on: - all_branches: true -cache: - directories: - - $HOME/.npm -notifications: - slack: - secure: SbabRm/ooQcS2VZaXqvjjUK8kFLtyxpQj25GurGYLLLSFaktm+k3siAK+OR9TNkD0elqjqCr3e+Bt1uXV5cYJRGkKlwh/pj+lXiSyVzGRUnKHr/Td05jwd6Fs6erbg6QT/XuXsNpyCXSdWRVL+74yYm2rKGGBqE0WuXH6v8rWPgIIhw/kjMNYdB4hZmXll+jFgo3m2nNfM9ja5LG9Sy3Ya/ndVJRmqTSKyQ6+9GgkTznYVZGqCbenY+8KvP1E/i1uNbk/ilANq1oDZLOUxVHdCxVJbtnmQa5L48cftGnVcR/7RvuW6Nf3tlBVyS+VE9fxquYnsWi8lwKDRpUY7bBxlwl3xl+9UdkvBqXVKGUmqL2ztQTYMQ8svk8Y+MOFyubUC7uy2MMwWd81oqbpatvIblk4Yc3yIWRMozXDWTCriD4IbclnsYm93AHWt54nWjE2zTjm2A7Gr4X/eISqYCOa++YQORlq98cfzPmVkbM4FqXTD/O37wds2QPKhmaSUrc1GRhg4InJMffsTNEewa/mQ5T86s9li9DB1FR7/d90dp1OV4l6xIU2F7PXTLpKiQfFx6Wwjudtt78u9goaC95KT5zXnanzeh/b1UPKRWsVhjj8habw/c/myPhdk6CHGWiDJ1MGanTurQFShbWXTARr01EAS+2bajYq0M3QTc/ofs= diff --git a/packages/carauction-network/README.md b/packages/carauction-network/README.md index 52877bc..26bded0 100644 --- a/packages/carauction-network/README.md +++ b/packages/carauction-network/README.md @@ -1,26 +1,26 @@ -# Fabric Composer Car Auction Demo +# Hyperledger Composer Car Auction Demo 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. ## Understanding the Business Network -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. 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. The `closeBidding` function is called when a `CloseBidding` transaction is submitted for processing. The logic checks that the listing is still for sale, sorts the offers by bid price, and then if the reserve has been met, transfers the ownership of the vehicle associated with the listing to the highest bidder. Money is transferred from the buyer's account to the seller's account, and then all the modified assets are updated in their respective registries. -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: ``` cd packages/carAuction-network @@ -28,15 +28,15 @@ npm install npm test ``` -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. ## Setting Up the Demo @@ -51,18 +51,18 @@ The JSON representation of the User should be: ``` { "$class": "org.acme.vehicle.auction.User", - "email": "daniel.selman@uk.ibm.com", + "email": "a.participant@example.com", "firstName": "Daniel", "lastName": "Selman", "balance": 10000 } ``` -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. You can switch between identities using the menu option at the top right of the screen. @@ -82,11 +82,11 @@ The JSON representation of the Vehicle should be: { "$class": "org.acme.vehicle.auction.Vehicle", "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`! #### Create a Vehicle Listing @@ -111,11 +111,11 @@ Congratulations, you've just listed your Ford Mustang for auction, with a reserv ### Create Additional Participants -> 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. ## Bidding on a VehicleListing @@ -130,11 +130,11 @@ The JSON payload should be: "$class": "org.acme.vehicle.auction.Offer", "bidPrice": 250.00, "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! The `Offer` transaction is processed by the `makeOffer` function described above. @@ -166,7 +166,7 @@ If you click on the 'User' asset registry you can check the balance of each User ## View the Blockchain -> Not yet supported in Playground +> Not yet supported in Hyperledger Composer You can inspect the blocks and transaction created by Hyperledger during the course of the auction using the Hyperledger Explorer. Details TBD. diff --git a/packages/carauction-network/jsdoc.conf b/packages/carauction-network/jsdoc.conf index 562a948..3991fa7 100644 --- a/packages/carauction-network/jsdoc.conf +++ b/packages/carauction-network/jsdoc.conf @@ -19,7 +19,7 @@ "outputSourcePath": true, "systemName": "Car Auction Network", "footer": "", - "copyright": "Copyright IBM Corp. 2016", + "copyright": "Released under the Apache License v2.0", "navType": "vertical", "theme": "spacelab", "linenums": true, diff --git a/packages/carauction-network/package.json b/packages/carauction-network/package.json index 69a6f74..919094a 100644 --- a/packages/carauction-network/package.json +++ b/packages/carauction-network/package.json @@ -15,13 +15,13 @@ }, "repository": { "type": "git", - "url": "https://github.com/fabric-composer/sample-networks.git" + "url": "https://github.com/hyperledger/composer-sample-networks.git" }, "keywords": [ "car", "auction" ], - "author": "Fabric Composer", + "author": "Hyperledger Composer", "license": "Apache-2.0", "devDependencies": { "browserfs": "^1.2.0", diff --git a/packages/carauction-network/scripts/deploy.sh b/packages/carauction-network/scripts/deploy.sh deleted file mode 100755 index 9655942..0000000 --- a/packages/carauction-network/scripts/deploy.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/bash - -# Exit on first error, print all commands. -set -ev -set -o pipefail - -# Grab the Concerto directory. -DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )/.." && pwd )" - -# Check that this is the right node.js version. -if [ "${TRAVIS_NODE_VERSION}" != "" -a "${TRAVIS_NODE_VERSION}" != "4" ]; then - echo Not executing as not running primary node.js version. - exit 0 -fi - -# Check that this is not the system tests. -if [ "${SYSTEST}" != "" ]; then - echo Not executing as running system tests. - exit 0 -fi - -# Check that this is the main repository. -if [[ "${TRAVIS_REPO_SLUG}" != Blockchain-WW-Labs* ]]; then - echo "Skipping deploy; wrong repository slug." - exit 0 -fi - -# If this is not for a tagged (release) build, set the prerelease version. -if [ -z "${TRAVIS_TAG}" ]; then - node ${DIR}/scripts/timestamp.js ${DIR}/package.json -fi - -# Publish with latest tag (default). -echo "Pushing with tag latest" -npm publish --scope=@ibm diff --git a/packages/carauction-network/scripts/timestamp.js b/packages/carauction-network/scripts/timestamp.js deleted file mode 100755 index 772aeca..0000000 --- a/packages/carauction-network/scripts/timestamp.js +++ /dev/null @@ -1,32 +0,0 @@ -#!/usr/bin/env node -/* - * IBM Confidential - * OCO Source Materials - * IBM Mozart - Blockchain Solution Framework - * Copyright IBM Corp. 2016 - * The source code for this program is not published or otherwise - * divested of its trade secrets, irrespective of what has - * been deposited with the U.S. Copyright Office. - */ - -'use strict'; - -const fs = require('fs'); -const moment = require('moment'); - -if (process.argv.length !== 3) { - console.error('Usage: timestamp.js '); - process.exit(1); -} - -let fileName = process.argv[2]; -let fileContents = fs.readFileSync(fileName, 'utf8'); -let file = JSON.parse(fileContents); - -let timestamp = moment().format('YYYYMMDDHHmmss'); - -file.version = file.version.replace(/-.*/, ''); -file.version += '-' + timestamp; - -fileContents = JSON.stringify(file, null, 2); -fs.writeFileSync(fileName, fileContents, 'utf8'); diff --git a/packages/carauction-network/test/CarAuction.js b/packages/carauction-network/test/CarAuction.js index 7cd191a..ef04163 100644 --- a/packages/carauction-network/test/CarAuction.js +++ b/packages/carauction-network/test/CarAuction.js @@ -58,7 +58,7 @@ describe('CarAuction', () => { const factory = businessNetworkConnection.getBusinessNetwork().getFactory(); // 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'; seller.lastName = 'Selman'; seller.balance = 0; @@ -75,13 +75,13 @@ describe('CarAuction', () => { listing.vehicle = factory.newRelationship(NS, 'Vehicle', 'CAR_001'); // 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'; buyer.lastName = 'Stone'; buyer.balance = 1000; // 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'; buyer2.lastName = 'White'; buyer2.balance = 100; diff --git a/packages/digitalproperty-network/.travis.yml b/packages/digitalproperty-network/.travis.yml deleted file mode 100644 index e4aa294..0000000 --- a/packages/digitalproperty-network/.travis.yml +++ /dev/null @@ -1,23 +0,0 @@ -language: node_js -node_js: -- '4' -- '6' -dist: trusty -before_install: | - set -ev - set -o pipefail - npm install -g npm - npm config set @ibm:registry https://npm-registry.whitewater.ibm.com - npm config set //npm-registry.whitewater.ibm.com/:_authToken ${NPM_TOKEN} -deploy: - provider: script - script: npm run deploy - skip_cleanup: true - on: - all_branches: true -cache: - directories: - - $HOME/.npm -notifications: - slack: - secure: SbabRm/ooQcS2VZaXqvjjUK8kFLtyxpQj25GurGYLLLSFaktm+k3siAK+OR9TNkD0elqjqCr3e+Bt1uXV5cYJRGkKlwh/pj+lXiSyVzGRUnKHr/Td05jwd6Fs6erbg6QT/XuXsNpyCXSdWRVL+74yYm2rKGGBqE0WuXH6v8rWPgIIhw/kjMNYdB4hZmXll+jFgo3m2nNfM9ja5LG9Sy3Ya/ndVJRmqTSKyQ6+9GgkTznYVZGqCbenY+8KvP1E/i1uNbk/ilANq1oDZLOUxVHdCxVJbtnmQa5L48cftGnVcR/7RvuW6Nf3tlBVyS+VE9fxquYnsWi8lwKDRpUY7bBxlwl3xl+9UdkvBqXVKGUmqL2ztQTYMQ8svk8Y+MOFyubUC7uy2MMwWd81oqbpatvIblk4Yc3yIWRMozXDWTCriD4IbclnsYm93AHWt54nWjE2zTjm2A7Gr4X/eISqYCOa++YQORlq98cfzPmVkbM4FqXTD/O37wds2QPKhmaSUrc1GRhg4InJMffsTNEewa/mQ5T86s9li9DB1FR7/d90dp1OV4l6xIU2F7PXTLpKiQfFx6Wwjudtt78u9goaC95KT5zXnanzeh/b1UPKRWsVhjj8habw/c/myPhdk6CHGWiDJ1MGanTurQFShbWXTARr01EAS+2bajYq0M3QTc/ofs= diff --git a/packages/digitalproperty-network/README.md b/packages/digitalproperty-network/README.md index 8b5d02f..5d98780 100644 --- a/packages/digitalproperty-network/README.md +++ b/packages/digitalproperty-network/README.md @@ -60,13 +60,13 @@ Create a file to hold the permissions access control inforation - create a `perm ## Work with the network -Once we have the network complete we can create a business network definition arhive. This is the unit will actually be deloyable to the HyperLedger Fabric. +Once we have the network complete we can create a business network definition archive. This is the unit that will actually be deloyable to the HyperLedger Fabric. There is a `composer archive` command that can be used to create and inspect these archives. The `composer network` command is then used to administer the business network archive on the Hyperledger Fabric. ### Creating an archive -The `composer archive create` command is used to create the archive. The `--archiveFile` option is used to specify the name of the archive file to create. If this is not specified then a default name will be used that is based on the identifier of the business network (sanitized to be suitable as a filename). For example `@ibm_digitalPropertyNetwork-0.1.2.bna`. +The `composer archive create` command is used to create the archive. The `--archiveFile` option is used to specify the name of the archive file to create. If this is not specified then a default name will be used that is based on the identifier of the business network (sanitized to be suitable as a filename). For example `@example_digitalPropertyNetwork-0.1.2.bna`. Please refer to the docs for `composer archive create` for more options. diff --git a/packages/digitalproperty-network/jsdoc.conf b/packages/digitalproperty-network/jsdoc.conf index b696a8f..4c34993 100644 --- a/packages/digitalproperty-network/jsdoc.conf +++ b/packages/digitalproperty-network/jsdoc.conf @@ -19,7 +19,7 @@ "outputSourcePath": true, "systemName": "Digital Property Network", "footer": "", - "copyright": "Copyright IBM Corp. 2016", + "copyright": "Released under the Apache License v2.0", "navType": "vertical", "theme": "spacelab", "linenums": true, diff --git a/packages/digitalproperty-network/package.json b/packages/digitalproperty-network/package.json index ace6e75..e70e449 100644 --- a/packages/digitalproperty-network/package.json +++ b/packages/digitalproperty-network/package.json @@ -15,12 +15,12 @@ }, "repository": { "type": "git", - "url": "https://github.com/fabric-composer/sample-networks.git" + "url": "https://github.com/hyperledger/composer-sample-networks.git" }, "keywords": [ "land" ], - "author": "Fabric Composer", + "author": "Hyperledger Composer", "license": "Apache-2.0", "devDependencies": { "browserfs": "^1.2.0", diff --git a/packages/digitalproperty-network/scripts/deploy.sh b/packages/digitalproperty-network/scripts/deploy.sh deleted file mode 100755 index 9655942..0000000 --- a/packages/digitalproperty-network/scripts/deploy.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/bash - -# Exit on first error, print all commands. -set -ev -set -o pipefail - -# Grab the Concerto directory. -DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )/.." && pwd )" - -# Check that this is the right node.js version. -if [ "${TRAVIS_NODE_VERSION}" != "" -a "${TRAVIS_NODE_VERSION}" != "4" ]; then - echo Not executing as not running primary node.js version. - exit 0 -fi - -# Check that this is not the system tests. -if [ "${SYSTEST}" != "" ]; then - echo Not executing as running system tests. - exit 0 -fi - -# Check that this is the main repository. -if [[ "${TRAVIS_REPO_SLUG}" != Blockchain-WW-Labs* ]]; then - echo "Skipping deploy; wrong repository slug." - exit 0 -fi - -# If this is not for a tagged (release) build, set the prerelease version. -if [ -z "${TRAVIS_TAG}" ]; then - node ${DIR}/scripts/timestamp.js ${DIR}/package.json -fi - -# Publish with latest tag (default). -echo "Pushing with tag latest" -npm publish --scope=@ibm diff --git a/packages/digitalproperty-network/scripts/timestamp.js b/packages/digitalproperty-network/scripts/timestamp.js deleted file mode 100755 index 772aeca..0000000 --- a/packages/digitalproperty-network/scripts/timestamp.js +++ /dev/null @@ -1,32 +0,0 @@ -#!/usr/bin/env node -/* - * IBM Confidential - * OCO Source Materials - * IBM Mozart - Blockchain Solution Framework - * Copyright IBM Corp. 2016 - * The source code for this program is not published or otherwise - * divested of its trade secrets, irrespective of what has - * been deposited with the U.S. Copyright Office. - */ - -'use strict'; - -const fs = require('fs'); -const moment = require('moment'); - -if (process.argv.length !== 3) { - console.error('Usage: timestamp.js '); - process.exit(1); -} - -let fileName = process.argv[2]; -let fileContents = fs.readFileSync(fileName, 'utf8'); -let file = JSON.parse(fileContents); - -let timestamp = moment().format('YYYYMMDDHHmmss'); - -file.version = file.version.replace(/-.*/, ''); -file.version += '-' + timestamp; - -fileContents = JSON.stringify(file, null, 2); -fs.writeFileSync(fileName, fileContents, 'utf8'); diff --git a/packages/marbles-network/README.md b/packages/marbles-network/README.md index 47cb47e..981d383 100644 --- a/packages/marbles-network/README.md +++ b/packages/marbles-network/README.md @@ -1,3 +1,3 @@ -# Fabric Composer Marbles Demo +# Hyperledger Composer Marbles Demo -The Fabric Composer team has built an interactive, distributed, marble trading demo, backed by Hyperledger Fabric. Invite participants to join your distributed marble exchange, list marbles for sale and exchange marbles between participants. +The Hyperledger Composer team has built an interactive, distributed, marble trading demo, backed by Hyperledger Fabric. Invite participants to join your distributed marble exchange, list marbles for sale and exchange marbles between participants. diff --git a/packages/marbles-network/jsdoc.conf b/packages/marbles-network/jsdoc.conf index 3be7f29..fb987be 100644 --- a/packages/marbles-network/jsdoc.conf +++ b/packages/marbles-network/jsdoc.conf @@ -19,7 +19,7 @@ "outputSourcePath": true, "systemName": "Marble Trading Network", "footer": "", - "copyright": "Copyright IBM Corp. 2016", + "copyright": "Released under the Apache License v2.0", "navType": "vertical", "theme": "spacelab", "linenums": true, diff --git a/packages/marbles-network/lib/logic.js b/packages/marbles-network/lib/logic.js index 030436e..f4a3d6b 100644 --- a/packages/marbles-network/lib/logic.js +++ b/packages/marbles-network/lib/logic.js @@ -14,12 +14,12 @@ /** * Trade a marble to a new player - * @param {org.fabric_composer.marbles.TradeMarble} tradeMarble - the trade marble transaction + * @param {org.hyperledger_composer.marbles.TradeMarble} tradeMarble - the trade marble transaction * @transaction */ function tradeMarble(tradeMarble) { tradeMarble.marble.owner = tradeMarble.newOwner; - return getAssetRegistry('org.fabric_composer.marbles.Marble') + return getAssetRegistry('org.hyperledger_composer.marbles.Marble') .then(function (assetRegistry) { return assetRegistry.update(tradeMarble.marble); }); diff --git a/packages/marbles-network/models/marbles.cto b/packages/marbles-network/models/marbles.cto index c019eb5..18ab55c 100644 --- a/packages/marbles-network/models/marbles.cto +++ b/packages/marbles-network/models/marbles.cto @@ -1,7 +1,7 @@ /** * Defines a data model for a marble trading network */ -namespace org.fabric_composer.marbles +namespace org.hyperledger_composer.marbles enum MarbleColor { o RED diff --git a/packages/marbles-network/package.json b/packages/marbles-network/package.json index b965842..7cf4dc0 100644 --- a/packages/marbles-network/package.json +++ b/packages/marbles-network/package.json @@ -15,14 +15,14 @@ }, "repository": { "type": "git", - "url": "https://github.com/fabric-composer/sample-networks.git" + "url": "https://github.com/hyperledger/composer-sample-networks.git" }, "keywords": [ "marbles", - "fabric-composer", + "hyperledger-composer", "trading" ], - "author": "Fabric Composer", + "author": "Hyperledger Composer", "license": "Apache-2.0", "devDependencies": { "browserfs": "^1.2.0", diff --git a/packages/marbles-network/scripts/deploy.sh b/packages/marbles-network/scripts/deploy.sh deleted file mode 100755 index 9655942..0000000 --- a/packages/marbles-network/scripts/deploy.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/bash - -# Exit on first error, print all commands. -set -ev -set -o pipefail - -# Grab the Concerto directory. -DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )/.." && pwd )" - -# Check that this is the right node.js version. -if [ "${TRAVIS_NODE_VERSION}" != "" -a "${TRAVIS_NODE_VERSION}" != "4" ]; then - echo Not executing as not running primary node.js version. - exit 0 -fi - -# Check that this is not the system tests. -if [ "${SYSTEST}" != "" ]; then - echo Not executing as running system tests. - exit 0 -fi - -# Check that this is the main repository. -if [[ "${TRAVIS_REPO_SLUG}" != Blockchain-WW-Labs* ]]; then - echo "Skipping deploy; wrong repository slug." - exit 0 -fi - -# If this is not for a tagged (release) build, set the prerelease version. -if [ -z "${TRAVIS_TAG}" ]; then - node ${DIR}/scripts/timestamp.js ${DIR}/package.json -fi - -# Publish with latest tag (default). -echo "Pushing with tag latest" -npm publish --scope=@ibm diff --git a/packages/marbles-network/scripts/timestamp.js b/packages/marbles-network/scripts/timestamp.js deleted file mode 100755 index 772aeca..0000000 --- a/packages/marbles-network/scripts/timestamp.js +++ /dev/null @@ -1,32 +0,0 @@ -#!/usr/bin/env node -/* - * IBM Confidential - * OCO Source Materials - * IBM Mozart - Blockchain Solution Framework - * Copyright IBM Corp. 2016 - * The source code for this program is not published or otherwise - * divested of its trade secrets, irrespective of what has - * been deposited with the U.S. Copyright Office. - */ - -'use strict'; - -const fs = require('fs'); -const moment = require('moment'); - -if (process.argv.length !== 3) { - console.error('Usage: timestamp.js '); - process.exit(1); -} - -let fileName = process.argv[2]; -let fileContents = fs.readFileSync(fileName, 'utf8'); -let file = JSON.parse(fileContents); - -let timestamp = moment().format('YYYYMMDDHHmmss'); - -file.version = file.version.replace(/-.*/, ''); -file.version += '-' + timestamp; - -fileContents = JSON.stringify(file, null, 2); -fs.writeFileSync(fileName, fileContents, 'utf8'); diff --git a/packages/marbles-network/test/MarblesTests.js b/packages/marbles-network/test/MarblesTests.js index 468839a..2bf2523 100644 --- a/packages/marbles-network/test/MarblesTests.js +++ b/packages/marbles-network/test/MarblesTests.js @@ -23,7 +23,7 @@ const path = require('path'); require('chai').should(); const bfs_fs = BrowserFS.BFSRequire('fs'); -const NS = 'org.fabric_composer.marbles'; +const NS = 'org.hyperledger_composer.marbles'; describe('Marbles', () => { @@ -58,7 +58,7 @@ describe('Marbles', () => { const factory = businessNetworkConnection.getBusinessNetwork().getFactory(); // create the first player - const dan = factory.newResource(NS, 'Player', 'daniel.selman@uk.ibm.com'); + const dan = factory.newResource(NS, 'Player', 'daniel.selman@example.com'); dan.firstName = 'Dan'; dan.lastName = 'Selman'; @@ -69,7 +69,7 @@ describe('Marbles', () => { marble.owner = factory.newRelationship(NS, 'Player', dan.$identifier); // create the second player - const simon = factory.newResource(NS, 'Player', 'sstone1@uk.ibm.com'); + const simon = factory.newResource(NS, 'Player', 'sstone1@example.com'); simon.firstName = 'Simon'; simon.lastName = 'Stone'; @@ -103,7 +103,7 @@ describe('Marbles', () => { }) .then((newMarble) => { // simon should now own the marble - newMarble.owner.getIdentifier().should.equal('sstone1@uk.ibm.com'); + newMarble.owner.getIdentifier().should.equal('sstone1@example.com'); }); }); }); diff --git a/packages/perishable-network/.travis.yml b/packages/perishable-network/.travis.yml deleted file mode 100644 index e4aa294..0000000 --- a/packages/perishable-network/.travis.yml +++ /dev/null @@ -1,23 +0,0 @@ -language: node_js -node_js: -- '4' -- '6' -dist: trusty -before_install: | - set -ev - set -o pipefail - npm install -g npm - npm config set @ibm:registry https://npm-registry.whitewater.ibm.com - npm config set //npm-registry.whitewater.ibm.com/:_authToken ${NPM_TOKEN} -deploy: - provider: script - script: npm run deploy - skip_cleanup: true - on: - all_branches: true -cache: - directories: - - $HOME/.npm -notifications: - slack: - secure: SbabRm/ooQcS2VZaXqvjjUK8kFLtyxpQj25GurGYLLLSFaktm+k3siAK+OR9TNkD0elqjqCr3e+Bt1uXV5cYJRGkKlwh/pj+lXiSyVzGRUnKHr/Td05jwd6Fs6erbg6QT/XuXsNpyCXSdWRVL+74yYm2rKGGBqE0WuXH6v8rWPgIIhw/kjMNYdB4hZmXll+jFgo3m2nNfM9ja5LG9Sy3Ya/ndVJRmqTSKyQ6+9GgkTznYVZGqCbenY+8KvP1E/i1uNbk/ilANq1oDZLOUxVHdCxVJbtnmQa5L48cftGnVcR/7RvuW6Nf3tlBVyS+VE9fxquYnsWi8lwKDRpUY7bBxlwl3xl+9UdkvBqXVKGUmqL2ztQTYMQ8svk8Y+MOFyubUC7uy2MMwWd81oqbpatvIblk4Yc3yIWRMozXDWTCriD4IbclnsYm93AHWt54nWjE2zTjm2A7Gr4X/eISqYCOa++YQORlq98cfzPmVkbM4FqXTD/O37wds2QPKhmaSUrc1GRhg4InJMffsTNEewa/mQ5T86s9li9DB1FR7/d90dp1OV4l6xIU2F7PXTLpKiQfFx6Wwjudtt78u9goaC95KT5zXnanzeh/b1UPKRWsVhjj8habw/c/myPhdk6CHGWiDJ1MGanTurQFShbWXTARr01EAS+2bajYq0M3QTc/ofs= diff --git a/packages/perishable-network/README.md b/packages/perishable-network/README.md index b281575..6bc7638 100644 --- a/packages/perishable-network/README.md +++ b/packages/perishable-network/README.md @@ -1,4 +1,4 @@ -# Fabric Composer Perishable Goods Demo +# Hyperledger Composer Perishable Goods Demo Example business network that shows growers, shippers and importers defining contracts for the price of perishable goods, based on temperature readings received for shipping containers. @@ -15,9 +15,9 @@ that: `git clone` the repository for the sample, `cd` into its directory and then run `npm install` followed by `npm test`. The unit test will run and should pass. -### Demo inside Playground +### Demo inside Hyperledger Composer -Import the sample into Playground using the `Import/Replace` button. +Import the sample into Hyperledger Composer using the `Import/Replace` button. Submit a `SetupDemo` transaction diff --git a/packages/perishable-network/jsdoc.conf b/packages/perishable-network/jsdoc.conf index bc2bf6a..ca000e4 100644 --- a/packages/perishable-network/jsdoc.conf +++ b/packages/perishable-network/jsdoc.conf @@ -19,7 +19,7 @@ "outputSourcePath": true, "systemName": "Perishable Goods Network", "footer": "", - "copyright": "Copyright IBM Corp. 2016", + "copyright": "Released under the Apache License v2.0", "navType": "vertical", "theme": "spacelab", "linenums": true, diff --git a/packages/perishable-network/package.json b/packages/perishable-network/package.json index bef4ba2..12db95c 100644 --- a/packages/perishable-network/package.json +++ b/packages/perishable-network/package.json @@ -15,15 +15,15 @@ }, "repository": { "type": "git", - "url": "https://github.com/fabric-composer/sample-networks.git" + "url": "https://github.com/hyperledger/composer-sample-networks.git" }, "keywords": [ "shipping", "goods", "perishable", - "fabric-composer" + "hyperledger-composer" ], - "author": "Fabric Composer", + "author": "Hyperledger Composer", "license": "Apache-2.0", "devDependencies": { "browserfs": "^1.2.0", diff --git a/packages/vehicle-lifecycle-network/.travis.yml b/packages/vehicle-lifecycle-network/.travis.yml deleted file mode 100644 index e4aa294..0000000 --- a/packages/vehicle-lifecycle-network/.travis.yml +++ /dev/null @@ -1,23 +0,0 @@ -language: node_js -node_js: -- '4' -- '6' -dist: trusty -before_install: | - set -ev - set -o pipefail - npm install -g npm - npm config set @ibm:registry https://npm-registry.whitewater.ibm.com - npm config set //npm-registry.whitewater.ibm.com/:_authToken ${NPM_TOKEN} -deploy: - provider: script - script: npm run deploy - skip_cleanup: true - on: - all_branches: true -cache: - directories: - - $HOME/.npm -notifications: - slack: - secure: SbabRm/ooQcS2VZaXqvjjUK8kFLtyxpQj25GurGYLLLSFaktm+k3siAK+OR9TNkD0elqjqCr3e+Bt1uXV5cYJRGkKlwh/pj+lXiSyVzGRUnKHr/Td05jwd6Fs6erbg6QT/XuXsNpyCXSdWRVL+74yYm2rKGGBqE0WuXH6v8rWPgIIhw/kjMNYdB4hZmXll+jFgo3m2nNfM9ja5LG9Sy3Ya/ndVJRmqTSKyQ6+9GgkTznYVZGqCbenY+8KvP1E/i1uNbk/ilANq1oDZLOUxVHdCxVJbtnmQa5L48cftGnVcR/7RvuW6Nf3tlBVyS+VE9fxquYnsWi8lwKDRpUY7bBxlwl3xl+9UdkvBqXVKGUmqL2ztQTYMQ8svk8Y+MOFyubUC7uy2MMwWd81oqbpatvIblk4Yc3yIWRMozXDWTCriD4IbclnsYm93AHWt54nWjE2zTjm2A7Gr4X/eISqYCOa++YQORlq98cfzPmVkbM4FqXTD/O37wds2QPKhmaSUrc1GRhg4InJMffsTNEewa/mQ5T86s9li9DB1FR7/d90dp1OV4l6xIU2F7PXTLpKiQfFx6Wwjudtt78u9goaC95KT5zXnanzeh/b1UPKRWsVhjj8habw/c/myPhdk6CHGWiDJ1MGanTurQFShbWXTARr01EAS+2bajYq0M3QTc/ofs= diff --git a/packages/vehicle-lifecycle-network/README.md b/packages/vehicle-lifecycle-network/README.md index 18b501c..1919139 100644 --- a/packages/vehicle-lifecycle-network/README.md +++ b/packages/vehicle-lifecycle-network/README.md @@ -1,3 +1,3 @@ -# Fabric Composer Vehicle Lifecycle Demo +# Hyperledger Composer Vehicle Lifecycle Demo Vehicle Lifecycle demo. diff --git a/packages/vehicle-lifecycle-network/jsdoc.conf b/packages/vehicle-lifecycle-network/jsdoc.conf index bc2bf6a..ca000e4 100644 --- a/packages/vehicle-lifecycle-network/jsdoc.conf +++ b/packages/vehicle-lifecycle-network/jsdoc.conf @@ -19,7 +19,7 @@ "outputSourcePath": true, "systemName": "Perishable Goods Network", "footer": "", - "copyright": "Copyright IBM Corp. 2016", + "copyright": "Released under the Apache License v2.0", "navType": "vertical", "theme": "spacelab", "linenums": true, diff --git a/packages/vehicle-lifecycle-network/package.json b/packages/vehicle-lifecycle-network/package.json index c44351b..f935b82 100644 --- a/packages/vehicle-lifecycle-network/package.json +++ b/packages/vehicle-lifecycle-network/package.json @@ -14,12 +14,12 @@ }, "repository":{ "type":"git", - "url":"https://github.com/fabric-composer/sample-networks.git" + "url":"https://github.com/hyperledger/composer-sample-networks.git" }, "keywords":[ "vehicle","lifecycle","composer-network" ], - "author":"Fabric Composer", + "author":"Hyperledger Composer", "license":"Apache-2.0", "dependencies":{ "vehicle-lifecycle-model":"unstable"