15.1.2 • Published 6 years ago

ilp-plugin-bells v15.1.2

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

ilp-plugin-bells npm circle codecov

ILP ledger plugin for five-bells-ledger

Usage

This plugin adheres to the Ledger Plugin Interface (LPI), which means it can be used in combination with other components, like the ilp module and the ilp-connector.

ILP-Plugin-Bells can also be created via a factory, which allows many instances to share a single websocket connection.

Note: this requires an admin account on a ledger. Otherwise the factory can't listen for events on all accounts.

const PluginBellsFactory = require('ilp-plugin-bells').Factory

// connects to the admin account and uses one websocket connection to subscribe
// to all transfers and messages on the ledger

const factory = new PluginBellsFactory({
  adminUsername: 'admin',
  adminPassword: 'admin',
  adminAccount: 'https://red.ilpdemo.org/ledger/accounts/admin' 
})

factory.connect().then(() => {

  // `create` will make a new, connected, PluginBells instance. If a plugin is already
  // created for a given username, then the existing plugin is returned from `create`

  return factory.create({ username: 'alice' })
  // { account: 'https://red.ilpdemo.org/ledger/accounts/alice' } is also valid

}).then((plugin) => {

  // this call is uneccesary and will do nothing, because the plugin is already
  // connected
  plugin.connect()

  // neither will this call; the plugin doesn't maintain its own connection,
  // so it can't disconnect itself
  plugin.disconnect()

  // ...

  // when you're done using the plugin, call factory.remove in order to
  // get rid of all event listeners and stop caching the plugin.

  factory.remove('alice')
})

Compatibility

ilp-plugin-bells version 12 uses five-bells-shared version 23, and is only compatible with five-bells-ledger version 20. As of version 12.0.1, it exposes version 2c9a2231 of the Ledger Plugin Interface

15.1.2

6 years ago

15.1.1

7 years ago

15.0.4

7 years ago

15.0.3

7 years ago

15.0.2

7 years ago

15.0.1

7 years ago

15.0.0

7 years ago

14.4.2

7 years ago

14.4.1

7 years ago

14.4.0

7 years ago

14.3.1

7 years ago

14.3.0

7 years ago

14.2.1

7 years ago

14.2.0

7 years ago

14.1.0

7 years ago

14.0.1

7 years ago

14.0.0

7 years ago

13.1.4

7 years ago

13.1.3

7 years ago

13.1.1

7 years ago

13.1.0

7 years ago

13.0.1

7 years ago

11.0.5

7 years ago

13.0.0

7 years ago

12.1.1

7 years ago

12.1.0

7 years ago

12.0.0

7 years ago

11.0.4

7 years ago

11.0.3

7 years ago

11.0.2

7 years ago

11.0.1

7 years ago

11.0.0

7 years ago

10.2.6

7 years ago

10.2.5

7 years ago

10.2.4

7 years ago

10.2.3

7 years ago

10.2.2

7 years ago

10.2.1

7 years ago

10.2.0

7 years ago

10.1.2

7 years ago

10.1.1

7 years ago

10.1.0

7 years ago

10.0.2

7 years ago

10.0.1

7 years ago

9.4.0

7 years ago

9.3.1

7 years ago

9.3.0

7 years ago

9.2.1

7 years ago

9.2.0

7 years ago

9.1.1

7 years ago

9.1.0

7 years ago

9.0.0

7 years ago

8.3.0

8 years ago

8.2.0

8 years ago

8.1.4

8 years ago

8.1.3

8 years ago

8.1.2

8 years ago

8.1.1

8 years ago

8.1.0

8 years ago

8.0.1

8 years ago

8.0.0

8 years ago

7.0.3

8 years ago

7.0.2

8 years ago

7.0.1

8 years ago

7.0.0

8 years ago

6.1.0

8 years ago

6.0.3

8 years ago

6.0.2

8 years ago

6.0.1

8 years ago

6.0.0

8 years ago

5.3.3

8 years ago

5.3.2

8 years ago

5.3.1

8 years ago

5.3.0

8 years ago

5.2.0

8 years ago

5.1.0

8 years ago

5.0.1

8 years ago

5.0.0

8 years ago

4.0.0

8 years ago

3.1.0

8 years ago

3.0.1

8 years ago

3.0.0

8 years ago

2.1.3

8 years ago

2.1.2

8 years ago

2.1.1

8 years ago

2.1.0

8 years ago

2.0.0

8 years ago

1.0.0

8 years ago