Stake Pool Public Api

Discussion in 'PoS Pools' started by oxfn, Sep 19, 2018.

  1. 2017/12/15 - Decred v1.1.2 released! → Release Notes  → Downloads
  1. oxfn

    oxfn New Member

    Sep 19, 2018
    2
    0
    Russia
    Hello!
    We are developing multi-currency web and desktop wallet.
    Is it technically possible to implement vote buying via stake pool?
    Did not find any available public API
     
  2. jet

    jet New Member

    Jan 29, 2017
    83
    15
    Web
    Tickets can be bought, not votes. Or more accurately, DCR is exchanged for tickets temporarily.

    Stakepool has no rights to spend user funds, only to vote user tickets.

    Please clarify your request.
     
  3. oxfn

    oxfn New Member

    Sep 19, 2018
    2
    0
    Russia
    @jet, thanks for reply

    1. Our web-wallet supports DCR transactions, history and exchange (using explorers and nodes APIs).
    2. We would like to implement specific features for DCR for users to buy tickets from their account and (may be) send votes.
    Thus our wallet is kind of "third party app" relatively to DCR infrastructure.
    So my request is about any information about support of ticket purchasing / voting API for such a "third party app"
     
  4. jet

    jet New Member

    Jan 29, 2017
    83
    15
    Web
    @oxfn sorry for late reply, the forum is mostly dead and all the talk is in the chats.

    To buy tickets you need to build a special "ticket purchase" transaction, sign it and broadcast it to the network. Depending where your client's keys are stored this could happen either client-side or server-side.

    You do not "send" votes, you need to "respond" with votes when ticket is "called" by the network. For that you either run a wallet 24/7 or use a stake pool that does it for you (without the power to spend your funds, it can only vote). So to "vote" with a stake pool all you need is to set your voting preference in advance, and let the pool cast your vote when the time comes.

    I'm not sure what APIs you need. We have our own block explorer and API server called "dcrdata", feel free to ask in #dcrdata chat channel about the APIs.
     

Share This Page