Pages:
Author

Topic: [Nxt] API of Nxt - page 9. (Read 37374 times)

full member
Activity: 224
Merit: 100
January 13, 2014, 01: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?
legendary
Activity: 2142
Merit: 1010
Newbie
January 12, 2014, 10:35:52 AM
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.
hero member
Activity: 750
Merit: 500
www.coinschedule.com
January 12, 2014, 10:33:46 AM
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

legendary
Activity: 2142
Merit: 1010
Newbie
January 12, 2014, 09:33:22 AM
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
hero member
Activity: 750
Merit: 500
www.coinschedule.com
January 12, 2014, 09:14:01 AM
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?
legendary
Activity: 2142
Merit: 1010
Newbie
January 12, 2014, 08:30:57 AM
Given a transaction, what is the best way to know if that transaction is related to an ALIAS or AM?

"subtype"
hero member
Activity: 750
Merit: 500
www.coinschedule.com
January 12, 2014, 08:30:01 AM
Given a transaction, what is the best way to know if that transaction is related to an ALIAS or AM?
full member
Activity: 168
Merit: 100
IDEX - LIVE Real-time DEX
January 12, 2014, 07:51:44 AM
Is there a way to get a list of all the accounts?

Thanks!

Yes, this can be done via blockchain scanning. Smiley

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.
newbie
Activity: 12
Merit: 0
January 11, 2014, 11:08:41 PM
Is there a way to get a list of all the accounts?

Thanks!

Yes, this can be done via blockchain scanning. Smiley

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.
legendary
Activity: 2142
Merit: 1010
Newbie
January 11, 2014, 04: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.
full member
Activity: 224
Merit: 100
January 11, 2014, 04:43:36 AM
Can the number of transaction confirmations only change when there is a new block? Or can it change "between blocks"?
full member
Activity: 224
Merit: 100
January 10, 2014, 03: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.

legendary
Activity: 2142
Merit: 1010
Newbie
January 09, 2014, 10:22:20 AM
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.
full member
Activity: 224
Merit: 100
January 09, 2014, 10:19:51 AM
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?
legendary
Activity: 2142
Merit: 1010
Newbie
January 09, 2014, 09:03:43 AM
What's the ETA for these new APIs?

Depends on how fast client devs decide what they need and how this should look.
full member
Activity: 168
Merit: 100
IDEX - LIVE Real-time DEX
January 09, 2014, 09:02:27 AM

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://bitcointalksearch.org/topic/nxt-api-2-brainstorming-406839
hero member
Activity: 750
Merit: 500
www.coinschedule.com
January 09, 2014, 08:37:42 AM
-remove a peer
-handle block generation
-generate tokens

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.

What's the ETA for these new APIs?
legendary
Activity: 2142
Merit: 1010
Newbie
January 09, 2014, 07:59:45 AM
-remove a peer
-handle block generation
-generate tokens

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.
full member
Activity: 168
Merit: 100
IDEX - LIVE Real-time DEX
January 09, 2014, 07:55:53 AM

NRS = Nxt Reference Software, it's the whitepaper written in Java.
It has 2 parts - server (as a Java servlet) and client (as HTML-files).

What do you call the parts of the Servlet that support the HTML like getInitialData, unLockAccount, etc?

I see 3 parts really: NRS, Client Servlet, and Client HTML.


Client HTTP requests.

Is there a plan for NRS APIs that handle these things?

-remove a peer
-handle block generation
-generate tokens




legendary
Activity: 2142
Merit: 1010
Newbie
January 09, 2014, 07:48:37 AM

NRS = Nxt Reference Software, it's the whitepaper written in Java.
It has 2 parts - server (as a Java servlet) and client (as HTML-files).

What do you call the parts of the Servlet that support the HTML like getInitialData, unLockAccount, etc?

I see 3 parts really: NRS, Client Servlet, and Client HTML.


Client HTTP requests.
Pages:
Jump to: