@tuwaio/pulsar-react 0.4.1 → 0.4.2

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.
Files changed (2) hide show
  1. package/README.md +6 -0
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -63,10 +63,16 @@ export const usePulsarStore = createBoundedUseStore(
63
63
  createPulsarStore<TransactionUnion>({
64
64
  name: storageName,
65
65
  adapter: pulsarEvmAdapter(config, appChains),
66
+ beforeTxProcess: async () => {
67
+ // Optional global preflight. Throw here to block before wallet interaction.
68
+ await assertUserCanSubmitTransactions();
69
+ },
66
70
  }),
67
71
  );
68
72
  ```
69
73
 
74
+ The preflight and metadata validation lives in `@tuwaio/pulsar-core`, not in React. Before wallet interaction or persistence, Pulsar validates that each `title` string is 100 characters or less, each `description` string is 300 characters or less, and the serialized `payload` is 10KB or less. Invalid pending transactions restored by `useInitializeTransactionsPool` are removed from persisted storage during initialization.
75
+
70
76
  ### Step 2: Initialize the Store in Your App
71
77
 
72
78
  Create a small, client-side component that uses the `useInitializeTransactionsPool` hook. This component's job is to re-activate trackers for pending transactions when the app loads.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tuwaio/pulsar-react",
3
- "version": "0.4.1",
3
+ "version": "0.4.2",
4
4
  "private": false,
5
5
  "author": "Oleksandr Tkach",
6
6
  "license": "Apache-2.0",