webrpc

package
v1.28.6 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2026 License: Apache-2.0, MIT Imports: 84 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnrichStoragePathInfo added in v1.28.3

func EnrichStoragePathInfo(info *StoragePathInfo)

EnrichStoragePathInfo fills computed UI fields on a storage path row.

func FormatTimeAgo added in v1.28.3

func FormatTimeAgo(t time.Time) string

FormatTimeAgo returns a short relative time string.

func MountRPC added in v1.28.3

func MountRPC(r *mux.Router, handler any, debug bool)

func Routes

func Routes(r *mux.Router, deps *deps.Deps, debug bool)

func SplitTrimmed added in v1.28.3

func SplitTrimmed(s string) []string

SplitTrimmed splits a comma-separated string and trims whitespace.

Types

type AddrInfo added in v1.24.3

type AddrInfo struct {
	ID    string   `json:"ID"`
	Addrs []string `json:"Addrs"`
}
type Advertisement struct {
	Slash string `json:"/"`
}

type AlertComment added in v1.27.3

type AlertComment struct {
	ID        int64     `db:"id" json:"ID"`
	AlertID   int64     `db:"alert_id" json:"AlertID"`
	Comment   string    `db:"comment" json:"Comment"`
	CreatedBy string    `db:"created_by" json:"CreatedBy"`
	CreatedAt time.Time `db:"created_at" json:"CreatedAt"`
}

AlertComment represents a comment on an alert

type AlertHistoryEntry added in v1.27.3

type AlertHistoryEntry struct {
	ID             int64      `db:"id" json:"ID"`
	AlertName      string     `db:"alert_name" json:"AlertName"`
	Message        string     `db:"message" json:"Message"`
	MachineName    *string    `db:"machine_name" json:"MachineName"`
	CreatedAt      time.Time  `db:"created_at" json:"CreatedAt"`
	Acknowledged   bool       `db:"acknowledged" json:"Acknowledged"`
	AcknowledgedBy *string    `db:"acknowledged_by" json:"AcknowledgedBy"`
	AcknowledgedAt *time.Time `db:"acknowledged_at" json:"AcknowledgedAt"`
	SentToPlugins  bool       `db:"sent_to_plugins" json:"SentToPlugins"`
	SentAt         *time.Time `db:"sent_at" json:"SentAt"`
	CommentCount   int        `db:"comment_count" json:"CommentCount"`
}

AlertHistoryEntry represents an alert in the history

type AlertHistoryListResult added in v1.27.3

type AlertHistoryListResult struct {
	Alerts              []AlertHistoryEntry `json:"Alerts"`
	Total               int                 `json:"Total"`
	UnacknowledgedTotal int                 `json:"UnacknowledgedTotal"`
}

AlertHistoryListResult wraps the paginated result

type AlertMute added in v1.27.3

type AlertMute struct {
	ID        int64      `db:"id" json:"ID"`
	AlertName string     `db:"alert_name" json:"AlertName"`
	Pattern   *string    `db:"pattern" json:"Pattern"`
	Reason    string     `db:"reason" json:"Reason"`
	MutedBy   string     `db:"muted_by" json:"MutedBy"`
	MutedAt   time.Time  `db:"muted_at" json:"MutedAt"`
	ExpiresAt *time.Time `db:"expires_at" json:"ExpiresAt"`
	Active    bool       `db:"active" json:"Active"`
}

AlertMute represents a muted alert pattern

type AlertOngoingEntry added in v1.28.3

type AlertOngoingEntry struct {
	AlertName     string    `db:"alert_name" json:"AlertName"`
	Message       string    `db:"message" json:"Message"`
	CreatedAt     time.Time `db:"created_at" json:"CreatedAt"`
	LastUpdatedAt time.Time `db:"last_updated_at" json:"LastUpdatedAt"`
}

type AllowDeny added in v1.24.3

type AllowDeny struct {
	Wallet string `db:"wallet" json:"wallet"`
	Status bool   `db:"status" json:"status"`
}

type BalanceMgrRule added in v1.26.0

type BalanceMgrRule struct {
	ID              int64   `json:"id"`
	SubjectAddress  string  `json:"subject_address"`
	SecondAddress   string  `json:"second_address"`
	ActionType      string  `json:"action_type"`
	SubjectType     string  `json:"subject_type"`
	LowWatermark    string  `json:"low_watermark"`
	HighWatermark   string  `json:"high_watermark"`
	TaskID          *int64  `json:"task_id,omitempty"`
	LastMsgCID      *string `json:"last_msg_cid,omitempty"`
	LastMsgSentAt   *string `json:"last_msg_sent_at,omitempty"`
	LastMsgLandedAt *string `json:"last_msg_landed_at,omitempty"`
}

BalanceMgrRule represents a balance manager rule with display-friendly fields. Watermark values are returned as short FIL strings (e.g. "0.25 FIL"). Nullable DB fields are returned as pointers so JSON omits them when nil. Time values are formatted on the JS side – we simply expose RFC3339 strings.

NOTE: Any new columns that should be exposed can be trivially added here.

type ChainStatusResponse added in v1.28.3

type ChainStatusResponse struct {
	NetworkName    string `json:"networkName"`
	Epoch          int64  `json:"epoch"`
	SyncStatus     string `json:"syncStatus"`
	ReachableNodes int    `json:"reachableNodes"`
	TotalNodes     int    `json:"totalNodes"`
}

type ClientFilter added in v1.24.3

type ClientFilter struct {
	Name   string `db:"name" json:"name"`
	Active bool   `db:"active" json:"active"`

	Wallets []string `db:"wallets" json:"wallets"`
	Peers   []string `db:"peer_ids" json:"peers"`

	PricingFilters []string `db:"pricing_filters" json:"pricing_filters"`

	MaxDealsPerHour    int64 `db:"max_deals_per_hour" json:"max_deals_per_hour"`
	MaxDealSizePerHour int64 `db:"max_deal_size_per_hour" json:"max_deal_size_per_hour"`

	Info string `db:"additional_info" json:"info"`
}

type ContentInfo added in v1.27.2

type ContentInfo struct {
	PieceCID string `json:"piece_cid"`
	Offset   uint64 `json:"offset"`
	Size     uint64 `json:"size"`

	Err string `json:"err"`
}

ContentInfo represents information about content location

type DefaultFilterBehaviourResponse added in v1.25.0

type DefaultFilterBehaviourResponse struct {
	AllowDealsFromUnknownClients             bool            `json:"allow_deals_from_unknown_clients"`
	IsDealRejectedWhenCidGravityNotReachable bool            `json:"is_deal_rejected_when_cid_gravity_not_reachable"`
	IsCidGravityEnabled                      map[string]bool `json:"cid_gravity_status"`
}

type EntryInfo added in v1.24.3

type EntryInfo struct {
	PieceCID string `db:"piece_cid"`
	FromCar  bool   `db:"from_car"`

	FirstCID    NullString `db:"first_cid"`
	StartOffset NullInt64  `db:"start_offset"`
	NumBlocks   int64      `db:"num_blocks"`

	PrevCID NullString `db:"prev_cid"`

	Err  *string
	Size int64
}

type EthPendingMessage added in v1.28.3

type EthPendingMessage struct {
	TxHash     string     `json:"txHash"`
	SendReason string     `json:"sendReason"`
	SendTime   *time.Time `json:"sendTime"`
}

type FSPDPOffering added in v1.27.2

type FSPDPOffering struct {
	ServiceURL               string `json:"service_url"`
	MinPieceSizeInBytes      int64  `json:"min_size"`
	MaxPieceSizeInBytes      int64  `json:"max_size"`
	IpniPiece                bool   `json:"ipni_piece"`
	IpniIpfs                 bool   `json:"ipni_ipfs"`
	IpniPeerID               string `json:"ipni_peer_id"` // Base58 encoded PeerID
	StoragePricePerTibPerDay int64  `json:"price"`
	MinProvingPeriodInEpochs int64  `json:"min_proving_period"`
	Location                 string `json:"location"`
	PaymentTokenAddress      string `json:"payment_token_address"`
	CapacityTiB              int64  `json:"capacity_tib"`
}

type FSRegistryStatus added in v1.27.2

type FSRegistryStatus struct {
	Address      string            `json:"address"`
	ID           int64             `json:"id"`
	Active       bool              `json:"status"`
	Name         string            `json:"name"`
	Description  string            `json:"description"`
	Payee        string            `json:"payee"`
	PDPService   *FSPDPOffering    `json:"pdp_service"`
	Capabilities map[string]string `json:"capabilities"`
}

type Handler added in v1.28.3

type Handler struct {
	Deps      *deps.Deps
	TaskSPIDs map[string]SpidGetter
	Stor      adt.Store
}

Handler holds shared WebRPC state used by Skiff and Curio handlers.

func NewHandler added in v1.28.3

func NewHandler(deps *deps.Deps) *Handler

func (*Handler) BlockDelaySecs added in v1.28.3

func (a *Handler) BlockDelaySecs(context.Context) (uint64, error)

func (*Handler) PipelineStatsMarket added in v1.28.3

func (a *Handler) PipelineStatsMarket(ctx context.Context) (*PipelineStats, error)

func (*Handler) StoragePathList added in v1.28.3

func (a *Handler) StoragePathList(ctx context.Context) ([]*StoragePathInfo, error)

StoragePathList returns all storage mounts with capacity / health stats.

func (*Handler) UIVariant added in v1.28.3

func (a *Handler) UIVariant(context.Context) (string, error)

func (*Handler) Version added in v1.28.3

func (a *Handler) Version(context.Context) (string, error)

type HarmonyMachineDesc

type HarmonyMachineDesc struct {
	MachineID   int64  `db:"machine_id"`
	Name        string `db:"machine_name"`
	MachineAddr string `db:"host_and_port"`
	Actors      string `db:"miners"`
}

type HarmonyTask added in v1.24.3

type HarmonyTask struct {
	ID         int64      `db:"id"`
	Name       string     `db:"name"`
	UpdateTime time.Time  `db:"update_time"`
	PostedTime time.Time  `db:"posted_time"`
	OwnerID    NullInt64  `db:"owner_id"`
	OwnerAddr  NullString `db:"owner_addr"`
	OwnerName  NullString `db:"owner_name"`
}

HarmonyTask represents the current state of a task.

type HarmonyTaskHistory

type HarmonyTaskHistory struct {
	ID     int64  `db:"id"`
	TaskID int64  `db:"task_id"`
	Name   string `db:"name"`

	WorkStart time.Time `db:"work_start"`
	WorkEnd   time.Time `db:"work_end"`
	Posted    time.Time `db:"posted"`

	Took string `db:"-"`

	Result bool   `db:"result"`
	Err    string `db:"err"`

	CompletedBy     string     `db:"completed_by_host_and_port"`
	CompletedById   NullInt64  `db:"completed_by_machine"`
	CompletedByName NullString `db:"completed_by_machine_name"`

	Events []*SectorEvent `db:"-"`
}

type HarmonyTaskStats

type HarmonyTaskStats struct {
	Name       string `db:"name" json:"name"`
	Success    int    `db:"success" json:"success"`
	Failure    int    `db:"failure" json:"failure"`
	TotalCount int    `db:"total" json:"total"`
}

type IPNI added in v1.24.3

type IPNI struct {
	SpId       int64            `db:"sp_id" json:"sp_id"`
	PeerID     string           `db:"peer_id" json:"peer_id"`
	Head       string           `db:"head" json:"head"`
	Miner      string           `json:"miner"`
	SyncStatus []IpniSyncStatus `json:"sync_status"`
}

type IpniAd added in v1.24.3

type IpniAd struct {
	AdCid           string     `db:"ad_cid" json:"ad_cid"`
	ContextID       []byte     `db:"context_id" json:"context_id"`
	IsRM            bool       `db:"is_rm" json:"is_rm"`
	IsSkip          bool       `db:"is_skip" json:"is_skip"`
	PreviousAd      NullString `db:"previous"`
	Previous        string     `json:"previous"`
	SpID            int64      `db:"sp_id" json:"sp_id"`
	Addresses       NullString `db:"addresses"`
	AddressesString string     `json:"addresses"`
	Entries         string     `db:"entries" json:"entries"`
	PieceCid        string     `json:"piece_cid"`
	PieceSize       int64      `json:"piece_size"`
	Miner           string     `json:"miner"`

	EntryCount int64 `json:"entry_count"`
	CIDCount   int64 `json:"cid_count"`

	AdCids     []string `db:"-" json:"ad_cids"`
	PieceCidV2 string   `db:"-" json:"piece_cid_v2"`
}

type IpniSyncStatus added in v1.24.3

type IpniSyncStatus struct {
	Service               string    `json:"service"`
	RemoteAd              string    `json:"remote_ad"`
	PublisherAddress      string    `json:"publisher_address"`
	Address               string    `json:"address"`
	LastAdvertisementTime time.Time `json:"last_advertisement_time"`
	Error                 string    `json:"error"`
}

type MK12Deal added in v1.24.3

type MK12Deal struct {
	UUID              string          `db:"uuid" json:"uuid"`
	SpId              int64           `db:"sp_id" json:"sp_id"`
	CreatedAt         time.Time       `db:"created_at" json:"created_at"`
	SignedProposalCid string          `db:"signed_proposal_cid" json:"signed_proposal_cid"`
	ProposalSignature []byte          `db:"proposal_signature" json:"proposal_signature"`
	Proposal          json.RawMessage `db:"proposal" json:"proposal"`
	ProposalCid       string          `db:"proposal_cid" json:"proposal_cid"`
	Offline           bool            `db:"offline" json:"offline"`
	Verified          bool            `db:"verified" json:"verified"`
	StartEpoch        int64           `db:"start_epoch" json:"start_epoch"`
	EndEpoch          int64           `db:"end_epoch" json:"end_epoch"`
	ClientPeerId      string          `db:"client_peer_id" json:"client_peer_id"`
	ChainDealId       sql.NullInt64   `db:"chain_deal_id" json:"chain_deal_id"`
	PublishCid        sql.NullString  `db:"publish_cid" json:"publish_cid"`
	PieceCid          string          `db:"piece_cid" json:"piece_cid"`
	PieceSize         int64           `db:"piece_size" json:"piece_size"`
	FastRetrieval     bool            `db:"fast_retrieval" json:"fast_retrieval"`
	AnnounceToIPNI    bool            `db:"announce_to_ipni" json:"announce_to_ipni"`
	URL               sql.NullString  `db:"url" json:"url"`
	URLHeaders        json.RawMessage `db:"url_headers" json:"url_headers"`
	Error             sql.NullString  `db:"error" json:"error"`
	IsDDO             bool            `db:"is_ddo" json:"is_ddo"`

	Addr string `db:"-" json:"addr"`
}

MK12Deal represents a record from market_mk12_deals or market_direct_deals table

type MK12DealPipeline added in v1.24.3

type MK12DealPipeline struct {
	UUID              string          `db:"uuid" json:"uuid"`
	SpId              int64           `db:"sp_id" json:"sp_id"`
	Started           sql.NullBool    `db:"started" json:"started"`
	PieceCid          string          `db:"piece_cid" json:"piece_cid"`
	PieceSize         int64           `db:"piece_size" json:"piece_size"`
	RawSize           sql.NullInt64   `db:"raw_size" json:"raw_size"`
	Offline           bool            `db:"offline" json:"offline"`
	URL               sql.NullString  `db:"url" json:"url"`
	Headers           json.RawMessage `db:"headers" json:"headers"`
	CommpTaskId       sql.NullInt64   `db:"commp_task_id" json:"commp_task_id"`
	AfterCommp        sql.NullBool    `db:"after_commp" json:"after_commp"`
	PsdTaskId         sql.NullInt64   `db:"psd_task_id" json:"psd_task_id"`
	AfterPsd          sql.NullBool    `db:"after_psd" json:"after_psd"`
	PsdWaitTime       sql.NullTime    `db:"psd_wait_time" json:"psd_wait_time"`
	FindDealTaskId    sql.NullInt64   `db:"find_deal_task_id" json:"find_deal_task_id"`
	AfterFindDeal     sql.NullBool    `db:"after_find_deal" json:"after_find_deal"`
	Sector            sql.NullInt64   `db:"sector" json:"sector"`
	RegSealProof      sql.NullInt64   `db:"reg_seal_proof" json:"reg_seal_proof"`
	SectorOffset      sql.NullInt64   `db:"sector_offset" json:"sector_offset"`
	Sealed            sql.NullBool    `db:"sealed" json:"sealed"`
	ShouldIndex       sql.NullBool    `db:"should_index" json:"should_index"`
	IndexingCreatedAt sql.NullTime    `db:"indexing_created_at" json:"indexing_created_at"`
	IndexingTaskId    sql.NullInt64   `db:"indexing_task_id" json:"indexing_task_id"`
	Indexed           sql.NullBool    `db:"indexed" json:"indexed"`
	Announce          sql.NullBool    `db:"announce" json:"announce"`
	Complete          bool            `db:"complete" json:"complete"`
	CreatedAt         time.Time       `db:"created_at" json:"created_at"`
}

MK12DealPipeline represents a record from market_mk12_deal_pipeline table

type MK12Pipeline added in v1.24.3

type MK12Pipeline struct {
	// Cache line 1 (bytes 0-64): Hot path - piece identification and early checks
	UUID      string `db:"uuid" json:"uuid"`             // 16 bytes (0-16)
	SpID      int64  `db:"sp_id" json:"sp_id"`           // 8 bytes (16-24)
	PieceCid  string `db:"piece_cid" json:"piece_cid"`   // 16 bytes (24-40)
	PieceSize int64  `db:"piece_size" json:"piece_size"` // 8 bytes (40-48)
	Offline   bool   `db:"offline" json:"offline"`       // 1 byte (48-49) - checked early for download decisions
	Started   bool   `db:"started" json:"started"`       // 1 byte (49-50) - checked early
	// Cache line 2 (bytes 64-128): Task IDs and stage tracking (NullInt64 = 16 bytes)
	CommTaskID     sql.NullInt64 `db:"commp_task_id" json:"commp_task_id"`         // 16 bytes
	PSDTaskID      sql.NullInt64 `db:"psd_task_id" json:"psd_task_id"`             // 16 bytes
	FindDealTaskID sql.NullInt64 `db:"find_deal_task_id" json:"find_deal_task_id"` // 16 bytes
	AfterCommp     bool          `db:"after_commp" json:"after_commp"`             // 1 byte
	AfterPSD       bool          `db:"after_psd" json:"after_psd"`                 // 1 byte
	AfterFindDeal  bool          `db:"after_find_deal" json:"after_find_deal"`     // 1 byte
	// Cache line 3 (bytes 128-192): Sector placement and sizing (NullInt64 = 16 bytes)
	RawSize sql.NullInt64 `db:"raw_size" json:"raw_size"`           // 16 bytes
	Sector  sql.NullInt64 `db:"sector" json:"sector"`               // 16 bytes
	Offset  sql.NullInt64 `db:"sector_offset" json:"sector_offset"` // 16 bytes
	// Cache line 4 (bytes 192-256): Timing information
	PSDWaitTime sql.NullTime `db:"psd_wait_time" json:"psd_wait_time"` // 32 bytes (NullTime)
	CreatedAt   time.Time    `db:"created_at" json:"created_at"`       // 24 bytes
	// Cache line 5+ (bytes 256+): Data URL and larger fields (NullString = 24 bytes)
	URL        sql.NullString `db:"url" json:"url"`         // 24 bytes - only for online deals
	PieceCidV2 string         `db:"-" json:"piece_cid_v2"`  // 16 bytes - computed field
	Miner      string         `json:"miner"`                // 16 bytes - display field
	Headers    []byte         `db:"headers" json:"headers"` // 24 bytes - only for online deals
	// Status bools: rarely checked ones at end
	Indexed  bool `db:"indexed" json:"indexed"`   // checked for indexing
	Announce bool `db:"announce" json:"announce"` // checked for IPNI announce
	Complete bool `db:"complete" json:"complete"` // checked for completion
}

type MK20DDOPipeline added in v1.27.2

type MK20DDOPipeline struct {
	ID               string         `db:"id" json:"id"`
	SpId             int64          `db:"sp_id" json:"sp_id"`
	Contract         string         `db:"contract" json:"contract"`
	Client           string         `db:"client" json:"client"`
	PieceCidV2       string         `db:"piece_cid_v2" json:"piece_cid_v2"`
	PieceCid         string         `db:"piece_cid" json:"piece_cid"`
	PieceSize        int64          `db:"piece_size" json:"piece_size"`
	RawSize          uint64         `db:"raw_size" json:"raw_size"`
	Offline          bool           `db:"offline" json:"offline"`
	URL              sql.NullString `db:"url" json:"url"`
	Indexing         bool           `db:"indexing" json:"indexing"`
	Announce         bool           `db:"announce" json:"announce"`
	AllocationID     sql.NullInt64  `db:"allocation_id" json:"allocation_id"`
	Duration         int64          `db:"duration" json:"duration"`
	PieceAggregation int            `db:"piece_aggregation" json:"piece_aggregation"`

	Started    bool `db:"started" json:"started"`
	Downloaded bool `db:"downloaded" json:"downloaded"`

	CommpTaskId sql.NullInt64 `db:"commp_task_id" json:"commp_task_id"`
	AfterCommp  bool          `db:"after_commp" json:"after_commp"`

	DealAggregation   int           `db:"deal_aggregation" json:"deal_aggregation"`
	AggregationIndex  int64         `db:"aggr_index" json:"aggr_index"`
	AggregationTaskID sql.NullInt64 `db:"agg_task_id" json:"agg_task_id"`
	Aggregated        bool          `db:"aggregated" json:"aggregated"`

	Sector       sql.NullInt64 `db:"sector" json:"sector"`
	RegSealProof sql.NullInt64 `db:"reg_seal_proof" json:"reg_seal_proof"`
	SectorOffset sql.NullInt64 `db:"sector_offset" json:"sector_offset"`
	Sealed       bool          `db:"sealed" json:"sealed"`

	IndexingCreatedAt sql.NullTime  `db:"indexing_created_at" json:"indexing_created_at"`
	IndexingTaskId    sql.NullInt64 `db:"indexing_task_id" json:"indexing_task_id"`
	Indexed           bool          `db:"indexed" json:"indexed"`

	Complete  bool      `db:"complete" json:"complete"`
	CreatedAt time.Time `db:"created_at" json:"created_at"`

	Miner string `db:"-" json:"miner"`
}

MK20DealPipeline represents a record from market_mk20_ddo_pipeline table

type MK20PDPDealList added in v1.27.2

type MK20PDPDealList struct {
	ID         string     `db:"id" json:"id"`
	CreatedAt  time.Time  `db:"created_at" json:"created_at"`
	PieceCidV2 NullString `db:"piece_cid_v2" json:"piece_cid_v2"`
	Processed  bool       `db:"processed" json:"processed"`
	Error      NullString `db:"error" json:"error"`
}

type MK20PDPPipeline added in v1.27.2

type MK20PDPPipeline struct {
	ID              string `db:"id" json:"id"`
	Client          string `db:"client" json:"client"`
	PieceCidV2      string `db:"piece_cid_v2" json:"piece_cid_v2"`
	Indexing        bool   `db:"indexing" json:"indexing"`
	Announce        bool   `db:"announce" json:"announce"`
	AnnouncePayload bool   `db:"announce_payload" json:"announce_payload"`

	Downloaded bool `db:"downloaded" json:"downloaded"`

	CommpTaskId NullInt64 `db:"commp_task_id" json:"commp_task_id"`
	AfterCommp  bool      `db:"after_commp" json:"after_commp"`

	DealAggregation   int       `db:"deal_aggregation" json:"deal_aggregation"`
	AggregationIndex  int64     `db:"aggr_index" json:"aggr_index"`
	AggregationTaskID NullInt64 `db:"agg_task_id" json:"agg_task_id"`
	Aggregated        bool      `db:"aggregated" json:"aggregated"`

	AddPieceTaskID NullInt64 `db:"add_piece_task_id" json:"add_piece_task_id"`
	AfterAddPiece  bool      `db:"after_add_piece" json:"after_add_piece"`

	AfterAddPieceMsg bool `db:"after_add_piece_msg" json:"after_add_piece_msg"`

	SaveCacheTaskID NullInt64 `db:"save_cache_task_id" json:"save_cache_task_id"`
	AfterSaveCache  bool      `db:"after_save_cache" json:"after_save_cache"`

	IndexingCreatedAt NullTime  `db:"indexing_created_at" json:"indexing_created_at"`
	IndexingTaskId    NullInt64 `db:"indexing_task_id" json:"indexing_task_id"`
	Indexed           bool      `db:"indexed" json:"indexed"`

	Complete  bool      `db:"complete" json:"complete"`
	CreatedAt time.Time `db:"created_at" json:"created_at"`

	Miner string `db:"-" json:"miner"`
}

MK20PDPPipeline represents a record from market_mk20_PDP_pipeline table

type MK20PDPPipelineFailedStats added in v1.27.2

type MK20PDPPipelineFailedStats struct {
	DownloadingFailed int64
	CommPFailed       int64
	AggFailed         int64
	AddPieceFailed    int64
	SaveCacheFailed   int64
	IndexFailed       int64
}

type MK20PipelineFailedStats added in v1.27.2

type MK20PipelineFailedStats struct {
	DownloadingFailed int64
	CommPFailed       int64
	AggFailed         int64
	IndexFailed       int64
}

type MK20StorageDeal added in v1.27.2

type MK20StorageDeal struct {
	Deal   *mk20.Deal `json:"deal"`
	DDOErr NullString `json:"ddoerr"`
	PDPErr NullString `json:"pdperr"`
	DDOId  NullInt64  `json:"ddoid"`
}

type MK20StorageDealList added in v1.27.2

type MK20StorageDealList struct {
	ID         string     `db:"id" json:"id"`
	CreatedAt  time.Time  `db:"created_at" json:"created_at"`
	PieceCidV2 NullString `db:"piece_cid_v2" json:"piece_cid_v2"`
	Processed  bool       `db:"processed" json:"processed"`
	Error      NullString `db:"error" json:"error"`
	Miner      NullString `db:"miner" json:"miner"`
}

type MachineInfo added in v1.23.0

type MachineInfo struct {
	Info struct {
		Name           string
		Host           string
		ID             int64
		LastContact    string
		CPU            int64
		Memory         int64
		GPU            float64
		Layers         string
		Unschedulable  bool
		RunningTasks   int
		Tasks          string
		Miners         string
		StartupTime    *time.Time
		RestartRequest *time.Time
	}

	// Storage
	Storage []struct {
		ID            string
		URLs          string
		Weight        int64
		MaxStorage    int64
		CanSeal       bool
		CanStore      bool
		Groups        string
		AllowTo       string
		AllowTypes    string
		DenyTypes     string
		Capacity      int64
		Available     int64
		FSAvailable   int64
		Reserved      int64
		Used          int64
		AllowMiners   string
		DenyMiners    string
		LastHeartbeat time.Time
		HeartbeatErr  *string

		UsedPercent     float64
		ReservedPercent float64
	}

	// Storage URL Liveness
	StorageURLs []struct {
		StorageID      string
		URL            string
		LastChecked    time.Time
		LastLive       *time.Time
		LastDead       *time.Time
		LastDeadReason *string
	}

	// Tasks
	RunningTasks []struct {
		ID           int64
		Task         string
		Posted       string
		UpdateTime   string
		InitiatedBy  *int64
		AddedBy      int64
		PreviousTask *int64
		Retries      int64

		PoRepSector, PoRepSectorSP *int64
		PoRepSectorMiner           string
	}

	FinishedTasks []struct {
		ID      int64
		TaskID  int64
		Task    string
		Posted  string
		Start   string
		End     string
		Queued  string
		Took    string
		Result  bool
		Outcome string
		Message string
	}
}

type MachineSummary added in v1.23.0

type MachineSummary struct {
	Address      string
	ID           int64
	Name         string
	SinceContact string

	Tasks          string
	Cpu            int
	RamHumanized   string
	Gpu            int
	Layers         string
	Uptime         string
	Version        string
	Unschedulable  bool
	RestartRequest string
	Restarting     bool
	RunningTasks   int
}

type MarketBalanceStatus added in v1.24.3

type MarketBalanceStatus struct {
	Miner         string           `json:"miner"`
	MarketBalance string           `json:"market_balance"`
	Balances      []WalletBalances `json:"balances"`
}

type MessageDetail added in v1.24.3

type MessageDetail struct {
	FromKey                 string          `db:"from_key" json:"from_key"`
	ToAddr                  string          `db:"to_addr" json:"to_addr"`
	SendReason              string          `db:"send_reason" json:"send_reason"`
	SendTaskID              int64           `db:"send_task_id" json:"send_task_id"`
	UnsignedData            []byte          `db:"unsigned_data" json:"unsigned_data"`
	UnsignedCID             string          `db:"unsigned_cid" json:"unsigned_cid"`
	Nonce                   NullInt64       `db:"nonce" json:"nonce"`
	SignedData              []byte          `db:"signed_data" json:"signed_data"`
	SignedJSON              json.RawMessage `db:"signed_json" json:"signed_json"`
	SignedCID               string          `db:"signed_cid" json:"signed_cid"`
	SendTime                NullTime        `db:"send_time" json:"send_time"`
	SendSuccess             NullBool        `db:"send_success" json:"send_success"`
	SendError               NullString      `db:"send_error" json:"send_error"`
	WaiterMachineID         NullInt64       `db:"waiter_machine_id" json:"waiter_machine_id"`
	ExecutedTSKCID          NullString      `db:"executed_tsk_cid" json:"executed_tsk_cid"`
	ExecutedTSKEpoch        NullInt64       `db:"executed_tsk_epoch" json:"executed_tsk_epoch"`
	ExecutedMsgCID          NullString      `db:"executed_msg_cid" json:"executed_msg_cid"`
	ExecutedMsgData         json.RawMessage `db:"executed_msg_data" json:"executed_msg_data"`
	ExecutedReceiptExitCode NullInt64       `db:"executed_rcpt_exitcode" json:"executed_rcpt_exitcode"`
	ExecutedReceiptReturn   []byte          `db:"executed_rcpt_return" json:"executed_rcpt_return"`
	ExecutedReceiptGasUsed  NullInt64       `db:"executed_rcpt_gas_used" json:"executed_rcpt_gas_used"`

	ValueStr string `db:"-" json:"value_str"`
	FeeStr   string `db:"-" json:"fee_str"`
}

type MessageQueueSummary added in v1.28.3

type MessageQueueSummary struct {
	FilPendingCount int                  `json:"filPendingCount"`
	EthPendingCount int                  `json:"ethPendingCount"`
	FilPending      []PendingMessageItem `json:"filPending"`
	EthPending      []EthPendingMessage  `json:"ethPending"`
}

type NetBandwidthSummary added in v1.27.3

type NetBandwidthSummary struct {
	TotalIn  int64   `json:"totalIn"`
	TotalOut int64   `json:"totalOut"`
	RateIn   float64 `json:"rateIn"`
	RateOut  float64 `json:"rateOut"`
}

type NetNodeSummary added in v1.27.3

type NetNodeSummary struct {
	Node         string              `json:"node"`
	Epoch        int64               `json:"epoch"`
	PeerCount    int                 `json:"peerCount"`
	Bandwidth    NetBandwidthSummary `json:"bandwidth"`
	Reachability NetReachability     `json:"reachability"`
}

NetNodeSummary is one sampled chain node for the Network panel.

type NetReachability added in v1.27.3

type NetReachability struct {
	Status      string   `json:"status"`
	PublicAddrs []string `json:"publicAddrs"`
}

type NetSummaryResponse added in v1.27.3

type NetSummaryResponse struct {
	Epoch        int64               `json:"epoch"`
	PeerCount    int                 `json:"peerCount"`
	Bandwidth    NetBandwidthSummary `json:"bandwidth"`
	Reachability NetReachability     `json:"reachability"`
	NodeCount    int                 `json:"nodeCount"`
	Nodes        []NetNodeSummary    `json:"nodes"`
}

type NullBool added in v1.27.2

type NullBool = webrpctypes.NullBool

type NullInt64 added in v1.27.2

type NullInt64 = webrpctypes.NullInt64

type NullString added in v1.27.2

type NullString = webrpctypes.NullString

type NullTime added in v1.27.2

type NullTime = webrpctypes.NullTime

type PDPDashboardFinancial added in v1.28.3

type PDPDashboardFinancial struct {
	Income30dUsdfc      string `json:"income30dUsdfc"`
	IncomeSubtitle      string `json:"incomeSubtitle"`
	AccruedUnsettled    string `json:"accruedUnsettledUsdfc"`
	Expense30dFil       string `json:"expense30dFil"`
	Expense30dUsdfc     string `json:"expense30dUsdfc"`
	Expense30dUsdfcNote string `json:"expense30dUsdfcNote"`
}

type PDPDashboardSummary added in v1.28.3

type PDPDashboardSummary struct {
	DataUnderProofBytes int64                `json:"dataUnderProofBytes"`
	DataSetCount        int                  `json:"dataSetCount"`
	PieceCount          int                  `json:"pieceCount"`
	ProvingSuccessRate  float64              `json:"provingSuccessRate"`
	ProvingSuccessCount int                  `json:"provingSuccessCount"`
	ProvingFailureCount int                  `json:"provingFailureCount"`
	FaultedPeriods30d   int                  `json:"faultedPeriods30d"`
	ProvingActivity     []ProvingActivityDay `json:"provingActivity"`
}

type PDPDataSetAtRiskDetail added in v1.28.6

type PDPDataSetAtRiskDetail struct {
	Payer                string     `json:"payer,omitempty"`
	Status               string     `json:"status,omitempty"`
	Reason               string     `json:"reason,omitempty"`
	ProjectedDeleteEpoch *int64     `json:"projectedDeleteEpoch,omitempty"`
	ProjectedDeleteAt    *time.Time `json:"projectedDeleteAt,omitempty"`
	DeleteDatePending    bool       `json:"deleteDatePending,omitempty"`
	AtRisk               bool       `json:"atRisk"`
}

type PDPDataSetAtRiskListResult added in v1.28.6

type PDPDataSetAtRiskListResult struct {
	Items []PDPDataSetAtRiskSummary `json:"items"`
	Total int                       `json:"total"`
}

type PDPDataSetAtRiskScanCursor added in v1.28.6

type PDPDataSetAtRiskScanCursor struct {
	AfterSizeBytes int64 `json:"afterSizeBytes"`
	AfterID        int64 `json:"afterId"`
	Scanned        int   `json:"scanned"`
}

type PDPDataSetAtRiskScanResult added in v1.28.6

type PDPDataSetAtRiskScanResult struct {
	Items        []PDPDataSetAtRiskSummary  `json:"items"`
	Scanned      int                        `json:"scanned"`
	DatasetTotal int                        `json:"datasetTotal"`
	Complete     bool                       `json:"complete"`
	Cursor       PDPDataSetAtRiskScanCursor `json:"cursor"`
	ChainError   string                     `json:"chainError,omitempty"`
}

type PDPDataSetAtRiskSummary added in v1.28.6

type PDPDataSetAtRiskSummary struct {
	PDPDataSetSummary
	Payer                string     `json:"payer,omitempty"`
	Status               string     `json:"status"`
	Reason               string     `json:"reason,omitempty"`
	ProjectedDeleteEpoch *int64     `json:"projectedDeleteEpoch,omitempty"`
	ProjectedDeleteAt    *time.Time `json:"projectedDeleteAt,omitempty"`
	DeleteDatePending    bool       `json:"deleteDatePending,omitempty"`
	HeadEpoch            int64      `json:"headEpoch"`
}

type PDPDataSetDetail added in v1.28.3

type PDPDataSetDetail struct {
	ID                        int64                   `json:"id"`
	ObjectCount               int64                   `json:"objectCount"`
	SizeBytes                 int64                   `json:"sizeBytes"`
	FirstUploadAt             *time.Time              `json:"firstUploadAt,omitempty"`
	LifespanSeconds           *int64                  `json:"lifespanSeconds,omitempty"`
	ProveAtEpoch              *int64                  `json:"proveAtEpoch,omitempty"`
	ChallengeWindow           *int64                  `json:"challengeWindow,omitempty"`
	ProvingPeriod             *int64                  `json:"provingPeriod,omitempty"`
	UnrecoverableFailureEpoch *int64                  `json:"unrecoverableFailureEpoch,omitempty"`
	InitReady                 bool                    `json:"initReady"`
	Service                   string                  `json:"service"`
	HeadEpoch                 int64                   `json:"headEpoch"`
	ProvingStatus             string                  `json:"provingStatus"`
	ExploreURL                string                  `json:"exploreUrl,omitempty"`
	PaymentAtRisk             *PDPDataSetAtRiskDetail `json:"paymentAtRisk,omitempty"`
}

type PDPDataSetInteraction added in v1.28.3

type PDPDataSetInteraction struct {
	Kind      string    `json:"kind"`
	TxHash    string    `json:"txHash,omitempty"`
	TaskID    *int64    `json:"taskId,omitempty"`
	Success   *bool     `json:"success,omitempty"`
	Err       string    `json:"err,omitempty"`
	Timestamp time.Time `json:"timestamp"`
	Detail    string    `json:"detail,omitempty"`
}

type PDPDataSetListResult added in v1.28.3

type PDPDataSetListResult struct {
	Items []PDPDataSetSummary `json:"items"`
	Total int                 `json:"total"`
}

type PDPDataSetPayments added in v1.28.3

type PDPDataSetPayments struct {
	Payer             string `json:"payer"`
	Payee             string `json:"payee"`
	ServiceProvider   string `json:"serviceProvider"`
	PdpRailID         string `json:"pdpRailId"`
	PdpEndEpoch       string `json:"pdpEndEpoch"`
	PaymentsRemaining *int64 `json:"paymentsRemaining,omitempty"`
	AvailableFunds    string `json:"availableFunds"`
	FundedUntilEpoch  string `json:"fundedUntilEpoch"`
	LockupPeriod      string `json:"lockupPeriod"`
	PaymentRate       string `json:"paymentRate"`
	ProvenThisPeriod  *bool  `json:"provenThisPeriod,omitempty"`
	HeadEpoch         int64  `json:"headEpoch"`
	Error             string `json:"error,omitempty"`
}

PDPDataSetPayments is chain-derived wallet/payment state for a dataset. Loaded separately so the detail page can render DB fields without waiting on RPC.

type PDPDataSetSummary added in v1.28.3

type PDPDataSetSummary struct {
	ID                        int64      `json:"id" db:"id"`
	ObjectCount               int64      `json:"objectCount" db:"object_count"`
	SizeBytes                 int64      `json:"sizeBytes" db:"size_bytes"`
	FirstUploadAt             *time.Time `json:"firstUploadAt,omitempty" db:"first_upload_at"`
	ProveAtEpoch              *int64     `json:"proveAtEpoch,omitempty" db:"prove_at_epoch"`
	ChallengeWindow           *int64     `json:"challengeWindow,omitempty" db:"challenge_window"`
	UnrecoverableFailureEpoch *int64     `json:"unrecoverableFailureEpoch,omitempty" db:"unrecoverable_proving_failure_epoch"`
	ProvingStatus             string     `json:"provingStatus"`
}

type PDPGuideDNSStatus added in v1.28.3

type PDPGuideDNSStatus struct {
	OK               bool   `json:"ok"`
	DomainConfigured bool   `json:"domainConfigured"`
	DomainName       string `json:"domainName,omitempty"`
	ServiceURL       string `json:"serviceURL,omitempty"`
	HTTPEnabled      bool   `json:"httpEnabled"`
	Reachable        bool   `json:"reachable"`
	ReachableDetail  string `json:"reachableDetail,omitempty"`
	SuggestTunnel    bool   `json:"suggestTunnel"`
	TunnelInstalled  bool   `json:"tunnelInstalled"`
	TunnelRunning    bool   `json:"tunnelRunning"`
	TunnelDetail     string `json:"tunnelDetail,omitempty"`
	Detail           string `json:"detail,omitempty"`
}

type PDPGuideRegistryStatus added in v1.28.3

type PDPGuideRegistryStatus struct {
	OK         bool   `json:"ok"`
	Registered bool   `json:"registered"`
	ProviderID int64  `json:"providerId,omitempty"`
	Name       string `json:"name,omitempty"`
	Detail     string `json:"detail,omitempty"`
}

type PDPGuideStatus added in v1.28.3

type PDPGuideStatus struct {
	Wallet   PDPGuideWalletStatus   `json:"wallet"`
	Storage  PDPGuideStorageStatus  `json:"storage"`
	DNS      PDPGuideDNSStatus      `json:"dns"`
	Registry PDPGuideRegistryStatus `json:"registry"`
}

PDPGuideStatus is the server-verified checklist for PDP readiness.

type PDPGuideStorageStatus added in v1.28.3

type PDPGuideStorageStatus struct {
	OK               bool   `json:"ok"`
	PathCount        int    `json:"pathCount"`
	AvailableBytes   int64  `json:"availableBytes"`
	CapacityBytes    int64  `json:"capacityBytes"`
	AvailableHuman   string `json:"availableHuman"`
	CapacityHuman    string `json:"capacityHuman"`
	MeetsMinimum     bool   `json:"meetsMinimum"`
	MeetsRecommended bool   `json:"meetsRecommended"`
	DocsURL          string `json:"docsURL"`
	Detail           string `json:"detail,omitempty"`
}

type PDPGuideWalletStatus added in v1.28.3

type PDPGuideWalletStatus struct {
	OK           bool   `json:"ok"`
	Configured   bool   `json:"configured"`
	Address      string `json:"address,omitempty"`
	FilAddress   string `json:"filAddress,omitempty"`
	Balance      string `json:"balance,omitempty"`
	BalanceKnown bool   `json:"balanceKnown"`
	Funded       bool   `json:"funded"`
	ActorExists  bool   `json:"actorExists"`
	Detail       string `json:"detail,omitempty"`
}

type PDPOwnerAddress added in v1.25.1

type PDPOwnerAddress struct {
	Address string `db:"address" json:"address"`
}

type PDPProvingFailure added in v1.28.3

type PDPProvingFailure struct {
	DataSetID                 int64      `json:"dataSetId"`
	TaskID                    *int64     `json:"taskId,omitempty"`
	Err                       string     `json:"err"`
	WorkEnd                   *time.Time `json:"workEnd,omitempty"`
	UnrecoverableFailureEpoch *int64     `json:"unrecoverableFailureEpoch,omitempty"`
	ProveAtEpoch              *int64     `json:"proveAtEpoch,omitempty"`
	ChallengeWindow           *int64     `json:"challengeWindow,omitempty"`
	Reason                    string     `json:"reason"`
}

type PDPProvingStatus added in v1.28.3

type PDPProvingStatus struct {
	HeadEpoch               int64  `json:"headEpoch"`
	NextProveAtEpoch        *int64 `json:"nextProveAtEpoch"`
	NextDeadlineEpoch       *int64 `json:"nextDeadlineEpoch"`
	EpochsUntilNextSession  *int64 `json:"epochsUntilNextSession"`
	SecondsUntilNextSession *int64 `json:"secondsUntilNextSession"`
	ActiveDataSetCount      int    `json:"activeDataSetCount"`
	InWindowCount           int    `json:"inWindowCount"`
	OverdueCount            int    `json:"overdueCount"`
	// SessionState: "in-window", "upcoming", "overdue", or "idle"
	SessionState string `json:"sessionState"`
}

type PDPProvingTimelineEvent added in v1.28.3

type PDPProvingTimelineEvent struct {
	TaskID    int64     `json:"taskId" db:"task_id"`
	DataSetID int64     `json:"dataSetId" db:"data_set"`
	Success   bool      `json:"success" db:"result"`
	Err       string    `json:"err" db:"err"`
	WorkEnd   time.Time `json:"workEnd" db:"work_end"`
}

type PDPService added in v1.25.1

type PDPService struct {
	ID        int64  `db:"id" json:"id"`
	Name      string `db:"service_label" json:"name"`
	PubKey    []byte `db:"pubkey"`   // Stored as bytes in DB, converted to PEM string in JSON
	PubKeyStr string `json:"pubkey"` // PEM string for JSON response
}

PDPService represents a PDP service

type ParkedPieceRef added in v1.24.3

type ParkedPieceRef struct {
	RefID       int64           `db:"ref_id" json:"ref_id"`
	PieceID     int64           `db:"piece_id" json:"piece_id"`
	DataURL     sql.NullString  `db:"data_url" json:"data_url"`
	DataHeaders json.RawMessage `db:"data_headers" json:"data_headers"`
}

type ParkedPieceState added in v1.24.3

type ParkedPieceState struct {
	ID              int64            `db:"id" json:"id"`
	PieceCID        string           `db:"piece_cid" json:"piece_cid"`
	PiecePaddedSize int64            `db:"piece_padded_size" json:"piece_padded_size"`
	PieceRawSize    int64            `db:"piece_raw_size" json:"piece_raw_size"`
	Complete        bool             `db:"complete" json:"complete"`
	CreatedAt       time.Time        `db:"created_at" json:"created_at"`
	TaskID          sql.NullInt64    `db:"task_id" json:"task_id"`
	CleanupTaskID   sql.NullInt64    `db:"cleanup_task_id" json:"cleanup_task_id"`
	Refs            []ParkedPieceRef `json:"refs"`
}

type ParsedResponse added in v1.24.3

type ParsedResponse struct {
	AddrInfo              AddrInfo       `json:"AddrInfo"`
	LastAdvertisement     Advertisement  `json:"LastAdvertisement"`
	LastAdvertisementTime time.Time      `json:"LastAdvertisementTime"`
	Publisher             AddrInfo       `json:"Publisher"`
	ExtendedProviders     map[string]any `json:"ExtendedProviders"`
	FrozenAt              string         `json:"FrozenAt"`
	LastError             string         `json:"LastError"`
}

type PendingMessage added in v1.25.1

type PendingMessage struct {
	Message string    `json:"message"`
	AddedAt time.Time `json:"added_at"`
}

type PendingMessageItem added in v1.28.3

type PendingMessageItem struct {
	MessageCid string    `db:"message_cid" json:"messageCid"`
	AddedAt    time.Time `db:"added_at" json:"addedAt"`
}

type PendingMessages added in v1.25.1

type PendingMessages struct {
	Messages []PendingMessage `json:"messages"`
	Total    int              `json:"total"`
}

type PieceDeal added in v1.24.3

type PieceDeal struct {
	// Cache line 1 (0-64 bytes): Hot path - identification fields used together
	ID    string `db:"id" json:"id"`       // 16 bytes - used with SpId (line 621-623)
	SpId  int64  `db:"sp_id" json:"sp_id"` // 8 bytes - checked early (line 614), used with ID (line 617)
	Miner string `json:"miner"`            // 16 bytes - set based on SpId (line 615, 625)
	// Cache line 2: Additional 8-byte types grouped together
	ChainDealId int64 `db:"chain_deal_id" json:"chain_deal_id"` // 8 bytes
	Sector      int64 `db:"sector_num" json:"sector"`           // 8 bytes
	Length      int64 `db:"piece_length" json:"length"`         // 8 bytes
	RawSize     int64 `db:"raw_size" json:"raw_size"`           // 8 bytes
	// NullInt64 (16 bytes)
	Offset NullInt64 `db:"piece_offset" json:"offset"` // 16 bytes
	// Cache line 3 (64+ bytes): Bools grouped together at the end to minimize padding
	MK20       bool `db:"-" json:"mk20"`                  // Used with ID check (line 621-623) - hot path
	BoostDeal  bool `db:"boost_deal" json:"boost_deal"`   // Less frequently accessed
	LegacyDeal bool `db:"legacy_deal" json:"legacy_deal"` // Less frequently accessed
}

type PieceDealDetailEntry added in v1.27.2

type PieceDealDetailEntry struct {
	MK12 []PieceInfoMK12Deals `json:"mk12"`
	MK20 []PieceInfoMK20Deals `json:"mk20"`
}

PieceDealDetailEntry combines a deal and its pipeline

type PieceInfo added in v1.24.3

type PieceInfo struct {
	// Cache line 1 (0-64 bytes): Hot path - piece identification used together
	PieceCidv2 string   `json:"piece_cid_v2"` // 16 bytes - used together with PieceCid (line 584)
	PieceCid   string   `json:"piece_cid"`    // 16 bytes - used with PieceCidv2 (line 584)
	Size       int64    `json:"size"`         // 8 bytes - used with PieceCid (line 587, 604)
	IPNIAd     []string `json:"ipni_ads"`     // 24 bytes - used for results
	// Cache line 2 (64+ bytes): Display
	CreatedAt time.Time `json:"created_at"` // 24 bytes - used for display
	IndexedAT time.Time `json:"indexed_at"` // 24 bytes - used for display
	Indexed   bool      `json:"indexed"`    // Used for display
	// Cache line 3
	Deals []PieceDeal `json:"deals"` // 24 bytes - used for results
}

type PieceInfoMK12Deals added in v1.27.2

type PieceInfoMK12Deals struct {
	Deal     *MK12Deal         `json:"deal"`
	Pipeline *MK12DealPipeline `json:"mk12_pipeline,omitempty"`
}

type PieceInfoMK20Deals added in v1.27.2

type PieceInfoMK20Deals struct {
	Deal        *MK20StorageDeal `json:"deal"`
	DDOPipeline *MK20DDOPipeline `json:"mk20_ddo_pipeline,omitempty"`
	PDPPipeline *MK20PDPPipeline `json:"mk20_pdp_pipeline,omitempty"`
}

type PieceSummary added in v1.24.3

type PieceSummary struct {
	Total       int64     `db:"total" json:"total"`
	Indexed     int64     `db:"indexed" json:"indexed"`
	Announced   int64     `db:"announced" json:"announced"`
	LastUpdated time.Time `db:"last_updated" json:"last_updated"`
}

type PipelineStage added in v1.24.3

type PipelineStage = webrpctypes.PipelineStage

type PipelineStats added in v1.24.3

type PipelineStats = webrpctypes.PipelineStats

type PriceFilter added in v1.24.3

type PriceFilter struct {
	Name string `db:"name" json:"name"`

	MinDur int `db:"min_duration_days" json:"min_dur"`
	MaxDur int `db:"max_duration_days" json:"max_dur"`

	MinSize int64 `db:"min_size" json:"min_size"`
	MaxSize int64 `db:"max_size" json:"max_size"`

	Price    int64 `db:"price" json:"price"`
	Verified bool  `db:"verified" json:"verified"`
}

type ProvingActivityDay added in v1.28.3

type ProvingActivityDay struct {
	Date    string `json:"date"`
	Success int    `json:"success"`
	Failed  int    `json:"failed"`
	Faulted int    `json:"faulted"`
}

type RpcInfo

type RpcInfo struct {
	Address   string
	CLayers   []string
	Reachable bool
	SyncState string
	Version   string
}

type SectorEvent added in v1.24.3

type SectorEvent struct {
	SpID         uint64 `db:"sp_id"`
	SectorNumber uint64 `db:"sector_number"`

	Addr address.Address `db:"-"`
}

type SingletonInfo added in v1.27.4

type SingletonInfo struct {
	TaskName      string     `db:"task_name" json:"TaskName"`
	TaskID        NullInt64  `db:"task_id" json:"TaskID"`
	LastRunTime   *time.Time `db:"last_run_time" json:"LastRunTime"`
	RunNowRequest bool       `db:"run_now_request" json:"RunNowRequest"`
}

type SpidGetter added in v1.22.1

type SpidGetter interface {
	GetSpid(db *harmonydb.DB, taskID int64) string
}

type StorageAsk added in v1.24.3

type StorageAsk struct {
	SpID          int64 `db:"sp_id"`
	Price         int64 `db:"price"`
	VerifiedPrice int64 `db:"verified_price"`
	MinSize       int64 `db:"min_size"`
	MaxSize       int64 `db:"max_size"`
	CreatedAt     int64 `db:"created_at"`
	Expiry        int64 `db:"expiry"`
	Sequence      int64 `db:"sequence"`
	Miner         string
}

type StorageDealList added in v1.24.3

type StorageDealList struct {
	ID         string     `db:"uuid" json:"id"`
	MinerID    int64      `db:"sp_id" json:"sp_id"`
	CreatedAt  time.Time  `db:"created_at" json:"created_at"`
	PieceCidV1 string     `db:"piece_cid" json:"piece_cid"`
	PieceSize  int64      `db:"piece_size" json:"piece_size"`
	RawSize    NullInt64  `db:"raw_size"`
	PieceCidV2 string     `json:"piece_cid_v2"`
	Processed  bool       `db:"processed" json:"processed"`
	Error      NullString `db:"error" json:"error"`
	Miner      string     `json:"miner"`
}

type StorageDealSummary added in v1.24.3

type StorageDealSummary struct {
	ID                string         `db:"uuid" json:"id"`
	MinerID           int64          `db:"sp_id" json:"sp_id"`
	Sector            NullInt64      `db:"sector_num" json:"sector"`
	CreatedAt         time.Time      `db:"created_at" json:"created_at"`
	SignedProposalCid string         `db:"signed_proposal_cid" json:"signed_proposal_cid"`
	Offline           bool           `db:"offline" json:"offline"`
	Verified          bool           `db:"verified" json:"verified"`
	StartEpoch        int64          `db:"start_epoch" json:"start_epoch"`
	EndEpoch          int64          `db:"end_epoch" json:"end_epoch"`
	ClientPeerId      string         `db:"client_peer_id" json:"client_peer_id"`
	ChainDealId       NullInt64      `db:"chain_deal_id" json:"chain_deal_id"`
	PublishCid        NullString     `db:"publish_cid" json:"publish_cid"`
	PieceCid          string         `db:"piece_cid" json:"piece_cid"`
	PieceSize         int64          `db:"piece_size" json:"piece_size"`
	RawSize           sql.NullInt64  `db:"raw_size"`
	FastRetrieval     bool           `db:"fast_retrieval" json:"fast_retrieval"`
	AnnounceToIpni    bool           `db:"announce_to_ipni" json:"announce_to_ipni"`
	Url               sql.NullString `db:"url"`
	URLS              string         `json:"url"`
	Header            []byte         `db:"url_headers"`
	UrlHeaders        http.Header    `json:"url_headers"`
	DBError           sql.NullString `db:"error"`
	Error             string         `json:"error"`
	Miner             string         `json:"miner"`
	Indexed           sql.NullBool   `db:"indexed" json:"indexed"`
	IsDDO             bool           `db:"is_ddo" json:"is_ddo"`
	PieceCidV2        string         `json:"piece_cid_v2"`
}

type StoragePathInfo added in v1.27.3

type StoragePathInfo struct {
	StorageID     string     `db:"storage_id"`
	URLs          *string    `db:"urls"`
	Weight        *int64     `db:"weight"`
	MaxStorage    *int64     `db:"max_storage"`
	CanSeal       *bool      `db:"can_seal"`
	CanStore      *bool      `db:"can_store"`
	Groups        *string    `db:"groups"`
	AllowTo       *string    `db:"allow_to"`
	AllowTypes    *string    `db:"allow_types"`
	DenyTypes     *string    `db:"deny_types"`
	Capacity      *int64     `db:"capacity"`
	Available     *int64     `db:"available"`
	FSAvailable   *int64     `db:"fs_available"`
	Reserved      *int64     `db:"reserved"`
	Used          *int64     `db:"used"`
	LastHeartbeat *time.Time `db:"last_heartbeat"`
	HeartbeatErr  *string    `db:"heartbeat_err"`
	AllowMiners   string     `db:"allow_miners"`
	DenyMiners    string     `db:"deny_miners"`

	// Computed fields for UI (not from DB)
	LocalPath       string   `json:"LocalPath,omitempty"`
	PathType        string   `json:"PathType,omitempty"`
	CapacityStr     string   `json:"CapacityStr,omitempty"`
	AvailableStr    string   `json:"AvailableStr,omitempty"`
	FSAvailableStr  string   `json:"FSAvailableStr,omitempty"`
	ReservedStr     string   `json:"ReservedStr,omitempty"`
	UsedStr         string   `json:"UsedStr,omitempty"`
	MaxStorageStr   string   `json:"MaxStorageStr,omitempty"`
	UsedPercent     float64  `json:"UsedPercent,omitempty"`
	ReservedPercent float64  `json:"ReservedPercent,omitempty"`
	HealthStatus    string   `json:"HealthStatus,omitempty"`
	HealthOK        bool     `json:"HealthOK,omitempty"`
	URLList         []string `json:"URLList,omitempty"`
	HostList        []string `json:"HostList,omitempty"`
	GroupList       []string `json:"GroupList,omitempty"`
	AllowToList     []string `json:"AllowToList,omitempty"`
	AllowTypesList  []string `json:"AllowTypesList,omitempty"`
	DenyTypesList   []string `json:"DenyTypesList,omitempty"`
	AllowMinersList []string `json:"AllowMinersList,omitempty"`
	DenyMinersList  []string `json:"DenyMinersList,omitempty"`
}

StoragePathInfo contains detailed information about a storage path / mount.

type TaskHistorySummary added in v1.23.0

type TaskHistorySummary struct {
	Name   string
	TaskID int64

	Posted, Start, Queued, Took string

	Result bool
	Err    string

	CompletedBy string
}

type TaskStatus added in v1.24.3

type TaskStatus struct {
	TaskID   int64   `json:"task_id"`
	Status   string  `json:"status"` // "pending", "running", "done", "failed"
	OwnerID  *int64  `json:"owner_id,omitempty"`
	Name     string  `json:"name"`
	PostedAt *string `json:"posted_at,omitempty"`
}

type TaskSummary added in v1.22.1

type TaskSummary struct {
	ID             int64
	Name           string
	SpID           string
	SincePosted    time.Time `db:"since_posted"`
	Owner, OwnerID *string

	// db ignored
	SincePostedStr string `db:"-"`

	Miner string
}

type UploadStatus added in v1.27.2

type UploadStatus struct {
	ID     string            `json:"id"`
	Status mk20.UploadStatus `json:"status"`
}

type WalletBalances added in v1.24.3

type WalletBalances struct {
	Address string `json:"address"`
	Balance string `json:"balance"`
}

type WalletInfoShort added in v1.26.0

type WalletInfoShort struct {
	IDAddress       string `json:"id_address"`
	KeyAddress      string `json:"key_address"`
	Balance         string `json:"balance"`
	PendingMessages int    `json:"pending_messages"`
}

type WebRPC

type WebRPC = Handler

WebRPC is the JSON-RPC receiver for handlers shared by Skiff and Curio.

func (*WebRPC) AbortRestart added in v1.26.0

func (a *WebRPC) AbortRestart(ctx context.Context, id int64) error

func (*WebRPC) AddAllowDenyList added in v1.24.3

func (a *WebRPC) AddAllowDenyList(ctx context.Context, wallet string, status bool) error

func (*WebRPC) AddClientFilters added in v1.24.3

func (a *WebRPC) AddClientFilters(ctx context.Context, name string, active bool, wallets, peers []string, filters []string, maxDealPerHour, maxDealSizePerHour int64, info string) error

func (*WebRPC) AddMarketContract added in v1.27.2

func (a *WebRPC) AddMarketContract(ctx context.Context, contract string, allowed bool) error

func (*WebRPC) AddPDPService added in v1.25.1

func (a *WebRPC) AddPDPService(ctx context.Context, name string, pubKey string) error

AddPDPService adds a new PDP service to the database

func (*WebRPC) AddPriceFilters added in v1.24.3

func (a *WebRPC) AddPriceFilters(ctx context.Context, name string, minDur, maxDur int, minSize, maxSize int64, price int64, verified bool) error

func (*WebRPC) AlertAcknowledge added in v1.27.3

func (a *WebRPC) AlertAcknowledge(ctx context.Context, id int64, acknowledgedBy string) error

AlertAcknowledge marks an alert as acknowledged

func (*WebRPC) AlertAcknowledgeAll added in v1.28.3

func (a *WebRPC) AlertAcknowledgeAll(ctx context.Context, acknowledgedBy string) error

func (*WebRPC) AlertAcknowledgeMultiple added in v1.27.3

func (a *WebRPC) AlertAcknowledgeMultiple(ctx context.Context, ids []int64, acknowledgedBy string) error

AlertAcknowledgeMultiple marks multiple alerts as acknowledged

func (*WebRPC) AlertCategoriesList added in v1.27.3

func (a *WebRPC) AlertCategoriesList(ctx context.Context) ([]string, error)

AlertCategoriesList returns the list of alert categories that can be muted

func (*WebRPC) AlertCommentAdd added in v1.27.3

func (a *WebRPC) AlertCommentAdd(ctx context.Context, alertID int64, comment string, createdBy string) error

AlertCommentAdd adds a comment to an alert

func (*WebRPC) AlertCommentList added in v1.27.3

func (a *WebRPC) AlertCommentList(ctx context.Context, alertID int64) ([]AlertComment, error)

AlertCommentList returns all comments for an alert

func (*WebRPC) AlertHistoryListPaginated added in v1.27.3

func (a *WebRPC) AlertHistoryListPaginated(ctx context.Context, limit int, offset int, includeAcknowledged bool) (*AlertHistoryListResult, error)

AlertHistoryListPaginated returns paginated alert history (JSON-RPC compatible)

func (*WebRPC) AlertMuteAdd added in v1.27.3

func (a *WebRPC) AlertMuteAdd(ctx context.Context, alertName string, pattern *string, reason string, mutedBy string, expiresInHours *int) error

AlertMuteAdd adds a new alert mute

func (*WebRPC) AlertMuteDeactivate added in v1.28.1

func (a *WebRPC) AlertMuteDeactivate(ctx context.Context, id int64) error

AlertMuteDeactivate deactivates an alert mute

func (*WebRPC) AlertMuteDelete added in v1.28.1

func (a *WebRPC) AlertMuteDelete(ctx context.Context, id int64) error

AlertMuteDelete deletes an alert mute

func (*WebRPC) AlertMuteList added in v1.27.3

func (a *WebRPC) AlertMuteList(ctx context.Context) ([]AlertMute, error)

AlertMuteList returns all active and inactive alert mutes

func (*WebRPC) AlertMuteReactivate added in v1.27.3

func (a *WebRPC) AlertMuteReactivate(ctx context.Context, id int64) error

AlertMuteReactivate reactivates an alert mute

func (*WebRPC) AlertOngoingCount added in v1.28.3

func (a *WebRPC) AlertOngoingCount(ctx context.Context) (int, error)

func (*WebRPC) AlertOngoingList added in v1.28.3

func (a *WebRPC) AlertOngoingList(ctx context.Context) ([]AlertOngoingEntry, error)

func (*WebRPC) AlertPendingCount added in v1.27.3

func (a *WebRPC) AlertPendingCount(ctx context.Context) (int, error)

AlertPendingCount returns the count of pending (unprocessed) alerts from the alerts table This is used for the sidebar indicator

func (*WebRPC) AlertSendTest added in v1.27.3

func (a *WebRPC) AlertSendTest(ctx context.Context) error

AlertSendTest sends a test alert through every enabled alert plugin and records the outcome in alert_history. With no plugins enabled it just records locally - an error is only returned if a configured plugin fails to deliver.

func (*WebRPC) AlertTotalCount added in v1.28.3

func (a *WebRPC) AlertTotalCount(ctx context.Context) (int, error)

func (*WebRPC) AlertUnacknowledgedCount added in v1.27.3

func (a *WebRPC) AlertUnacknowledgedCount(ctx context.Context) (int, error)

AlertUnacknowledgedCount returns count of unacknowledged alerts (for sidebar)

func (*WebRPC) BalanceMgrRuleAdd added in v1.26.0

func (a *WebRPC) BalanceMgrRuleAdd(ctx context.Context, subject, second, actionType, lowWatermark, highWatermark, subjectType string) error

BalanceMgrRuleAdd creates a new balance-manager rule. Watermarks are provided as FIL strings. Addresses use Fil/ID strings. subjectType can be "wallet" or "proofshare".

func (*WebRPC) BalanceMgrRuleRemove added in v1.26.0

func (a *WebRPC) BalanceMgrRuleRemove(ctx context.Context, id int64) error

BalanceMgrRuleRemove deletes a balance-manager rule.

func (*WebRPC) BalanceMgrRuleUpdate added in v1.26.0

func (a *WebRPC) BalanceMgrRuleUpdate(ctx context.Context, id int64, lowWatermark, highWatermark string) error

BalanceMgrRuleUpdate updates the low / high watermark thresholds for a rule. Values should be provided as strings parsable by types.ParseFIL (e.g. "0.5" or "0.5 FIL").

func (*WebRPC) BalanceMgrRules added in v1.26.0

func (a *WebRPC) BalanceMgrRules(ctx context.Context) ([]BalanceMgrRule, error)

BalanceMgrRules returns all balance-manager rules.

func (*WebRPC) ChainStatus added in v1.28.3

func (a *WebRPC) ChainStatus(ctx context.Context) (ChainStatusResponse, error)

func (*WebRPC) ChunkUploadStatus added in v1.27.2

func (a *WebRPC) ChunkUploadStatus(ctx context.Context, idStr string) (*UploadStatus, error)

func (*WebRPC) ClusterMachines added in v1.23.0

func (a *WebRPC) ClusterMachines(ctx context.Context) ([]MachineSummary, error)

func (*WebRPC) ClusterNodeInfo added in v1.23.0

func (a *WebRPC) ClusterNodeInfo(ctx context.Context, id int64) (*MachineInfo, error)

func (*WebRPC) ClusterNodeMetrics added in v1.27.1

func (a *WebRPC) ClusterNodeMetrics(ctx context.Context, id int64) (string, error)

func (*WebRPC) ClusterTaskHistory added in v1.23.0

func (a *WebRPC) ClusterTaskHistory(ctx context.Context, limit, offset int) ([]TaskHistorySummary, error)

func (*WebRPC) ClusterTaskSummary added in v1.22.1

func (a *WebRPC) ClusterTaskSummary(ctx context.Context) ([]TaskSummary, error)

func (*WebRPC) Cordon added in v1.26.0

func (a *WebRPC) Cordon(ctx context.Context, id int64) error

func (*WebRPC) CreatePDPKey added in v1.28.3

func (a *WebRPC) CreatePDPKey(ctx context.Context) (*pdpwallet.CreatedKey, error)

func (*WebRPC) DefaultFilterBehaviour added in v1.25.0

func (a *WebRPC) DefaultFilterBehaviour(ctx context.Context) (*DefaultFilterBehaviourResponse, error)

func (*WebRPC) DisableDataSource added in v1.27.2

func (a *WebRPC) DisableDataSource(ctx context.Context, name string) error

func (*WebRPC) DisableProduct added in v1.27.2

func (a *WebRPC) DisableProduct(ctx context.Context, name string) error

func (*WebRPC) EnableDataSource added in v1.27.2

func (a *WebRPC) EnableDataSource(ctx context.Context, name string) error

func (*WebRPC) EnableProduct added in v1.27.2

func (a *WebRPC) EnableProduct(ctx context.Context, name string) error

func (*WebRPC) EpochPretty added in v1.24.3

func (a *WebRPC) EpochPretty(ctx context.Context, e abi.ChainEpoch) (string, error)

func (*WebRPC) FSDeregister added in v1.27.3

func (a *WebRPC) FSDeregister(ctx context.Context) error

func (*WebRPC) FSRegister added in v1.27.2

func (a *WebRPC) FSRegister(ctx context.Context, name, description, location string, capacityTiB int64) error

func (*WebRPC) FSRegistryStatus added in v1.27.2

func (a *WebRPC) FSRegistryStatus(ctx context.Context) (*FSRegistryStatus, error)

func (*WebRPC) FSUpdatePDP added in v1.27.2

func (a *WebRPC) FSUpdatePDP(ctx context.Context, pdpOffering *FSPDPOffering, capabilities map[string]string) error

func (*WebRPC) FSUpdateProvider added in v1.27.2

func (a *WebRPC) FSUpdateProvider(ctx context.Context, name, description string) error

func (*WebRPC) FindContentByCID added in v1.27.2

func (a *WebRPC) FindContentByCID(ctx context.Context, cs string) ([]ContentInfo, error)

FindContentByCID finds content by CID

func (*WebRPC) GetAd added in v1.24.3

func (a *WebRPC) GetAd(ctx context.Context, ad string) (*IpniAd, error)

func (*WebRPC) GetAllowDenyList added in v1.24.3

func (a *WebRPC) GetAllowDenyList(ctx context.Context) ([]AllowDeny, error)

func (*WebRPC) GetClientFilters added in v1.24.3

func (a *WebRPC) GetClientFilters(ctx context.Context) ([]ClientFilter, error)

func (*WebRPC) GetMK12DealPipelines added in v1.27.2

func (a *WebRPC) GetMK12DealPipelines(ctx context.Context, limit int, offset int) ([]*MK12Pipeline, error)

func (*WebRPC) GetPriceFilters added in v1.24.3

func (a *WebRPC) GetPriceFilters(ctx context.Context) ([]PriceFilter, error)

func (*WebRPC) GetStorageAsk added in v1.24.3

func (a *WebRPC) GetStorageAsk(ctx context.Context, spID int64) (*StorageAsk, error)

func (*WebRPC) GetTaskStatus added in v1.24.3

func (a *WebRPC) GetTaskStatus(ctx context.Context, taskID int64) (*TaskStatus, error)

func (*WebRPC) HarmonyTaskDetails added in v1.24.3

func (a *WebRPC) HarmonyTaskDetails(ctx context.Context, taskID int64) (*HarmonyTask, error)

HarmonyTaskDetails returns the current state of a task by ID.

func (*WebRPC) HarmonyTaskHistory

func (a *WebRPC) HarmonyTaskHistory(ctx context.Context, taskName string, fails bool) ([]*HarmonyTaskHistory, error)

func (*WebRPC) HarmonyTaskHistoryById added in v1.24.3

func (a *WebRPC) HarmonyTaskHistoryById(ctx context.Context, taskID int64) ([]*HarmonyTaskHistory, error)

HarmonyTaskHistoryById returns the history of a task by task ID.

func (*WebRPC) HarmonyTaskMachines

func (a *WebRPC) HarmonyTaskMachines(ctx context.Context, taskName string) ([]HarmonyMachineDesc, error)

func (*WebRPC) HarmonyTaskStats

func (a *WebRPC) HarmonyTaskStats(ctx context.Context) ([]HarmonyTaskStats, error)

func (*WebRPC) IPNIEntry added in v1.24.3

func (a *WebRPC) IPNIEntry(ctx context.Context, block cid.Cid) (*EntryInfo, error)

func (*WebRPC) IPNISetSkip added in v1.24.3

func (a *WebRPC) IPNISetSkip(ctx context.Context, adCid cid.Cid, skip bool) error

func (*WebRPC) IPNISummary added in v1.24.3

func (a *WebRPC) IPNISummary(ctx context.Context) ([]*IPNI, error)

func (*WebRPC) ImportPDPKey added in v1.25.1

func (a *WebRPC) ImportPDPKey(ctx context.Context, hexPrivateKey string) (string, error)

func (*WebRPC) ListDataSources added in v1.27.2

func (a *WebRPC) ListDataSources(ctx context.Context) (map[string]bool, error)

func (*WebRPC) ListMarketContracts added in v1.27.2

func (a *WebRPC) ListMarketContracts(ctx context.Context) (map[string]bool, error)

func (*WebRPC) ListPDPKeys added in v1.25.1

func (a *WebRPC) ListPDPKeys(ctx context.Context) ([]string, error)

func (*WebRPC) ListProducts added in v1.27.2

func (a *WebRPC) ListProducts(ctx context.Context) (map[string]bool, error)

func (*WebRPC) MK12StorageDealList added in v1.24.3

func (a *WebRPC) MK12StorageDealList(ctx context.Context, limit int, offset int) ([]*StorageDealList, error)

func (*WebRPC) MK20BulkRemoveFailedMarketPipelines added in v1.27.2

func (a *WebRPC) MK20BulkRemoveFailedMarketPipelines(ctx context.Context, taskType string) error

func (*WebRPC) MK20BulkRemoveFailedPDPPipelines added in v1.27.2

func (a *WebRPC) MK20BulkRemoveFailedPDPPipelines(ctx context.Context, taskType string) error

func (*WebRPC) MK20BulkRestartFailedMarketTasks added in v1.27.2

func (a *WebRPC) MK20BulkRestartFailedMarketTasks(ctx context.Context, taskType string) error

func (*WebRPC) MK20BulkRestartFailedPDPTasks added in v1.27.2

func (a *WebRPC) MK20BulkRestartFailedPDPTasks(ctx context.Context, taskType string) error

func (*WebRPC) MK20DDOPipelines added in v1.27.2

func (a *WebRPC) MK20DDOPipelines(ctx context.Context, limit int, offset int) ([]*MK20DDOPipeline, error)

func (*WebRPC) MK20DDOStorageDeal added in v1.27.2

func (a *WebRPC) MK20DDOStorageDeal(ctx context.Context, id string) (*MK20StorageDeal, error)

func (*WebRPC) MK20DDOStorageDeals added in v1.27.2

func (a *WebRPC) MK20DDOStorageDeals(ctx context.Context, limit int, offset int) ([]*MK20StorageDealList, error)

func (*WebRPC) MK20PDPPipelineFailedTasks added in v1.27.2

func (a *WebRPC) MK20PDPPipelineFailedTasks(ctx context.Context) (*MK20PDPPipelineFailedStats, error)

func (*WebRPC) MK20PDPPipelineRemove added in v1.27.2

func (a *WebRPC) MK20PDPPipelineRemove(ctx context.Context, id string) error

func (*WebRPC) MK20PDPPipelines added in v1.27.2

func (a *WebRPC) MK20PDPPipelines(ctx context.Context, limit int, offset int) ([]*MK20PDPPipeline, error)

func (*WebRPC) MK20PDPStorageDeals added in v1.27.2

func (a *WebRPC) MK20PDPStorageDeals(ctx context.Context, limit int, offset int) ([]*MK20PDPDealList, error)

func (*WebRPC) MK20PipelineFailedTasks added in v1.27.2

func (a *WebRPC) MK20PipelineFailedTasks(ctx context.Context) (*MK20PipelineFailedStats, error)

func (*WebRPC) MarketBalance added in v1.24.3

func (a *WebRPC) MarketBalance(ctx context.Context) ([]MarketBalanceStatus, error)

func (*WebRPC) MessageByCid added in v1.24.3

func (a *WebRPC) MessageByCid(ctx context.Context, cid string) (*MessageDetail, error)

func (*WebRPC) MessageQueueSummary added in v1.28.3

func (a *WebRPC) MessageQueueSummary(ctx context.Context) (MessageQueueSummary, error)

func (*WebRPC) MoveBalanceToEscrow added in v1.24.3

func (a *WebRPC) MoveBalanceToEscrow(ctx context.Context, miner string, amount string, wallet string) (string, error)

func (*WebRPC) NetSummary added in v1.27.3

func (a *WebRPC) NetSummary(ctx context.Context) (NetSummaryResponse, error)

func (*WebRPC) PDPDashboardFinancial added in v1.28.3

func (a *WebRPC) PDPDashboardFinancial(ctx context.Context) (PDPDashboardFinancial, error)

func (*WebRPC) PDPDashboardSummary added in v1.28.3

func (a *WebRPC) PDPDashboardSummary(ctx context.Context) (PDPDashboardSummary, error)

func (*WebRPC) PDPDataSetAtRiskCount added in v1.28.6

func (a *WebRPC) PDPDataSetAtRiskCount(ctx context.Context) (int, error)

func (*WebRPC) PDPDataSetAtRiskList added in v1.28.6

func (a *WebRPC) PDPDataSetAtRiskList(ctx context.Context, limit, offset int, sortBy string, ascending bool) (PDPDataSetAtRiskListResult, error)

func (*WebRPC) PDPDataSetAtRiskScanBatch added in v1.28.6

func (a *WebRPC) PDPDataSetAtRiskScanBatch(
	ctx context.Context,
	afterSize int64,
	afterID int64,
	scannedSoFar int,
	maxScan int,
	minSizeBytes int64,
) (PDPDataSetAtRiskScanResult, error)

PDPDataSetAtRiskScanBatch resolves payment status for the next chunk of local datasets, largest size first. Pass afterSize=0 and afterID=0 to start.

func (*WebRPC) PDPDataSetDetail added in v1.28.3

func (a *WebRPC) PDPDataSetDetail(ctx context.Context, id int64) (*PDPDataSetDetail, error)

func (*WebRPC) PDPDataSetFindByTxHash added in v1.28.3

func (a *WebRPC) PDPDataSetFindByTxHash(ctx context.Context, txHash string) (int64, error)

PDPDataSetFindByTxHash resolves a create tx hash to a local dataset id.

func (*WebRPC) PDPDataSetInteractions added in v1.28.3

func (a *WebRPC) PDPDataSetInteractions(ctx context.Context, id int64) ([]PDPDataSetInteraction, error)

func (*WebRPC) PDPDataSetList added in v1.28.3

func (a *WebRPC) PDPDataSetList(ctx context.Context, limit, offset int, filter, sortBy string, ascending bool) (PDPDataSetListResult, error)

func (*WebRPC) PDPDataSetPayments added in v1.28.3

func (a *WebRPC) PDPDataSetPayments(ctx context.Context, id int64) (*PDPDataSetPayments, error)

func (*WebRPC) PDPGuideConfigureCloudflareTunnel added in v1.28.3

func (a *WebRPC) PDPGuideConfigureCloudflareTunnel(ctx context.Context, token string) (string, error)

PDPGuideConfigureCloudflareTunnel downloads cloudflared (if needed) and starts it with the given tunnel token.

func (*WebRPC) PDPGuideStatus added in v1.28.3

func (a *WebRPC) PDPGuideStatus(ctx context.Context) (*PDPGuideStatus, error)

func (*WebRPC) PDPGuideStopCloudflareTunnel added in v1.28.3

func (a *WebRPC) PDPGuideStopCloudflareTunnel(ctx context.Context) error

PDPGuideStopCloudflareTunnel stops a tunnel process started by the guide.

func (*WebRPC) PDPKeyStatus added in v1.28.3

func (a *WebRPC) PDPKeyStatus(ctx context.Context) (pdpwallet.Status, error)

func (*WebRPC) PDPProvingFailures added in v1.28.3

func (a *WebRPC) PDPProvingFailures(ctx context.Context) ([]PDPProvingFailure, error)

func (*WebRPC) PDPProvingStatus added in v1.28.3

func (a *WebRPC) PDPProvingStatus(ctx context.Context) (PDPProvingStatus, error)

func (*WebRPC) PDPProvingTimeline24h added in v1.28.3

func (a *WebRPC) PDPProvingTimeline24h(ctx context.Context) ([]PDPProvingTimelineEvent, error)

func (*WebRPC) PDPServices added in v1.25.1

func (a *WebRPC) PDPServices(ctx context.Context) ([]PDPService, error)

PDPServices retrieves the list of PDP services from the database

func (*WebRPC) PendingMessages added in v1.25.1

func (a *WebRPC) PendingMessages(ctx context.Context) (PendingMessages, error)

func (*WebRPC) PieceDealDetail added in v1.27.2

func (a *WebRPC) PieceDealDetail(ctx context.Context, pieceCid string) (*PieceDealDetailEntry, error)

func (*WebRPC) PieceInfo added in v1.24.3

func (a *WebRPC) PieceInfo(ctx context.Context, pieceCid string) (*PieceInfo, error)

func (*WebRPC) PieceParkStates added in v1.24.3

func (a *WebRPC) PieceParkStates(ctx context.Context, pieceCID string) (*ParkedPieceState, error)

PieceParkStates retrieves the park states for a given piece CID

func (*WebRPC) PieceSummary added in v1.24.3

func (a *WebRPC) PieceSummary(ctx context.Context) (*PieceSummary, error)

func (*WebRPC) RemoveAllowFilter added in v1.24.3

func (a *WebRPC) RemoveAllowFilter(ctx context.Context, wallet string) error

func (*WebRPC) RemoveClientFilter added in v1.24.3

func (a *WebRPC) RemoveClientFilter(ctx context.Context, name string) error

func (*WebRPC) RemoveMarketContract added in v1.27.2

func (a *WebRPC) RemoveMarketContract(ctx context.Context, contract string) error

func (*WebRPC) RemovePDPKey added in v1.25.1

func (a *WebRPC) RemovePDPKey(ctx context.Context, ownerAddress string) error

func (*WebRPC) RemovePDPService added in v1.25.1

func (a *WebRPC) RemovePDPService(ctx context.Context, id int64) error

RemovePDPService removes a PDP service from the database

func (*WebRPC) RemovePricingFilter added in v1.24.3

func (a *WebRPC) RemovePricingFilter(ctx context.Context, name string) error

func (*WebRPC) Restart added in v1.26.0

func (a *WebRPC) Restart(ctx context.Context, id int64) error

func (*WebRPC) RestartFailedTask added in v1.24.3

func (a *WebRPC) RestartFailedTask(ctx context.Context, taskID int64) error

func (*WebRPC) SQLQuery added in v1.28.3

func (a *WebRPC) SQLQuery(ctx context.Context, query string) (*harmonydb.AdminQueryResult, error)

SQLQuery runs arbitrary SQL against the HarmonyDB for the admin console. Only requests whose Referer is the SQL Console page are allowed.

func (*WebRPC) SetAllowDenyList added in v1.24.3

func (a *WebRPC) SetAllowDenyList(ctx context.Context, wallet string, status bool) error

func (*WebRPC) SetClientFilters added in v1.24.3

func (a *WebRPC) SetClientFilters(ctx context.Context, name string, active bool, wallets, peers []string, filters []string, maxDealPerHour, maxDealSizePerHour int64, info string) error

func (*WebRPC) SetPriceFilters added in v1.24.3

func (a *WebRPC) SetPriceFilters(ctx context.Context, name string, minDur, maxDur int, minSize, maxSize int64, price int64, verified bool) error

func (*WebRPC) SetStorageAsk added in v1.24.3

func (a *WebRPC) SetStorageAsk(ctx context.Context, ask *StorageAsk) error

func (*WebRPC) SingletonRunNow added in v1.27.4

func (a *WebRPC) SingletonRunNow(ctx context.Context, taskName string) error

func (*WebRPC) SingletonTaskInfo added in v1.27.4

func (a *WebRPC) SingletonTaskInfo(ctx context.Context, taskName string) (*SingletonInfo, error)

func (*WebRPC) StorageDealInfo added in v1.24.3

func (a *WebRPC) StorageDealInfo(ctx context.Context, deal string) (*StorageDealSummary, error)

func (*WebRPC) SyncerState

func (a *WebRPC) SyncerState(ctx context.Context) ([]RpcInfo, error)

func (*WebRPC) Uncordon added in v1.26.0

func (a *WebRPC) Uncordon(ctx context.Context, id int64) error

func (*WebRPC) UpdateMarketContract added in v1.27.2

func (a *WebRPC) UpdateMarketContract(ctx context.Context, contract string, allowed bool) error

func (*WebRPC) WalletAdd added in v1.25.0

func (a *WebRPC) WalletAdd(ctx context.Context, wallet, name string) error

func (*WebRPC) WalletInfoShort added in v1.26.0

func (a *WebRPC) WalletInfoShort(ctx context.Context, walletID string) (WalletInfoShort, error)

func (*WebRPC) WalletName added in v1.25.0

func (a *WebRPC) WalletName(ctx context.Context, id string) (string, error)

func (*WebRPC) WalletNameChange added in v1.25.0

func (a *WebRPC) WalletNameChange(ctx context.Context, wallet, newName string) error

func (*WebRPC) WalletNames added in v1.25.0

func (a *WebRPC) WalletNames(ctx context.Context) (map[string]string, error)

func (*WebRPC) WalletRemove added in v1.25.0

func (a *WebRPC) WalletRemove(ctx context.Context, wallet string) error

Jump to

Keyboard shortcuts

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