You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|`src/types/api.ts`| TypeScript interfaces matching OpenSea API v2 response shapes. |
59
59
|`src/types/index.ts`| Re-exports API types plus internal config types. |
60
60
61
+
### Auth Session Invariants
62
+
63
+
- Persisted tokens are a strict prerelease contract. Every entry requires a non-empty access token, refresh token, wallet address, ISO expiration, scopes array, and explicit `oauth` or `siwe` auth method. Do not add legacy-field fallbacks; incompatible stores should require a new login.
64
+
- OAuth login requires a JWT access token with the top-level `wallet` claim. Never substitute the OIDC `sub` claim, which is an account identifier, or save a token under a placeholder address.
65
+
- Normalize only `0x`-prefixed EVM addresses to lowercase. Preserve all other wallet addresses exactly because Solana base58 addresses are case-sensitive.
66
+
- The SDK owns refresh-token rotation semantics. CLI callers should persist the required `OAuthToken.refreshToken` exactly as returned.
67
+
61
68
### API Types
62
69
63
70
API request/response types live in `src/types/api.ts` and are mostly thin re-exports of `components["schemas"]["..."]` from `@opensea/api-types`. **Never hand-roll types for OpenSea API v2 endpoints.** When adding a new endpoint:
0 commit comments