@peridotvault/pid-types
v0.1.2
Published
Shared TypeScript types for PeridotID — the canonical contracts shared across the API, browser SDK, and Solana adapter.
Readme
@peridotvault/pid-types
Shared TypeScript types for PeridotID — the canonical contracts shared across the API, browser SDK, and Solana adapter.
Install
npm install @peridotvault/pid-typesUsage
import type { Identity, Profile, Account, Authority, ApiError } from '@peridotvault/pid-types';
async function getIdentity(): Promise<Identity | ApiError> {
const res = await fetch('/v1/identity/me');
return res.json();
}Contents
| Domain | Types |
|---|---|
| Identity | Identity, IdentityStatus, IdentityCredential, LoginResponse |
| Profile | Profile, ProfileUpdate |
| Wallet / accounts | Wallet, WalletCreate, ChainAccount, Account, WalletTransaction |
| Authority (passkey) | Authority |
| Intents | Intent, IntentType, IntentPayload, IntentCreate |
| WebAuthn | RegisterStart |
| Errors | ApiError |
All types are interface/type only — this package has zero runtime code.
Publish
pnpm --filter @peridotvault/pid-types publish --access public --no-git-checksPublish first — pid-solana and pid-sdk-js depend on it.
