1.0.2 • Published 11 months ago

spydra-fabric-contract-node v1.0.2

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
11 months ago

Maintained by Spydra.app npm version

Spydra Hyperledger Fabric Base Contract

The Spydra Hyperledger Fabric Base Contract has various utility methods which provide additional functionalities out of the box to any Chaincode that is deployed in a Spydra blockchain network. Simply extend your own Chaincode Smart Contract from the Spydra Base Contract to get these additional features.

  • Query the world state using Graph QL. For more details, refer to Spydra Graph QL.

Quick Start

  1. Install spydra-fabric-contract-node from npm.

    With npm:

    $ npm install --save spydra-fabric-contract-node

    or using yarn:

    $ yarn add spydra-fabric-contract-node
  2. Extend your Smart Contract from the Spydra Base Contract.

    class MyCustomContract extends SpydraContract {
        
    }
  3. Export the SpydraContract as one of the Smart contracts in index.js.

        module.exports.contracts = [MyCustomContract, SpydraContract];
  4. Deploy the Chaincode on a Spydra Blockchain network and start querying on any attribute using Graph QL.