Starlight SDK
This is a demo TypeScript SDK for Starlight. It allows you to programmatically create and use payment channels on the Stellar testnet.
To use this SDK, you first need to install and run a local instance of starlightd
.
$ starlightd
Once you have starlightd
running, you can programmatically connect to it using this SDK:
import { Client } from 'starlight-sdk'
async function demo() {
const client = new Client('http://localhost:7000')
await client.configInit({
Username: 'alice',
Password: 'password',
HorizonURL: 'https://horizon-testnet.stellar.org/',
})
client.subscribe(update => {
console.log('Received update:', update)
})
}
demo()
You can learn more about the methods available on the Client class in the documentation.
For an example of an app built using this SDK, see the code for the Starlight wallet.