package verify // A Preset is one public indexer a user can choose, baked in because typing URLs is not a security // feature. The list is data, not a default: a verdict only exists once the caller picks a quorum, // and nothing here points at the venue's own gateway. // // The Bitcoin entries are Esplora-shaped and were all reachable and mutually agreeing on their tip // when this list was last checked. The forked chain's entry is a different shape and its node is // pruned, which is recorded rather than hidden: it answers the tip and recent blocks, and it // cannot confirm a transaction older than its retention window. type Preset struct { // Name is the operator, which is what agreement is reported against. Name string `json:"name"` // Chain is "btc" or "xbt". Chain string `json:"chain"` // BaseURL is the API root. BaseURL string `json:"base_url"` // Shape is how the endpoints are laid out: "esplora" or "rabid". Shape string `json:"shape"` // Note says what the operator is and what it cannot do. Note string `json:"note,omitempty"` // RetentionFromHeight, when set, is the lowest block the indexer still has: a transaction // below it cannot be confirmed by this source, and a lookup that comes back empty there is // unverifiable rather than absent. RetentionFromHeight int64 `json:"retention_from_height,omitempty"` // Recommended marks the one a fresh configuration starts with, chosen for reach and size // rather than for any relationship with this venue: the most widely used indexer is the // least likely to be the party on the other side of a swap. Recommended bool `json:"recommended,omitempty"` } // Presets is the baked list, most popular first within each chain. func Presets() []Preset { return []Preset{ { Name: "mempool.space", Chain: "btc", Shape: "esplora", BaseURL: "https://mempool.space/api", Recommended: true, Note: "the most widely used open-source explorer; pays for itself with Lightning, which is a reason to exist rather than a reason to lie", }, { Name: "blockstream.info", Chain: "btc", Shape: "esplora", BaseURL: "https://blockstream.info/api", Note: "the reference Esplora deployment; runs on Blockstream's infrastructure", }, { Name: "btcscan.org", Chain: "btc", Shape: "esplora", BaseURL: "https://btcscan.org/api", Note: "community-run Esplora with its own indexing", }, { Name: "mempool.ninja", Chain: "btc", Shape: "esplora", BaseURL: "https://mempool.ninja/api", Note: "an independent mempool.space deployment, useful as a second opinion", }, { Name: "rabid.pool", Chain: "xbt", Shape: "rabid", BaseURL: "https://pool.rabidmining.com/api/explorer/xbt", Note: "the forked chain's only public explorer: a mining pool's own pruned node, so it answers the tip and recent blocks only. One source is not a quorum, and a pruned one cannot confirm an old funding transaction.", RetentionFromHeight: 951771, }, } } // PresetsFor returns the presets for one chain, recommended first. func PresetsFor(chain string) []Preset { var out []Preset for _, preset := range Presets() { if preset.Chain == chain { out = append(out, preset) } } return out }