Skip to content

refactor(tokens)!: send token actions through platform-wallet - #1128

Draft
Claudius-Maginificent wants to merge 51 commits into
v1.0-devfrom
feat/tokens-via-platform-wallet
Draft

Claudius-Maginificent wants to merge 51 commits into
v1.0-devfrom
feat/tokens-via-platform-wallet

Conversation

@Claudius-Maginificent

@Claudius-Maginificent Claudius-Maginificent commented Oct 26, 2026 •

Copy link
Copy Markdown
Collaborator

Stacked atop #1153 (chore/bump-platform-0d91c133), which moves Platform to v5.1-dev 0d91c133, the merge of dashpay/platform#5584. This PR has no Platform pin of its own; merge #1153 first.

TL;DR: Every token action now goes through the upstream platform-wallet token API of the wallet that holds the identity, and DET no longer builds or signs token transitions itself. Identities that no wallet in the app holds can still see their tokens, but can no longer act on them; the screens say why. Along the way: rejected token actions now name the action, the mint confirmation names the identity that actually gets the tokens, and the fee shown before an action matches the one reported after it.

User story

As a token holder or issuer, I want token transactions to go through the same wallet runtime as the rest of my wallet, so that signing, broadcasting and error reporting behave the same everywhere. I also want to be told up front when an identity can't act.

Scenario

Actual behavior

  • DET builds, signs and broadcasts all 12 token transitions with the SDK builders, outside platform-wallet.
  • A token action Platform rejects for a reason with no dedicated message shows a generic "The platform rejected this request".
  • On a token that doesn't let the minter choose a recipient, the mint screen either fails with "Invalid receiver" or confirms a recipient that is never used.
  • Purchase and settings-update confirmations show one fee estimate; the result reports another, 28x smaller.

Expected behavior

  • All 12 actions run through platform-wallet using the holding wallet's IdentityWallet.
  • A token action Platform rejects names the action, e.g. "The platform did not accept this mint. Check the amount and …".
  • The mint screen follows the token's destination rules.
  • The fee estimate before and after an action is the same.

Detailed discussion

Token actions via platform-wallet

  • New wallet seam src/wallet_backend/tokens.rs. WalletBackend::token_actor resolves the holding wallet from the identity's DET wallet link. TokenActor exposes one method per action and calls IdentityWallet::token_*_with_signer.
  • Signing and options are unchanged. We use _with_signer, not _with_external_signer, so DET still signs with the key the user chose and passes state_transition_options() (the Developer signing override and the action-fee agreement). The external-signer variants pick the key themselves, drop the options and fetch the contract again.
  • No borrowed handle. No other wallet's handle is ever used for an identity.
    • No wallet link → TaskError::TokenActionNeedsWallet, raised before anything is signed.
    • Link exists but that wallet isn't loaded → the existing WalletNotLoaded / WalletLockedNotLoaded errors.
  • Removed: pause, resume, destroy-frozen-funds and settings update no longer use the raw sign + broadcast_and_wait::<StateTransitionProofResult> path, which also removes the sign(..., version) lines refactor: build Platform types with their upstream constructors #1126 touches.
  • Kept: post-broadcast bookkeeping (balances, feat(tokens): create and claim once-per-identity token distributions #1119's once-per-identity record, settings re-fetch).
  • Open group settings-update proposals: a settings update proved without its history document is a group action that stays open. It is now reported as a recorded proposal ("Group Config Update Initiated."), and the stored token settings stay as they are until the group closes the action. Before, it was reported as a proof error.

Error mapping

  • New entry point: TaskError::from_token_operation(kind, source). The existing from_token_operation_failure(label, …) now delegates to it.
  • Generic fallbacks keep the action name:
    • an unclassified failure → TokenOperationFailed;
    • an unclassified rejection → the new TokenOperationRejected, with its own wording per action.
  • Specific outcomes keep their own variants: dedicated consensus mappings (including TokenOncePerIdentityAlreadyClaimed), unconfirmed results, and logged proof failures.
  • This also addresses the chore(deps)!: update Platform to v5.1-dev 063589bf and follow the network's protocol version #1114 review thread on operation names being lost.

UI: view-only identities

  • AppContext::token_action_availability is the shared check. It is read once when a screen is built or refreshed, not every frame.
  • My Tokens: identities that can't act are marked "View only", with the reason as a tooltip, and their transaction buttons are disabled. Balances, reward estimates and claim history stay available.
  • Token action screens (the shared screen plus transfer, claim, purchase, set price and settings update) show the reason instead of the form.
  • Group Actions: the reason is shown above the list, and every "Take Action" (co-sign) button is disabled with the reason on hover.

Mint recipient

  • model::token::MintRecipient applies the token's destination rules, the same way Platform and upstream do.
  • The recipient field appears only when the token allows choosing one. Otherwise the screen and the confirmation name the token's destination identity.
  • An empty optional recipient now mints to that destination instead of failing.

Fees

  • All token screens and the reported result now use estimate_token_transition().

Dependency pin

Breaking change

Identities that no wallet in this app holds — masternode/evonode identities and identities imported only by keys — can no longer send token transactions from DET. This was an accepted product decision: actions go through the holding wallet's IdentityWallet. It's recorded as user story TOK-021 and in docs/ai-design/2026-10-26-tokens-via-platform-wallet/.

Known gaps / follow-ups (not in this PR)

  • Historical-document balance updates (pre-existing):
    • mint and burn write the document's delta amount as the identity's balance;
    • transfer, claim and purchase read field names the token-history contract doesn't have, so they do nothing.
  • Group co-signing a mint (pre-existing): the event's recipient isn't pre-filled.

Testing

  • Unit tests (cargo test --lib --all-features):
    • error mapping for both fallbacks, proof failures and dedicated outcomes;
    • MintRecipient and TokenActionAvailability truth tables;
    • routing with a mock SDK and a wired offline wallet backend:
      • every action of a wallet-held identity comes back labelled with its operation, which shows it went through platform-wallet;
      • every action of a wallet-less identity is refused before anything is sent, even while another wallet is loaded;
      • an unloaded wallet gets the wallet-not-loaded error;
    • the reported fee equals the screens' estimate;
    • an open group settings-update result is a recorded proposal, while a closed action or a direct update applies the change;
    • the Group Actions screen blocks co-signing for a wallet-less identity.
  • Kittest: the mint screen for a wallet-less identity shows the reason and no form. The token action layout test holds its identity in a loaded wallet, since a wallet-less identity no longer gets the form.
  • cargo clippy --all-features --all-targets -- -D warnings and cargo fmt --all are clean.
  • Not run (needs a funded testnet wallet): tests/backend-e2e/token_tasks.rs. CI doesn't run it, and it's the only end-to-end check of the switch from the raw broadcast path to typed results for pause/resume/destroy/settings update. Its shared identity belongs to a registered wallet, so the tests need no changes.

Breaking Changes

Token actions are refused for identities that no wallet in this app holds (see above).

Checklist

  • Tests added
  • User stories updated (TOK-006, TOK-021)
  • Design note added
  • backend-e2e token_tasks.rs run against testnet

🤖 Co-authored by Claudius the Magnificent AI Agent

🤖 Generated with Claude Code

https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q

lklimek and others added 30 commits October 24, 2026 18:21
Pin dash-sdk, rs-sdk-trusted-context-provider, platform-wallet and
platform-wallet-storage to dashpay/platform v5.1-dev 063589bf
(5.0.0-rc.8). The lockfile moves only the Platform packages.

The upstream V019 wallet-storage migration adds a nullable asset-lock
operation id; V001-V018 are unchanged. The compatibility bridge gets the
033ecae destination snapshot it compares against, and the pin guard
records the new revision with an unchanged migration fingerprint.

BREAKING CHANGE: the wallet storage upgrade to V019 is forward only. An
older build cannot open upgraded storage; going back needs a copy of the
data directory taken before the upgrade.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q
The new rust-dashcore wraps secp256k1 keys in EcdsaSecretKey and
EcdsaPublicKey, returns secret bytes as Zeroizing, and drops the
Secp256k1 context argument. Signers, single-key wallets, DashPay
derivation, address and QR handling, migrations and their tests follow
the new types. Signing stays on the non-grinding dpp::secp256k1 path,
and a parity test pins the BLS signature bytes the previous SDK made.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q
Handle the dpp and SDK types the new pin adds, keeping today's behaviour:

- Document replace keeps moderated_at and moderated_by; new documents
  start without them.
- The document editor refuses typed-array fields instead of dropping
  their contents, and keeps referenced key ids as numbers.
- Shielded token events show read-only in group actions, and the
  shielded pool token settings are refused before anything is signed.
- Contested document creation states the protocol's base contest fund,
  so the SDK never auto-quotes a larger one.
- Masternode vote reads use ResourceVoteWithCount, the SDK's new vote
  type; the vote count is not used yet.
- New query fields, wallet events, wallet error variants and asset-lock
  funding modes are handled where the SDK now requires them.
- Entropy-only document ids are documented as placeholders from
  protocol 14, and deferred upstream features link to their issues.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q
The SDK was pinned to the protocol 13 table, so it could not build any
protocol 14 transition or follow the versioned identity lookup. It now
starts at upstream's per-network minimum and ratchets to what proven
responses report.

- System contracts are cached per protocol version and served through
  accessors. The context provider serves them at the version the proof
  verifier asks for and fails rather than serve another version's.
- A proved epoch sets the fee multiplier and raises the protocol version.
  An older epoch than the adopted one is ignored.
- Rebuilding the connection resets the protocol version, fee multiplier
  and adopted epoch under one lock before the new SDK is published, and
  drops reads begun on the old connection.
- Capabilities read the network's version through a helper that stays
  closed for a version this build does not define.
- Contest timing reads the live version; retired vote schedules keep the
  protocol 13 notice window they were created under.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q
Compare the protocol 13 client tables with a recorded snapshot, so an
upstream change to them is reviewed, and check that keys and documents
DET builds on a protocol 13 network use encodings protocol 13 decodes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q
Map the refusals the new protocol adds to flows DET already offers to
dedicated TaskError variants: a full username contest, a vote choice the
contest does not allow, a name someone else asked for first, a token
that cannot be moved, a changed immutable document field, a reference to
a document type that cannot be deleted, and a moderators' fee on a
contract without moderation. Names supplied by the node stay in the
typed source only, never in the message.

Token operations that fail inside the wallet runtime keep their SDK
cause, so they are classified like any SDK error; an unclassified one
names the operation that did not complete.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q
Add a dated design note for the pin, the protocol version sources, the
connection state rules and the protocol 13 guards, and point AGENTS.md
at From<SdkError> for TaskError as the SDK error reference.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q
Protocol version 14 adds a once-per-identity distribution: every identity
may claim a fixed amount of a token exactly once.

- The token creator offers the distribution with the amount each identity
  can claim, gated on a new OncePerIdentityDistribution capability. Without
  it the rules stay version 0, the format older networks accept. The
  creator and the backend both refuse it on a network that does not accept
  it, before anything is signed. The registration estimate prices every
  term, including the distribution's extra fee, from the fee table of the
  network's confirmed protocol version.
- The Claim screen and My Tokens show the distribution. The claim
  confirmation names the distribution (and, for this one, the amount), and
  confirming sends exactly the claim that was shown.
- A successful claim records an advisory hint per identity and token, at
  the proved claim's block time. The Claim screen shows it without ever
  blocking a claim, and dismissing it is saved through a backend task. A
  node's unproven "already claimed" refusal is never recorded. A claim that
  succeeded but could not be recorded is reported as made, so the user is
  not invited to claim again.
- Platform's refusals (already claimed, invalid amount) map to dedicated,
  actionable errors.
- A protocol 13 guard checks the distribution is never silently dropped
  when encoded for protocol 13.
- User story TOK-019.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q
…it refusals

Protocol version 14 refusals that flows already in DET can hit get
dedicated, actionable messages, each keeping the SDK error as its source:

- an identity banned or suspended (until when) on a moderated contract;
- a gas sponsor short of credits, a gas payer the document type does not
  offer, and mixed gas payers in one batch;
- pre-programmed token distributions of one time over the limit.

An overflowing shielded note total is logged at warn: it means corrupt or
hostile sync data, not routine noise.

Tests cover contracts saved at protocol 12 loading unchanged at 13 and 14,
and contracts saved at 14 decoding at 13 and in full again at 14.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q
…efusals from the Platform bump

Merges 74695e7 from chore/bump-platform-063589bf.

The conflict in src/backend_task/error.rs keeps both sides: the
once-per-identity refusals and the moderation, gas sponsorship and
distribution limit refusals each keep their variants, match arms and test
cases.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q
A lookup at another version, as the proof verifier makes at a response's
version, swapped out the app's set, so each such lookup reloaded the
system contracts and the next app read reloaded them again. Each
version now keeps its own set; the app's reads keep the set they last
got for a failed reload.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q
…poch

When the epoch cannot be read, the proved DPNS fallback confirmed the
SDK's version, which starts at the network's upstream minimum (14 on
devnet), as the network's. It now confirms the version of the responses
the SDK verified, and nothing before any.

Restores the completed-withdrawal status list with the reason sending
FAILED to a protocol 13 network is safe, and its test, now comparing the
protocol 13 schema with the latest one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q
The derived key DET signs with is copied into secp256k1's own type,
which keeps its bytes after use. Wrap it so it is erased on drop, as the
derived key it comes from would be; signatures stay byte-identical.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q
… protocol 13

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q
The new refusals sent users to another document editor or token client.
They now say the app cannot edit this field type, sign this action or
change this token setting yet, in one wording, and the shielded setting
refusal sits with the token contract errors.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q
Also corrects the platform compatibility fixtures README: no code reads
e3cd7cf.sql any more; it is the V001-V018 checksum reference.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q
After the network refuses a second once-per-identity claim, the Claim
screen turns Claim off for that distribution while it is open and says
why, so a retry is not charged again. The refusal is unproven node
output, so it is never saved as the claim hint.

The token creator's registration estimate moves into
model::fee_estimation, the local refusal and the disabled-checkbox hint
reuse TaskError::TokenOncePerIdentityNotSupported's text, and the claim
reuses its token id instead of computing it twice.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q
…identity branch

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q
…able one

Both refusals describe the same situation, a network below protocol 14,
so they now open the same way.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q
The protocol version fallback takes only a version the SDK verified, and
a mock expectation's metadata is never recorded as verified, so the three
headless refresh tests saw the version stay unconfirmed. The mock now has
the SDK accept the version from metadata treated as proved, as after a
live network's signed response, and a new test pins that a response the
SDK never verified leaves the version unconfirmed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q
The SDK picks each transition's encoding from the platform version DET
passes in, so these tests checked dpp's version tables rather than DET.
The mainnet start version and the contest fund cap stay covered by the
platform_info and fee_estimation tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q
The SDK at this pin already tracks the version the network has proven:
it records the version of every response whose proof and quorum
signature it verified, and a rebuilt connection is a new SDK that starts
from nothing. DET's own copy, raised from proved epochs and DPNS reads
and reset on every rebuild, duplicated that state. The app now reads the
current SDK's verified version; capabilities still stay closed before a
version is proven and for one this build does not define, and network
info shows the proven number or says none is confirmed. Proved epochs
still set the fee multiplier, in epoch order and only on the current
connection.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q
A connection rebuild never changes the chain, the multiplier changes once
per epoch and feeds only fee estimates, so ordering epoch reads and
dropping those begun before a rebuild guarded against nothing worth the
machinery. A proved epoch read sets the multiplier directly again; an
unavailable epoch still keeps the last known value and labels it as
such. A rebuild still reads the epoch, so the new SDK proves the
network's version again.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q
A released protocol's tables and each network's minimum version are
upstream's to keep fixed; DET's start is covered by
platform_version_starts_at_the_network_minimum.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q
The proof verifier asks for contracts at the version it verifies with,
which can be newer than the SDK's. System contracts were already served
at that version; a saved user contract was decoded at the SDK's version
instead, dropping newer-protocol settings such as action fees. The
fallback now decodes it at the version asked for.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q
…king

Building the recoverable-signature envelope returns an error upstream;
it is now reported as the existing message-signing failure, with the
detail logged, instead of aborting the signing path.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q
…identity

Keeps #1114's deletion of protocol_13_transitions.rs and drops this
branch's once-per-identity protocol 13 encoding test with it: that
encoding is upstream's to test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q
@coderabbitai

coderabbitai Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@thepastaclaw

thepastaclaw commented Oct 26, 2026 •

Copy link
Copy Markdown
Collaborator

🕓 Review not started yet because this PR is a draft.

  • Request normal review — click when the PR is ready for review.
  • Request priority review — click to move this review to the front of the queue.

Commit 8197f9d. Normal review starts when eligible; priority review starts as soon as a slot is available.

@Claudius-Maginificent Claudius-Maginificent added the blocked Blocked by something external to this issue label Oct 26, 2026
Co-signing a group token action is a token transaction, so the Group
Actions screen now gives an identity no wallet in the app holds the same
treatment as the other token entry points: the reason is shown above the
actions and each "Take Action" button is disabled with it as a tooltip.
Availability is read once per selected identity, not per frame.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
lklimek and others added 3 commits October 26, 2026 12:29
Storing an identity needs the wallet backend, so the test uses
wired_test_app_context.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Pins dash-sdk, rs-sdk-trusted-context-provider, platform-wallet and
platform-wallet-storage to dashpay/platform#5584 (13c52566, on v5.1-dev
88c31c2b), where ConfigUpdateResult::GroupActionWithDocument holds an
Option<Document>: Drive proves a group config update that stays open
without the history document, which the SDK used to report as a proof
error although Platform accepted it. Only Platform packages move in
Cargo.lock; the wallet-storage migrations are unchanged, so the expected
fingerprint stays. The pin is not yet on v5.1-dev, so the pin-ancestry
guard fails until #5584 lands.

DET now treats a settings update without the document as a recorded
proposal: it succeeds and keeps the stored token settings until the group
closes the action, instead of re-fetching a contract that has not changed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Moves dash-sdk, rs-sdk-trusted-context-provider, platform-wallet and
platform-wallet-storage from 13c52566 to 93776caa, the PR's new head
(refactor only: the config-update proof mapping is a TryFrom impl; the
public ConfigUpdateResult is unchanged). Only Platform source lines move
in Cargo.lock.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Claudius-Maginificent

Copy link
Copy Markdown
Collaborator Author

Next steps: still blocked on dashpay/platform#5584 (ConfigUpdateResult conversion upstream). Nothing to do here until it merges and the Platform pin is bumped.

🤖 Co-authored by Claudius the Magnificent AI Agent

Base automatically changed from feat/token-once-per-identity to v1.0-dev October 27, 2026 10:21
lklimek and others added 4 commits October 27, 2026 14:38
Saved contracts must survive every dashpay/platform bump. The existing
round-trip tests encode and decode with the same dpp, so they cannot see
a decoder that stops reading bytes an earlier build wrote.

Pin the bytes DET writes today (dpp of platform 575d961fe0) for a user
contract and the DPNS, DashPay and token-history contracts at protocol
10 to 15, and check each still decodes to the same contract and
re-encodes byte for byte at every later protocol version.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q
Move dash-sdk, rs-sdk-trusted-context-provider, platform-wallet and
platform-wallet-storage from 575d961fe0 to 0d91c133f0, which adds:

- platform#5584: an active group config update proposal is reported as
  success by the SDK. DET's config update task broadcasts through
  `broadcast_and_wait::<StateTransitionProofResult>` and never matched
  `ConfigUpdateResult`, so no call site changes.
- platform#5578: the stored contract format with compiled document
  types. DET keeps writing format version 0/1 and reads with the
  untrusted decoder, which reads a version 2 contract from its schemas;
  the pinned-bytes test shows contracts saved before the bump still load.
- platform#4740: platform-wallet rescans DashPay contact accounts from
  the contact request height. No API change for DET.
- platform#5602: dashmate only.

Cargo.lock changes only the platform git source; the wallet-storage
migration fingerprint is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q
Refresh expected-migration-fingerprint.txt with check-pin-ancestry.sh
--update: the fingerprint is unchanged, only the recorded pin moves. List
0d91c133 among the platform revisions that leave the wallet-storage
migrations untouched.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q
The pinned saved-contract bytes covered only a minimal user contract.
Contracts users actually save carry more, and a decode break there would
make them silently disappear from the app.

Add a user contract with a group, mixed-case keywords, a description,
`$defs` with a `$ref`, a contested unique index, and a token with
group-controlled rules, perpetual and pre-programmed distribution. Its
bytes for protocol 10 to 15 were written by the dpp of platform
575d961fe0 (the previous pin), the same way as the existing fixtures,
which are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q
lklimek and others added 2 commits October 27, 2026 16:11
…orm-wallet

Restack #1128 on #1153, which brings v1.0-dev ff59f84 and pins
Platform to v5.1-dev 0d91c133, the merge of dashpay/platform#5584. This
branch drops its own side pin (93776caa): Cargo.toml, Cargo.lock and the
migration guards are taken from #1153 as they are. The merged #5584 keeps
`ConfigUpdateResult::GroupActionWithDocument(_, Option<Document>)`, so the
settings-update code needs no change.

#1119 reached v1.0-dev as a squash, so this branch's unsquashed copy of
it conflicted. The resolution starts from #1153's tree and reapplies
this branch's own changes since ea0485e. Conflicts:

- Cargo.toml, Cargo.lock: #1153's pin.
- docs/user-stories.md: both sides added TOK-020. v1.0-dev keeps it for
  non-transferable tokens; this branch's story becomes TOK-021.
- src/backend_task/error.rs: keep v1.0-dev's
  NonTransferableTokenNotSupported and this branch's
  TokenOperationFailed docs.
- src/ui/tokens/token_action_screen.rs: v1.0-dev draws the page heading
  per branch (#1129); the wallet-availability notice now draws it too.
- tests/kittest/tokens_screen.rs: keep v1.0-dev's tests and append this
  branch's.
- claim_tokens.rs, tokens/mod.rs, feature_gate.rs, fee_estimation.rs,
  model/token.rs, claim_tokens_screen.rs, tokens_screen/mod.rs,
  token_creator.rs: v1.0-dev's #1119 squash with this branch's changes
  reapplied cleanly.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q
The token action layout test from v1.0-dev (#1129) used an identity no
wallet holds. Token actions now go through the holding wallet, so the
scaffold shows why instead of the form, and the test found no form.
Register a wallet and link the identity to it before opening the screens.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012ujJpB9DBhvtbjhYB3aG9Q
@Claudius-Maginificent Claudius-Maginificent removed the blocked Blocked by something external to this issue label Oct 27, 2026
@Claudius-Maginificent
Claudius-Maginificent changed the base branch from v1.0-dev to chore/bump-platform-0d91c133 October 27, 2026 16:15
@Claudius-Maginificent

Copy link
Copy Markdown
Collaborator Author

Unblocked: dashpay/platform#5584 is merged into v5.1-dev (0d91c133). This PR now drops its side pin and is stacked on #1153, which bumps DET to that commit. It has no Platform pin of its own. The base is changed to chore/bump-platform-0d91c133; merge #1153 first.

🤖 Co-authored by Claudius the Magnificent AI Agent

@Claudius-Maginificent

Copy link
Copy Markdown
Collaborator Author

To do here, handed over from #1136: move positive_amount and parse_identity_id from src/ui/tokens/token_action_screen.rs to model/, as pure validation belongs there.

🤖 Co-authored by Claudius the Magnificent AI Agent

@Claudius-Maginificent Claudius-Maginificent added priority: low Low priority — nice to have priority: high High priority — address soon priority: medium Medium priority and removed priority: low Low priority — nice to have priority: high High priority — address soon priority: medium Medium priority labels Nov 5, 2026
Base automatically changed from chore/bump-platform-0d91c133 to v1.0-dev November 16, 2026 17:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

priority: low Low priority — nice to have

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants