{"modulePath":"github.com/parallelcointeam/exploder","version":"v2.1.3+incompatible","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package insight\n\nPackage insight handles the insight api\n\n## Constants\n\n```go\nconst APIVersion = 0\n```\nAPIVersion is an integer value, incremented for breaking changes\n\n## Functions\n\n```go\nfunc DisableLog()\n```\nDisableLog disables all library log output.  Logging output is disabled by default until UseLogger is called.\n\n```go\nfunc NewInsightContext(client *rpcclient.Client, blockData *dcrpg.ChainDBRPC, params *chaincfg.Params, memPoolData DataSourceLite, JSONIndent string) *insightApiContext\n```\nNewInsightContext Constructor for insightApiContext\n\n```go\nfunc UseLogger(logger slog.Logger)\n```\nUseLogger uses a specified Logger to output package logging info.\n\n## Types\n\n```go\ntype ApiMux struct {\n\t*chi.Mux\n}\n```\nApiMux contains the struct mux\n\n```go\nfunc NewInsightApiRouter(app *insightApiContext, userRealIP bool) ApiMux\n```\nNewInsightApiRouter returns a new HTTP path router, ApiMux, for the Insight API.\n\n```go\ntype DataSourceLite interface {\n\tUnconfirmedTxnsForAddress(address string) (*txhelpers.AddressOutpoints, int64, error)\n}\n```\nDataSourceLite specifies an interface for collecting data from the built-in databases (i.e. SQLite, storm, ffldb)\n\n```go\ntype NewTx struct {\n\tHex   string\n\tVouts []dcrjson.Vout\n}\n```\nNewTx models data from the notification handler\n\n```go\ntype SocketServer struct {\n\tsocketio.Server\n\t// contains filtered or unexported fields\n}\n```\nSocketServer wraps the socket.io server with the watched address list\n\n```go\nfunc NewSocketServer(newTxChan chan *NewTx, params *chaincfg.Params) (*SocketServer, error)\n```\nNewSocketServer creates and returns new instance of the SocketServer\n\n```go\nfunc (soc *SocketServer) Store(blockData *blockdata.BlockData, _ *wire.MsgBlock) error\n```\nStore broadcasts the lastest block hash to the the inv room\n\n```go\ntype WebSocketTx struct {\n\tHash     string           `json:\"txid\"`\n\tSize     int              `json:\"size\"`\n\tTotalOut int64            `json:\"valueOut\"`\n\tVout     map[string]int64 `json:\"vout,omitempty\"`\n}\n```\nWebSocketTx models the json data send as the tx event in the inv room\n\n","path":"github.com/parallelcointeam/exploder/api/insight","name":"insight","synopsis":"Package insight handles the insight api","isRedistributable":true}
