基于Hyperledger的加密货币

时间:2017-08-02 11:31:49

标签: hyperledger-fabric hyperledger

Hyperledger Fabric是否支持创建像比特币/以太币这样的加密货币的可能性? 我不是指我可以用链码实现的令牌。

2 个答案:

答案 0 :(得分:6)

您可以使用Hyperledger Fabric chaincode实现任何业务逻辑,这实际上是一个简单的程序。 Chaincode通过对应用程序提交的事务进行操作来管理分类帐状态,并确保在网络对等方之间保持一致。

Hyperledger Fabric目前支持用Go编写的链代码,而将来会增加对nodeJS和Java的支持。 Chaincode接口定义如下:

// Chaincode interface must be implemented by all chaincodes. The fabric runs
// the transactions by calling these functions as specified.
type Chaincode interface {
    // Init is called during Instantiate transaction after the chaincode container
    // has been established for the first time, allowing the chaincode to
    // initialize its internal data
    Init(stub ChaincodeStubInterface) pb.Response

    // Invoke is called to update or query the ledger in a proposal transaction.
    // Updated state variables are not committed to the ledger until the
    // transaction is committed.
    Invoke(stub ChaincodeStubInterface) pb.Response
}

因此,您可以将加密货币实施为链码。为了获得有关如何实现它的灵感,您可能需要查看以下balance-transfer的演示应用程序。

答案 1 :(得分:0)

alpha版本2.0中有一个令牌功能,您可以检出它:https://hyperledger-fabric.readthedocs.io/en/latest/whatsnew.html#fabtoken

也可以在这里查看

Can we create non-fungible tokens with Hyperledger?

由企业以太坊联盟(EEA)监督的与平台无关的令牌分类法倡议宣布了令牌分类法框架(TTF)V 1.0的发布,该版本使企业和开发人员能够普遍了解和定义非令牌的含义。技术术语,无论其实施方式如何。

相关问题