Versions in this module Expand all Collapse all v0 v0.1.0 Aug 17, 2018 Changes in this version + const ArcadeumABI + const ArcadeumBin + const DGameABI + const DGameBin + const NOT_STAKED + const PRICE_SAMPLE_INTERVAL_IN_SEC + const STAKED + const STAKED_INSUFFICIENT_BALANCE + const UNKNOWN + type Arcadeum struct + func DeployArcadeum(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *Arcadeum, error) + func NewArcadeum(address common.Address, backend bind.ContractBackend) (*Arcadeum, error) + type ArcadeumBalanceChanged struct + Account common.Address + Raw types.Log + type ArcadeumBalanceChangedIterator struct + Event *ArcadeumBalanceChanged + func (it *ArcadeumBalanceChangedIterator) Close() error + func (it *ArcadeumBalanceChangedIterator) Error() error + func (it *ArcadeumBalanceChangedIterator) Next() bool + type ArcadeumCaller struct + func NewArcadeumCaller(address common.Address, caller bind.ContractCaller) (*ArcadeumCaller, error) + func (_Arcadeum *ArcadeumCaller) Balance(opts *bind.CallOpts, arg0 common.Address) (*big.Int, error) + func (_Arcadeum *ArcadeumCaller) CanFinishWithdrawal(opts *bind.CallOpts, account common.Address) (bool, error) + func (_Arcadeum *ArcadeumCaller) CanStopWithdrawalXXX(opts *bind.CallOpts, timestamp *big.Int, timestampV uint8, timestampR [32]byte, ...) (bool, error) + func (_Arcadeum *ArcadeumCaller) CouldStopWithdrawalXXX(opts *bind.CallOpts, timestamp *big.Int, timestampV uint8, timestampR [32]byte, ...) (bool, error) + func (_Arcadeum *ArcadeumCaller) IsWithdrawing(opts *bind.CallOpts, account common.Address) (bool, error) + func (_Arcadeum *ArcadeumCaller) MatchHashXXX(opts *bind.CallOpts, game common.Address, timestamp *big.Int, ...) ([32]byte, error) + func (_Arcadeum *ArcadeumCaller) PlayerAccountXXX(opts *bind.CallOpts, timestamp *big.Int, timestampV uint8, timestampR [32]byte, ...) (common.Address, error) + func (_Arcadeum *ArcadeumCaller) SubkeyMessage(opts *bind.CallOpts, subkey common.Address) (string, error) + func (_Arcadeum *ArcadeumCaller) SubkeyParentXXX(opts *bind.CallOpts, subkey common.Address, subkeyV uint8, subkeyR [32]byte, ...) (common.Address, error) + func (_Arcadeum *ArcadeumCaller) TimestampSubkeyXXX(opts *bind.CallOpts, timestamp *big.Int, timestampV uint8, timestampR [32]byte, ...) (common.Address, error) + func (_Arcadeum *ArcadeumCaller) WithdrawalTime(opts *bind.CallOpts, arg0 common.Address) (*big.Int, error) + type ArcadeumCallerRaw struct + Contract *ArcadeumCaller + func (_Arcadeum *ArcadeumCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error + type ArcadeumCallerSession struct + CallOpts bind.CallOpts + Contract *ArcadeumCaller + func (_Arcadeum *ArcadeumCallerSession) Balance(arg0 common.Address) (*big.Int, error) + func (_Arcadeum *ArcadeumCallerSession) CanFinishWithdrawal(account common.Address) (bool, error) + func (_Arcadeum *ArcadeumCallerSession) CanStopWithdrawalXXX(timestamp *big.Int, timestampV uint8, timestampR [32]byte, timestampS [32]byte, ...) (bool, error) + func (_Arcadeum *ArcadeumCallerSession) CouldStopWithdrawalXXX(timestamp *big.Int, timestampV uint8, timestampR [32]byte, timestampS [32]byte, ...) (bool, error) + func (_Arcadeum *ArcadeumCallerSession) IsWithdrawing(account common.Address) (bool, error) + func (_Arcadeum *ArcadeumCallerSession) MatchHashXXX(game common.Address, timestamp *big.Int, accounts [2]common.Address, ...) ([32]byte, error) + func (_Arcadeum *ArcadeumCallerSession) PlayerAccountXXX(timestamp *big.Int, timestampV uint8, timestampR [32]byte, timestampS [32]byte, ...) (common.Address, error) + func (_Arcadeum *ArcadeumCallerSession) SubkeyMessage(subkey common.Address) (string, error) + func (_Arcadeum *ArcadeumCallerSession) SubkeyParentXXX(subkey common.Address, subkeyV uint8, subkeyR [32]byte, subkeyS [32]byte) (common.Address, error) + func (_Arcadeum *ArcadeumCallerSession) TimestampSubkeyXXX(timestamp *big.Int, timestampV uint8, timestampR [32]byte, timestampS [32]byte) (common.Address, error) + func (_Arcadeum *ArcadeumCallerSession) WithdrawalTime(arg0 common.Address) (*big.Int, error) + type ArcadeumCheaterReported struct + Account common.Address + Raw types.Log + Subkey common.Address + Timestamp *big.Int + type ArcadeumCheaterReportedIterator struct + Event *ArcadeumCheaterReported + func (it *ArcadeumCheaterReportedIterator) Close() error + func (it *ArcadeumCheaterReportedIterator) Error() error + func (it *ArcadeumCheaterReportedIterator) Next() bool + type ArcadeumFilterer struct + func NewArcadeumFilterer(address common.Address, filterer bind.ContractFilterer) (*ArcadeumFilterer, error) + func (_Arcadeum *ArcadeumFilterer) FilterBalanceChanged(opts *bind.FilterOpts, account []common.Address) (*ArcadeumBalanceChangedIterator, error) + func (_Arcadeum *ArcadeumFilterer) FilterCheaterReported(opts *bind.FilterOpts, account []common.Address, subkey []common.Address, ...) (*ArcadeumCheaterReportedIterator, error) + func (_Arcadeum *ArcadeumFilterer) FilterRewardClaimed(opts *bind.FilterOpts, account []common.Address, subkey []common.Address, ...) (*ArcadeumRewardClaimedIterator, error) + func (_Arcadeum *ArcadeumFilterer) FilterWithdrawalStarted(opts *bind.FilterOpts, account []common.Address) (*ArcadeumWithdrawalStartedIterator, error) + func (_Arcadeum *ArcadeumFilterer) FilterWithdrawalStopped(opts *bind.FilterOpts, account []common.Address) (*ArcadeumWithdrawalStoppedIterator, error) + func (_Arcadeum *ArcadeumFilterer) WatchBalanceChanged(opts *bind.WatchOpts, sink chan<- *ArcadeumBalanceChanged, ...) (event.Subscription, error) + func (_Arcadeum *ArcadeumFilterer) WatchCheaterReported(opts *bind.WatchOpts, sink chan<- *ArcadeumCheaterReported, ...) (event.Subscription, error) + func (_Arcadeum *ArcadeumFilterer) WatchRewardClaimed(opts *bind.WatchOpts, sink chan<- *ArcadeumRewardClaimed, ...) (event.Subscription, error) + func (_Arcadeum *ArcadeumFilterer) WatchWithdrawalStarted(opts *bind.WatchOpts, sink chan<- *ArcadeumWithdrawalStarted, ...) (event.Subscription, error) + func (_Arcadeum *ArcadeumFilterer) WatchWithdrawalStopped(opts *bind.WatchOpts, sink chan<- *ArcadeumWithdrawalStopped, ...) (event.Subscription, error) + type ArcadeumRaw struct + Contract *Arcadeum + func (_Arcadeum *ArcadeumRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error + func (_Arcadeum *ArcadeumRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) + func (_Arcadeum *ArcadeumRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) + type ArcadeumRewardClaimed struct + Account common.Address + Raw types.Log + Subkey common.Address + Timestamp *big.Int + type ArcadeumRewardClaimedIterator struct + Event *ArcadeumRewardClaimed + func (it *ArcadeumRewardClaimedIterator) Close() error + func (it *ArcadeumRewardClaimedIterator) Error() error + func (it *ArcadeumRewardClaimedIterator) Next() bool + type ArcadeumSession struct + CallOpts bind.CallOpts + Contract *Arcadeum + TransactOpts bind.TransactOpts + func (_Arcadeum *ArcadeumSession) Balance(arg0 common.Address) (*big.Int, error) + func (_Arcadeum *ArcadeumSession) CanFinishWithdrawal(account common.Address) (bool, error) + func (_Arcadeum *ArcadeumSession) CanStopWithdrawalXXX(timestamp *big.Int, timestampV uint8, timestampR [32]byte, timestampS [32]byte, ...) (bool, error) + func (_Arcadeum *ArcadeumSession) CouldStopWithdrawalXXX(timestamp *big.Int, timestampV uint8, timestampR [32]byte, timestampS [32]byte, ...) (bool, error) + func (_Arcadeum *ArcadeumSession) Deposit() (*types.Transaction, error) + func (_Arcadeum *ArcadeumSession) FinishWithdrawal() (*types.Transaction, error) + func (_Arcadeum *ArcadeumSession) IsWithdrawing(account common.Address) (bool, error) + func (_Arcadeum *ArcadeumSession) MatchHashXXX(game common.Address, timestamp *big.Int, accounts [2]common.Address, ...) ([32]byte, error) + func (_Arcadeum *ArcadeumSession) PlayerAccountXXX(timestamp *big.Int, timestampV uint8, timestampR [32]byte, timestampS [32]byte, ...) (common.Address, error) + func (_Arcadeum *ArcadeumSession) StartWithdrawal() (*types.Transaction, error) + func (_Arcadeum *ArcadeumSession) StopWithdrawalXXX(timestamp *big.Int, timestampV uint8, timestampR [32]byte, timestampS [32]byte, ...) (*types.Transaction, error) + func (_Arcadeum *ArcadeumSession) SubkeyMessage(subkey common.Address) (string, error) + func (_Arcadeum *ArcadeumSession) SubkeyParentXXX(subkey common.Address, subkeyV uint8, subkeyR [32]byte, subkeyS [32]byte) (common.Address, error) + func (_Arcadeum *ArcadeumSession) TimestampSubkeyXXX(timestamp *big.Int, timestampV uint8, timestampR [32]byte, timestampS [32]byte) (common.Address, error) + func (_Arcadeum *ArcadeumSession) WithdrawalTime(arg0 common.Address) (*big.Int, error) + type ArcadeumTransactor struct + func NewArcadeumTransactor(address common.Address, transactor bind.ContractTransactor) (*ArcadeumTransactor, error) + func (_Arcadeum *ArcadeumTransactor) Deposit(opts *bind.TransactOpts) (*types.Transaction, error) + func (_Arcadeum *ArcadeumTransactor) FinishWithdrawal(opts *bind.TransactOpts) (*types.Transaction, error) + func (_Arcadeum *ArcadeumTransactor) StartWithdrawal(opts *bind.TransactOpts) (*types.Transaction, error) + func (_Arcadeum *ArcadeumTransactor) StopWithdrawalXXX(opts *bind.TransactOpts, timestamp *big.Int, timestampV uint8, ...) (*types.Transaction, error) + type ArcadeumTransactorRaw struct + Contract *ArcadeumTransactor + func (_Arcadeum *ArcadeumTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) + func (_Arcadeum *ArcadeumTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) + type ArcadeumTransactorSession struct + Contract *ArcadeumTransactor + TransactOpts bind.TransactOpts + func (_Arcadeum *ArcadeumTransactorSession) Deposit() (*types.Transaction, error) + func (_Arcadeum *ArcadeumTransactorSession) FinishWithdrawal() (*types.Transaction, error) + func (_Arcadeum *ArcadeumTransactorSession) StartWithdrawal() (*types.Transaction, error) + func (_Arcadeum *ArcadeumTransactorSession) StopWithdrawalXXX(timestamp *big.Int, timestampV uint8, timestampR [32]byte, timestampS [32]byte, ...) (*types.Transaction, error) + type ArcadeumWithdrawalStarted struct + Account common.Address + Raw types.Log + type ArcadeumWithdrawalStartedIterator struct + Event *ArcadeumWithdrawalStarted + func (it *ArcadeumWithdrawalStartedIterator) Close() error + func (it *ArcadeumWithdrawalStartedIterator) Error() error + func (it *ArcadeumWithdrawalStartedIterator) Next() bool + type ArcadeumWithdrawalStopped struct + Account common.Address + Raw types.Log + type ArcadeumWithdrawalStoppedIterator struct + Event *ArcadeumWithdrawalStopped + func (it *ArcadeumWithdrawalStoppedIterator) Close() error + func (it *ArcadeumWithdrawalStoppedIterator) Error() error + func (it *ArcadeumWithdrawalStoppedIterator) Next() bool + type Client struct + ArcadeumContract *Arcadeum + ArcadeumContractAddress common.Address + Conn *ethclient.Client + EtherscanPriceURL string + GameAddress map[uint32]common.Address + LastPriceUnixTime int64 + MinStakeUSD float32 + USDInETH float64 + func NewArcadeumClient(ethcfg *config.ETHConfig, arccfg *config.ArcadeumConfig) *Client + func (c *Client) CalculateRank(gameID uint32, secretSeed []byte) (uint32, error) + func (c *Client) DGameContract(gameID uint32) (*DGame, error) + func (c *Client) GetStakedStatus(from common.Address) (StakedStatus, error) + func (c *Client) HandleWithdrawalStarted(handler IWithdrawalStartedHandler) + func (c *Client) IsSecretSeedValid(gameID uint32, account common.Address, secretSeed []byte) (bool, error) + func (c *Client) MatchDuration(gameID uint32) (time.Duration, error) + func (c *Client) MatchHash(msg *MatchVerifiedMessage) ([32]byte, error) + func (c *Client) PriceUSDInEth() (float64, error) + func (c *Client) PublicSeed(gameID uint32, secretSeed []byte) ([]byte, error) + func (c *Client) StakeBalanceInEth(address common.Address) (*big.Int, error) + func (c *Client) SubKeyParent(subkey common.Address, sig *crypto.Signature) (common.Address, error) + func (c *Client) SubscribeWithdrawalStarted() (event.Subscription, error) + func (c *Client) TimestampSubkey(timestamp int64, sig crypto.Signature) (common.Address, error) + func (c *Client) VerifySignedTimestamp(req *VerifyTimestampRequest, subkeySig *crypto.Signature) (common.Address, error) + type DGame struct + func DeployDGame(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *DGame, error) + func NewDGame(address common.Address, backend bind.ContractBackend) (*DGame, error) + type DGameCaller struct + func NewDGameCaller(address common.Address, caller bind.ContractCaller) (*DGameCaller, error) + func (_DGame *DGameCaller) IsSecretSeedValid(opts *bind.CallOpts, account common.Address, secretSeed []byte) (bool, error) + func (_DGame *DGameCaller) MatchDuration(opts *bind.CallOpts) (*big.Int, error) + func (_DGame *DGameCaller) PublicSeed(opts *bind.CallOpts, secretSeed []byte) ([]byte, error) + func (_DGame *DGameCaller) SecretSeedRating(opts *bind.CallOpts, secretSeed []byte) (uint32, error) + type DGameCallerRaw struct + Contract *DGameCaller + func (_DGame *DGameCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error + type DGameCallerSession struct + CallOpts bind.CallOpts + Contract *DGameCaller + func (_DGame *DGameCallerSession) IsSecretSeedValid(account common.Address, secretSeed []byte) (bool, error) + func (_DGame *DGameCallerSession) MatchDuration() (*big.Int, error) + func (_DGame *DGameCallerSession) PublicSeed(secretSeed []byte) ([]byte, error) + func (_DGame *DGameCallerSession) SecretSeedRating(secretSeed []byte) (uint32, error) + type DGameFilterer struct + func NewDGameFilterer(address common.Address, filterer bind.ContractFilterer) (*DGameFilterer, error) + type DGameRaw struct + Contract *DGame + func (_DGame *DGameRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error + func (_DGame *DGameRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) + func (_DGame *DGameRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) + type DGameSession struct + CallOpts bind.CallOpts + Contract *DGame + TransactOpts bind.TransactOpts + func (_DGame *DGameSession) IsSecretSeedValid(account common.Address, secretSeed []byte) (bool, error) + func (_DGame *DGameSession) MatchDuration() (*big.Int, error) + func (_DGame *DGameSession) PublicSeed(secretSeed []byte) ([]byte, error) + func (_DGame *DGameSession) SecretSeedRating(secretSeed []byte) (uint32, error) + type DGameTransactor struct + func NewDGameTransactor(address common.Address, transactor bind.ContractTransactor) (*DGameTransactor, error) + type DGameTransactorRaw struct + Contract *DGameTransactor + func (_DGame *DGameTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) + func (_DGame *DGameTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) + type DGameTransactorSession struct + Contract *DGameTransactor + TransactOpts bind.TransactOpts + type EtherScanPriceResponse struct + Message string + Result *PriceResult + Status int + type IWithdrawalStartedHandler interface + OnWithdrawalStarted func(event *ArcadeumWithdrawalStarted) + type MatchVerifiedMessage struct + Accounts [2]common.Address + GameAddress common.Address + MatchHash [32]byte + PlayerIndex uint8 + Players [2]*MatchVerifiedPlayerInfo + SignatureMatchHash *crypto.Signature + SignatureOpponentSubkey *crypto.Signature + Subkeys [2]common.Address + Timestamp int64 + type MatchVerifiedPlayerInfo struct + PublicSeed []byte + SeedRating uint32 + SignatureTimestamp *crypto.Signature + type PriceResult struct + EthBTC float64 + EthBTCTUnixTime int64 + EthUSD float64 + EthUSDUnixTime int64 + type StakedStatus int + type VerifyTimestampRequest struct + GameID uint32 + Signature *crypto.Signature + SubKey *common.Address + Timestamp int64