Official Circular Protocol Enterprise APIs for Data Certification - Java Implementation
- Account management and blockchain interaction
- Certificate creation and submission
- Transaction tracking and verification
- Secure digital signatures using ECDSA (secp256k1)
- RFC 6979 compliant deterministic signatures
- Java 11 or higher
- Maven 3.6 or higher
- OkHttp3 for HTTP requests
- Jackson for JSON processing
- Bouncy Castle for cryptographic operations
- JUnit Jupiter for testing
- Clone the repository
- Build with Maven:
mvn clean install
Main class for interacting with the Circular blockchain:
open(String address)
- Open an accountupdateAccount()
- Update account data and noncesetNetwork(String network)
- Set blockchain networksignData(String message, String privateKeyHex)
- Sign data with private keysubmitCertificate(String data, String privateKeyHex)
- Submit a certificategetTransactionById(String txId, long start, long end)
- Get transaction detailsgetTransactionOutcome(String txId, int timeoutSec, int intervalSec)
- Poll for transaction outcome
Class for managing certificates:
setData(String data)
- Set certificate datagetData()
- Get certificate datagetJsonCertificate()
- Get certificate in JSON formatgetCertificateSize()
- Get certificate size in bytes
To run the tests, you need to set up the following environment variables:
export CIRCULAR_PRIVATE_KEY="your_64_character_private_key_here"
export CIRCULAR_ADDRESS="your_wallet_address_here"
The private key should be a 64-character (32-byte) hex string, and the address should be a valid Ethereum-style address (40 characters + 0x prefix).
mvn clean test
mvn clean package
MIT License - see LICENSE file for details
CIRCULAR GLOBAL LEDGERS, INC. - USA
- Original JS Version: Gianluca De Novi, PhD
- Java Implementation: Danny De Novi