@hsuite/native-connect-types
v2.1.6
Published
Canonical TypeScript definitions and Zod schemas for the HSuite Native Connect ecosystem. Provides type safety and runtime validation for all SDK packages.
Readme
@hsuite/native-connect-types
Canonical TypeScript definitions and Zod schemas for the HSuite Native Connect ecosystem. Provides type safety and runtime validation for all SDK packages.
Installation
npm install @hsuite/native-connect-typesQuick Start
import {
SessionRequest,
SessionRequestSchema,
LedgerId,
NetworkId,
} from '@hsuite/native-connect-types';
// Type-safe usage
const request: SessionRequest = {
appId: 'my-dapp',
appName: 'My dApp',
ledgerId: 'hedera',
networkId: 'hedera:testnet',
};
// Runtime validation with Zod
const validated = SessionRequestSchema.parse(request);Features
- Channel types - ChannelInvite, ChannelMessage, ChannelState, TransportState
- Session types - UnifiedSession, SessionRequest, SessionApproval
- Ledger types - LedgerId, NetworkId, Account, LedgerPluginManifest
- RPC types - RpcRequest, RpcResponse, RpcError
- Vault types - VaultSeed, VaultKey, VaultProtection, VaultRecoveryBundle
- Transaction types - TransactionPayload, SignResult, SubmitResult
- Zod schemas - Runtime validation for all types
Documentation
License
Apache-2.0 - See LICENSE
