open-index/open-npm huggingface dataset:
npm package: @stripchatdev/ext-helper
Description: SDK for building extensions on the Stripchat Extension Platform. Provides typed methods for context, events, settings, whisper messaging, and backend actions — all from inside sandboxed iframes.
Latest version: 0.1.11

# @stripchatdev/ext-helper

SDK for building extensions on the Stripchat Extension Platform. Provides typed methods for context, events, settings,
whisper messaging, and backend actions — all from inside sandboxed iframes.

## Installation

```bash
npm install @stripchatdev/ext-helper
```

## Quick Start

Call `createExtHelper()` once at the entry point of each page:

```ts
import {createExtHelper} from '@stripchatdev/ext-helper';

const ext = createExtHelper();
```

### Make requests

```ts
const ctx = await ext.makeRequest('v1.ext.context.get', null);
```

### Subscribe to events

```ts
ext.subscribe('v1.ext.context.updated', ({context}) => {
  // handle context update
});
```

### Send a whisper to other slots

```ts
await ext.makeRequest('v1.ext.whisper.local', {
  data: {type: 'READY'},
});
```

### Call a backend action

```ts
const result = await ext.makeRequest('v1.ext.actions.call', {
  actionName: 'stopDevice',
  params: {deviceId: 'dev_456', token: 'tok_abc'},
});
```

## TypeScript

Full type definitions are included. You get autocompletion and type safety for all methods and events out of the box.

## Documentation

For the full guide — manifest setup, slots, resolver scripts, settings, communication, and more — see
the [Extension Platform Documentation](https://extensions.stripchat.com/docs/).

## Browser Support

- Chrome 91+
- Firefox 90+
- Safari 15+
- Edge 91+