Repository navigation
feat(truapi)!: payments by id and balance through host platforms - #1314
filvecchiato wants to merge 11 commits into
Conversation
# Conflicts: # rust/crates/truapi-codegen/tests/golden/wire_table.rs # rust/crates/truapi/src/host_core.rs # rust/crates/truapi/src/native.rs # rust/crates/truapi/src/native/platform.rs # rust/crates/truapi/src/native/runtime.rs # rust/crates/truapi/src/runtime/tests.rs
Bundle size reportCompared with
WebAssembly modules
Changed files (9)
Commit: 86ccd12 |
|
CI Status: not green, 2 items need attention.
All job results
Signing credentials: failure as of 2026-10-08, a release may fail Commit |
TarikGul
left a comment
There was a problem hiding this comment.
The TopUpPlatform and PaymentPlatform docs leave scoping the caller chosen id to the product up to each host, and the core could make that impossible to forget by hashing the product id into the one it hands down.
# Conflicts: # rust/crates/truapi-codegen/tests/golden/wire_table.rs # rust/crates/truapi/src/lib.rs
|
This pull request touches an app, which is not built by default. Add a label for each build you want:
Each starts as soon as it is added and follows the branch from then on. |
|
Done in de937c5: the core hands the host |
Core side of #778. Funding is not needed for it.
payment.topUptakes a caller-chosen 32-byteidand is followed with the newpayment.topUpStatusSubscribe(Detecting → Claiming → Claimed, ClaimedPartially or NotClaimed). The core checks the source keys and refuses an amount of zero. AProductAccountsource is passed to the host'sTopUpPlatform, which derives the account.payment.requesttakes a caller-chosenid;payment.statusSubscribefollows it throughPaymentPlatform.payment.balanceSubscribestreams the balance from the newBalancePlatform. The balance is what a payment request can spend, and it is sent as the current value, then each change.BalanceAccessremote permission, owned by the core:balanceSubscribeasks for it on the first subscription; refused →PermissionDenied.InsufficientBalancereaches a product without it asRejected, checked without prompting.set_top_up_callbacks/notify_top_up_status,set_payment_callbacks/notify_payment_status,set_balance_callbacks/notify_balance.Unsupported.The host engines stay behind these platforms for now; moving them into the core is #1330. Host side: #778 and #1268.
The Android bridge change was not compiled locally (no JDK on the machine); CI covers it.