@atlasprotocol/types
v0.2.0
Published
Shared TypeScript type definitions for the ATLAS Protocol — events, ticket types, manifests, purchase challenges, W3C VC receipts, and IPFS pinner abstractions.
Maintainers
Readme
@atlasprotocol/types
Shared TypeScript type definitions for the ATLAS Protocol. This is a pure-types package — no runtime code, no schema validators, no dependencies beyond typescript itself.
What lives here
AtlasEventand supporting interfaces (AtlasEventLocation,AtlasEventOrganizer,AtlasEventAvailability,AtlasEventStatus,AtlasPriceRange)AtlasTicketTypeand supporting interfaces (AtlasFee,AtlasPricing,AtlasTicketAvailability,AtlasTicketRestrictions,AtlasCancellationPolicy)AtlasManifestand supporting interfacesAtlasPurchaseChallenge,AtlasPaymentMethod,AtlasPaymentMethodType,AtlasPaymentProofAtlasReceipt(W3C VC shape),AtlasReceiptCredentialSubject,AtlasReceiptSettlement,AtlasReceiptProof,ReceiptPaymentMethodPinner,PinOptions,PinResult,FetchLike— IPFS pinning service abstraction
Why a separate package
@atlasprotocol/server-sdk and @atlasprotocol/ipfs both need these shapes. Without a shared types package, the two SDKs would form a workspace dependency cycle (server-sdk imports Pinner from ipfs; ipfs imports AtlasEvent from server-sdk). Lifting the pure type definitions into this package lets each SDK depend only on @atlasprotocol/types, which depends on nothing.
Install
pnpm add @atlasprotocol/typesMost consumers will not need this directly — @atlasprotocol/server-sdk and @atlasprotocol/ipfs re-export everything they consume from here for back-compat.
Adoption
The protocol types in this package are the canonical definitions consumed across the SDK:
@atlasprotocol/server-sdkimportsAtlasEvent,AtlasTicketType,AtlasManifest,AtlasPurchaseChallenge,AtlasReceipt, andPinnerfrom here. Existing imports from@atlasprotocol/server-sdkkeep working because server-sdk re-exports the same types — both paths resolve to the identical declarations, so they are mutually assignable.@atlasprotocol/ipfsimportsAtlasEvent(consumed bygenerateEventCid) and thePinner/PinOptions/PinResult/FetchLikeinterfaces from here. The four bundled pinner implementations (PinataPinner,Web3StoragePinner,FilebasePinner,KuboPinner) all implement the canonicalPinnerfrom@atlasprotocol/types.@atlasprotocol/connector-frameworkimportsAtlasEventandAtlasTicketTypefrom here directly.
New consumer code can import from @atlasprotocol/types directly; old code that imports the same names from @atlasprotocol/server-sdk or @atlasprotocol/ipfs continues to compile unchanged.
