Wheel
Use Wheel when you want to build a wager against one of the supported Wheel configs.
What the builder does
createBetTransaction('wheel', options) validates the selected configId, converts it to u8, and builds the Wheel play transaction.
Required options
ownercoinTypestakeconfigId
Shared optional options
cashStakebetCountmetadatagasBudgetallowGasCoinShortcut
Example
const tx = client.suigar.tx.createBetTransaction('wheel', {
owner: '0x123',
coinType: '0x2::sui::SUI',
stake: 750_000_000n,
configId: 1,
});
Typical usage
The usual Wheel flow is:
- read live stake bounds
- let the player choose one supported
configId - build the transaction
- sign and execute it
- decode results if you want to show structured wheel outcome data
Read current limits
If your app needs current stake bounds before building a Wheel transaction, read the live parameter object first:
const parameters = await client.suigar.getGameParameters('wheel', {
coinType: '0x2::sui::SUI',
});
console.log(parameters.min_stake);
console.log(parameters.max_stake);
This is useful when the Wheel form is driven by dynamic config selection and you want live stake validation before the player signs.
Notes
configIdmust be an integer from0to255.- This builder follows the same standard-game flow as Coinflip, Limbo, Plinko, and Range.
- partner attribution is injected automatically when the extension is registered with
partner - reserved metadata keys such as
partnerandreferrerare ignored with a warning when passed manually configIdvalidation is strict, so treat values from route params or form state as untrusted input