10.2.0 • Published 9 years ago

five-bells-sender v10.2.0

Weekly downloads
3
License
ISC
Repository
github
Last release
9 years ago

Five Bells Sender npm circle codecov

A reference implementation of an Interledger sending client

You can see the visualization in action as part of the five-bells-demo!

Example: Universal Mode

    send({
      sourceAccount:      'http://localhost:3001/accounts/alice',
      // Using Basic-Auth
      sourcePassword:     'alice',
      // Using TLS Client Certificate Authentication
      sourceKey:          fs.readFileSync('./key.pem'),
      sourceCert:         fs.readFileSync('./cert.pem'),
      destinationAccount: 'http://localhost:3002/accounts/alice',
      destinationAmount:  '1',
      // sourceMemo:      { noteToSelf: 'Payment for the other alice' },
      // destinationMemo: { invoice: '614a67a4-26b4-40f0-a798-bcca35c6e1dd' },
      //additionalInfo:   { sourceAccount: accountUri },
      //ca:               fs.readFileSYnc('./ca.pem')
    }).then(function() {
      console.log('success')
    })

Example: Universal Mode with fixed source amount

    send({
      sourceAccount:      'http://localhost:3001/accounts/alice',
      // Using Basic-Auth
      sourcePassword:     'alice',
      // Using TLS Client Certificate Authentication
      sourceKey:           fs.readFileSync('./key.pem'),
      sourceCert:          fs.readFileSync('./cert.pem'),
      destinationAccount: 'http://localhost:3002/accounts/alice',
      sourceAmount:       '1',
      //additionalInfo:   { sourceAccount: accountUri },
      //ca:               fs.readFileSYnc('./ca.pem')
}).then(function() {
      console.log('success')
    })

Example: Atomic Mode

    send({
      sourceAccount:      'http://localhost:3001/accounts/alice',
      // Using Basic-Auth
      sourcePassword:     'alice',
      // Using TLS Client Certificate Authentication
      sourceKey:          fs.readFileSync('./key.pem'),
      sourceCert:          fs.readFileSync('./cert.pem'),
      destinationAccount: 'http://localhost:3002/accounts/bob',
      destinationAmount:  '1',
      notary:             'http://localhost:6001',
      notaryPublicKey:    'QD/UBKyptEXcu6mZThsfnE/2ZZGsrpokKqaLMUrTUqo=',
      //receiptCondition: { message_hash, signer, public_key, type },
      //additionalInfo:   { sourceAccount: accountUri }
      //ca:               fs.readFileSYnc('./ca.pem')
    }).then(function() {
      console.log('success')
    })

Browser Support

This library can be compiled with Babel using the command npm run build. The compiled files will be in the babel/ folder.

10.2.0

9 years ago

10.1.0

9 years ago

9.1.0

9 years ago

10.0.1

9 years ago

10.0.0

9 years ago

9.0.0

9 years ago

8.0.0

9 years ago

7.0.0

9 years ago

6.0.1

9 years ago

6.0.0

9 years ago

5.0.0

9 years ago

4.5.1

9 years ago

4.5.0

9 years ago

4.4.0

9 years ago

4.3.0

10 years ago

4.2.0

10 years ago

4.1.0

10 years ago

4.0.0

10 years ago

3.5.0

10 years ago

3.4.0

10 years ago

3.3.0

10 years ago

3.2.0

10 years ago

3.1.0

10 years ago

3.0.2

10 years ago

3.0.1

10 years ago

3.0.0

10 years ago