diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
new file mode 100644
index 000000000..3af627092
--- /dev/null
+++ b/CONTRIBUTING.md
@@ -0,0 +1,86 @@
+# Contributing Guidelines
+
+First off, **thank you** for considering contributing to this project!
+
+## Table of contents
+
+- [I Have a Question](#i-have-a-question)
+- [I Want to Contribute](#i-want-to-contribute)
+
+## I Have a Question
+
+See our [support guidelines](https://github.com/safe-global/safe-core-sdk/tree/main/SUPPORT.md). **Do not** use GitHub issues for general support or questions.
+
+## I Want to Contribute
+### Legal Notice
+You will need to agree to [our CLA](https://safe.global/cla) in order to be possible to consider your contribution.
+
+### Starting Guide
+
+By following the steps bellow you will understand the development process and worflow.
+1. [Forking the repository](#forking-the-repository)
+2. [Installing Node and Yarn](#installing-node-and-yarn)
+3. [Installing dependencies](#installing-dependencies)
+4. [Running the tests](#running-the-tests)
+5. [Using the playground](#using-the-playground)
+6. [Submitting a pull request](#submitting-a-pull-request)
+
+#### Forking the repository
+
+The first step would be to [fork the repository](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/fork-a-repo#forking-a-repository). This will allow you to get a current copy of the repository state. Follow the steps to also clone your forked repository locally.
+
+For active development we use the `development` branch. Our `main` branch contains only the currently published code. All new branches should be created from `development`.
+
+#### Installing Node and Yarn
+
+The Safe{Core} SDK uses [Node](https://nodejs.org) as development environment and Yarn to manage the dependencies. You will need to make sure you are using the [latest Node LTS version](https://nodejs.org/en/about/previous-releases) and that you have available Yarn v1.
+
+You can check which versions you are using with:
+
+```bash
+node -v
+yarn -v
+```
+
+#### Installing dependencies
+
+The Safe{Core} SDK uses a mono-repository structure managed by [Yarn Workspaces](https://classic.yarnpkg.com/lang/en/docs/workspaces/) and [Lerna](https://lerna.js.org). From the root of the repository you will need to install the whole dependency stack and do the project build. Some packages depend on each other, so even when modifiying only one package it's better to run the full build.
+
+Install all dependencies and build the whole project by using the following commands at the project root.
+
+```bash
+yarn install
+yarn build
+```
+
+#### Running the tests
+
+There is already a test script that can be launched from the root of the repository and will use [Lerna](https://lerna.js.org) to run all the tests from all the packages.
+
+```bash
+yarn test
+```
+
+If you would like to test individual packages, **once you make sure you did the build from the root**, you can:
+
+```bash
+yarn test --scope=
+yarn test --scope=@safe-global/protocol-kit
+yarn test --scope=@safe-global/api-kit
+```
+
+For some packages you may need to fill a .env file with some configuration. In those packages you will be able to find a `.env.example` file specifying the necessary parameters.
+
+#### Using the playground
+
+You can use the playground section to do some manual testing using a specific Safe or configuration. The playground can be run from the root of the project as follow:
+
+```bash
+yarn play
+```
+
+You can find more information about the available commands [in the specific section.](https://github.com/safe-global/safe-core-sdk/tree/main/playground)
+
+#### Submitting a pull request
+
+From the forked repository you can [open a pull request](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request) to the original repository. Make sure to select the `safe-global:development` branch as the target branch.
diff --git a/LICENSE.md b/LICENSE.md
index 310e6e37c..0e923d187 100644
--- a/LICENSE.md
+++ b/LICENSE.md
@@ -1,6 +1,6 @@
MIT License
-Copyright (c) 2021-2023 Safe Ecosystem Foundation
+Copyright (c) 2021-2024 Safe Ecosystem Foundation
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
diff --git a/README.md b/README.md
index 5a00cb4d9..33606f604 100644
--- a/README.md
+++ b/README.md
@@ -2,13 +2,30 @@
![Safe_Logos_Core_SDK_Black](https://github.com/safe-global/safe-core-sdk/assets/6764315/7202a24a-2981-4b31-9cf5-ace1c3b2c4fa)
-Software developer tools that facilitate the interaction with the Safe [contracts](https://github.com/safe-global/safe-contracts) and [services](https://github.com/safe-global/safe-transaction-service).
+## Table of contents
+
+- [About](#about)
+- [Documentation](#documentation)
+- [Guides](#guides)
+- [Packages](#packages)
+- [Need Help or Have Questions?](#need-help-or-have-questions)
+- [Contributing](#contributing)
+- [Playground](#playground)
+- [License](#license)
+
+## About
+
+This is a mono-repository containing Javascript software developer tools that facilitate the interaction with [Safe Smart Accounts](https://github.com/safe-global/safe-smart-account) and [services](https://github.com/safe-global/safe-transaction-service).
+
+## Documentation
+
+Visit [our documentation site](https://docs.safe.global/sdk/overview) to start developing using our SDK.
## Guides
| Title | Description |
| ------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| [Integrating the Safe Core SDK](https://github.com/safe-global/safe-core-sdk/blob/main/guides/integrating-the-safe-core-sdk.md) | This guide shows how to use the [Protocol Kit](https://github.com/safe-global/safe-core-sdk/tree/main/packages/protocol-kit) and [API Kit](https://github.com/safe-global/safe-core-sdk/tree/main/packages/api-kit). |
+| [Integrating the Safe{Core} SDK](https://github.com/safe-global/safe-core-sdk/blob/main/guides/integrating-the-safe-core-sdk.md) | This guide shows how to use the [Protocol Kit](https://github.com/safe-global/safe-core-sdk/tree/main/packages/protocol-kit) and [API Kit](https://github.com/safe-global/safe-core-sdk/tree/main/packages/api-kit). |
## Packages
@@ -17,10 +34,22 @@ Software developer tools that facilitate the interaction with the Safe [contract
| [api-kit](https://github.com/safe-global/safe-core-sdk/tree/main/packages/api-kit) | [![NPM Version](https://badge.fury.io/js/%40safe-global%2Fapi-kit.svg)](https://badge.fury.io/js/%40safe-global%2Fapi-kit) | [Safe Transaction Service API](https://github.com/safe-global/safe-transaction-service) client library |
| [auth-kit](https://github.com/safe-global/safe-core-sdk/tree/main/packages/auth-kit) | [![NPM Version](https://badge.fury.io/js/%40safe-global%2Fauth-kit.svg)](https://badge.fury.io/js/%40safe-global%2Fauth-kit) | Typescript library to create an Ethereum address and authenticating a blockchain account using an email address, social media account, or traditional crypto wallets like Metamask |
| [onramp-kit](https://github.com/safe-global/safe-core-sdk/tree/main/packages/onramp-kit) | [![NPM Version](https://badge.fury.io/js/%40safe-global%2Fonramp-kit.svg)](https://badge.fury.io/js/%40safe-global%2Fonramp-kit) | Typescript library that allows users to buy cryptocurrencies using a credit card and other payment options |
-| [protocol-kit](https://github.com/safe-global/safe-core-sdk/tree/main/packages/protocol-kit) | [![NPM Version](https://badge.fury.io/js/%40safe-global%2Fprotocol-kit.svg)](https://badge.fury.io/js/%40safe-global%2Fprotocol-kit) | TypeScript library that facilitates the interaction with the [Safe contracts](https://github.com/safe-global/safe-contracts) |
-| [relay-kit](https://github.com/safe-global/safe-core-sdk/tree/main/packages/relay-kit) | [![NPM Version](https://badge.fury.io/js/%40safe-global%2Frelay-kit.svg)](https://badge.fury.io/js/%40safe-global%2Frelay-kit) | Library to abstract transaction fees payment (gas fees), allowing the use of native tokens or ERC-20 |
+| [protocol-kit](https://github.com/safe-global/safe-core-sdk/tree/main/packages/protocol-kit) | [![NPM Version](https://badge.fury.io/js/%40safe-global%2Fprotocol-kit.svg)](https://badge.fury.io/js/%40safe-global%2Fprotocol-kit) | TypeScript library that facilitates the interaction with [Safe Smart Accounts](https://github.com/safe-global/safe-smart-account) |
+| [relay-kit](https://github.com/safe-global/safe-core-sdk/tree/main/packages/relay-kit) | [![NPM Version](https://badge.fury.io/js/%40safe-global%2Frelay-kit.svg)](https://badge.fury.io/js/%40safe-global%2Frelay-kit) | Library that lets users to pay transaction fees (gas fees) using the native blockchain token or ERC-20 tokens.This kit enables the use of ERC-4337 with Safe |
| [safe-core-sdk-types](https://github.com/safe-global/safe-core-sdk/tree/main/packages/safe-core-sdk-types) | [![NPM Version](https://badge.fury.io/js/%40safe-global%2Fsafe-core-sdk-types.svg)](https://badge.fury.io/js/%40safe-global%2Fsafe-core-sdk-types) | Common types extracted from the [Safe Core SDK](https://github.com/safe-global/safe-core-sdk/tree/main/packages) packages |
+## Need Help or Have Questions?
+
+If you have any doubts, questions, or need assistance, feel free to reach out! [Here you will find how to get support.](https://github.com/safe-global/safe-core-sdk/tree/main/SUPPORT.md)
+
+## Contributing
+
+If you are interested in contributing, please read the [Contributing Guidelines](https://github.com/safe-global/safe-core-sdk/tree/main/CONTRIBUTING.md) **before opening an issue or submitting a pull request**.
+
## Playground
-This project includes a [playground](https://github.com/safe-global/safe-core-sdk/tree/main/playground/README.md) with a few scripts that can be used as a starting point to use the Safe Core SDK.
+This project includes a [playground](https://github.com/safe-global/safe-core-sdk/tree/main/playground/README.md) with a few scripts that can be used as a starting point to use the Safe{Core} SDK.
+
+## License
+
+This library is released under [MIT](https://github.com/safe-global/safe-core-sdk/tree/main/LICENSE.md).
diff --git a/SUPPORT.md b/SUPPORT.md
new file mode 100644
index 000000000..e09b4cadf
--- /dev/null
+++ b/SUPPORT.md
@@ -0,0 +1,23 @@
+# Support Guidelines
+
+We appreciate your interest in our project. If you have questions, need help, or encounter issues, please follow these guidelines:
+
+1. **GitHub Issues**: **Do not** use GitHub issues for general support or questions. Issues are primarily for bug reports, feature requests, and discussions related to code changes.
+
+2. **Stack Exchange**: For support-related questions, we recommend using [Stack Exchange with the appropriate tags](https://ethereum.stackexchange.com/questions/tagged/safe-core). The **safe-core** tag should always be included. Many community members and experts monitor Stack Exchange and can provide timely assistance.
+
+3. **Search First**: Before posting a new question, search existing issues and Stack Exchange to see if your question has already been answered. You might find a solution without waiting for a response.
+
+4. **Be Specific**: When asking for help, provide as much context as possible. Include relevant details such as error messages, steps to reproduce, testing addresses, and the version of our project packages you're using.
+
+5. **Be Respectful**: Treat others with kindness and respect. We're all here to learn and help each other.
+
+## Getting Help
+
+If you need assistance, follow these steps:
+
+1. **Documentation**: Refer to our [project's documentation](https://docs.safe.global/sdk/overview) for usage instructions, FAQs, and troubleshooting tips.
+
+2. **Stack Exchange**: Search for existing answers or ask a new question on Stack Exchange. Use relevant tags as **safe-core**.
+
+Remember that GitHub issues are not the right place for general support. Let's keep our issue tracker focused on improving the project! 😊
diff --git a/guides/README.md b/guides/README.md
index cf7ae92fc..707c9a400 100644
--- a/guides/README.md
+++ b/guides/README.md
@@ -6,7 +6,7 @@ Read about the basics of Safe and how it compares to other solutions [here](http
## Safe Core SDK
-The [Safe Core SDK](https://github.com/safe-global/safe-core-sdk) is a monorepo that contains software developer tools that allows interaction with the [Safe contracts](https://github.com/safe-global/safe-contracts) and the [Safe Transaction Service](https://github.com/safe-global/safe-transaction-service).
+The [Safe Core SDK](https://github.com/safe-global/safe-core-sdk) is a monorepo that contains software developer tools that allows interaction with [Safe Smart Accounts](https://github.com/safe-global/safe-smart-account) and the [Safe Transaction Service](https://github.com/safe-global/safe-transaction-service).
In this guide we will use the following packages to deploy new Safes, create transactions, collect off-chain signatures and execute transactions:
* **safe-core-sdk-types**
@@ -22,7 +22,7 @@ In this guide we will use the following packages to deploy new Safes, create tra
- Approve Safe transactions on-chain
- Execute Safe transactions once they have the required confirmations
- Check the complete [API reference](/packages/protocol-kit#api-reference) for more details.
+ Check the complete [API reference](https://docs.safe.global/sdk/protocol-kit/reference) for more details.
* **api-kit**
@@ -33,7 +33,7 @@ In this guide we will use the following packages to deploy new Safes, create tra
- Get the transaction history of a Safe (and filter by pending, incoming, multisig transactions, etc.)
- Get balances, list of tokens, etc.
- Check the complete [API reference](/packages/api-kit#api-reference) for more details.
+ Check the complete [API reference](https://docs.safe.global/sdk/api-kit/reference) for more details.
## Prerequisites
diff --git a/guides/integrating-the-safe-core-sdk.md b/guides/integrating-the-safe-core-sdk.md
index 7761fca92..d02e28c10 100644
--- a/guides/integrating-the-safe-core-sdk.md
+++ b/guides/integrating-the-safe-core-sdk.md
@@ -40,13 +40,13 @@ As stated in the introduction, the [Safe API Kit](https://github.com/safe-global
```js
import SafeApiKit from '@safe-global/api-kit'
-const safeService = new SafeApiKit({ chainId })
+const apiKit = new SafeApiKit({ chainId })
```
Using the `chainId` is enough for chains where Safe runs a Transaction Service. For those chains where Safe doesn't run a service, use the `txServiceUrl` parameter to set the custom service endpoint.
```js
-const safeService = new SafeApiKit({
+const apiKit = new SafeApiKit({
chainId,
txServiceUrl: 'https://txServiceUrl.com'
})
@@ -59,7 +59,7 @@ import Safe, { SafeFactory } from '@safe-global/protocol-kit'
const safeFactory = await SafeFactory.init({ provider, signer })
-const safeSdk = await Safe.init({ provider, signer, safeAddress })
+const protocolKit = await Safe.init({ provider, signer, safeAddress })
```
There are two versions of the Safe contracts: [Safe.sol](https://github.com/safe-global/safe-contracts/blob/v1.4.1/contracts/Safe.sol) that does not trigger events in order to save gas and [SafeL2.sol](https://github.com/safe-global/safe-contracts/blob/v1.4.1/contracts/SafeL2.sol) that does, which is more appropriate for L2 networks.
@@ -69,7 +69,7 @@ By default `Safe.sol` will be only used on Ethereum Mainnet. For the rest of the
```js
const safeFactory = await SafeFactory.init({ provider, signer, isL1SafeSingleton: true })
-const safeSdk = await Safe.init({ provider, signer, safeAddress, isL1SafeSingleton: true })
+const protocolKit = await Safe.init({ provider, signer, safeAddress, isL1SafeSingleton: true })
```
If the Safe contracts are not deployed to your current network, the property `contractNetworks` will be required to point to the addresses of the Safe contracts previously deployed by you.
@@ -102,7 +102,7 @@ const contractNetworks: ContractNetworksConfig = {
const safeFactory = await SafeFactory.init({ provider, signer, contractNetworks })
-const safeSdk = await Safe.init({ provider, signer, safeAddress, contractNetworks })
+const protocolKit = await Safe.init({ provider, signer, safeAddress, contractNetworks })
```
The `SafeFactory` constructor also accepts the property `safeVersion` to specify the Safe contract version that will be deployed. This string can take the values `1.0.0`, `1.1.1`, `1.2.0`, `1.3.0` or `1.4.1`. If not specified, the `DEFAULT_SAFE_VERSION` value will be used.
@@ -126,7 +126,7 @@ const safeAccountConfig: SafeAccountConfig = {
threshold: 2,
// ... (optional params)
}
-const safeSdk = await safeFactory.deploySafe({ safeAccountConfig })
+const protocolKit = await safeFactory.deploySafe({ safeAccountConfig })
```
Calling the method `deploySafe` will deploy the desired Safe and return a Protocol Kit initialized instance ready to be used. Check the [API Reference](https://github.com/safe-global/safe-core-sdk/tree/main/packages/protocol-kit#deploysafe) for more details on additional configuration parameters and callbacks.
@@ -168,13 +168,13 @@ const options: SafeTransactionOptionalProps = {
nonce // Optional
}
-const safeTransaction = await safeSdk.createTransaction({ transactions, options })
+const safeTransaction = await protocolKit.createTransaction({ transactions, options })
```
We can specify the `nonce` of our Safe transaction as long as it is not lower than the current Safe nonce. If multiple transactions are created but not executed they will share the same `nonce` if no `nonce` is specified, validating the first executed transaction and invalidating all the rest. We can prevent this by calling the method `getNextNonce` from the Safe API Kit instance. This method takes all queued/pending transactions into account when calculating the next nonce, creating a unique one for all different transactions.
```js
-const nonce = await safeService.getNextNonce(safeAddress)
+const nonce = await apiKit.getNextNonce(safeAddress)
```
## 5. Propose the transaction to the service
@@ -189,9 +189,9 @@ Once we have the Safe transaction object we can share it with the other owners o
- `origin`: Optional string that allows to provide more information about the app proposing the transaction.
```js
-const safeTxHash = await safeSdk.getTransactionHash(safeTransaction)
-const senderSignature = await safeSdk.signHash(safeTxHash)
-await safeService.proposeTransaction({
+const safeTxHash = await protocolKit.getTransactionHash(safeTransaction)
+const senderSignature = await protocolKit.signHash(safeTxHash)
+await apiKit.proposeTransaction({
safeAddress,
safeTransactionData: safeTransaction.data,
safeTxHash,
@@ -208,13 +208,13 @@ The transaction is then available on the Safe Transaction Service and the owners
Get a list of pending transactions:
```js
-const pendingTxs = await safeService.getPendingTransactions(safeAddress)
+const pendingTxs = await apiKit.getPendingTransactions(safeAddress)
```
Get a specific transaction given its Safe transaction hash:
```js
-const tx = await safeService.getTransaction(safeTxHash)
+const tx = await apiKit.getTransaction(safeTxHash)
```
The retrieved transaction will have this type:
@@ -270,8 +270,8 @@ The owners of the Safe can now sign the transaction obtained from the Safe Trans
// transaction: SafeMultisigTransactionResponse
const hash = transaction.safeTxHash
-let signature = await safeSdk.signHash(hash)
-await safeService.confirmTransaction(hash, signature.data)
+let signature = await protocolKit.signHash(hash)
+await apiKit.confirmTransaction(hash, signature.data)
```
## 8. Execute the transaction
@@ -281,15 +281,15 @@ Once there are enough confirmations in the service the transaction is ready to b
The method `executeTransaction` accepts an instance of the class `SafeTransaction` so the transaction needs to be transformed from the type `SafeMultisigTransactionResponse`.
```js
-const safeTransaction = await safeService.getTransaction(...)
-const executeTxResponse = await safeSdk.executeTransaction(safeTransaction)
+const safeTransaction = await apiKit.getTransaction(...)
+const executeTxResponse = await protocolKit.executeTransaction(safeTransaction)
const receipt = executeTxResponse.transactionResponse && (await executeTxResponse.transactionResponse.wait())
```
Optionally, the `isValidTransaction` method, that returns a boolean value, could be called right before the `executeTransaction` method to check if the transaction will be executed successfully or not.
```js
-const isValidTx = await safeSdk.isValidTransaction(safeTransaction)
+const isValidTx = await protocolKit.isValidTransaction(safeTransaction)
```
## 9. Interface checks
diff --git a/packages/account-abstraction-kit/README.md b/packages/account-abstraction-kit/README.md
index 6daf9d034..63b7f496f 100644
--- a/packages/account-abstraction-kit/README.md
+++ b/packages/account-abstraction-kit/README.md
@@ -9,36 +9,27 @@ Description TBD
## Table of contents
- [Installation](#installation)
-- [Build](#build)
-- [Initialization](#initialization)
+- [Need Help or Have Questions?](#need-help-or-have-questions)
+- [Contributing](#contributing)
- [License](#license)
-## Installation
+## Installation
Install the package with yarn or npm:
```bash
-yarn install
-npm install
+yarn add @safe-global/account-abstraction-kit-poc
+npm install @safe-global/account-abstraction-kit-poc
```
-## Build
+## Need Help or Have Questions?
-Build the package with yarn or npm:
+If you have any doubts, questions, or need assistance, feel free to reach out! [Here you will find how to get support.](https://github.com/safe-global/safe-core-sdk/tree/main/SUPPORT.md)
-```bash
-yarn build
-npm run build
-```
-
-## Initialization
+## Contributing
-Initialization TBD
-
-```js
-
-```
+Please read our [contribution guidelines](https://github.com/safe-global/safe-core-sdk/tree/main/CONTRIBUTING.md) before submitting any changes. We appreciate your help! 🙌
## License
-This library is [released under MIT](https://github.com/safe-global/account-abstraction-sdk/blob/main/LICENSE.md).
+This library is [released under MIT](https://github.com/safe-global/safe-core-sdk/blob/main/LICENSE.md).
diff --git a/packages/api-kit/LICENSE.md b/packages/api-kit/LICENSE.md
index 310e6e37c..0e923d187 100644
--- a/packages/api-kit/LICENSE.md
+++ b/packages/api-kit/LICENSE.md
@@ -1,6 +1,6 @@
MIT License
-Copyright (c) 2021-2023 Safe Ecosystem Foundation
+Copyright (c) 2021-2024 Safe Ecosystem Foundation
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
diff --git a/packages/api-kit/README.md b/packages/api-kit/README.md
index ee6e8a97c..f64afb150 100644
--- a/packages/api-kit/README.md
+++ b/packages/api-kit/README.md
@@ -8,306 +8,46 @@ Software development kit that facilitates the interaction with the [Safe Transac
## Table of contents
+- [Documentation](#documentation)
- [Installation](#installation)
-- [Build](#build)
-- [Tests](#tests)
-- [Initialization](#initialization)
-- [API Reference](#api-reference)
+- [Quick Start](#quick-start)
+- [Need Help or Have Questions?](#need-help-or-have-questions)
+- [Contributing](#contributing)
- [License](#license)
-- [Contributors](#contributors)
-## Installation
+## Documentation
-Install the package with yarn or npm:
-
-```bash
-yarn install
-npm install
-```
-
-## Build
-
-Build the package with yarn or npm:
-
-```bash
-yarn build
-npm run build
-```
+Head to the [API Kit docs](https://docs.safe.global/sdk/api-kit) to learn more about how to use this SDK.
-## Tests
+## Installation
-Create a `.env` file with environment variables. You can use the `.env.example` file as a reference.
-
-Test the package with yarn or npm:
+Install the package with yarn or npm:
```bash
-yarn test
-npm run test
+yarn add @safe-global/api-kit
+npm install @safe-global/api-kit
```
-## Initialization
-
-### Initialize the SafeApiKit
+## Quick Start
```js
import SafeApiKit from '@safe-global/api-kit'
-const safeService = new SafeApiKit({
+const apiKit = new SafeApiKit({
chainId: 1n,
// Optional. txServiceUrl must be used to set a custom service. For example on chains where Safe doesn't run services.
txServiceUrl: 'https://safe-transaction-mainnet.safe.global'
})
```
-## API Reference
-
-### getServiceInfo
-
-Returns the information and configuration of the service.
-
-```js
-const serviceInfo: SafeServiceInfoResponse = await safeService.getServiceInfo()
-```
-
-### getServiceSingletonsInfo
-
-Returns the list of Safe singleton copies.
-
-```js
-const singletons: SafeSingletonResponse = await safeService.getServiceSingletonsInfo()
-```
-
-### decodeData
-
-Decodes the specified Safe transaction data.
-
-```js
-const decodedData = await safeService.decodeData(data)
-```
-
-### getSafesByOwner
-
-Returns the list of Safes where the address provided is an owner.
-
-```js
-const safes: OwnerResponse = await safeService.getSafesByOwner(ownerAddress)
-```
-
-### getSafesByModule
-
-Returns the list of Safes where the module address provided is enabled.
-
-```js
-const safes: ModulesResponse = await getSafesByModule(moduleAddress)
-```
-
-### getTransaction
-
-Returns all the information of a Safe transaction.
-
-```js
-const tx: SafeMultisigTransactionResponse = await safeService.getTransaction(safeTxHash)
-```
-
-### getTransactionConfirmations
-
-Returns the list of confirmations for a given a Safe transaction.
-
-```js
-const confirmations: SafeMultisigConfirmationListResponse =
- await safeService.getTransactionConfirmations(safeTxHash)
-```
-
-### confirmTransaction
-
-Adds a confirmation for a Safe transaction.
-
-```js
-const signature: SignatureResponse = await safeService.confirmTransaction(safeTxHash, signature)
-```
-
-### getSafeInfo
-
-Returns the information and configuration of the provided Safe address.
-
-```js
-const safeInfo: SafeInfoResponse = await safeService.getSafeInfo(safeAddress)
-```
-
-### getSafeDelegates
-
-Returns the list of delegates for a given Safe address.
-
-```js
-const delegateConfig: GetSafeDelegateProps = {
- safeAddress, // Optional
- delegateAddress, // Optional
- delegatorAddress, // Optional
- label, // Optional
- limit, // Optional
- offset // Optional
-}
-const delegates: SafeDelegateListResponse = await safeService.getSafeDelegates(delegateConfig)
-```
-
-### addSafeDelegate
-
-Adds a new delegate for a given Safe address.
-
-```js
-const delegateConfig: AddSafeDelegateProps = {
- safeAddress, // Optional
- delegateAddress,
- delegatorAddress,
- label,
- signer
-}
-await safeService.addSafeDelegate(delegateConfig)
-```
-
-### removeSafeDelegate
-
-Removes a delegate for a given Safe address.
-
-```js
-const delegateConfig: DeleteSafeDelegateProps = {
- delegateAddress,
- delegatorAddress,
- signer
-}
-await safeService.removeSafeDelegate(delegateConfig)
-```
-
-### getSafeCreationInfo
-
-Returns the creation information of a Safe.
-
-```js
-const safeCreationInfo: SafeCreationInfoResponse = await safeService.getSafeCreationInfo(
- safeAddress
-)
-```
-
-### estimateSafeTransaction
-
-Estimates the safeTxGas for a given Safe multi-signature transaction.
-
-```js
-const estimateTx: SafeMultisigTransactionEstimateResponse =
- await safeService.estimateSafeTransaction(safeAddress, safeTransaction)
-```
-
-### proposeTransaction
-
-Creates a new multi-signature transaction and stores it in the Safe Transaction Service.
-
-```js
-const transactionConfig: ProposeTransactionProps = {
- safeAddress,
- safeTxHash,
- safeTransactionData,
- senderAddress,
- senderSignature,
- origin
-}
-await safeService.proposeTransaction(transactionConfig)
-```
-
-### getIncomingTransactions
-
-Returns the history of incoming transactions of a Safe account.
-
-```js
-const incomingTxs: TransferListResponse = await safeService.getIncomingTransactions(safeAddress)
-```
-
-### getModuleTransactions
-
-Returns the history of module transactions of a Safe account.
-
-```js
-const moduleTxs: SafeModuleTransactionListResponse = await safeService.getModuleTransactions(
- safeAddress
-)
-```
-
-### getMultisigTransactions
-
-Returns the history of multi-signature transactions of a Safe account.
-
-```js
-const multisigTxs: SafeMultisigTransactionListResponse = await safeService.getMultisigTransactions(
- safeAddress
-)
-```
-
-### getPendingTransactions
-
-Returns the list of multi-signature transactions that are waiting for the confirmation of the Safe owners.
+## Need Help or Have Questions?
-```js
-const pendingTxs: SafeMultisigTransactionListResponse = await safeService.getPendingTransactions(
- safeAddress
-)
-```
-
-```js
-const pendingTxs: SafeMultisigTransactionListResponse = await safeService.getPendingTransactions(
- safeAddress,
- currentNonce
-)
-```
-
-### getAllTransactions
-
-Returns a list of transactions for a Safe. The list has different structures depending on the transaction type.
-
-```js
-const allTxs: SafeMultisigTransactionListResponse = await safeService.getAllTransactions(
- safeAddress
-)
-```
-
-```js
-const allTxsOptions: AllTransactionsOptions = {
- executed,
- queued,
- trusted
-}
-const allTxs: SafeMultisigTransactionListResponse = await safeService.getAllTransactions(
- safeAddress,
- allTxsOptions
-)
-```
-
-### getNextNonce
-
-Returns the right nonce to propose a new transaction right after the last pending transaction.
-
-```js
-const nextNonce = await safeService.getNextNonce(safeAddress)
-```
-
-### getTokenList
-
-Returns the list of all the ERC20 tokens handled by the Safe.
-
-```js
-const tokens: TokenInfoListResponse = await safeService.getTokenList()
-```
-
-### getToken
-
-Returns the information of a given ERC20 token.
-
-```js
-const token: TokenInfoResponse = await safeService.getToken(tokenAddress)
-```
+If you have any doubts, questions, or need assistance, feel free to reach out! [Here you will find how to get support.](https://github.com/safe-global/safe-core-sdk/tree/main/SUPPORT.md)
-## License
+## Contributing
-This library is released under MIT.
+Please read our [contribution guidelines](https://github.com/safe-global/safe-core-sdk/tree/main/CONTRIBUTING.md) before submitting any changes. We appreciate your help! 🙌
-## Contributors
+## License
-- Germán Martínez ([germartinez](https://github.com/germartinez))
+This library is [released under MIT](https://github.com/safe-global/safe-core-sdk/blob/main/LICENSE.md).
diff --git a/packages/auth-kit/README.md b/packages/auth-kit/README.md
index 85b924c62..c96fbba42 100644
--- a/packages/auth-kit/README.md
+++ b/packages/auth-kit/README.md
@@ -6,7 +6,7 @@
The Auth Kit provides a way to authenticate blockchain accounts using email addresses, social accounts or traditional web3 wallets (ex. Metamask). When using web2 methods as your email or social account, a derived Ethereum address will be generated.
-## Reference
+## Documentation
- [Auth Kit integration guides](https://docs.safe.global/sdk/auth-kit)
@@ -16,6 +16,14 @@ The Auth Kit provides a way to authenticate blockchain accounts using email addr
[Check a functional demo](https://github.com/safe-global/safe-core-sdk/tree/main/packages/auth-kit/example) using the `auth-kit`
+## Need Help or Have Questions?
+
+If you have any doubts, questions, or need assistance, feel free to reach out! [Here you will find how to get support.](https://github.com/safe-global/safe-core-sdk/tree/main/SUPPORT.md)
+
+## Contributing
+
+Please read our [contribution guidelines](https://github.com/safe-global/safe-core-sdk/tree/main/CONTRIBUTING.md) before submitting any changes. We appreciate your help! 🙌
+
## License
This library is [released under MIT](https://github.com/safe-global/safe-core-sdk/blob/main/LICENSE.md).
diff --git a/packages/onramp-kit/README.md b/packages/onramp-kit/README.md
index b46ae5c49..49e4fbcf8 100644
--- a/packages/onramp-kit/README.md
+++ b/packages/onramp-kit/README.md
@@ -1,4 +1,4 @@
-# OnRamp Kit
+# Onramp Kit
[![NPM Version](https://badge.fury.io/js/%40safe-global%2Fonramp-kit.svg)](https://badge.fury.io/js/%40safe-global%2Fonramp-kit)
[![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)
@@ -6,16 +6,24 @@
The Onramp Kit allows users to buy cryptocurrencies using a credit card and other payment options.
-## Reference
+## Documentation
-- [OnRamp Kit integration guides](https://docs.safe.global/safe-core-aa-sdk/onramp-kit)
+- [Onramp Kit integration guides](https://docs.safe.global/sdk/onramp-kit)
-- [OnRamp Kit reference](https://docs.safe.global/reference/onramp-kit)
+- [Onramp Kit reference](https://docs.safe.global/sdk/onramp-kit/reference)
## Example
[Check a functional demo](https://github.com/safe-global/safe-core-sdk/tree/main/packages/onramp-kit/example) using the `onramp-kit`
+## Need Help or Have Questions?
+
+If you have any doubts, questions, or need assistance, feel free to reach out! [Here you will find how to get support.](https://github.com/safe-global/safe-core-sdk/tree/main/SUPPORT.md)
+
+## Contributing
+
+Please read our [contribution guidelines](https://github.com/safe-global/safe-core-sdk/tree/main/CONTRIBUTING.md) before submitting any changes. We appreciate your help! 🙌
+
## License
This library is [released under MIT](https://github.com/safe-global/safe-core-sdk/blob/main/LICENSE.md).
diff --git a/packages/protocol-kit/LICENSE.md b/packages/protocol-kit/LICENSE.md
index 310e6e37c..0e923d187 100644
--- a/packages/protocol-kit/LICENSE.md
+++ b/packages/protocol-kit/LICENSE.md
@@ -1,6 +1,6 @@
MIT License
-Copyright (c) 2021-2023 Safe Ecosystem Foundation
+Copyright (c) 2021-2024 Safe Ecosystem Foundation
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
diff --git a/packages/protocol-kit/README.md b/packages/protocol-kit/README.md
index 355f1616c..27b18df28 100644
--- a/packages/protocol-kit/README.md
+++ b/packages/protocol-kit/README.md
@@ -4,20 +4,22 @@
[![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)
-Software development kit that facilitates the interaction with the [Safe contracts](https://github.com/safe-global/safe-contracts).
+Software development kit that facilitates the interaction with [Safe Smart Accounts](https://github.com/safe-global/safe-smart-account).
## Table of contents
+- [Documentation](#documentation)
- [Installation](#installation)
-- [Build](#build)
-- [Tests](#tests)
-- [Getting Started](#getting-started)
-- [Safe Factory API Reference](#factory-api)
-- [Safe Core SDK API Reference](#sdk-api)
+- [Quick Start](#quick-start)
+- [Need Help or Have Questions?](#need-help-or-have-questions)
+- [Contributing](#contributing)
- [License](#license)
-- [Contributors](#contributors)
-## Installation
+## Documentation
+
+Head to the [Protocol Kit docs](https://docs.safe.global/sdk/protocol-kit) to learn more about how to use this SDK.
+
+## Installation
Install the package with yarn or npm:
@@ -26,285 +28,24 @@ yarn add @safe-global/protocol-kit
npm install @safe-global/protocol-kit
```
-## Build
-
-Build the package with yarn or npm:
-
-```bash
-yarn build
-npm run build
-```
-
-## Tests
-
-Create a `.env` file with environment variables. You can use the `.env.example` file as a reference.
-
-Test the package with yarn or npm:
-
-```bash
-yarn test
-npm run test
-```
-
-## Getting Started
-
-The following steps show how to set up the Protocol Kit, deploy a new Safe, create a Safe transaction, generate the required signatures from owners and execute the transaction. However, using the Protocol Kit alone will not allow for the collection of owner signatures off-chain. To do this and be able to see and confirm the pending transactions shown in the [Safe Web App](https://app.safe.global/), it is recommended that you follow this other [guide](/guides/integrating-the-safe-core-sdk.md) that covers the use of the Protocol Kit, combined with the API Kit.
-
-### 1. Instantiate an EthAdapter
-
-First of all, we need to create an `EthAdapter`, which contains all the required utilities for the SDKs to interact with the blockchain. It acts as a wrapper for [web3.js](https://web3js.readthedocs.io/) or [ethers.js](https://docs.ethers.org/v6/) Ethereum libraries.
-
-Depending on the library used by the Dapp, there are two options:
-
-- [Create an `EthersAdapter` instance](https://github.com/safe-global/safe-core-sdk/tree/main/packages/protocol-kit/src/adapters/ethers)
-- [Create a `Web3Adapter` instance](https://github.com/safe-global/safe-core-sdk/tree/main/packages/protocol-kit/src/adapters/web3)
-
-Once the instance of `EthersAdapter` or `Web3Adapter` is created, it can be used in the SDK initialization.
-
-### 2. Deploy a new Safe
-
-To deploy a new Safe account instantiate the `SafeFactory` class and call the `deploySafe` method with the right params to configure the new Safe. This includes defining the list of owners and the threshold of the Safe. A Safe account with three owners and threshold equal three will be used as the starting point for this example but any Safe configuration is valid.
-
-```js
-import Safe, { SafeFactory, SafeAccountConfig } from '@safe-global/protocol-kit'
-
-const safeFactory = await SafeFactory.create({ ethAdapter })
-
-const owners = ['0x', '0x', '0x']
-const threshold = 3
-const safeAccountConfig: SafeAccountConfig = {
- owners,
- threshold
- // ...
-}
-
-const safeSdk: Safe = await safeFactory.deploySafe({ safeAccountConfig })
-```
-
-The `deploySafe` method executes a transaction from the `owner1` account, deploys a new Safe and returns an instance of the Protocol Kit connected to the new Safe. Check the `deploySafe` method in the [API Reference](#factory-api) for more details on additional configuration parameters and callbacks.
-
-Call the `getAddress` method, for example, to check the address of the newly deployed Safe.
-
-```js
-const newSafeAddress = await safeSdk.getAddress()
-```
-
-To instantiate the Protocol Kit from an existing Safe just pass to it an instance of the `EthAdapter` class and the Safe address.
-
-```js
-import Safe from '@safe-global/protocol-kit'
-
-const safeSdk: Safe = await Safe.create({ ethAdapter: ethAdapterOwner1, safeAddress })
-```
-
-Check the `create` method in the [API Reference](#sdk-api) for more details on additional configuration parameters.
-
-### 3. Create a Safe transaction
-
-```js
-import { MetaTransactionData } from '@safe-global/safe-core-sdk-types'
-
-const safeTransactionData: MetaTransactionData = {
- to: '0x',
- value: '',
- data: '0x'
-}
-const safeTransaction = await safeSdk.createTransaction({ transactions: [safeTransactionData] })
-```
-
-Check the `createTransaction` method in the [API Reference](#sdk-api) for additional details on creating MultiSend transactions.
-
-Before executing this transaction, it must be signed by the owners and this can be done off-chain or on-chain. In this example `owner1` will sign it off-chain, `owner2` will sign it on-chain and `owner3` will execute it (the executor also signs the transaction transparently).
-
-### 3.a. Off-chain signatures
-
-The `owner1` account signs the transaction off-chain.
-
-```js
-const signedSafeTransaction = await safeSdk.signTransaction(safeTransaction)
-```
-
-Because the signature is off-chain, there is no interaction with the contract and the signature becomes available at `signedSafeTransaction.signatures`.
-
-### 3.b. On-chain signatures
-
-To connect `owner2` to the Safe we need to create a new instance of the class `EthAdapter` passing to its constructor the owner we would like to connect. After `owner2` account is connected to the SDK as a signer the transaction hash will be approved on-chain.
-
-```js
-const ethAdapterOwner2 = new EthersAdapter({ ethers, signerOrProvider: owner2 })
-const safeSdk2 = await safeSdk.connect({ ethAdapter: ethAdapterOwner2, safeAddress })
-const txHash = await safeSdk2.getTransactionHash(safeTransaction)
-const approveTxResponse = await safeSdk2.approveTransactionHash(txHash)
-await approveTxResponse.transactionResponse?.wait()
-```
-
-### 4. Transaction execution
-
-Lastly, `owner3` account is connected to the SDK as a signer and executor of the Safe transaction to execute it.
-
-```js
-const ethAdapterOwner3 = new EthersAdapter({ ethers, signerOrProvider: owner3 })
-const safeSdk3 = await safeSdk2.connect({ ethAdapter: ethAdapterOwner3, safeAddress })
-const executeTxResponse = await safeSdk3.executeTransaction(safeTransaction)
-await executeTxResponse.transactionResponse?.wait()
-```
-
-All the signatures used to execute the transaction are now available at `safeTransaction.signatures`.
-
-## Safe Factory API Reference
-
-### create
-
-Returns an instance of the Safe Factory.
-
-```js
-import { SafeFactory } from '@safe-global/protocol-kit'
-
-const safeFactory = await SafeFactory.create({ ethAdapter })
-```
-
-- The `isL1SafeSingleton` flag
-
- There are two versions of the Safe contracts: [Safe.sol](https://github.com/safe-global/safe-contracts/blob/v1.4.1/contracts/Safe.sol) that does not trigger events in order to save gas and [SafeL2.sol](https://github.com/safe-global/safe-contracts/blob/v1.4.1/contracts/SafeL2.sol) that does, which is more appropriate for L2 networks.
-
- By default `Safe.sol` will be only used on Ethereum Mainnet. For the rest of the networks where the Safe contracts are already deployed, the `SafeL2.sol` contract will be used unless you add the `isL1SafeSingleton` flag to force the use of the `Safe.sol` contract.
-
- ```js
- const safeFactory = await SafeFactory.create({ ethAdapter, isL1SafeSingleton: true })
- ```
-
-- The `contractNetworks` property
-
- If the Safe contracts are not deployed to your current network, the `contractNetworks` property will be required to point to the addresses of the Safe contracts previously deployed by you.
-
- ```js
- import { ContractNetworksConfig } from '@safe-global/protocol-kit'
-
- const chainId = await ethAdapter.getChainId()
- const contractNetworks: ContractNetworksConfig = {
- [chainId]: {
- safeSingletonAddress: '',
- safeProxyFactoryAddress: '',
- multiSendAddress: '',
- multiSendCallOnlyAddress: '',
- fallbackHandlerAddress: '',
- signMessageLibAddress: '',
- createCallAddress: '',
- simulateTxAccessorAddress: '',
- safeSingletonAbi: '', // Optional. Only needed with web3.js
- safeProxyFactoryAbi: '', // Optional. Only needed with web3.js
- multiSendAbi: '', // Optional. Only needed with web3.js
- multiSendCallOnlyAbi: '', // Optional. Only needed with web3.js
- fallbackHandlerAbi: '', // Optional. Only needed with web3.js
- signMessageLibAbi: '', // Optional. Only needed with web3.js
- createCallAbi: '', // Optional. Only needed with web3.js
- simulateTxAccessorAbi: '' // Optional. Only needed with web3.js
- }
- }
-
- const safeFactory = await SafeFactory.create({ ethAdapter, contractNetworks })
- ```
-
-- The `safeVersion` property
-
- The `SafeFactory` constructor also accepts the `safeVersion` property to specify the Safe contract version that will be deployed. This string can take the values `1.0.0`, `1.1.1`, `1.2.0`, `1.3.0` or `1.4.1`. If not specified, the `DEFAULT_SAFE_VERSION` value will be used.
-
- ```js
- const safeVersion = 'X.Y.Z'
- const safeFactory = await SafeFactory.create({ ethAdapter, safeVersion })
- ```
-
-### deploySafe
-
-Deploys a new Safe and returns an instance of the Protocol Kit connected to the deployed Safe. The Singleton address, contract version and layer instance (`Safe.sol` or `SafeL2.sol`) of the deployed Safe will depend on the configuration used to create the `safeFactory`.
-
-```js
-const safeAccountConfig: SafeAccountConfig = {
- owners,
- threshold,
- to, // Optional
- data, // Optional
- fallbackHandler, // Optional
- paymentToken, // Optional
- payment, // Optional
- paymentReceiver // Optional
-}
-
-const safeSdk = await safeFactory.deploySafe({ safeAccountConfig })
-```
-
-This method can optionally receive the `saltNonce` parameter.
-
-```js
-const safeAccountConfig: SafeAccountConfig = {
- owners,
- threshold,
- to, // Optional
- data, // Optional
- fallbackHandler, // Optional
- paymentToken, // Optional
- payment, // Optional
- paymentReceiver // Optional
-}
-
-const saltNonce = ''
-
-const safeSdk = await safeFactory.deploySafe({ safeAccountConfig, saltNonce })
-```
-
-Optionally, some properties can be passed as execution options:
-
-```js
-const options: Web3TransactionOptions = {
- from, // Optional
- gas, // Optional
- gasPrice, // Optional
- maxFeePerGas, // Optional
- maxPriorityFeePerGas // Optional
- nonce // Optional
-}
-```
-
-```js
-const options: EthersTransactionOptions = {
- from, // Optional
- gasLimit, // Optional
- gasPrice, // Optional
- maxFeePerGas, // Optional
- maxPriorityFeePerGas // Optional
- nonce // Optional
-}
-```
-
-```js
-const safeSdk = await safeFactory.deploySafe({ safeAccountConfig, safeDeploymentConfig, options })
-```
-
-It can also take an optional callback which receives the `txHash` of the Safe deployment transaction prior to returning a new instance of the Protocol Kit:
-
-```js
-const callback = (txHash: string): void => {
- console.log({ txHash })
-}
-
-const safeSdk = await safeFactory.deploySafe({ safeAccountConfig, callback })
-```
-
-## Safe Core SDK API Reference
-
-### create
+## Quick Start
-Returns an instance of the Protocol Kit connected to a Safe. The provided Safe must be a `safeAddress` or a `predictedSafe`.
+- `provider`: You can set an EIP-1193 compatible provider or an HTTP/WebSocket RPC URL.
+- `signer`: This is an optional parameter. It should be the provider's address you want to use or a private key. If not set, it will try to fetch a connected account from the provider.
-Initialization of a deployed Safe using the `safeAddress` property:
+Loading an already deployed Safe, using the `safeAddress` property:
```js
import Safe from '@safe-global/protocol-kit'
-const safeSdk = await Safe.create({ ethAdapter, safeAddress })
+const protocolKit = await Safe.init({
+ provider,
+ signer,
+ safeAddress
+})
```
-Initialization of a not deployed Safe using the `predictedSafe` property. Because Safes are deployed in a deterministic way, passing a `predictedSafe` will allow to initialize the SDK with the Safe configuration and use it to some extent before it is deployed:
+Initialization of an undeployed Safe using the `predictedSafe` property. Because Safes are deployed in a deterministic way, passing a `predictedSafe` will allow to initialize the SDK with the Safe configuration and use it to some extent before it's deployed:
```js
import Safe, { PredictedSafeProps } from '@safe-global/protocol-kit'
@@ -314,719 +55,21 @@ const predictedSafe: PredictedSafeProps = {
safeDeploymentConfig
}
-const safeSdk = await Safe.create({ ethAdapter, predictedSafe })
-```
-
-- The `isL1SafeSingleton` flag
-
- There are two versions of the Safe contracts: [Safe.sol](https://github.com/safe-global/safe-contracts/blob/v1.4.1/contracts/Safe.sol) that does not trigger events in order to save gas and [SafeL2.sol](https://github.com/safe-global/safe-contracts/blob/v1.4.1/contracts/SafeL2.sol) that does, which is more appropriate for L2 networks.
-
- By default `Safe.sol` will be only used on Ethereum Mainnet. For the rest of the networks where the Safe contracts are already deployed, the `SafeL2.sol` contract will be used unless you add the `isL1SafeSingleton` flag to force the use of the `Safe.sol` contract.
-
- ```js
- const safeSdk = await Safe.create({ ethAdapter, safeAddress, isL1SafeSingleton: true })
- ```
-
-- The `contractNetworks` property
-
- If the Safe contracts are not deployed to your current network, the `contractNetworks` property will be required to point to the addresses of the Safe contracts previously deployed by you.
-
- ```js
- import { ContractNetworksConfig } from '@safe-global/protocol-kit'
-
- const chainId = await ethAdapter.getChainId()
- const contractNetworks: ContractNetworksConfig = {
- [chainId]: {
- safeSingletonAddress: '',
- safeProxyFactoryAddress: '',
- multiSendAddress: '',
- multiSendCallOnlyAddress: '',
- fallbackHandlerAddress: '',
- signMessageLibAddress: '',
- createCallAddress: '',
- simulateTxAccessorAddress: '',
- safeSingletonAbi: '', // Optional. Only needed with web3.js
- safeProxyFactoryAbi: '', // Optional. Only needed with web3.js
- multiSendAbi: '', // Optional. Only needed with web3.js
- multiSendCallOnlyAbi: '', // Optional. Only needed with web3.js
- fallbackHandlerAbi: '', // Optional. Only needed with web3.js
- signMessageLibAbi: '', // Optional. Only needed with web3.js
- createCallAbi: '', // Optional. Only needed with web3.js
- simulateTxAccessorAbi: '' // Optional. Only needed with web3.js
- }
- }
-
- const safeSdk = await Safe.create({ ethAdapter, safeAddress, contractNetworks })
- ```
-
-### connect
-
-Returns a new instance of the Protocol Kit connected to a new Safe or a new Signer. The new connected signer can be passed via the `ethAdapter` property while the new connected Safe can be passed using a `safeAddress` or a `predictedSafe`.
-
-Connection of a deployed Safe using the `safeAddress` property:
-
-```js
-const safeSdk = await safeSdk.connect({ ethAdapter, safeAddress })
-```
-
-Connection of a not deployed Safe using the `predictedSafe` property. Because Safes are deployed in a deterministic way, passing a `predictedSafe` will allow to connect a Safe to the SDK with the Safe configuration:
-
-```js
-import { PredictedSafeProps } from '@safe-global/protocol-kit'
-
-const predictedSafe: PredictedSafeProps = {
- safeAccountConfig,
- safeDeploymentConfig
-}
-
-const safeSdk = await safeSdk.connect({ ethAdapter, predictedSafe })
-```
-
-- The `isL1SafeSingleton` flag
-
- There are two versions of the Safe contracts: [Safe.sol](https://github.com/safe-global/safe-contracts/blob/v1.4.1/contracts/Safe.sol) that does not trigger events in order to save gas and [SafeL2.sol](https://github.com/safe-global/safe-contracts/blob/v1.4.1/contracts/SafeL2.sol) that does, which is more appropriate for L2 networks.
-
- By default `Safe.sol` will be only used on Ethereum Mainnet. For the rest of the networks where the Safe contracts are already deployed, the `SafeL2.sol` contract will be used unless you add the `isL1SafeSingleton` flag to force the use of the `Safe.sol` contract.
-
- ```js
- const safeSdk = await Safe.connect({ ethAdapter, safeAddress, isL1SafeSingleton: true })
- ```
-
-- The `contractNetworks` property
-
- If the Safe contracts are not deployed to your current network, the `contractNetworks` property will be required to point to the addresses of the Safe contracts previously deployed by you.
-
- ```js
- import { ContractNetworksConfig } from '@safe-global/protocol-kit'
-
- const chainId = await ethAdapter.getChainId()
- const contractNetworks: ContractNetworksConfig = {
- [chainId]: {
- safeSingletonAddress: '',
- safeProxyFactoryAddress: '',
- multiSendAddress: '',
- multiSendCallOnlyAddress: '',
- fallbackHandlerAddress: '',
- signMessageLibAddress: '',
- createCallAddress: '',
- simulateTxAccessorAddress: '',
- safeSingletonAbi: '', // Optional. Only needed with web3.js
- safeProxyFactoryAbi: '', // Optional. Only needed with web3.js
- multiSendAbi: '', // Optional. Only needed with web3.js
- multiSendCallOnlyAbi: '', // Optional. Only needed with web3.js
- fallbackHandlerAbi: '', // Optional. Only needed with web3.js
- signMessageLibAbi: '', // Optional. Only needed with web3.js
- createCallAbi: '', // Optional. Only needed with web3.js
- simulateTxAccessorAbi: '' // Optional. Only needed with web3.js
- }
- }
- const safeSdk = await Safe.connect({ ethAdapter, safeAddress, contractNetworks })
- ```
-
-### getAddress
-
-Returns the address of the current SafeProxy contract.
-
-```js
-const safeAddress = await safeSdk.getAddress()
-```
-
-### getContractVersion
-
-Returns the Safe Singleton contract version.
-
-```js
-const contractVersion = await safeSdk.getContractVersion()
-```
-
-### getOwners
-
-Returns the list of Safe owner accounts.
-
-```js
-const ownerAddresses = await safeSdk.getOwners()
-```
-
-### getNonce
-
-Returns the Safe nonce.
-
-```js
-const nonce = await safeSdk.getNonce()
-```
-
-### getThreshold
-
-Returns the Safe threshold.
-
-```js
-const threshold = await safeSdk.getThreshold()
-```
-
-### getChainId
-
-Returns the chainId of the connected network.
-
-```js
-const chainId = await safeSdk.getChainId()
-```
-
-### getBalance
-
-Returns the ETH balance of the Safe.
-
-```js
-const balance = await safeSdk.getBalance()
-```
-
-### getGuard
-
-Returns the enabled Safe guard or 0x address if no guards are enabled.
-
-```js
-const guardAddress = await safeSdk.getGuard()
-```
-
-### getModules
-
-Returns the list of addresses of all the enabled Safe modules.
-
-```js
-const moduleAddresses = await safeSdk.getModules()
-```
-
-### isModuleEnabled
-
-Checks if a specific Safe module is enabled for the current Safe.
-
-```js
-const isEnabled = await safeSdk.isModuleEnabled(moduleAddress)
-```
-
-### isOwner
-
-Checks if a specific address is an owner of the current Safe.
-
-```js
-const isOwner = await safeSdk.isOwner(address)
-```
-
-### createTransaction
-
-Returns a Safe transaction ready to be signed by the owners and executed. The Protocol Kit supports the creation of single Safe transactions but also MultiSend transactions.
-
-This method takes an array of `MetaTransactionData` objects that represent the individual transactions we want to include in our MultiSend transaction.
-
-When the array contains only one transaction, it is not wrapped in the MultiSend.
-
-```js
-const transactions: MetaTransactionData[] = [
- {
- to,
- data,
- value,
- operation // Optional
- },
- {
- to,
- data,
- value,
- operation // Optional
- }
- // ...
-]
-const safeTransaction = await safeSdk.createTransaction({ transactions })
-```
-
-This method can also receive the `options` parameter to set the optional properties in the MultiSend transaction:
-
-```js
-const transactions: MetaTransactionData[] = [
- {
- to,
- data,
- value,
- operation // Optional
- },
- {
- to,
- data,
- value,
- operation // Optional
- }
- // ...
-]
-const options: SafeTransactionOptionalProps = {
- safeTxGas, // Optional
- baseGas, // Optional
- gasPrice, // Optional
- gasToken, // Optional
- refundReceiver, // Optional
- nonce // Optional
-}
-const safeTransaction = await safeSdk.createTransaction({ transactions, options })
-```
-
-In addition, the optional `onlyCalls` parameter, which is `false` by default, allows to force the use of the `MultiSendCallOnly` instead of the `MultiSend` contract when sending a batch transaction:
-
-```js
-const onlyCalls = true
-const safeTransaction = await safeSdk.createTransaction({
- transactions,
- options,
- onlyCalls
+const protocolKit = await Safe.init({
+ provider,
+ signer,
+ predictedSafe
})
```
-If the optional properties are not manually set, the Safe transaction returned will have the default value for each one:
-
-- `operation`: `OperationType.Call` (0) is the default value.
-- `safeTxGas`: The right gas estimation is the default value.
-- `baseGas`: 0 is the default value.
-- `gasPrice`: 0 is the default value.
-- `gasToken`: 0x address is the default value.
-- `refundReceiver`: 0x address is the default value.
-- `nonce`: The current Safe nonce is the default value.
-
-Read more about [create transactions from a Safe](https://docs.safe.global/safe-core-aa-sdk/protocol-kit#making-a-transaction-from-a-safe).
-
-### createRejectionTransaction
-
-Returns a Safe transaction ready to be signed by the owners that invalidates the pending Safe transaction/s with a specific nonce.
-
-```js
-const transactions: MetaTransactionData[] = [
- {
- // ...
- }
-]
-const safeTransaction = await safeSdk.createTransaction({ transactions })
-const rejectionTransaction = await safeSdk.createRejectionTransaction(safeTransaction.data.nonce)
-```
-
-### copyTransaction
-
-Copies a Safe transaction.
-
-```js
-const safeTransaction1 = await safeSdk.createTransaction({ transactions })
-const safeTransaction2 = await copyTransaction(safeTransaction1)
-```
-
-### getTransactionHash
-
-Returns the transaction hash of a Safe transaction.
-
-```js
-const transactions: MetaTransactionData[] = [
- {
- // ...
- }
-]
-const safeTransaction = await safeSdk.createTransaction({ transactions })
-const txHash = await safeSdk.getTransactionHash(safeTransaction)
-```
-
-### signHash
-
-Signs a hash using the current owner account.
-
-```js
-const transactions: MetaTransactionData[] = [
- {
- // ...
- }
-]
-const safeTransaction = await safeSdk.createTransaction({ transactions })
-const txHash = await safeSdk.getTransactionHash(safeTransaction)
-const signature = await safeSdk.signHash(txHash)
-```
-
-### signTypedData
-
-Signs a transaction according to the EIP-712 using the current signer account.
-
-```js
-const transactions: MetaTransactionData[] = [
- {
- // ...
- }
-]
-const safeTransaction = await safeSdk.createTransaction({ transactions })
-const signature = await safeSdk.signTypedData(safeTransaction)
-```
-
-### signTransaction
-
-Returns a new `SafeTransaction` object that includes the signature of the current owner. `eth_sign` will be used by default to generate the signature.
-
-```js
-const transactions: MetaTransactionData[] = [
- {
- // ...
- }
-]
-const safeTransaction = await safeSdk.createTransaction({ transactions })
-const signedSafeTransaction = await safeSdk.signTransaction(safeTransaction)
-```
-
-Optionally, an additional parameter can be passed to specify a different way of signing:
-
-```js
-const signedSafeTransaction = await safeSdk.signTransaction(
- safeTransaction,
- SigningMethod.ETH_SIGN_TYPED_DATA
-)
-```
-
-```js
-const signedSafeTransaction = await safeSdk.signTransaction(safeTransaction, SigningMethod.ETH_SIGN) // default option.
-```
-
-### approveTransactionHash
-
-Approves a hash on-chain using the current owner account.
-
-```js
-const transactions: MetaTransactionData[] = [
- {
- // ...
- }
-]
-const safeTransaction = await safeSdk.createTransaction({ transactions })
-const txHash = await safeSdk.getTransactionHash(safeTransaction)
-const txResponse = await safeSdk.approveTransactionHash(txHash)
-await txResponse.transactionResponse?.wait()
-```
-
-Optionally, some properties can be passed as execution options:
-
-```js
-const options: Web3TransactionOptions = {
- from, // Optional
- gas, // Optional
- gasPrice, // Optional
- maxFeePerGas, // Optional
- maxPriorityFeePerGas // Optional
- nonce // Optional
-}
-```
-
-```js
-const options: EthersTransactionOptions = {
- from, // Optional
- gasLimit, // Optional
- gasPrice, // Optional
- maxFeePerGas, // Optional
- maxPriorityFeePerGas // Optional
- nonce // Optional
-}
-```
-
-```js
-const txResponse = await safeSdk.approveTransactionHash(txHash, options)
-```
-
-### getOwnersWhoApprovedTx
-
-Returns a list of owners who have approved a specific Safe transaction.
-
-```js
-const transactions: MetaTransactionData[] = [
- {
- // ...
- }
-]
-const safeTransaction = await safeSdk.createTransaction({ transactions })
-const txHash = await safeSdk.getTransactionHash(safeTransaction)
-const ownerAddresses = await safeSdk.getOwnersWhoApprovedTx(txHash)
-```
-
-### createEnableFallbackHandlerTx
-
-Returns the Safe transaction to enable the fallback handler.
-
-```js
-const safeTransaction = await safeSdk.createEnableFallbackHandlerTx(fallbackHandlerAddress)
-const txResponse = await safeSdk.executeTransaction(safeTransaction)
-await txResponse.transactionResponse?.wait()
-```
-
-This method can optionally receive the `options` parameter:
-
-```js
-const options: SafeTransactionOptionalProps = {
- safeTxGas, // Optional
- baseGas, // Optional
- gasPrice, // Optional
- gasToken, // Optional
- refundReceiver, // Optional
- nonce // Optional
-}
-const safeTransaction = await safeSdk.createEnableFallbackHandlerTx(fallbackHandlerAddress, options)
-```
-
-### createDisableFallbackHandlerTx
-
-Returns the Safe transaction to disable the fallback handler.
-
-```js
-const safeTransaction = await safeSdk.createDisableFallbackHandlerTx()
-const txResponse = await safeSdk.executeTransaction(safeTransaction)
-await txResponse.transactionResponse?.wait()
-```
-
-This method can optionally receive the `options` parameter:
-
-```js
-const options: SafeTransactionOptionalProps = { ... }
-const safeTransaction = await safeSdk.createDisableFallbackHandlerTx(options)
-```
-
-### createEnableGuardTx
-
-Returns the Safe transaction to enable a Safe guard.
-
-```js
-const safeTransaction = await safeSdk.createEnableGuardTx(guardAddress)
-const txResponse = await safeSdk.executeTransaction(safeTransaction)
-await txResponse.transactionResponse?.wait()
-```
-
-This method can optionally receive the `options` parameter:
+## Need Help or Have Questions?
-```js
-const options: SafeTransactionOptionalProps = {
- safeTxGas, // Optional
- baseGas, // Optional
- gasPrice, // Optional
- gasToken, // Optional
- refundReceiver, // Optional
- nonce // Optional
-}
-const safeTransaction = await safeSdk.createEnableGuardTx(guardAddress, options)
-```
-
-### createDisableGuardTx
-
-Returns the Safe transaction to disable a Safe guard.
-
-```js
-const safeTransaction = await safeSdk.createDisableGuardTx()
-const txResponse = await safeSdk.executeTransaction(safeTransaction)
-await txResponse.transactionResponse?.wait()
-```
-
-This method can optionally receive the `options` parameter:
-
-```js
-const options: SafeTransactionOptionalProps = { ... }
-const safeTransaction = await safeSdk.createDisableGuardTx(options)
-```
-
-### createEnableModuleTx
-
-Returns a Safe transaction ready to be signed that will enable a Safe module.
-
-```js
-const safeTransaction = await safeSdk.createEnableModuleTx(moduleAddress)
-const txResponse = await safeSdk.executeTransaction(safeTransaction)
-await txResponse.transactionResponse?.wait()
-```
-
-This method can optionally receive the `options` parameter:
-
-```js
-const options: SafeTransactionOptionalProps = { ... }
-const safeTransaction = await safeSdk.createEnableModuleTx(moduleAddress, options)
-```
-
-### createDisableModuleTx
-
-Returns a Safe transaction ready to be signed that will disable a Safe module.
-
-```js
-const safeTransaction = await safeSdk.createDisableModuleTx(moduleAddress)
-const txResponse = await safeSdk.executeTransaction(safeTransaction)
-await txResponse.transactionResponse?.wait()
-```
-
-This method can optionally receive the `options` parameter:
-
-```js
-const options: SafeTransactionOptionalProps = { ... }
-const safeTransaction = await safeSdk.createDisableModuleTx(moduleAddress, options)
-```
-
-### createAddOwnerTx
-
-Returns the Safe transaction to add an owner and optionally change the threshold.
-
-```js
-const params: AddOwnerTxParams = {
- ownerAddress,
- threshold // Optional. If `threshold` is not provided the current threshold will not change.
-}
-const safeTransaction = await safeSdk.createAddOwnerTx(params)
-const txResponse = await safeSdk.executeTransaction(safeTransaction)
-await txResponse.transactionResponse?.wait()
-```
-
-This method can optionally receive the `options` parameter:
-
-```js
-const options: SafeTransactionOptionalProps = { ... }
-const safeTransaction = await safeSdk.createAddOwnerTx(params, options)
-```
-
-### createRemoveOwnerTx
-
-Returns the Safe transaction to remove an owner and optionally change the threshold.
-
-```js
-const params: RemoveOwnerTxParams = {
- ownerAddress,
- newThreshold // Optional. If `newThreshold` is not provided, the current threshold will be decreased by one.
-}
-const safeTransaction = await safeSdk.createRemoveOwnerTx(params)
-const txResponse = await safeSdk.executeTransaction(safeTransaction)
-await txResponse.transactionResponse?.wait()
-```
-
-This method can optionally receive the `options` parameter:
-
-```js
-const options: SafeTransactionOptionalProps = { ... }
-const safeTransaction = await safeSdk.createRemoveOwnerTx(params, options)
-```
-
-### createSwapOwnerTx
-
-Returns the Safe transaction to replace an owner of the Safe with a new one.
-
-```js
-const params: SwapOwnerTxParams = {
- oldOwnerAddress,
- newOwnerAddress
-}
-const safeTransaction = await safeSdk.createSwapOwnerTx(params)
-const txResponse = await safeSdk.executeTransaction(safeTransaction)
-await txResponse.transactionResponse?.wait()
-```
-
-This method can optionally receive the `options` parameter:
-
-```js
-const options: SafeTransactionOptionalProps = { ... }
-const safeTransaction = await safeSdk.createSwapOwnerTx(params, options)
-```
-
-### createChangeThresholdTx
-
-Returns the Safe transaction to change the threshold.
-
-```js
-const safeTransaction = await safeSdk.createChangeThresholdTx(newThreshold)
-const txResponse = await safeSdk.executeTransaction(safeTransaction)
-await txResponse.transactionResponse?.wait()
-```
-
-This method can optionally receive the `options` parameter:
-
-```js
-const options: SafeTransactionOptionalProps = { ... }
-const safeTransaction = await safeSdk.createChangeThresholdTx(newThreshold, options)
-```
-
-### isValidTransaction
-
-Checks if a Safe transaction can be executed successfully with no errors.
-
-```js
-const transactions: MetaTransactionData[] = [
- {
- // ...
- }
-]
-const safeTransaction = await safeSdk.createTransaction({ transactions })
-const isValidTx = await safeSdk.isValidTransaction(safeTransaction)
-```
-
-Optionally, some properties can be passed as execution options:
-
-```js
-const options: Web3TransactionOptions = {
- from, // Optional
- gas, // Optional
- gasPrice, // Optional
- maxFeePerGas, // Optional
- maxPriorityFeePerGas // Optional
- nonce // Optional
-}
-```
-
-```js
-const options: EthersTransactionOptions = {
- from, // Optional
- gasLimit, // Optional
- gasPrice, // Optional
- maxFeePerGas, // Optional
- maxPriorityFeePerGas // Optional
- nonce // Optional
-}
-```
-
-```js
-const isValidTx = await safeSdk.isValidTransaction(safeTransaction, options)
-```
-
-### executeTransaction
-
-Executes a Safe transaction.
-
-```js
-const transactions: MetaTransactionData[] = [
- {
- // ...
- }
-]
-const safeTransaction = await safeSdk.createTransaction({ transactions })
-const txResponse = await safeSdk.executeTransaction(safeTransaction)
-await txResponse.transactionResponse?.wait()
-```
-
-Optionally, some properties can be passed as execution options:
-
-```js
-const options: Web3TransactionOptions = {
- from, // Optional
- gas, // Optional
- gasPrice, // Optional
- maxFeePerGas, // Optional
- maxPriorityFeePerGas // Optional
- nonce // Optional
-}
-```
-
-```js
-const options: EthersTransactionOptions = {
- from, // Optional
- gasLimit, // Optional
- gasPrice, // Optional
- maxFeePerGas, // Optional
- maxPriorityFeePerGas // Optional
- nonce // Optional
-}
-```
-
-```js
-const txResponse = await safeSdk.executeTransaction(safeTransaction, options)
-```
+If you have any doubts, questions, or need assistance, feel free to reach out! [Here you will find how to get support.](https://github.com/safe-global/safe-core-sdk/tree/main/SUPPORT.md)
-## License
+## Contributing
-This library is released under MIT.
+Please read our [contribution guidelines](https://github.com/safe-global/safe-core-sdk/tree/main/CONTRIBUTING.md) before submitting any changes. We appreciate your help! 🙌
-## Contributors
+## License
-- Germán Martínez ([germartinez](https://github.com/germartinez))
+This library is [released under MIT](https://github.com/safe-global/safe-core-sdk/blob/main/LICENSE.md).
diff --git a/packages/relay-kit/.env.sample b/packages/relay-kit/.env.example
similarity index 100%
rename from packages/relay-kit/.env.sample
rename to packages/relay-kit/.env.example
diff --git a/packages/relay-kit/LICENSE.md b/packages/relay-kit/LICENSE.md
index b6358a76f..0d2a4f29d 100644
--- a/packages/relay-kit/LICENSE.md
+++ b/packages/relay-kit/LICENSE.md
@@ -1,6 +1,6 @@
MIT License
-Copyright (c) 2023 Safe Ecosystem Foundation
+Copyright (c) 2023-2024 Safe Ecosystem Foundation
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/packages/relay-kit/README.md b/packages/relay-kit/README.md
index fc20ee327..b3d529c1c 100644
--- a/packages/relay-kit/README.md
+++ b/packages/relay-kit/README.md
@@ -4,11 +4,26 @@
[![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)
-The Relay Kit allows to abstract users from the transaction fees payment (gas fees) allowing the use of native token or ERC-20 tokens. This will enable you to pay transaction fees directly from funding available in a Safe.
+The Relay Kit lets users pay transaction fees (gas fees) using the native blockchain token or ERC-20 tokens. Gas fees can be payed with this kit using any ERC-20 token in your Safe, even if there is no native token balance. This kit enables the use of ERC-4337 with Safe.
-## Reference
+## Table of contents
-- [Relay Kit docs](https://docs.safe.global/safe-core-aa-sdk/relay-kit)
+- [Documentation](#documentation)
+- [Need Help or Have Questions?](#need-help-or-have-questions)
+- [Contributing](#contributing)
+- [License](#license)
+
+## Documentation
+
+Head to the [Relay Kit docs](https://docs.safe.global/sdk/relay-kit) to learn more about how to use this SDK.
+
+## Need Help or Have Questions?
+
+If you have any doubts, questions, or need assistance, feel free to reach out! [Here you will find how to get support.](https://github.com/safe-global/safe-core-sdk/tree/main/SUPPORT.md)
+
+## Contributing
+
+Please read our [contribution guidelines](https://github.com/safe-global/safe-core-sdk/tree/main/CONTRIBUTING.md) before submitting any changes. We appreciate your help! 🙌
## License
diff --git a/packages/relay-kit/package.json b/packages/relay-kit/package.json
index 565f529d9..6a1cb677e 100644
--- a/packages/relay-kit/package.json
+++ b/packages/relay-kit/package.json
@@ -9,7 +9,8 @@
"Ethereum",
"Account Abstraction",
"SDK",
- "Relay"
+ "Relay",
+ "4337"
],
"scripts": {
"test": "jest src --coverage",
diff --git a/packages/safe-core-sdk-types/LICENSE.md b/packages/safe-core-sdk-types/LICENSE.md
index 310e6e37c..0e923d187 100644
--- a/packages/safe-core-sdk-types/LICENSE.md
+++ b/packages/safe-core-sdk-types/LICENSE.md
@@ -1,6 +1,6 @@
MIT License
-Copyright (c) 2021-2023 Safe Ecosystem Foundation
+Copyright (c) 2021-2024 Safe Ecosystem Foundation
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
diff --git a/packages/safe-core-sdk-types/README.md b/packages/safe-core-sdk-types/README.md
index 2cdb851da..1753518ad 100644
--- a/packages/safe-core-sdk-types/README.md
+++ b/packages/safe-core-sdk-types/README.md
@@ -1,3 +1,19 @@
# Safe Core SDK Types
+[![NPM Version](https://badge.fury.io/js/@safe-global%2Fsafe-core-sdk-types.svg)](https://badge.fury.io/js/@safe-global%2Fsafe-core-sdk-types)
+[![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)
+
Common types in the [Safe Core SDK](https://github.com/safe-global/safe-core-sdk)
+
+## Need Help or Have Questions?
+
+If you have any doubts, questions, or need assistance, feel free to reach out! [Here you will find how to get support.](https://github.com/safe-global/safe-core-sdk/tree/main/SUPPORT.md)
+
+## Contributing
+
+Please read our [contribution guidelines](https://github.com/safe-global/safe-core-sdk/tree/main/CONTRIBUTING.md) before submitting any changes. We appreciate your help! 🙌
+
+## License
+
+This library is [released under MIT](https://github.com/safe-global/safe-core-sdk/blob/main/LICENSE.md).
diff --git a/playground/README.md b/playground/README.md
index c8d8a2a18..8558750a2 100644
--- a/playground/README.md
+++ b/playground/README.md
@@ -2,7 +2,7 @@
This playground contains several scripts that can be used as a starting point to use the Safe{Core} SDK. These scripts do not cover all the functionality exposed by the SDK but showcase some steps of the Safe transaction flow.
-Before starting, make sure to install and build the Safe{Core} SDK monorepo.
+Before starting, make sure to install and build the Safe{Core} SDK monorepo. From the project root, run:
```bash
yarn install