Giter VIP home page Giter VIP logo

bc-java-sdk's Introduction

SDK FABRIC NETWORK

Fabric network for SDK v1.0.0

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. There will be a separate deployment for notes on how to deploy the project on a live system.

Prerequisites

Be sure to install Hyperledger Fabric Prerequisites

Execute following command in current directory

curl -sSL https://goo.gl/kFFqh5 | bash -s 1.0.6

Installing

Generate certifcates

./byfn.sh -m generate

Start Blockchain network

./byfn.sh -m up

End with an example of getting some data out of the system or using it for a little demo

Other operations

Stopping blockchain network

./byfn.sh -m down

Help

./byfn.sh -h

Blockchain Explorer

Before going further, please take note to start fabric with a cli timeout set to some considerable time.

./byfn.sh -m up -t 600000

Explorer is already configured and can be access via - http://localhost:8080

In order to trigger an update on Explorer, we need to simulate an invoke.

  1. On a seperate terminal enter the following:
docker exec -it cli bash

After a successful execution, you should be redirected to

root@c451fee40fe5:/opt/gopath/src/github.com/hyperledger/fabric/peer#
  1. Use the following command to invoke the chaincode. Replace args with the function you want to call. In this example, it is createAsset.
peer chaincode invoke -o orderer.example.com:7050  --tls $CORE_PEER_TLS_ENABLED --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem  -C mychannel -n mycc -c '{"Args": ["createAsset", "{\"Id\":2, \"Name\":\"Asset2\"}"]}'

After a successful invoke, an new transaction record should be added on Explorer.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.