Repository navigation
Conversation
This was referenced Sep 22, 2026
Collaborator
Author
|
Superseded by #177. The funding journal chain is parked on the |
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.
Changes
Identity registration and top-up paid from the wallet's own Core coins (BIP44 UTXOs), instead of a deposit to a one-off funding address. Backend only; Platform-address and shielded sources come in later PRs.
The flow is split into a quote and a confirmation, both journaled so that any step can be resumed after a crash, a closed popup or a network timeout without reselecting coins or spending a second asset lock:
PREPARE_IDENTITY_FUNDINGselects UTXOs, reserves the DIP-13 index (registration5'/1'/i, top-up5'/2'/i), signs the asset lock and estimates the Platform fee. Nothing is broadcast. Returns the operation with Core and Platform fees and the expected net credits.REGISTER_IDENTITY_FROM_CORE/TOP_UP_IDENTITY_FROM_COREbroadcast the saved asset lock, wait for its InstantLock/ChainLock proof, build and send the identity transition, and wait for Platform to confirm it.CANCEL_IDENTITY_FUNDINGreleases a quote that has not been broadcast.GET_IDENTITY_FUNDING_OPERATIONS/GET_IDENTITY_FUNDING_SOURCESlist operations and the spendable Core balance.Backend pieces
IdentityFundingRepository— per-wallet journal (identityFunding_<network>_<walletId>), guarded by Web Locks: a short journal lock for writes and a per-operation lock for a whole execution.IdentityFundingService— domain primitives (UTXO loading via dashscan/xpub/utxo, parent tx verification, signing, fee estimate, broadcast, transition building); the handlers orchestrate them.buildAssetLockFromUtxos— multi-input asset lock with change back to the BIP44 change chain (1 duff/byte, 546 dust).identityFundingErrors):REGISTER_IDENTITYis refused while a registration funding operation is pending.Testing
tsc --noEmit,ts-standard(on dev.10)jest: 361/362 on dev.10 (exportPrivateKeytimes out only in the full run and passes alone)