0.0.4 • Published 2 years ago
@gelatonetwork/gasless-wallet v0.0.4
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
);
0.0.3
2 years ago
0.0.4
2 years ago
0.0.2
2 years ago
0.0.2-alpha.4
2 years ago
0.0.2-alpha.3
2 years ago
0.0.2-alpha.2
2 years ago
0.0.2-alpha.1
2 years ago
0.0.2-alpha.0
2 years ago
0.0.1
2 years ago