-
Notifications
You must be signed in to change notification settings - Fork 20
[sdks] Document Japtos the java SDK #302
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
There are docs for all the main features in the read me here https://github.com/aptos-labs/japtos |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds comprehensive Java SDK documentation for Aptos, including installation instructions, quickstart guides, account management, transaction building, and extensive code examples.
- Adds Java SDK overview page with installation and basic usage examples
- Includes quickstart guide with step-by-step instructions for a simple token transfer
- Provides detailed documentation on account management including Ed25519, multi-signature, and HD wallets
- Documents transaction building, signing, simulation, and submission workflows
- Adds comprehensive code examples covering common use cases
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/content/nav/en.ts | Adds Java SDK navigation label |
| src/content/docs/build/sdks/java-sdk/quickstart.mdx | New quickstart guide with complete APT transfer example |
| src/content/docs/build/sdks/java-sdk/java-examples.mdx | New examples page with multiple use cases and patterns |
| src/content/docs/build/sdks/java-sdk/building-transactions.mdx | New transaction building guide with detailed explanations |
| src/content/docs/build/sdks/java-sdk/account.mdx | New account management guide covering various account types |
| src/content/docs/build/sdks/java-sdk.mdx | New Java SDK overview page with features and basic examples |
| src/content/docs/build/sdks.mdx | Adds Java SDK link to main SDKs page |
| astro.sidebar.ts | Adds Java SDK section to sidebar navigation |
Comments suppressed due to low confidence (1)
src/content/docs/build/sdks/java-sdk/account.mdx:1
- This code accesses nested JSON properties without null checks. While this may work in controlled examples, consider adding a note that production code should include null checking or error handling when accessing JSON properties, as the resource might not exist or have an unexpected structure.
---
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| System.out.println("Mnemonic: " + mnemonic); | ||
|
|
||
| // Derive multiple accounts from same mnemonic |
Copilot
AI
Oct 31, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The BIP44 derivation path format uses hardened derivation (indicated by the apostrophe). Consider adding a brief note explaining what the numbers represent: m / purpose' / coin_type' / account' / change' / address_index'. This would help developers understand how to modify the path for deriving multiple accounts.
| // Derive multiple accounts from same mnemonic | |
| // Derive multiple accounts from same mnemonic | |
| // BIP44 derivation path format: m / purpose' / coin_type' / account' / change' / address_index' | |
| // For Aptos, purpose is 44', coin_type is 637', account' is the account number, change' is 0' (external), address_index' is 0' |
| return resource.getAsJsonObject("coin") | ||
| .get("value") | ||
| .getAsLong(); |
Copilot
AI
Oct 31, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The getBalance method chains JSON access operations without null safety. Consider adding a note in the surrounding documentation that this simplified approach assumes the account is funded and the resource exists. Production code should handle cases where the resource might not exist.
| return resource.getAsJsonObject("coin") | ||
| .get("value") | ||
| .getAsLong(); |
Copilot
AI
Oct 31, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar to other examples, this JSON property access lacks null safety. Since this is in an examples file, consider adding a comment within the code or in the surrounding text noting that error handling has been omitted for brevity but should be included in production code.
rrigoni
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are moving the library to maven central repo and configuration will change (packageid), lets hold until IT configures the maven central repo so I can push to it.
|
@gregnazario , it is published, please update the maven artifactId in the docs to the following: https://central.sonatype.com/artifact/io.github.aptos-labs/japtos |
AI generated some docs for the Japtos SDK
Have not had time to go and review it too much, so please take a look at it.