Initialization

Initialize the SDK client with the network on which you want your application to run

ParamDescription

ENV.SANDBOX

Testnet Environment

ENV.PRODUCTION

Mainnet Environment

You also need apiKey to run access restricted APIs, please contact Horizon Network for more information

import { HorizonClient, ENV } from '@horizon-network/node-sdk';
const config = {
    enviroment: ENV.SANDBOX, // Or PRODUCTION
    apiKey: '' // apiKey get from Horizon Network
};
const client = new HorizonClient(config);

Last updated