account

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddressIdQuery

func AddressIdQuery(db *gorm.DB, address string) *gorm.DB

Return a query to get the ID of a given address

func ConfigureRoutes

func ConfigureRoutes(g *gin.RouterGroup)

func HandleGetAccountAddresses

func HandleGetAccountAddresses(c *gin.Context)

func HandleGetAccountAssets

func HandleGetAccountAssets(c *gin.Context)

func HandleGetAccountHistory

func HandleGetAccountHistory(c *gin.Context)

func HandleGetAccountInfo

func HandleGetAccountInfo(c *gin.Context)

func HandleGetAccountList

func HandleGetAccountList(c *gin.Context)

func HandleGetAccountRewards

func HandleGetAccountRewards(c *gin.Context)

func HandleGetAccountUpdates

func HandleGetAccountUpdates(c *gin.Context)

func LatestWithdrawalEpochQuery

func LatestWithdrawalEpochQuery(db *gorm.DB, i uint64) *gorm.DB

Returns a query to get the latest withdrawal epoch given a transaction ID

func LatestWithdrawalTxQuery

func LatestWithdrawalTxQuery(db *gorm.DB, i uint64) *gorm.DB

Returns a query to get the latest withdrawal transaction given an address ID

func TxOutQuery

func TxOutQuery(db *gorm.DB) *gorm.DB

Used as part of HandleGetAccountAssets to filter out assets which have been transferred away

Types

type Account

type Account struct {
	Status           string `gorm:"column:status"`
	DelegatedPool    string `gorm:"column:delegated_pool"`
	TotalBalance     uint64 `gorm:"column:total_balance"`
	Utxo             uint64 `gorm:"column:utxo"`
	Rewards          uint64 `gorm:"column:rewards"`
	Withdrawals      uint64 `gorm:"column:withdrawals"`
	RewardsAvailable uint64 `gorm:"column:rewards_available"`
	Reserves         uint64 `gorm:"column:reserves"`
	Treasury         uint64 `gorm:"column:treasury"`
}

type AccountId

type AccountId struct {
	Id string `gorm:"id"`
}

type AccountIdResponse

type AccountIdResponse struct {
	Id string `json:"id"`
}

func NewAccountListResponse

func NewAccountListResponse(a *AccountId) *AccountIdResponse

type AccountResponse

type AccountResponse struct {
	Status           string `json:"status"`
	DelegatedPool    string `json:"delegated_pool"`
	TotalBalance     string `json:"total_balance"`
	Utxo             string `json:"utxo"`
	Rewards          string `json:"rewards"`
	Withdrawals      string `json:"withdrawals"`
	RewardsAvailable string `json:"rewards_available"`
	Reserves         string `json:"reserves"`
	Treasury         string `json:"treasury"`
}

func NewAccountResponse

func NewAccountResponse(a *Account) *AccountResponse

type Address

type Address struct {
	Address string `gorm:"column:address"`
}

type AddressResponse

type AddressResponse struct {
	Address string `json:"address"`
}

func NewAddressResponse

func NewAddressResponse(a *Address) *AddressResponse

type Asset

type Asset struct {
	AssetPolicy []byte `gorm:"column:asset_policy"`
	AssetName   []byte `gorm:"column:asset_name"`
	Quantity    uint64 `gorm:"column:quantity"`
}

type AssetResponse

type AssetResponse struct {
	AssetPolicy string `json:"asset_policy"`
	AssetName   string `json:"asset_name"`
	Quantity    string `json:"quantity"`
}

func NewAssetResponse

func NewAssetResponse(a *Asset) *AssetResponse

type History

type History struct {
	StakeAddress string `gorm:"column:stake_address"`
	PoolId       string `gorm:"column:pool_id"`
	EpochNumber  uint64 `gorm:"column:epoch_no"`
	ActiveStake  uint64 `gorm:"column:active_stake"`
}

type HistoryResponse

type HistoryResponse struct {
	StakeAddress string `json:"stake_address"`
	PoolId       string `json:"pool_id"`
	EpochNumber  uint64 `json:"epoch_no"`
	ActiveStake  string `json:"active_stake"`
}

func NewHistoryResponse

func NewHistoryResponse(h *History) *HistoryResponse

type Reward

type Reward struct {
	EarnedEpoch    uint64 `gorm:"column:earned_epoch"`
	SpendableEpoch uint64 `gorm:"column:spendable_epoch"`
	Amount         uint64 `gorm:"column:amount"`
	Type           string `gorm:"column:type"`
	PoolId         string `gorm:"column:pool_id"`
}

type RewardResponse

type RewardResponse struct {
	EarnedEpoch    uint64 `json:"earned_epoch"`
	SpendableEpoch uint64 `json:"spendable_epoch"`
	Amount         string `json:"amount"`
	Type           string `json:"type"`
	PoolId         string `json:"pool_id"`
}

func NewRewardResponse

func NewRewardResponse(x *Reward) *RewardResponse

type Update

type Update struct {
	ActionType string `gorm:"column:action_type"`
	TxHash     []byte `gorm:"column:tx_hash"`
}

type UpdateResponse

type UpdateResponse struct {
	ActionType string `json:"action_type"`
	TxHash     string `json:"tx_hash"`
}

func NewUpdateResponse

func NewUpdateResponse(u *Update) *UpdateResponse

Jump to

Keyboard shortcuts

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