Skip to main content

Keno

Use Keno to build a standard wager with a selected Keno configuration and pick values.

What the builder does​

createGameBet({ game: 'keno', ...options }) validates the configuration and picks as u8 values, then builds the Keno play transaction.

Required options​

  • owner
  • coinType
  • stake
  • configId
  • picks

Shared optional options​

  • cashStake
  • betCount
  • metadata
  • gasBudget
  • useGasCoin

Example​

const tx = client.suigar.tx.createGameBet({
game: 'keno',
owner: '0x123',
coinType: '0x2::sui::SUI',
stake: 1_000_000_000n,
configId: 0,
picks: [1, 7, 12, 20],
});

Read current limits​

const parameters = await client.suigar.getGameParameters({
game: 'keno',
coinType: '0x2::sui::SUI',
});

console.log(parameters.min_stake);
console.log(parameters.max_stake);

Use the current on-chain parameters to drive the configurations and pick rules your product presents before the player signs.

Notes​

  • configId and every value in picks must be integers in the inclusive 0..255 range.
  • The SDK throws TypeError for unsupported input shapes and RangeError for out-of-range values.
  • Partner attribution is injected automatically when the extension is registered with partner.
  • Reserved metadata keys such as partner and referrer are ignored with a warning when supplied manually.