{"id":15436627,"url":"https://github.com/kanej/merkling","last_synced_at":"2025-10-14T11:13:09.593Z","repository":{"id":56242361,"uuid":"122545655","full_name":"kanej/merkling","owner":"kanej","description":"JS to IPLD mapping library","archived":false,"fork":false,"pushed_at":"2020-11-18T21:42:15.000Z","size":1306,"stargazers_count":4,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-11T02:20:50.890Z","etag":null,"topics":["ipfs","ipld","js"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kanej.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-02-22T23:00:16.000Z","updated_at":"2023-08-01T10:53:21.000Z","dependencies_parsed_at":"2022-08-15T15:20:28.212Z","dependency_job_id":null,"html_url":"https://github.com/kanej/merkling","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/kanej/merkling","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kanej%2Fmerkling","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kanej%2Fmerkling/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kanej%2Fmerkling/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kanej%2Fmerkling/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kanej","download_url":"https://codeload.github.com/kanej/merkling/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kanej%2Fmerkling/sbom","scorecard":{"id":549156,"data":{"date":"2025-08-11","repo":{"name":"github.com/kanej/merkling","commit":"987e4555fa7adc19a71ce37dfc2a9952d19bc99a"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.6,"checks":[{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":0,"reason":"Found 0/21 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: containerImage not pinned by hash: .devcontainer/Dockerfile:6: pin your Docker image by updating node:lts to node:lts@sha256:3266bc9e8bee1acc8a77386eefaf574987d2729b8c5ec35b0dbd6ddbc40b0ce2","Warn: npmCommand not pinned by hash: .devcontainer/Dockerfile:28","Info:   0 out of   1 containerImage dependencies pinned","Info:   0 out of   1 npmCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 13 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"145 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92","Warn: Project is vulnerable to: GHSA-rmvr-2pp2-xj38","Warn: Project is vulnerable to: GHSA-xx4v-prfh-6cgc","Warn: Project is vulnerable to: GHSA-6chw-6frg-f759","Warn: Project is vulnerable to: GHSA-v88g-cgmw-v5xw","Warn: Project is vulnerable to: GHSA-whgm-jr23-g3j9","Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw","Warn: Project is vulnerable to: GHSA-fwr7-v2mv-hh25","Warn: Project is vulnerable to: GHSA-xq7p-g2vc-g82p","Warn: Project is vulnerable to: GHSA-pp7h-53gx-mx7r","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-cwfw-4gq5-mrqx","Warn: Project is vulnerable to: GHSA-g95f-p29q-9xw4","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-x9w5-v3q2-3rhw","Warn: Project is vulnerable to: GHSA-w8qv-6jwh-64r5","Warn: Project is vulnerable to: GHSA-wg6g-ppvx-927h","Warn: Project is vulnerable to: GHSA-pxg6-pf52-xh8x","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c","Warn: Project is vulnerable to: GHSA-w573-4hg7-7wgq","Warn: Project is vulnerable to: GHSA-h6ch-v84p-w6p9","Warn: Project is vulnerable to: GHSA-3wcq-x3mq-6r9p","Warn: Project is vulnerable to: GHSA-ff7x-qrg7-qggm","Warn: Project is vulnerable to: GHSA-vh7m-p724-62c2","Warn: Project is vulnerable to: GHSA-r9p9-mrjm-926w","Warn: Project is vulnerable to: GHSA-434g-2637-qmqr","Warn: Project is vulnerable to: GHSA-49q7-c7j4-3p7m","Warn: Project is vulnerable to: GHSA-977x-g7h5-7qgw","Warn: Project is vulnerable to: GHSA-f7q4-pwc6-w24p","Warn: Project is vulnerable to: GHSA-fc9h-whq2-v747","Warn: Project is vulnerable to: GHSA-vjh7-7g9h-fjfh","Warn: Project is vulnerable to: GHSA-j4f2-536g-r55m","Warn: Project is vulnerable to: GHSA-r7qp-cfhv-p84w","Warn: Project is vulnerable to: GHSA-4gmj-3p3h-gm8h","Warn: Project is vulnerable to: GHSA-fjxv-7rqg-78g4","Warn: Project is vulnerable to: GHSA-4q6p-r6v2-jvc5","Warn: Project is vulnerable to: GHSA-ww39-953v-wcq6","Warn: Project is vulnerable to: GHSA-pfrx-2q88-qq97","Warn: Project is vulnerable to: GHSA-765h-qjxv-5f44","Warn: Project is vulnerable to: GHSA-f2jv-r9rf-7988","Warn: Project is vulnerable to: GHSA-vfrc-7r7c-w9mx","Warn: Project is vulnerable to: GHSA-7wwv-vh3v-89cq","Warn: Project is vulnerable to: GHSA-43f8-2h32-f4cj","Warn: Project is vulnerable to: GHSA-rc47-6667-2j5j","Warn: Project is vulnerable to: GHSA-qqgx-2p2h-9c37","Warn: Project is vulnerable to: GHSA-78xj-cgh5-2h22","Warn: Project is vulnerable to: GHSA-2p57-rm9w-gvfp","Warn: Project is vulnerable to: GHSA-896r-f27r-55mw","Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h","Warn: Project is vulnerable to: GHSA-v26w-gcxh-v4r7","Warn: Project is vulnerable to: GHSA-3f99-hvg4-qjwj","Warn: Project is vulnerable to: GHSA-6c8f-qphg-qjgp","Warn: Project is vulnerable to: GHSA-f44q-634c-jvwv","Warn: Project is vulnerable to: GHSA-76p3-8jx3-jpfq","Warn: Project is vulnerable to: GHSA-3rfm-jhwj-7488","Warn: Project is vulnerable to: GHSA-hhq3-ff78-jv3g","Warn: Project is vulnerable to: GHSA-p6mc-m468-83gw","Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9","Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm","Warn: Project is vulnerable to: GHSA-5v2h-r2cx-5xgj","Warn: Project is vulnerable to: GHSA-rrrm-qjm4-v8hf","Warn: Project is vulnerable to: GHSA-4xcv-9jjx-gfj3","Warn: Project is vulnerable to: GHSA-7wpw-2hjm-89gp","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-vh95-rmgr-6w4m","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-mwcw-c2x4-8c55","Warn: Project is vulnerable to: GHSA-r683-j2x4-v87g","Warn: Project is vulnerable to: GHSA-w7rc-rwvf-8q5r","Warn: Project is vulnerable to: GHSA-92xj-mqp7-vmcj","Warn: Project is vulnerable to: GHSA-wxgw-qj99-44c2","Warn: Project is vulnerable to: GHSA-5rrq-pxf6-6jx5","Warn: Project is vulnerable to: GHSA-8fr3-hfg3-gpgp","Warn: Project is vulnerable to: GHSA-gf8q-jrpm-jvxq","Warn: Project is vulnerable to: GHSA-2r2c-g63r-vccr","Warn: Project is vulnerable to: GHSA-cfm4-qjh2-4765","Warn: Project is vulnerable to: GHSA-x4jg-mjrx-434g","Warn: Project is vulnerable to: GHSA-5fw9-fq32-wv5p","Warn: Project is vulnerable to: GHSA-px4h-xg32-q955","Warn: Project is vulnerable to: GHSA-93f3-23rq-pjfp","Warn: Project is vulnerable to: GHSA-jmqm-f2gx-4fjv","Warn: Project is vulnerable to: GHSA-pw54-mh39-w3hc","Warn: Project is vulnerable to: GHSA-xgh6-85xh-479p","Warn: Project is vulnerable to: GHSA-hcrg-fc28-fcg5","Warn: Project is vulnerable to: GHSA-8g77-54rh-46hx","Warn: Project is vulnerable to: GHSA-3j8f-xvm3-ffx4","Warn: Project is vulnerable to: GHSA-4p35-cfcx-8653","Warn: Project is vulnerable to: GHSA-7f3x-x4pr-wqhj","Warn: Project is vulnerable to: GHSA-jpp7-7chh-cf67","Warn: Project is vulnerable to: GHSA-q6wq-5p59-983w","Warn: Project is vulnerable to: GHSA-j9fq-vwqv-2fm2","Warn: Project is vulnerable to: GHSA-pqw5-jmp5-px4v","Warn: Project is vulnerable to: GHSA-6fx8-h7jm-663j","Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9","Warn: Project is vulnerable to: GHSA-9wv6-86v2-598j","Warn: Project is vulnerable to: GHSA-g6ww-v8xp-vmwg","Warn: Project is vulnerable to: GHSA-h7cp-r72f-jxh6","Warn: Project is vulnerable to: GHSA-v62p-rq8g-8h59","Warn: Project is vulnerable to: GHSA-hrpp-h998-j3pp","Warn: Project is vulnerable to: GHSA-9q5w-79cv-947m","Warn: Project is vulnerable to: GHSA-p8p7-x288-28g6","Warn: Project is vulnerable to: GHSA-584q-6j8j-r5pm","Warn: Project is vulnerable to: GHSA-r2j6-p67h-q639","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-44c6-4v22-4mhx","Warn: Project is vulnerable to: GHSA-4x5v-gmq8-25ch","Warn: Project is vulnerable to: GHSA-g4rg-993r-mgx7","Warn: Project is vulnerable to: GHSA-4rq4-32rv-6wp6","Warn: Project is vulnerable to: GHSA-64g7-mvw6-v9qj","Warn: Project is vulnerable to: GHSA-fxwf-4rqh-v8g3","Warn: Project is vulnerable to: GHSA-25hc-qcg6-38wj","Warn: Project is vulnerable to: GHSA-xfhh-g9f5-x4m4","Warn: Project is vulnerable to: GHSA-qm95-pgcg-qqfq","Warn: Project is vulnerable to: GHSA-cqmj-92xf-r6r9","Warn: Project is vulnerable to: GHSA-vx3p-948g-6vhq","Warn: Project is vulnerable to: GHSA-3jfq-g458-7qm9","Warn: Project is vulnerable to: GHSA-r628-mhmh-qjhw","Warn: Project is vulnerable to: GHSA-9r2w-394v-53qc","Warn: Project is vulnerable to: GHSA-5955-9wpr-37jh","Warn: Project is vulnerable to: GHSA-qq89-hq3f-393p","Warn: Project is vulnerable to: GHSA-f5x3-32g6-xq36","Warn: Project is vulnerable to: GHSA-5vhg-9xg4-cv9m","Warn: Project is vulnerable to: GHSA-7mc2-6phr-23xc","Warn: Project is vulnerable to: GHSA-52f5-9888-hmc6","Warn: Project is vulnerable to: GHSA-jgrx-mgxx-jf9v","Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3","Warn: Project is vulnerable to: GHSA-w5p7-h5w8-2hfq","Warn: Project is vulnerable to: GHSA-7p7h-4mm5-852v","Warn: Project is vulnerable to: GHSA-38fc-wpqx-33j7","Warn: Project is vulnerable to: GHSA-662x-fhqg-9p8v","Warn: Project is vulnerable to: GHSA-394c-5j6w-4xmx","Warn: Project is vulnerable to: GHSA-78cj-fxph-m83p","Warn: Project is vulnerable to: GHSA-fhg7-m89q-25r3","Warn: Project is vulnerable to: GHSA-g3ch-rx76-35fx","Warn: Project is vulnerable to: GHSA-g78m-2chm-r7qv","Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7","Warn: Project is vulnerable to: GHSA-6fc8-4gx4-v693","Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q","Warn: Project is vulnerable to: GHSA-72mh-269x-7mh5","Warn: Project is vulnerable to: GHSA-h4j5-c7cj-74xg","Warn: Project is vulnerable to: GHSA-c4w7-xm78-47vh","Warn: Project is vulnerable to: GHSA-p9pc-299p-vxgp"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-20T10:19:12.895Z","repository_id":56242361,"created_at":"2025-08-20T10:19:12.895Z","updated_at":"2025-08-20T10:19:12.895Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279019061,"owners_count":26086512,"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","status":"online","status_checked_at":"2025-10-14T02:00:06.444Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["ipfs","ipld","js"],"created_at":"2024-10-01T18:51:59.245Z","updated_at":"2025-10-14T11:13:09.542Z","avatar_url":"https://github.com/kanej.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!-- \u003cdiv align=\"center\"\u003e\n    \u003cimg src=\"./logo/merkling.svg\" alt=\"IPFS in JavaScript logo\" width=\"100\" /\u003e\n\u003c/div\u003e --\u003e\n\n# merkling\n\n[![CircleCI](https://img.shields.io/circleci/build/github/kanej/merkling/master.svg?label=circleci\u0026style=flat-square)](https://circleci.com/gh/kanej/merkling)\n[![npm](https://img.shields.io/npm/v/merkling.svg?style=flat-square)](https://www.npmjs.com/package/merkling 'View on NPM')\n[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg?style=flat-square)](https://standardjs.com)\n[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=flat-square)](https://github.com/semantic-release/semantic-release)\n\n\u003e A js object to IPFS merkle dag mapper\n\nMerkling is a small library for interacting with the [IPLD](https://ipld.io) directed acyclic graph (DAG) in js as if it were an in-memory data structure. The idea is to introduce an exciting new impedance mismatch to the world.\n\n\u003e This is alpha software\n\nAt this stage Merkling is only an exploration of different IPLD api.\n\n## Table of Contents\n\n- [Background](#background)\n- [Install](#install)\n- [Usage](#usage)\n- [API](#api)\n- [Browser Support](#browser%20support)\n- [Maintainers](#maintainers)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Background\n\nIPLD ([Interplanetary Linked Data](https://iplid.io)) is the graph data strucuture that underpins [IPFS](https://ipfs.io) and its file sharing capabilities. In IPFS it is used for modelling a filesystem, but it is capable of modelling more fine grained data structures.\n\nBeing able to store and syncronise a complex graph of data between many clients with the trust guarantees that content addressing provides makes IPLD an attractive option for building dapps. However the IPLD api is low level.\n\nMerkling is an attempt at a different api borrowing from the world of ORMs (nothing could possibly go wrong). The idea is to use ES6 proxies to seamlessly confuse developers with the illusion that IPLD blocks are JS objects and that edges from IPLD block to IPLD block are JS object references.\n\nSee the [usage section](#usage) for an example.\n\n## Install\n\n```bash\nnpm install --save merkling@alpha\n```\n\n## Usage\n\nMerkling requires pulling an ipfs instance, either through [js-ipfs](https://github.com/ipfs/js-ipfs) or [ipfs-http-client](https://github.com/ipfs/js-ipfs-http-client)\n\n```javascript\nconst Merkling = require('merkling')\n\nvar ipfsClient = require('ipfs-http-client')\nvar ipfs = ipfsClient('/ip4/127.0.0.1/tcp/5001')\n\nconst main = async () =\u003e {\n  const merkling = new Merkling({ ipfs })\n\n  // Create an IPLD graph\n  let feedCid\n  await merkling.withSession(async session =\u003e {\n    // Create an IPLD block in-memory\n    // (so not persisted to IPFS)\n    const feed = session.create({\n      title: 'Thoughts',\n      author: 'anon',\n      posts: []\n    })\n\n    // ... and create a few more IPLD blocks\n    const post1 = session.create({\n      text: 'A beginning'\n    })\n\n    const post2 = session.create({\n      text: 'A middle'\n    })\n\n    const post3 = session.create({\n      text: 'An end'\n    })\n\n    // Manipulate and create relationships between\n    // them as if they were JS objects\n    post1.next = post2\n    post2.next = post3\n\n    feed.posts = [post1, post2, post3]\n\n    // Persist all IPLD blocks in the session\n    // in the right order and with their links\n    // [feed] --\u003e [post1]\n    //   |          |\n    //   |------\u003e [post2]\n    //   |          |\n    //   |------\u003e [post3]\n    await session.save()\n\n    // Print the CID of the root IPLD block\n    // of the graph\n    feedCid = Merkling.cid(feed)\n    console.log(`Original Feed CID: ${feedCid.toBaseEncodedString()}`)\n  })\n\n  // Update the IPLD graph, we persisted in a\n  // new session\n  let updateFeedCid\n  await merkling.withSession(async session =\u003e {\n    // Read the root IPLD block from IPFS,\n    // its linked IPLD nodes will be unloaded\n    // proxies\n    const savedFeed = await session.get(feedCid)\n\n    // Force the loading from IPFS of the linked posts\n    for (const post of savedFeed.posts) {\n      await Merkling.resolve(post)\n    }\n\n    // Update a subnode of the root\n    savedFeed.posts[1].text = 'A longer middle'\n\n    // Persist the changes\n    await session.save()\n\n    // Print the updated CID of the Root IPLD block\n    updateFeedCid = Merkling.cid(savedFeed)\n    console.log(`Updated Feed CID: ${updateFeedCid.toBaseEncodedString()}`)\n  })\n\n  // Print the new updated graph\n  await merkling.withSession(async session =\u003e {\n    const savedFeed = await session.get(updateFeedCid)\n\n    console.log('')\n    console.log(`Title: ${savedFeed.title} by ${savedFeed.author}`)\n    console.log('---------------------')\n\n    for (const post of savedFeed.posts) {\n      await Merkling.resolve(post)\n      console.log(post.text)\n    }\n\n    console.log('')\n  })\n}\n\nmain()\n```\n\nWhich will produce the output:\n\n```bash\nFeed CID: zBwWX9pGzXr5vkRELYnJGvcmtK2JcH2Cw43JJB8XZywzq2eRKiP6W31yuSjb43K7TvY9bBm2WHqLCQNbscxPmkUsJWtqV\nUpdated Feed CID: zBwWX54YgyC83zywoo9E63i7k3DAx72KMCEK6ZXrweEg6BECnjg7eszhH6gfzuGrkRKA7YHBmLnNMRdHhpPiL5Trc87UC\n\nTitle: Thoughts by anon\n---------------------\nA beginning\nA longer middle\nAn end\n```\n\n## API\n\n\u003c!-- Generated by documentation.js. Update this documentation by updating the source code. --\u003e\n\n#### Table of Contents\n\n- [Merkling](#merkling)\n  - [Parameters](#parameters)\n  - [createSession](#createsession)\n  - [withSession](#withsession)\n    - [Parameters](#parameters-1)\n  - [cid](#cid)\n    - [Parameters](#parameters-2)\n  - [resolve](#resolve)\n    - [Parameters](#parameters-3)\n  - [inspect](#inspect)\n    - [Parameters](#parameters-4)\n  - [isProxy](#isproxy)\n    - [Parameters](#parameters-5)\n  - [isIpldNode](#isipldnode)\n    - [Parameters](#parameters-6)\n  - [isDirty](#isdirty)\n    - [Parameters](#parameters-7)\n- [MerklingSession](#merklingsession)\n  - [Parameters](#parameters-8)\n  - [create](#create)\n    - [Parameters](#parameters-9)\n  - [get](#get)\n    - [Parameters](#parameters-10)\n  - [load](#load)\n    - [Parameters](#parameters-11)\n  - [save](#save)\n\n### Merkling\n\nThe core IPLD access client.\n\n#### Parameters\n\n- `options` **IMerklingOptions**\n\n#### createSession\n\nCreate a new merkling session to act as an\nintermediary with the IPFS node.\n\nReturns **[MerklingSession](#merklingsession)** a new merkling session\n\n#### withSession\n\nRun an action in the form of a callback over a new session\nthat is disposed of afterwards.\n\n##### Parameters\n\n- `sessionAction` **function (session: [MerklingSession](#merklingsession)): void** an action func that operates on the new session\n\nReturns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\u0026lt;void\u003e** a promise that completes after the session action\n\n#### cid\n\nRetrieve the CID for given proxy. Will returned\nundefined if the passed object is not a Merkling proxy\nand will return null if the proxy is dirty.\n\n##### Parameters\n\n- `proxy` **[Proxy](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy)** the object to get the CID for\n\nReturns **(ICid | null | [undefined](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/undefined))** the CID or undefined if the object will never\nhave a CID or null if it is currently dirty\n\n#### resolve\n\nAsynchronously force the retrieval of the state\nstored in IPFS of the IPLD block the proxy represents.\n\n##### Parameters\n\n- `proxy` **[Proxy](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy)** An IPLD block proxy\n\nReturns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\u0026lt;[Proxy](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy)\u003e** the given proxy now loaded and clean.\n\n#### inspect\n\nRetreive the stored state that the Merkling proxy\nis representing. This will include references\nto other Merkling proxies.\n\n##### Parameters\n\n- `proxy` **[Proxy](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy)** the proxy to inspect\n\nReturns **{}** the internal state of the IPLD block being represented\n\n#### isProxy\n\nDetermine whether a given object is a tracked Merkling\nproxy.\n\n##### Parameters\n\n- `potentialProxy` **[Proxy](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy)**\n\nReturns **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** the answer\n\n#### isIpldNode\n\nDetermine whether a given object is a Merkling\nproxy representing an IPLD block.\n\n##### Parameters\n\n- `potentialIpldNode` **[Proxy](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy)**\n\nReturns **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** the answer\n\n#### isDirty\n\nDetermine if a proxy has unsaved changes. Will\nreturn true if the passed object is not a proxy.\n\n##### Parameters\n\n- `proxy` **[Proxy](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy)** the object to test\n\nReturns **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** the answer\n\n### MerklingSession\n\n#### Parameters\n\n- `$0` **{ipfs: IIpfsNode}**\n  - `$0.ipfs`\n\n#### create\n\nCreate a new dirty Merkling proxy that can be manipulated\nbefore later being persisted.\n\n##### Parameters\n\n- `objState` **T** a js object of the state for the IPLD block\n\nReturns **T** a proxy representing the given state as an IPLD block\n\n#### get\n\nGet an IPLD block from IPFS and return\nit as a tracked Merkling proxy.\n\n##### Parameters\n\n- `hashOrCid` **([string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) | ICid)** a CID or base encoded version\n\nReturns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\u0026lt;any\u003e** a clean proxy with the state loaded and accessible\n\n#### load\n\n##### Parameters\n\n- `hash` **([string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) | ICid)**\n\nReturns **IMerklingProxyState**\n\n#### save\n\nSave all proxies that are currently marked as dirty,\nand any proxies that depend on them.\n\nReturns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\u0026lt;void\u003e**\n\n## Browser Support\n\nMerkling requires ES6 Proxies to do its black magic, hence requires a recent version of node or an ever green browser.\n\n## Maintainers\n\n[@kanej](https://github.com/kanej)\n\n## Contribute\n\nPRs accepted.\n\nSmall note: If editing the README, please conform to the [standard-readme](https://github.com/RichardLitt/standard-readme) specification.\n\n## License\n\nMIT © 2019 John Kane\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkanej%2Fmerkling","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkanej%2Fmerkling","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkanej%2Fmerkling/lists"}