@its-mash/core
v1.0.8
Published
A TypeScript project
Readme
MKP CORE SDK
This repo host the core of a secure, bidirectional communication system between host applications and client applications (running inside iframes). The project consists of:
- Core SDK – A lightweight, type-safe communication layer that uses the browser’s
postMessageAPI to facilitate secure messaging between different window contexts. It handles low-level details such as secure handshakes, request/response patterns, event pub/sub, and origin validation. Consumed by Host SDK and Client SDK to abstract the communication layer
Structure
The repository is organized as follows:
/root
├── package.json // Root configuration, workspaces, and scripts
├── core // Core SDK (communication layer)
└── docs // Additional documentation and project guidesGetting Started
Prerequisites
- Node.js
- npm
Installation
Install dependencies from the root:
npm installThis installs all dependencies across the packages and sets up the workspaces.
Commands
Below are the main monorepo commands defined in the root package.json:
Build Package
Build every package (transpiling TypeScript, etc.):npm run buildClean Package
Remove build artifacts (e.g.,distdirectories):npm run cleanLint All Packages
Run ESLint checks:npm run lintRun Tests
Execute test suites:npm run test
High-Level SDK Overview
Core SDK
- Purpose: Acts as the backbone for secure communication. It abstracts all low-level postMessage handling and exposes a uniform, type-safe API.
- Key Features: Secure handshake, request/response pattern, event pub/sub system, and origin validation.
Major chjanges
