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

@safe-global/safe-gateway-typescript-sdk

Package Overview
Dependencies
Maintainers
2
Versions
71
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@safe-global/safe-gateway-typescript-sdk

[![npm](https://img.shields.io/npm/v/@safe-global/safe-gateway-typescript-sdk?label=%40safe-global%2Fsafe-gateway-typescript-sdk)](https://www.npmjs.com/package/@safe-global/safe-gateway-typescript-sdk)

  • 3.21.1
  • Source
  • npm
  • Socket score

Version published
Maintainers
2
Created

What is @safe-global/safe-gateway-typescript-sdk?

@safe-global/safe-gateway-typescript-sdk is a TypeScript SDK for interacting with the Safe Global Gateway API. It allows developers to manage and interact with Safe (formerly Gnosis Safe) smart contracts, providing functionalities such as retrieving Safe information, transaction history, and managing transactions.

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

Retrieve Safe Information

This feature allows you to retrieve information about a specific Safe, such as its owners, threshold, and nonce.

const { SafeGatewayClient } = require('@safe-global/safe-gateway-typescript-sdk');

const client = new SafeGatewayClient('https://safe-transaction.mainnet.gnosis.io');

async function getSafeInfo(safeAddress) {
  const safeInfo = await client.getSafeInfo(safeAddress);
  console.log(safeInfo);
}

getSafeInfo('0xYourSafeAddress');

Retrieve Transaction History

This feature allows you to retrieve the transaction history of a specific Safe, including executed and pending transactions.

const { SafeGatewayClient } = require('@safe-global/safe-gateway-typescript-sdk');

const client = new SafeGatewayClient('https://safe-transaction.mainnet.gnosis.io');

async function getTransactionHistory(safeAddress) {
  const history = await client.getTransactionHistory(safeAddress);
  console.log(history);
}

getTransactionHistory('0xYourSafeAddress');

Propose a Transaction

This feature allows you to propose a new transaction for a specific Safe. The transaction can then be confirmed by the required number of owners.

const { SafeGatewayClient } = require('@safe-global/safe-gateway-typescript-sdk');

const client = new SafeGatewayClient('https://safe-transaction.mainnet.gnosis.io');

async function proposeTransaction(safeAddress, transaction) {
  const response = await client.proposeTransaction(safeAddress, transaction);
  console.log(response);
}

const transaction = {
  to: '0xRecipientAddress',
  value: '1000000000000000000', // 1 ETH in wei
  data: '0x',
  operation: 0
};

proposeTransaction('0xYourSafeAddress', transaction);

Other packages similar to @safe-global/safe-gateway-typescript-sdk

FAQs

Package last updated on 26 Apr 2024

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