UNPKG

@bsv/overlay-express

Version:
3 lines 2.25 kB
declare const _default: "`\n# General Guide\n\n## Topic Managers \n\nA Topic Manager controls addition and removal of transaction outputs to an Overlay Topic. It processes transaction by exposing a /submit endpoint, request should looks something like:\n\n### [POST] /submit\n\n#### Request Headers\n\\`\\`\\`json\n{\n \"x-topics\": \"[\"tm_messagebox\"]\", // array of topic identifiers as stringified JSON\n \"x-includes-off-chain-values\": \"false\" // string \"true\" or \"false\"\n}\n\\`\\`\\`\n\n#### Request Body\n\\`\\`\\`json\n[1,1,1,1... ], // transaction in atomic BEEF format as Uint8Array\n\\`\\`\\`\n\nThe engine processes this TaggedBEEF and generates a STEAK (Submitted Transaction Execution AcKnowledgment), which is returned to the client.\n\n#### Response Body\n\\`\\`\\`json\n{\n \"tm_messagebox\": {\n \"outputsToAdmit\": [0], // which of the outputs in the BEEF to admit\n \"coinsToRetain\": [], // which of the inputs in the BEEF to mark spent but keep within the Topic\n \"coinsRemoved\": [], // which of the inputs in the BEEF to remove from the Topic\n },\n ... // per topic\n}\n\\`\\`\\`\n\n<br />\n\n## Lookup Services\n\nA Lookup Service is a component that enables data retrieval from the Overlay Services ecosystem. It allows clients to search and retrieve transactions that were previously submitted to Topic Managers, using specific criteria or identifiers.\n\n### [POST] /lookup\n\n#### Request Body\n\\`\\`\\`json\n{\n \"service\": \"ls_messagebox\", // Lookup Service identifier as string,\n \"query\": \"findAll\" // query must be a string, JSON queries should be stringified\n}\n\\`\\`\\`\n\n#### Response Body\n\\`\\`\\`json\n{\n \"type\": \"output-list\",\n \"outputs\": [{\n \"beef\": [1, 1, 1...], // number[]\n \"outputIndex\": 0, // number\n \"context\"?: [1, 1, 1...], // number[]\n }>]\n}\n\\`\\`\\`\n\n<br />\n\n## Summary\n\nUsually Topic Managers and Lookup Services are paired, but they can be separated for greater flexibility. Together, they form a complete system for data submission, organization, and retrieval within the Overlay Services framework.\n\n<br />\n<br />\n`\n"; export default _default; //# sourceMappingURL=generalGuide.md.d.ts.map