Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@gnosis.pm/safe-apps-react-sdk

Package Overview
Dependencies
Maintainers
17
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@gnosis.pm/safe-apps-react-sdk

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

  • 1.0.0-beta.1
  • npm
  • Socket score

Version published
Weekly downloads
80
decreased by-54.29%
Maintainers
17
Weekly downloads
 
Created
Source

Safe Apps React SDK

npm

This sdk should provide a simple way to write a React.js Safe app

How to use

  • Add npm package
yarn add @rmeissner/safe-apps-react-sdk
  • Add SafeProvider
// ... other imports
import SafeProvider from '@rmeissner/safe-apps-react-sdk';

ReactDOM.render(
  <React.StrictMode>
    <SafeProvider>
      <App /> // Your app
    </SafeProvider>
  </React.StrictMode>,
  document.getElementById('root')
);
  • Use Safe
// ... other imports
import { useSafe } from '@rmeissner/safe-apps-react-sdk';

const App = () => {
  const safe = useSafe()
  return (<div>{safe.info.safeAddress}</div>)
}

Usages

Send transactions
const txs: Transaction[] = [
  {
    "to": "0x31415629...",
    "value": "0",
    "data": "0xbaddad"
  },
  //...
]
// Returns a hash to identify the Safe transaction
const safeTxHash: string = await safe.sendTransactions(txs)
Load Safe transaction information
const safeTx: SafeTransaction = await safe.loadSafeTransaction(safeTxHash)

FAQs

Package last updated on 15 Dec 2020

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