open-index/open-npm huggingface dataset:
npm package: @gnosis.pm/gnosisjs
Description: A javascript library for building applications on top of Gnosis, the Ethereum prediction market platform
Author: Gnosis
Latest version: 2.0.0
Deprecated: This package has been renamed to @gnosis.pm/pm-js

# Gnosis.js Library

[![Logo](https://raw.githubusercontent.com/gnosis/gnosis.js/master/assets/logo.png)](https://gnosis.pm/)

[![Build Status](https://travis-ci.org/gnosis/gnosis.js.svg?branch=master)](https://travis-ci.org/gnosis/gnosis.js)

[![Slack Status](https://slack.gnosis.pm/badge.svg)](https://slack.gnosis.pm)

## Getting Started

See the [documentation](https://gnosisjs.readthedocs.io/en/latest/).

## Really quick start

1. Get [Ganache-cli](https://github.com/trufflesuite/ganache-cli)
   ```
   npm install -g ganache-cli
   ```
2. Run this:
   ```
   ganache-cli -d -i 437894314312
   ```
3. Clone [Gnosis contracts](https://github.com/gnosis/gnosis-contracts), cd in there, and migrate the contracts onto the Ganache-cli instance with:
   ```
   cd path/to/gnosis-contracts
   npm install
   npm run migrate
   ```
4. Download [`gnosis.js`](https://raw.githubusercontent.com/gnosis/gnosis.js/master/dist/gnosis.js) and put it in an HTML file:
   ```
   <script src=gnosis.js></script>
   ```
5. Follow some tutorials:
   * [API Overview](https://gnosisjs.readthedocs.io/en/latest/api-overview.html)
   * [Events, Oracles, and Markets](https://gnosisjs.readthedocs.io/en/latest/events-oracles-and-markets.html)
npm package: @gnosis.pm/pm-js
Description: A javascript library for building applications on top of Gnosis, the Ethereum prediction market platform
Author: Gnosis
Latest version: 2.2.0

# Gnosis Prediction Market JS Library

[![Logo](https://raw.githubusercontent.com/gnosis/pm-js/master/assets/logo.png)](https://gnosis.pm/)

[![Build Status](https://travis-ci.org/gnosis/pm-js.svg?branch=master)](https://travis-ci.org/gnosis/pm-js)

[![Slack Status](https://slack.gnosis.pm/badge.svg)](https://slack.gnosis.pm)

## Getting Started

See the [documentation](https://gnosis-apollo.readthedocs.io/en/latest/pm-js.html).

## Really quick start

1. Get [Ganache-cli](https://github.com/trufflesuite/ganache-cli)
   ```sh
   npm install -g ganache-cli
   ```
2. Run this:
   ```sh
   ganache-cli -d -i 437894314312
   ```
3. Clone [pm-contracts](https://github.com/gnosis/pm-contracts), cd in there, and migrate the contracts onto the Ganache-cli instance with:
   ```sh
   cd path/to/pm-contracts
   npm install
   npm run migrate
   ```
4. Download [`gnosis-pm.js`](https://raw.githubusercontent.com/gnosis/pm-js/master/dist/gnosis-pm.js) and put it in an HTML file:
   ```html
   <script src="gnosis-pm.js"></script>
   ```
npm package: @gnosis.pm/safe-apps-onboard
Description: An Onboard.js wrapper for Safe App support
Author: Gnosis
Latest version: 0.3.0
Deprecated: Onboard.js v1.26.0 includes support for Safe Apps out of the box. See https://github.com/blocknative/onboard/releases/tag/1.26.0

# Safe Apps Onboard

This is a wrapper around [Onboard](https://github.com/blocknative/onboard) that adds Safe Apps support.

If the app using the wrapper is run as a Safe App the `walletSelect` method will automatically connect to the Safe App.

### How to use

- Install the package and its dependencies

```
npm i @gnosis.pm/safe-apps-onboard @gnosis.pm/safe-apps-sdk bnc-onboard 

yarn add @gnosis.pm/safe-apps-onboard @gnosis.pm/safe-apps-sdk bnc-onboard 
```


- Setup Safe App
  - See https://docs.gnosis.io/safe/docs/sdks_safe_apps/


- Use `Onboard` from `safe-apps-onboard` instead of `bnc-onboard`

```js
import Onboard from 'safe-apps-onboard'

export const onboard = Onboard(onboardOptions)
```
npm package: @gnosis.pm/safe-apps-provider
Description: A provider wrapper of Safe Apps SDK
Author: Gnosis
Latest version: 0.15.1

# Safe Apps Provider

[![npm](https://img.shields.io/npm/v/@gnosis.pm/safe-apps-provider)](https://www.npmjs.com/package/@gnosis.pm/safe-apps-provider)

This is a provider that follows common standards (e.g. [EIP-1193](https://eips.ethereum.org/EIPS/eip-1193)) and can be used with various Web3 libraries (e.g. web3.js or Ethers)

### How to use

- Add npm package

```bash
yarn add @gnosis.pm/safe-apps-provider

npm i @gnosis.pm/safe-apps-provider
```

### SafeAppProvider

The provider can be used with the [safe-apps-react-sdk](https://github.com/gnosis/safe-apps-sdk/tree/master/packages/safe-apps-react-sdk) and common web3 libraries.

#### With Ethers.js

- [Ethers.js](https://docs.ethers.io/v5/api/providers/other/#Web3Provider)

```js
import React, { useMemo } from 'react';
import { ethers } from 'ethers';
import { useSafeAppsSDK } from '@gnosis.pm/safe-apps-react-sdk';
import { SafeAppProvider } from '@gnosis.pm/safe-apps-provider';

const App = () => {
  const { sdk, safe } = useSafeAppsSDK();
  const web3Provider = useMemo(() => new ethers.providers.Web3Provider(new SafeAppProvider(safe, sdk)), [sdk, safe]);

  // use provider with contracts

  return;
};

export default App;
```

#### With web3.js

- [web3.js](https://web3js.readthedocs.io/en/v1.5.2/web3.html)

```js
import React, { useMemo } from 'react';
import Web3 from 'web3';
import { useSafeAppsSDK } from '@gnosis.pm/safe-apps-react-sdk';
import { SafeAppProvider } from '@gnosis.pm/safe-apps-provider';

const App = () => {
  const { sdk, safe } = useSafeAppsSDK();
  const web3Provider = useMemo(() => new Web3(new SafeAppProvider(safe, sdk)), [sdk, safe]);

  // use provider with contracts

  return;
};

export default App;
```

### A note on gas limit
The ethereum transaction gas limit passed to the safe-apps-provider will be treated as safeTxGas, which is an equivalent of the ethereum transaction gas limit in the Safe context. To learn more about the safe transaction gas, read here:  
https://github.com/safe-global/safe-contracts/blob/c36bcab46578a442862d043e12a83fec41143dec/docs/safe_tx_gas.md  

If you don't want to pass a calculation and leave it to the Safe, pass 0 as the gas limit.

### More scenarios

For the SDK overview documentation, please refer to the [safe-apps-sdk](https://github.com/gnosis/safe-apps-sdk/) documentation
npm package: @gnosis.pm/safe-apps-react-sdk
Description: [![npm](https://img.shields.io/npm/v/@gnosis.pm/safe-apps-react-sdk)](https://www.npmjs.com/package/@gnosis.pm/safe-apps-react-sdk)
Author: Gnosis
Latest version: 4.6.2

# Safe Apps React SDK

[![npm](https://img.shields.io/npm/v/@gnosis.pm/safe-apps-react-sdk)](https://www.npmjs.com/package/@gnosis.pm/safe-apps-react-sdk)

This SDK should provide a simple way to write a React.js [Safe app](https://docs.gnosis-safe.io/build/sdks/safe-apps)

### How to use

- Add npm package

```bash
yarn add @gnosis.pm/safe-apps-react-sdk

npm i @gnosis.pm/safe-apps-react-sdk
```

- Add `SafeProvider`
  Safe provider accepts `loader` and `options` props

```js
// ... other imports
import SafeProvider from '@gnosis.pm/safe-apps-react-sdk';

ReactDOM.render(
  <React.StrictMode>
    <SafeProvider>
      <App /> // Your app
    </SafeProvider>
  </React.StrictMode>,
  document.getElementById('root'),
);
```

- Use Safe Apps SDK Hook

```js
// ... other imports
import { useSafeAppsSDK } from '@gnosis.pm/safe-apps-react-sdk';

const App = () => {
  const { sdk, connected, safe } = useSafeAppsSDK();
  return <div>{safe.safeAddress}</div>;
};
```

### Usages

#### Send transactions

```js
import { BaseTransaction } from '@gnosis.pm/safe-apps-sdk'

const txs: BaseTransaction[] = [
  {
    to: '0x31415629...',
    value: '0',
    data: '0xbaddad',
  },
  //...
];
// Returns a hash to identify the Safe transaction
const safeTxHash: string = await sdk.txs.send({ txs });
```

#### Load Safe transaction information

```js
const safeTx: SafeTransaction = await sdk.txs.getBySafeTxHash(safeTxHash);
```

#### More scenarios

For all available sdk methods, please refer to the [safe-apps-sdk](https://github.com/gnosis/safe-apps-sdk/tree/master/packages/safe-apps-sdk) documentation
npm package: @gnosis.pm/safe-apps-wagmi
Description: WAGMI connector for Safe Apps
Author: Safe
Latest version: 2.1.0

# Safe Apps wagmi connector

[![npm](https://img.shields.io/npm/v/@gnosis.pm/safe-apps-wagmi)](https://www.npmjs.com/package/@gnosis.pm/safe-apps-wagmi)

A connector to be used with wagmi library

## Installation

```bash
yarn add @gnosis.pm/safe-apps-wagmi @wagmi/core

npm install @gnosis.pm/safe-apps-wagmi @wagmi/core
```

## Integration steps

1. Configure wagmi client
```js
import { SafeConnector } from '@gnosis.pm/safe-apps-wagmi';

const chains = ...

const client = createClient({
    connectors: [
        new SafeConnector({ chains }),
        new MetaMaskConnector({ chains }),
        new WalletConnectConnector({
            chains,
            options: {
                qrcode: true,
            },
        }),
        new InjectedConnector({
            chains,
            options: {
                name: 'Injected',
                shimDisconnect: true,
            },
        }),
    ],
    ...
});
```

Make sure to omit the `autoConnect` property or set it to false. Wagmi library automatically connects to the last used provider, but instead we want to automatically connect to the Safe if the app is loaded in the Safe Context. Autoconnect logic may be implemented via a separate hook.

2. Create an autoconnect hook

```ts
import { useConnect } from 'wagmi';
import { useEffect } from 'react';

const AUTOCONNECTED_CONNECTOR_IDS = ['safe'];

function useAutoConnect() {
  const { connect, connectors } = useConnect();

  useEffect(() => {
    AUTOCONNECTED_CONNECTOR_IDS.forEach((connector) => {
      const connectorInstance = connectors.find((c) => c.id === connector && c.ready);

      if (connectorInstance) {
        connect({ connector: connectorInstance });
      }
    });
  }, [connect, connectors]);
}

export { useAutoConnect };
```

This hook tries to connect to the Safe wallet automatically on the app load. The hook can be extended with other connectors that use a similar iframe approach (e.g., Ledger Live). It can also be extended with fallback logic such as the last used wallet if the connection to the Safe doesn't succeed.

## Example
An example application can be found [here](/examples/wagmi)

## More scenarios

For the SDK overview documentation, please refer to the [safe-apps-sdk](https://github.com/safe-global/safe-apps-sdk/) documentation
npm package: @gnosis.pm/safe-apps-web3-react
Description: Web3-react connector for Safe Apps
Author: Gnosis
Latest version: 1.5.3
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

# Safe Apps Web3-react connector

[![npm](https://img.shields.io/npm/v/@gnosis.pm/safe-apps-web3-react)](https://www.npmjs.com/package/@gnosis.pm/safe-apps-web3-react)

A connector to be used with web3-react package

## Installation

```bash
yarn add @gnosis.pm/safe-apps-web3-react

npm install @gnosis.pm/safe-apps-web3-react
```

## Usage

```js
import { SafeAppConnector } from '@gnosis.pm/safe-apps-web3-react';
```

The connector follows web3-react's connectors API convention. Visit web3-react [repo](https://github.com/NoahZinsmeister/web3-react) for more details

### Helper hook

You can use our helper hook to automatically connect to a safe, it will automatically connect to the Safe if it detects that it's loaded in Safe App context:

```js
import { useSafeAppConnection, SafeAppConnector } from '@gnosis.pm/safe-apps-web3-react';

const safeMultisigConnector = new SafeAppConnector();

const App = () => {
  const triedToConnectToSafe = useSafeAppConnection(safeMultisigConnector);

  React.useEffect(() => {
    if (triedToConnectToSafe) {
      // fallback to other providers
    }
  }, [triedToConnectToSafe]);
};
```

## More scenarios

For the SDK overview documentation, please refer to the [safe-apps-sdk](https://github.com/gnosis/safe-apps-sdk/) documentation
npm package: @gnosis.pm/safe-apps-web3modal
Description: A web3modal wrapper for Safe App support
Author: Gnosis
Latest version: 17.0.4

# Safe Apps Web3Modal

[![npm](https://img.shields.io/npm/v/@gnosis.pm/safe-apps-web3modal)](https://www.npmjs.com/package/@gnosis.pm/safe-apps-web3modal)

This is a wrapper around [web3modal](https://github.com/Web3Modal/web3modal) that adds Safe Apps support.

If the app using the wrapper is run as a Safe App the `connect` method will automatically connect to the Safe App.

### How to use

- Install the package and its dependencies

```
npm i @gnosis.pm/safe-apps-web3modal @gnosis.pm/safe-apps-sdk web3modal

yarn add @gnosis.pm/safe-apps-web3modal @gnosis.pm/safe-apps-sdk web3modal
```

- Setup Safe App

  - See https://docs.gnosis-safe.io/build/sdks/safe-apps

- Use `SafeAppWeb3Modal`

```js
import { SafeAppWeb3Modal } from '@gnosis.pm/safe-apps-web3modal';
const modal = new SafeAppWeb3Modal(web3modalOptions);
```

- Connect to the Safe

```js
const provider = await modal.requestProvider();
```

This will connect to the Safe if it is available. Otherwise, it will fall back to web3modal's `connect` method and show a modal with available wallets.

- Check if loaded as a Safe app

```js
const loadedAsSafeApp = await modal.isSafeApp();
```

## Know issues

### NextJs

Is you use a server side rendering solution remember to instantiate the modal inside an useEffect to avoid NextJS to process this server side where the `window` object does not exist.

```
  const [provider, setProvider] = useState(null);

  useEffect(() => {
    (async () => {
      const modal = new SafeAppWeb3Modal();
      const provider = await modal.requestProvider();
      setProvider(provider);
    })();
  }, []);
```
npm package: @gnosis.pm/safe-core-sdk-types
Description: Safe Core SDK types
Author: Safe
Latest version: 1.7.0
Deprecated: Package no longer supported. It has been migrated to @safe-global/safe-core-sdk-types. Please, update your dependencies.

# Safe Core SDK Types

Common types in the [Safe Core SDK](https://github.com/safe-global/safe-core-sdk)
npm package: @gnosis.pm/safe-core-sdk-utils
Description: Safe Core SDK Utilities
Author: Safe
Latest version: 1.5.0
Deprecated: Package no longer supported. It has been migrated to @safe-global/safe-core-sdk-utils. Please, update your dependencies.

# Safe Core SDK Utils

[![NPM Version](https://badge.fury.io/js/%40gnosis.pm%2Fsafe-core-sdk-utils.svg)](https://badge.fury.io/js/%40gnosis.pm%2Fsafe-core-sdk-utils)
[![GitHub Release](https://img.shields.io/github/release/safe-global/safe-core-sdk.svg?style=flat)](https://github.com/safe-global/safe-core-sdk/releases)
[![GitHub](https://img.shields.io/github/license/safe-global/safe-core-sdk)](https://github.com/safe-global/safe-core-sdk/blob/main/LICENSE.md)

Utilities for the [Safe Core SDK](https://github.com/safe-global/safe-core-sdk) monorepo.

## Table of contents
* [Installation](#installation)
* [Build](#build)

## <a name="installation">Installation</a>

Install the package with yarn or npm:

```bash
yarn install
npm install
```

## <a name="build">Build</a>

Build the package with yarn or npm:

```bash
yarn build
npm build
```
npm package: @gnosis.pm/safe-ethers-adapters
Description: Safe Ethers Adapters
Author: Safe
Latest version: 0.1.0-alpha.13
Deprecated: Package no longer supported. It has been migrated to @safe-global/safe-ethers-adapters. Please, update your dependencies.

# Safe Ethers Adapters

[![NPM Version](https://badge.fury.io/js/%40gnosis.pm%2Fsafe-ethers-adapters.svg)](https://badge.fury.io/js/%40gnosis.pm%2Fsafe-ethers-adapters)
[![GitHub](https://img.shields.io/github/license/safe-global/safe-core-sdk)](https://github.com/safe-global/safe-core-sdk/blob/main/LICENSE.md)

[Ethers](https://docs.ethers.io/v5/single-page/) adapter that facilitates the interaction with the [Safe Services](https://github.com/safe-global/safe-transaction-service)

## Getting Started

The only adapter currently provided is the `SafeEthersSigner` which implements the [`Signer` interface](https://docs.ethers.io/v5/api/signer/#Signer) from Ethers.

The `SafeEthersSigner` can be used with [Ethers Contracts](https://docs.ethers.io/v5/getting-started/#getting-started--contracts) to deploy and interact with them. Each of these interactions will create a Safe transaction that is published to the [Safe transaction service](https://docs.gnosis.io/safe/docs/services_transactions/). 

For this to work it is required to initialize the `SafeEthersSigner` with an account that is either an owner of the specified Safe or a [delegate](https://docs.gnosis.io/safe/docs/tutorial_tx_service_set_delegate/) of one of the owners.

An example for such an account would be the private key of one of the owners that is used with an [Ethers Wallet](https://docs.ethers.io/v5/api/signer/#Wallet)

```js
const signer = new Wallet("some_private_key", ethereumProvider)
```

It is also necessary to specify a service instance that should be used to publish the Safe transactions. An example for this would be the Mainnet instance of the [Safe Transaction Service](https://safe-transaction-mainnet.safe.global/): `https://safe-transaction-mainnet.safe.global/`

```js
const service = new SafeService("some_service_url")
```

A Safe instance must also be created before obtaining the signer.
It may be obtained with:

```js
import { ethers } from "ethers"
import Safe from "@gnosis.pm/safe-core-sdk"
import EthersAdapter from "@gnosis.pm/safe-ethers-lib"

const safe = await Safe.create({
  ethAdapter: new EthersAdapter({ ethers, signer }),
  safeAddress: "some_safe_address"
})
```

Using these components it is possible to create an instance of the `SafeEthersSigner`

```js
const safeSigner = new SafeEthersSigner(safe, service, provider)
```

See [examples](/packages/safe-ethers-adapters/examples) for more information.

## Installation

Select correct nvm version:

```bash
nvm use
```

Install the package with yarn or npm:

```bash
yarn install
npm install
```

## Build

Build the package with yarn or npm:

```bash
yarn build
npm build
```

## License

This library is released under MIT.

## Contributors

- Richard Meisser ([rmeissner](https://github.com/rmeissner))
- Germán Martínez ([germartinez](https://github.com/germartinez))
npm package: @gnosis.pm/safe-ethers-lib
Description: Ethers library adapter to be used by Safe Core SDK
Author: Safe
Latest version: 1.7.0
Deprecated: Package no longer supported. It has been migrated to @safe-global/safe-ethers-lib. Please, update your dependencies.

# Safe Ethers Lib

[![NPM Version](https://badge.fury.io/js/%40gnosis.pm%2Fsafe-ethers-lib.svg)](https://badge.fury.io/js/%40gnosis.pm%2Fsafe-ethers-lib)
[![GitHub Release](https://img.shields.io/github/release/safe-global/safe-core-sdk.svg?style=flat)](https://github.com/safe-global/safe-core-sdk/releases)
[![GitHub](https://img.shields.io/github/license/safe-global/safe-core-sdk)](https://github.com/safe-global/safe-core-sdk/blob/main/LICENSE.md)

Ethers.js wrapper that contains some utilities and the Safe contracts types (generated with typechain ethers-v5). It is used to initialize the [Safe Core SDK](https://github.com/safe-global/safe-core-sdk/tree/main/packages/safe-core-sdk).

## Table of contents
* [Installation](#installation)
* [Build](#build)
* [Initialization](#initialization)
* [License](#license)
* [Contributors](#contributors)

## <a name="installation">Installation</a>

Install the package with yarn or npm:

```bash
yarn install
npm install
```

## <a name="build">Build</a>

Build the package with yarn or npm:

```bash
yarn build
npm build
```

## <a name="initialization">Initialization</a>

If the app integrating the SDK is using `Ethers` `v5`, create an instance of the `EthersAdapter`, where `signer` is the Ethereum account we are connecting and the one who will sign the transactions.

```js
import { ethers } from 'ethers'
import EthersAdapter from '@gnosis.pm/safe-ethers-lib'

const web3Provider = // ...
const provider = new ethers.providers.Web3Provider(web3Provider)
const safeOwner = provider.getSigner(0)

const ethAdapter = new EthersAdapter({
  ethers,
  signer: safeOwner
})
```

In case the `ethAdapter` instance is only used to execute read-only methods the `signerAddress` property can be omitted.

```js
const readOnlyEthAdapter = new EthersAdapter({ ethers })
```

## <a name="license">License</a>

This library is released under MIT.

## <a name="contributors">Contributors</a>

- Germán Martínez ([germartinez](https://github.com/germartinez))
npm package: @gnosis.pm/safe-modules-deployments
Description: Collection of Safe Modules singleton deployments
Author: mikhail@gnosis.io
Latest version: 1.1.0
Deprecated: Deprecated in favor of @safe-global/safe-modules-deployments

# Gnosis Safe Modules Deployments

[![npm version](https://badge.fury.io/js/%40gnosis.pm%2Fsafe-modules-deployments.svg)](https://badge.fury.io/js/%40gnosis.pm%2Fsafe-modules-deployments)

This contract contains a collection of deployments of audited contracts from the [Safe modules repository](https://github.com/gnosis/safe-modules).

For each deployment the address on the different networks and the abi files are available. To get an overview of the available versions check the available [json assets](./src/assets/).

To add additional deployments please follow the [deployment steps in the module folder in the Safe modules repository](https://github.com/gnosis/safe-modules).

## Install

- npm - `npm i @gnosis.pm/safe-modules-deployments`
- yarn - `yarn add @gnosis.pm/safe-modules-deployments`

## Usage

It is possible to directly use the json files in the [assets folder](./src/assets/) that contain the addresses and abi definitions.

An alternative is to use the JavaScript library methods to query the correct deployment. The library supports different methods to get the deployment of a specific contract.

Each of the method takes an optional `DeploymentFilter` as a parameter.

```ts
interface DeploymentFilter {
  version?: string;
  released?: boolean; // Defaults to true if no filter is specified
  network?: string; // Chain id of the network
}
```

The method will return a `SingletonDeployment` object or `undefined` if no deployment was found for the specified filter.

```ts
interface SingletonDeployment {
  version: string;
  abi: any[];
  networkAddresses: Record<string, string>; // Address of the contract by network
  contractName: string;
  released: boolean; // A released version was audited and has a running bug bounty
}
```

- Allowance Module

```ts
const allowanceModule = getAllowanceModuleDeployment();

// Returns latest contract version, even if not finally released yet
const allowanceModuleNightly = getAllowanceModuleDeployment({ released: undefined });

// Returns released contract version for specific network
const allowanceModuleGörli = getAllowanceModuleDeployment({ network: '5' });

// Returns released contract version for specific version
const allowanceModule010 = getAllowanceModuleDeployment({ version: '0.1.0' });
```

## Notes

A list of network information can be found at [chainid.network](https://chainid.network/)

## License

This library is released under MIT.
npm package: @gnosis.pm/safe-react-gateway-sdk
Description: [![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)
Author: katspaugh
Latest version: 3.5.2
Deprecated: Migrated to @safe-global/safe-gateway-typescript-sdk

# Safe Gateway TypeScript SDK

[![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](https://github.com/safe-global/safe-client-gateway)

📖 [API reference](https://safe.global/safe-gateway-typescript-sdk/modules.html)

## Usage policy

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.

## Using the SDK

Install:

```shell
yarn add @gnosis.pm/safe-react-gateway-sdk
```

Import:

```ts
import { getChainsConfig, type ChainListResponse } from '@gnosis.pm/safe-react-gateway-sdk'
```

Use:

```ts
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:

```ts
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](https://safe.global/safe-gateway-typescript-sdk/modules.html).

## Adding an endpoint

Endpoint types are defined in `src/types/gateway.ts`.

Each endpoint consists of:

- a function defined in `src/index.ts` (e.g. `getBalances`)
- a path definition (e.g. `'/chains/{chainId}/safes/{address}/balances/{currency}/'`)
- operation definition (e.g. `safes_balances_list`)
- response definition

To add a new endpoint, follow the pattern set by the existing endpoints.

## Eslint & prettier

This command will run before every commit:

```shell
yarn eslint:fix
```

## Tests

To run the unit and e2e tests locally:

```shell
yarn test
```

N.B.: the e2e tests make actual API calls on staging.

## Gateway API docs

The TypeScript types in this SDK are based on [Rust types](https://safe-global.github.io/safe-client-gateway/docs/routes/index.html) from the Gateway API.
npm package: @gnosis.pm/safe-singleton-factory
Description: Singleton factory used by Safe related contracts
Author: richard@gnosis.io
Latest version: 1.0.14

# Safe Singleton Factory

Singleton factory used by Safe related contracts based on https://github.com/Arachnid/deterministic-deployment-proxy

The original library used a presigned transaction without a chain id to allow deployment on different chains. Some chains do not allow such transactions to be submitted (e.g. Celo and Avalance) therefore this repository will provide the same factory that can be deployed via a presigned transaction that includes the chain id. The key that is used to sign is controlled by the Safe team.

# Adding new networks

To add support for new networks the same key used for the existing networks should be used to generate a presigned transaction for a new network. To request support for a new network please open a [new issue](https://github.com/gnosis/safe-singleton-factory/issues/new/choose).

To generate the deployment data for a new network the following steps are necessary:

- Set `RPC` in the `.env` file for the new network
- Estimate transaction params via `yarn estimate`

- Set `MNEMONIC` in the `.env` file
- Run `yarn compile <chain_id> [--gasPrice <overwrite_gas_price>] [--gasLimit <overwrite_gas_limit>]`
npm package: @gnosis.pm/safe-web3-lib
Description: Web3 library adapter to be used by Safe Core SDK
Author: Safe
Latest version: 1.7.1
Deprecated: Package no longer supported. It has been migrated to @safe-global/safe-web3-lib. Please, update your dependencies.

# Safe Web3 Lib

[![NPM Version](https://badge.fury.io/js/%40gnosis.pm%2Fsafe-web3-lib.svg)](https://badge.fury.io/js/%40gnosis.pm%2Fsafe-web3-lib)
[![GitHub Release](https://img.shields.io/github/release/safe-global/safe-core-sdk.svg?style=flat)](https://github.com/safe-global/safe-core-sdk/releases)
[![GitHub](https://img.shields.io/github/license/safe-global/safe-core-sdk)](https://github.com/safe-global/safe-core-sdk/blob/main/LICENSE.md)

Web3.js wrapper that contains some utilities and the Safe contracts types (generated with typechain web3-v1). It is used to initialize the [Safe Core SDK](https://github.com/safe-global/safe-core-sdk/tree/main/packages/safe-core-sdk).

## Table of contents
* [Installation](#installation)
* [Build](#build)
* [Initialization](#initialization)
* [License](#license)
* [Contributors](#contributors)

## <a name="installation">Installation</a>

Install the package with yarn or npm:

```bash
yarn install
npm install
```

## <a name="build">Build</a>

Build the package with yarn or npm:

```bash
yarn build
npm build
```

## <a name="initialization">Initialization</a>

If the app integrating the SDK is using `Web3`, create an instance of the `Web3Adapter`, where `signerAddress` is the Ethereum account we are connecting and the one who will sign the transactions.

```js
import Web3 from 'web3'
import Web3Adapter from '@gnosis.pm/safe-web3-lib'

const provider = new Web3.providers.HttpProvider('http://localhost:8545')
const web3 = new Web3(provider)
const safeOwner = '0x<address>'

const ethAdapter = new Web3Adapter({
  web3,
  signerAddress: safeOwner
})
```

In case the `ethAdapter` instance is only used to execute read-only methods the `signerAddress` property can be omitted.

```js
const readOnlyEthAdapter = new Web3Adapter({ web3 })
```

## <a name="license">License</a>

This library is released under MIT.

## <a name="contributors">Contributors</a>

- Germán Martínez ([germartinez](https://github.com/germartinez))
npm package: @gnosis.pm/singleton-deployer-core
Description: Utils to use singleton factories to deploy a contract
Author: richard@gnosis.pm
Latest version: 2.0.0

Singleton Deployer Core
=======================

Security and Liability
----------------------
All contracts are WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

License
-------
All smart contracts are released under MIT.

Contributors
------------
- Richard Meissner ([rmeissner](https://github.com/rmeissner))
npm package: @gnosis.pm/singleton-deployer-eip2470-factory
Description: Singleton factory based on EIP-2470 (https://eips.ethereum.org/EIPS/eip-2470)
Author: richard@gnosis.pm
Latest version: 2.0.0

Singleton Deployer - EIP2470 Factory
====================================

Singleton deployer factory that uses an EIP 2470 based implementation. More information can be found at https://eips.ethereum.org/EIPS/eip-2470.

Security and Liability
----------------------
All contracts are WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

License
-------
All smart contracts are released under MIT.

Contributors
------------
- Richard Meissner ([rmeissner](https://github.com/rmeissner))
npm package: @gnosis.pm/singleton-deployer-safe-factory
Description: Singleton factory based on yul factory (https://github.com/Zoltu/deterministic-deployment-proxy) deployed with EIP-155 transaction
Author: mikhail@gnosis.pm
Latest version: 1.0.0

Singleton Deployer - Safe Singleton Factory
================================

Singleton deployer factory that uses a yul based implementation. More information can be found at https://github.com/gnosis/safe-singleton-factory.


Security and Liability
----------------------
All contracts are WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

License
-------
All smart contracts are released under MIT.

Contributors
------------
- Richard Meissner ([rmeissner](https://github.com/rmeissner))
npm package: @gnosis.pm/singleton-deployer-truffle
Description: Singleton factory for Truffle
Author: richard@gnosis.pm
Latest version: 2.0.0

Singleton Deployer - Truffle
============================

Usage
-----
### Install with yarn:

```bash
yarn add @gnosis.pm/singleton-deployer-truffle
```

### Example migration
```js
const { deployTruffleContract } = require('@gnosis.pm/singleton-deployer-truffle');
const UserContract = artifacts.require("UserContract");

module.exports = function(deployer) {
  deployer.then(async () => {
    await deployTruffleContract(web3, UserContract, contructorArg1, contructorArg2);
  })
};
```

Security and Liability
----------------------
All contracts are WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

License
-------
All smart contracts are released under MIT.

Contributors
------------
- Richard Meissner ([rmeissner](https://github.com/rmeissner))
npm package: @gnosis.pm/singleton-deployer-web3js-provider
Description: Provider for singleton factory using web3js
Author: richard@gnosis.pm
Latest version: 2.0.0

Singleton Deployer - Web3js Provider
====================================

Security and Liability
----------------------
All contracts are WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

License
-------
All smart contracts are released under MIT.

Contributors
------------
- Richard Meissner ([rmeissner](https://github.com/rmeissner))
npm package: @gnosis.pm/singleton-deployer-yul-factory
Description: Singleton factory based on yul factory (https://github.com/Zoltu/deterministic-deployment-proxy)
Author: richard@gnosis.pm
Latest version: 2.0.0

Singleton Deployer - YUL Factory
================================

Singleton deployer factory that uses a yul based implementation. More information can be found at https://github.com/Zoltu/deterministic-deployment-proxy.


Security and Liability
----------------------
All contracts are WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

License
-------
All smart contracts are released under MIT.

Contributors
------------
- Richard Meissner ([rmeissner](https://github.com/rmeissner))
npm package: @gnosis.pm/testable-chi-token
Description: Clone of 1Inch ChiToken that can be deployed on local testnets
Author: Felix Leupold
Latest version: 1.0.0

# Testable ChiToken

A copy of the [1Inch ChiToken](https://github.com/1inch-exchange/chi) that doesn't depend on the hardcoded deployer address to work but instead can be used with arbitrary networks/deployments.

### Usage

```
yarn hardhat compile
yarn hardhat test
```
npm package: @gnosticdev/n8n-nodes-ntfy
Description: Use ntfy.sh to send push notifications to your iPhone, Android, Browser, etc.
Author: gnosticdev
Latest version: 0.1.1

# ntfy.sh Node for n8n

This is an n8n community node for [ntfy](https://ntfy.sh/).

Yea so I made this without checking the community repo first, and theres already a couple of these... Anyway.

Ntfy is a simple notification service that lets you send messages to your phone, email, or other devices. It's a great way to get notifications from your scripts, cron jobs, or any other program.

The ntfy.sh server is free to use, but you can also host your own server (or even add it as a service with n8n in a docker container). Check out the [ntfy docs](https://ntfy.sh/docs/) for more information.

[n8n](https://n8n.io/) is a [fair-code licensed](https://docs.n8n.io/reference/license/) workflow automation platform.

[Installation](#installation)
[Operations](#operations)
[Compatibility](#compatibility)
[Usage](#usage)
[Resources](#resources)
[Version history](#version-history)

## Installation

Follow the [installation guide](https://docs.n8n.io/integrations/community-nodes/installation/) in the n8n community nodes documentation.

## Operations

- Publish a message to a topic

## Credentials

- Base URL: The base URL of your ntfy.sh server (uses default of `https://ntfy.sh` if left blank)
- Authentication: The authentication method to use (uses `Authorization: Bearer <token>` if left blank)

## Compatibility

- n8n v0.200.0 and later

## Usage

Create a topic in Ntfy, either in the mobile app, website, api, cli, etc. Then use enter the topic name in the Ntfy node. That's pretty much it! You can add optional title, clickable URL, actions, tags (emojis), etc.

## Resources

- [n8n community nodes documentation](https://docs.n8n.io/integrations/community-nodes/)
- [Ntfy documentation](https://ntfy.sh/)

## Version history

- v1.0.0: Initial release
npm package: @gns-org/email-templates
Description: GNS email templates
Author: GNS Team
Latest version: 2.2.0

# GNS - Email Templates

A collection of ready-to-use email templates for your applications, built with React Email.

## Installation

```bash
npm install @gns-org/email
# or
yarn add @gns-org/email
# or
pnpm add @gns-org/email
```

## Usage

### Using React Components with Resend API

```jsx
import { Resend } from 'resend';
import { Login } from '@gns-org/email';

const resend = new Resend(process.env.RESEND_API_KEY); // Replace with your API key

// Send email using Resend
async function sendLoginEmail(email, loginUrl) {
  const { data, error } = await resend.emails.send({
    from: 'Your App <onboarding@yourdomain.com>',
    to: [email],
    subject: 'Sign in to your account',
    react: <Login 
      heroImage="https://placehold.co/400x200"
      heading="Sign in to your account"
      subheading="Click the button below to securely sign in to your account."
      buttonLabel="Sign in securely"
      buttonLink={loginUrl}
    />,
  });
  
  if (error) {
    return { success: false, error };
  }
  
  return { success: true, data };
}
```

### Available Templates

- **Login**: Email template for login links/magic links

## Thanks/Inspo

### Versioning

This project uses [Epoch semantic versioning](https://antfu.me/posts/epoch-semver) so expect many major breaking changes while it's in the 0'th epoch