- changeBet
- getAllClubs
- getAllClubsFull
- getAvailableBets
- getAvailableBetsFromList
- getBetInfo
- getFullClubName
- getGamesByClub
- getPastBets
- getPlacedBets
- getUserAccount
- getUserBetInfo
- isUserLoggedIn
- placeBet
► changeBet(betEvent: string, outcomeIndex: number): Promise.<boolean>
Defined in ethereum/contract-interaction.ts:248
Allows a user to change a bet that they have placed.
Parameters:
| Param | Type | Description |
|---|---|---|
| betEvent | string |
Address of the Betting contract. |
| outcomeIndex | number |
Index of the outcome that the user is changing their bet to. |
Returns: Promise.<boolean>
Boolean indicating if the method was successful.
► getAllClubs(): string[]
Defined in ethereum/contract-interaction.ts:377
Returns an array of club names used by the contracts.
Returns: string[]
An array with club names that are in our system.
► getAllClubsFull(): string[]
Defined in ethereum/contract-interaction.ts:404
Returns an array of fulllength club names that are in our system.
Returns: string[]
An array with club names that are in our system.
► getAvailableBets(): Promise.<string[]>
Defined in ethereum/contract-interaction.ts:278
Returns an array of bets for which the event is not over.
Returns: Promise.<string[]>
Array of bets for which the event is not over.
► getAvailableBetsFromList(betEvents: string[]): Promise.<string[]>
Defined in ethereum/contract-interaction.ts:308
Returns an array of bets for which the event is not over from a list contract addresses.
Parameters:
| Param | Type | Description |
|---|---|---|
| betEvents | string[] |
Array of addresses of Betting contracts. |
Returns: Promise.<string[]>
Array of bets for which the event is not over.
► getBetInfo(betEvent: string): Promise.<IBetInfo>
Defined in ethereum/contract-interaction.ts:322
Returns information about a bet event.
Parameters:
| Param | Type | Description |
|---|---|---|
| betEvent | string |
Address of the Betting contract. |
Returns: Promise.<IBetInfo>
Information about a match that a bet is a available for.
► getFullClubName(club: string): string
Defined in ethereum/contract-interaction.ts:456
Get full club name (for display & crests)
Parameters:
| Param | Type | Description |
|---|---|---|
| club | string |
contract club name |
Returns: string
full name of club
► getGamesByClub(club: string): Promise.<string[]>
Defined in ethereum/contract-interaction.ts:432
Returns an array of bets for a specific club.
Parameters:
| Param | Type | Description |
|---|---|---|
| club | string |
The name of the club. |
Returns: Promise.<string[]>
An array of the bets for a specific club.
► getPastBets(): Promise.<string[]>
Defined in ethereum/contract-interaction.ts:292
Returns an array of bets for which the event is over.
Returns: Promise.<string[]>
Array of bets for which the event is over.
► getPlacedBets(): Promise.<string[]>
Defined in ethereum/contract-interaction.ts:264
Returns an array of the bet objects for bets placed by a user.
Returns: Promise.<string[]>
Array of addresses of Betting contracts that user placed bet on.
► getUserAccount(): Promise.<string>
Defined in ethereum/contract-interaction.ts:364
Returns the address of the users account.
Returns: Promise.<string>
The address of the users account.
► getUserBetInfo(betEvent: string): Promise.<IUserBetInfo>
Defined in ethereum/contract-interaction.ts:336
Returns information about a bet a user placed.
Parameters:
| Param | Type | Description |
|---|---|---|
| betEvent | string |
Address of the Betting contract. |
Returns: Promise.<IUserBetInfo>
Information about a bet that a user has placed.
► isUserLoggedIn(): Promise.<boolean>
Defined in ethereum/contract-interaction.ts:349
Used to check if a user is logged in.
Returns: Promise.<boolean>
A boolean signifying if a user is logged in or not.
► placeBet(betEvent: string, outcomeIndex: number, value: string): Promise.<boolean>
Defined in ethereum/contract-interaction.ts:227
Allows a user to place a bet.
Parameters:
| Param | Type | Description |
|---|---|---|
| betEvent | string |
Address of the Betting contract. |
| outcomeIndex | number |
Index of the outcome that the user is betting on. |
| value | string |
Amount of Ether the user is betting. |
Returns: Promise.<boolean>
Boolean indicating if the method was successful.