npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

antier-gnosis-safe

v1.4.0

Published

Multisignature wallets require more than one private key and adds a layer of security to cryptocurrency asset storage.

Downloads

29

Readme

NOTE: Only Testnet Mumbai Matic is Supported for this NPM

Antier-Gnosis-Safe

Antier-Gnosis-Safe is an npm package that provides integration with the Gnosis Safe multisig wallet system. It allows developers to interact with Gnosis Safe contracts, create and execute transactions, and manage multisig wallets.

What is a Multisig Wallet?

A multisignature wallet requires more than one private key and adds an additional layer of security to cryptocurrency asset storage.

Installation and Usage

The easiest way to use Antier-Gnosis-Safe is to install it from npm:

npm install antier-gnosis-safe

API Key Creation

  • To obtain your API key, visit https://defiant-cod-purse.cyclic.app/api
  • Follow the steps of registration, login, and API key creation.

Example Usage

Set API Key:

// Import the setApiKey function
import { setApiKey } from 'antier-gnosis-safe';

// Set the API key
setApiKey(process.env.API_KEY);

Create a Gnosis Safe Multisig Wallet:

// Import the createMultiSigWallet function
import { createMultiSigWallet } from 'antier-gnosis-safe';

// Create a new wallet with the specified owners and threshold
const owners = ['0x123...', '0x456...'];
const threshold = 2;

// Create a new instance of the GnosisSafe class
const multiSigWallet = await createMultiSigWallet(owners, threshold, '0x123');

Sign with Approver:

// Import the signForApprover function
import { signForApprover } from 'antier-gnosis-safe';

// MultisigWallet address
const multiSigWalletAddress = "0x432...";

// Create a signature for a transaction
const signature = await signForApprover(
  multiSigWalletAddress,
  contractInstance,
  userAddress,
  'mint',
  [input1, input2, ...]
);

// Example output: [{ approverWallet: string, sign: string }]

Execute Transaction:

// Import the executeWithApprover function
import { executeWithApprover } from 'antier-gnosis-safe';

// MultisigWallet address
const multiSigWalletAddress = "0x432...";

// Execute a transaction using the multisig wallet
const transactionResult = await executeWithApprover(
  multiSigWalletAddress,
  contractInstance,
  userAddress,
  'mint',
  [input1, input2, ...],
  signatures
);

Functions

Antier-Gnosis-Safe exposes four public methods:

  • setApiKey() - Used for setting the SDK API key on the frontend.
  • createMultiSigWallet() - Deploys a multisig wallet for the user.
  • signForApprover() - Creates signatures for approvers for all transactions.
  • executeWithApprover() - Executes functions using the multisig wallet.

License

This package is ISC licensed. (c) Antier Solutions 2023.

Authors