{"id":18263336,"url":"https://github.com/safe-global/safe-gateway-typescript-sdk","last_synced_at":"2025-05-09T00:03:36.807Z","repository":{"id":37103063,"uuid":"383721274","full_name":"safe-global/safe-gateway-typescript-sdk","owner":"safe-global","description":"Safe Gateway TypeScript SDK","archived":false,"fork":false,"pushed_at":"2025-04-22T13:13:19.000Z","size":6760,"stargazers_count":22,"open_issues_count":1,"forks_count":26,"subscribers_count":10,"default_branch":"main","last_synced_at":"2025-05-09T00:02:37.876Z","etag":null,"topics":["ethereum","gnosis-safe","sdk","typescript"],"latest_commit_sha":null,"homepage":"https://safe-global.github.io/safe-gateway-typescript-sdk/modules.html","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/safe-global.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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,"zenodo":null}},"created_at":"2021-07-07T08:04:32.000Z","updated_at":"2025-04-22T13:12:31.000Z","dependencies_parsed_at":"2023-02-13T23:30:27.941Z","dependency_job_id":"bc5a1c58-3aa9-43dc-a2eb-c16db7af0c5c","html_url":"https://github.com/safe-global/safe-gateway-typescript-sdk","commit_stats":{"total_commits":136,"total_committers":19,"mean_commits":7.157894736842105,"dds":0.6764705882352942,"last_synced_commit":"497cef112e6dcad0f1a8e0db611c3522036363a0"},"previous_names":["gnosis/safe-react-gateway-sdk"],"tags_count":109,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/safe-global%2Fsafe-gateway-typescript-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/safe-global%2Fsafe-gateway-typescript-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/safe-global%2Fsafe-gateway-typescript-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/safe-global%2Fsafe-gateway-typescript-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/safe-global","download_url":"https://codeload.github.com/safe-global/safe-gateway-typescript-sdk/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253166502,"owners_count":21864475,"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":["ethereum","gnosis-safe","sdk","typescript"],"created_at":"2024-11-05T11:11:02.646Z","updated_at":"2025-05-09T00:03:36.762Z","avatar_url":"https://github.com/safe-global.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Safe Gateway TypeScript SDK\n\n[![npm](https://img.shields.io/npm/v/@safe-global/safe-gateway-typescript-sdk?label=%40safe-global%2Fsafe-gateway-typescript-sdk)](https://www.npmjs.com/package/@safe-global/safe-gateway-typescript-sdk)\n\nA TypeScript SDK for the [Safe Client Gateway](https://github.com/safe-global/safe-client-gateway)\n\n📖 [Type reference](https://safe-global.github.io/safe-gateway-typescript-sdk/modules.html)   |   \u003cimg src=\"https://github.com/safe-global/safe-gateway-typescript-sdk/assets/381895/ebfa2525-ff65-4597-af2a-17a440ccfb33\" height=\"20\" alt=\"Swagger\" valign=\"text-top\" /\u003e [CGW Swagger](https://safe-client.safe.global)\n\n## Usage policy\n\nNB: Safe Client Gateway isn't meant for public use.\nPlease _do not_ use this SDK if you're building, e.g., a Safe App.\n\n## Using the SDK\n\nInstall:\n\n```shell\nyarn add @safe-global/safe-gateway-typescript-sdk\n```\n\nImport:\n\n```ts\nimport { getChainsConfig, type ChainListResponse } from '@safe-global/safe-gateway-typescript-sdk'\n```\n\nUse:\n\n```ts\nconst chains = await getChainsConfig()\n```\n\nThe SDK needs no initialization unless you want to override the base URL. You can set an alternative base URL like so:\n\n```ts\nimport { setBaseUrl } from '@safe-global/safe-gateway-typescript-sdk'\n\n// Switch the SDK to dev mode\nsetBaseUrl('https://safe-client.staging.5afe.dev')\n```\n\nThe full SDK reference can be found [here](https://safe-global.github.io/safe-gateway-typescript-sdk/modules.html).\n\n## Adding an endpoint\n\nEndpoint types are defined in `src/types/gateway.ts`.\n\nEach endpoint consists of:\n\n- a function defined in `src/index.ts` (e.g. `getBalances`)\n- a path definition (e.g. `'/chains/{chainId}/safes/{address}/balances/{currency}/'`)\n- operation definition (e.g. `safes_balances_list`)\n- response definition\n\nTo add a new endpoint, follow the pattern set by the existing endpoints.\n\n## Eslint \u0026 prettier\n\nThis command will run before every commit:\n\n```shell\nyarn eslint:fix\n```\n\n## Tests\n\nTo run the unit and e2e tests locally:\n\n```shell\nyarn test\n```\n\nN.B.: the e2e tests make actual API calls on staging.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsafe-global%2Fsafe-gateway-typescript-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsafe-global%2Fsafe-gateway-typescript-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsafe-global%2Fsafe-gateway-typescript-sdk/lists"}