Skip to main content

Plinko

Use Plinko when you want to build a wager against one of the supported Plinko board configs.

What the builder does

createBetTransaction('plinko', options) validates the selected configId, converts it to u8, and builds the Plinko play transaction.

Required options

  • playerAddress
  • coinType
  • stake
  • configId

Example

const tx = client.suigar.tx.createBetTransaction('plinko', {
playerAddress: '0x123',
coinType: '0x2::sui::SUI',
stake: 500_000_000n,
configId: 2,
betCount: 5,
});

Notes

  • configId must fit inside u8.
  • The SDK throws if configId is not an integer between 0 and 255.
  • partner attribution is injected automatically when the extension is registered with partner