Skip to content

SDK Stage 3 API Implementation Analysis

Date: 2026-02-05 Reference Plan: SDK_STAGE3_PLAN.md

1. Executive Summary

Based on the inspection of the SDK codebase (packages/enduser, packages/operator, packages/core), the current SDK implementation achieves High Alignment with the Stage 3 Plan from functionality and business scenario dimensions.

All Critical Paths (Community Creation, Operator Onboarding, User Registration, Gasless Execution) are implemented. Some method names differ from the plan but fulfill the required business logic.

2. Detailed Comparison

2.1 Core Actions (Layer 1)

Plan ItemImplementation StatusSDK Method / LocationNotes
RegistryActions✅ Implementedpackages/core/src/actions/registry.tsComplete coverage of Role/Config/Access logic.
registerCommunity✅ ImplementedregisterRoleSelf (Generic)Handled via CommunityClient.setupCommunity.
joinCommunity✅ ImplementedregisterRoleSelf (Generic)Handled via UserClient.registerAsEndUser.
getCommunityInfo✅ ImplementedgetRoleConfig / roleConfigsReturns detailed config struct.
SuperPaymasterActions✅ Implementedpackages/core/src/actions/superPaymaster.tsReferenced by OperatorClient.
GTokenStakingActions✅ Implementedpackages/core/src/actions/staking.tslockStake, unlockAndTransfer confirmed.
PaymasterFactoryActions✅ Implementedpackages/core/src/actions/factory.tsUsed in PaymasterOperatorClient.

2.2 Business Clients (Layer 2)

CommunityClient

Plan ItemImplementationStatus
onboardCommunity()setupCommunity({...})✅ Matches (Renamed)
getCommunityInfo()getRoleConfig (via Actions)⚠️ Partial (Client helper missing, uses Action)
deployXPNTs()createCommunityToken({...})✅ Matches

OperatorClient

Plan ItemImplementationStatus
setupNode()registerAsSuperPaymasterOperator✅ Specific Implementation
depositCollateral()depositCollateral✅ Matches
getOperatorStatus()getOperatorDetails✅ Matches

EndUserClient

Plan ItemImplementationStatus
joinAndActivate()registerAsEndUser({...})✅ Matches
deploySmartAccount()Missing in UserClient⚠️ Gap: Logic exists in Factory Actions, not wrapped in UserClient.
executeGasless()executeGasless({...})✅ Matches (Logic for V4 & SuperPaymaster)

3. Gap Analysis & Recommendations

  1. Smart Account Deployment: The UserClient assumes an existing account address. For a complete "Onboarding" flow, a static helper or a UserFactoryClient might be needed to deploy the abstract account before the UserClient can be fully instantiated (or UserClient should support a "deploy on first tx" mode).

    • Recommendation: Add a static deployAccount helper or ensure documentation covers using SimpleAccountFactory before UserClient.
  2. Naming Consistency:

    • setupCommunity vs onboardCommunity. The current setup naming is clearer as it implies multiple steps (Register + Token).
    • registerAsEndUser is precise.

4. Conclusion

The SDK API is Stage 3 Ready for detailed regression testing. The business logic coverage allows for the execution of all 4 key scenarios defined in the plan. The identified gaps (Account Deployment wrapper) are minor convenience issues rather than blocking functional missing defects.

Released under the MIT License.