Skip to content

Conversation

@gregnazario
Copy link
Collaborator

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.

@vercel
Copy link

vercel bot commented Oct 28, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
aptos-docs Ready Ready Preview Comment Oct 31, 2025 3:23pm

Copilot AI review requested due to automatic review settings October 31, 2025 14:56
@rrigoni
Copy link

rrigoni commented Oct 31, 2025

There are docs for all the main features in the read me here https://github.com/aptos-labs/japtos

Copy link
Contributor

Copilot AI left a 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
Copy link

Copilot AI Oct 31, 2025

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.

Suggested change
// 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'

Copilot uses AI. Check for mistakes.
Comment on lines +218 to +220
return resource.getAsJsonObject("coin")
.get("value")
.getAsLong();
Copy link

Copilot AI Oct 31, 2025

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.

Copilot uses AI. Check for mistakes.
Comment on lines +297 to +299
return resource.getAsJsonObject("coin")
.get("value")
.getAsLong();
Copy link

Copilot AI Oct 31, 2025

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.

Copilot uses AI. Check for mistakes.
Copy link

@rrigoni rrigoni left a 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.

@rrigoni
Copy link

rrigoni commented Oct 31, 2025

@gregnazario , it is published, please update the maven artifactId in the docs to the following:

<dependency>
    <groupId>io.github.aptos-labs</groupId>
    <artifactId>japtos</artifactId>
    <version>1.1.4</version>
</dependency>

https://central.sonatype.com/artifact/io.github.aptos-labs/japtos

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants