types

package
v1.0.10 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TransactionPending   = "Pending"
	TransactionCompleted = "Completed"
	TransactionFailed    = "Failed"
	TransactionReplaced  = "Replaced"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Address

type Address struct {
	Network string `json:"network"`
	Label   string `json:"label"`
	Value   string `json:"value"`
	Creator string `json:"creator"`
}

type AddressThresholdAmountByFarm

type AddressThresholdAmountByFarm struct {
	Id         string    `db:"id"`
	BTCAddress string    `db:"btc_address"`
	FarmId     string    `db:"farm_id"`
	AmountBTC  string    `db:"amount_btc"`
	CreatedAt  time.Time `db:"createdAt"`
	UpdatedAt  time.Time `db:"updatedAt"`
}

type AmountInfo

type AmountInfo struct {
	Amount           decimal.Decimal
	ThresholdReached bool
}

type AuraPoolCollection

type AuraPoolCollection struct {
	Id           int64   `db:"id"`
	DenomId      string  `db:"denom_id"`
	HashingPower float64 `db:"hashing_power"`
}

type Block

type Block struct {
	Header Blockheader `json:"header"`
}

type BlockSearchResponse

type BlockSearchResponse struct {
	Result struct {
		Blocks []GetBlockResponse `json:"blocks"`
	} `json:"result"`
}

type Blockheader

type Blockheader struct {
	Height string `json:"height"`
	Time   string `json:"time"`
}

type BtcNetworkParams

type BtcNetworkParams struct {
	ChainParams      *chaincfg.Params
	MinConfirmations int
}

type BtcWalletTransaction added in v1.0.8

type BtcWalletTransaction struct {
	Amount            float64                       `json:"amount"`
	Fee               float64                       `json:"fee"`
	Confirmations     int64                         `json:"confirmations"`
	Trusted           bool                          `json:"trusted"`
	Txid              string                        `json:"txid"`
	WalletConflicts   []string                      `json:"walletconflicts"`
	Time              uint64                        `json:"time"`
	Timereceived      uint64                        `json:"timereceived"`
	Bip125Replaceable string                        `json:"bip125-replaceable"`
	ReplacedByTxid    string                        `json:"replaced_by_txid"`
	ReplacesTxid      string                        `json:"replaces_txid"`
	Details           []BtcWalletTransactionDetails `json:"details"`
	Hex               string                        `json:"hex"`
}

type BtcWalletTransactionDetails added in v1.0.8

type BtcWalletTransactionDetails struct {
	Address   string  `json:"address"`
	Category  string  `json:"category"`
	Amount    float64 `json:"amount"`
	Vout      uint64  `json:"vout"`
	Fee       float64 `json:"fee"`
	Abandoned bool    `json:"abandoned"`
}

type CData

type CData struct {
	DenomsByDataProperty []DenomsByDataProperty `json:"denoms_by_data_property"`
}

type Collection

type Collection struct {
	Denom Denom `json:"denom"`
	Nfts  []NFT `json:"nfts"`
}

type CollectionData

type CollectionData struct {
	Data CData `json:"data"`
}

type CollectionPaymentAllocation

type CollectionPaymentAllocation struct {
	Id                         int64           `db:"id"`
	FarmId                     int64           `db:"farm_id"`
	FarmPaymentId              int64           `db:"farm_payment_id"`
	CollectionId               int64           `db:"collection_id"`
	CollectionAllocationAmount decimal.Decimal `db:"collection_allocation_amount_btc"`
	CUDOGeneralFee             decimal.Decimal `db:"cudo_general_fee_btc"`
	CUDOMaintenanceFee         decimal.Decimal `db:"cudo_maintenance_fee_btc"`
	FarmUnsoldLeftovers        decimal.Decimal `db:"farm_unsold_leftover_btc"`
	FarmMaintenanceFee         decimal.Decimal `db:"farm_maintenance_fee_btc"`
	CreatedAt                  time.Time       `db:"createdAt"`
	UpdatedAt                  time.Time       `db:"updatedAt"`
}

type CollectionResponse

type CollectionResponse struct {
	Height string           `json:"height"`
	Result CollectionResult `json:"result"`
}

type CollectionResult

type CollectionResult struct {
	Collections []Collection `json:"collections"`
}

type Data

type Data struct {
	NestedData NestedData `json:"action_nft_transfer_events"`
}

type DataJsonCollection

type DataJsonCollection struct {
	FarmId string `json:"farm_id"`
	Owner  string `json:"owner"`
}

type Denom

type Denom struct {
	Id          string `json:"id"`
	Name        string `json:"name"`
	Schema      string `json:"schema"`
	Creator     string `json:"creator"`
	Symbol      string `json:"symbol"`
	Traits      string `json:"traits"`
	Minter      string `json:"minter"`
	Description string `json:"description"`
	Data        string `json:"data"`
}

type DenomsByDataProperty

type DenomsByDataProperty struct {
	Id       string             `json:"id"`
	DataJson DataJsonCollection `json:"data_json"`
}

type Farm

type Farm struct {
	Id                           int64  `db:"id"`
	Name                         string `db:"name"`
	Description                  string `db:"description"`
	SubAccountName               string `db:"sub_account_name"`
	RewardsFromPoolBtcWalletName string `db:"rewards_from_pool_btc_wallet_name"`
	// Location                           string  `db:"location"`
	TotalHashPower                     float64 `db:"total_farm_hashrate"`
	AddressForReceivingRewardsFromPool string  `db:"address_for_receiving_rewards_from_pool"`
	LeftoverRewardPayoutAddress        string  `db:"leftover_reward_payout_address"`
	MaintenanceFeePayoutAddress        string  `db:"maintenance_fee_payout_address"`
	MaintenanceFeeInBtc                float64 `db:"maintenance_fee_in_btc"`
	// Manufacturers                      []uint8 `db:"manufacturers"`
	// MinerTypes                         []uint8 `db:"miner_types"`
	// EnergySource                       []uint8 `db:"energy_source"`
	// Status                             string  `db:"status"`
	// Images                             [][]uint8 `db:"images"`
	// ProfileImage                       []uint8 `db:"profile_img"`
	// CoverImage                         []uint8 `db:"cover_img"`
	// PrimaryAccountOwnerName            string  `db:"primary_account_owner_name"`
	// PrimaryAccountOwnerEmail           string  `db:"primary_account_owner_email"`
	// CreatorId                          int     `db:"creator_id"`
	// DeletedAt                          int64   `db:"deleted_at"`
	CreatedAt time.Time `db:"created_at"`
	// UpdatedAt                          int64   `db:"updated_at"`
	// ResaleFarmRoyaltiesCudosAddress    string  `db:"resale_farm_royalties_cudos_address"`
	// CudosMintNftRoyaltiesPercent       float64 `db:"cudos_mint_nft_royalties_percent"`
	// CudosResaleNftRoyaltiesPercent     float64 `db:"cudos_resale_nft_royalties_percent"`
	FarmStartTime time.Time `db:"farm_start_time"`
}

type FarmHashRate

type FarmHashRate []FarmHashRateElement

type FarmHashRateElement

type FarmHashRateElement struct {
	Time             string  `json:"time"`
	UnixTime         int64   `json:"unixTime"`
	AverageWorkers   float64 `json:"averageWorkers"`
	HashrateAccepted float64 `json:"hashrateAccepted"`
	HashrateStale    int64   `json:"hashrateStale"`
	HashrateRejected int64   `json:"hashrateRejected"`
}

type FarmPayment

type FarmPayment struct {
	Id        string          `db:"id"`
	FarmId    int64           `db:"farm_id"`
	AmountBTC decimal.Decimal `db:"amount_btc"`
	CreatedAt time.Time       `db:"createdAt"`
	UpdatedAt time.Time       `db:"updatedAt"`
}

type GetBlockResponse

type GetBlockResponse struct {
	Block Block `json:"block"`
}

type HasuraNftMintEvent

type HasuraNftMintEvent struct {
	TokenId   int64 `json:"id"`
	Timestamp int64 `json:"timestamp"`
}

type HasuraTx

type HasuraTx struct {
	Hash  string `json:"hash"`
	Block struct {
		Time string `json:"timestamp"`
	} `json:"block"`
}

type HasuraTxResult

type HasuraTxResult struct {
	Data struct {
		Transactions []HasuraTx `json:"transaction"`
	} `json:"data"`
}

type MappedAddress

type MappedAddress struct {
	Address Address `json:"address"`
}

type NFT

type NFT struct {
	Id       string      `json:"id"`
	Name     string      `json:"name"`
	Uri      string      `json:"uri"`
	Data     string      `json:"data"`
	DataJson NFTDataJson `json:"data_json"`
	Owner    string      `json:"owner"`
}

type NFTDataJson

type NFTDataJson struct {
	ExpirationDate int64   `json:"expiration_date"`
	HashRateOwned  float64 `json:"hash_rate_owned"`
}

type NFTOwnerInformation

type NFTOwnerInformation struct {
	TimeOwnedFrom      int64           `db:"time_owned_from"`
	TimeOwnedTo        int64           `db:"time_owned_to"`
	TotalTimeOwned     int64           `db:"total_time_owned"`
	PercentOfTimeOwned float64         `db:"percent_of_time_owned"`
	Owner              string          `db:"owner"`
	PayoutAddress      string          `db:"payout_address"`
	Reward             decimal.Decimal `db:"reward"`
	CreatedAt          time.Time       `db:"createdAt"`
	UpdatedAt          time.Time       `db:"updatedAt"`
}

type NFTOwnerInformationRepo

type NFTOwnerInformationRepo struct {
	TimeOwnedFrom      int64     `db:"time_owned_from"`
	TimeOwnedTo        int64     `db:"time_owned_to"`
	TotalTimeOwned     int64     `db:"total_time_owned"`
	PercentOfTimeOwned float64   `db:"percent_of_time_owned"`
	Owner              string    `db:"owner"`
	PayoutAddress      string    `db:"payout_address"`
	Reward             string    `db:"reward"`
	CreatedAt          time.Time `db:"createdAt"`
	UpdatedAt          time.Time `db:"updatedAt"`
}

type NFTStatistics

type NFTStatistics struct {
	Id                       string          `db:"id"`
	TokenId                  string          `db:"token_id"`
	DenomId                  string          `db:"denom_id"`
	FarmPaymentId            int64           `db:"farm_payment_id"`
	PayoutPeriodStart        int64           `db:"payout_period_start"`
	PayoutPeriodEnd          int64           `db:"payout_period_end"`
	Reward                   decimal.Decimal `db:"reward"`
	MaintenanceFee           decimal.Decimal `db:"maintenance_fee"`
	CUDOPartOfMaintenanceFee decimal.Decimal `db:"cudo_part_of_maintenance_fee"`
	NFTOwnersForPeriod       []NFTOwnerInformation
	TxHash                   string    `db:"tx_hash"`
	CreatedAt                time.Time `db:"createdAt"`
	UpdatedAt                time.Time `db:"updatedAt"`
}

type NFTStatisticsRepo

type NFTStatisticsRepo struct {
	Id                       string `db:"id"`
	TokenId                  string `db:"token_id"`
	DenomId                  string `db:"denom_id"`
	FarmPaymentId            int64  `db:"farm_payment_id"`
	PayoutPeriodStart        int64  `db:"payout_period_start"`
	PayoutPeriodEnd          int64  `db:"payout_period_end"`
	Reward                   string `db:"reward"`
	MaintenanceFee           string `db:"maintenance_fee"`
	CUDOPartOfMaintenanceFee string `db:"cudo_part_of_maintenance_fee"`
	NFTOwnersForPeriod       []NFTOwnerInformationRepo
	TxHash                   string    `db:"tx_hash"`
	CreatedAt                time.Time `db:"createdAt"`
	UpdatedAt                time.Time `db:"updatedAt"`
}

type NestedData

type NestedData struct {
	Events []NftTransferEvent `json:"events"`
}

type NftMintHistory

type NftMintHistory struct {
	Data struct {
		History []HasuraNftMintEvent `json:"nft_transfer_history"`
	} `json:"data"`
}

type NftTransferEvent

type NftTransferEvent struct {
	DenomId   string `json:"denom_id"`
	TokenId   string `json:"token_id"`
	To        string `json:"to"`
	From      string `json:"from"`
	Timestamp int64  `json:"timestamp"`
}

type NftTransferHistory

type NftTransferHistory struct {
	Data Data `json:"data"`
}

type RBFTransactionHistory

type RBFTransactionHistory struct {
	Id                string    `db:"id"`
	FarmId            string    `db:"farm_id"`
	OldTxHash         string    `db:"old_tx_hash"`
	NewTxHash         string    `db:"new_tx_hash"`
	FarmBtcWalletName string    `db:"farm_btc_wallet_name"`
	CreatedAt         time.Time `db:"createdAt"`
	UpdatedAt         time.Time `db:"updatedAt"`
}

type TransactionHashWithStatus

type TransactionHashWithStatus struct {
	Id                string    `db:"id"`
	FarmPaymentId     int64     `db:"farm_payment_id"`
	TxHash            string    `db:"tx_hash"`
	Status            string    `db:"status"`
	TimeSent          int64     `db:"time_sent"`
	FarmBtcWalletName string    `db:"farm_btc_wallet_name"`
	RetryCount        int       `db:"retry_count"`
	CreatedAt         time.Time `db:"createdAt"`
	UpdatedAt         time.Time `db:"updatedAt"`
}

type Tx

type Tx struct {
	TxResult TxResult `json:"tx_result"`
	Hash     string   `json:"hash"`
	Height   string   `json:"height"`
}

type TxQueryResponse

type TxQueryResponse struct {
	Result struct {
		Txs   []Tx   `json:"txs"`
		Total string `json:"total_count"`
	} `json:"result"`
}

type TxResult

type TxResult struct {
	Events []sdk.Event `json:"events"`
}

type UTXOTransaction

type UTXOTransaction struct {
	Id               string    `db:"id"`
	FarmId           string    `db:"farm_id"`
	TxHash           string    `db:"tx_hash"`
	PaymentTimestamp int64     `db:"payment_timestamp"`
	Processed        bool      `db:"processed"`
	CreatedAt        time.Time `db:"createdAt"`
	UpdatedAt        time.Time `db:"updatedAt"`
}

Jump to

Keyboard shortcuts

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