Bitcoin Forum
March 28, 2024, 07:06:24 PM *
News: Latest Bitcoin Core release: 26.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 37208 times)
Come-from-Beyond
Legendary
*
Offline Offline

Activity: 2142
Merit: 1009

Newbie


View Profile
January 02, 2014, 10:57:49 AM
 #161

Can we get a "getCommands" command that returns the list of commands?

It's quite pointless to have this in core soft if we can have it in Wiki.
1711652784
Hero Member
*
Offline Offline

Posts: 1711652784

View Profile Personal Message (Offline)

Ignore
1711652784
Reply with quote  #2

1711652784
Report to moderator
1711652784
Hero Member
*
Offline Offline

Posts: 1711652784

View Profile Personal Message (Offline)

Ignore
1711652784
Reply with quote  #2

1711652784
Report to moderator
"Bitcoin: the cutting edge of begging technology." -- Giraffe.BTC
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1711652784
Hero Member
*
Offline Offline

Posts: 1711652784

View Profile Personal Message (Offline)

Ignore
1711652784
Reply with quote  #2

1711652784
Report to moderator
1711652784
Hero Member
*
Offline Offline

Posts: 1711652784

View Profile Personal Message (Offline)

Ignore
1711652784
Reply with quote  #2

1711652784
Report to moderator
marcus03
Full Member
***
Offline Offline

Activity: 224
Merit: 100


View Profile
January 02, 2014, 11:04:02 AM
 #162

Can we get a "getCommands" command that returns the list of commands?

It's quite pointless to have this in core soft if we can have it in Wiki.

I would like to write a generic GUI for the API.

My program would call "getCommands", then call each command without a parameter, then look into the error message returned to find the needed parameters and then build a GUI with a command selector and parameter input boxes with their names attached to them.
proinside
Newbie
*
Offline Offline

Activity: 23
Merit: 0


View Profile
January 02, 2014, 11:09:31 AM
 #163

Can we get a "getCommands" command that returns the list of commands?

It's quite pointless to have this in core soft if we can have it in Wiki.

Just add a help command which gives help and valid commands. After all this is indeed best practise in coding to have an command to get help and/or help to single commands callable. Refusing such a trivial thing is actually not good to get developers on track with you.
Come-from-Beyond
Legendary
*
Offline Offline

Activity: 2142
Merit: 1009

Newbie


View Profile
January 02, 2014, 11:19:19 AM
 #164

We could do it for API v2.
proinside
Newbie
*
Offline Offline

Activity: 23
Merit: 0


View Profile
January 02, 2014, 11:42:21 AM
 #165

We could do it for API v2.

Would recommend you guys to do it now. Dont be sorry later. Missing CLI help or api help smells like really bad practise and bad documentation...
virtualdn
Legendary
*
Offline Offline

Activity: 1358
Merit: 1093


View Profile
January 02, 2014, 11:44:50 AM
 #166

is there a method for uninstalling this? i had to format my computer to do it.

1 BTC = 1 BTC
Vega
Hero Member
*****
Offline Offline

Activity: 739
Merit: 500



View Profile
January 02, 2014, 12:03:47 PM
 #167

is there a method for uninstalling this? i had to format my computer to do it.

Good job. You should also smash the HDD with a hammer just to be sure.
marcus03
Full Member
***
Offline Offline

Activity: 224
Merit: 100


View Profile
January 02, 2014, 03:41:45 PM
 #168

Slightly OT:

If 2680262203532249785 is called the genesis block, what is the account 1739068987193023818 called (the one with the negative balance)?

Come-from-Beyond
Legendary
*
Offline Offline

Activity: 2142
Merit: 1009

Newbie


View Profile
January 02, 2014, 04:56:40 PM
 #169

Slightly OT:

If 2680262203532249785 is called the genesis block, what is the account 1739068987193023818 called (the one with the negative balance)?



It's the genesis account. It's used to destroy coins.
landomata
Legendary
*
Offline Offline

Activity: 2184
Merit: 1000


View Profile WWW
January 02, 2014, 04:58:56 PM
 #170

Slightly OT:

If 2680262203532249785 is called the genesis block, what is the account 1739068987193023818 called (the one with the negative balance)?



It's the genesis account. It's used to destroy coins.

are you able to find the thread...it no longer exist?

Come-from-Beyond
Legendary
*
Offline Offline

Activity: 2142
Merit: 1009

Newbie


View Profile
January 02, 2014, 05:00:20 PM
 #171

are you able to find the thread...it no longer exist?

What thread?
landomata
Legendary
*
Offline Offline

Activity: 2184
Merit: 1000


View Profile WWW
January 02, 2014, 05:01:09 PM
 #172

are you able to find the thread...it no longer exist?

What thread?

Discendant of bitcoin

kjannis
Newbie
*
Offline Offline

Activity: 20
Merit: 0


View Profile
January 02, 2014, 05:14:46 PM
 #173

When I start 0.4.8, I get 2 blacklisted peers:
95.85.22.142 and 78.46.63.221

Where can I add new peers?
lr127
Newbie
*
Offline Offline

Activity: 35
Merit: 0


View Profile
January 03, 2014, 07:29:25 AM
 #174

Come-from-Beyond
I can not find a way to get a transaction id for an alias. This is not possible? 
I looked at GET & POST APIs. Nothing.
Come-from-Beyond
Legendary
*
Offline Offline

Activity: 2142
Merit: 1009

Newbie


View Profile
January 03, 2014, 07:31:07 AM
 #175

Come-from-Beyond
I can not find a way to get a transaction id for an alias. This is not possible?  
I looked at GET & POST APIs. Nothing.

This can be done with getAccountTransactionIds and getTransaction. getTransaction returns transaction data, u should check ones with type == 1 and subtype == 1.
If u don't know the account then u r supposed to scan the whole blockchain.
marcus03
Full Member
***
Offline Offline

Activity: 224
Merit: 100


View Profile
January 03, 2014, 08:12:13 AM
 #176

(Copied over from the main thread for reference.)

How to find the account that will forge the next block.


1. Do http://localhost:7874/nxt?requestType=getState to get value of "lastBlock"
2. Do http://localhost:7874/nxt?requestType=getBlock&block=10621696942372068326 (assuming 10621696942372068326 is the value of "lastBlock")
3. Convert "generationSignature" into binary and append public key bytes returned by getAccountPublicKey
4. Calculate SHA256(generationSignature, publicKey)
5. First 8 bytes as unsigned long in little-endian notation is HIT
6. Value of "baseTarget" multiplied by effective balance of the account is STATIC_TARGET
7. Do steps 3-6 for each account and find the one with lowest HIT/STATIC_TARGET ratio, this account will forge next block

newcn
Full Member
***
Offline Offline

Activity: 143
Merit: 100


View Profile
January 04, 2014, 05:21:23 AM
 #177

hello,
   I am thinking about a way to secure my account for the time being. If I generate an account ID outside nxt client(just use sha256/curve25519 to generate account id, not logon to the client), and send my NXTs to this account, is it safer or more dangerous than the ordinary way?
   In this case, even the nxt client don't know my privatekey/publickey, it should be safer. However, since the accountid is only 64 bits interger, the probability of collision is much higher than 256 bits publickey. I read from other threads that when a new passphrase is log on, the system will check the publickey to avoid the conincidence of collision. But in my case, I generate the account outside nxt client, there's no corresponding public key exist in the system, what if a person logon later with different passwd but the accountid happen to be the same as mine? does my balance all go to his account?

BTC:1NzzfeHCgN8fF6mSG1UeBFCVd2cxKbGyHk
NXT:13187911577562526278
Come-from-Beyond
Legendary
*
Offline Offline

Activity: 2142
Merit: 1009

Newbie


View Profile
January 04, 2014, 06:17:13 AM
 #178

hello,
   I am thinking about a way to secure my account for the time being. If I generate an account ID outside nxt client(just use sha256/curve25519 to generate account id, not logon to the client), and send my NXTs to this account, is it safer or more dangerous than the ordinary way?
   In this case, even the nxt client don't know my privatekey/publickey, it should be safer. However, since the accountid is only 64 bits interger, the probability of collision is much higher than 256 bits publickey. I read from other threads that when a new passphrase is log on, the system will check the publickey to avoid the conincidence of collision. But in my case, I generate the account outside nxt client, there's no corresponding public key exist in the system, what if a person logon later with different passwd but the accountid happen to be the same as mine? does my balance all go to his account?

Yes, ur balance will go to that account.
marcus03
Full Member
***
Offline Offline

Activity: 224
Merit: 100


View Profile
January 04, 2014, 12:43:11 PM
 #179

I plan to implement TF in my client and I have two questions:

1.) There are no transactions that transfer earned fees to an account, right? So, if I would want to calculate the balance for an account, I would need to sum up all transaction from/to this account, plus I would need to look at each block to see if this account is the generator for the block and then add the fees in this block to the account balance. Right?

2.) It was said that an account that has no public key in the BC yet (no outgoing transactions) was more prone to a brute force attack. Could anyone explan why? I didn't get it. My idea is that a brute force attack works like this: dictionary words or random input generates a public and private key pair, the latter being the account number. I see no difference in the chances of finding an existing account number when using this procedure depending on if the public key is in the bc or not.  Huh

Thanks for your help!
Marcus
Come-from-Beyond
Legendary
*
Offline Offline

Activity: 2142
Merit: 1009

Newbie


View Profile
January 04, 2014, 12:50:01 PM
 #180

1.) There are no transactions that transfer earned fees to an account, right? So, if I would want to calculate the balance for an account, I would need to sum up all transaction from/to this account, plus I would need to look at each block to see if this account is the generator for the block and then add the fees in this block to the account balance. Right?

Right.


2.) It was said that an account that has no public key in the BC yet (no outgoing transactions) was more prone to a brute force attack. Could anyone explan why? I didn't get it. My idea is that a brute force attack works like this: dictionary words or random input generates a public and private key pair, the latter being the account number. I see no difference in the chances of finding an existing account number when using this procedure depending on if the public key is in the bc or not.  Huh

Search space for unrevealed key is only 2^64.
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!