Companion Packages
Use the published packages below alongside spaps-sdk. Wallet utilities are described separately
as a source-only surface.
| Package | Role |
|---|---|
spaps-types | Shared TypeScript contracts, runtime guards, and schema helpers |
spaps-wallet-utils | Source-only wallet helpers; no verified public npm release |
spaps-issue-reporting-react | React provider/components/hooks for issue-reporting UI flows |
spaps-types
Install:
npm install spaps-types@2.0.2What it provides:
- Shared contract types for auth, payments, entitlements, issue reporting, and secure messages.
- Runtime guard helpers such as
isAdminRole,isValidPermission,isValidSeverity, andisValidChainType. - Zod-backed secure-message schema helpers (
createSecureMessageRequestSchema,secureMessageSchema,secureMessageMetadataSchema).
import { isAdminRole, isValidPermission } from 'spaps-types'
console.log(isAdminRole('admin'))
console.log(isValidPermission('manage_products'))spaps-wallet-utils
No public npm release was available at verification: the registry returned 404 on October 23, 2026. The following describes upstream source version 0.1.0, not a public install command.
Confirm an approved artifact with Sweet Potato before depending on this package.
Source API surface:
- 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@0.6.4 react react-dom @tanstack/react-queryThe public 0.6.4 artifact requires Node.js 18+, React 18+, and React Query 5+. It depends on
spaps-types@^1.5.3, while SDK 2.0.2 depends on spaps-types@^2.0.2; keep the resolved lockfile
and check compatibility when combining them.
IssueReportingProvider accepts a client that exposes an issueReporting surface with:
getStatuslistgetcreateupdatereply- optional
createVoiceToken
Core exports include:
IssueReportingProviderIssueReportingPageConfigFloatingIssueReportButtonReportableSection- hooks:
useIssueReporting,useIssueReportingStatus,useIssueReportingHistory,useIssueReportingMutations,useReportMode
import {
FloatingIssueReportButton,
IssueReportingPageConfig,
IssueReportingProvider
} from 'spaps-issue-reporting-react'
;<IssueReportingProvider
client={spaps}
isEligible={isAuthenticated}
principalId={user?.id ?? null}
defaultScope="mine"
inputModes={['text', 'voice']}
>
<IssueReportingPageConfig createMode="surface_preferred" />
<FloatingIssueReportButton />
</IssueReportingProvider>Derive eligibility and principal identity from the current session. Mount this inside your React Query provider, use a client carrying the current user’s token, and enable issue reporting on the application. Enable voice mode only when its application configuration is ready.
For hosted API behavior, see Issue reporting and support.