This package has been deprecated

Author message:

Please read the documentation at https://app.gitbook.com/@argent/s/argent/wallet-connect-and-argent

@argent/smartwallet-utils
TypeScript 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

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Published

Version History

  • Version
    Downloads (Last 7 Days)
    • Published

Package Sidebar

Install

npm i @argent/smartwallet-utils

Weekly Downloads

26

Version

0.0.12

License

MIT

Unpacked Size

18.8 kB

Total Files

17

Last publish

Collaborators

  • gergold