category
indicates the type of the Option. The "single-token" indicates that this option should allow Single Token for staking, and and provides the Single token for earning. singleTokenParams
. This parameter includes data about staking token, and earning token.singleTokenParams
parameter is included into the response, if the category of option is "single-token". playerParams
. It keeps the information about player's staked token and earning token information. The values of playerParams is different for each depending category.singleTokenParams
, and then playerParams
, to understand how to represent them in the game.earnToken
- contains the Token information that is used for rewarding users.earnToken.address
- The Earning token address on blockchain network. We don't use it in the game, but provided by server for future usage.earnToken.icon
- The URL to the icon logo. Load the logo image and cache in the user's browser. And use it to show in the option card in the game. Supported image types: .png and .jpg.earnToken.name
- The full name of the token. Its used in the hint texts and descriptions.earnToken.symbol
- The token tick to show in the Option card in the game.stakeToken
- contains the Token information that user has to stake.stakeToken.address
- The Staking token address on blockchain network. The game client in the background should create a contract instance along with stakeToken.address
and CrownsToken.json. Name the contract asstakeToken.name
. var instantName = stakeToken.name.toLowerCase();
cc[instantName] = new web3.Contract(CrownsTokenAbi, stakeToken.address);
stakeToken.icon
- The URL to the icon logo. Load the logo image and cache in the user's browser. And use it to show in the option card in the game. Supported image types: .png and .jpg.stakeToken.name
- The full name of the token. Its used in the hint texts and descriptions.stakeToken.symbol
- The token tick to show in the Option card in the game.minDeposit
and maxDeposit
are the limit gaps for staking. User can stake the amount that is equal or greater than minDeposit
, and less or equal to maxDeposit
.playerParams
object:playerParams
are generated according to Single Token Option category. For other option categories it may be different.claimed
- the amount of singleTokenParams.earnToken
that user already withdraw through the game. Its in decimal format.staked
- the amount of singleTokenParams.stakeToken
that user already staked. Its value is changing if user increases or decreases the his token.stakeTime
- This is a time in unix timestamp format in seconds. It indicates the last time when user staked enough tokens for completing the game. This time is holding a timestamp since the latest staked token amount. Otherwise it's value is 0.stakedDuration
- period in seconds that user keeps the staking before the update of stakeTime
.category
indicates the type of the Option. The "lp-token" indicates that this option should allow LP Token for staking, and and provides the Single token for earning. lpTokenParams
. This parameter includes data about staking token, and earning token.lpTokenParams
parameter is included into the response, if the category of option is "lp-token". playerParams
. It keeps the information about player's staked token and earning token information. The values of playerParams is different for each depending category.lpTokenParams
, and then playerParams
, to understand how to represent them in the game.earnToken
- contains the Token information that is used for rewarding users.earnToken.address
- The Earning token address on blockchain network. We don't use it in the game, but provided by server for future usage.earnToken.icon
- The URL to the icon logo. Load the logo image and cache in the user's browser. And use it to show in the option card in the game. Supported image types: .png and .jpg.earnToken.name
- The full name of the token. Its used in the hint texts and descriptions.earnToken.symbol
- The token ticker to show in the Option card in the game.stakeToken
- contains the Token information that user has to stake.stakeToken.address
- The LP token address on blockchain network. The game client in the background should create a contract instance along with stakeToken.address
and CrownsToken.json. Name the contract asstakeToken.name
. var instantName = stakeToken.name.toLowerCase();
cc[instantName] = new web3.Contract(CrownsTokenAbi, stakeToken.address);
stakeToken.icon1
and stakeToken.icon2
- The icon URLs to the paired token in LP. Load the logo image and cache in the user's browser. And use it to show in the option card in the game. Supported image types: .png and .jpg.stakeToken.name
- The full name of the token. Its used in the hint texts and descriptions.stakeToken.symbol
- The token ticker to show in the Option card in the game.minDeposit
and maxDeposit
are the limit gaps for staking. User can stake the amount that is equal or greater than minDeposit
, and less or equal to maxDeposit
.playerParams
object:playerParams
are generated according to Lp Token Option category. For other option categories it may be different.claimed
- the amount of lpTokenParams.earnToken
that user already withdraw through the game. Its in decimal format.staked
- the amount of lpTokenParams.stakeToken
that user already staked. Its value is changing if user increases or decreases the his token.stakeTime
- This is a time in unix timestamp format in seconds. It indicates the last time when user staked enough tokens for completing the game. This time is holding a timestamp since the latest staked token amount. Otherwise it's value is 0.stakedDuration
- period in seconds that user keeps the staking before the update of stakeTime
.