From 60ccc4f6f287028def76f00547cacdbdb0a75cf5 Mon Sep 17 00:00:00 2001 From: stadolf Date: Fri, 13 Oct 2023 18:15:56 +0200 Subject: [PATCH] package / readme / metadata updates Signed-off-by: stadolf --- README.md | 43 ++++++++------------ packages/demo/package.json | 2 +- packages/wagmi-safe-wait-for-tx/package.json | 3 +- 3 files changed, 21 insertions(+), 27 deletions(-) diff --git a/README.md b/README.md index c403366..71d6447 100644 --- a/README.md +++ b/README.md @@ -1,36 +1,29 @@ -This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app). +# Wait for Transaction Receipts for AA (Safe) wallets -## Getting Started +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. -First, run the development server: +[![npm version](https://badge.fury.io/js/@moleculexyz%2Fwagmi-safe-wait-for-tx.svg)](https://badge.fury.io/js/@moleculexyz%2Fwagmi-safe-wait-for-tx) +![GitHub deployments](https://img.shields.io/github/deployments/moleculeprotocol/test-wagmi-safe-privy/github-pages?label=demo%20deployed&link=https%3A%2F%2Fmoleculeprotocol.github.io%2Ftest-wagmi-safe-privy%2F) -```bash -npm run dev -# or -yarn dev -# or -pnpm dev -# or -bun dev -``` - -Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. +## available hooks -You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file. +- `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`` -This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font. +## install -## Learn More - -To learn more about Next.js, take a look at the following resources: +```bash +yarn add @moleculexyz/wagmi-safe-wait-for-tx +``` -- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. -- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. +## Docs -You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome! +See [the library Readme](./packages/wagmi-safe-wait-for-tx/README.md). +NPM package https://www.npmjs.com/package/@moleculexyz/wagmi-safe-wait-for-tx -## Deploy on Vercel +## Original Issues -The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js. +https://ethereum.stackexchange.com/questions/155384/how-to-get-receipt-in-wagmi-viem-for-a-transaction-issued-with-safe-on-walletc -Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details. +Copyright (c) 2023 by [Molecule AG](https://molecule.xyz) diff --git a/packages/demo/package.json b/packages/demo/package.json index cce7e3b..bb43147 100644 --- a/packages/demo/package.json +++ b/packages/demo/package.json @@ -16,7 +16,7 @@ "@emotion/react": "^11.11.1", "@emotion/styled": "^11.11.0", "@privy-io/react-auth": "^1.43.2", - "@moleculexyz/wagmi-safe-wait-for-tx": "0.1.2", + "@moleculexyz/wagmi-safe-wait-for-tx": "0.1.4", "@privy-io/wagmi-connector": "^0.1.4", "@wagmi/chains": "^1.8.0", "framer-motion": "^10.16.4", diff --git a/packages/wagmi-safe-wait-for-tx/package.json b/packages/wagmi-safe-wait-for-tx/package.json index b9ab57e..6bbb2d2 100644 --- a/packages/wagmi-safe-wait-for-tx/package.json +++ b/packages/wagmi-safe-wait-for-tx/package.json @@ -1,8 +1,9 @@ { "name": "@moleculexyz/wagmi-safe-wait-for-tx", "license": "MIT", + "version": "0.1.4", "description": "wagmi hooks that resolve Safe transaction hashes to onchain transaction hashes by Safe's transaction api", - "version": "0.1.2", + "repository": "moleculeprotocol/test-wagmi-safe-privy", "type": "module", "scripts": { "clean": "rimraf dist",