fabric-contract-api
Advanced tools
Comparing version 2.0.0-snapshot.96 to 2.0.0-snapshot.97
{ | ||
"name": "fabric-contract-api", | ||
"version": "2.0.0-snapshot.96", | ||
"version": "2.0.0-snapshot.97", | ||
"tag": "unstable", | ||
@@ -5,0 +5,0 @@ "description": "A node.js implementation of Hyperledger Fabric chaincode shim, to allow endorsing peers and user-provided chaincodes to communicate with each other", |
@@ -7,5 +7,6 @@ [![NPM](https://nodei.co/npm/fabric-contract-api.svg?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/fabric-contract-api/) | ||
The `fabric-contract-api` provides the *contract interface*. a high level API for application developers to implement [Smart Contracts](https://hyperledger-fabric.readthedocs.io/en/latest/glossary.html#smart-contract). Within Hyperledger Fabric, Smart Contracts are also known as [Chaincode](https://hyperledger-fabric.readthedocs.io/en/latest/glossary.html#chaincode). Working with this API provides a high level entry point to writing business logic. | ||
(this contract interface is experimental, and feedback is actively requested; whilst there are no plans to change this api it might be latered as a result of feedback). | ||
The `fabric-contract-api` provides the *contract interface* a high level API for application developers to implement [Smart Contracts](https://hyperledger-fabric.readthedocs.io/en/latest/glossary.html#smart-contract). Working with this API provides a high level entry point to writing business logic. | ||
Within Hyperledger Fabric, Smart Contracts can also be referred to as [Chaincode](https://hyperledger-fabric.readthedocs.io/en/latest/glossary.html#chaincode). To be more specific, the term chaincode is preferred to be used to refer to the overall container that is hosting the contracts. | ||
The `fabric-shim` provides the *chaincode interface*, a lower level API for implementing "Smart Contracts". It also _currently_ provides the implementation to support communication with Hyperledger Fabric peers for Smart Contracts written using the `fabric-contract-api`. To confirm that this is the same as the `fabric-shim` in previous versions of Hyperledger Fabric. | ||
@@ -15,3 +16,2 @@ | ||
## Contract Interface | ||
@@ -27,3 +27,3 @@ | ||
Implement a class that ends the `contract` class, a constructor is needed. | ||
Implement a class that ends the `contract` class, a constructor is needed. | ||
The other functions will be invokable functions of your Smart Contract | ||
@@ -46,4 +46,4 @@ | ||
constructor(){ | ||
super('UpdateValuesContract'); | ||
constructor(){ | ||
super('UpdateValuesContract'); | ||
} | ||
@@ -75,13 +75,15 @@ | ||
const UpdateValues = require('./updatevalues') | ||
module.exports.contracts = ['UpdateValues']; | ||
module.exports.contracts = [UpdateValues]; | ||
``` | ||
**Note:** In order to make this contract runnable in version 1.4, also install the `fabric-shim` module as below, and ensure that the 'start' script in `package.json` refers to `startChaincode` | ||
**Note:** In order to make this contract 'runnable' you must also install the `fabric-shim` module as below, and ensure that the 'start' script in `package.json` refers to `fabric-chaincode-node start` | ||
```json | ||
"scripts": { | ||
"start": "fabric-chaincode-node start" | ||
"start": "fabric-chaincode-node start" | ||
} | ||
``` | ||
The `fabric-shim` provides the `fabric-chaincode-node` commands; this can also be used to create a skelton metadata file. | ||
## Chaincode Interface | ||
@@ -135,3 +137,3 @@ | ||
## Support | ||
Tested with node.js 8.9.0 (LTS). | ||
Tested with node.js 8.9, and also the v10 LTS release. | ||
@@ -138,0 +140,0 @@ ## License |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
59980
139