api

package
v0.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 21, 2022 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClaimSlpPayload

type ClaimSlpPayload struct {
	AddressToClaim string `json:"address_to_claim"`
}

type TransferAxiePayload

type TransferAxiePayload struct {
	TransferPayload
	AxieId int `json:"axie_id"`
}

func (TransferAxiePayload) Validate

func (t TransferAxiePayload) Validate() error

type TransferPayload

type TransferPayload struct {
	From string `json:"from"`
	To   string `json:"to"`
}

func (TransferPayload) Validate

func (t TransferPayload) Validate() error

type TransferSlpPayload

type TransferSlpPayload struct {
	TransferPayload
	Amount int             `json:"amount"`
	Type   TransferSlpType `json:"type"`
}

type TransferSlpType

type TransferSlpType string
const (
	TransferSlpTypeScholar TransferSlpType = "SCHOLAR"
	TransferSlpTypeManager TransferSlpType = "MANAGER"
	TransferSlpTypeTrainer TransferSlpType = "TRAINER"
)

type WalletCommanderOperation

type WalletCommanderOperation string
const (
	OperationTransferSLP       WalletCommanderOperation = "TRANSFER_SLP"
	OperationBreedAxie         WalletCommanderOperation = "BREED_AXIE"
	OperationTransferAxie      WalletCommanderOperation = "TRANSFER_AXIE"
	OperationAuctionAxie       WalletCommanderOperation = "AUCTION_AXIE"
	OperationCancelAxieAuction WalletCommanderOperation = "CANCEL_AXIE_AUCTION"
	OperationHatchAxie         WalletCommanderOperation = "HATCH_AXIE"
	OperationClaimSLP          WalletCommanderOperation = "CLAIM_SLP"
)

type WalletCommanderStatus

type WalletCommanderStatus string
const (
	// When something is successful
	CommandStatusSuccess WalletCommanderStatus = "SUCCESS"
	// When an error has occured, usually coupled with a message
	CommandStatusError WalletCommanderStatus = "ERROR"
	// When the wallet commander has an invalid config and the command cannot run due to lack of permissions or info
	// An example may be that a private key does not exist for the target operation
	// Another example may be that the target account to transferred SLP is not authorized
	CommandStatusBadConfig WalletCommanderStatus = "BAD_CONFIG"
	// For some reason the payload is corrupt or not compatible with this wallet commander
	CommandStatusInvalidPayload WalletCommanderStatus = "INVALID_PAYLOAD"
	// When validating that a transaction was successful, it may timeout after some time because it did not show up on the blockchain
	CommandStatusTimeout WalletCommanderStatus = "TIMEOUT"
	// Default state for a command's status
	CommandStatusNotProcessed WalletCommanderStatus = "NOT_PROCESSED"
	// Status once a command has been locked
	CommandStatusProcessing WalletCommanderStatus = "PROCESSING"
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL