paritytech / paritytech/host-rust-core
RFC: Funding Modality
Open
Funding
R2 blocker
rfc
- Dominant language
- Swift
- Stars
- 10
- Forks
- 3
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 148
Description
Source PR: #339 · docs/rfcs/funding-modality.md · @CoachCoe
Description
A Funding trait moves value between the user's Polkadot balance and the outside world in both directions, over cash, bank, card, friend, exchange and foreign-chain rails. Consumers declare an intent and watch it; providers declare the modality in their manifest and serve intents addressed to them.
Motivation
PaymentTopUpSource assumes the product already holds the money, so hitting InsufficientBalance is a dead end and there is no path for getting value out at all. Without a declared contract, every provider integration lands as bespoke Host code.
Requirements
- Methods:
request,status_subscribe,serve_subscribe(manifest-declared providers only),report. - Routes are declared statically in the manifest, so the rail list needs no provider code.
- Sessions persist in
CoreStorageand survive Host restart. Deliveredcomes only from the runtime's own on-chain observation, never from a provider report.- The Host owns eligibility, release authorization, and every terminal state.
Tasks
- RFC document body
- Implementation — rust-core
- Implementation — hosts
- dotli
- Desktop
- iOS
- Android
- host-cli
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.