-
Notifications
You must be signed in to change notification settings - Fork 2
Aptos integration #519
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: testnet
Are you sure you want to change the base?
Aptos integration #519
Conversation
WalkthroughThis pull request adds Aptos blockchain support to the identity manager module. Changes include importing the APTOS SDK, registering Aptos in the chains configuration, implementing Aptos-specific validation logic in the connection filter, and extending the payload verification flow to handle Aptos chain identifiers. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
PR Compliance Guide 🔍Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label |
||||||||||||||||||||||||
PR Code Suggestions ✨Explore these optional code suggestions:
|
||||||||||||
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.
Actionable comments posted: 0
🧹 Nitpick comments (1)
src/libs/blockchain/gcr/gcr_routines/identityManager.ts (1)
293-295: Consider excluding unrelated formatting changes.The formatting adjustment in
verifyPqcPayloadappears unrelated to Aptos integration. While functionally equivalent, separating cosmetic changes from feature additions keeps PRs focused and easier to review.Consider reverting this formatting change or moving it to a separate code-style PR to maintain focus on the Aptos integration feature.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Disabled knowledge base sources:
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (1)
src/libs/blockchain/gcr/gcr_routines/identityManager.ts(5 hunks)
🔇 Additional comments (4)
src/libs/blockchain/gcr/gcr_routines/identityManager.ts (4)
51-51: Consistent chain mapping pattern.The APTOS addition follows the established pattern for registering blockchain SDKs alongside other chains. Unlike BTC (which has an explicit
@ts-expect-errorcomment due to extra fields), APTOS is added without type assertion, indicating it conforms to theDefaultChaininterface.
169-177: LGTM! Consistent mainnet validation pattern.The Aptos validation logic correctly mirrors the SOLANA mainnet check, ensuring only mainnet addresses are supported. Aptos, like SOLANA, only requires a mainnet verification and does not have a subchain chainId mapping in the configuration, which is the intended design for non-EVM chains in this codebase.
217-235: No changes needed. The code correctly groups Aptos with other chains that use publicKey-based signature verification (xrpl, ton, ibc, near). Aptos SDK's signature verification uses Ed25519PublicKey, confirming this is the appropriate parameter to pass.
18-18: Verify APTOS support in the SDK version specified by the project.The APTOS class is documented in @kynesyslabs/demosdk's API reference, but the project specifies version ^2.5.6 which is not currently published on the npm registry (latest published is v2.3.x). Confirm that:
- The demosdk version resolves correctly during build/installation
- APTOS implements the required methods:
create(null)andverifyMessage(signedData, signature, publicKey)
|



PR Type
Enhancement
Description
Add Aptos blockchain support to identity manager
Import Aptos chain module from SDK
Register Aptos in chains mapping configuration
Add Aptos testnet validation check
Include Aptos in message verification logic
Diagram Walkthrough
File Walkthrough
identityManager.ts
Aptos blockchain support integrationsrc/libs/blockchain/gcr/gcr_routines/identityManager.ts
APTOSimport from@kynesyslabs/demosdk/xm-localsdkaptoschain in thechainsmapping objectaddresses
aptoschain alongsideexisting chains
Summary by CodeRabbit
Release Notes
✏️ Tip: You can customize this high-level summary in your review settings.