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) CreateAccessToken(address, privateKeyStr string) (string, error)
- func (c *AxieClient) GetClaimPayload(ctx context.Context, address, privateKeyStr string) (*ClaimableResponse, 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) CreateAccessToken ¶ added in v0.1.7
func (c *AxieClient) CreateAccessToken(address, privateKeyStr string) (string, error)
func (*AxieClient) GetClaimPayload ¶ added in v0.1.4
func (c *AxieClient) GetClaimPayload(ctx context.Context, address, privateKeyStr string) (*ClaimableResponse, error)
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 { ClientID string `json:"clientID"` ItemID int `json:"itemID"` Name string `json:"name"` Description string `json:"description"` ImageUrl string `json:"imageUrl"` Total int `json:"total"` BlockchainRelated struct { Signature struct { Signature string `json:"signature"` Amount int `json:"amount"` Timestamp int `json:"timestamp"` } `json:"signature"` Balance int `json:"balance"` Checkpoint int `json:"checkpoint"` BlockNumber int `json:"blockNumber"` } `json:"blockchainRelated"` ClaimableTotal int `json:"claimableTotal"` LastClaimedItemAt int `json:"lastClaimedItemAt"` RawTotal int `json:"rawTotal"` RawClaimableTotal int `json:"rawClaimableTotal"` }
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) GetClaimPayload(ctx context.Context, address, privateKeyStr string) (*ClaimableResponse, error) CreateAccessToken(address, privateKeyStr string) (string, error) }
type GraphqlRequest ¶
Click to show internal directories.
Click to hide internal directories.