@tuwaio/pulsar-solana 0.6.1 → 0.6.3
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 +9 -0
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -78,10 +78,16 @@ export const usePulsarStore = createBoundedUseStore(
|
|
|
78
78
|
rpcUrls: solanaRPCUrls,
|
|
79
79
|
}),
|
|
80
80
|
],
|
|
81
|
+
beforeTxProcess: async () => {
|
|
82
|
+
// Optional global preflight. Throw here to block before wallet interaction.
|
|
83
|
+
await assertUserCanSubmitTransactions();
|
|
84
|
+
},
|
|
81
85
|
}),
|
|
82
86
|
);
|
|
83
87
|
```
|
|
84
88
|
|
|
89
|
+
`@tuwaio/pulsar-core` validates Solana transaction metadata before any wallet interaction or persistence. `title` strings are limited to 100 characters, `description` strings to 300 characters, and the serialized `payload` to 10KB. A local `beforeTxProcess` passed to `executeTxAction` overrides the global callback from `createPulsarStore`.
|
|
90
|
+
|
|
85
91
|
---
|
|
86
92
|
|
|
87
93
|
### 2. Initiating a Transaction
|
|
@@ -138,6 +144,9 @@ function MyTransactionButton() {
|
|
|
138
144
|
onSuccess: async () => {
|
|
139
145
|
console.log('action executed')
|
|
140
146
|
},
|
|
147
|
+
beforeTxProcess: async () => {
|
|
148
|
+
await assertSolanaActionsEnabled();
|
|
149
|
+
},
|
|
141
150
|
params: {
|
|
142
151
|
type: 'example',
|
|
143
152
|
adapter: OrbitAdapter.SOLANA,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tuwaio/pulsar-solana",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.3",
|
|
4
4
|
"private": false,
|
|
5
5
|
"author": "Oleksandr Tkach",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"@tuwaio/pulsar-core": ">=0.5",
|
|
44
44
|
"@wallet-standard/app": "1.x.x",
|
|
45
45
|
"@wallet-standard/ui-core": "1.x.x",
|
|
46
|
-
"@wallet-standard/ui-registry": "1.
|
|
46
|
+
"@wallet-standard/ui-registry": "1.1.x",
|
|
47
47
|
"gill": ">=0.14",
|
|
48
48
|
"dayjs": "1.x.x",
|
|
49
49
|
"immer": "11.x.x",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@tuwaio/orbit-core": "^0.2.8",
|
|
54
|
-
"@tuwaio/orbit-solana": "^0.2.
|
|
54
|
+
"@tuwaio/orbit-solana": "^0.2.6",
|
|
55
55
|
"@wallet-standard/app": "^1.1.0",
|
|
56
56
|
"@wallet-standard/ui-core": "^1.0.0",
|
|
57
57
|
"@wallet-standard/ui-registry": "^1.1.0",
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"typescript": "^6.0.3",
|
|
64
64
|
"vitest": "^4.1.5",
|
|
65
65
|
"zustand": "^5.0.13",
|
|
66
|
-
"@tuwaio/pulsar-core": "^0.6.
|
|
66
|
+
"@tuwaio/pulsar-core": "^0.6.3"
|
|
67
67
|
},
|
|
68
68
|
"scripts": {
|
|
69
69
|
"start": "tsup src/index.ts --watch",
|