API calls that return lists now take limit, offset and reverse params.
API calls that used to return data & optional list (e.g. blockWithTransactions)
now only return base data. The optional lists can be fetched via
a different API call.
Also: SLF4J now routes logging to log4j2 so start up output cleaned up.
Suppressed extraneous Jersey warning about Providers during start-up injection.
Refactored to standard Maven layout:
src/main/java
src/main/resources
src/test/java
etc.
New translation code that uses locale-specific ResourceBundles
to load translations on demand.
Reworked API error/exceptions code to a shorter, simpler
@ApiErrors annotation. Processing of @ApiErrors annotations
produces an example for each possible API error and includes
API error string in HTTP response code, e.g.
400 INVALID_SIGNATURE
Missing API error cases added to each API call.
Translation of openAPI.json removed (for now).
block-explorer.html and BIP39 wordlists now read as resources
instead of direct from disk.
Java compile warnings fixed.
Some runtime warnings remain:
WARNING: A provider api.resource.ApiDefinition registered in SERVER runtime does not implement any provider interfaces applicable in the SERVER runtime.
WARNING: A provider api.resource.AnnotationPostProcessor registered in SERVER runtime does not implement any provider interfaces applicable in the SERVER runtime.
WARN org.reflections.Reflections - given scan urls are empty. set urls in the configuration
XmlJavaTypeAdapter api.Base58TypeAdapter converts byte[] to Base58.
This XmlAdapter is applied at package-level to all packages inside data and api.models.
So no need to annotate every byte[] property!
Added package-info-maven-plugin to pom.xml to do this.
block-explorer.html fixed to show/use base58 again
Some data objects (e.g. TransactionData) have added XmlElements that
convert public keys to addresses, for convenience.
Several API calls updated to return specifically text/plain instead
of ambiguous application/json and/or text/plain. (Typically
API calls that return a single value, e.g. an integer, like /blocks/height).
Added FATJAR packaging support to pom.xml
Added some "summary" fields to API calls but more need doing.
Corrected path clash from having unnecessary @OpenAPIDefinition annotations.
Added API "tags" to group similar calls (address-based, block-related, etc.)
Fixed addresses/lastreference/{address}
Implemented addresses/lastreference/{address}/unconfirmed
Implemented addresses/assets/{address}
Added /admin/stop and /admin/uptime API calls.
Moved general API info into new src/api/ApiDefinition.java
Added CORS support to ApiService
Added /transactions/address/{address} and /transactions/block/{signature}
Replaced references to test.Common.* to do with repository factory.
This fixes issues with building FATJAR due to references to test classes
that are omitted from FATJAR.
Changes to AccountBalanceData, BlockData and TransactionData
to support JAX-RS rendering to JSON.
Added getUnconfirmedLastReference() to Account.
Added getAllBalances(address) to account repository
- returns all asset balances for that address.
Added getAllSignaturesInvolvingAddress(address) to account repository
but currently only uses TransactionRecipients HSQLDB table.
(And even that wasn't automatically populated).
Included: very basic block explorer to be opened in browser as a file:
block-explorer.html
Some initial BTC cross-chain support. (Needs more work).
Unified timestamp for V2 switchover to block version 4,
applicable to several transaction types.
Qora-specific interface to CIYAM ATv2 library.
Beware: some areas still work-in-progress!
* Added AssetData transfer object
* Added IssueAssetTransactionData transfer object
* Reworked qora.assets.Asset into business layer object
* Reworked qora.transaction.IssueAssetTransaction into business layer object
* Added corresponding AssetRepository and support in TransactionRepository et al
* Fixed BlockChain in line with asset changes
* Some renaming inside GenesisTransaction to reflect use of transfer object, not business object
* Business transaction objects now take Repository param
* Moved HSQLDB transaction repositories into a sub-package
* Changed HSQLDBSaver.execute(Connection connection) to .execute(Repository repository) to fix visibility issues
and allow repository more control in the future if need be
* Changed from "return null" statements in HSQLDB repositories to throw DataException when an error occurs.
Better to throw than to silently return null?
* Added static version of PublicKeyAccount.verify() for when a repository-backed PublicKeyAccount is not needed
* Fixed getter/setter code template incorrectly producing "this.this.field = param"
Most SQL tables defined but only payment transactions actually implemented.
Maven support added.
Some code imported from 'old' Qora:
RIPEMD160 renamed as BrokenMD160 and deprecated.
whispersystem's Ed25519 implementation (to be replaced with bouncycastle).
Basic Account/PublicKeyAccount/PrivateKeyAccount code.
Some utils like Base58 and Pair.
To use:
Use maven to fetch dependencies.
Build project.
Fire up an old-gen Qora node.
Run src/test/update.java as a JUnit test to build DB structure.
Run src/test/migrate.java as a JUnit test to migrate old Qora blocks to DB.
You should now be able to run src/test/load.java and src/test/save.java
as JUnit tests demonstrating loading/saving Transactions from/to database.
This commit done while halfway through adding Block support!