Meshkit logoMeshkit

TypeScript types

All exported TypeScript types from @ipfs-meshkit/meshkit.

All types are exported from @ipfs-meshkit/meshkit and can be imported with import type:

import type { Meshkit, IPFSNodeHandle, IpnsKey } from '@ipfs-meshkit/meshkit';

Bootstrap

TypeDescription
MeshkitBootstrapOptionsOptions for init()
MeshkitBootstrapResultReturn value of init() — { meshkit, localNode? }
LocalNodeOptionboolean | StartIPFSNodeOptions

Core interfaces

TypeDescription
MeshkitMulti-node client interface
MeshkitClientSingle-node client interface
MeshkitConfigConfig for createMeshkitClient — { apiUrl, headers? }
MeshkitInitOptionsOptions for Meshkit.init() — { nodes, headers? }

Daemon

TypeDescription
IPFSNodeHandleDaemon handle — url, repo?, managed, stop()
StartIPFSNodeOptionsOptions for startIPFSNode()
GracefulShutdownOptionsOptions for setupGracefulShutdown()

IPNS

TypeDescription
IpnsDurationKubo duration string, e.g. "1m", "24h"
IpnsKey{ id: string, name: string }
IpnsKeyGenOptions{ type?: 'ed25519' | 'rsa', size?: number }
IpnsPublishOptions{ key?, lifetime?, ttl?, resolve? }
IpnsPublishResult{ name: string, value: string }
IpnsResolveOptions{ recursive?, nocache? }

Encryption

TypeDescription
EncryptOptions{ password: string; iterations?: number } — iterations ≥ 1,000
UploadOptions{ encrypt?: EncryptOptions }
RetrieveOptions{ password?: string }

DEFAULT_ITERATIONS is the runtime constant 200_000, not a type. encrypt, decrypt, and isEncryptedPayload are value exports documented in Encryption.

Error classes

ClassExtendsKey properties
MeshkitErrorErrorcauses: Error[]
MeshkitNodeErrorErrorcause?: unknown (native)

On this page