Range
Use Range when you want to bet on whether the final value lands inside or outside a selected interval.
What the builder does
createBetTransaction('range', options) converts the left and right points into fixed-point integers, then builds the Range play transaction.
Required options
playerAddresscoinTypestakeleftPointrightPoint
Optional game-specific options
outOfRangescale
Example
const tx = client.suigar.tx.createBetTransaction('range', {
playerAddress: '0x123',
coinType: '0x2::sui::SUI',
stake: 1_000_000_000n,
leftPoint: 0.95,
rightPoint: 1.05,
outOfRange: false,
});
Notes
- The default fixed-point scale is
1_000_000. leftPointandrightPointare rounded after scaling.- Set
outOfRange: truewhen the bet should win only if the final value is outside the selected interval. - partner attribution is injected automatically when the extension is registered with
partner