Socket
Socket
Sign inDemoInstall

@safe-global/safe-apps-sdk

Package Overview
Dependencies
Maintainers
7
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@safe-global/safe-apps-sdk

SDK developed to integrate third-party apps with Safe app.


Version published
Weekly downloads
256K
decreased by-2.4%
Maintainers
7
Weekly downloads
 
Created

What is @safe-global/safe-apps-sdk?

@safe-global/safe-apps-sdk is a JavaScript SDK that allows developers to interact with Safe (formerly Gnosis Safe) applications. It provides a set of tools to build decentralized applications (dApps) that can interact with Safe smart contracts, enabling functionalities such as transaction creation, signing, and execution within the Safe ecosystem.

What are @safe-global/safe-apps-sdk's main functionalities?

Initialize SDK

This code snippet demonstrates how to initialize the Safe Apps SDK. This is the first step to start interacting with Safe applications.

const SafeAppsSDK = require('@safe-global/safe-apps-sdk');
const sdk = new SafeAppsSDK();

Get Safe Info

This feature allows you to retrieve information about the Safe, such as its address, owners, and threshold. The code snippet shows how to get this information and log it to the console.

sdk.safe.getInfo().then((safeInfo) => {
  console.log(safeInfo);
});

Create Transaction

This feature allows you to create and send a transaction from the Safe. The code snippet demonstrates how to create a transaction object and send it using the SDK.

const transaction = {
  to: '0xRecipientAddress',
  value: '1000000000000000000', // 1 ETH in wei
  data: '0x',
};
sdk.txs.send({ txs: [transaction] }).then((response) => {
  console.log(response);
});

Sign Message

This feature allows you to sign a message with the Safe. The code snippet shows how to sign a message and log the signature to the console.

const message = 'Hello, Safe!';
sdk.safe.signMessage(message).then((signature) => {
  console.log(signature);
});

Other packages similar to @safe-global/safe-apps-sdk

Keywords

FAQs

Package last updated on 04 May 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc