@tuwaio/pulsar-react 0.3.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -10
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -21,14 +21,8 @@ Its primary role is to ensure that transaction tracking can resume reliably afte
|
|
|
21
21
|
To use this package, you need the complete Pulsar stack, including `@wagmi/core` for EVM interactions.
|
|
22
22
|
|
|
23
23
|
```bash
|
|
24
|
-
# Using pnpm
|
|
24
|
+
# Using pnpm (recommended), but you can use npm, yarn or bun as well
|
|
25
25
|
pnpm add @tuwaio/pulsar-react react
|
|
26
|
-
|
|
27
|
-
# Using npm
|
|
28
|
-
npm install @tuwaio/pulsar-react react
|
|
29
|
-
|
|
30
|
-
# Using yarn
|
|
31
|
-
yarn add @tuwaio/pulsar-react react
|
|
32
26
|
```
|
|
33
27
|
|
|
34
28
|
---
|
|
@@ -46,7 +40,7 @@ First, create your vanilla Pulsar store and a reusable, bounded hook to access i
|
|
|
46
40
|
```ts
|
|
47
41
|
// src/hooks/txTrackingHooks.ts
|
|
48
42
|
import { createBoundedUseStore, createPulsarStore, Transaction } from '@tuwaio/pulsar-core';
|
|
49
|
-
import {
|
|
43
|
+
import { pulsarEvmAdapter } from '@tuwaio/pulsar-evm';
|
|
50
44
|
|
|
51
45
|
import { appChains, config } from '@/configs/wagmiConfig';
|
|
52
46
|
|
|
@@ -68,7 +62,7 @@ export type TransactionUnion = ExampleTx;
|
|
|
68
62
|
export const usePulsarStore = createBoundedUseStore(
|
|
69
63
|
createPulsarStore<TransactionUnion>({
|
|
70
64
|
name: storageName,
|
|
71
|
-
adapter:
|
|
65
|
+
adapter: pulsarEvmAdapter(config, appChains),
|
|
72
66
|
}),
|
|
73
67
|
);
|
|
74
68
|
```
|
|
@@ -86,7 +80,7 @@ import { usePulsarStore } from '../hooks/txTrackingHooks';
|
|
|
86
80
|
|
|
87
81
|
export const PulsarInitializer = () => {
|
|
88
82
|
// Get the initialization function from the store via our custom hook
|
|
89
|
-
const initializeTransactionsPool =
|
|
83
|
+
const initializeTransactionsPool = usePulsarStore((state) => state.initializeTransactionsPool);
|
|
90
84
|
|
|
91
85
|
// Pass the function to the hook from this package
|
|
92
86
|
useInitializeTransactionsPool({ initializeTransactionsPool });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tuwaio/pulsar-react",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"author": "Oleksandr Tkach",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -41,8 +41,8 @@
|
|
|
41
41
|
"react": ">=19.2.3"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"@types/react": "^19.2.
|
|
45
|
-
"react": "^19.2.
|
|
44
|
+
"@types/react": "^19.2.10",
|
|
45
|
+
"react": "^19.2.4",
|
|
46
46
|
"tsup": "^8.5.1",
|
|
47
47
|
"typescript": "^5.9.3"
|
|
48
48
|
},
|