{"id":18375781,"url":"https://github.com/factomproject/factom-docs","last_synced_at":"2025-04-11T04:39:55.845Z","repository":{"id":79532902,"uuid":"76494254","full_name":"FactomProject/factom-docs","owner":"FactomProject","description":null,"archived":false,"fork":false,"pushed_at":"2019-11-01T22:06:18.000Z","size":9072,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":4,"default_branch":"develop","last_synced_at":"2025-04-11T04:39:51.809Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/FactomProject.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-12-14T20:25:08.000Z","updated_at":"2020-11-17T22:04:14.000Z","dependencies_parsed_at":"2023-05-01T10:31:58.462Z","dependency_job_id":null,"html_url":"https://github.com/FactomProject/factom-docs","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FactomProject%2Ffactom-docs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FactomProject%2Ffactom-docs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FactomProject%2Ffactom-docs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FactomProject%2Ffactom-docs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FactomProject","download_url":"https://codeload.github.com/FactomProject/factom-docs/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248345272,"owners_count":21088241,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-06T00:20:20.654Z","updated_at":"2025-04-11T04:39:55.829Z","avatar_url":"https://github.com/FactomProject.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Read before making API doc changes\n[![CircleCI](https://circleci.com/gh/FactomProject/factom-docs/tree/develop.svg?style=svg)](https://circleci.com/gh/FactomProject/factom-docs/tree/develop)\n\nThe docs have docs? Yes, they do.\n\n\n## API Doc Formatting\nThere is a specific format that Slate likes when making changes to anything inside the api/ directory. The format will be documented here, and be mindful to stick to it.\n\nThe sections will be documented according to the header's markdown level (Amount of these \\#\\#)\n\n###    Each \\#\\# Section\n\nSee the numbered list for a longer explanation. Be mindful each component MUST be followed by a newline. So a 1 line space between each component.\n\n|Component Order|Markdown|\n|:--|:--|\n|(1) Title|\\#\\# METHOD_HERE|\n|(2) Example Request| \\\u003e Example Request|\n|(2.a) Shell Example| \\`\\`\\`shell \u003cbr\u003eEXAMPLE_SHELL\u003cbr\u003e \\`\\`\\`\n|(2.b) Json Example| \\`\\`\\`json \u003cbr\u003eEXAMPLE_JSON\u003cbr\u003e \\`\\`\\`\n|(3) Example Response| \\\u003e Example Response|\n|(3.a) Json Example| \\`\\`\\`json-doc \u003cbr\u003eEXAMPLE_JSON\u003cbr\u003e \\`\\`\\`\n|(4) Description | DESCRIPTION_HERE|\n\n\n1) Section Name starts with a double pound sign, a SPACE, and the method in the curl. (the space is for consistency, it actually doesn't change anything. to Prove that, there is actually many leading spaces before the title of this section ;) )\n\n2) Yes the Example Request MUST come before the description. That is how it knows to lay it next to the description, and not below it.\n\n2.a) The shell example will look as shown. To break shell examples into more than one line, use '\\' followed by NO SPACES so when copy pasting, the newline character is ignored. See other examples to know what I mean. The Json bits can be broken by a newline, but NEVER break up a string between two double quotes \"\"\n\n2.b) I use https://jsonformatter.curiousconcept.com/ to format my json\n\n3) Same as example request\n\n3.a) Yup, json-doc. That way it is always shown, despite being on the 'curl' or 'json' tab.\n\n4) Now your text\n\nFull Example\n\n\u003cpre\u003e\n## directory-block\n\n\u003e Example Request\n\n```json\n{\n  \"jsonrpc\": \"2.0\",\n  \"id\": 0,\n  \"method\": \"directory-block\",\n  \"params\": {\n    \"keymr\": \"36c360817761e0d92af464f7c2e94a7495104d6b0a6051218cc53e52d3d519b6\"\n  }\n}\n```\n\n```shell\ncurl -X POST --data-binary '{\"jsonrpc\": \"2.0\", \"id\": 0, \"method\":\n\"directory-block\", \"params\": {\"KeyMR\":\"7ed5d5b240973676c4a8a71c08c0cedb9e0ea335eaef22995911bcdc0fe9b26b\"}}' \\\n-H 'content-type:text/plain;' http://localhost:8088/v2\n```\n\n\u003e Example Response\n\n```json-doc\n{  \n   \"jsonrpc\":\"2.0\",\n   \"id\":0,\n   \"result\":{  \n      \"header\":{  \n         \"prevblockkeymr\":\"7d15d82e70201e960655ce3e7cf475c9da593dfb82c6dca6377349bd148bf001\",\n         \"sequencenumber\":72497,\n         \"timestamp\":1484858820\n      },\n      \"entryblocklist\":[  \n         {  \n            \"chainid\":\"000000000000000000000000000000000000000000000000000000000000000a\",\n            \"keymr\":\"3faa880a97ef6ce1feca643cffa015dd6be6a597b3f9260e408c5ac9351d1f8d\"\n         },\n         {  \n            \"chainid\":\"000000000000000000000000000000000000000000000000000000000000000c\",\n            \"keymr\":\"5f8c98930a1874a46b47b65b9376a02fbff65b760f6866519799d69e2bc019ee\"\n         },\n         {  \n            \"chainid\":\"000000000000000000000000000000000000000000000000000000000000000f\",\n            \"keymr\":\"8c6fed0f41317cc45201b5b170a9ac5bc045029e39a90b6061211be2c0678718\"\n         }\n      ]\n   }\n}\n```\n\nEvery directory block has a KeyMR (Key Merkle Root), which can be used to retrieve it. The reponse will contain information that can be used to naviagate through all transactions (entry and factoid) within that block. The header of the directory block will contain information regarding the previous directory block's keyMR, directory block height, and the timestamp.\n\n\u003c/pre\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffactomproject%2Ffactom-docs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffactomproject%2Ffactom-docs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffactomproject%2Ffactom-docs/lists"}