[블록체인] ICT 이노베이션 블록체인 개발자 14일 &15일차 Hyper ledger

IT/Blockchain|2020. 11. 20. 15:49

14일 차 &15일 차 

하이퍼 렛져 키 콘셉트, 합의 프로세스 비즈니스 네트워크 작성 예제, 데이터 관리, 예제-commercial paper를 진행합니다.

 

medium.com/decipher-media/%ED%95%98%EC%9D%B4%ED%8D%BC%EB%A0%88%EC%A0%80-%ED%8C%A8%EB%B8%8C%EB%A6%AD-%EB%84%A4%ED%8A%B8%EC%9B%8C%ED%81%AC-%EA%B5%AC%EC%A1%B0-hyperledger-fabric-network-structure-d7fd9c759983

 

하이퍼레저 패브릭 네트워크 구조 [Hyperledger Fabric Network Structure]

Writer : Jung Sungdong

medium.com

 

www.hyperledger.org/learn/training

 

hyperledger official website we can do those training courses 

and tutorial from the offical document you can access via the following link.

 

all the ppt slid seems like made based on those materials.

 

Training & Certification – Hyperledger

Discover technical training courses to get up-to-speed on Hyperledger's business blockchain technologies.

www.hyperledger.org

 

 

 

hyperledger-fabric.readthedocs.io/en/release-2.2/tutorials.html

 

Tutorials — hyperledger-fabricdocs master documentation

Docs » Tutorials Edit on GitHub Built with Sphinx using a theme provided by Read the Docs.

hyperledger-fabric.readthedocs.io

 

 

 

There are samples including fabacar ( course sample we did in the class)  also there are some stuff like off-chain / token 

 

 

github.com/hyperledger/fabric-samples

 

hyperledger/fabric-samples

Contribute to hyperledger/fabric-samples development by creating an account on GitHub.

github.com

 

 

 

 

Hpyerledge charachterlistic :  

developer.ibm.com/technologies/blockchain/articles/top-technical-advantages-of-hyperledger-fabric-for-blockchain-networks/

 

Top 6 technical advantages of Hyperledger Fabric for blockchain networks

Blockchain technology is already radically transforming industry operating models. When selecting a blockchain platform for your business needs, what are the most important attributes to consider? This top-6 list counts them down.

developer.ibm.com

 

 

 

/*
 * SPDX-License-Identifier: Apache-2.0
 */

'use strict';

const { FileSystemWallet, Gateway } = require('fabric-network');
const fs = require('fs');
const path = require('path');

const ccpPath = path.resolve(__dirname, '..', '..', 'basic-network', 'connection.json');
const ccpJSON = fs.readFileSync(ccpPath, 'utf8');
const ccp = JSON.parse(ccpJSON);

async function main() {
    try {

        // Create a new file system based wallet for managing identities.
        const walletPath = path.join(process.cwd(), 'wallet');
        const wallet = new FileSystemWallet(walletPath);
        console.log(`Wallet path: ${walletPath}`);

        // Check to see if we've already enrolled the user.
        const userExists = await wallet.exists('user1');
        if (!userExists) {
            console.log('An identity for the user "user1" does not exist in the wallet');
            console.log('Run the registerUser.js application before retrying');
            return;
        }

        // Create a new gateway for connecting to our peer node.
        const gateway = new Gateway();
        await gateway.connect(ccp, { wallet, identity: 'user1', discovery: { enabled: false } });

        // Get the network (channel) our contract is deployed to.
        const network = await gateway.getNetwork('mychannel');

        // Get the contract from the network.
        const contract = network.getContract('fabcar');

        // Evaluate the specified transaction.
        // queryCar transaction - requires 1 argument, ex: ('queryCar', 'CAR4')
        // queryAllCars transaction - requires no arguments, ex: ('queryAllCars')
        const result = await contract.evaluateTransaction('queryAllCars');
        console.log(`Transaction has been evaluated, result is: ${result.toString()}`);

    } catch (error) {
        console.error(`Failed to evaluate transaction: ${error}`);
        process.exit(1);
    }
}

main();

 

 

 

fabcar example : 

 

hyperledger-fabric.readthedocs.io/en/release-1.4/write_first_app.html

 

Writing Your First Application — hyperledger-fabricdocs master documentation

Docs » Tutorials » Writing Your First Application Edit on GitHub Writing Your First Application Note If you’re not yet familiar with the fundamental architecture of a Fabric network, you may want to visit the Key Concepts section prior to continuing. I

hyperledger-fabric.readthedocs.io

 

hyperledger -  commercial paper tutorial

 

 

 

hyperledger-fabric.readthedocs.io/en/release-1.4/tutorial/commercial_paper.html

 

Commercial paper tutorial — hyperledger-fabricdocs master documentation

Docs » Tutorials » Commercial paper tutorial Edit on GitHub Commercial paper tutorial Audience: Architects, application and smart contract developers, administrators This tutorial will show you how to install and use a commercial paper sample application

hyperledger-fabric.readthedocs.io


 

 

반응형

댓글()