m Fabric Tokens

Key Points

  1. At a point, Fabric will have direct token support
  2. Fabric can also integrate with tokens on other platforms


References


Key Concepts



Common ERC Token Types - Blockchains 101


List of ERC Standards



Fabric Token Support in Fabric v2.4x

March 2022 - Angelo De Caro, IBM

https://www.hyperledger.org/learn/webinars/hyperledger-in-depth-tokens-in-hyperledger-fabric-whats-possible-today-and-whats-coming


https://www.hyperledger.org/wp-content/uploads/2022/03/Tokens-in-Hyperledger-Fabric-Whats-possible-today-and-whats-coming.pdf

Tokens-in-Hyperledger-Fabric-Whats-possible-today-and-whats-coming.pdf file for download



Token SDK features



Decentralized Privacy Scenario for Token transactions




Fabric Token Support Stack


Token Requests in Fabric



Token Requests are Blockchain Agnostic



Simple Atomic Token Swap



Fabric Token Sample Apps - 

https://github.com/hyperledger/fabric-samples


Token ERC-20Smart contract demonstrating how to create and transfer fungible tokens using an account-based model.README
Token UTXOSmart contract demonstrating how to create and transfer fungible tokens using a UTXO (unspent transaction output) model.README
Token ERC-1155Smart contract demonstrating how to create and transfer multiple tokens (both fungible and non-fungible) using an account based model.README
Token ERC-721Smart contract demonstrating how to create and transfer non-fungible tokens using an account-based model.README


Kuma Token on Fabric v1.x - simple token model << alternative model to current Fabric token support

https://github.com/Kunstmaan/hyperledger-fabric-kuma-token-example

This a simple example of a token created on the Hyperledger Fabric platform. It exists out of a simple wallet system that can be used to exchange Kuma-tokens and a multisig system that can be used for setting up multisig contracts between users. This example shows how the different tools we created for the Hyperledger Fabric platform can be used:

This repository exists out of three parts:

  • The network configuration, containing all the crypto stuff, channel artifacts and docker compose files.
  • The chaincode, containing the chaincode itself written in Node.js.
  • The client, which is a simple CLI tool that can be used to interact with the chaincode.


Fabtoken - deprecated for new Fabric Token support framework in 2022


Fabtoken concepts

https://medium.com/coinmonks/the-secret-gem-of-hyperleder-fabric-fabtoken-aa5c37159247


Fabtoken design



Fabtoken interoperability

https://jira.hyperledger.org/browse/FAB-11965

The goal of this epic is to allow a chiancode to allow complex business logic to be attached  Fabtoken.

Design Document: 

https://docs.google.com/presentation/d/19F1WIm11NX8rdIX6C0pS_lxtOLvFM9ybGGz_rhpSWKo/edit?usp=sharing


https://docs.google.com/presentation/d/19F1WIm11NX8rdIX6C0pS_lxtOLvFM9ybGGz_rhpSWKo/edit?usp=sharing


Building NFTs with Hyperledger Fabric - 2022 - which SDK version?


Part 1

https://www.youtube.com/watch?v=jyEegXLrNr4

Slides - token-workshop-chainyard-p1-Intro to Blockchain and NFT Concepts.pdf link

Slides - token-workshop-chainyard-p1-Intro to Blockchain and NFT Concepts.pdf file


Part 2 

https://www.youtube.com/watch?v=PGXOM3KxDyw

token-workshop-chainyard-p2-

https://wiki.hyperledger.org/display/events/Build+Your+Own+NFT+with+Hyperledger+Fabric



Fabric Wallet Services and Solutions


Wallets can be used for different entities in a Fabric solution network

user or owner wallet

organization wallet

enterprise wallet for the entire network


Building wallets in Hyperledger Fabric - memory, file, database

https://hyperledger-fabric.readthedocs.io/en/release-2.2/developapps/wallet.html

There are different types of wallets according to where they store their identities:

wallet.types 

The three different types of wallet storage: File system, In-memory and CouchDB.

  • File system: This is the most common place to store wallets; file systems are pervasive, easy to understand, and can be network mounted. They are a good default choice for wallets.
  • In-memory: A wallet in application storage. Use this type of wallet when your application is running in a constrained environment without access to a file system; typically a web browser. It’s worth remembering that this type of wallet is volatile; identities will be lost after the application ends normally or crashes.
  • CouchDB: A wallet stored in CouchDB. This is the rarest form of wallet storage, but for those users who want to use the database back-up and restore mechanisms, CouchDB wallets can provide a useful option to simplify disaster recovery.

Use factory functions provided by the Wallets class to create wallets.

Hardware Security Module

A Hardware Security Module (HSM) is an ultra-secure, tamper-proof device that stores digital identity information, particularly private keys. HSMs can be locally attached to your computer or network accessible. Most HSMs provide the ability to perform on-board encryption with private keys, such that the private keys never leave the HSM.

An HSM can be used with any of the wallet types. In this case the certificate for an identity will be stored in the wallet and the private key will be stored in the HSM.

To enable the use of HSM-managed identities, an IdentityProvider must be configured with the HSM connection information and registered with the wallet. For further details, refer to the Using wallets to manage identities tutorial.

Structure

A single wallet can hold multiple identities, each issued by a particular Certificate Authority. Each identity has a standard structure comprising a descriptive label, an X.509 certificate containing a public key, a private key, and some Fabric-specific metadata. Different wallet types map this structure appropriately to their storage mechanism.

wallet.structure 

A Fabric wallet can hold multiple identities with certificates issued by a different Certificate Authority. Identities comprise certificate, private key and Fabric metadata.



https://www.youtube.com/watch?v=GdsffPM_lLw


Kaleido support for Metamask wallets with Hyperledger Fabric 

https://www.kaleido.io/blockchain-platform/metamask



Fabric NFT Tutorial - Chainyard - 2024


LAB - video - Build+Your+Own+NFT+with+Hyperledger+Fabric

https://github.com/hyperledger-labs/nft-auction

Similar in concept than the EBC Web3 trading auction marketplaces with assets, tokens, payments, analytics, a model for AMM using a smart pricer

This lab uses Hyperledger Fabric as the underlying ledger technology to create an auction market. This helps the developer to vizualize how the NFT concept can be extended to private blockchains like Hyperledger Fabric. The application uses Hyperledger Fabric 2.X version in its current form.




Chrome extension for Simple Fabric Wallet ( WIP - not ready for production )

https://medium.com/coinmonks/introducing-the-hyperledger-fabric-chrome-extension-f1fd00f84a2c

the Extension does not yet support a login system that some networks require. Due to this you are currently not able to add credentials.

Despite this, it currently works on most basic networks.

Feel free to check it out/contribute: https://github.com/hyperledger-labs/fabric-chrome-extension

Inspired by Metamask

MetaMask, is it provides a secure way for developers to build a website that can connect to the Ethereum network. It also provides an easy way to send transactions, and cryptocurrencies.




Potential Value Opportunities


Deployment and Operation of Fabric Solutions on Kubernetes using the Fabric Operator


Potential Challenges



Candidate Solutions



Step-by-step guide for Example



sample code block

sample code block
 



Recommended Next Steps