Skip to content

moleculeprotocol/test-wagmi-safe-privy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Wait for Transaction Receipts for AA (Safe) wallets

This library is compatible to wagmi hooks & viem publicProviders. It allows waiting for transaction receipts for Safe transactions. This is helpful when your users are connecting their Safe accounts using Walletconnect. A transaction submitted on that connection will return the safeTx hash of the Safe's infrastructure. To wait for a regular transaction receipt, you first must resolve the onchain transaction that has been executed by the respective relayer or submitted by the final signer.

npm version GitHub deployments

available hooks

  • useIsSafeWallet(address: Address): boolean|undefined figures out whether address is a Safe account
  • useSafeWaitForTransaction(writeResult: WriteContractResult | undefined) a drop in replacement for useWaitForTransaction
  • safeWaitForTransactionReceipt(publicClient, {hash, address}) plain viem usage: takes a public client & an address and returns `Promise``

install

yarn add @moleculexyz/wagmi-safe-wait-for-tx

Docs

See the library Readme.
NPM package https://www.npmjs.com/package/@moleculexyz/wagmi-safe-wait-for-tx

Original Issues

https://ethereum.stackexchange.com/questions/155384/how-to-get-receipt-in-wagmi-viem-for-a-transaction-issued-with-safe-on-walletc

Copyright (c) 2023 by Molecule AG