Repository navigation
Conversation
This was referenced Oct 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Funds an identity asset lock from the wallet's own Core outputs, so registering or topping
up an identity no longer needs a deposit address. The caller picks the output.
Pipeline
Before:
REQUEST_ASSET_LOCK_FUNDING_ADDRESShands out a one-off address whose key isstored encrypted, the user deposits coins to it, and
REGISTER_IDENTITY/TOP_UP_IDENTITYspend that deposit.Now:
LIST_CORE_UTXOSlists the account's spendable outputs by xpub, the frontend picksone (coin control), and the same two calls take that output's address and txid in the
fields they already had. The deposit path is untouched: when the address has a record in
AssetLockFundingAddressesRepository, develop's branch runs as before.What this adds
LIST_CORE_UTXOS, the only new messaging method. Payload shapes of the two identitycalls are unchanged.
CoreExplorerService.getXpubUtxos, a pagedPOST /xpub/utxo.CoreExplorerService.getOutputSpender, a singleGET /transaction/<txid>that readsvOut[].spentTxIdfor the output paying the funding address.deriveCoreAddressPrivateKey: finds the address among the account's BIP44 addresses,bounded by the explorer's own gap scan, and refuses an address the wallet does not own
before any derivation or broadcast happens.
Nothing new is stored. A registration retry needs the identity index the committed asset
lock funded, and a top-up retry needs the DIP-13 index that owns its credit output; with
no record to read, both come from L1: the funding output names the transaction that spent
it, and that txid selects the index, through develop's existing
recoverIdentityIndexFromTxidfor registration and the same rebuild-and-compare for atop-up. The credit output still lands on a DIP-13 key
(
m/9'/coin'/5'/1'/indexfor registration,.../2'/indexfor a top-up), so a walletrestored from the seed finds the credits.
The storage schema, the funding-address repository and every other handler are untouched.
Testnet run
Extension funded with one output of 100000000 duffs, identity already present so the
scenario took the top-up branch. Seven checks, all passed:
Identity
2HPEBQW4JgatyogjFc5KdYzAXaPAyTEG4ShYYKS7w643, state transition0b4c0c3682f34b0df9a382edb455008232c4b6573c208ce3e1fbc26e6acc0059, funding transactiona6b83e298644b3e608a5cced2be0bae5ccef8088924a2b39ef9481f32a00d695.Diff: 368 added and 73 removed lines of source across 9 files, plus tests. Unit tests pass
except for the live-network identity import suites, which fail intermittently with
fetch failedon this branch and on develop alike.Separate defect, not fixed here
SWITCH_NETWORKre-points DashPlatformSDK only.DashCoreSDKhas no network setter, andthe offscreen backend builds it once at startup, so after a network switch the core SDK
stays on the previous network until the extension is reloaded.
TOP_UP_IDENTITYcatchesthis in its scope guard before signing or broadcasting;
REGISTER_IDENTITYhas no suchguard and would talk to DAPI on the wrong network. Proposed one-method fix in its own PR:
PrivateAPI.setNetwork()rebuildscoreSDKand callsbuildHandlers(), andSwitchNetworkHandlercalls it instead ofsdk.setNetwork(). No new messaging method, nofrontend change.