Skip to Content
SPAPS is proprietary hosted SaaS. Paid access required; pre-1.0 contracts may change. Terms and access
PackagesCompanion Packages

Companion Packages

These packages are commonly installed alongside spaps-sdk or the Python client.

PackageRole
spaps-typesShared TypeScript contracts, runtime guards, and schema helpers
spaps-wallet-utilsBrowser wallet detection, connect/switch/sign helpers, and validators
spaps-issue-reporting-reactReact provider/components/hooks for issue-reporting UI flows

spaps-types

Install:

npm install spaps-types

What it provides:

  • Shared contract types for auth, payments, entitlements, issue reporting, and secure messages.
  • Runtime guard helpers such as isAdminRole, isValidPermission, isValidSeverity, and isValidChainType.
  • Zod-backed secure-message schema helpers (createSecureMessageRequestSchema, secureMessageSchema, secureMessageMetadataSchema).
  • Docs manifest contracts from packages/types/src/docs.ts (DocsManifest, DocsManifestEndpoint, and related types).
import { isAdminRole, isValidPermission } from 'spaps-types' console.log(isAdminRole('admin')) console.log(isValidPermission('manage_products'))

spaps-wallet-utils

Install:

npm install spaps-wallet-utils

Source-backed API surface (packages/wallet-utils/src/index.ts):

  • Detection: detectWallet, hasMetaMask, hasPhantom
  • EVM helpers: connectMetaMask, getMetaMaskChainId, switchChain, signEVMTransaction, getChainName
  • Solana helpers: connectPhantom, disconnectPhantom, signSolanaTransaction
  • Utilities: formatAmount, formatAddress, isValidEVMAddress, isValidSolanaAddress, isValidHex
  • Errors: WalletConnectionError, UserRejectedError
import { connectMetaMask, switchChain, signEVMTransaction } from 'spaps-wallet-utils' const from = await connectMetaMask() await switchChain(8453) // Base const txHash = await signEVMTransaction( { chain: 'evm', chain_id: 8453, to: '0xdef0000000000000000000000000000000000456', value: '1000000000000000', data: '0x' }, from ) console.log(txHash)

signSolanaTransaction currently throws a not-implemented error in V1 ("Solana signing not yet implemented in V1").

spaps-issue-reporting-react

Install:

npm install spaps-issue-reporting-react react react-dom @tanstack/react-query

IssueReportingProvider accepts a client that exposes an issueReporting surface with:

  • getStatus
  • list
  • get
  • create
  • update
  • reply
  • optional createVoiceToken

Core exports include:

  • IssueReportingProvider
  • IssueReportingPageConfig
  • FloatingIssueReportButton
  • ReportableSection
  • hooks: useIssueReporting, useIssueReportingStatus, useIssueReportingHistory, useIssueReportingMutations, useReportMode
import { FloatingIssueReportButton, IssueReportingPageConfig, IssueReportingProvider } from 'spaps-issue-reporting-react' ;<IssueReportingProvider client={spaps} isEligible={true} principalId="user_123" defaultScope="mine" inputModes={['text', 'voice']} > <IssueReportingPageConfig createMode="surface_preferred" /> <FloatingIssueReportButton /> </IssueReportingProvider>

For backend model and support pipeline behavior, see Issue reporting and support.

Validation And Tests

Package-level checks:

# types cd packages/types && npm run build && npm run typecheck && npm run test:types # wallet utils cd packages/wallet-utils && npm run build && npm test # issue reporting react cd packages/issue-reporting-react && npm run build && npm test

Key evidence tests referenced in this docs update:

  • packages/types/test/index.test-d.ts
  • packages/wallet-utils/test/wallet.test.ts
  • packages/issue-reporting-react/test/issue-reporting-react.test.tsx