HyFi-NFT is a hybrid blockchain whose nodes are run by verified entities. HyFi-NFT uses the Multichain framework with distributed consensus between identified block validators. It's close in spirit to PBFT (Practical Byzantine Fault Tolerance), but instead of multiple validators per block, there is one validator per block, working in a round-robin fashion.
This is described in detail in the 'Mining in MultiChain' section beginning on page 7 of the Multichain white paper.
Key features are:
High speed: Greater than 1000 tps, which includes signature verification & transaction processing i.e. real Byzantine. Block time as low as 2 seconds.
High scalability: Supports millions of addresses, assets, streams, and unlimited transactions / stream items. Also supports unlimited nodes in the network.
High security: Forked from Bitcoin Core; Full multi-signature support; External key management (Bitcoin hardware security modules).
Unified JSON-RPC API for applications: API cleanly separates the app from the node; Compatible with any API library developed for Bitcoin Core.
Flexible assets: No need for smart contracts; Flexible asset metadata; Permissioned follow-on issuance; Atomic multi-asset payments; Multi-way atomic asset exchanges; Multi-signatures for security & escrow; Subscribe to an asset to query transactions.
Permissioned blockchain: Validation by consensus, not proof of work.
Full asset lifecycle: Issuance, transfer, exchange, escrow, re-issuance, redemption, destruction.
General storage and search: 64 MB of data per transaction. Streams support key–value, identity, time series.
Multiple deployment options: Environment agnostic (self-hosted in a data center, public or private cloud); Accessed as a service; Nodes added simply and quickly; Shared administration model; Smooth governance transitions.
Each address can have one or more of the following 8 permissions:
connect – to connect to other nodes and see the blockchain’s contents.
send – to send funds, i.e. sign inputs of transactions.
receive – to receive funds, i.e. appear in the outputs of transactions.
issue – to issue assets, i.e. sign inputs of transactions that create new native assets.
create – to create streams, i.e. sign inputs of transactions which create new streams.
mine – to create blocks, i.e. to sign the metadata of coinbase transactions.
activate – to change connect, send, and receive permissions for other users, i.e. sign transactions which change those permissions.
admin – to change all permissions for other users, including issue, mine, activate, and admin.
When you create a testNet node, your primary address has connect, send, receive, issue permissions. Since HyFi-NFT has 100% KYC compliance, every address you create must be given permissions by an admin. Create a few addresses and email them to firstname.lastname@example.org along with details on what all permissions (send, receive, issue) should be given to each address.
3.2 Address types
Addresses can be custodial (the private key is stored in the node) or non-custodial (the private key is not stored in the node.)
3.3 Creating a custodial address
getnewaddress returns a new address whose private key is added to the wallet. This is a custodial address.
The output is an address.
3.4 Creating a non-custodial address
createkeypairs generates one or more public / private key pairs, which are not stored in the wallet or drawn from the node’s key pool, ready for external key management. These are non-custodial addresses.
For each key pair, the address, public key (as embedded in transaction inputs) and private key (used for signatures) is provided.
3.5 Creating a multi-sig address
Addmultisigaddress creates a pay-to-scripthash (P2SH) multisig address and adds it to the wallet.
Funds sent to this address can only be spent by transactions signed by nrequired of the specified keys. Each key can be a full public key, or an address if the corresponding key is in the node’s wallet.
Output is the P2SH address
4. Non-Fungible Tokens (NFTs)
NFTs can be of various types, including:
When an NFT is created on the HyFi-NFT Blockchain, the following parameters can be customized:
the address which is creating the asset
address to which the assets are to be sent on creation
whether additional units can be created
whether it has per-asset send and/or receive permissions
the smallest transact-able unit
custom-fields parameter to provide extra information
A HyFi NFT can be issued using: issuefrom fromAddress toAddress name|params qty (units=1) (customFields)
On successful creation, a transaction id will be generated.
Information about an asset can be obtained using getassetinfo asset-name
Note: In the above example, the asset name can be in any one of these formats: Name: "Shinam Arora HTN Series 1" Asset ref: e318239a3792a092ad60b7818b3efe88c781924a8ad2ce6f6940474192566984 Issue txid: 200-267-6371
4.2 Managing an NFT
JSON-RPC API commands
See the following sections on the MultiChain JSON-RPC API commands page
1. Asset management
2. Querying wallet balances and transactions
3. Sending one-way payments
4. Atomic exchange transactions – tutorial
5. Managing stream and asset subscriptions
6. Querying subscribed assets
7. Smart filters and upgrades
Transactions can be one-way payments or atomic exchange transactions.
5.1 Sending one-way payments
One-way payments can be sent using sendassetfrom fromAddress toAddress asset quantity
On success, a transaction id will be generated.
You can get a list of all the asset balances for an address using getaddressbalances address
5.2 Atomic exchange transactions
Atomic exchange transactions are used to safely swap assets between counterparties.
Any MultiChain transaction can have multiple inputs and outputs, and each one can relate to a different address on the blockchain. This enables a single transaction to perform an asset exchange between two or more parties, for example sending a dollar-denominated asset from Alice to Bob, while simultaneously sending a Euro-denominated asset from Bob to Alice.
Because the exchange takes place in a single transaction, it comes with a guarantee of atomicity, meaning that all of the asset transfers take place simultaneously, or none take place at all. In the finance world, this type of transaction is termed delivery-versus-payment, or DvP for short.