import type CID from 'cids' ; import type { IpfsApi } from './index' ; export interface PinningBackend { id : string ; open ( ) : void ; close ( ) : Promise < void > ; pin ( cid ) : Promise < void > ; unpin ( cid ) : Promise < void > ; ls ( ) : Promise < CidList > ; info ( ) : Promise < PinningInfo > ; } export interface PinningBackendStatic { designator : string ; new ( connectionString , ipfs ) : PinningBackend ; } export type CidString = string ; export type Designator = string ; export type CidList = Record < CidString , Designator [ ] > ; export type PinningInfo = Record < string , any > ;