Skip to content

rndlabs/safe-app-sdk

Repository files navigation

license Coverage Status

WARNING: THIS IS A HIGHLY OPINIONATED, STRIPPED VERSION OF THE SAFE-SDKS!

Safe_Logos_Core_SDK_Black

Software developer tools that facilitate the interaction with the Safe contracts and services.

Guides

Title Description
Integrating the Safe Core SDK This guide shows how to use the Protocol Kit and API Kit.

Packages

Package Release Description
api-kit NPM Version Safe Transaction Service API client library
auth-kit NPM Version 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 NPM Version Typescript library that allows users to buy cryptocurrencies using a credit card and other payment options
protocol-kit NPM Version TypeScript library that facilitates the interaction with the Safe contracts
relay-kit ​​​NPM Version Library to abstract transaction fees payment (gas fees), allowing the use of native tokens or ERC-20​​
safe-core-sdk-types NPM Version Common types extracted from the Safe Core SDK packages

Playground

This project includes a playground with a few 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 each of them present steps of the Safe transaction flow.

Update the config inside the scripts and execute the following commands to run each step:

Step 1: Deploy a Safe

yarn play deploy-safe

Step 2: Propose a transaction

yarn play propose-transaction

Step 3: Confirm a transaction

yarn play confirm-transaction

Step 4: Execute a transaction

To execute a transaction:

yarn play execute-transaction

To execute a transaction using a relay:

yarn play relay-paid-transaction

To execute a sponsored transaction using a relay:

yarn play relay-sponsored-transaction

Optional Step: Generate a custon Safe address

yarn play generate-safe-address