Godot SDK
The Godot SDK is designed around two layers:
LynxRelay
LynxRewards
LynxRelay
LynxRelay handles the backend connection.
Common calls:
await LynxRelay.sync_relay("event.sunfall")
await LynxRelay.increment_relay("event.sunfall", 1)
LynxRelay.get_client_claimed_version("event.sunfall")
LynxRewards
LynxRewards converts sync output into saved local reward offers.
Autoload order:
1. LynxRelay
2. LynxRewards
Configure relays:
LynxRewards.configure(["event.sunfall"])
Claim an offer:
func open_lynx_chest(relay_id: String) -> void:
var result := await LynxRewards.prepare_offer_claim(relay_id)
if not result.get("ok", false):
return
var offer: Dictionary = result["offer"]
give_reward(offer)
save_game()
LynxRewards.complete_offer(relay_id)