Skip to content

feat(ios): funding core integration — FFI bindings, session model, provider listing, worker exits - #1866

Open
filvecchiato wants to merge 24 commits into
funding/host-gapsfrom
hosts/ios-funding-2-core
Open

filvecchiato wants to merge 24 commits into
funding/host-gapsfrom
hosts/ios-funding-2-core

Conversation

@filvecchiato

@filvecchiato filvecchiato commented Nov 3, 2026 •

Copy link
Copy Markdown
Collaborator

Part of #1267. Stacked on #1344 (funding/host-gaps) and #1865.

The host side of the funding core, with no UI yet.

  • TrUAPIHost bindings for funding and the README for them. setFunding keeps the bridge only when it was installed, as setTopUp does.
  • Provider listing: TrUAPIHostRuntimeProvider lists the funding providers with the core when it builds the runtime. The ones funding_config.providers names come first (from remote config, FundingConfig), then each bundled one the config does not name (BundledProducts.fundingProviders, from manifests with includes.funding; first app use of BundledProduct.workerManifest()). It lists them again whenever a remote-config refresh changes them (followRefreshes, which skips a refresh that lists the same ones).
  • funding_config is read field by field (FundingConfig.string), so onrampUrl/offrampUrl still read when the object also carries the providers list.
  • Worker exits: when a worker's engine dies, or its boot fails, TrUAPIWorkerManager reports workerExited to the core instead of rebooting it. The core restarts it with backoff while references remain. RustHostRuntimeBridge forwards workerCrashing; the notice for it is wired in feat(ios): wire the CASH card and the core to the funding overlay; remove the getcash path #1345.
  • Session model under Modules/Funding/Model: FundingSessionBook keeps what the core pushes; FundingFlowModel and its types/derivations, cash, currencies, countries, networks, provider brand, failure texts, wording, resume marker and FundingRuntime. FundingRecord/FundingActivityItem cover history. AppFundingHostBridge implements the core's FundingHostBridge over a FundingOverlayPresenting. Number formatters are built once per configuration (FundingNumberFormatters).
  • Funding.xcstrings string catalog, holding the strings this part's code uses. Each later part adds the strings its screens use.
  • Tests: config parsing (including destinations next to providers), provider refresh dedupe, bundled funding providers, cash, cancel presentation, quotes, activity status, wording bands and unpaid cancels, session book acknowledgement (once, summary-only endings, in flight, retried after a failure), worker-manager exits.

Nothing installs the bridge or shows UI yet: the Purse UI lands in #1867, the overlay screens in #1868, and the bridge is installed in #1345.

Stack (iOS funding, review bottom-up):

  1. feat(ios): load products from the app bundle; funding-only workers; headless worker prompts #1865 load products from the app bundle (base main)
  2. feat(ios): funding core integration — FFI bindings, session model, provider listing, worker exits #1866 funding core integration (base funding/host-gaps, feat(truapi)!: crypto networks, learned limits, retrying, payout and refunds for the funding screens #1344)
  3. feat(ios): Purse UI for the CASH card #1867 Purse UI for the CASH card
  4. feat(ios): funding overlay screens and activity #1868 funding overlay screens and activity
  5. feat(ios): wire the CASH card and the core to the funding overlay; remove the getcash path #1345 wiring and getcash removal

Split out of #1345 as requested in review.

@filvecchiato
filvecchiato requested review from a team as code owners November 3, 2026 16:41
@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

This pull request touches an app, which is not built by default. Add a label for each build you want:

  • iOS simulator build, ci:ios-simulator: builds the iOS app and attaches a build for the iOS Simulator on a Mac; its unit tests run on every pull request.
  • iOS device build, ci:ios-device: attaches a signed build that installs on a registered iPhone or iPad.

Each starts as soon as it is added and follows the branch from then on.

@github-actions

github-actions Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Bundle size report

Compared with main at f88b8f1.

Raw Gzip Brotli
truapi-host 8.50 MiB (+46.9 KiB, +0.5%) 5.87 MiB (+14.9 KiB, +0.2%) 5.53 MiB (+11.2 KiB, +0.2%)
truapi-provider 4.04 MiB 1.27 MiB 961.4 KiB
truapi 7.91 MiB (+21.1 KiB, +0.3%) 1.10 MiB (+3.9 KiB, +0.3%) 920.0 KiB (+3.2 KiB, +0.4%)
trinity-stack 634.2 KiB 247.5 KiB 204.8 KiB
Total 21.07 MiB (+67.9 KiB, +0.3%) 8.49 MiB (+18.9 KiB, +0.2%) 7.57 MiB (+14.5 KiB, +0.2%)

WebAssembly modules

Raw Gzip Brotli
truapi-host/wasm/web/truapi_server_bg.wasm 3.38 MiB (+46.1 KiB, +1.3%) 1.17 MiB (+14.8 KiB, +1.2%) 894.9 KiB (+11.1 KiB, +1.3%)
truapi-host/wasm/web/truapi_verifiable_bg.wasm 4.89 MiB 4.64 MiB 4.61 MiB
truapi-provider/truapi_provider_bg.wasm 4.00 MiB 1.27 MiB 953.6 KiB
trinity-stack/wasm/trinity_stack_bg.wasm 564.4 KiB 230.5 KiB 190.0 KiB
Changed files (10)
Raw Gzip Brotli
truapi-host/wasm/web/truapi_server_bg.wasm 3.38 MiB (+46.1 KiB, +1.3%) 1.17 MiB (+14.8 KiB, +1.2%) 894.9 KiB (+11.1 KiB, +1.3%)
truapi/explorer/codegen/types.js 319.1 KiB (+9.7 KiB, +3.2%) 45.3 KiB (+1.7 KiB, +3.9%) 35.2 KiB (+1.4 KiB, +4.1%)
truapi/playground/codegen/truapi-dts.js 390.8 KiB (+7.5 KiB, +2.0%) 67.8 KiB (+1.6 KiB, +2.5%) 54.1 KiB (+1.3 KiB, +2.6%)
truapi/generated/types.js 88.4 KiB (+1.6 KiB, +1.8%) 10.9 KiB (+294 B, +2.7%) 9.1 KiB (+239 B, +2.6%)
truapi/playground/codegen/services.js 127.6 KiB (+971 B, +0.7%) 19.7 KiB (+159 B, +0.8%) 16.5 KiB (+145 B, +0.9%)
truapi/generated/client.js 95.5 KiB (+908 B, +0.9%) 14.7 KiB (+138 B, +0.9%) 12.2 KiB (+112 B, +0.9%)
truapi-host/wasm/web/truapi_server.js 59.9 KiB (+562 B, +0.9%) 10.8 KiB (+96 B, +0.9%) 9.3 KiB (+59 B, +0.6%)
truapi/generated/wire-decode.js 37.1 KiB (+318 B, +0.8%) 3.7 KiB (+24 B, +0.6%) 3.1 KiB
truapi-host/generated/host-callbacks.js 13.6 KiB (+241 B, +1.8%) 4.2 KiB (+71 B, +1.7%) 3.6 KiB (+65 B, +1.8%)
truapi/generated/wire-table.js 11.4 KiB (+100 B, +0.9%) 1.8 KiB (+9 B, +0.5%) 1.5 KiB (+8 B, +0.5%)

Commit: 2292a6f

@github-actions

github-actions Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

CI Status: 24 required jobs green, 16 passed and 8 skipped by path filter.

All job results
job result
android-app skipped
android-bindings skipped
bundle-size success
changes success
changeset-guard skipped
cli-package skipped
codegen success
e2e skipped
explorer success
headless-install success
host-wasm success
ios-app skipped
ios-bindings success
licenses success
playground success
provider-android-bindings skipped
release-guard success
rust success
ts-client success
ts-debugger success
ts-host success
ts-trinity-stack success
wasm-provider success
workflow-lint skipped

Signing credentials: valid as of 2026-11-04

Commit 2292a6f3 · run log

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XXL 1000 lines or more; split it, or say in the description why it cannot be status:waiting-on-review Ready for a reviewer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant