Skip to content

ProviderSelectionInput

Defined in: packages/synapse-core/src/warm-storage/location-types.ts:41

Pre-fetched data for provider selection.

The caller gathers this from chain queries (or cached results) and passes it to selectProviders(). Separating data fetching from selection keeps selectProviders() pure and testable.

The endorsedIds array controls pool restriction:

  • Non-empty: only providers in this set are considered (primary selection)
  • Empty: all providers in the providers list are considered (secondary selection)

clientDataSets: SelectionDataSet[]

Defined in: packages/synapse-core/src/warm-storage/location-types.ts:48

Client’s existing datasets with metadata and piece-presence information


endorsedIds: bigint[]

Defined in: packages/synapse-core/src/warm-storage/location-types.ts:46

Array of endorsed provider IDs (from endorsements.getProviderIds). Non-empty = restrict to endorsed only. Empty = use all providers.


optional legacyPieceStorageIdLimit?: bigint

Defined in: packages/synapse-core/src/warm-storage/location-types.ts:55

Data set ID boundary between legacy and compact piece storage (see FilecoinChain.legacyPieceStorageIdLimit). Data sets at or above this ID are compact and are preferred over legacy ones. Defaults to 0n (every data set treated as compact) when omitted.


providers: PDPProvider[]

Defined in: packages/synapse-core/src/warm-storage/location-types.ts:43

Available PDP providers (typically from getApprovedPDPProviders)