ferment
Full Member
Offline
Activity: 168
Merit: 100
IDEX - LIVE Real-time DEX
|
|
January 09, 2014, 02:02:27 PM |
|
We r planning to create other API. Old API will be called Legacy API and become obsolete. New API will be split to 2 parts - Low-level API and High-level API. If u r planning to write a client software u could start a thread to discuss what LL and HL API calls u need.
https://bitcointalk.org/index.php?topic=406839
|
|
|
|
Come-from-Beyond
Legendary
Offline
Activity: 2142
Merit: 1010
Newbie
|
|
January 09, 2014, 02:03:43 PM |
|
What's the ETA for these new APIs?
Depends on how fast client devs decide what they need and how this should look.
|
|
|
|
marcus03
|
|
January 09, 2014, 03:19:51 PM |
|
What would be a good approach to cleanup orphan blocks and their transactions on the client side?
Right now, I would make a list of all blocks, then walk down the chain from the highest block and remove these blocks in the chain from my list. The remaining blocks in the list would be the orphan blocks and would need to be deleted.
Is there a better approach? Like is there or could there been an API call that would return all block ids that NRS knows are orphans?
|
|
|
|
Come-from-Beyond
Legendary
Offline
Activity: 2142
Merit: 1010
Newbie
|
|
January 09, 2014, 03:22:20 PM |
|
What would be a good approach to cleanup orphan blocks and their transactions on the client side?
Right now, I would make a list of all blocks, then walk down the chain from the highest block and remove these blocks in the chain from my list. The remaining blocks in the list would be the orphan blocks and would need to be deleted.
Is there a better approach? Like is there or could there been an API call that would return all block ids that NRS knows are orphans?
Post this idea in that new thread plz.
|
|
|
|
marcus03
|
|
January 10, 2014, 08:55:33 AM |
|
I'm posting this here again, since I would really like to have this implemented in the v1 API in one of the next NRS versions and not wait until v2 of the API.
What takes most of the time is when my client updates from NRS is getting the updated confirmation counts for transactions with less than 720 confirmations, because there are lots of back and forth calls since you have to call getTransaction again and again over a lot of transactions.
Would be nice to have some kind of batch mode, so e.g. send me all confirmations counts for all transactions that are in block x. Or block x to y. Or block x,y,z, etc. with just one request.
|
|
|
|
marcus03
|
|
January 11, 2014, 09:43:36 AM |
|
Can the number of transaction confirmations only change when there is a new block? Or can it change "between blocks"?
|
|
|
|
Come-from-Beyond
Legendary
Offline
Activity: 2142
Merit: 1010
Newbie
|
|
January 11, 2014, 09:46:02 AM |
|
Can the number of transaction confirmations only change when there is a new block? Or can it change "between blocks"?
Only new blocks or chain reorgs can change the number.
|
|
|
|
hiksush2
Newbie
Offline
Activity: 12
Merit: 0
|
|
January 12, 2014, 04:08:41 AM |
|
Is there a way to get a list of all the accounts?
Thanks!
Yes, this can be done via blockchain scanning. Let me know if u need a special API call for that. I'd definitely like an API call that would return all accounts. For blockchain scanning, what is the process to get all accounts? A quick look at blocks.nxt (12MB) shows only ~300 unique generatorPublicKey's, and transactions.nxt (also 12MB) has about ~3500 unique accounts. The blockchain explorer says "Accounts: 13919" and lists lots of new accounts being added though.
|
|
|
|
ferment
Full Member
Offline
Activity: 168
Merit: 100
IDEX - LIVE Real-time DEX
|
|
January 12, 2014, 12:51:44 PM |
|
Is there a way to get a list of all the accounts?
Thanks!
Yes, this can be done via blockchain scanning. Let me know if u need a special API call for that. I'd definitely like an API call that would return all accounts. For blockchain scanning, what is the process to get all accounts? A quick look at blocks.nxt (12MB) shows only ~300 unique generatorPublicKey's, and transactions.nxt (also 12MB) has about ~3500 unique accounts. The blockchain explorer says "Accounts: 13919" and lists lots of new accounts being added though. Get a unique list of the recipients of all transactions of all blocks.
|
|
|
|
abuelau
|
|
January 12, 2014, 01:30:01 PM |
|
Given a transaction, what is the best way to know if that transaction is related to an ALIAS or AM?
|
|
|
|
Come-from-Beyond
Legendary
Offline
Activity: 2142
Merit: 1010
Newbie
|
|
January 12, 2014, 01:30:57 PM |
|
Given a transaction, what is the best way to know if that transaction is related to an ALIAS or AM?
"subtype"
|
|
|
|
abuelau
|
|
January 12, 2014, 02:14:01 PM |
|
Given a transaction, what is the best way to know if that transaction is related to an ALIAS or AM?
"subtype" Is the AM subtype = 2?
|
|
|
|
Come-from-Beyond
Legendary
Offline
Activity: 2142
Merit: 1010
Newbie
|
|
January 12, 2014, 02:33:22 PM |
|
Given a transaction, what is the best way to know if that transaction is related to an ALIAS or AM?
"subtype" Is the AM subtype = 2? = 0 PS: type = 1
|
|
|
|
abuelau
|
|
January 12, 2014, 03:33:46 PM |
|
Given a transaction, what is the best way to know if that transaction is related to an ALIAS or AM?
"subtype" Is the AM subtype = 2? = 0 PS: type = 1 So is this right: Regular Tx: type=type=0, subtype=0 Alias Tx: type= type=1, subtype=1 AM Tx: type=1, subtype=0
|
|
|
|
Come-from-Beyond
Legendary
Offline
Activity: 2142
Merit: 1010
Newbie
|
|
January 12, 2014, 03:35:52 PM |
|
Given a transaction, what is the best way to know if that transaction is related to an ALIAS or AM?
"subtype" Is the AM subtype = 2? = 0 PS: type = 1 So is this right: Regular Tx: type=type=0, subtype=0 Alias Tx: type= type=1, subtype=1 AM Tx: type=1, subtype=0 Yes, http://localhost:7874/nxt?requestType=getConstants gives description.
|
|
|
|
marcus03
|
|
January 13, 2014, 06:11:42 PM |
|
I'm having some trouble with the secretPhrase parameter. How should parameters be encoded?
I'm using UTF-8 and URL encoding so, e.g. the secret öäü (german umlaut characters) would be öäü in UTF-8 and that would be urlencoded to %C3%83%C2%B6%C3%83%C2%A4%C3%83%C2%BC resulting in:
http://..../nxt?requestType=sendMoney&secretPhrase=%C3%83%C2%B6%C3%83%C2%A4%C3%83%C2%BC&recipient=...
Anything wrong with that?
|
|
|
|
marcus03
|
|
January 13, 2014, 07:04:40 PM |
|
I'm having some trouble with the secretPhrase parameter. How should parameters be encoded?
I'm using UTF-8 and URL encoding so, e.g. the secret öäü (german umlaut characters) would be öäü in UTF-8 and that would be urlencoded to %C3%83%C2%B6%C3%83%C2%A4%C3%83%C2%BC resulting in:
http://..../nxt?requestType=sendMoney&secretPhrase=%C3%83%C2%B6%C3%83%C2%A4%C3%83%C2%BC&recipient=...
Anything wrong with that?
Got it to work. Had a problem with in my URL encoder.
|
|
|
|
l8orre
Legendary
Offline
Activity: 1181
Merit: 1018
|
|
January 13, 2014, 08:11:47 PM |
|
hoi marcus03 - as you mention urlencoder - I am using python 'requests' - works nice. What are you using?
Cheers
|
|
|
|
GCInc.
|
|
January 13, 2014, 11:50:07 PM |
|
We have made a bunch of transactions that have received the transactionbytes. Deadline 7200 minutes, not even near of expiring, yet somehow these transactions are not pushed through even when others are. They receive the same transaction id and transactionbytes every time for days but do not go through. We are wary of resending them before deadline instead of rebroadcasting for the fear of double spending. Any ideas?
|
|
|
|
rriky92
|
|
January 14, 2014, 01:25:24 AM |
|
what are the Arbitrary Message API?
|
|
|
|
|