@msafe/sui-app-store 0.0.364 → 0.0.366

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 +61 -3
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -17,6 +17,7 @@ You **do not write a helper**. You **do not wait for this package to publish**.
17
17
  Writing a helper, forking `src/apps/**`, or opening a PR here will **not** list your dApp.
18
18
 
19
19
  **New listing → [What you gain](#what-you-gain-in-this-version)** then [Current integration](#current-integration)
20
+ **Test in the MSafe iframe → [Test on preview](#test-on-preview)**
20
21
  **Already started a helper → [How to change your dApp](#how-to-change-your-dapp)**
21
22
  **Have an agent do the edit → [Prompt for your coding agent](#prompt-for-your-coding-agent)**
22
23
 
@@ -38,7 +39,6 @@ The old path existed because a queued multisig tx had to be **rebuilt** later, s
38
39
  | What you write | Intention class + `deserialize` / `build` + tests + PR in **this** repo | The PTB you already build for other wallets |
39
40
  | Extra dependency | `@msafe/sui-app-store` + `appContext` | `@msafe/sui-wallet` only |
40
41
  | Who ships your adapter | MSafe reviews, merges, and **publishes a new app-store version** | **Nobody.** There is no adapter. |
41
- | Time to first live tx | Often **weeks** (review + our release train) | **Days** — usually the time to wire the wallet and send a card |
42
42
  | Blocked on | Our sprint, this repo’s CI, npm publish | Your own PTB being correct |
43
43
  | Mysten / protocol SDK upgrades | Helper in this repo had to follow; you waited on us | You upgrade **your** dApp; we are not in the loop |
44
44
  | Three new protocols at once | Three helper PRs, serialized on our side | Three teams in parallel; we only add three cards |
@@ -72,7 +72,7 @@ You are migrating this dApp onto the current MSafe store integration.
72
72
  1. Read this README first and treat it as the only spec:
73
73
  https://github.com/Momentum-Safe/msafe-sui-app-store/blob/main/README.md
74
74
  If the user attached or opened a local copy of that README, use the local copy.
75
- Follow “How to change your dApp and “Current integration”.
75
+ Follow “How to change your dApp”, “Current integration”, and “Test on preview”.
76
76
  Ignore the collapsed “DEPRECATED archive”. Do not implement a helper.
77
77
 
78
78
  2. Goal: MSafe is a normal Sui wallet. We submit a fully assembled Transaction.
@@ -106,9 +106,10 @@ You are migrating this dApp onto the current MSafe store integration.
106
106
  app name, icon, production URL.
107
107
 
108
108
  7. When done, list changed files and remaining checklist items from the README.
109
+ Tell the human to verify in the MSafe preview iframe (https://sui-preview.m-safe.io/) before asking for a store card.
109
110
  ```
110
111
 
111
- After the agent finishes: send MSafe the app name, icon, and production URL so the store card can go up.
112
+ After the agent finishes: test on [preview](#test-on-preview), then send MSafe the app name, icon, and production URL so the store card can go up.
112
113
 
113
114
  ---
114
115
 
@@ -188,6 +189,7 @@ Keep your protocol SDK (Cetus SDK, NAVI SDK, your own `moveCall`s). Those alread
188
189
  - [ ] No `appContext` on `signTransaction` / `signAndExecuteTransaction`
189
190
  - [ ] `tx.setSender` is the **multisig** address (the connected MSafe account)
190
191
  - [ ] Close any helper PR against this repository
192
+ - [ ] Verify in the [preview iframe](#test-on-preview) (`https://sui-preview.m-safe.io/`)
191
193
  - [ ] Send MSafe: app name, icon, production URL — for the store card only
192
194
 
193
195
  `signAndExecuteTransaction` **proposes** to the multisig queue. It does **not** return an on-chain digest. Owners vote and execute in MSafe.
@@ -246,11 +248,67 @@ The store iframe accepts **one** in-flight proposal. If the multisig already has
246
248
 
247
249
  Listing is a **card**: name, icon, URL. MSafe adds `id` / `image` / `dappLink` on the web app. There is no adapter review and no `@msafe/sui-app-store` release on the critical path.
248
250
 
251
+ Test the iframe path on [preview](#test-on-preview) before you ask for the card.
252
+
249
253
  ### Reference
250
254
 
251
255
  - Wallet SDK: https://github.com/Momentum-Safe/msafe-sui-wallet
252
256
  - Sample dApp: https://github.com/Momentum-Safe/msafe-sui-app-arbitrary-transaction — follow the **wallet `Transaction`** path, not old `appContext` commits
253
257
  - Live sample: https://sui-ptx.m-safe.io/
258
+ - Preview (mainnet iframe): https://sui-preview.m-safe.io/
259
+
260
+ ---
261
+
262
+ ## Test on preview
263
+
264
+ Use this to debug the real store iframe (simulate → propose → vote). Preview is **Sui mainnet** and talks to the production MSafe backend. Use a mainnet multisig you control. Do not send large amounts.
265
+
266
+ Preview: https://sui-preview.m-safe.io/
267
+
268
+ ### Open your dApp in the iframe
269
+
270
+ 1. Open https://sui-preview.m-safe.io/ and log in.
271
+ 2. Select your mainnet MSafe account.
272
+ 3. Go to **App Store → Custom dApp**.
273
+ 4. Paste your **HTTPS** staging URL and click **Open dApp**.
274
+
275
+ Or, after you are logged in:
276
+
277
+ ```
278
+ https://sui-preview.m-safe.io/store/sandbox?msafe=<YOUR_MSAFE_ADDRESS>&url=<encodeURIComponent(YOUR_HTTPS_URL)>
279
+ ```
280
+
281
+ `http://localhost` will not load here (HTTPS parent). Deploy a public HTTPS preview (Vercel, Cloudflare Tunnel, ngrok, …).
282
+
283
+ ### iframe / CSP
284
+
285
+ Your page must allow MSafe to embed it:
286
+
287
+ ```
288
+ Content-Security-Policy: frame-ancestors https://sui-preview.m-safe.io https://sui.m-safe.io;
289
+ ```
290
+
291
+ Do not send `X-Frame-Options: DENY` / `SAMEORIGIN`. A blank iframe is almost always CSP or `X-Frame-Options`.
292
+
293
+ ### Expected flow
294
+
295
+ Your dApp builds a real PTB → MSafe wallet prompt → simulation → Propose → the tx appears in the MSafe **Transactions** queue → owners vote → execute.
296
+
297
+ `signAndExecuteTransaction` does **not** return an on-chain digest. That is expected.
298
+
299
+ The store iframe accepts **one** in-flight proposal. If the account already has a pending or future tx, finish or clear the queue before testing again.
300
+
301
+ ### Common failures
302
+
303
+ | Symptom | Likely cause |
304
+ | --- | --- |
305
+ | Blank iframe | CSP / `X-Frame-Options` blocks embedding, or the URL is not HTTPS |
306
+ | `Empty transaction...` | You sent `new Transaction()` or an empty PTB |
307
+ | `Cannot destructure property 'content' of 'appContext'` | Still on the helper path; remove `appContext` and submit the real PTB |
308
+ | Simulation / propose works, no digest | Expected. Check the MSafe **Transactions** queue |
309
+ | Network mismatch | Register `MSafeWallet` with `'sui:mainnet'` |
310
+
311
+ When it works, send MSafe: **app name** (same string as `MSafeWallet('...')`), **icon**, **production URL**.
254
312
 
255
313
  ---
256
314
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@msafe/sui-app-store",
3
- "version": "0.0.364",
3
+ "version": "0.0.366",
4
4
  "description": "MSafe Sui app store repository",
5
5
  "author": "Momentum Safe",
6
6
  "license": "MIT",