Migrate Coin, Fiat, Monetary classes to Java Money
See original GitHub issueOriginally reported on Google Code with ID 614
Now that the Java Money (JSR 354) API Backport is available and should support Android
/ Java 6, it should be possible to modify the bitcoinj Monetary classes to be more
compatible with this implementation.
As a rough proposal, I suggest the following:
1) `Coin` should extend the `NumberValue` class
2) `Fiat` should implement `MonetaryAmount` (or perhaps be deprecated in favor of MonetaryAmount)
3) A MonetaryAmount subclass should be created for a Bitcoin (value, currency) pair
I realize this is not going to be a popular request so soon after the conversion to
`Coin` and while JavaMoney is so new. But I wanted to create the issue for discussion
and to raise awareness so this change might be included in a future release.
The Specification supports many important and interesting use cases (such as crypto
currency and currency exchanges) and even includes a link to bitcoinj in the appendix.
References
---------
The JavaMoney project home page:
http://javamoney.github.io
The JavaMoney specification:
https://github.com/JavaMoney/jsr354-api/blob/master/src/main/asciidoc/JavaMoneySpecification.adoc
The JavaMoney API (Java 8+)
https://github.com/JavaMoney/jsr354-api
The JavaMoney Reference Implementation (Java 8+):
https://github.com/JavaMoney/jsr354-ri
The Java Money API Backport (Java 6/7):
https://github.com/JavaMoney/jsr354-api-bp
The JavaMoney Reference Implementation Backport (Java 7):
https://github.com/JavaMoney/jsr354-ri-bp
Reported by sean@msgilligan.com
on 2015-04-10 01:17:46
Issue Analytics
- State:
- Created 8 years ago
- Comments:8 (7 by maintainers)
Top Results From Across the Web
Different Ways to Convert Bitcoin to Fiat Currency
Cryptocurrency Exchanges: This is the most widely used method to convert bitcoin to fiat currency. It is similar to a money exchange center ......
Read more >Java Money and the Currency API - Baeldung
A quick guide to the Currency and Money upcoming JSR and how to use it ... To define classes representing currencies and monetary...
Read more >Converting Bitcoins to Fiat Currency - Javatpoint
Converting Bitcoins to Fiat Currency with Tutorial, Introduction, History of Blockchain, ... It is also used to convert your bitcoin into fiat currency....
Read more >Smart Contracts with Tokenized Fiat Currency on Sberbank's ...
Smart Contracts with Tokenized Fiat Currency on Sberbank's Platform - Oleg Abdrashitov, SberbankOleg will present a platform for issuance of ...
Read more >How Can You Convert Your Cryptocurrency into Fiat Currency?
Join me in a free blockchain education masterclass and learn "How to Adapt to Change Using Blockchain to Transform Your Career and Help...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@stokito I’ve created a module in my bitcoinj-addons repository that a Bitcoin currency provider based on the one from
javamoney-shelter
. I’ve also added a prototype adapter that will wrap and adapt theExchange
interface from the extensive XChange library of Bitcoin exchange clients. See the README sectionAn update on this:
consensusj-currency
andconsensusj-exchange
modules. Feel free to try it out and submit issues or pull-requests.bitcoinj-core
dependent upon JavaMoney.@schildbach I opened this issue on Google Code, but since Mike imported it to GitHub, I can’t close it. I recommend we close it.