【发布时间】:2017-12-17 00:18:23
【问题描述】:
我有一个界面,代表我想用区块链做什么。
public interface IBlockChain {
/**
* Put data on the blockchain
*
* @param key the key being used to put the data on the blockchain
* @param data the data being put on the blockchain
*/
public boolean put(String key, Map<String, Object> data);
/**
* Get data from the blockchain
*
* @param key the key being queried
* @return
*/
public List<Record> get(String key);
/**
* Get all data from the blockchain
* @return
*/
public List<Record> all();
}
我有一个 Multichain 的有效实现。但我现在想开始实施其他区块链技术。 我将如何在 Hyperledger Fabric v1.0 中解决这个问题?我可以将原始数据推送给它吗?还是我总是需要调用一些链码来为我创建一个对象?
【问题讨论】:
-
您必须调用您在区块链中实例化的智能合约(链码)。在您的情况下,您将拥有一个 Hyperledger Fabric 区块链。然后,有一个 SDK (github.com/hyperledger/fabric-sdk-node) 可以帮助调用它。我不知道我是否很好地理解了你的问题。能否提供更多信息?
标签: blockchain hyperledger-fabric