elective-stereophonic
elective-stereophonic
[JavaScript] Pay with NxtButton  
Please login or register.

Login with username, password and session length
Advanced search  

News:

Latest Stable Nxt Client: Nxt 1.11.15 | Latest Experimental Nxt Client: Nxt 1.12.0e

Pages: [1] 2 3  All

Author Topic: [JavaScript] Pay with NxtButton  (Read 7025 times)

Daedelus

  • Board Moderator
  • Hero Member
  • ****
  • Karma: +230/-12
  • Offline Offline
  • Posts: 3280
    • View Profile
[JavaScript] Pay with NxtButton
« on: June 17, 2014, 03:37:54 pm »

Hello,

I would like to privately fund a development of a Javascript library outputting a "Pay with NXT" button that initiates locally signed "Send NXT" transaction and returns the transaction parameters to a custom post-processing function.

I assume that this is technically possible, based on James' answers here.

Please suggest the size of the bounty/fee appropriate for the development of such project.

Below is a draft outline of functionality -- subject to discussion and change.

Thanks!



Overview

Javascript library or set of libraries outputting a "Pay with NXT" button sending a locally signed "Send NXT" transaction and returning a detailed result.


User Experience:

Step 1. Click a button


Step 2. Submit the secret phrase


Step 3. Receive a confirmation message with transaction ID (or anything else as defined in a post-processing function)


Deployment steps for webmasters

Step 1. Link JS library/libraries to a webpage:
<script src="..."></script>

Step 2. Embed button HTML:
<img id="nxtButtonImage" ... />

Step 3. Initialise button:
$('.nxtButtonImage').nxtButton ( {
  nxtServer: 'http://mynxt.info',
  recipient: '1234126735412',
  amountNXT: 5.0,
  title: 'The product name'
});

Step 4. Write/modify a post-processing function.


Browser support:
Any modern desktop or mobile browser.

Licence:
MIT
Logged
NXT: NXT-4CS7-S4N5-PTH5-A8R2Q

MrV777

  • Hero Member
  • *****
  • Karma: +115/-4
  • Offline Offline
  • Posts: 988
    • View Profile
Re: [JavaScript] Pay with NxtButton
« Reply #1 on: June 17, 2014, 03:42:37 pm »

Hmm, will the website need to have NXT running locally?
or will there be a dedicated server somewhere running NXT to have the javascript connect to?

or actually, after reading it over again.  It sounds like the webmaster will need to decide that themselves and put the correct address in?
Logged
NXT: NXT-BK2J-ZMY4-93UY-8EM9V
NXT nodes: 209.222.98.250, 216.155.128.10

hash

  • Jr. Member
  • **
  • Karma: +22/-1
  • Offline Offline
  • Posts: 90
    • View Profile
Re: [JavaScript] Pay with NxtButton
« Reply #2 on: June 17, 2014, 03:50:31 pm »

Hmm, will the website need to have NXT running locally?
or will there be a dedicated server somewhere running NXT to have the javascript connect to?

or actually, after reading it over again.  It sounds like the webmaster will need to decide that themselves and put the correct address in?

Exactly! Webmaster can host a NXT node or connect to any public node. We can advise the former.

MrV777

  • Hero Member
  • *****
  • Karma: +115/-4
  • Offline Offline
  • Posts: 988
    • View Profile
Re: [JavaScript] Pay with NxtButton
« Reply #3 on: June 17, 2014, 03:51:44 pm »

So it sounds like you just need some pre-written javascript to call this API:
https://wiki.nxtcrypto.org/wiki/Nxt_API#Send_Nxt


Hmm, will the website need to have NXT running locally?
or will there be a dedicated server somewhere running NXT to have the javascript connect to?

or actually, after reading it over again.  It sounds like the webmaster will need to decide that themselves and put the correct address in?

Exactly! Webmaster can host a NXT node or connect to any public node. We can advise the former.
If you give them both options, the calls may need to be different unless you can use CORS I believe.  Most browsers don't like cross-domain javascript calls


Disclaimer: All of this information is to the best of my knowledge  :)
« Last Edit: June 17, 2014, 03:53:47 pm by mrv777 »
Logged
NXT: NXT-BK2J-ZMY4-93UY-8EM9V
NXT nodes: 209.222.98.250, 216.155.128.10

hash

  • Jr. Member
  • **
  • Karma: +22/-1
  • Offline Offline
  • Posts: 90
    • View Profile
Re: [JavaScript] Pay with NxtButton
« Reply #4 on: June 17, 2014, 04:07:44 pm »

So it sounds like you just need some pre-written javascript to call this API:
https://wiki.nxtcrypto.org/wiki/Nxt_API#Send_Nxt
This api implies sending secret password to the NRS through internet. Which is unacceptable. The whole point of this project is to make a system that signs transactions locally in the browser.

If you give them both options, the calls may need to be different unless you can use CORS I believe.  Most browsers don't like cross-domain javascript calls

True, I forgot about it.
If that becomes an obstacle, I'm fine with adding prerequisite NRS node hosted under the same domain to webmaster's system requirement. The more nodes, the merrier :)
« Last Edit: June 17, 2014, 04:24:30 pm by hash »
Logged

autuus

  • Jr. Member
  • **
  • Karma: +3/-0
  • Offline Offline
  • Posts: 23
    • View Profile
Re: [JavaScript] Pay with NxtButton
« Reply #5 on: June 18, 2014, 07:20:51 am »

Hey, I'm a developer for the FIMK project, I'm good at javascript, and I would like to take on this bounty. I request around 50k NXT for this, but will settle for less. Please contact if you want to contribute to this bounty to konsta.gogoljuk@gmail.com. The bounty should be pre paid, and returned if I fail to create this within a timeframe of 1 month.
Logged

Mexxer

  • Hero Member
  • *****
  • Karma: +32/-20
  • Offline Offline
  • Posts: 653
    • View Profile
Re: [JavaScript] Pay with NxtButton
« Reply #6 on: June 18, 2014, 07:24:01 am »

Hey, I'm a developer for the FIMK project, I'm good at javascript, and I would like to take on this bounty. I request around 50k NXT for this, but will settle for less. Please contact if you want to contribute to this bounty to konsta.gogoljuk@gmail.com. The bounty should be pre paid, and returned if I fail to create this within a timeframe of 1 month.

Don't think the community will pay you up front after what happened recently with one of our other developers.
Besides a bounty is usually collected when the job is done.
Logged
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬  ▄▀▀▀▀▀▀▀▀▄  ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬●  nimirum  ●▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
▬▬▬ ◖ENDING CENSORSHIP ONLINE◗  ◖ ICO OPEN NOW◗ ▬▬▬

hash

  • Jr. Member
  • **
  • Karma: +22/-1
  • Offline Offline
  • Posts: 90
    • View Profile
Re: [JavaScript] Pay with NxtButton
« Reply #7 on: June 18, 2014, 12:58:14 pm »

Hey, I'm a developer for the FIMK project, I'm good at javascript, and I would like to take on this bounty. I request around 50k NXT for this, but will settle for less. Please contact if you want to contribute to this bounty to konsta.gogoljuk@gmail.com. The bounty should be pre paid, and returned if I fail to create this within a timeframe of 1 month.

Hi autuus, thank you for the offer. I think it's a bit high. Please have a look at this project, it's an open source online NXT wallet with a client-side encryption; perhaps the client-side encryption part of the code can be reused for the 'Pay with NXT' button?

Re. the pre-pay, I can't risk it, but I can offer you an escrow via anon136 or maybe via one of the NXT committees if they are willing to cooperate.
« Last Edit: June 18, 2014, 01:07:47 pm by hash »
Logged

MrV777

  • Hero Member
  • *****
  • Karma: +115/-4
  • Offline Offline
  • Posts: 988
    • View Profile
Re: [JavaScript] Pay with NxtButton
« Reply #8 on: June 18, 2014, 01:01:43 pm »

With only 1 post in the forums, 50k prepay would be a very hard sell.  An escrow would be the best I think.

Hey, I'm a developer for the FIMK project, I'm good at javascript, and I would like to take on this bounty. I request around 50k NXT for this, but will settle for less. Please contact if you want to contribute to this bounty to konsta.gogoljuk@gmail.com. The bounty should be pre paid, and returned if I fail to create this within a timeframe of 1 month.
Logged
NXT: NXT-BK2J-ZMY4-93UY-8EM9V
NXT nodes: 209.222.98.250, 216.155.128.10

Daedelus

  • Board Moderator
  • Hero Member
  • ****
  • Karma: +230/-12
  • Offline Offline
  • Posts: 3280
    • View Profile
Re: [JavaScript] Pay with NxtButton
« Reply #9 on: June 18, 2014, 01:07:38 pm »

Hey, I'm a developer for the FIMK project, I'm good at javascript, and I would like to take on this bounty. I request around 50k NXT for this, but will settle for less. Please contact if you want to contribute to this bounty to konsta.gogoljuk@gmail.com. The bounty should be pre paid, and returned if I fail to create this within a timeframe of 1 month.

FIMK? Is that the national currency project at DGEX? If so maybe get Graviton to vouch for you to gain more trust but I'd say escrow is still fair.
Logged
NXT: NXT-4CS7-S4N5-PTH5-A8R2Q

autuus

  • Jr. Member
  • **
  • Karma: +3/-0
  • Offline Offline
  • Posts: 23
    • View Profile
Re: [JavaScript] Pay with NxtButton
« Reply #10 on: June 19, 2014, 06:03:37 am »

Yeah, escrow is fair, and now that i've seen some tools that make this easier (i thought i would have to encrypt the call myself) I can down the price some more. Just tell me what you want to invest. And I did register here to redeem this bounty. For reliability, I can show you this page http://fimk.fi/en/contact.htm
Logged

autuus

  • Jr. Member
  • **
  • Karma: +3/-0
  • Offline Offline
  • Posts: 23
    • View Profile
Re: [JavaScript] Pay with NxtButton
« Reply #11 on: June 19, 2014, 06:05:18 am »

Logged

anon136

  • Hero Member
  • *****
  • Karma: +86/-19
  • Offline Offline
  • Posts: 1015
    • View Profile
Re: [JavaScript] Pay with NxtButton
« Reply #12 on: June 24, 2014, 04:22:03 pm »

Deposit escrow funds at NXT-UWKJ-GFEV-AGY4-5C4YS (my public address)
Logged

m19

  • Jr. Member
  • **
  • Karma: +10/-0
  • Offline Offline
  • Posts: 65
    • View Profile
Re: [JavaScript] Pay with NxtButton
« Reply #13 on: June 26, 2014, 07:21:38 pm »

So it sounds like you just need some pre-written javascript to call this API:
https://wiki.nxtcrypto.org/wiki/Nxt_API#Send_Nxt
This api implies sending secret password to the NRS through internet. Which is unacceptable. The whole point of this project is to make a system that signs transactions locally in the browser.

You can call that API with public key instead, it will return unsigned bytes, and then sign in the browser with https://github.com/Jaguar0625/JavaScriptNrs and then send the signed bytes back.
No need to send the password to a server ever.
Logged

autuus

  • Jr. Member
  • **
  • Karma: +3/-0
  • Offline Offline
  • Posts: 23
    • View Profile
Re: [JavaScript] Pay with NxtButton
« Reply #14 on: July 09, 2014, 02:51:33 pm »

github.com/droppen/nxtbutton << finished product


"Sorry, you are not allowed to post external links." f*ck you NXT forum configurations.

Edit by Daedelus: I forgot I was a moderator in here  ;D Deleted my post below.
« Last Edit: July 09, 2014, 03:17:32 pm by Daedelus »
Logged

PoofKnuckle

  • Hero Member
  • *****
  • Karma: +111/-7
  • Offline Offline
  • Posts: 849
  • Your Concern is Noted.
    • View Profile
    • NXT FreeMarket
Re: [JavaScript] Pay with NxtButton
« Reply #15 on: July 09, 2014, 03:03:42 pm »

g i t h u b . c o m / d r o p p e n / n x t b u t t o n << finished product


"Sorry, you are not allowed to post external links." f*ck you NXT forum configurations.

One more post and you can, I think...
Logged
NXT: NXT-WBVP-83YM-FRB3-9MQLY
BM-NBTVHaA41Ejh2G6krD9p5vM62vk84isM

wesley

  • Hero Member
  • *****
  • Karma: +204/-3
  • Offline Offline
  • Posts: 1159
    • View Profile
Re: [JavaScript] Pay with NxtButton
« Reply #16 on: July 09, 2014, 03:15:19 pm »

why do you need PHP and all that jazz?
Logged

hash

  • Jr. Member
  • **
  • Karma: +22/-1
  • Offline Offline
  • Posts: 90
    • View Profile
Re: [JavaScript] Pay with NxtButton
« Reply #17 on: July 09, 2014, 07:27:23 pm »

Deposit escrow funds at NXT-UWKJ-GFEV-AGY4-5C4YS (my public address)

Thanks, I did not want to wait and payed to autuus without an escrow. Luckily it proved to be a correct decision.
« Last Edit: July 09, 2014, 07:31:51 pm by hash »
Logged

hash

  • Jr. Member
  • **
  • Karma: +22/-1
  • Offline Offline
  • Posts: 90
    • View Profile
Re: [JavaScript] Pay with NxtButton
« Reply #18 on: July 09, 2014, 07:30:40 pm »

why do you need PHP and all that jazz?

I understand that it was needed to overcome the JavaScript's cross domain posting security restrictions. Please let us know if you think there is a better solution.

Pilot

  • Hero Member
  • *****
  • Karma: +47/-7
  • Offline Offline
  • Posts: 1241
    • View Profile
Re: [JavaScript] Pay with NxtButton
« Reply #19 on: July 09, 2014, 07:34:17 pm »

why do you need PHP and all that jazz?

I understand that it was needed to overcome the JavaScript's cross domain posting security restrictions. Please let us know if you think there is a better solution.

CORS is a bitch but it can work. Generally, the payload should be sent to the hosters web server which can forward it to the NRS client. Since server side code doesn't have XSS protections.
Logged
Pages: [1] 2 3  All
 

elective-stereophonic
elective-stereophonic
assembly
assembly