Documentation ¶
Index ¶
- func ConnectClient() *ethclient.Client
- func ConnectMarket() *generated.Market
- func ConnectPool(poolAddress common.Address) *generated.Pool
- func MarketCreatePool(passphrase string, ga *GladiusAccountManager) (*types.Transaction, error)
- func PoolRetrieveApplicationServerUrl(poolAddress string, ga *GladiusAccountManager) (string, error)
- func PoolSetApplicationServerUrl(passphrase, poolAddress, url string) (*types.Transaction, error)
- func Tx(txHash common.Hash) (tx *types.Transaction, isPending bool, err error)
- func TxReceipt(txHash common.Hash) (*types.Receipt, error)
- type Balance
- type BalanceType
- type EtherscanTransaction
- type EtherscanTransactionsResponse
- type GladiusAccountManager
- func (ga GladiusAccountManager) CreateAccount(passphrase string) (accounts.Account, error)
- func (ga GladiusAccountManager) GetAccount() (*accounts.Account, error)
- func (ga GladiusAccountManager) GetAccountAddress() (*common.Address, error)
- func (ga GladiusAccountManager) GetAuth(passphrase string) (*bind.TransactOpts, error)
- func (ga GladiusAccountManager) HasAccount() bool
- func (ga GladiusAccountManager) Keystore() *keystore.KeyStore
- func (ga GladiusAccountManager) UnlockAccount(passphrase string) (bool, error)
- func (ga GladiusAccountManager) Unlocked() bool
- type PoolArrayResponse
- func MarketPoolAddressesToArrayResponse(poolAddresses []common.Address, includeData bool, ga *GladiusAccountManager) (PoolArrayResponse, error)
- func MarketPools(includeData bool, ga *GladiusAccountManager) (PoolArrayResponse, error)
- func MarketPoolsOwnedByUser(includeData bool, ga *GladiusAccountManager) (PoolArrayResponse, error)
- type PoolResponse
- type TransactionFilter
- type TransactionOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConnectClient ¶
ConnectClient - Main Connection function
func ConnectMarket ¶
ConnectMarket - Connect and return configured market
func ConnectPool ¶
ConnectNode - Connect and grab node
func MarketCreatePool ¶
func MarketCreatePool(passphrase string, ga *GladiusAccountManager) (*types.Transaction, error)
MarketCreatePool - Create new pool
func PoolRetrieveApplicationServerUrl ¶
func PoolRetrieveApplicationServerUrl(poolAddress string, ga *GladiusAccountManager) (string, error)
func PoolSetApplicationServerUrl ¶
func PoolSetApplicationServerUrl(passphrase, poolAddress, url string) (*types.Transaction, error)
Types ¶
type Balance ¶
func GetAccountBalance ¶
func GetAccountBalance(address common.Address, symbol BalanceType) (Balance, error)
type EtherscanTransaction ¶
type EtherscanTransaction struct { BlockNumber string `json:"blockNumber"` TimeStamp string `json:"timeStamp"` Hash string `json:"hash"` Nonce string `json:"nonce"` BlockHash string `json:"blockHash"` TransactionIndex string `json:"transactionIndex"` From string `json:"from"` To string `json:"to"` Value string `json:"value"` Gas string `json:"gas"` GasPrice string `json:"gasPrice"` IsError string `json:"isError"` TxReceiptStatus string `json:"txreceipt_status"` Input string `json:"input"` ContractAddress string `json:"contractAddress"` CumulativeGasUsed string `json:"cumulativeGasUsed"` GasUsed string `json:"gasUsed"` Confirmations string `json:"confirmations"` }
type EtherscanTransactionsResponse ¶
type EtherscanTransactionsResponse struct { Status string `json:"status"` Message string `json:"message"` Transactions []EtherscanTransaction `json:"result"` }
func GetAccountTransactions ¶
func GetAccountTransactions(address common.Address, options TransactionOptions) (EtherscanTransactionsResponse, error)
type GladiusAccountManager ¶
type GladiusAccountManager struct {
// contains filtered or unexported fields
}
GladiusAccountManager is a type that allows the user to create a keystore file, create an in it, and preform actions on the first account stored.
func NewGladiusAccountManager ¶
func NewGladiusAccountManager() *GladiusAccountManager
NewGladiusAccountManager creates a new gladius account manager
func (GladiusAccountManager) CreateAccount ¶
func (ga GladiusAccountManager) CreateAccount(passphrase string) (accounts.Account, error)
CreateAccount will create an account if there isn't one already
func (GladiusAccountManager) GetAccount ¶
func (ga GladiusAccountManager) GetAccount() (*accounts.Account, error)
GetAccount gets the actual account type
func (GladiusAccountManager) GetAccountAddress ¶
func (ga GladiusAccountManager) GetAccountAddress() (*common.Address, error)
GetAccountAddress gets the account address
func (GladiusAccountManager) GetAuth ¶
func (ga GladiusAccountManager) GetAuth(passphrase string) (*bind.TransactOpts, error)
GetAuth gets the authenticator for the go bindings of our smart contracts
func (GladiusAccountManager) HasAccount ¶
func (ga GladiusAccountManager) HasAccount() bool
Checks if AccountManager has an account
func (GladiusAccountManager) Keystore ¶
func (ga GladiusAccountManager) Keystore() *keystore.KeyStore
Keystore gets the keystore associated with the account manager
func (GladiusAccountManager) UnlockAccount ¶
func (ga GladiusAccountManager) UnlockAccount(passphrase string) (bool, error)
UnlockAccount Unlocks the account
func (GladiusAccountManager) Unlocked ¶
func (ga GladiusAccountManager) Unlocked() bool
Determines if account is unlocked by signing a blank hash
type PoolArrayResponse ¶
type PoolArrayResponse struct {
Pools []PoolResponse `json:"pools"`
}
func MarketPoolAddressesToArrayResponse ¶
func MarketPoolAddressesToArrayResponse(poolAddresses []common.Address, includeData bool, ga *GladiusAccountManager) (PoolArrayResponse, error)
func MarketPools ¶
func MarketPools(includeData bool, ga *GladiusAccountManager) (PoolArrayResponse, error)
func MarketPoolsOwnedByUser ¶
func MarketPoolsOwnedByUser(includeData bool, ga *GladiusAccountManager) (PoolArrayResponse, error)
type PoolResponse ¶
type PoolResponse struct { Address string `json:"address"` Url string `json:"url,omitempty"` Data models.PoolInformation `json:"data,omitempty"` }
func (*PoolResponse) String ¶
func (d *PoolResponse) String() string
type TransactionFilter ¶
type TransactionFilter struct {
EthTransfer bool `json:"eth_transfer"`
}
type TransactionOptions ¶
type TransactionOptions struct {
Filters *TransactionFilter `json:"filters"`
}