Jeff
Jeff

Reputation: 883

How to invoke chaincode that was deployed with fabric composer in Bluemix?

I'm using Fabric v0.6 on Bluemix and composer-ui on my local machine. I was able to make my model and logic files and deployed them to my Blockchain network on Bluemix. Now I want to invoke the chaincode I deployed with composer from an app that is already running on Bluemix (node.js), not from the composer-ui. How would I approach this?

I have seen a sample app here: https://github.com/hyperledger/composer-sample-applications/tree/master/packages/getting-started

But it requires this configuration file: https://github.com/hyperledger/composer-sample-applications/blob/master/packages/getting-started/config/default.json

And that configuration file specifies the connectionProfile, which I guess is the connection profile I created on composer-ui to connect to my Blockchain service on Bluemix.

Do I need to have Fabric Composer running in order to invoke the chaincode? Or is there anyway to invoke my chaincode completely independent from the composer runtime?

Upvotes: 0

Views: 425

Answers (1)

Dan Selman
Dan Selman

Reputation: 2297

Couple of options:

  1. Use the composer-rest-server and write your front-end application against a domain specific REST API
  2. Pass the connection profile information into the Composer JS composer-client API using an environment variable. See: https://github.com/hyperledger/composer/issues/602

Upvotes: 2

Related Questions