xaya / libxayagame

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add wallet module

domob1812 opened this issue · comments

We should add an optional wallet module for libxayagame, so that game frontends do not have to talk to Xaya Core directly. It should provide basic functions like getbalance, getnames (wrap around name_list to get names owned by the wallet), createname (wrap around name_register) and sendmove.

Especially sendmove is not entirely trivial, since it should take care of checking whether there is already a pending name_update. If there is, then the move should be queued instead (in-memory-only is probably fine). Games could optionally even provide functionality to merge two pending moves if possible, so that the wallet module would be able to combine two queued name_update's.

A bit far fetched: If Namecoin implements RBF for names in the future (namecoin/namecoin-core#278), then we could even apply RBF automatically to update moves where possible. All of that would be abstracted away from game developers.

Discussed with @xaya and we think that this should probably be put on hold for now and we should see how games will really be built first.

Let's close this. Especially when multiple name_update's per block will be possible, there is no longer much difficulty in implementing moves directly in the frontend.