{"id":25697656,"url":"https://github.com/setprotocol/set.js","last_synced_at":"2025-04-28T14:13:48.295Z","repository":{"id":37721856,"uuid":"281022457","full_name":"SetProtocol/set.js","owner":"SetProtocol","description":"Javascript library for the Set Protocol V2 ","archived":false,"fork":false,"pushed_at":"2022-07-21T06:13:38.000Z","size":2076,"stargazers_count":34,"open_issues_count":14,"forks_count":14,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-04-28T14:13:42.171Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SetProtocol.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":"2020-07-20T05:30:11.000Z","updated_at":"2024-12-05T06:08:26.000Z","dependencies_parsed_at":"2022-09-06T09:03:26.184Z","dependency_job_id":null,"html_url":"https://github.com/SetProtocol/set.js","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SetProtocol%2Fset.js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SetProtocol%2Fset.js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SetProtocol%2Fset.js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SetProtocol%2Fset.js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SetProtocol","download_url":"https://codeload.github.com/SetProtocol/set.js/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251326851,"owners_count":21571636,"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-02-25T02:25:27.165Z","updated_at":"2025-04-28T14:13:48.270Z","avatar_url":"https://github.com/SetProtocol.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\u003cimg src=\"https://s3-us-west-1.amazonaws.com/set-protocol/img/assets/set-protocol-logo.png\" width=\"64\" /\u003e\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://circleci.com/gh/SetProtocol/set.js\"\u003e\n    \u003cimg src=\"https://img.shields.io/circleci/build/gh/SetProtocol/set.js/master\" /\u003e\n  \u003c/a\u003e\n  \u003ca href='https://github.com/SetProtocol/set.js/blob/master/LICENSE' target=\"_blank\" rel=\"noopener\"\u003e\n    \u003cimg src='https://img.shields.io/badge/License-Apache%202.0-blue.svg' alt='License' /\u003e\n  \u003c/a\u003e\n  \u003ca href='https://www.npmjs.com/package/setprotocol.js'\u003e\n    \u003cimg src='https://img.shields.io/npm/v/set.js.svg' alt='NPM' /\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n# set.js\n\n`set.js` is a library for wrapping and interacting with Set Protocol V2 smart contracts.\nThis library enables you to create, issue, redeem, and trade for Sets.\n\nFor Set Protocol V2 smart contract function descriptions, visit our [docs](https://docs.tokensets.com/developers/contracts/protocol)\n\n## Getting Started\n\n1. Add this package to your project: `yarn install set.js`\n2. Configure your Set.js instance to read from \u0026 write to [Ethereum, Polygon, or Optimism contract addresses](https://docs.tokensets.com/developers/contracts/deployed/protocol).\n   Your configuration for Ethereum Mainnet (Production) might look like this:\n\n```\nconst SetJsEthereumMainnetAddresses = {\n  controllerAddress: \"0xF1B12A7b1f0AF744ED21eEC7d3E891C48Fd3c329\",\n  setTokenCreatorAddress: \"0x026d25C2B70Ddbb8D759f1f38d6fD6e23b60B6DF\",\n  basicIssuanceModuleAddress: \"0x508910aA6fF3D029Dc358dD0f775877A355BA35B\",\n  debtIssuanceModuleAddress: \"0x338BEf3f37794dd199d6910E6109125D3eCa6048\",\n  debtIssuanceModuleV2Address: \"0x3C0CC7624B1c408cF2cF11b3961301949f2F7820\",\n  streamingFeeModuleAddress: \"0x3D8d14b7eFb8e342189ee14c3d40dCe005EB901B\",\n  tradeModuleAddress: \"0x45D67b9dbEA9bd51ED2B67832addEAF839628fAa\",\n  navIssuanceModuleAddress: \"0x33f6184b1695a8Fe344Ea6b7De11aA35A74Ec300\",\n  protocolViewerAddress: \"0x15D860670b7DC211714282f1583CF591Cc3A945E\"\n}\n```\n\n3. Pass in an ethereum provider to your Set.js instance (either an [ethers.js](https://docs.ethers.io/v5/) or [web3.js](https://web3js.readthedocs.io/en/v1.7.0/) will work). Your Set.js initialization might look like this:\n\n```\nconst SetJsConfig = {\n  ethersProvider: new ethers.providers.Web3Provider(myProvider),\n  ...SetJsEthereumMainnetAddresses,\n};\n\nconst SetJsInstance = new SetJs(SetJsConfig);\n```\n\n4. Begin using the Set Protocol. Try this command to see if your instance has been set up correctly (for ethereum production mainnet):\n\n```\nmySetJsInstance\n  .setToken\n  .fetchSetDetailsAsync(\n    \"0x1494CA1F11D487c2bBe4543E90080AeBa4BA3C2b\",   // DeFi Pulse Index Set Token\n    [\"0xd8EF3cACe8b4907117a45B0b125c68560532F94D\"], // Basic Issuance Module\n    myAccount\n  )\n```\n\n#### Take a look at our [developer portal](https://docs.tokensets.com/) for more information on Set Protocol.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsetprotocol%2Fset.js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsetprotocol%2Fset.js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsetprotocol%2Fset.js/lists"}