@hsuite/native-connect-client
v2.1.6
Published
Reference client providing a minimal RPC client, memory transport, and signing harness for validating dApp-to-wallet workflows and testing SDK integrations.
Readme
@hsuite/native-connect-client
Reference client providing a minimal RPC client, memory transport, and signing harness for validating dApp-to-wallet workflows and testing SDK integrations.
Installation
npm install @hsuite/native-connect-clientQuick Start
import { ReferenceClient, MemoryTransport } from '@hsuite/native-connect-client';
const transport = new MemoryTransport({ id: 'test' });
const client = new ReferenceClient({ transport });
client.on('response', (response) => {
console.log('Received:', response);
});
await client.send({
jsonrpc: '2.0',
method: 'session/request',
params: {
appId: 'my-dapp',
appName: 'My dApp',
ledgerId: 'hedera',
networkId: 'hedera:testnet',
},
});Features
- ReferenceClient - Minimal RPC client with event handling
- MemoryTransport - In-memory transport for unit and integration testing
- SigningHarness - End-to-end signing flow orchestration
- QueryClient - Wallet state observation utilities
- Protocol Validation - Verify RPC message format compliance
Documentation
License
Apache-2.0 - See LICENSE
