InstantSend Questions

Instacoins

Member
May 27, 2017
51
5
48
25
Hello guys,

I am Adrian Kreter from Instacoins.

I will post the project here once completed. Before that I have a few technical questions regarding InstantSend.

I am refering to this guide: https dashpay.atlassian .net/wiki/display/DOC/InstantSend+Integration
(I am splitting the link because I might not be allowed to post links).

Essentially we will have a really really big of incomming and outgoing transactions.
InstantSend seemed to be perfect, but a few things are clear to me.

1) The recieve example uses ZMQ to "identify" a new transaction and RPC to confirm the transaction went through.
The RPC example calls:
./dash-cli importaddress yVAoPqfD9M9JCvQqBDRuysTX2PbeBDY2zr

then they call all activity of this importaddress since a certain block.
It gives back both the pending instantSend and normal transactions that are unconfirmed.
a) If it essentially crawls a block why does it give back pending transactions?
b) Will this work always for all InstantSend and normal transactions in all cases?
c) Will it also return all approved transaction from this importaddress?

2) Can the same be achived with a local library? I found bitcore. Which might be able to do that.
Is there a C++ Version?

3) For instantSend sending I found https github .com/snogcel/instantsend-broadcast
Again it works with the bitcore JS version. C++ available to achive the same? Otherwise we could also work with the Node.js version but C++ would be prefered.

Looking forward to work with Dash.

Kind Regards
Adrian Kreter
 

UdjinM6

Official Dash Dev
Dash Core Team
Moderator
May 20, 2014
3,638
3,538
1,183
1)
a) listsinceblock is used to demonstrate the difference, it doesn't filter out normal/pending/non-IS txes
b) it should... why wouldn't it?
c) yes, you can see txes with bcconfirmations > 0 in the example

2) there is no special lib for this in C++, you just need to invoke RPC call (http request) - use "help listsinceblock" in console ("dash-cli help listsinceblock" in cmd line) to get additional info and an example

3) same, see "help instantsendtoaddress"
 

Instacoins

Member
May 27, 2017
51
5
48
25
Is there somewhere a full RPC docu including of the config file of the underlying dash deamon? That would be very helpfull.
 
Last edited:

moocowmoo

Bovine Bit-flipper
Foundation Member
Jun 15, 2014
483
603
263
masternode.me
Dash Address
XmoocowYfrPKUR6p6M5aJZdVntQe71irCX
Is there somewhere a full RPC docu including of the config file of the underlying dash deamon? That would be very helpfull.
Both the daemon and the client have built-in help for pretty much everything.

Code:
$ dashd --help
$ dash-cli help
---

For inbound transactions and instantsends, I recommend zmq for the lowest latency.
Pushes are always better than polls.


Here's a doc covering the basics:
https://dashpay.atlassian.net/wiki/display/DOC/Receiving+InstantSend+Transactions


You can subscribe to standard transactions (hashes or bodies) through its interface as well.

Code:
$ dashd --help | grep zmq
  -zmqpubhashblock=<address>
  -zmqpubhashtx=<address>
  -zmqpubhashtxlock=<address>
  -zmqpubrawblock=<address>
  -zmqpubrawtx=<address>
  -zmqpubrawtxlock=<address>
Let me know if you need more information. I'm happy to help.
 
  • Like
Reactions: UdjinM6

Instacoins

Member
May 27, 2017
51
5
48
25
Both the daemon and the client have built-in help for pretty much everything.

Code:
$ dashd --help
$ dash-cli help
---

For inbound transactions and instantsends, I recommend zmq for the lowest latency.
Pushes are always better than polls.


Here's a doc covering the basics:
https://dashpay.atlassian.net/wiki/display/DOC/Receiving+InstantSend+Transactions


You can subscribe to standard transactions (hashes or bodies) through its interface as well.

Code:
$ dashd --help | grep zmq
  -zmqpubhashblock=<address>
  -zmqpubhashtx=<address>
  -zmqpubhashtxlock=<address>
  -zmqpubrawblock=<address>
  -zmqpubrawtx=<address>
  -zmqpubrawtxlock=<address>
Let me know if you need more information. I'm happy to help.
Thanks a lot
 

Instacoins

Member
May 27, 2017
51
5
48
25
Can someone of the core devs write me? I was writing with someone yesterday but couldnt Really get replies afterwards.

Let me get straight to the point. I personally did a bitcoin integration and I am extreamly experienced with credit card gateways, so its not like I have no clue or something (which the instantRecieve and instantSend topic kind of makes me feel).
There is apperently a lot of different ways how to do this. ZMQ RPC insight-API. I saw someone using bitcore in js.
But there is clearly a lack of good documentation and example projects.

Is there someone (who is actually experienced enough like a core dev) who is willing to guide us through this. We dont need someone writing code. We are 6 devs here (maybe frontend devs doesnt count).

I am willing to pay in dash or € or $ or bitcoin.

Thanks and have a nice day.
 

Instacoins

Member
May 27, 2017
51
5
48
25
This was my reply regarding the ZMQ solution presented above:

This seems to be less suitable if you have a lot of addresses you watch since you need to beform deamon restarts.

I found the insight-api with socket.io
Has anyone implemented larger scale applications on top of that yet? Can I pay you for consultancy? That would potentially help to kickstart this projects.

We need the following components.

1) Generating of HD wallets.
2) Address generation.
3) Check if you get a transaction (instant or normal) on one of the addresses where you expect a transaction to happen). We also need access to the amount of confirmation.
4) instantSend implementation to send transaction.

The program is in a windows environment but we would like to avoid running a dash deamon in there. If the deamon is needed we would host them on a seperate linux Machine.

Thanks a lot. Looking forward to your reply.

___________________________________________________________________________

Regarding my 4)

We would like to specifically choose the inputs and generate for the remainer a new address.
 

UdjinM6

Official Dash Dev
Dash Core Team
Moderator
May 20, 2014
3,638
3,538
1,183
This was my reply regarding the ZMQ solution presented above:

This seems to be less suitable if you have a lot of addresses you watch since you need to beform deamon restarts.
...
Why is that?
 

Instacoins

Member
May 27, 2017
51
5
48
25
I got someone here for consultancy. The problem is the amount of transaction in a multi threaded environment. I might post here the solution I went with.
 

moocowmoo

Bovine Bit-flipper
Foundation Member
Jun 15, 2014
483
603
263
masternode.me
Dash Address
XmoocowYfrPKUR6p6M5aJZdVntQe71irCX
Why is that?
I think he just got bad info.

dashd does not need to be restarted to monitor freshly added keys or watch addresses.

@UdjinM6 am I correct that only addresses/keys present in the wallet will trigger zmq messages? if useful for some use case, is there a firehose mode? (notify all traffic)
 

Instacoins

Member
May 27, 2017
51
5
48
25
I think he just got bad info.

dashd does not need to be restarted to monitor freshly added keys or watch addresses.

@UdjinM6 am I correct that only addresses/keys present in the wallet will trigger zmq messages? if useful for some use case, is there a firehose mode? (notify all traffic)
Yes correct. Restart doesnt seem to be needed. But if wallets need to be part of the deamon its not really any better. If you have many wallets then its a lot easier to handle wallet management including address management outside. Just sign Transactions and hand them over and somehow keep beeing updated about changes.
 

UdjinM6

Official Dash Dev
Dash Core Team
Moderator
May 20, 2014
3,638
3,538
1,183
I think he just got bad info.

dashd does not need to be restarted to monitor freshly added keys or watch addresses.

@UdjinM6 am I correct that only addresses/keys present in the wallet will trigger zmq messages? if useful for some use case, is there a firehose mode? (notify all traffic)
"instantsendnotify" only works for wallet addresses while zmq should work for all IS txes iirc