Documentation ¶
Index ¶
- Constants
- type AxieClient
- func (c *AxieClient) BreedAxie(ctx context.Context, privateKey string, dadAxieId, momAxieId int) (string, error)
- func (c *AxieClient) ClaimSlp(ctx context.Context, address, privateKeyStr string) (string, error)
- func (c *AxieClient) GetClaimableAmount(ctx context.Context, address string) (*ClaimableResponse, error)
- func (c *AxieClient) GetRoninWalletBalance(ctx context.Context, tokenTypeAddress, address string) (float64, error)
- func (c *AxieClient) GetTransactionReceipt(ctx context.Context, txHash string) (*types.Receipt, error)
- func (c *AxieClient) GetWalletTransactionHistory(address string) (*pkgTypes.WalletTransactionHistory, error)
- func (c *AxieClient) TransferAxie(ctx context.Context, privateKey, to string, axieId int) (string, error)
- func (c *AxieClient) TransferSlp(ctx context.Context, privateKey, to string, amount int) (string, error)
- type ClaimableResponse
- type Client
- type GraphqlRequest
- type T
Constants ¶
View Source
const ( AXIE_INFINITY_GRAPHQL_GATEWAY = "https://graphql-gateway.axieinfinity.com/graphql" HOUR_PER_DAY = 24 DAYS_BETWEEN_CLAIM = 14 DURATION_BETWEEN_CLAIMS = time.Hour * HOUR_PER_DAY * DAYS_BETWEEN_CLAIM )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AxieClient ¶
type AxieClient struct {
// contains filtered or unexported fields
}
func (*AxieClient) BreedAxie ¶
func (c *AxieClient) BreedAxie(ctx context.Context, privateKey string, dadAxieId, momAxieId int) (string, error)
TODO: Test
func (*AxieClient) GetClaimableAmount ¶
func (c *AxieClient) GetClaimableAmount(ctx context.Context, address string) (*ClaimableResponse, error)
func (*AxieClient) GetRoninWalletBalance ¶
func (*AxieClient) GetTransactionReceipt ¶
func (*AxieClient) GetWalletTransactionHistory ¶
func (c *AxieClient) GetWalletTransactionHistory(address string) (*pkgTypes.WalletTransactionHistory, error)
func (*AxieClient) TransferAxie ¶
func (*AxieClient) TransferSlp ¶
type ClaimableResponse ¶
type ClaimableResponse struct { BlockchainRelated struct { Signature struct { Signature string `json:"signature"` // Total amount earned Amount int `json:"amount"` Timestamp int `json:"timestamp"` } `json:"signature"` // Current SLP in wallet Balance int `json:"balance"` // Last total amount claimed Checkpoint int `json:"checkpoint"` BlockNumber int `json:"block_number"` } `json:"blockchain_related"` ClaimableTotal int `json:"claimable_total"` // Last time this account was claimed // NOTE: When a REQUEST to claim occurs, this will set last claim date, even if a claim event did not happen successfully // Cannot use this as a last claim date LastClaimedItemAt int `json:"last_claimed_item_at"` RawTotal int `json:"raw_total"` RawClaimableTotal int `json:"raw_claimable_total"` Item struct { Id int `json:"id"` Name string `json:"name"` Description string `json:"description"` ImageUrl string `json:"image_url"` UpdatedAt int `json:"updated_at"` CreatedAt int `json:"created_at"` } `json:"item"` }
func (ClaimableResponse) CanClaim ¶
func (c ClaimableResponse) CanClaim() bool
func (ClaimableResponse) GetClaimableAmount ¶
func (c ClaimableResponse) GetClaimableAmount() int
The following functions are so funny, it makes me think im not sure whats going on OR the devs suck amount that can be claimed as of today if CanClaim is true
func (ClaimableResponse) HoursToNextClaim ¶
func (c ClaimableResponse) HoursToNextClaim() float64
type Client ¶
type Client interface { TransferSlp(ctx context.Context, privateKey, to string, amount int) (string, error) TransferAxie(ctx context.Context, privateKey, to string, axieId int) (string, error) GetTransactionReceipt(ctx context.Context, txHash string) (*types.Receipt, error) GetRoninWalletBalance(ctx context.Context, tokenTypeAddress, address string) (float64, error) GetClaimableAmount(ctx context.Context, address string) (*ClaimableResponse, error) ClaimSlp(ctx context.Context, address, privateKeyStr string) (string, error) GetWalletTransactionHistory(address string) (*pkgTypes.WalletTransactionHistory, error) }
type GraphqlRequest ¶
Click to show internal directories.
Click to hide internal directories.