How To Use SDKs On A Stellar Node

Learn how easy it is to use Stellar SDKs.

Okay, so you spun up a Stellar node. Good plan. Here’s some valuable info on what to do next, specifically how to employ SDKs.

First things First

Stellar is broken down into multiple parts. There are stellar-core and horizon, which allow you to interact with the testnet or mainnet. Using Horizon can be a bit complicated when doing certain calls like operations, which is why there are some Stellar SDKs that make it easy to use stellar-core. All you will need to use the SDK is the IP of the Blockdaemon Stellar Node.

How to find your Horizon node IP

  1. Login to your Blockdaemon account.
  2. In the dashboard, click on the desired Horizon node.
  3. In order to generate an IP for the Horizon node, it will first need to reach the Ready status on the network page.
  4. Click the Connect tab.
  5. Your Horizon IP and port will be listed in the IP section.

Available SDKs

Server server = new Server("https://horizon-testnet.stellar.org");

You will need to provide your Blockdaemon node endpoint URL and auth token (from your dashboard) when creating your StellarSdk.Server object.

('https://stellar-test.bdnodes.net/?auth=<CUSTOMER TOKEN>')

You will need to provide your Blockdaemon node endpoint URL and auth token (from your dashboard) when creating your StellarSdk.Server object.

https://stellar-test.bdnodes.net/?auth=<CUSTOMER TOKEN>

You will need to provide your Blockdaemon node endpoint URL and auth token (from your dashboard) when creating your StellarSdk.Server object. For example:

var StellarSdk = require('stellar-sdk');
var server = new StellarSdk.Server('https://stellar-test.bdnodes.net/?auth=<CUSTOMER TOKEN>');// get a list of transactions that occurred in ledger 714678, you can change the value in the function
server.transactions()
.forLedger(714678)
.call().then(function(r){ console.log(r); }).catch(function () {console.log("Promise Rejected")});

📘

Note!

The example above is using the testnet node. So you should use //stellar-main.bdnodes.net

endpoint URLs and auth in your dashboard

👋 Need Help?

Contact us through email or our support page for any issues, bugs, or assistance you may need.