filecoin-project/filecoin-pin

feat: allow payer to settle payment rails

Open

#54 opened on Sep 29, 2025

View on GitHub
 (3 comments) (0 reactions) (0 assignees)TypeScript (18 forks)github user discovery
CLIenhancementgood first issuehelp wantedready-for-workteam/filecoin-pinteam/fs-wg

Repository metrics

Stars
 (22 stars)
PR merge metrics
 (PR metrics pending)

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 <id>] 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 <id> 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