0

In stake.com for each user they generate separate bech32 address for deposit & displays the deposited amount as balance in top of the navigation bar.

Similarly for withdraw they just ask for the amount to be withdrawn & receiver address for withdrawal.

Currently for our setup we're generating bech32 address with publicKey & privateKey using node JS. But for sending transaction to another bech32 wallet it's more complicated to calculate transaction fee & sochain.io costs too much.

How to implement this model of deposit & withdraw model for my crypto poker casino?

Deposit Flow in stake.com

1
  • 1
    Are you asking how you can estimate the transaction size in advance, or how you can reduce your cost for facilitating a high payment volume on Bitcoin?
    – Murch
    Mar 21, 2023 at 10:54

1 Answer 1

0

Your question is very broad and depends on a lot of circumstances.

The most straight-forward approach to any hot web wallet is building your solution on top of bitcoin-d and the existing JSON-RPC API. (https://developer.bitcoin.org/reference/rpc/)

There are libraries for almost every language.(https://en.bitcoin.it/wiki/API_reference_(JSON-RPC)#Languages)

  • Run a dedicated server/VPS
  • Install bitcoin-d at your preferred version
  • Update bitcoin.conf if you want pruned, also you can set walletnotify here which works like a callback that will ping or run a script of your choosing whenever funds are received to the wallet.
  • Familiarize yourself with the wallet JSON RPC calls (https://developer.bitcoin.org/reference/rpc/#wallet-rpcs)

Implement into your site as necessary.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.