Documentation
¶
Overview ¶
Package lookup is bfinger's side of BRC-24: the finger lookup service's name and the two questions bfinger asks it, over the library's client (package lookup of github.com/lightwebinc/bcommon).
The client (Query, the answer types) carries no finger content and lives in the library. The service name and the shape of each question are the contract with bfinger's host module, so they stay here, beside the tests that pin their bytes. The library's names are re-exported so bfinger's callers keep one import.
Index ¶
Constants ¶
const ServiceFinger = "ls_finger"
ServiceFinger is the lookup service that answers for identity keys.
const TypeOutputList = bclookup.TypeOutputList
TypeOutputList is the one answer type the reader accepts.
Variables ¶
var ErrNotOutputList = bclookup.ErrNotOutputList
ErrNotOutputList is the library's sentinel, the same value, so errors.Is matches either name.
Functions ¶
This section is empty.
Types ¶
type HostAnswer ¶
type HostAnswer = bclookup.HostAnswer
HostAnswer is one host's answer, kept with the host.
type Question ¶
Question is the body of POST /lookup.
func CarrierQuestion ¶
CarrierQuestion is the sub-store question of spec section 14.3: one carrier under one identity, by its commitment. The host answers only that it holds that carrier under that identity; membership of a store is the reader's own check. c is the commitment in hash byte order, as a record carries it; the wire wants display order, which is what chainhash's String gives.
func FingerQuestion ¶
FingerQuestion is the question the finger lookup service parses: the identity key, hex, and nothing else. The bytes it marshals to are pinned by testdata/fixtures/lookup_question_finger.json, because the host module parses exactly that shape and a renamed member would be a query that silently matches nothing.