Archive post
HiveCash lanza HBD-Mint: reserva digital para tu comunidad [ES-EN]
• ertytux
HBD-Mint is an adapted implementation of the eCash protocol for HIVE as an HBD wallet guarded by the community
ENGLISH VERSION (click here!)
HBD-Mint is an adapted implementation of the eCash protocol for HIVE. It allows the creation of an HBD wallet guarded by the community that is easily accessible and used by new users and merchants, without the need to explicitly have an account on HIVE. With only 12 mnemonic words, you can already operate, even offline.  ## Background The [eCash](https://cashu.space/) protocol is even older than #Bitcoin, but its implementation associated with wallets has the impediment of not having a prediction of commissions on deposits and withdrawals. That is why it has not been until recently that it was implemented in Bitcoin Lightning for its low commissions, and now in #HIVE for not having any. The eCash protocol allows issuing and transferring digital tokens (representations of values) without revealing sensitive information, guaranteeing privacy and resistance to censorship. Its architecture consists of Mints (mints or full reserve community banks) and wallets such as Cashu and HiveCash, where users deposit securities and receive tokens that can be used in instant transactions. There is a detailed and quite descriptive documentation of the protocol and the Nuts (way of referring to the Bitcoin eCash token) in https://github.com/cashubtc/nuts. The nature of the #HIVE blockchain offers an exceptional environment for implementing the eCash protocol using HiveCash, especially for its focus on communities, efficiency, and decentralization. Unlike heavier networks, HIVE allows fast transactions, without commissions and with almost instantaneous completion, which facilitates the issuance and circulation of eCash-type tokens without friction. In addition, its architecture, based on accounts and public keys, simplifies the integration of mints and wallets without depending on complex contracts. For HiveCash, this means being able to create a “community reserve bank” experience that is accessible even in environments with limited connectivity, such as Cuba, where offline operability and interoperability are crucial. The HiveCuba community is committed to the most natural adoption of an economy based on HBD and HIVE, reinforced by educational efforts. ## Technical details The eCash model followed has been adapted according to the UTXO logic, in the following processes: - Secure generation of BIP39 seed phrases - Each UTXO is identified by the scrypt-based ix-hash of a private key derived according to BIP32 with the following parameters: ``` SCRYPT_PARAMS = { length: 32, n: 16384, r: 8, p: 1 } salt = bytes("HiveCash") derivedroute=`m/44'/0'/0'/0/${ix}` ``` - A unique memo is associated with each hash. When a deposit is detected with that memo, a one-time token is created for the value of the deposit associated with the ix-hash. This process is called Mint. - To spend a token, the ix-private private key must be communicated to the API by encrypting the content with the Mint public key in an ephemeral key scheme that guarantees security. The API verifies that the ix-hash is the ix-private scrypt hash, and then the associated value is used to transfer and mark the token as spent. This process is called burning. - When a transfer is made, the balance of unspent tokens is collected, and a returned token is also created, in the same style as #Bitcoin. If the transfer is internal, the new hash of the deposit destination is specified, and if it is external, the information is specified: {user, amount, memo}. In this way, the REST endpoints {mint tokens, check deposits, perform internal, external transfers, provide signatures, mint public key} guarantee the necessary functionalities to implement an HBD Offline-First wallet such as HiveCash https://cash.hivecuba.com. ## Repositories HiveCuba is committed to expanding the benefits of #HIVE and #HBD in #Cuba and other places. Not only as an educational project in #Web3, but with the contribution of appropriate technological solutions for each environment, with the resilience that characterizes us. We have created a community on GitHub to focus on the significant developments of our contributors https://github.com/HiveCuba-DeV, in which we will be publishing, following the philosophy of Free Software and Open-Source FOSS. * HBD-Mint Repository: https://github.com/HiveCuba-DeV/HBD-Mint * HiveCash progressive Web wallet repository: https://github.com/HiveCuba-DeV/HiveCash-PWA ## Call to action We know the power of open-source development, and we need your collaboration. You can contribute to us by: * Whether you are a developer or not, you can try HiveCash with small amounts and make suggestions for improvement or report bugs to us. Only in this way will we be able to improve! * If you are a developer, you can check the code, make proposals for improvements, or optimizations. You can also be part of HiveCuba-DeV and publish your HIVE development with us. * Specifically on the PWA HiveCash Website, we are still having problems with reading QR sequence in UR format, it would be great if you could help us.