jcrubino
Member
Offline
Activity: 83
Merit: 10
|
|
March 02, 2014, 05:38:24 AM |
|
Does a javascript transactions lib exist, ala bitcoinjs?
|
|
|
|
|
|
|
Unlike traditional banking where clients have only a few account numbers, with Bitcoin people can create an unlimited number of accounts (addresses). This can be used to easily track payments, and it improves anonymity.
|
|
|
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
|
|
|
|
l8orre
Legendary
Offline
Activity: 1181
Merit: 1018
|
|
March 02, 2014, 03:41:13 PM Last edit: March 02, 2014, 04:03:58 PM by l8orre |
|
hey Guys - I seem to be having an issue with getting proper POST requests to work... I can connect on localhost, but any remote connect does not work, e.g. on the testnet or on raspi in my local net ... I know I am missing something obvious here, but as I say, I am a science programmer, and not so much a web programmer Do I have to use http or https? as far as I understand, the entry '*' in the conf should be enough to connect #### API SERVER #### # Accept http/json API requests. nxt.enableAPIServer=true # Hosts from which to allow http/json API requests, if enabled. nxt.allowedBotHosts=* # Port for http/json API requests. nxt.apiServerPort=7876 In my localnet, I can connect to my raspi at http://192.168.178.24:7876when I try https I get: requests.exceptions.SSLError: [SSL: UNKNOWN_PROTOCOL] unknown protocol (_ssl.c:548) when I try testnet, the python just dies - what is different on the testnet???
|
|
|
|
opticalcarrier
|
|
March 02, 2014, 04:16:19 PM |
|
you have to specifically enable SSL. and when you do that, you MUST use SSL. also when you do that, I believe you MUST EITHER create your own self-signed cert or you must purchase a signed cert. I dont believe the NRS version comes with the old 2008 SSL cert it used to come with look in wiki howto for guide on certs
|
|
|
|
l8orre
Legendary
Offline
Activity: 1181
Merit: 1018
|
|
March 02, 2014, 05:13:08 PM Last edit: March 03, 2014, 01:59:51 PM by l8orre |
|
you have to specifically enable SSL. and when you do that, you MUST use SSL. also when you do that, I believe you MUST EITHER create your own self-signed cert or you must purchase a signed cert. I dont believe the NRS version comes with the old 2008 SSL cert it used to come with look in wiki howto for guide on certs
thanks for the hint - I created a cert according to the wiki, but the most pat is for running a node yourself and how to set up NRS to ACCEPT connections. So now I am trying to get my requests(POST) to use the cert to connect to the testnet - I'll keep tryingsorry guys - I am not getting anywhere. is the testnet API connect running on port 6876? do I have to use a local cert that I supply in my local nxtClient folder? I don't want to clog up the main thread, so I'll try to posting here - maybe some of you other client devs can give me a few hints: Am I correct with assuming that to connect with the testnet, I have to use and port 6876 ? as in my local net it is http://192.168.178.24:7876/ , but what confuses me is that in the local net it is http - surely that is set in the conf file, and a node open to the net will not use http - but then again I am stuck with the problem of constructing proper POST requests. Does my requests lib have to provide a user cert? There are hooks for that in the lib.. seems most of my issues were related to the testnet - debugging can also be often a learning experience - unpleasant, but now pain no gain
|
|
|
|
opticalcarrier
|
|
March 14, 2014, 04:26:32 PM |
|
Do you devs yet have any ideas on the APIs that will be involved in leasing effectiveBalance? In order to assist with remediation, hopefully there will be something more than just leasing and recalling your effectiveBalance. From the leasee's perspective, upon generating a block and receiving fees, it will be necessary to determine each individual effectiveBalance it is leasing as of 1440 blocks before the pool's generated block, and to then make sure that each effectiveBalance never went down during the next 1440 blocks.
So Ill propose an API to allow an account to request a list of all accounts leased out to it as of a certain block. Or if you are feeling generous, with this info, also provide the effectiveBalance of each account at that certain block. Or possibly even something similar to guaranteedBalance that lists a guaranteedEffectiveBalance of 1440 blocks as of a certain block of all effectiveBalance's that you are leasing. Now that would be IDEAL
|
|
|
|
rlh
|
|
April 24, 2014, 08:53:44 PM |
|
Is this the best place for all information associated with the API? Is there a better resource for all updates and calls to the API?
|
A Personal Quote on BTT from 2011: "I'd be willing to make a moderate "investment" if the value of the BTC went below $2.00. Otherwise I'll just have to live with my 5 BTC and be happy. :/" ...sigh. If only I knew.
|
|
|
freigeist
|
|
April 25, 2014, 12:21:40 AM |
|
Is this the best place for all information associated with the API? Is there a better resource for all updates and calls to the API?
Hello. There is also another thread regarding NXT API. Check this one: https://bitcointalk.org/index.php?topic=406839.0or maybe is better that you go to the nxt forum at https://nxtforum.org/Almost all NXT discussion has moved there.
|
|
|
|
rlh
|
|
April 25, 2014, 02:38:19 AM |
|
Thank you. I found the info on the Wiki (doh!) See here: http://wiki.nxtcrypto.org/wiki/Nxt_API
|
A Personal Quote on BTT from 2011: "I'd be willing to make a moderate "investment" if the value of the BTC went below $2.00. Otherwise I'll just have to live with my 5 BTC and be happy. :/" ...sigh. If only I knew.
|
|
|
kwilliams
Member
Offline
Activity: 70
Merit: 10
|
|
April 29, 2014, 02:08:11 AM |
|
Hey guys, what is the POST equivalent of this call: curl "http://my-host.com/nxt?requestType=getAccountId&secretPhrase=whatever-is-clever"
I've tried: curl --data-binary '{"requestType": "getAccountId", "secretPhrase":"whatever-is-clever"}' http://my-host.com/nxtbut it does not work
|
Note to NSA: please note in my personal file that the above comment, as well as any and all communications dating back to AOL/1993, are wholly fictitious, and are to be regarded as such. The later statement is to remain in effect until reversed by me personally in a waterboard-free questioning.
|
|
|
kwilliams
Member
Offline
Activity: 70
Merit: 10
|
|
April 29, 2014, 02:13:42 AM |
|
Never mind, found it.It turns out I just had to change the request type to POST, the parameters still travel via URL ( this is silly). In case you wonder the full command is: curl --data-binary '' "http://my-host.com/nxt?requestType=getAccountId&secretPhrase=whatever-is-clever"
|
Note to NSA: please note in my personal file that the above comment, as well as any and all communications dating back to AOL/1993, are wholly fictitious, and are to be regarded as such. The later statement is to remain in effect until reversed by me personally in a waterboard-free questioning.
|
|
|
paradigmflux
|
|
August 01, 2014, 03:05:09 PM |
|
ah. I backtraced and found where/how I did a copy/paste error.
ok so the system doesnt prevent you from doing anything dumb. will this be fixed in the future?
And it really would be useful to see the balance of assets, not just of NXT.
Core doesn't prevent from doing dumb things, client soft is supposed to do it. I'll add asset balance API. Was this ever done?
|
|
|
|
ChuckOne
Sr. Member
Offline
Activity: 364
Merit: 250
☕ NXT-4BTE-8Y4K-CDS2-6TB82
|
|
August 01, 2014, 04:20:03 PM |
|
ah. I backtraced and found where/how I did a copy/paste error.
ok so the system doesnt prevent you from doing anything dumb. will this be fixed in the future?
And it really would be useful to see the balance of assets, not just of NXT.
Core doesn't prevent from doing dumb things, client soft is supposed to do it. I'll add asset balance API. Was this ever done? Go here: http://localhost:7876/test and look for "getAccount".
|
|
|
|
|
rriky92
|
|
September 16, 2014, 11:10:12 PM |
|
We need stake holder API (AE)
|
|
|
|
beitris.dwlul
Member
Offline
Activity: 84
Merit: 10
|
|
October 02, 2014, 05:33:55 PM |
|
the blockchain was corrupt
|
|
|
|
rriky92
|
|
October 03, 2014, 09:19:30 AM |
|
the blockchain was corrupt ?? When?
|
|
|
|
|