Skip to content

Commit

Permalink
FABN-1531 Update references to 2.0 and 2.0.0 (#210)
Browse files Browse the repository at this point in the history
- replace with v2.1

Signed-off-by: heatherlp <[email protected]>
  • Loading branch information
heatherlp authored Apr 8, 2020
1 parent bc50a10 commit 4406642
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ The SDK is composed of several modules:

### Compatibility

The following tables show versions of Fabric, Node and other dependencies that are explicitly tested and that are supported for use with version 2.0 of the Fabric SDK for Node.
The following tables show versions of Fabric, Node and other dependencies that are explicitly tested and that are supported for use with version 2.x of the Fabric SDK for Node.

| | Tested | Supported |
| --- | ------ | --------- |
| **Fabric** | 2.0 | 2.0.x |
| **Fabric** | 2.1 | 2.x |
| **Node** | 10, 12 | 10.13+, 12.13+ |
| **Platform** | Ubuntu 18.04 | |

Expand Down
2 changes: 1 addition & 1 deletion docs/redirectTemplates/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ The SDK implements the Fabric programming model as described in the [Developing
## Documentation

Full documentation is published for each of the following versions:
- [2.0](https://hyperledger.github.io/fabric-sdk-node/master/module-fabric-network.html)
- [2.x](https://hyperledger.github.io/fabric-sdk-node/master/module-fabric-network.html)
- [1.4](https://hyperledger.github.io/fabric-sdk-node/release-1.4/module-fabric-network.html)


Expand Down
2 changes: 1 addition & 1 deletion docs/tutorials/grpc-settings.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

This tutorial illustrates the different ways of setting the gRPC settings used on connections to the Hyperledger Fabric network with a Hyperledger Fabric Node.js Client as of 2.0
This tutorial illustrates the different ways of setting the gRPC settings used on connections to the Hyperledger Fabric network with a Hyperledger Fabric Node.js Client as of 2.1

The following assumes an understanding of the Hyperledger Fabric network
(orderers and peers),
Expand Down
18 changes: 9 additions & 9 deletions docs/tutorials/migration.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
This tutorial describes potentially breaking changes between the the v1.4 and v2.0 Hyperledger Fabric SDK for Node.js that may affect the migration of existing blockchain client applications.
This tutorial describes potentially breaking changes between the the v1.4 and v2.1 Hyperledger Fabric SDK for Node.js that may affect the migration of existing blockchain client applications.

## Overview

The key differences between the API and behavior provided by the v1.4 and v2.0 Hyperledger Fabric SDK for Node.js are:
The key differences between the API and behavior provided by the v1.4 and v2.1 Hyperledger Fabric SDK for Node.js are:
* **fabric-client** module has been removed.
* **Wallets**, used for storing identity implementation, have been redesigned.
* API and behavior of **event listeners** has been redesigned.
Expand All @@ -11,11 +11,11 @@ The sections below provide more detail on these changes and recommended approach

## fabric-client

The v1.4 SDK provides both the **fabric-network** and **fabric-client** APIs for developing client applications that interact with Smart Contracts deployed to a Hyperledger Fabric blockchain. **fabric-network** implements the Fabric programming model, which provides consistency across programming languages, and is the preferred API. **fabric-client** is a lower-level, legacy API that is significantly more complex to use. In v2.0, **fabric-network** is the only recommended API for developing client applications.
The v1.4 SDK provides both the **fabric-network** and **fabric-client** APIs for developing client applications that interact with Smart Contracts deployed to a Hyperledger Fabric blockchain. **fabric-network** implements the Fabric programming model, which provides consistency across programming languages, and is the preferred API. **fabric-client** is a lower-level, legacy API that is significantly more complex to use. In v2.1, **fabric-network** is the only recommended API for developing client applications.

Client applications developed using v1.4 **fabric-client** may continue to work with a v2.0 Fabric but will not be able to exploit new v2.0 capabilities. It is recommended to refactor applications to use v2.0 **fabric-network**.
Client applications developed using v1.4 **fabric-client** may continue to work with a v2.x Fabric but will not be able to exploit new v2.0 capabilities. It is recommended to refactor applications to use v2.1 **fabric-network**.

Client applications developed using v1.4 **fabric-network** should be able to use v2.0 **fabric-network** with only minimal changes, described in other sections of this document.
Client applications developed using v1.4 **fabric-network** should be able to use v2.1 **fabric-network** with only minimal changes, described in other sections of this document.

Note that the SDK no longer aims to provide administrative and management capability. The {@link https://hyperledger-fabric.readthedocs.io/en/release-2.0/command_ref.html|command-line interface} should be used for these operations.

Expand All @@ -24,17 +24,17 @@ Note that the SDK no longer aims to provide administrative and management capabi
The client API and usage of wallets remains broadly similar with the following key differences that require changes as part of client application migration:
* Default wallet types are obtained using static factory functions on the {@link module:fabric-network.Wallets|Wallets} class rather than by directly creating instances of implementation classes.
* Functions to {@link module:fabric-network.Wallet#put|put}, {@link module:fabric-network.Wallet#get|get}, {@link module:fabric-network.Wallet#remove|remove} and {@link module:fabric-network.Wallet#list|list} wallet identities are renamed for consistency across different language SDKs.
* The persistent data format used to store wallet identities is redesigned. Identity information must be extracted from v1.4 wallets and added to new v2.0 wallets for use with the v2.0 SDK.
* The persistent data format used to store wallet identities is redesigned. Identity information must be extracted from v1.4 wallets and added to new v2.1 wallets for use with the v2.1 SDK.

A thorough description of the wallet API and usage is provided in the [wallet tutorial]{@tutorial wallet}.

The {@link https://www.npmjs.com/package/fabric-wallet-migration|fabric-wallet-migration} npm package can be used to:
* Present a v1.4 file system wallet directly as a v2.0 wallet.
* Easily migrate identities from a v1.4 file system wallet to any v2.0 wallet type.
* Present a v1.4 file system wallet directly as a v2.1 wallet.
* Easily migrate identities from a v1.4 file system wallet to any v2.1 wallet type.

## Event listeners

The event listening API has been redesigned and simplified in the v2.0 SDK. Block and contract event listeners are notified of events in block order and without duplication. Listener callback functions are now _async_ to enable them to perform blocking operations (such as I/O) asynchronously while still maintaining event ordering.
The event listening API has been redesigned and simplified in the v2.1 SDK. Block and contract event listeners are notified of events in block order and without duplication. Listener callback functions are now _async_ to enable them to perform blocking operations (such as I/O) asynchronously while still maintaining event ordering.

Client applications making use of event listening will need to re-implement event listeners to use the new API.

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
},
"scripts": {
"installAndGenerateCerts": "node ./scripts/npm_scripts/generateCerts.js",
"pullFabricImages": "./scripts/utility/fabric_images.sh",
"pullFabricImages": "./scripts/utility/fabric_images.sh",
"test": "run-s checkLicense cleanUp dockerClean compile lint docs unitTest:all dockerReady tapeIntegration cucumberScenario",
"testNoHSM": "run-s checkLicense cleanUp dockerClean compile lint docs unitTest:all dockerReady tapeIntegrationNoHSM cucumberScenario",
"checkLicense": "./scripts/npm_scripts/checkLicense.sh",
Expand Down

0 comments on commit 4406642

Please sign in to comment.