Skip to content

feat(opencode): bring back Kind.Tip on OpenCodePayload#1114

Merged
bmc08gt merged 2 commits into
code/cashfrom
feat/opencode-kind-tip
Jul 21, 2026
Merged

feat(opencode): bring back Kind.Tip on OpenCodePayload#1114
bmc08gt merged 2 commits into
code/cashfrom
feat/opencode-kind-tip

Conversation

@bmc08gt

@bmc08gt bmc08gt commented Jul 21, 2026

Copy link
Copy Markdown
Collaborator

Brings back Kind.Tip from the legacy CodePayload and applies it to OpenCodePayload.

  • OpenCodePayload.value becomes polymorphic via a new PayloadValue interface: Cash/MultiMintCash carry a Fiat (unchanged), Tip carries a Username.
  • Fiat implements PayloadValue, so existing call sites and the Cash/MultiMintCash wire format are unchanged — Tip is purely additive.
  • Tip encoding follows the shipped legacy scheme: username at OFFSET_USERNAME, short usernames padded with "." + base64(SHA256(username)) to 15 bytes; decode strips at the . delimiter.
  • GrabBillTransactor rejects Tip as non-grabbable; CodeScanDelegate routes Tip off the cash path (it force-unwraps .fiat). Actual tip-scan routing to a tip flow is a follow-up (TODO(tipping)).
  • Tip round-trip tests added (androidTest — the encode path uses android.util.Base64/SHA256).

bmc08gt added 2 commits July 21, 2026 19:36
Ports the legacy CodePayload tip layout onto OpenCodePayload. The payload value
becomes polymorphic (PayloadValue): Cash/MultiMintCash carry a Fiat as before,
Tip carries a Username. Fiat now implements PayloadValue, so existing call sites
are unaffected and the Cash/MultiMintCash wire format is unchanged.

Tip encoding follows the shipped legacy scheme: the username is written at
OFFSET_USERNAME and short usernames are padded with '.' + base64(SHA256(username))
out to 15 bytes; decode recovers the username by stripping at the '.' delimiter.
GrabBillTransactor rejects Tip as non-grabbable; CodeScanDelegate routes Tip off
the cash path (tip-scan handling is a follow-up).

Covered by OpenCodePayloadTests tip round-trips.

Signed-off-by: Brandon McAnsh <git@bmcreations.dev>
…geCoordinator

RealSessionController gained a blobStorageCoordinator constructor param (#1111)
but these two direct-construction tests were not updated, leaving the session
unit-test source uncompilable on trunk. Pass a relaxed mock like the other
coordinators.

Signed-off-by: Brandon McAnsh <git@bmcreations.dev>
@github-actions github-actions Bot added area: network gRPC, connectivity, API, exchange rates area: session type: feature New functionality labels Jul 21, 2026
@bmc08gt bmc08gt self-assigned this Jul 21, 2026
@bmc08gt
bmc08gt merged commit 7f9118d into code/cash Jul 21, 2026
3 checks passed
@bmc08gt
bmc08gt deleted the feat/opencode-kind-tip branch July 21, 2026 23:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: network gRPC, connectivity, API, exchange rates area: session type: feature New functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant