Skip to content
Last updated

V3 Hypersync SDK migration guide

Version 2.x to version 3.0

The Hypersync SDK version 3.0 includes a number of new capabilities that require small changes to Hypersync apps that use versions 2.1 or earlier.

Package versions

The Hypersync SDK functionality is distributed via three Node packages:

Package
Version
Description
@hyperproof/hyperysnc-sdk3.0.2This is the core Hypersync SDK.
@hyperproof/hypersync-models5.0.0Supporting Hypersync models.
@hyperproof/integration-sdk1.0.2Common integration elements.

All functionality needed to develop Hypersync appls is now exported from @hyperproof/hypersync-sdk. There's no need to include dependencies to @hyperproof/hypersync-models or @hyperproof/integration-sdk.

The dependencies section of your app's package.json file should be updated as follows:

  "dependencies": {
    "@hyperproof/hypersync-sdk": "^3.0.2",
    ...
  }

If your code imported classes, types, interfaces, or enums from one of the other packages, those imports need to be updated after making this change.

Updated execution environment

Hypersync apps running in Hyperproof EU use an updated execution environment. To ensure compatibility, existing apps need a few adjustments.

The main difference is how apps are started: Hyperproof EU requires an up script in package.json that creates and initializes an HTTP server within the app.

Step One: Adding the up script to package.json

The required up command should be added to the scripts section of package.json as follows:

  "scripts": {
    "up": "node ./build/start.js",
    ...
  }

Step Two: Creating start.ts

After adding the up command, create a new file called start.ts under your package's /src directory. It should contian the following content:

import { MyApp } from './MyApp';

import { HttpServer } from '@hyperproof/integration-sdk';

const server = new HttpServer();
const app = new MyApp();
server.startListening(app.start());

Tip: Replace "MyApp" with the name of your custom app.

After these updates, building your app generates ./build/start.js, which is referenced by the up command. With this change, your custom Hypersync app will run correctly in both Hyperproof US and Hyperproof EU environments.