Bitcoin Forum
April 23, 2024, 08:08:32 PM *
News: Latest Bitcoin Core release: 27.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 37217 times)
marcus03
Full Member
***
Offline Offline

Activity: 224
Merit: 100


View Profile
February 12, 2014, 05:16:19 PM
 #341

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!
"With e-currency based on cryptographic proof, without the need to trust a third party middleman, money can be secure and transactions effortless." -- Satoshi
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1713902912
Hero Member
*
Offline Offline

Posts: 1713902912

View Profile Personal Message (Offline)

Ignore
1713902912
Reply with quote  #2

1713902912
Report to moderator
1713902912
Hero Member
*
Offline Offline

Posts: 1713902912

View Profile Personal Message (Offline)

Ignore
1713902912
Reply with quote  #2

1713902912
Report to moderator
newcn
Full Member
***
Offline Offline

Activity: 143
Merit: 100


View Profile
February 13, 2014, 03:29:21 AM
 #342

about  getAccountTransactionIds,
when I use this API to get all transactions of account 6483973064837388393, I only got 86 transactions:
http://localhost:7874/nxt?requestType=getAccountTransactionIds&account=6483973064837388393&timestamp=0
but from http://87.230.14.1/nxt/nxt.cgi?action=3000&acc=6635869272840226493
there're more than 10k transactions
is it a bug?

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

Activity: 2142
Merit: 1009

Newbie


View Profile
February 13, 2014, 05:30:59 AM
 #343

about  getAccountTransactionIds,
when I use this API to get all transactions of account 6483973064837388393, I only got 86 transactions:
http://localhost:7874/nxt?requestType=getAccountTransactionIds&account=6483973064837388393&timestamp=0
but from http://87.230.14.1/nxt/nxt.cgi?action=3000&acc=6635869272840226493
there're more than 10k transactions
is it a bug?

Yes, u use different accounts in ur requests.
newcn
Full Member
***
Offline Offline

Activity: 143
Merit: 100


View Profile
February 13, 2014, 06:30:16 AM
 #344

about  getAccountTransactionIds,
when I use this API to get all transactions of account 6483973064837388393, I only got 86 transactions:
http://localhost:7874/nxt?requestType=getAccountTransactionIds&account=6483973064837388393&timestamp=0
but from http://87.230.14.1/nxt/nxt.cgi?action=3000&acc=6635869272840226493
there're more than 10k transactions
is it a bug?

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 Offline

Activity: 2142
Merit: 1009

Newbie


View Profile
February 13, 2014, 06:39:51 AM
 #345

Is there a way to get blockid by block_height directly?

Not sure, have to check it.
marcus03
Full Member
***
Offline Offline

Activity: 224
Merit: 100


View Profile
February 14, 2014, 07:38:47 AM
 #346

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 Offline

Activity: 2142
Merit: 1009

Newbie


View Profile
February 14, 2014, 07:43:16 AM
 #347

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 Offline

Activity: 29
Merit: 0


View Profile
February 16, 2014, 01:00:50 AM
 #348

mark
roslinpl
Legendary
*
Offline Offline

Activity: 2212
Merit: 1199


View Profile WWW
February 16, 2014, 01:06:03 AM
 #349

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 Offline

Activity: 2142
Merit: 1009

Newbie


View Profile
February 16, 2014, 08:25:45 AM
 #350

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
Hero Member
*****
Offline Offline

Activity: 750
Merit: 500


www.coinschedule.com


View Profile
February 20, 2014, 10:14:32 AM
 #351

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!

Know what's happening in cryptoworld: www.coinschedule.com
Come-from-Beyond
Legendary
*
Offline Offline

Activity: 2142
Merit: 1009

Newbie


View Profile
February 20, 2014, 10:39:02 AM
 #352

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
Hero Member
*****
Offline Offline

Activity: 750
Merit: 500


www.coinschedule.com


View Profile
February 20, 2014, 11:16:43 AM
 #353

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?

Know what's happening in cryptoworld: www.coinschedule.com
Come-from-Beyond
Legendary
*
Offline Offline

Activity: 2142
Merit: 1009

Newbie


View Profile
February 20, 2014, 11:41:18 AM
 #354

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
Hero Member
*****
Offline Offline

Activity: 750
Merit: 500


www.coinschedule.com


View Profile
February 20, 2014, 12:51:20 PM
 #355

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.

Know what's happening in cryptoworld: www.coinschedule.com
Come-from-Beyond
Legendary
*
Offline Offline

Activity: 2142
Merit: 1009

Newbie


View Profile
February 20, 2014, 02:06:48 PM
 #356

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
Hero Member
*****
Offline Offline

Activity: 750
Merit: 500


www.coinschedule.com


View Profile
February 20, 2014, 02:11:46 PM
 #357

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)?

Know what's happening in cryptoworld: www.coinschedule.com
Come-from-Beyond
Legendary
*
Offline Offline

Activity: 2142
Merit: 1009

Newbie


View Profile
February 20, 2014, 02:12:30 PM
 #358

Excellent, thanks.

How do I sign the whole thing (which algo)?

Do u need Java or JavaScript?
abuelau
Hero Member
*****
Offline Offline

Activity: 750
Merit: 500


www.coinschedule.com


View Profile
February 20, 2014, 02:26:32 PM
 #359

Excellent, thanks.

How do I sign the whole thing (which algo)?

Do u need Java or JavaScript?

Javascript

Know what's happening in cryptoworld: www.coinschedule.com
Come-from-Beyond
Legendary
*
Offline Offline

Activity: 2142
Merit: 1009

Newbie


View Profile
February 20, 2014, 02:32:47 PM
 #360

Javascript

This thread contains links to the code - https://bitcointalk.org/index.php?topic=404321.0
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!