filecoin-project / filecoin-project/filecoin-pin

feat: allow payer to settle payment rails

Open
#54 3 comments 0 reactions 0 assignees View on GitHub
CLI enhancement good first issue help wanted ready-for-work team/filecoin-pin team/fs-wg
Dominant language
TypeScript
Stars
26
Forks
21
Avg merge
5d 18h
Merged PRs (30d)
27

Description

### Description

A payer can settle their own payment rails, not just the storage provider. Today filecoin-pin neither surfaces pending settlements nor offers a way to settle from the CLI.

This is a convenience, not a necessity: SPs settle their rails at least every `lockupPeriod` (30 days for WarmStorage). A client may still want to settle for accounting or to keep balances current.

### Scope

The SDK already supports both halves (synapse-sdk `payments.settle()` and `payments.getSettlementAmounts()`):

- Surface pending settlements in `payments status`: query `getSettlementAmounts` across the payer's rails and show what is settleable.
- Add a `payments settle [--rail ]` command that settles via `payments.settle()`.

### Done criteria

- `payments status` shows pending/settleable amounts per rail for the payer.
- `payments settle` settles a payer's rail(s): `--rail ` targets one, default settles all settleable.
- Output reports the settled amount and final settled epoch (`SettlementResult`).

### Notes

Low priority. SPs and Curio tooling handle settlement in the normal path; this is a client-side convenience.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.