Repository navigation
Re-introduce RFC-006 payment.topUp / balanceSubscribe on the TrUAPI runtime (iOS + Android) #778
Copy link
Copy link
Open
Feature
Copy link
Labels
Coinage R2HumanityHumanity SPAHumanity SPAR2 blockerMust be done for R2Must be done for R2host-workNeeds implementation in one or more host reposNeeds implementation in one or more host repos
Description
Activity
- addedHumanityHumanity SPAHumanity SPAneeds-ownerNo assignee and no recent activityNo assignee and no recent activityhost-workNeeds implementation in one or more host reposNeeds implementation in one or more host reposand removedneeds-ownerNo assignee and no recent activityNo assignee and no recent activity
on Sep 15, 2026 - changed the title
[-]TrUAPI runtime: route payment.topUp(ProductAccount) to the host's coinage on iOS/Android — Humanity's Daily Dollar prize is stranded without it[/-][+]Re-introduce payment.topUp / balanceSubscribe on the TrUAPI runtime (iOS + Android) — it worked on the native container, Humanity's Daily Dollar needs it back[/+]on Sep 15, 2026 - changed the title
[-]Re-introduce payment.topUp / balanceSubscribe on the TrUAPI runtime (iOS + Android) — it worked on the native container, Humanity's Daily Dollar needs it back[/-][+]Re-introduce RFC -006 payment.topUp / balanceSubscribe on the TrUAPI runtime (iOS + Android)[/+]on Sep 15, 2026 - changed the title
[-]Re-introduce RFC -006 payment.topUp / balanceSubscribe on the TrUAPI runtime (iOS + Android)[/-][+]Re-introduce RFC-006 payment.topUp / balanceSubscribe on the TrUAPI runtime (iOS + Android)[/+]on Sep 15, 2026 - added a parent issue
on Sep 17, 2026 @TorstenStueber: check after RFC17 is done as it contains amendments to RFC6.
(and also check whether RFC-17 needs to be extended so that the recipient of a payment would also choose a specific purse id to move the funds into).
- feat(truapi)!: payments by id and balance through host platforms #1314 core side:
payment.topUpby id withtopUpStatusSubscribe(ProductAccountpassed to the host),payment.balanceSubscribethrough a hostBalancePlatform, native callbacks for both - feat(ios): serve top-ups, payments and balance to the core #1338 iOS and feat(android): serve top-ups, payments and balance to the core #1337 Android connect the core callbacks to the existing engines (stacked on feat(truapi)!: payments by id and balance through host platforms #1314)
- feat(truapi)!: payments by id and balance through host platforms #1314 core side:
- linked a pull request that will close this issuefeat(truapi)!: payments by id and balance through host platforms #1314
on Oct 7, 2026
Metadata
Metadata
Assignees
Labels
Coinage R2HumanityHumanity SPAHumanity SPAR2 blockerMust be done for R2Must be done for R2host-workNeeds implementation in one or more host reposNeeds implementation in one or more host repos
Background
Product top-up used to work. Both phones implemented
paymentTopUpand the balance subscription behind the native product container: iOSProductsNativeApi+Payment.swift→IncomingPaymentService(polkadot-ios-community#85 "Top up durability"), AndroidHostApiInteractor.resolveTopUpSource→TopUpSource.Onboard(polkadot-app-android-v2#1002). A product handed overProductAccount { derivationIndex }, the host watched the account, signedCoinage.load_recycler_with_external_asset_unpaidfrom it, and the money showed up in the user's coinage balance.TrUAPI is now the standard product runtime (iOS Nightly defaults to it; Android is landing its binding). On that runtime the payment surface was never carried over:
truapi-server'sPayment::top_upanswersUnknown("Payments are not supported in dot.li")andbalance_subscribeanswersPermissionDenied(runtime/capabilities/payment.rs), and the iOSRustHostRuntimeBridgeexposes no payment hooks that could override it. The working implementation is still in the apps, one runtime over, unreachable from a TrUAPI product.Why it matters now
Humanity's Daily Dollar pays each winner's prize on chain into the product account
//product//peopl.<tld>/0as a pUSD balance. Coinage has no deposit address, so the only way that prize becomes spendable is the host'spayment.topUp({ source: ProductAccount { derivationIndex: 0 } }). Humanity calls it right after a claim and again at every app start (humanity-spa#134, #136, #137) — and every call dies at the stub.On paseo-next-v2 the test identity's prize account
5CXjDEKmQhsRKPwbR8eCjBio8Bt4Gv6J9UkkA7uHCkE9hGG7holds 4 pUSD from four claimed draws and has never signed anything. Every dollar a user wins is sitting on an account no wallet shows.Ask
Re-introduce on the TrUAPI runtime, on iOS and Android, routed to the top-up the apps already have:
payment.topUpwith theProductAccountsourcepayment.balanceSubscribepayment.request/statusSubscribeare not needed for this.To decide along the way
paymentTopUptook a 32-byte top-up id and offeredtopUpStatusSubscribe(Detecting → Claimed / ClaimedPartially / NotClaimed).HostPaymentTopUpRequestin@parity/truapihas neither. Either the bridge makes up an id per call, or RFC-0006 growsid+ a status subscription so a product can learn a top-up endedNotClaimed.ProductAccountmust resolve to the same accounttruapi-server/src/host_logic/product_account.rsderives (soft junctionu32 LE ++ blake2("product-account-index")[..28]). iOS'sProductAccountId.derivationPath()already matches.Related