npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@tripley-kit/xfs-control-client

v0.1.0

Published

Tripley.XFS simulator control xRPC client for automation tests

Downloads

28

Readme

@tripley-kit/xfs-control-client

TypeScript client for the Tripley.XFS simulator control plane. Use this package in automated tests and local simulator tooling to prepare device state, inject media, complete pending commands, or inspect simulator state through tripley-native-hostd.

This package is not the CEN/XFS device API. Production app code should use @tripley-kit/xfs-client for XFS commands and events. Test code can use this package next to @tripley-kit/xfs-client to drive the simulator.

Install

pnpm add @tripley-kit/xfs-control-client

Host setup

Start a tripley-native-hostd binary compiled with the service-xfs-control feature. If the app under test also calls XFS through the same host daemon, expose both services:

tripley-native-hostd --transport websocket --addr 127.0.0.1:39010 --services xfs,xfs-control --xfs-control-simulator-ws-url ws://127.0.0.1:39001

The default simulator control URL is ws://127.0.0.1:39001. Pass authToken to the client when the host daemon was started with --auth-token.

Connect

import { createWebSocketXfsControlClient } from '@tripley-kit/xfs-control-client';

const control = createWebSocketXfsControlClient({
  url: 'ws://127.0.0.1:39010',
  authToken: process.env.TRIPLEY_NATIVE_HOST_TOKEN,
});

await control.connect();

The high-level factory resolves these simulator control instances: RuntimeControl, IdcControl, PinControl, CdmControl, CimControl, BcrControl, PtrControl, SiuControl, and TtuControl. The generated clients are also exported if a test wants to resolve a single service manually.

IDC card injection example

Create or update a simulator card, then insert it while the IDC simulator has a pending card read command from the app under test.

import { IdcCardType, createWebSocketXfsControlClient } from '@tripley-kit/xfs-control-client';

const control = createWebSocketXfsControlClient({ url: 'ws://127.0.0.1:39010' });
await control.connect();

await control.idc.upsertCard({
  card: {
    id: 'visa-test-01',
    label: 'Visa Test 01',
    cardType: IdcCardType.Magstripe,
    track2: '4761739001010010=25122010000000000000',
  },
});

const services = await control.runtime.listLogicalServices({});
const idcService = services.services.find((service) => service.className === 'IDC');
if (!idcService) {
  throw new Error('No IDC logical service is configured in the simulator.');
}

const result = await control.idc.insertCardByLogicalService({
  logicalName: idcService.logicalName,
  cardId: 'visa-test-01',
});
if (result.hresult !== 0) {
  throw new Error(`insertCardByLogicalService failed: 0x${result.hresult.toString(16)}`);
}

For a full end-to-end test, start the XFS operation with @tripley-kit/xfs-client first, wait until the simulator has an active or pending IDC command, then call insertCardByLogicalService. Use runtime.listActiveCommands, runtime.listPendingCommands, and runtime.drainLogicalServiceEvents when a test needs to coordinate command completion or inspect simulator events.

Package relationship

  • @tripley-kit/native: base Tripley Native capability SDK.
  • @tripley-kit/xfs-client: CEN/XFS device API exposed by tripley-native-hostd.
  • @tripley-kit/xfs-control-client: simulator control API for automation and test setup.

Run package verification with:

pnpm --filter @tripley-kit/xfs-control-client run verify