Come-from-Beyond
Legendary
Offline
Activity: 2142
Merit: 1010
Newbie
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
December 26, 2013, 10:16:53 AM |
|
I have a NXT exchange built for you guys.
I have one missing link: generating NXT accounts from secrets.
I do curve25519hex(shaValue256(secretKey)) but this generates an alphanumerical hex, not a pure numerical account prevalent in NXT.
How do I generate accounts?
http://localhost:7874/nxt?requestType=getAccountId&secretPhrase=MYSECRETEdit: U could also take first 8 bytes and convert into unsinged long using little-endian notation.
|
|
|
|
datz
Sr. Member
![*](https://bitcointalk.org/Themes/custom1/images/star.gif) ![*](https://bitcointalk.org/Themes/custom1/images/star.gif) ![*](https://bitcointalk.org/Themes/custom1/images/star.gif)
Offline
Activity: 295
Merit: 250
"to survive, we must live and fly"
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
December 26, 2013, 10:29:04 AM |
|
great. now how can I tell if an address is a valid NXT address just from the address - no API calls?
|
|
|
|
|
|
datz
Sr. Member
![*](https://bitcointalk.org/Themes/custom1/images/star.gif) ![*](https://bitcointalk.org/Themes/custom1/images/star.gif) ![*](https://bitcointalk.org/Themes/custom1/images/star.gif)
Offline
Activity: 295
Merit: 250
"to survive, we must live and fly"
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
December 26, 2013, 11:25:32 AM |
|
Cool. We are good to go, ready to provide exchange services for NXT.
|
|
|
|
newcn
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
December 26, 2013, 11:44:40 AM |
|
hello, I just made a statistic about all account's balance using API request. the total number is strange. I start from the most recent block, and follow the 'previousBlock', go all the way down until 'previousBlock'=None, and check transactions in each block, remember the 'sender' and ' receipient'. then use getBalance api to get balance of each,and sumup all accounts's balance. the number of accounts I got is 4205, which is the same as the output of getState.(when block height=25004) but the total balance number is 18579288365! I also find 2 accounts' balance is less than 0: 7577840883495855927 -999997985 15874940801139996458 -999997985 But I checked on http://87.230.14.1/nxt/nxt.cgi?action=10these 2 accounts are ok. did I make some mistakes, or is there a bug in the client/API?
|
BTC:1NzzfeHCgN8fF6mSG1UeBFCVd2cxKbGyHk NXT:13187911577562526278
|
|
|
nexern
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
December 26, 2013, 12:01:18 PM |
|
hello, I just made a statistic about all account's balance using API request. the total number is strange. I start from the most recent block, and follow the 'previousBlock', go all the way down until 'previousBlock'=None, and check transactions in each block, remember the 'sender' and ' receipient'. then use getBalance api to get balance of each,and sumup all accounts's balance. the number of accounts I got is 4205, which is the same as the output of getState.(when block height=25004) but the total balance number is 18579288365! I also find 2 accounts' balance is less than 0: 7577840883495855927 -999997985 15874940801139996458 -999997985 But I checked on http://87.230.14.1/nxt/nxt.cgi?action=10these 2 accounts are ok. did I make some mistakes, or is there a bug in the client/API? hi nwecn, you ar right, the blockexplorer is under constant attack to the node and also by automated query request. the resulting database reorganization from this attacks de-sync's the db. therefore i wrote a note on top. i am working to stop at least the query flooding as soon as possible. when done, it should be synced again.
|
|
|
|
datz
Sr. Member
![*](https://bitcointalk.org/Themes/custom1/images/star.gif) ![*](https://bitcointalk.org/Themes/custom1/images/star.gif) ![*](https://bitcointalk.org/Themes/custom1/images/star.gif)
Offline
Activity: 295
Merit: 250
"to survive, we must live and fly"
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
December 26, 2013, 07:48:37 PM |
|
|
|
|
|
Come-from-Beyond
Legendary
Offline
Activity: 2142
Merit: 1010
Newbie
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
December 26, 2013, 07:50:10 PM |
|
U r on a wrong branch. I see {"transactionIds":["15609747835883025669"]}
|
|
|
|
datz
Sr. Member
![*](https://bitcointalk.org/Themes/custom1/images/star.gif) ![*](https://bitcointalk.org/Themes/custom1/images/star.gif) ![*](https://bitcointalk.org/Themes/custom1/images/star.gif)
Offline
Activity: 295
Merit: 250
"to survive, we must live and fly"
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
December 26, 2013, 07:51:30 PM |
|
U r on a wrong branch. I see {"transactionIds":["15609747835883025669"]} How do I get on the right branch?
|
|
|
|
datz
Sr. Member
![*](https://bitcointalk.org/Themes/custom1/images/star.gif) ![*](https://bitcointalk.org/Themes/custom1/images/star.gif) ![*](https://bitcointalk.org/Themes/custom1/images/star.gif)
Offline
Activity: 295
Merit: 250
"to survive, we must live and fly"
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
December 26, 2013, 07:53:41 PM |
|
|
|
|
|
Come-from-Beyond
Legendary
Offline
Activity: 2142
Merit: 1010
Newbie
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
December 26, 2013, 07:59:01 PM |
|
How do I get on the right branch?
Delete *.nxt files and launch again.
|
|
|
|
lr127
Newbie
Offline
Activity: 35
Merit: 0
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
December 27, 2013, 11:25:20 AM |
|
Come-from-BeyondGET-requests to remote peers does not work in version 0.4.7e. Answer: "Not allowed". The problem is - "allowedBotHosts" in web.xml & NRS code. This temporarily or permanently? I am developing a mobile client and it all seriously hampered. ![Sad](https://bitcointalk.org/Smileys/default/sad.gif) Are there any root hosts that accept such requests and will take them in the future?
|
|
|
|
Come-from-Beyond
Legendary
Offline
Activity: 2142
Merit: 1010
Newbie
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
December 27, 2013, 11:27:24 AM |
|
Come-from-BeyondGET-requests to remote peers does not work in version 0.4.7e. Answer: "Not allowed". The problem is - "allowedBotHosts" in web.xml & NRS code. This temporarily or permanently? I am developing a mobile client and it all seriously hampered. ![Sad](https://bitcointalk.org/Smileys/default/sad.gif) Are there any root hosts that accept such requests and will take them in the future? U should ask community in main Nxt thread for list of hosts who allow access to API calls.
|
|
|
|
Lubliana
Newbie
Offline
Activity: 24
Merit: 0
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
December 27, 2013, 03:52:32 PM |
|
I keep getting {"errorCode":4,"errorDescription":"Incorrect \"timestamp\""}
When trying to use requestType=getAccountTransactionIds
on version 0.4.7e, i tried different timestamps 0, -1, real timestamp
nothing works
|
|
|
|
Come-from-Beyond
Legendary
Offline
Activity: 2142
Merit: 1010
Newbie
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
December 27, 2013, 03:56:03 PM |
|
I keep getting {"errorCode":4,"errorDescription":"Incorrect \"timestamp\""}
When trying to use requestType=getAccountTransactionIds
on version 0.4.7e, i tried different timestamps 0, -1, real timestamp
nothing works
What exactly ur request is?
|
|
|
|
|
Come-from-Beyond
Legendary
Offline
Activity: 2142
Merit: 1010
Newbie
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
December 27, 2013, 04:41:30 PM |
|
Did you change anything?
No. And it works: {"transactionIds":["16327828505285932473","7776315672991437607","7478358102654400317","9038949217488707578","5107797978721572291","3056041568658981150","13938595992812911398","5860553720038071526","14088864536744330557","98233104059687517","3708542302478143606","11723261810965383682","8480031398450915391","4637952893059799971","4278983739975323329","11578788549066895383","17355434458110030026","15327384437462965022","11518685970067256485","6225568623338018976","5358668617356551382","7334304928632209196","11321968978650279956","14554751727556954823","96427141454859614"]} Rename *.bak files to *.nxt, maybe ur copy of blockchain is inconsistent.
|
|
|
|
ferment
Full Member
![*](https://bitcointalk.org/Themes/custom1/images/star.gif) ![*](https://bitcointalk.org/Themes/custom1/images/star.gif)
Offline
Activity: 168
Merit: 100
IDEX - LIVE Real-time DEX
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
December 27, 2013, 07:00:13 PM |
|
Are there any root hosts that accept such requests and will take them in the future?
U should ask community in main Nxt thread for list of hosts who allow access to API calls. These are open for User and Bot. node1.nxtbase.com; node11.nxtbase.com; node21.nxtbase.com; node31.nxtbase.com; node41.nxtbase.com; node51.nxtbase.com; node61.nxtbase.com; node71.nxtbase.com; node81.nxtbase.com; node91.nxtbase.com;
|
|
|
|
Lubliana
Newbie
Offline
Activity: 24
Merit: 0
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
December 27, 2013, 09:29:55 PM |
|
Did you change anything?
No. And it works: {"transactionIds":["16327828505285932473","7776315672991437607","7478358102654400317","9038949217488707578","5107797978721572291","3056041568658981150","13938595992812911398","5860553720038071526","14088864536744330557","98233104059687517","3708542302478143606","11723261810965383682","8480031398450915391","4637952893059799971","4278983739975323329","11578788549066895383","17355434458110030026","15327384437462965022","11518685970067256485","6225568623338018976","5358668617356551382","7334304928632209196","11321968978650279956","14554751727556954823","96427141454859614"]} Rename *.bak files to *.nxt, maybe ur copy of blockchain is inconsistent. You were right, the blockchain was corrupt. Version 0.4.7e is really stable, good job
|
|
|
|
|