Wondering what’s next for npm?Check out our public roadmap! »

@argent/smartwallet-utilsTypeScript icon, indicating that this package has built-in type declarations

0.0.12 • Public • Published

smartwallet-utils

Installation

npm install @argent/smartwallet-utils

Usage

Create an instance of SmartWalletUtils

const swu = new SmartWalletUtils(web3Provider, address);
const walletHelper = await swu.getWalletHelper();

Check if a message signature is valid

const isValid = await walletHelper.isValidSignature(hexMessage, signature);

Trigger an Approve ERC20 tokens and call contract in one single transaction, if supported by the wallet

if (walletHelper.supportApproveAndCall) {
    const txHash = await walletHelper.approveAndCall(erc20Contract, amount, spender, contract, data, gasLimit);
}

License

Released under MIT

Keywords

none

Install

npm i @argent/smartwallet-utils

DownloadsWeekly Downloads

18

Version

0.0.12

License

MIT

Unpacked Size

18.8 kB

Total Files

17

Last publish

Collaborators

  • avatar
  • avatar