0.1.1 • Published 6 years ago

starlight-sdk v0.1.1

Weekly downloads
1
License
Apache-2.0
Repository
-
Last release
6 years ago

Starlight SDK

This is a demo TypeScript SDK for Starlight. It allows you to programmatically create and use payment channels on the Stellar testnet.

The documentation is available here.

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, you can see the code for the Starlight wallet.