fishduel source realm
Package fishduel is a two-person trial. Swim stays off chain. Settle pays one covered stake from three sealed samples...
Package fishduel is a two-person trial. Swim stays off chain. Settle pays one covered stake from three sealed samples. Each player binds an ed25519 mark key at Register. The realm cannot check a loose secp256k1 wallet signature. There is no machine fish and no FISH draw. shoal/fish stays the live collection. Mint is 1 GNOT and the stake floor is 1 GNOT. A sample note is bout:seq:height:id:x:z:time:secret:sig The mark signs the sha256 of bout,seq,height,id,x,z,time,secret joined by commas. secret is 32 lowercase hex chars. sig is 128 lowercase hex chars. The public key is 64.
21
func BoutOpen
Actionfunc Ended
Actionfunc Height
Actionfunc HpOf
Actionfunc InSea
Actionfunc Init
crossing ActionInit records three GNOT sinks. They must be distinct. Call once, from an EOA, with no coins. The mint fee is 60/20/10 and the last tenth joins team. Kill cheer also joins team.
func Leave
crossing ActionLeave returns the seated stake. While the other fish is seated, Leave waits 60 seconds.
func MarkOf
Actionfunc Mint
crossing ActionMint sells one trial fish for 1 GNOT. The fee leaves this realm in the same call.
func MintPrice
Actionfunc Minted
Actionfunc Now
Actionfunc PoolOf
Actionfunc Register
crossing ActionRegister seats a fish and binds its mark key. The attached coins are the stake.
func Render
func SeatHeight
Actionfunc Settle
crossing ActionSettle pays a kill from six notes, killer then victim, three samples, separated by slashes.
func StakeMin
Actionfunc Strike
ActionStrike is floor(bite * 100 / (hpMax + 100)), at least 1.