@@ -32,7 +32,9 @@ Simple WalletConnect Web3Modal v2 integration package for Vue3 apps.
3232 - [ FetchBlockNumber] ( #fetchblocknumber )
3333 - [ FetchTransaction] ( #fetchtransaction )
3434 - [ FetchTransactionReceipt] ( #fetchtransactionreceipt )
35+ - [ PrepareSendTransaction] ( #preparesendtransaction )
3536 - [ SendTransaction] ( #sendtransaction )
37+ - [ WaitForTransaction] ( #waitfortransaction )
3638 - [ SignMessage] ( #signmessage )
3739 - [ Multicall] ( #multicall )
3840 - [ FetchBalance] ( #fetchbalance )
@@ -205,10 +207,10 @@ import { selectChain } from '@kolirt/vue-web3-auth'
205207
206208### FetchGasPrice
207209
208- ` ` ` js
210+ ` ` ` ts
209211import { fetchGasPrice } from ' @kolirt/vue-web3-auth'
210212
211- let data = await fetchGasPrice ()
213+ const data = await fetchGasPrice ()
212214
213215/**
214216 * Result in data
@@ -224,10 +226,10 @@ let data = await fetchGasPrice()
224226
225227### FetchBlockNumber
226228
227- ` ` ` js
229+ ` ` ` ts
228230import { fetchBlockNumber } from ' @kolirt/vue-web3-auth'
229231
230- let data = await fetchBlockNumber ()
232+ const data = await fetchBlockNumber ()
231233
232234/**
233235 * Result in data
@@ -238,38 +240,59 @@ let data = await fetchBlockNumber()
238240
239241### FetchTransaction
240242
241- ` ` ` js
243+ ` ` ` ts
242244import { fetchTransaction } from ' @kolirt/vue-web3-auth'
243245
244- let transaction = await fetchTransaction ({
246+ const transaction = await fetchTransaction ({
245247 hash: ' 0x7ed8dc64f54ae43f4d53173e95aa929c52de44ec5cea8c28246989914ed7f4fb'
246248})
247249` ` `
248250
249- ### fetchTransactionReceipt
251+ ### FetchTransactionReceipt
250252
251- ` ` ` js
253+ ` ` ` ts
252254import { fetchTransactionReceipt } from ' @kolirt/vue-web3-auth'
253255
254- let transactionReceipt = await fetchTransactionReceipt ({
256+ const transactionReceipt = await fetchTransactionReceipt ({
255257 hash: ' 0x7ed8dc64f54ae43f4d53173e95aa929c52de44ec5cea8c28246989914ed7f4fb'
256258})
257259` ` `
258260
261+ ### PrepareSendTransaction
262+
263+ ` ` ` ts
264+ import { prepareSendTransaction } from ' @kolirt/vue-web3-auth'
265+
266+ const preparedTxn = await prepareSendTransaction ({
267+ to: ' 0x2D4C407BBe49438ED859fe965b140dcF1aaB71a9' ,
268+ value: 1n
269+ })
270+ ` ` `
271+
259272### SendTransaction
260273
261- ` ` ` js
274+ ` ` ` ts
262275import { sendTransaction } from ' @kolirt/vue-web3-auth'
263276
264- let txn = await sendTransaction ({
277+ const txn = await sendTransaction ({
265278 to: ' 0x2D4C407BBe49438ED859fe965b140dcF1aaB71a9' ,
266279 value: 1n
267280})
268281` ` `
269282
283+ ### WaitForTransaction
284+
285+ ` ` ` ts
286+ import { waitForTransaction } from ' @kolirt/vue-web3-auth'
287+
288+ const transactionReceipt = await waitForTransaction ({
289+ hash: ' 0x7ed8dc64f54ae43f4d53173e95aa929c52de44ec5cea8c28246989914ed7f4fb' ,
290+ })
291+ ` ` `
292+
270293### SignMessage
271294
272- ` ` ` js
295+ ` ` ` ts
273296import { signMessage } from ' @kolirt/vue-web3-auth'
274297
275298const signature = await signMessage (' test message' )
@@ -307,7 +330,7 @@ let data = await multicall({
307330
308331### FetchBalance
309332
310- ` ` ` js
333+ ` ` ` ts
311334import { fetchBalance } from ' @kolirt/vue-web3-auth'
312335
313336let bnbBalance = await fetchBalance ({
@@ -344,7 +367,7 @@ let tokenBalance = await fetchBalance({
344367
345368### FetchToken
346369
347- ` ` ` js
370+ ` ` ` ts
348371import { fetchToken } from ' @kolirt/vue-web3-auth'
349372
350373let data = await fetchToken ({
@@ -420,7 +443,7 @@ const gas = await estimateWriteContractGas({
420443
421444### ParseEvents
422445
423- ` ` ` js
446+ ` ` ` ts
424447import { erc20ABI , fetchTransactionReceipt , parseEvents } from ' @kolirt/vue-web3-auth'
425448
426449const transactionReceipt = await fetchTransactionReceipt ({
@@ -446,7 +469,7 @@ const events = parseEvents({ abi: erc20ABI }, transactionReceipt)
446469
447470### WatchContractEvent
448471
449- ` ` ` js
472+ ` ` ` ts
450473import { erc20ABI , watchContractEvent } from ' @kolirt/vue-web3-auth'
451474
452475const unwatch = watchContractEvent (
@@ -463,7 +486,7 @@ const unwatch = watchContractEvent(
463486
464487### WatchAsset
465488
466- ` ` ` js
489+ ` ` ` ts
467490import { watchAsset } from ' @kolirt/vue-web3-auth'
468491
469492const result = watchAsset ({
@@ -477,7 +500,7 @@ const result = watchAsset({
477500
478501### UseFetchBalance
479502
480- ` ` ` js
503+ ` ` ` ts
481504import { useFetchBalance } from ' @kolirt/vue-web3-auth'
482505
483506// use `fetch` for manual init when `disableAutoFetch` is `true`
0 commit comments