marcus03
|
|
February 12, 2014, 05:16:19 PM |
|
Fullfilled orders are immediately deleted from the system, right? So no way to show the seller and buyer account for a trade?
Right. Use getTransaction and feed orderId as transactionId. Works! :-) Thanks again!
|
|
|
|
|
Come-from-Beyond
Legendary
Offline
Activity: 2142
Merit: 1010
Newbie
|
|
February 13, 2014, 05:30:59 AM |
|
Yes, u use different accounts in ur requests.
|
|
|
|
newcn
|
|
February 13, 2014, 06:30:16 AM |
|
Yes, u use different accounts in ur requests. I'm sorry for the mistake! I checked it and it's ok. another question: Is there a way to get blockid by block_height directly? sometimes I need to start from the genenesis block to access each block in an increasing order, currently I have to start from the most recent block and follow the "previousBlock" to reach the genesis block, store all blockids in an array, and then restart the loop. this can also be solved by adding an alternative parameter to getBlock request: getBlock&blockheight=XXX
|
BTC:1NzzfeHCgN8fF6mSG1UeBFCVd2cxKbGyHk NXT:13187911577562526278
|
|
|
Come-from-Beyond
Legendary
Offline
Activity: 2142
Merit: 1010
Newbie
|
|
February 13, 2014, 06:39:51 AM |
|
Is there a way to get blockid by block_height directly?
Not sure, have to check it.
|
|
|
|
marcus03
|
|
February 14, 2014, 07:38:47 AM |
|
Can you give as a preview of the changes in the existing API for using fees smaller than 1 NTX?
Currently only the API result for balances and the API parameters for asset prices are in cent.
Will all amounts (fees, nxt amounts) change to cents in the API calls and results or just the fees?
Will you introduce new requestTypes like "sendMessage2" that accepts the fee in cents or will the meaning of the fee in the old requestTypes actually change?
|
|
|
|
Come-from-Beyond
Legendary
Offline
Activity: 2142
Merit: 1010
Newbie
|
|
February 14, 2014, 07:43:16 AM |
|
Can you give as a preview of the changes in the existing API for using fees smaller than 1 NTX?
Currently only the API result for balances and the API parameters for asset prices are in cent.
Will all amounts (fees, nxt amounts) change to cents in the API calls and results or just the fees?
Will you introduce new requestTypes like "sendMessage2" that accepts the fee in cents or will the meaning of the fee in the old requestTypes actually change?
I don't know how Jean-Luc will solve this problem.
|
|
|
|
syjrmswx
Newbie
Offline
Activity: 29
Merit: 0
|
|
February 16, 2014, 01:00:50 AM |
|
mark
|
|
|
|
roslinpl
Legendary
Offline
Activity: 2212
Merit: 1199
|
|
February 16, 2014, 01:06:03 AM |
|
Is there a way to get blockid by block_height directly?
Not sure, have to check it. Didnt found any way yet .. did you?
|
|
|
|
Come-from-Beyond
Legendary
Offline
Activity: 2142
Merit: 1010
Newbie
|
|
February 16, 2014, 08:25:45 AM |
|
Is there a way to get blockid by block_height directly?
Not sure, have to check it. Didnt found any way yet .. did you? No, Jean-Luc rewritten the code completely. I need more time to become familiar with the code.
|
|
|
|
abuelau
|
|
February 20, 2014, 10:14:32 AM |
|
Questions regarding the BroadCastTransaction API:
1) Can I use to it SEND NXT? 2) If I can use it to send Nxt, if the broadcast bytes are intercepted can the attacker figure out the account password from the bytes? 3) Where can I find information on how to use the BroadCastTransaction API (i.e. how to prepare the bytes??) 4) Is there any examples in javascript that show how to prepare the bytes to be sent using BroadCastTransaction?
Many thanks!
|
|
|
|
Come-from-Beyond
Legendary
Offline
Activity: 2142
Merit: 1010
Newbie
|
|
February 20, 2014, 10:39:02 AM |
|
Questions regarding the BroadCastTransaction API:
1) Can I use to it SEND NXT? 2) If I can use it to send Nxt, if the broadcast bytes are intercepted can the attacker figure out the account password from the bytes? 3) Where can I find information on how to use the BroadCastTransaction API (i.e. how to prepare the bytes??) 4) Is there any examples in javascript that show how to prepare the bytes to be sent using BroadCastTransaction?
Many thanks!
1. Yes 2. No 3. I'll add prepareTransaction and sendTransaction to be used for that 4. Bytes r returned by sendMoney, sendMessage, etc.
|
|
|
|
abuelau
|
|
February 20, 2014, 11:16:43 AM |
|
Questions regarding the BroadCastTransaction API:
1) Can I use to it SEND NXT? 2) If I can use it to send Nxt, if the broadcast bytes are intercepted can the attacker figure out the account password from the bytes? 3) Where can I find information on how to use the BroadCastTransaction API (i.e. how to prepare the bytes??) 4) Is there any examples in javascript that show how to prepare the bytes to be sent using BroadCastTransaction?
Many thanks!
1. Yes 2. No 3. I'll add prepareTransaction and sendTransaction to be used for that 4. Bytes r returned by sendMoney, sendMessage, etc. I was actually trying to figure out if there's a way for me to prepare a transaction on the client browser (using javascript) and then broadcast the transaction bytes without ever having to call the NRS API (apart of course to broadcast the transaction). So I gather that's not possible?
|
|
|
|
Come-from-Beyond
Legendary
Offline
Activity: 2142
Merit: 1010
Newbie
|
|
February 20, 2014, 11:41:18 AM |
|
Questions regarding the BroadCastTransaction API:
1) Can I use to it SEND NXT? 2) If I can use it to send Nxt, if the broadcast bytes are intercepted can the attacker figure out the account password from the bytes? 3) Where can I find information on how to use the BroadCastTransaction API (i.e. how to prepare the bytes??) 4) Is there any examples in javascript that show how to prepare the bytes to be sent using BroadCastTransaction?
Many thanks!
1. Yes 2. No 3. I'll add prepareTransaction and sendTransaction to be used for that 4. Bytes r returned by sendMoney, sendMessage, etc. I was actually trying to figure out if there's a way for me to prepare a transaction on the client browser (using javascript) and then broadcast the transaction bytes without ever having to call the NRS API (apart of course to broadcast the transaction). So I gather that's not possible? U can do it but u have to build transaction bytes by urself. What types/subtypes of transactions do u need?
|
|
|
|
abuelau
|
|
February 20, 2014, 12:51:20 PM |
|
Questions regarding the BroadCastTransaction API:
1) Can I use to it SEND NXT? 2) If I can use it to send Nxt, if the broadcast bytes are intercepted can the attacker figure out the account password from the bytes? 3) Where can I find information on how to use the BroadCastTransaction API (i.e. how to prepare the bytes??) 4) Is there any examples in javascript that show how to prepare the bytes to be sent using BroadCastTransaction?
Many thanks!
1. Yes 2. No 3. I'll add prepareTransaction and sendTransaction to be used for that 4. Bytes r returned by sendMoney, sendMessage, etc. I was actually trying to figure out if there's a way for me to prepare a transaction on the client browser (using javascript) and then broadcast the transaction bytes without ever having to call the NRS API (apart of course to broadcast the transaction). So I gather that's not possible? U can do it but u have to build transaction bytes by urself. What types/subtypes of transactions do u need? The only one I need right now is SEND NXT.
|
|
|
|
Come-from-Beyond
Legendary
Offline
Activity: 2142
Merit: 1010
Newbie
|
|
February 20, 2014, 02:06:48 PM |
|
The only one I need right now is SEND NXT.
All numbers r little-endian. 01 B - type (00) 01 B - subtype (00) 04 B - timestamp (671e7400) 02 B - deadline (3c00) 32 B - sender public key (b1c9e22befa06aee2eb0ac2d13ad03df02abf7cdd5fb8c9903b74f65819eb84d) 08 B - recipient (252ab2f000b58ef7) 04 B - amount (e8030000) 04 B - fee (01000000) 08 B - referenced transaction (0000000000000000) 64 B - signature (a56d7368c792df694c72fcaf731544c4b710c9de4e906105cdb25b15fc10d1052c9fac66383c553 6500cea0782db28535c25095758029cb4d465b13f8850cf1e) I used transaction 1360173339660761930 as the example ( http://localhost:7874/nxt?requestType=getTransactionBytes&transaction=1360173339660761930) NB: Before signing u must replace signature with ZEROs and sign the whole 128 bytes.
|
|
|
|
abuelau
|
|
February 20, 2014, 02:11:46 PM |
|
The only one I need right now is SEND NXT.
All numbers r little-endian. 01 B - type (00) 01 B - subtype (00) 04 B - timestamp (671e7400) 02 B - deadline (3c00) 32 B - sender public key (b1c9e22befa06aee2eb0ac2d13ad03df02abf7cdd5fb8c9903b74f65819eb84d) 08 B - recipient (252ab2f000b58ef7) 04 B - amount (e8030000) 04 B - fee (01000000) 08 B - referenced transaction (0000000000000000) 64 B - signature (a56d7368c792df694c72fcaf731544c4b710c9de4e906105cdb25b15fc10d1052c9fac66383c553 6500cea0782db28535c25095758029cb4d465b13f8850cf1e) I used transaction 1360173339660761930 as the example ( http://localhost:7874/nxt?requestType=getTransactionBytes&transaction=1360173339660761930) NB: Before signing u must replace signature with ZEROs and sign the whole 128 bytes. Excellent, thanks. How do I sign the whole thing (which algo)?
|
|
|
|
Come-from-Beyond
Legendary
Offline
Activity: 2142
Merit: 1010
Newbie
|
|
February 20, 2014, 02:12:30 PM |
|
Excellent, thanks.
How do I sign the whole thing (which algo)?
Do u need Java or JavaScript?
|
|
|
|
abuelau
|
|
February 20, 2014, 02:26:32 PM |
|
Excellent, thanks.
How do I sign the whole thing (which algo)?
Do u need Java or JavaScript? Javascript
|
|
|
|
|
|