Skip to content
InterfaceDescription
MetadataDataSetInternal-
MetadataPieceInternal-
Type AliasDescription
ClaimTokenResponse-
ClaimTokenResponseError-
ClaimTokensOptions-
MetadataArrayThe metadata array is a tuple of two arrays: the keys and the values. Return type from the getAllDataSetMetadata function.
MetadataEntry-
MetadataObject-
VariableDescription
CAP_IPNI_IPFS-
CAP_IPNI_PEER_ID-
CAP_IPNI_PEER_ID_LEGACY-
CAP_IPNI_PIECE-
CAP_LOCATION-
CAP_MAX_PIECE_SIZE-
CAP_MIN_PIECE_SIZE-
CAP_MIN_PROVING_PERIOD-
CAP_PAYMENT_TOKEN-
CAP_SERVICE_URL-
CAP_STORAGE_PRICE-
LOCKUP_PERIOD-
METADATA_LIMITS-
PDPOfferingSchemaZod schema for PDP offering
RETRY_CONSTANTS-
SIZE_CONSTANTSData size constants
TIME_CONSTANTSTime and size constants
FunctionDescription
asReadableStreamConvert AsyncIterable or ReadableStream to ReadableStream
asyncIterableToReadableStreamConvert AsyncIterable to ReadableStream with broad browser compatibility. Provides fallback for environments where ReadableStream.from() is not available.
calculateLastProofDateCalculate when the last proof should have been submitted based on current time
capabilitiesListToObjectConvert capability arrays to object map
claimTokens-
clientFromTransportCreate a Viem public client from a transport configuration
createPieceUrl-
createPieceUrlPDPCreate a piece URL for the PDP API
datasetMetadataObjectToEntryConvert a dataset metadata object to an array of metadata entries to be signed.
dateToEpochConvert a JavaScript Date to a Filecoin epoch
decodeAddressCapabilityMatches the behavior of address(uint160(BigEndian.decode(values[i])))
decodePDPCapabilitiesDecode PDP capabilities from keys/values arrays into a PDPOffering object. Based on Curio’s capabilitiesToOffering function.
decodePDPError-
decodePDPOffering-
encodePDPCapabilitiesEncode PDP capabilities from a PDPOffering object and a capabilities object into a capability keys and values array.
epochToDateConvert a Filecoin epoch to a JavaScript Date
fallbackRandIndex-
fallbackRandU256-
formatBalance-
formatFraction-
formatUnits-
isAsyncIterableType guard to check if a value is an AsyncIterable
isReadableStreamType guard to check if a value is a ReadableStream
metadataArrayToObject-
parseUnitsParse a value to a bigint.
pieceMetadataObjectToEntryConvert a dataset metadata object to an array of metadata entries to be signed.
randIndexProvides a random index into an array of supplied length (0 <= index < length)
randU256-
timeUntilEpochCalculate the time until a future epoch
transportFromTransportConfigCreate a Viem public client from a transport configuration
uint8ArrayToAsyncIterableConvert Uint8Array to async iterable with optimal chunk size.