{"id":27603890,"url":"https://github.com/aragon/sdk","last_synced_at":"2025-08-25T07:08:50.520Z","repository":{"id":37097241,"uuid":"466209165","full_name":"aragon/sdk","owner":"aragon","description":"Aragon JS SDK","archived":false,"fork":false,"pushed_at":"2024-07-24T12:27:07.000Z","size":3618,"stargazers_count":27,"open_issues_count":13,"forks_count":13,"subscribers_count":8,"default_branch":"develop","last_synced_at":"2025-04-22T19:19:44.635Z","etag":null,"topics":["javascript","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aragon.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"code-of-conduct.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-03-04T17:16:11.000Z","updated_at":"2025-02-17T20:11:48.000Z","dependencies_parsed_at":"2023-09-22T06:54:32.253Z","dependency_job_id":"f3183652-e1b4-4238-b72f-00447c0146b1","html_url":"https://github.com/aragon/sdk","commit_stats":null,"previous_names":[],"tags_count":167,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aragon%2Fsdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aragon%2Fsdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aragon%2Fsdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aragon%2Fsdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aragon","download_url":"https://codeload.github.com/aragon/sdk/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250306601,"owners_count":21408927,"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":["javascript","typescript"],"created_at":"2025-04-22T19:20:13.204Z","updated_at":"2025-04-22T19:20:13.740Z","avatar_url":"https://github.com/aragon.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Aragon](https://res.cloudinary.com/duvrxe0m9/image/upload/v1686656588/aragon-sdk_tjosse.png)\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://aragon.org/\"\u003eAragon website\u003c/a\u003e\n  •\n  \u003ca href=\"https://devs.aragon.org/\"\u003eDeveloper Portal\u003c/a\u003e\n  •\n  \u003ca href=\"http://eepurl.com/icA7oj\"\u003eJoin our Developer Community\u003c/a\u003e\n  •\n  \u003ca href=\"https://aragonproject.typeform.com/dx-contribution\"\u003eContribute\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cbr/\u003e\n\n# Aragon OSx SDK\n\nWelcome to the Aragon OSx SDK!\n\nThe Aragon OSx SDK enables you to interact with the Aragon OSx product using\npure JavaScript (with Typescript support).\n\nWhether you're a developer building a custom DAO or your own dApp, the Aragon\nOSx SDK is your gateway to Aragon OSx' functionality. The Aragon OSx protocol is\na secure and modular DAO framework for building custom organizations on-chain.\n\nWithin this repository, you will find the following JS packages available\nalready on NPM for install:\n\n- [Client](./modules/client): The package you'll be mostly interacting with. It\n  is the package containing all functions querying the Aragon OSx subgraph to\n  fetch information about DAOs and call on certain plugins to perform actions.\n- [IPFS](./modules/ipfs): This package provides a wrapper to send requests to an\n  IPFS Cluster using the IPFS API. It supports standard requests as well as\n  streamed requests, and is used under the hood to send requests by the other\n  packages.\n- [Common](./modules/common): This package provides the general purpose\n  components to use across the entire Aragon SDK like the shared `interfaces`,\n  `constants`, etc.\n\n\u003cbr/\u003e\n\n## Quick Start\n\nThe Aragon OSx SDK is Javascript agnostic, which means you can use it with any\nJavascript framework, including popular ones like NodeJS, Deno, React, Vite, or\nVue. The examples in this README are written using NodeJS.\n\n\u003cbr/\u003e\n\n### 1. Initialize a new project\n\nIf you do not already have a project to work with, create a new one with npm (or\nyour package manager of choice).\n\n```sh\nnpm init\n```\n\nThat will generate a package.json file for you to start running your Javascript\nproject. Optionally you can also enable typescript.\n\n```sh\nnpx tsc --init\n```\n\n\u003cbr/\u003e\n\n### 2. Install the Aragon OSx SDK\n\nInstall the SDK and the ethers package. _**Note**_ Aragon SDK uses ethers\nversion5. Although version 6 may work, we suggest using the same version5 for\ncompatibility:\n\n```sh\nnpm install @aragon/sdk-client @ethers@5\n```\n\n\u003cbr/\u003e\n\n### 3. Create an entry file\n\nCreate a new file `index.ts` (or `index.js`) and import ethers and the SDK. This\nis where we will setup the SDK and call its functions.\n\n```typescript\nimport { Wallet } from \"ethers\";\nimport { Client, Context, ContextParams } from \"@aragon/sdk-client\";\n\nconst main = async () =\u003e {\n  // This is where we will config the SDK in our next step\n};\n\nmain()\n  .then(() =\u003e process.exit(0))\n  .catch((error) =\u003e {\n    console.log(error);\n    process.exit(1);\n  });\n```\n\n### 4. Configure the SDK\n\nIn order to set up the configuration for the Aragon SDK, we want to create a\n\"context\" variable which will give us access to the web3 provider and signer\nhandling the SDK transactions. In this example, we are using a random wallet\nsince we are not sending any transactions. However this should ideally be the\nconnected wallet.\n\n```typescript\nconst contextParams: ContextParams = {\n  network: \"mainnet\",\n  web3Providers: \"https://rpc.ankr.com/eth\",\n  signer: Wallet.createRandom(),\n  // Optional, but without it the client will not be able to resolve IPFS content\n  ipfsNodes: [\n    {\n      url: \"https://testing-ipfs-0.aragon.network/api/v0\",\n      headers: { \"X-API-KEY\": \"b477RhECf8s8sdM7XrkLBs2wHc4kCMwpbcFC55Kt\" },\n    },\n  ],\n};\n\nconst context: Context = new Context(contextParams);\n```\n\nNext thing you'll want to do is set up the general purpose `Client` so you can\ncall on the general purpose SDK functions. These are things like `getDaos`,\n`getDaoBalances`, etc. This client is used to interact with any DAO on the\nnetwork you're connected to.\n\n```typescript\nconst client: Client = new Client(context);\n```\n\n\u003cbr/\u003e\n\n### 5. Using the SDK\n\nIn order to test our SDK set up works, we will try fetching information a\nmultisig DAO.\n\n```typescript\nconsole.log(await client.methods.getDao(\"aa.dao.eth\"));\n```\n\nOur final code should look like this:\n\n```typescript\nimport { Wallet } from \"ethers\";\nimport { Client, Context } from \"@aragon/sdk-client\";\n\nconst main = async () =\u003e {\n  const contextParams: ContextParams = {\n    network: \"mainnet\",\n    web3Providers: \"https://rpc.ankr.com/eth\",\n    signer: Wallet.createRandom(),\n    // Optional, but without it the client will not be able to resolve IPFS content\n    ipfsNodes: [\n      {\n        url: \"https://testing-ipfs-0.aragon.network/api/v0\",\n        headers: { \"X-API-KEY\": \"b477RhECf8s8sdM7XrkLBs2wHc4kCMwpbcFC55Kt\" },\n      },\n    ],\n  };\n\n  const context: Context = new Context(contextParams);\n  const client: Client = new Client(context);\n\n  console.log(await client.methods.getDao(\"aa.dao.eth\"));\n};\n\nmain()\n  .then(() =\u003e process.exit(0))\n  .catch((error) =\u003e {\n    console.log(error);\n    process.exit(1);\n  });\n```\n\nIn order to run the program and get the information details on the aa.dao.eth\nDAO, go to the terminal and run:\n\n```sh\nnode index.ts\n```\n\n```typescript\n{\n  address: '0xec10f0f223e52f2d939c7372b62ef2f55173282f',\n  ensDomain: 'aa.dao.eth',\n  metadata: {\n    name: 'AA Multisig',\n    description: 'This is Aragon Association budget vault on the new aragonOSx stack. ',\n    avatar: 'ipfs://QmT8PDLFQDWaAUoKw4BYziWQNVKChJY3CGi5eNpECi7ufD',\n    links: [ [Object] ]\n  },\n  creationDate: 2023-06-07T07:41:23.000Z,\n  plugins: [\n    {\n      instanceAddress: '0xa2dee0b38d2cfadeb52f2b5a738b5ea7e037dce9',\n      id: 'multisig.plugin.dao.eth',\n      release: 1,\n      build: 1\n    }\n  ]\n}\n```\n\n\u003e For additional information on the SDK capabilities, make sure you check out\n\u003e [Aragon's Developer Portal](https://devs.aragon.org) for more information.\n\n\u003cbr/\u003e\n\n## Available scripts\n\n- `yarn build`\n  - Compiles all the modules, respecting their internal dependencies\n- `yarn clean`\n  - Removes the existing artifacts\n- `yarn lint`\n  - Checks the current code for inconsistencies\n- `yarn test`\n  - Runs the test suite on all modules\n\n\u003cbr/\u003e\n\n## Development\n\nRun `yarn build` to compile the individual packages. Run `yarn test` on them.\n\n\u003cbr/\u003e\n\n## Automatic publishing\n\n### With labels\n\nTo automatically publish the new version on pull request merge, the relevant labels:\n| Label Name | Component getting published | NPM package name |\n| --- | --- | --- |\n| client-release | `modules/client/` | `@aragon/sdk-client` |\n| ipfs-release | `modules/ipfs/` | `@aragon/sdk-ipfs` |\n| common-release | `modules/common/` | `@aragon/sdk-common` |\n\n### With tags\n\nTo publish a new version of a subpackage create a new git tag following this\nschema:\\\n`VERSION-LANGUAGE-PACKAGE_FOLDER_NAME`\n\n- Example to publish a new version of the javascript client module:\n  `0.0.1-javascript-client`.\n- To publish an alpha version just put `-alpha` behind the semver:\n  `0.0.1-alpha-javascript-client`\n\n#### Important:\n\n**Do not run 2 workflows at the same time, otherwise we could encounter a race\ncondition in the git repo which could lead to a failure of the automatic\nchangelog and package.json update**\n\n## Security\n\nIf you believe you've found a security issue, we encourage you to notify us. We welcome working with you to resolve the issue promptly.\n\nSecurity Contact Email: sirt@aragon.org\n\nPlease do not use the issue tracker for security issues.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faragon%2Fsdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faragon%2Fsdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faragon%2Fsdk/lists"}