1.60.1-next-069fa2b • Published 8 months ago

@safe-global/safe-client-gateway-sdk v1.60.1-next-069fa2b

Weekly downloads
-
License
MIT
Repository
-
Last release
8 months ago

Safe Client Gateway TypeScript SDK

A TypeScript SDK for the Safe Client Gateway.

Usage Policy

Important: The Safe Client Gateway is intended for internal use only and should not be used in public-facing applications, such as Safe Apps. Please avoid using this SDK if you’re building for public consumption.

Installation

To install the SDK, run the following command:

yarn add @safe-global/safe-client-gateway-sdk

Example Usage

Below is an example of how to import and use the SDK to retrieve information about a specific chain:

import { getChain, type Chain } from "@safe-global/safe-client-gateway-sdk";

const chain = await getChain({
  params: {
    path: {
      chainId: "1",
    },
  },
});

Customization

The SDK requires no initialization. However, if you need to override the default base URL (for instance, to point to a staging environment), you can do so at the root of your project as follows:

import { setBaseUrl } from "@safe-global/safe-client-gateway-sdk";

// Example: use the staging deployment
setBaseUrl("https://safe-client.staging.5afe.dev");

Generating a New Build

The ‘Release’ workflow should automatically run in accordance with updates to the Safe Client Gateway. However, it can also be manually triggered.

1.60.0

9 months ago

1.60.1

9 months ago