starlight-sdk
TypeScript icon, indicating that this package has built-in type declarations

0.1.1 • Public • Published

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.

Readme

Keywords

none

Package Sidebar

Install

npm i starlight-sdk

Weekly Downloads

3

Version

0.1.1

License

Apache-2.0

Unpacked Size

78.6 kB

Total Files

14

Last publish

Collaborators

  • danrobinson