Skip to content

feat(flipcash): adopt ocp 0.8.0 and flipcash2 0.20.0 contracts - #1799

Merged
bmc08gt merged 5 commits into
code/cashfrom
chore/contract-ocp-0.8.0-flipcash2-0.20.0
Oct 19, 2026
Merged

bmc08gt merged 5 commits into
code/cashfrom
chore/contract-ocp-0.8.0-flipcash2-0.20.0

Conversation

@bmc08gt

@bmc08gt bmc08gt commented Oct 16, 2026 •

Copy link
Copy Markdown
Collaborator

Pins ocp-client-protocol 0.8.0 (code-payments/ocp-client-protocol#11) and flipcash2-client-protocol 0.20.0 (code-payments/flipcash2-client-protocol#28), both published. The pin bump is one commit for both packages, since libs.versions.toml has no lockfile. 7bbc406 brings the multi-payment intent checks in line with iOS and carries app metadata through.

Adopts the contract changes:

  • SendPublicMultiPayment: IntentMultiTransfer and TransactionController.directMultiTransfer. They emit one NoPrivacyTransfer per payment, in order, with a shared VerifiedState. The new Metadata case maps both ways.
  • A Community stack modelled on the Resolver one: CommunityApi, CommunityService, CommunityRepository, CommunityController.getCommunity(mint), the Hilt binding, and GetCommunityError.
  • ReactionUpdate.Action.BOOSTED and RemoveReactionError.CannotRemoveBoosted. EventStreamDelegate treated anything but ADDED as a removal, so a BOOSTED update would have cleared the viewer's own reaction. It now keys off REMOVED.
  • boostUsd on Reactor/EmojiReaction/ReactionUpdate (plus actorBoostUsd), ChatMetadata.holdingsSummary, BoostedReaction on the sent/received crypto notifications, and buildReactionBoostMetadata.

The multi-payment builder doesn't yet match iOS's in its inputs or validation. Android takes destination owners and derives the vaults, and always sends destination_owner. iOS takes destinations and sends the owner only when set. Each checks one rule the other doesn't. What goes on the wire agrees. Nothing calls either builder yet.

Left for the feature work: the boost payment flow, sorting by boostUsd, UI for CannotRemoveBoosted (it falls through to the generic network failure), persisting boostedReaction, and a Community consumer.

Built against local client checkouts; no version pins changed.

opencode: SendPublicMultiPaymentMetadata model, proto mapping both ways,
IntentMultiTransfer builder and TransactionController.directMultiTransfer.

flipcash: Community service/repository/controller (GetCommunity), boost_usd
on reactors, emoji reactions and reaction updates, ReactionUpdate.Action.BOOSTED,
RemoveReactionError.CannotRemoveBoosted, chat holdings_summary, activity
BoostedReaction, and a ReactionBoost intent metadata builder. A BOOSTED
stream update no longer clears the viewer's own reaction.
@bmc08gt bmc08gt self-assigned this Oct 16, 2026
@github-actions github-actions Bot added area: network gRPC, connectivity, API, exchange rates area: intents Intent construction, submission, server-side state type: feature New functionality labels Oct 16, 2026
IntentMultiTransfer.create now requires every share to be in the intent mint
and in one currency matching the verified rate's currency. It also accepts
optional appMetadata, carried on TransactionMetadata.SendPublicMultiPayment
and written to the intent's app_metadata, as SendPublicPayment does.
TransactionController.directMultiTransfer passes it through.

Adds IntentMultiTransferTest covering action shape, metadata and rejections.
@bmc08gt
bmc08gt marked this pull request as ready for review October 16, 2026 21:59
@github-actions github-actions Bot added the area: build-system Gradle, convention plugins, build-logic label Oct 16, 2026
Drive IntentMultiTransfer.create with multi_payment_intent.json: action count, ids, source, destination, authority, mint and amount per action; the transfer compact message and SHA-256 each action signs once the server nonce and blockhash are applied; and the SendPublicMultiPayment metadata (source, mint, destination, destination_owner, quarks, native amount, currency). The rejections array must each make create throw. The ed25519 key pair is mocked, so signatures are not asserted.
@github-actions github-actions Bot added the area: crypto Solana, keys, encryption, signing label Oct 16, 2026
@bmc08gt
bmc08gt merged commit a5a433d into code/cash Oct 19, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: build-system Gradle, convention plugins, build-logic area: crypto Solana, keys, encryption, signing area: intents Intent construction, submission, server-side state area: network gRPC, connectivity, API, exchange rates type: feature New functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant