hyperledger

How to decrypt the transaction payload when confidentiality is turned on?

二次信任 提交于 2019-12-02 06:07:28
问题 The transactions/<transaction_id> API returns a single transaction. But when confidentiality is turned on, the transaction payload is encrypted How can I decrypt this transaction payload when confidentiality is turned on? 回答1: You will only be able to do so if you have the key pair of who sent the transaction (that's why it is confidential). If you are the user that sent the transaction then you can retrieve the ECert and TCert using this. With the certificate you can decrypt the transaction

Hyperledger Fabric PHP SDK

岁酱吖の 提交于 2019-12-02 05:56:52
Hyperledger Fabric PHP SDK是社区提供的用于Hyperledger Fabric区块链应用开发的软件包,其目的在于为PHP应用提供访问Hyperledger Farbic区块链的能力,例如:创建通道、安装链码、访问链码等等。 如果希望快速掌握Fabric区块链的链码及应用开发,建议访问汇智网的在线互动课程: Fabric区块链Java开发详解 Fabric区块链NodeJs开发详解 Hyperledger Fabric PHP SDK的源代码仓库地址: https://github.com/americanexpress/hyperledger-fabric-sdk-php 1、Hyperledger Farbic PHP SDK的安装方法 使用php的包管理器composer安装Hyperledger Farbic PHP SDK: composer require americanexpress/hyperledger-fabric-sdk-php 2、Hyperledger Farbic PHP SDK的使用方法 使用Channel对象的 queryByChaincode 方法在PHP代码中查询链码状态。例如, $config = new \AmericanExpress\HyperledgerFabricClient\Config

技术工坊|区块链中的p2p网络(上海)

隐身守侯 提交于 2019-12-02 05:43:07
区块链是一个去中心化的系统,每个节点分布在全球各地,那么节点之间是如何自发地组成网络,又如何进行通信的?区块链中的p2p网络算法与bt下载中的p2p网络有什么区别? 11月28日,第29期技术工坊邀请离子链首席架构师吴寿鹤为大家分享区块链中的P2P网络。 1 时间地点 **时间:**11月28日 18:30 - 21:00 地点 :(上海徐汇)上海市市辖区徐汇区龙华中路596号A308室 线下分享+交流 9.8元/人 参会人员要求: 1) 技术背景人员,对区块链开发有兴趣; 2) 活动限额15人,报满截止。 2 活动流程 18:30-19:30 签到,自我介绍 19:30-20:30 区块链中的P2P网络 20:30-21:00 互动交流 3 分享主题及嘉宾 分享主题:区块链中的p2p网络 分享大纲: 1、p2p中的三层模型 2、DHT数据结构 3、DHT table更新流程 4、节点之间的加密通信 5、以太坊节点的通信协议 分享嘉宾:吴寿鹤 离子链首席架构师,区块链兄弟联合创始人,区块链技术&安全加密专家;HyperLedger核心开发人员;2014年开始从事区块链开发;参与出版了《区块链开发实战-以太坊关键技术原理分析》、《区块链开发实战-Hyperledger关键技术原理分析》等多本区块链书籍的编著。 4 报名方式 识别下图二维码或点击“ 阅读原文 ”即可报名参加。 来源:

When to call getAssetRegistry to update assets (and the participants equivalent)

≯℡__Kan透↙ 提交于 2019-12-02 04:06:54
I'm able to write some simplistic smart contracts using my composer development environment but am confused about when to persist assets and participants into the registry. I've read the docs on composer-runtime.AssetRegistry and the getAssetRegistry function to return an asset registry object and to perform updates but am still not clear which assets/partipants to update. Here's an example (may not be fully working): participant Trader identified by userID { o String userID o String firstName o String lastName } participant Bank identified by bankID { o String bankID o String description -->

Using two business cards in the same composer rest server configuration

人盡茶涼 提交于 2019-12-02 03:44:17
I did the tutorial to deploy to a multi org fabric network and it worked successfully . Now i have two admin cards - alice@trade-network , bob@trade-network and two identities/cards issued by them - jdoe@trade-network , dlowe@trade-network Now i have given access control rules stating that jdoe (trader1-org1) and dlowe(trader2-org2) can only view their own records Thus when i connect to their respective business cards i am able to view only their records . Now i can start two rest servers each (2 ports) for jdoe and dlowe which enables view of their records only through their rest api

How to decrypt the transaction payload when confidentiality is turned on?

我的梦境 提交于 2019-12-02 00:20:58
The transactions/<transaction_id> API returns a single transaction. But when confidentiality is turned on, the transaction payload is encrypted How can I decrypt this transaction payload when confidentiality is turned on? You will only be able to do so if you have the key pair of who sent the transaction (that's why it is confidential). If you are the user that sent the transaction then you can retrieve the ECert and TCert using this . With the certificate you can decrypt the transaction's payload. 来源: https://stackoverflow.com/questions/38143344/how-to-decrypt-the-transaction-payload-when

Err “bad proposal response 500” when trying to join channel

荒凉一梦 提交于 2019-12-01 23:27:49
问题 I have the following structure : one orderer, one ca and one peer. A channel1 is define and the peer has successfully joined this channel. A first chaincode has been successfully deployed on the peer. The chaincode has been written using composer, export as a .bna, installed and start on the described structure using a connection profile (json) I am trying to ask a second peer to join the previously created channel using the following command : "peer channel join -b channel1.block" but I get

Getting timestamps in deterministic way in Hyperledger Composer transactions

落花浮王杯 提交于 2019-12-01 22:19:04
问题 Is there a deterministic way to get timestamp in transaction function, similar to stub.GetTxTimestamp() that can be used in Go version of Fabric's chaincode. 回答1: Just sharing an example that works with basic-sample-network network: In the model file ( lib/org.acme.sample.cto ) I extended SampleAsset definition any added new property called timestamp of type DateTime : asset SampleAsset identified by assetId { o String assetId --> SampleParticipant owner o String value o DateTime timestamp }

Err “bad proposal response 500” when trying to join channel

两盒软妹~` 提交于 2019-12-01 22:02:30
I have the following structure : one orderer, one ca and one peer. A channel1 is define and the peer has successfully joined this channel. A first chaincode has been successfully deployed on the peer. The chaincode has been written using composer, export as a .bna, installed and start on the described structure using a connection profile (json) I am trying to ask a second peer to join the previously created channel using the following command : "peer channel join -b channel1.block" but I get the following error : "Error: proposal failed (err: bad proposal response 500)" Complete error from

what is the best way of image storage on hyperledger composer?

醉酒当歌 提交于 2019-12-01 14:58:24
ipfs or storj hash of image and store file on s3 convert the image to a Base64 string and store string in composer model You can use String and base64 encode it - as a field in an Asset for example. The question has been discussed here: How can I convert MP3 file to a Base64 encoded string? and here: How to deal with forms,images,videos of an asset in hyperledger composer . Storing images, scans, audio files is not a 'best practice' - rather, a cryptographic hash of it (referenced off-chain) is verifiable proof that the source is the exact image/media file that was 'hashed' at the time the