Developer Hub
🔮 For applications
SDK
Utils
getPrematchBetDataBytes

Returns the encoded bytes of selections for Prematch bet.

Usage

import { type Selection, getPrematchBetDataBytes } from '@azuro-org/sdk'
 
const selections: Selection = [...]
 
const selectionsData = await getPrematchBetDataBytes(selections)
 
const prematchBetArguments = [
  lpAddress,
  [
    {
      core,
      amount,
      expiresAt,
      extraData: {
        affiliate,
        minOdds,
        data: selectionsData,
      },
    },
  ]
]

Props

selections: Selection[]

type Selection = {
  outcomeId: string
  conditionId: string
  coreAddress: string
}

Return Value

Hex