{"id":26497664,"url":"https://github.com/robin-thomas/erasure-sdk","last_synced_at":"2025-03-20T13:57:21.836Z","repository":{"id":57151995,"uuid":"221345978","full_name":"robin-thomas/erasure-sdk","owner":"robin-thomas","description":null,"archived":false,"fork":false,"pushed_at":"2024-08-31T13:07:30.000Z","size":2387,"stargazers_count":4,"open_issues_count":25,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-07T01:35:35.593Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://erasure-docs.robinthomas2591.now.sh/","language":"JavaScript","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/robin-thomas.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":"2019-11-13T01:25:43.000Z","updated_at":"2025-01-15T04:12:01.000Z","dependencies_parsed_at":"2022-08-27T06:11:44.965Z","dependency_job_id":null,"html_url":"https://github.com/robin-thomas/erasure-sdk","commit_stats":null,"previous_names":["robin-thomas/erasure-client"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robin-thomas%2Ferasure-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robin-thomas%2Ferasure-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robin-thomas%2Ferasure-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robin-thomas%2Ferasure-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/robin-thomas","download_url":"https://codeload.github.com/robin-thomas/erasure-sdk/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244166698,"owners_count":20409178,"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":"2025-03-20T13:57:21.012Z","updated_at":"2025-03-20T13:57:21.825Z","avatar_url":"https://github.com/robin-thomas.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Erasure SDK\n\n![](https://img.shields.io/badge/nodejs-12.04-blue.svg)\n[![License](https://img.shields.io/badge/license-MIT-green.svg)](https://opensource.org/licenses/MIT)\n\n## [Winner of CoinList + Erasure hackathon!!](https://medium.com/coinlist/announcing-the-winners-of-the-erasure-coinlist-hackathon-84462559b26c)\n\n# Table of Contents\n\n1. [Introduction](#introduction)\n2. [Features](#features)\n3. [Tests](#tests)\n\n# Introduction\n\n**Erasure SDK** is an SDK for Erasure writen in JS.\n\nSDK documentation can be found here: https://erasure-docs.robinthomas2591.now.sh/\n\nSDK can be installed by,\n\n```sh\n$ npm install @robinthomas/erasure-sdk\n```\n\n# Features\n\n- Supports Erasure version - v1.3.0\n- Supports Erasure Feeds, Posts, Escrows and Agreements\n- Keyvault for client side encryption and transaction signing (using 3Box)\n- Datastore for storing feed, post and other details (using 3Box)\n- Ability to pass a web3Provider (optional)\n- Simplifies SDK for users using classes \u0026 objects.\n- ErasureFeed\n  - add a post while creating a new feed (optional)\n  - create a new post\n  - retrieve all the posts in a feed\n  - reveal all the posts in a feed\n  - check if the posts have been revealed or not\n- ErasurePost\n  - offer to sell a post\n  - find the number of sell offers for a post\n  - offer to buy a post\n  - find the number of buy offers for a post\n  - reveal a post\n  - get the total number of times a post has been sold\n- ErasureEscrow\n  - deposit stake by seller (if the payment is already deposited by buyer, encrypted sym key will be added to escrow)\n  - deposit payment into the escrow by the buyer\n  - finalize the escrow (and add the encrypted sym key to the escrow)\n  - cancel an escrow\n- Escrow Agreement\n  - stake some amount into an agreement (called by operator)\n  - reward the staker (called by counterparty)\n  - punish, i.e. burn some stake (called by counterparty)\n  - release some stake (called by counterparty)\n  - request some withdraw (called by staker to start the countdown to withdraw some stake)\n  - withdraw some stake to a recipient (called by staker)\n  - check the agreement status\n- Given a address/proofhash, detect if its an ErasureFeed, Post, Agreement or Escrow and return the correct object\n\n# Tests\n\nTests are written using _mocha_ and are executed with the help of _truffle_. Test coverage is using _nyc_.\n\nThese tests are run in a test _ganache_ network, which deploys all the Erasure smart contracts v1.2.0 and then runs through all the contract tests.\n\n```sh\nnpm run test\nnpm run coverage\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobin-thomas%2Ferasure-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frobin-thomas%2Ferasure-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobin-thomas%2Ferasure-sdk/lists"}