Skip to documentation
/

Installation

Package manager
Language

Requirements

  • Node.js 22 or newer
  • JavaScript with native ESM
  • npm installed on your development machine

Run the SDK on your server. Your browser or mobile application calls your backend. The public provider example below needs no API key; workspace commands require a scoped key and authorized access.

Runnable starter

The starter includes the SDK archive, a Node.js server, a browser application, JavaScript and TypeScript examples, and build configuration.

Download starter v0.1.1
bash example
.sh
unzip aggregator-network-sdk-starter-0.1.1.zipcd aggregator-network-sdk-starter-0.1.1cp .env.example .envnpm installnpm run dev

Open http://127.0.0.1:3000 on the machine running the starter. Provider cards load public data without a key. The commands use a Unix shell; you may instead extract the archive and copy the environment file with your file manager.

bash example
.sh
npm run providers:js

These alternative commands run the JavaScript provider example without the browser. Configure the key and currency in .env for workspace catalogue access, then restart the local server. For an existing project, follow the manual installation below.

Download and install

Create an empty project folder and save this package.json there. The selected JavaScript configuration includes the correct verification command.

json example
.json
{  "name": "aggregator-sdk-example",  "private": true,  "type": "module",  "scripts": {    "verify": "node verify.mjs"  }}
Download aggregator-network-sdk-0.1.1.tgz

Save the archive in that project folder. Open a terminal in the folder and install the package using npm.

bash example
.sh
npm install ./aggregator-network-sdk-0.1.1.tgz

Verify installation

Save the following example as verify.mjs. The .mjs extension enables native ESM; no compiler is required.

javascript example
.js
import { AggregatorClient } from '@aggregator-network/sdk'; const client = new AggregatorClient();const directory = await client.listProviders();console.log('Public providers:', directory.providers.length);
bash example
.sh
npm run verify

The script prints the public provider count. Your workspace catalogue may differ. Continue with configuration for authenticated commands.

TypeScript setup

Prefer TypeScript?

Your current JavaScript setup runs directly with Node.js. Switch to TypeScript to view the matching compiler dependencies, typed example, build script and tsconfig.

Updating the package

Download the desired version and replace the local archive dependency using your selected package manager. Keep the archive or an internal package mirror available to your deployment system. Commit the resulting manifest and lockfile, and validate your integration before releasing it.

bash example
.sh
npm install ./aggregator-network-sdk-0.1.1.tgz

Troubleshooting

ProblemResolution
Archive not foundUse the directory containing the downloaded archive, or its relative file path.
Module not foundInstall the archive into the project that executes your script.
Import syntax errorUse the provided ESM package configuration and matching source filename.
TypeScript file not runnableRun npm run build, then execute the compiled file in dist.
Browser import rejectedMove the SDK import to your backend. Keys remain server-side.
Directory request failsCheck Node.js version, server egress and TLS connectivity, then inspect the typed error.
Was this page helpful?