@@ -19,39 +19,44 @@ A Java SDK for interacting with the Unicity network, enabling state transitions
1919
2020## Installation
2121
22- ### Gradle (JVM)
22+ ### Using JitPack
2323
24+ Add JitPack repository:
2425``` groovy
25- dependencies {
26- implementation 'com.unicity.sdk:unicity-sdk:1.0-SNAPSHOT'
26+ repositories {
27+ maven { url 'https://jitpack.io' }
2728}
2829```
2930
30- ### Gradle (Android)
31+ #### For Android Projects:
32+ ``` groovy
33+ dependencies {
34+ implementation 'com.github.unicitynetwork:java-state-transition-sdk:1.1:android'
35+ }
36+ ```
3137
38+ #### For JVM Projects:
3239``` groovy
3340dependencies {
34- implementation 'com.unicity.sdk:unicity-sdk-android :1.0-SNAPSHOT '
41+ implementation 'com.github.unicitynetwork:java-state-transition-sdk :1.1:jvm '
3542}
3643```
3744
38- ### Maven (JVM)
45+ ### Using Local Maven
3946
40- ``` xml
41- <dependency >
42- <groupId >com.unicity.sdk</groupId >
43- <artifactId >unicity-sdk</artifactId >
44- <version >1.0-SNAPSHOT</version >
45- </dependency >
47+ ``` groovy
48+ dependencies {
49+ implementation 'org.unicitylabs:java-state-transition-sdk:1.1-SNAPSHOT'
50+ }
4651```
4752
4853## Quick Start
4954
5055### Initialize the Client
5156
5257``` java
53- import com.unicity .sdk.StateTransitionClient ;
54- import com.unicity .sdk.api.AggregatorClient ;
58+ import org.unicitylabs .sdk.StateTransitionClient ;
59+ import org.unicitylabs .sdk.api.AggregatorClient ;
5560
5661// Connect to the Unicity test network
5762String aggregatorUrl = " https://gateway-test.unicity.network" ;
@@ -62,12 +67,12 @@ StateTransitionClient client = new StateTransitionClient(aggregatorClient);
6267### Mint a Token
6368
6469``` java
65- import com.unicity .sdk.token.* ;
66- import com.unicity .sdk.token.fungible.* ;
67- import com.unicity .sdk.transaction.* ;
68- import com.unicity .sdk.predicate.* ;
69- import com.unicity .sdk.shared .signing.SigningService ;
70- import com.unicity .sdk.shared .hash.HashAlgorithm ;
70+ import org.unicitylabs .sdk.token.* ;
71+ import org.unicitylabs .sdk.token.fungible.* ;
72+ import org.unicitylabs .sdk.transaction.* ;
73+ import org.unicitylabs .sdk.predicate.* ;
74+ import org.unicitylabs .sdk.signing.SigningService ;
75+ import org.unicitylabs .sdk.hash.HashAlgorithm ;
7176
7277// Create signing service from secret
7378byte [] secret = " your-secret-key" . getBytes();
@@ -227,7 +232,7 @@ Token<?> updatedToken = client.finishTransaction(
227232### Clone the Repository
228233
229234``` bash
230- git clone https://github.com/unicity /java-state-transition-sdk.git
235+ git clone https://github.com/unicitynetwork /java-state-transition-sdk.git
231236cd java-state-transition-sdk
232237```
233238
@@ -247,7 +252,7 @@ cd java-state-transition-sdk
247252./gradlew integrationTest
248253
249254# Run E2E tests against deployed aggregator
250- AGGREGATOR_URL=https://gateway-test.unicity.network ./gradlew integrationTest --tests " *E2ETest "
255+ AGGREGATOR_URL=https://gateway-test.unicity.network ./gradlew integrationTest
251256```
252257
253258## Platform-Specific Considerations
@@ -268,23 +273,25 @@ The standard JVM version uses:
268273
269274## Architecture
270275
271- The SDK follows a modular architecture:
276+ The SDK follows a modular architecture under ` org.unicitylabs.sdk ` :
272277
273278- ** ` api ` ** : Core API interfaces and aggregator client
274- - ** ` api ` ** : Core API interfaces and aggregator client
275- - ** ` address ` ** : Address schemes and implementations
276- - ** ` predicate ` ** : Ownership predicates (Masked, Unmasked, Burn) and authorization
277- - ** ` serializer ` ** : CBOR and JSON serializers for tokens and transactions
278- - ** ` token ` ** : Token-related classes (TokenId, TokenType, TokenState) and fungible token support
279- - ** ` transaction ` ** : Transaction types (Mint, Transfer, Commitment) and builders
280- - ** ` shared ` ** : Common utilities
281- - ` cbor ` : CBOR encoding/decoding
282- - ` hash ` : Cryptographic hashing (SHA256, SHA224, SHA384, SHA512, RIPEMD160)
283- - ` jsonrpc ` : JSON-RPC transport layer
284- - ` signing ` : Digital signature support (ECDSA secp256k1)
285- - ` smt ` /` smst ` : Sparse Merkle Tree implementations
286- - ` util ` : BitString and other utilities
287- - ** ` utils ` ** : Helper utilities
279+ - ** ` address ` ** : Address schemes and implementations (DirectAddress, ProxyAddress)
280+ - ** ` hash ` ** : Cryptographic hashing (SHA256, SHA224, SHA384, SHA512, RIPEMD160)
281+ - ** ` jsonrpc ` ** : JSON-RPC transport layer with OkHttp
282+ - ** ` mtree ` ** : Merkle tree implementations
283+ - ` plain ` : Sparse Merkle Tree (SMT)
284+ - ` sum ` : Sparse Merkle Sum Tree (SMST)
285+ - ** ` predicate ` ** : Ownership predicates (Masked, Unmasked, Burn, Default)
286+ - ** ` serializer ` ** : CBOR and JSON serializers hierarchy
287+ - ` cbor/ ` : CBOR serializers for all domain objects
288+ - ` json/ ` : JSON serializers for all domain objects
289+ - ** ` signing ` ** : Digital signature support (ECDSA secp256k1)
290+ - ** ` token ` ** : Token types including fungible tokens and nametags
291+ - ` fungible ` : Fungible token support with CoinId and TokenCoinData
292+ - ** ` transaction ` ** : Transaction types and builders
293+ - ` split ` : Token splitting functionality with TokenSplitBuilder
294+ - ** ` util ` ** : Utilities including BitString and HexConverter
288295
289296## Error Handling
290297
@@ -326,9 +333,10 @@ The SDK includes comprehensive test suites:
326333Located in ` src/test/java ` , these test individual components in isolation.
327334
328335### Integration Tests
329- Located in ` src/test/java/com/unicity/sdk/integration ` :
330- - ` TokenIntegrationTest ` : Tests against Docker-based local aggregator
331- - ` TokenE2ETest ` : Tests against deployed aggregator (requires ` AGGREGATOR_URL ` env var)
336+ Located in ` src/test/java/org/unicitylabs/sdk/ ` :
337+ - ` integration/TokenIntegrationTest ` : Tests against Docker-based local aggregator
338+ - ` e2e/TokenE2ETest ` : E2E tests using CommonTestFlow (requires ` AGGREGATOR_URL ` env var)
339+ - ` e2e/BasicE2ETest ` : Basic connectivity and performance tests
332340
333341### Running Tests
334342
@@ -340,7 +348,7 @@ Located in `src/test/java/com/unicity/sdk/integration`:
340348./gradlew integrationTest
341349
342350# Specific test class
343- ./gradlew test --tests " com.unicity .sdk.api.RequestIdTest"
351+ ./gradlew test --tests " org.unicitylabs .sdk.api.RequestIdTest"
344352```
345353
346354## License
0 commit comments