Bitcoin Forum
April 24, 2024, 03:23:40 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 [20]  All
  Print  
Author Topic: [Nxt] API of Nxt  (Read 37217 times)
jcrubino
Member
**
Offline Offline

Activity: 83
Merit: 10


View Profile
March 02, 2014, 05:38:24 AM
 #381

Does a javascript transactions lib exist, ala bitcoinjs?
1713929020
Hero Member
*
Offline Offline

Posts: 1713929020

View Profile Personal Message (Offline)

Ignore
1713929020
Reply with quote  #2

1713929020
Report to moderator
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.
1713929020
Hero Member
*
Offline Offline

Posts: 1713929020

View Profile Personal Message (Offline)

Ignore
1713929020
Reply with quote  #2

1713929020
Report to moderator
1713929020
Hero Member
*
Offline Offline

Posts: 1713929020

View Profile Personal Message (Offline)

Ignore
1713929020
Reply with quote  #2

1713929020
Report to moderator
1713929020
Hero Member
*
Offline Offline

Posts: 1713929020

View Profile Personal Message (Offline)

Ignore
1713929020
Reply with quote  #2

1713929020
Report to moderator
l8orre
Legendary
*
Offline Offline

Activity: 1181
Merit: 1018


View Profile
March 02, 2014, 03:41:13 PM
Last edit: March 02, 2014, 04:03:58 PM by l8orre
 #382

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:7876

when 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
Full Member
***
Offline Offline

Activity: 238
Merit: 100



View Profile
March 02, 2014, 04:16:19 PM
 #383

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 Offline

Activity: 1181
Merit: 1018


View Profile
March 02, 2014, 05:13:08 PM
Last edit: March 03, 2014, 01:59:51 PM by l8orre
 #384

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 trying


sorry 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  Grin
opticalcarrier
Full Member
***
Offline Offline

Activity: 238
Merit: 100



View Profile
March 14, 2014, 04:26:32 PM
 #385

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
Hero Member
*****
Offline Offline

Activity: 804
Merit: 1004


View Profile
April 24, 2014, 08:53:44 PM
 #386

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
Hero Member
*****
Offline Offline

Activity: 1107
Merit: 534


View Profile
April 25, 2014, 12:21:40 AM
 #387

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.0

or maybe is better that you go to the nxt forum at
https://nxtforum.org/

Almost all NXT discussion has moved there.



rlh
Hero Member
*****
Offline Offline

Activity: 804
Merit: 1004


View Profile
April 25, 2014, 02:38:19 AM
 #388

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 Offline

Activity: 70
Merit: 10


View Profile
April 29, 2014, 02:08:11 AM
 #389

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/nxt

but 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 Offline

Activity: 70
Merit: 10


View Profile
April 29, 2014, 02:13:42 AM
 #390

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
Sr. Member
****
Offline Offline

Activity: 378
Merit: 254

small fry


View Profile WWW
August 01, 2014, 03:05:09 PM
 #391

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?

---
NXT Multipool! Mine Scrypt, SHA, Keccak or X11 for NXT! http://hashrate.org
http://hashrate.org/getting_started for port info!
ChuckOne
Sr. Member
****
Offline Offline

Activity: 364
Merit: 250

☕ NXT-4BTE-8Y4K-CDS2-6TB82


View Profile
August 01, 2014, 04:20:03 PM
 #392

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".
pocesar
Member
**
Offline Offline

Activity: 105
Merit: 10


View Profile WWW
September 11, 2014, 06:59:48 AM
 #393

I created one, just finishing browser support https://github.com/pocesar/node-nxt-api

https://github.com/pocesar - BTC 1KLRAFHGGhE2WiRASkASatvMR1vALmkB9L
rriky92
Sr. Member
****
Offline Offline

Activity: 294
Merit: 250



View Profile WWW
September 16, 2014, 11:10:12 PM
 #394

We need stake holder API (AE)  Grin
beitris.dwlul
Member
**
Offline Offline

Activity: 84
Merit: 10


View Profile
October 02, 2014, 05:33:55 PM
 #395

the blockchain was corrupt  Angry

rriky92
Sr. Member
****
Offline Offline

Activity: 294
Merit: 250



View Profile WWW
October 03, 2014, 09:19:30 AM
 #396

the blockchain was corrupt  Angry

?? When?
Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 [20]  All
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!