Skip to content
Restrike Docs

Wallet

The signed-in player's embedded wallet. Holds no key and moves no money: signing happens in the browser, against Openfort.

The signed-in player's embedded wallet

GET/wallet

The wallet Openfort holds for the signed-in account: its address, its chain, and whether it has been delegated to the account implementation via EIP-7702 yet. Answers { wallet: null } for an account that has never played, which is the normal state.

Responses

Record the player's wallet address

POST/wallet

Takes the embedded wallet the browser created, upgrades it to an EIP-7702 Delegated Account if it is not one already, and caches the address so holdings render from the catalogue database without a round trip. Accepts no input: the identity comes from the session, never from the caller. Answers 404 until the browser has made the wallet, which is the signal to make it. Idempotent.

Responses

Authorise this browser to open the player's wallet

POST/wallet/encryption-session

Mints a short-lived Openfort encryption session so the signed-in player's browser can decrypt its own recovery share. Recovery is automatic, so the share is encrypted with project entropy that only this API holds; the session is the narrow, expiring authorisation to use it once. It confers nothing else and cannot sign.

Responses

Every pull the signed-in player has made

GET/wallet/pulls

The player's pulls on the Fractions machine, newest first, read from the chain rather than mirrored: the PullOpened and PullSettled logs for their wallet, and each pull's current state. A settled pull carries its multiplier, its value at house prices and the watch shares it produced, with names and images joined in from the catalogue. Empty for an account with no wallet yet.

Responses

The watches the signed-in player holds a share of

GET/wallet/holdings

Every pool watch the player has a stake in, read from the chain: what the machine still owes them from settled pulls, what has already been minted to their wallet, and what the trade desk would pay for the two together right now. Also whether the desk is open at all and whether it is already approved to take their fractions, which is what the app needs to make a sale one signature. Empty for an account with no wallet yet.

Responses