Skip to content

feat: top up an identity from one of the wallet's own Platform addresses - #172

Closed
LexxXell wants to merge 4 commits into
developfrom
feat/identityTopUpFromPlatform
Closed

LexxXell wants to merge 4 commits into
developfrom
feat/identityTopUpFromPlatform

Conversation

@LexxXell

Copy link
Copy Markdown
Collaborator

Draft. Sits on #171 (registration from a Platform address), which in turn sits on #168. Until those merge this diff carries their commits and CI fails the same way (calculateMinRequiredFee needs #167). Merge order: #167 / #169 → #168 → #171 → this one.

Changes

Top-up of an existing identity paid from one of the wallet's own Platform addresses — the counterpart of the registration in #171, on the same journal.

  • IdentityFundingService.quotePlatform now signs either transition: identity create for a registration, IdentityTopUpFromAddresses for a top-up of the identity the payload names.
  • TOP_UP_IDENTITY_FROM_PLATFORM_ADDRESS confirms such a quote by broadcasting the stored bytes and waiting for Platform to credit the identity. No identity is created, so nothing is resolved or saved afterwards.

Everything else is inherited: the address is the one asked for or the largest covering the amount, the nonce is signed into the bytes so a retry sends exactly them, and while the operation is pending the wallet's other Platform spends are refused.

Backend only — no UI changes.

Testing

  • tsc --noEmit, ts-standard
  • test/api/private/identities/identityFunding.spec.ts — four new cases: a top-up quote stores signed bytes and reserves no identity index; confirming sends exactly those bytes, makes no identity lookup and never touches Core; a top-up without a valid identifier is refused by validatePayload; a pending top-up cannot be confirmed through the registration handler.
  • jest: 44 suites, 19 cases in the funding spec; the only failures are the network-dependent specs that flake on develop too and pass on a re-run.

@LexxXell

LexxXell commented Oct 2, 2026

Copy link
Copy Markdown
Collaborator Author

Superseded by #177. The funding journal chain is parked on the archive/identityFundingJournal branch.

@LexxXell LexxXell closed this Oct 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant