Five Bells Sender
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',
sourcePassword: 'alice',
sourceKey: fs.readFileSync('./key.pem'),
sourceCert: fs.readFileSync('./cert.pem'),
destinationAccount: 'http://localhost:3002/accounts/alice',
destinationAmount: '1',
}).then(function() {
console.log('success')
})
Example: Universal Mode with fixed source amount
send({
sourceAccount: 'http://localhost:3001/accounts/alice',
sourcePassword: 'alice',
sourceKey: fs.readFileSync('./key.pem'),
sourceCert: fs.readFileSync('./cert.pem'),
destinationAccount: 'http://localhost:3002/accounts/alice',
sourceAmount: '1',
}).then(function() {
console.log('success')
})
Example: Atomic Mode
send({
sourceAccount: 'http://localhost:3001/accounts/alice',
sourcePassword: 'alice',
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=',
}).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.