Security News
Introducing the Socket Python SDK
The initial version of the Socket Python SDK is now on PyPI, enabling developers to more easily interact with the Socket REST API in Python projects.
@gnosis.pm/safe-react-gateway-sdk
Advanced tools
[![npm](https://img.shields.io/npm/v/@gnosis.pm/safe-react-gateway-sdk?label=%40gnosis.pm%2Fsafe-react-gateway-sdk)](https://www.npmjs.com/package/@gnosis.pm/safe-react-gateway-sdk)
A TypeScript SDK for the Safe Client Gateway
NB: Safe Client Gateway isn't meant for public use. Please do not use this SDK if you're building, e.g., a Safe App.
Install:
yarn add @gnosis.pm/safe-react-gateway-sdk
Import:
import { getChainsConfig, type ChainListResponse } from '@gnosis.pm/safe-react-gateway-sdk'
Use:
const chains = await getChainsConfig()
The SDK needs no initialization unless you want to override the base URL. You can set an alternative base URL like so:
import { setBaseUrl } from '@gnosis.pm/safe-react-gateway-sdk'
// Switch the SDK to dev mode
setBaseUrl('https://safe-client.staging.5afe.dev')
The full SDK reference can be found here.
Endpoint types are defined in src/types/gateway.ts
.
Each endpoint consists of:
src/index.ts
(e.g. getBalances
)'/chains/{chainId}/safes/{address}/balances/{currency}/'
)safes_balances_list
)To add a new endpoint, follow the pattern set by the existing endpoints.
This command will run before every commit:
yarn eslint:fix
To run the unit and e2e tests locally:
yarn test
N.B.: the e2e tests make actual API calls on staging.
The TypeScript types in this SDK are based on Rust types from the Gateway API.
FAQs
[![npm](https://img.shields.io/npm/v/@gnosis.pm/safe-react-gateway-sdk?label=%40gnosis.pm%2Fsafe-react-gateway-sdk)](https://www.npmjs.com/package/@gnosis.pm/safe-react-gateway-sdk)
The npm package @gnosis.pm/safe-react-gateway-sdk receives a total of 6,800 weekly downloads. As such, @gnosis.pm/safe-react-gateway-sdk popularity was classified as popular.
We found that @gnosis.pm/safe-react-gateway-sdk demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The initial version of the Socket Python SDK is now on PyPI, enabling developers to more easily interact with the Socket REST API in Python projects.
Security News
Floating dependency ranges in npm can introduce instability and security risks into your project by allowing unverified or incompatible versions to be installed automatically, leading to unpredictable behavior and potential conflicts.
Security News
A new Rust RFC proposes "Trusted Publishing" for Crates.io, introducing short-lived access tokens via OIDC to improve security and reduce risks associated with long-lived API tokens.