Skip to content
LogoLogo

This page is auto-generated from TypeDoc. Do not edit directly. To update, modify the TypeScript source in @lumeweb/pinner and run pnpm generate:sdk.

Interfaces

PinataLegacyAdapter

Pinata 1.x Legacy Adapter Interface

Matches Pinata SDK 1.x API exactly

PropertyTypeDescription
pinFileToIPFSvoidUpload a file to IPFS
pinJSONToIPFSvoidUpload JSON data to IPFS
pinByHashvoidPin content by CID
pinListvoidList pinned files
unpinvoidUnpin content by CID
hashMetadatavoidUpdate pin metadata
createSignedURLvoidCreate signed URL for private IPFS files
pinJobsvoidGet pin jobs
topUsageAnalyticsvoidGet top usage analytics
dateIntervalAnalyticsvoidGet date interval analytics
swapCidvoidSwap CID
swapHistoryvoidGet swap history

PinataUploadBuilder

Upload builder interface

PropertyTypeDescription
namevoid
keyvaluesvoid
executevoid

PinataFilterFiles

Filter files builder interface

PropertyTypeDescription
namevoid
groupvoid
cidvoid
mimeTypevoid
ordervoid
limitvoid
cidPendingvoid
keyvaluesvoid
noGroupvoid
pageTokenvoid
thenvoid
allvoid
[asyncIterator]void

PinataFilterQueue

Filter queue builder interface

PropertyTypeDescription
cidvoid
statusvoid
pageLimitvoid
pageTokenvoid
sortvoid
thenvoid
allvoid
[asyncIterator]void

PinataFilterGroups

Filter groups builder interface

PropertyTypeDescription
namevoid
limitvoid
pageTokenvoid
isPublicvoid
thenvoid
allvoid
[asyncIterator]void

PinataPublicUpload

Public upload interface

PropertyTypeDescription
filevoid
fileArrayvoid
base64void
urlvoid
jsonvoid
cidvoid
createSignedURLvoid

PinataPrivateUpload

Private upload interface

PropertyTypeDescription
filevoid
fileArrayvoid
base64void
urlvoid
jsonvoid
cidvoid
createSignedURLvoid

PinataPublicFiles

Public files interface

PropertyTypeDescription
listvoid
getvoid
deletevoid
updatevoid
addSwapvoid
getSwapHistoryvoid
deleteSwapvoid
queuevoid
deletePinRequestvoid

PinataPrivateFiles

Private files interface

PropertyTypeDescription
listvoid
getvoid
deletevoid
updatevoid
addSwapvoid
getSwapHistoryvoid
deleteSwapvoid
queuevoid
deletePinRequestvoid

PinataPublicGateways

Public gateways interface

PropertyTypeDescription
getvoid
convertvoid

PinataPrivateGateways

Private gateways interface

PropertyTypeDescription
getvoid
createAccessLinkvoid

PinataPublicGroups

Public groups interface

PropertyTypeDescription
createvoid
listvoid
getvoid
addFilesvoid
removeFilesvoid
updatevoid
deletevoid

PinataPrivateGroups

Private groups interface

PropertyTypeDescription
createvoid
listvoid
getvoid
addFilesvoid
removeFilesvoid
updatevoid
deletevoid

PinataAnalytics

Analytics interface

PropertyTypeDescription
requestsvoid
bandwidthvoid

PinataAdapter

Pinata 2.x Adapter Interface

Matches Pinata SDK 2.x API exactly

PropertyTypeDescription
configPinataV2ConfigConfiguration
updateConfigvoidUpdate the adapter configuration
uploadobjectUpload with public/private separation
filesobjectFiles with public/private separation
gatewaysobjectGateways with public/private separation
groupsobjectGroups with public/private separation
analyticsPinataAnalyticsAnalytics (no public/private)

IpnsClientOptions

PropertyTypeDescription
signalAbortSignaloptional

WebsitesClientOptions

PropertyTypeDescription
signalAbortSignaloptional

WatchOptions

PropertyTypeDescription
intervalnumberoptional
timeoutnumberoptional

SSLCallbacks

PropertyTypeDescription
onReadyobjectoptional
onErrorobjectoptional
onStatusobjectoptional

SSLWatcher

PropertyTypeDescription
startvoid
stopvoid

SSLError

PropertyTypeDescription
typetimeout | error
detailsstringoptional

UnstorageBlockstoreOptions

PropertyTypeDescription
storageStorage<StorageValue>Unstorage instance to use (bypasses driver creation) optional
prefixstringKey prefix for blockstore keys optional
driverDriver<any, any>Unstorage driver name or instance optional
basestringBase path for storage driver optional
datastorePrefixstringPrefix for datastore keys (defaults to prefix) optional

PinnerConfig

PropertyTypeDescription
jwtstringJWT authentication token. Required for all API operations.
endpointstringAPI endpoint URL. Defaults to the official pinning service. optional
gatewaystringIPFS gateway URL for content retrieval. optional
allowedFileTypesstring[]Allowed MIME types for upload. If undefined, all types allowed. optional
fetchobjectCustom fetch implementation. optional
datastoreDatastore<object, object, object, object, object, object, object, object, object, object>Custom datastore instance for Helia.
If provided, this datastore will be used directly without creating one from storage.
Highest priority - takes precedence over storage and datastoreName. optional
storageStorage<StorageValue>Custom storage instance for both Helia blockstore and datastore.
If provided, this storage will be used instead of creating default storage.
The storage instance must implement the unstorage Storage interface.
Used when datastore is not provided. optional
datastoreNamestringCustom base name for Helia storage.
Passed as the base option to both blockstore and datastore storage instances.
Only used when neither datastore nor storage are provided. optional
timeoutnumberUpload request timeout in milliseconds.
Applied to XHR uploads. TUS does not expose a timeout option. optional
retriesnumberNumber of retry attempts for failed uploads.
Applied to XHR uploads (TUS uses retryDelays instead). optional

AbortOptions

Options that can be passed to abort async operations

PropertyTypeDescription
signalAbortSignalAbortSignal to cancel the operation optional

RemoteAddOptions

Allows passing extra options accepted by the remote pinning service

PropertyTypeDescription
signalAbortSignalAbortSignal to cancel the operation optional
namestringName for the pin or filter optional
metadataRecord<string, string>Key-value metadata to attach to the pin optional
originsstring[]Origin addresses for the pinned content optional

RemoteLsOptions

Allows passing extra options accepted by the remote pinning service

PropertyTypeDescription
signalAbortSignalAbortSignal to cancel the operation optional
namestringName for the pin or filter optional
statusStatus[]Current status (queued, pinning, pinned, failed) optional
limitnumberMaximum number of results per page optional
cursorstringPagination cursor for listing results optional

RemotePin

Includes extra metadata supported by the remote pinning service

PropertyTypeDescription
cidCIDIPFS Content Identifier
namestringName for the pin or filter optional
statusStatusCurrent status (queued, pinning, pinned, failed)
createdDateISO timestamp of creation
sizenumberSize in bytes optional
metadataRecord<string, string>Key-value metadata to attach to the pin optional

RemotePins

Extends the Pins interface with remote pinning-specific arguments and return

types (e.g. metadata as Record<string, string> and pins with an added

.status property)

PropertyTypeDescription
addvoidPin a block in the blockstore. It will not be deleted
when garbage collection is run.
lsvoidList all blocks that have been pinned.
isPinnedvoidReturn true if the passed CID is pinned
getvoidReturn pin details
setMetadatavoidUpdate pin metadata
rmvoidRemove a pin. The block may be deleted when garbage collection is run.
rmByRequestIdvoidRemove a pin by request ID. The block may be deleted when garbage collection is run.

UploadResult

PropertyTypeDescription
idstringUnique identifier for this upload operation.
cidstringIPFS Content Identifier for the uploaded content.
Undefined when the CID is not yet available (e.g. TUS uploads where
the CID is assigned asynchronously — poll GET /api/upload/result/{id}). optional
namestringUser-provided or auto-generated name for the content.
sizenumberTotal size in bytes.
mimeTypestringMIME type of the content.
createdAtDateISO timestamp when content was created.
numberOfFilesnumberNumber of files (1 for single file, N for directory).
keyvaluesRecord<string, string>Custom key-value metadata. optional
isDirectorybooleanWhether this upload is a directory. optional
isCarFilebooleanWhether this upload is already a valid CAR file.
If true, the upload system will skip CAR preprocessing and upload the file as-is.
Useful for passthrough of pre-generated CAR files. optional
operationIdnumberPortal operation ID for tracking the pinning operation.
Can be used with waitForOperation() to wait for the operation to complete. optional
[UploadResultSymbol]trueSymbol brand for type checking - used to identify UploadResult objects optional

UploadOptions

PropertyTypeDescription
namestringName for the uploaded content. optional
keyvaluesRecord<string, string>Custom key-value metadata. optional
onProgressobjectProgress callback invoked during upload. optional
onCompleteobjectCallback invoked when upload completes successfully. optional
onErrorobjectCallback invoked when upload fails. optional
signalAbortSignalAbortSignal for cancellation. optional
sizenumberOptional size override for the upload input.
Useful for ReadableStream inputs where size detection is difficult. optional
isDirectorybooleanWhether this upload is a directory. optional
isCarFilebooleanWhether this upload is already a valid CAR file.
If true, the upload system will skip CAR preprocessing and upload the file as-is.
Useful for passthrough of pre-generated CAR files. optional
waitForOperationbooleanWhether to wait for the pinning operation to complete/fail.
When true, the upload will block until the operation reaches a settled state
(completed, failed, or error). Default is false (upload only). optional
operationPollingOptionsanyPolling options for waiting on operation completion.
Only used when waitForOperation is true. optional

UploadProgress

PropertyTypeDescription
percentagenumberPercentage complete (0-100).
bytesUploadednumberNumber of bytes uploaded.
bytesTotalnumberTotal bytes to upload.
speednumberUpload speed in bytes per second. optional
etanumberEstimated time remaining in seconds. optional

UploadOperation

PropertyTypeDescription
cancelvoidCancel the ongoing upload.
pausevoidPause the upload (TUS only).
resumevoidResume a paused upload (TUS only).
resultPromise<UploadResult>Promise that resolves when upload completes.
progressReadonly<UploadProgress>Current progress.

PinnerUploadBuilder

Builder interface for Pinner upload API.

Supports chaining name/keyvalues and returns UploadOperation with controls.

PropertyTypeDescription
namevoidSet the name for the upload.
keyvaluesvoidSet custom key-value metadata.
waitForOperationvoidWhether to wait for the pinning operation to complete/fail.
When true, the upload will block until the operation reaches a settled state.
operationPollingOptionsvoidSet polling options for waiting on operation completion.
Only used when waitForOperation is true.
pinvoidStart the upload and return UploadOperation with controls.

UploadBuilderNamespace

Pinner upload builder namespace.

Provides fluent API for file, JSON, Base64, and URL uploads.

PropertyTypeDescription
filevoidUpload a file.
Returns a builder for chaining name/keyvalues.
jsonvoidUpload JSON data (encoded as JSON file).
Returns a builder for chaining name/keyvalues.
base64voidUpload Base64 encoded content (decoded and uploaded as file).
Returns a builder for chaining name/keyvalues.
urlvoidUpload content from a URL (fetched and uploaded as file).
Returns a builder for chaining name/keyvalues.
csvvoidUpload CSV data (string, array of objects, or array of arrays).
Returns a builder for chaining name/keyvalues.
rawvoidUpload raw CAR data without preprocessing.
Useful for passthrough of pre-generated CAR files.
Returns a builder for chaining name/keyvalues.
textvoidUpload text content (encoded as text file).
Returns a builder for chaining name/keyvalues.
contentvoid

CarPreprocessOptions

PropertyTypeDescription
namestringName for the pin or filter optional
onProgressobjectProgress callback for preprocessing optional
signalAbortSignalAbortSignal to cancel the operation optional

CarPreprocessResult

PropertyTypeDescription
carStreamReadableStream<Uint8Array<ArrayBufferLike>>Preprocessed CAR data as a readable stream
rootCidstringRoot CID of the CAR file
sizebigintSize in bytes

Type Aliases

FileManagerItemResponse

BlockMetaResponse

InfoResponse

PinStatusResponse

PinStatusResponseInfo

PinRequest

PinRequestMeta

PinResultsResponse

ErrorResponse

Multiaddr

PostUploadResponse

UploadResultResponse

Component

GatewayWebsiteResponse

GatewayWebsiteStatusResponse

GetBlockMetaBatchRequest

IPNSKeyRequest

IPNSKeyListResponseResponse

IPNSKeyListResponse

IPNSRepublishResponse

IPNSKeyResponse

IPNSPublishRequest

IPNSPublishResponse

IPNSResolveResponse

PostApiUploadBody

SSLStatusUpdateRequest

WebsiteItemResponse

WebsiteRequest

WebsiteResponse

WebsiteItem

WebsiteUpdateRequest

WebsiteConfigResponse

SSLStatusInfo

WebsiteValidateResponse