How To Use SDKs On A Stellar Node

Stellar is broken down into 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 endpoint URL 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. To generate an IP for the Horizon node, it must first 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.

SDKs Examples

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

The example below retrieves a list of transactions that occurred in a ledger. You can modify the method as needed.

https://<YOUR_ENDPOINT>/transactions

The example below retrieves a list of transactions that occurred in a ledger. You can modify the method as needed.

https://<YOUR_ENDPOINT>/transactions

var StellarSdk = require('stellar-sdk');
var server = new StellarSdk.Server('<YOUR_ENDPOINT_URL>');// 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")});

👋 Need Help?

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