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

fabric-shim

Package Overview
Dependencies
Maintainers
2
Versions
304
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fabric-shim - npm Package Compare versions

Comparing version 1.3.0-snapshot.6 to 1.3.0-snapshot.7

bin/chaincodeStart.js

11

lib/chaincode.js

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

* @class
* @memberof fabric-shim
*/

@@ -84,2 +85,3 @@ class ChaincodeInterface {

* @class
* @memberof fabric-shim
*/

@@ -143,2 +145,4 @@ class Shim {

* @property {Buffer} payload Optional custom content returned by the chaincode
* @class
* @memberof fabric-shim
*/

@@ -164,2 +168,4 @@

* @property {string} message Optional error message returned by the chaincode
* @class
* @memberof fabric-shim
*/

@@ -215,2 +221,3 @@

* @class
* @memberof fabric-shim
*/

@@ -330,2 +337,4 @@ class ClientIdentity {

* @typedef {object} X509Certificate
* @class
* @memberof fabric-shim
*/

@@ -407,2 +416,2 @@

module.exports.StateQueryIterator = Iterators.StateQueryIterator;
module.exports.ChaincodeInterface = ChaincodeInterface;
module.exports.ChaincodeInterface = ChaincodeInterface;

@@ -14,2 +14,5 @@ 'use strict';

* need to be fetched from an iterator and close it when done.
*
* @class
* @memberof fabric-shim
*/

@@ -121,2 +124,5 @@ class CommonIterator extends EventEmitter {

* set of key/value pairs returned by range and execute queries
*
* @extends CommonIterator
* @memberof fabric-shim
*/

@@ -132,2 +138,5 @@ class StateQueryIterator extends CommonIterator {

* set of key/value pairs returned by a history query
*
* @extends CommonIterator
* @memberof fabric-shim
*/

@@ -134,0 +143,0 @@ class HistoryQueryIterator extends CommonIterator {

@@ -87,5 +87,9 @@ /*

* The stub encapsulates the APIs between the chaincode implementation and the Fabric peer
* @class
* @memberof fabric-shim
* @hideconstructor
*/
class ChaincodeStub {
/**
* @hideconstructor
* @param {Handler} client an instance of the Handler class

@@ -197,2 +201,4 @@ * @param {string} channel_id channel id

* @property {string[]} params The rest of the arguments, as array of strings
* @class
* @memberof fabric-shim
*/

@@ -244,2 +250,4 @@

* to the identity's organization and is able to perform digital signing and signature verification
* @class
* @memberof fabric-shim
*/

@@ -272,2 +280,4 @@

* @property {Proposal} proposal The object containing the chaincode invocation request and metadata about the request
* @memberof fabric-shim
* @class
*/

@@ -281,2 +291,4 @@

* @property {ChaincodeProposalPayload} payload The payload object contains actual content of the invocation request
* @memberof fabric-shim
* @class
*/

@@ -289,2 +301,4 @@

* @property {SignatureHeader} signature_header Signature header has replay prevention and message authentication features
* @memberof fabric-shim
* @class
*/

@@ -312,2 +326,4 @@

* @property {number} epoch
* @memberof fabric-shim
* @class
*/

@@ -319,2 +335,4 @@

* @property {Buffer} nonce Arbitrary number that may only be used once. Can be used to detect replay attacks.
* @memberof fabric-shim
* @class
*/

@@ -329,2 +347,4 @@

* be omitted from the transaction and excluded from the ledger.
* @memberof fabric-shim
* @class
*/

@@ -499,2 +519,4 @@

* @property {byte[]} payload A payload that can be used to include metadata with this response
* @class
* @memberof fabric-shim
*/

@@ -501,0 +523,0 @@

5

package.json
{
"name": "fabric-shim",
"version": "1.3.0-snapshot.6",
"version": "1.3.0-snapshot.7",
"description": "A node.js implementation of Hyperledger Fabric chaincode shim, to allow endorsing peers and user-provided chaincodes to communicate with each other",
"main": "index.js",
"bin" : {
"startChaincode":"./bin/chaincodeStart.js"
},
"repository": {

@@ -7,0 +10,0 @@ "type": "git",

@@ -1,13 +0,21 @@

[![NPM](https://nodei.co/npm/fabric-shim.svg?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/fabric-shim/)
[![NPM](https://nodei.co/npm/fabric-contract-api.svg?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/fabric-contract-api/)
[![Version](https://badge.fury.io/js/fabric-shim.svg)](http://badge.fury.io/js/fabric-shim) [![Build Status](https://jenkins.hyperledger.org/buildStatus/icon?job=fabric-chaincode-node-merge-x86_64)](https://jenkins.hyperledger.org/view/fabric-chaincode-node/job/fabric-chaincode-node-merge-x86_64)
`fabric-shim` provides the APIs for application developers to implement "Smart Contracts" for the Hyperledger Fabric backend, also known as "Chaincodes". Detailed explanation on the concept and programming model can be found here: [http://hyperledger-fabric.readthedocs.io/en/latest/chaincode.html](http://hyperledger-fabric.readthedocs.io/en/latest/chaincode.html).
## Installation
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.
Detailed explanation on the concept and programming model can be found here: [http://hyperledger-fabric.readthedocs.io/en/latest/chaincode.html](http://hyperledger-fabric.readthedocs.io/en/latest/chaincode.html).
## Chaincode Interface
### Installation
```sh
npm install fabric-shim
npm install --save fabric-shim
```
## Usage
### Usage
The [chaincode interface](https://fabric-shim.github.io/ChaincodeInterface.html) contains two methods to be implemented:

@@ -47,5 +55,7 @@ ```javascript

## API Reference
### API Reference
Visit [fabric-shim.github.io](https://fabric-shim.github.io/) and click on "Classes" link in the navigation bar on the top to view the list of class APIs.
## Support

@@ -52,0 +62,0 @@ Tested with node.js 8.9.0 (LTS).

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