mCasino.api.exchange
Game
mCasino Exchange API
Types
ExchangeType
interface ExchangeType {name: number--
Name
enabled: () → boolean--
Checks if the currency is enabled
format: (amount: number) → string--
Formats a number into the currency
depositRate: (amount: number) → number--
Multiplies the amount * deposit rate
withdrawRate: (amount?: number) → number--
Divides the amount / withdraw rate, if no amount is specified it should return the withdraw rate
}Exchange Type
Functions
promptDeposit
This item only works when running on the client. ClientPrompts the user to deposit the given currency
promptWithdraw
This item only works when running on the client. ClientPrompts the user to withdraw the given currency
interact
This item only works when running on the client. ClientmCasino.api.exchange.interact(currencyId: string,amount: number,isDeposit: boolean) → ()Attempts to exchange the currency for the local user, this does not check balances
withdrawItem
This item only works when running on the client. ClientmCasino.api.exchange.withdrawItem(itemId: string) → ()Attempts to withdraw an item, prompts the user to confirm and does balance check
getTypes
Returns the exchange currencies available