Skip to content

Option to fund identity top-ups from the unbound (legacy-compatible) top-up account #4253

Closed as not planned

Description

@HashEngineering

Problem. The SDK's top-up funding derives on the bound IdentityTopUp account — m/9'/coin'/5'/2'/identity_index'/index (key-wallet/src/account/account_type.rs:369-385, rs-platform-wallet/src/wallet/identity/network/registration.rs:430). Legacy wallets (dashj/DashSync) derive top-up keys on m/9'/coin'/5'/2'/index — no identity level (dashj DerivationPathFactory.blockchainIdentityTopupFundingDerivationPath, AuthenticationKeyChain.requiresHardenedKeys → non-hardened leaf).

Consequence: top-up interop is one-way. The SDK can discover legacy top-ups (the auto-created IdentityTopUpNotBoundToIdentity account, key-wallet/src/wallet/helper.rs:334-335, is path-identical to dashj, and the recovery/scan surfaces accept it — asset_lock/sync/recovery.rs:413, orchestration.rs:551), but a legacy app restoring the same seed can never see SDK-created top-ups: it doesn't derive the extra hardened level.

Ask. Let the host choose the funding account for a top-up — the FFI already models it (FFIAssetLockFundingType::IdentityTopUpNotBound = 2, key-wallet-ffi/src/transaction.rs:717-730; rs-platform-wallet-ffi/src/asset_lock/build.rs:203 parses it), but topUpFromCore hardcodes the bound type 1. Either expose a funding-type parameter or provide a documented config. During the legacy→SDK transition era, mobile wallets would emit type 2 so users who downgrade/restore on a legacy app keep seeing their top-ups.

Decision needed (product): is legacy-restore visibility of SDK-created top-ups a requirement during the transition? If yes, tag 2 should be the mobile default until legacy apps are EOL. (Note the index-numbering nuance: the SDK's bound account numbers per identity while dashj numbers globally — funding from the unbound account sidesteps that too.)



Context: dashpay/dash-wallet#1520 (SDK cutover Phase 1B, asset-lock sends) / MO-998. Findings verified against integration/kotlin-sdk-stack + rust-dashcore dev @ 9c87ccb3.

Activity

  1. HashEngineering commented on Jul 30, 2026

    @HashEngineering
    CollaboratorAuthor

    Claude got carried away with some legacy systems in the android app.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions