W3C home > Mailing lists > Public > public-interledger@w3.org > July 2016

RE: Five Bells Wallet Client

From: Peter Thompson <peter.thompson@thehumanchain.com>
Date: Mon, 4 Jul 2016 07:19:01 -0700
To: Evan Schwartz <evan@ripple.com>
CC: Interledger Community Group <public-interledger@w3.org>
Message-ID: <56D0C6E56D22EE44B64E9C6C4EA8C75E016E7E483D78@EXVMBX016-2.exch016.msoutlookonline.net>
Hi Evan,

Problem resolved. I had assumed that the destination addresses of red.ilpdemo.org and blue.ilpdemo.org were hard-coded into the example and that it was the actual user e-mail addresses that needed to be specified in the example code. I've substituted for the <username>@red.ilpdemo.org<mailto:usernames@red.ilpdemo.org> instead and everything is functioning as expected.

Looking forward to an interesting workshop Wednesday!

Kind Regards,

Pete

From: Evan Schwartz [mailto:evan@ripple.com]
Sent: 04 July 2016 15:13
To: Peter Thompson
Cc: Interledger Community Group
Subject: Re: Five Bells Wallet Client

That should work, let me know if you run into any issues

On Mon, Jul 4, 2016 at 10:05 AM, Peter Thompson <peter.thompson@thehumanchain.com<mailto:peter.thompson@thehumanchain.com>> wrote:
Hi Evan,

Understood. As per below, I've already created accounts for the red and blue wallets and substituted these credentials in the code. Anything else that needs to be configured for the demo wallet client to run against the hosted red and blue wallets?

Thanks,

Pete

From: Evan Schwartz [mailto:evan@ripple.com<mailto:evan@ripple.com>]
Sent: 04 July 2016 14:58

To: Peter Thompson
Cc: Interledger Community Group
Subject: Re: Five Bells Wallet Client

You should create two new accounts on the red and blue wallets. Those aren't the real passwords for alice and bob :)

On Mon, Jul 4, 2016 at 4:25 AM, Peter Thompson <peter.thompson@thehumanchain.com<mailto:peter.thompson@thehumanchain.com>> wrote:
Hi Evan,

Many thanks. I was slightly confused as to how the Interledger modules were setup with NodeJS/NPM.

I've now successfully installed everything and in the process of trying to run the client example. I've created send.js with the code below (substituting the login credentials for ones I've created on the blue and red demo sites) and also receive.js.

Both JS files run without error but nothing is reported to the node console log for either. Receive.js also exists straight away where I would have expected it to wait for a payment.

I expect it's something simple I've missed but if you could advise accordingly that would be fantastic?

Thanks,

Pete

send.js:
const WalletClient = require('five-bells-wallet-client')

const sender = new WalletClient({
  address: 'alice@red.ilpdemo.org<mailto:alice@red.ilpdemo.org>',
  password: 'super-secret-password'
})

sender.on('connect', () => {
  console.log('Sender connected')
})

sender.send({
  destination: 'bob@blue.ilpdemo.org<mailto:bob@blue.ilpdemo.org>',
  destinationAmount: '0.01',
  message: 'Still love you!',
  onQuote: (payment) => {
    console.log('Received a quote; this will cost us: ' + payment.sourceAmount)
  }
}).then((payment) => {
  console.log('Sent payment:', payment)
  console.log('')
}).catch((err) => {
  console.error(err.stack)
})

.and also receive.js with the following:

const WalletClient = require('five-bells-wallet-client')



const receiver = new WalletClient({

  address: 'bob@blue.ilpdemo.org<mailto:bob@blue.ilpdemo.org>',

  password: 'ultra-secret-password'

})



receiver.on('connect', () => {

  console.log('Receiver connected')

})



receiver.on('incoming', (payment) => {

  console.log('Received ' + payment.destinationAmount + ' bucks!')

  console.log(payment.sourceAccount + ' says: ' + payment.message)

})


From: Evan Schwartz [mailto:evan@ripple.com<mailto:evan@ripple.com>]
Sent: 01 July 2016 15:33
To: Peter Thompson
Cc: Interledger Community Group
Subject: Re: Five Bells Wallet Client


Hi Peter,

If you clone the repo you just need to run "npm install". If you want to install it as a dependency in another repo, run "npm install five-bells-wallet-client".

Best,
Evan
On Jul 1, 2016 10:24 AM, "Peter Thompson" <peter.thompson@thehumanchain.com<mailto:peter.thompson@thehumanchain.com>> wrote:
Dear Interledger,

I'm a technical consultant and developer attending the Interledger Workshop next week. In preparation for the workshop, I have been trying to deploy and test the Interledger client examples from Github but have been running into some issues.

I'm running Ubuntu for my development environment and have node v5.12.0 and npm v3.8.6 installed successfully. I've cloned the five-bells-wallet client from Github but when I run 'npm install five-bells-wallet-client --save' from the five-bells-wallet directory I get an NPM error:

'Refusing to install five-bells-wallet-client as a dependency of itself.'

Could you advise as to where I'm going wrong?

Kind Regards,

Pete

Peter Thompson
The Human Chain
Mobile : +44 (0) 7590 991 707<tel:%2B44%20%280%29%207590%20991%20707>
e-mail : peter.thompson@thehumanchain.com<mailto:peter.thompson@thehumanchain.com>
www.thehumanchain.com<http://www.thehumanchain.com/>

The Human Chain Ltd is a company registered in England and Wales with company number 3530984.
Office : Magdalen Centre, The Oxford Science Park, Oxford, OX4 4GA, UK

P Please consider your environmental responsibility before printing this e-mail
www.digitalservicestoolkit.com<http://www.digitalservicestoolkit.com>
[cid:image001.png@01D1D607.40AA9010]




--
Evan Schwartz | Software Architect | Ripple
[http://upload.wikimedia.org/wikipedia/commons/e/eb/Ripple-Logo.png]<http://ripple.com>



--
Evan Schwartz | Software Architect | Ripple
[http://upload.wikimedia.org/wikipedia/commons/e/eb/Ripple-Logo.png]<http://ripple.com>


image001.png
(image/png attachment: image001.png)

Received on Monday, 4 July 2016 14:19:29 UTC

This archive was generated by hypermail 2.3.1 : Monday, 4 July 2016 14:19:30 UTC