@wakz/sdk
v1.0.2
Published
WAKZ Platform SDK — Unified interface for WAKZ Chat Widget and Cyber Shield services
Downloads
310
Maintainers
Readme
@wakz/sdk
WAKZ Platform SDK — Unified interface for WAKZ Chat Widget and Cyber Shield services.
Installation
npm install @wakz/sdkQuick Start
import WAKZ from '@wakz/sdk';
const sdk = new WAKZ({
chat: {
widgetId: 'your-widget-id',
position: 'bottom-right',
autoOpen: true,
},
shield: {
enableAntiTamper: true,
enableFingerprint: true,
keyRotationInterval: 3600000,
},
apiBaseUrl: 'https://api.wakz.dev',
});
// Initialize chat widget
await sdk.initChat();
sdk.openChat();
// Initialize cyber shield & encrypt
await sdk.initShield();
const protected = await sdk.protect('Hello, secure world!');
const original = await sdk.unprotect(protected);
// SDK info
console.log(sdk.getSDKInfo());
// Cleanup
sdk.destroy();API
| Method | Description |
|--------|-------------|
| initChat() | Load & initialize the WAKZ chat widget |
| openChat() | Open the chat widget |
| closeChat() | Close the chat widget |
| initShield() | Initialize AES-256-GCM encryption engine |
| protect(msg) | Encrypt a message |
| unprotect(payload) | Decrypt a payload |
| destroy() | Tear down all services |
| getSDKInfo() | Get SDK version and status |
License
MIT
