Socket
Socket
Sign inDemoInstall

@gelatonetwork/gasless-wallet

Package Overview
Dependencies
4
Maintainers
15
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @gelatonetwork/gasless-wallet

SDK for Gasless Wallet


Version published
Maintainers
15
Install size
31.9 MB
Created

Readme

Source

Gasless Wallet

GaslessWallet is the main class where the developers can create smart contract wallets owned by their users' EOA and sponsor the transactions by using Gelato's 1Balance Service

Installation

yarn add @gelatonetwork/gasless-wallet

npm install @gelatonetwork/gasless-wallet

Usage

Imports

import {
  GaslessWallet,
  GaslessWalletConfig,
} from "@gelatonetwork/gasless-wallet";
import { ethers } from "ethers";

Initialization

const eoaProvider:
    | ethers.providers.ExternalProvider
    | ethers.providers.JsonRpcFetchFunc = ...

const gaslessWalletConfig: GaslessWalletConfig = {
    apiKey: "1BALANCE_API_KEY",
};


const gaslessWallet = new GaslessWallet(eoaProvider, gaslessWalletConfig);
await gaslessWallet.init();

Get Gasless Wallet Contract [Gnosis Safe Proxy] Address

const gaslessWalletContractAddress = gaslessWallet.getAddress();

Helper Functions

const isGaslessWalletAlreadyDeployed = await gaslessWallet.isDeployed();
const isGaslessWalletAlreadyInitiated = gaslessWallet.isInitiated();

Sponsor Transaction

Sponsored Transaction that is sent through EOA's Gnosis Safe Proxy

const { taskId } = await gaslessWallet.sponsorTransaction(
  TARGET_ADDRESS,
  TX_DATA
);

FAQs

Last updated on 03 Apr 2023

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc