@meddleware/token-deployer-ui 0.0.8 → 0.0.10

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 (64) hide show
  1. package/.env.example +8 -11
  2. package/.github/workflows/e2e-realchain.yml +1 -1
  3. package/.github/workflows/node-ci.yml +9 -0
  4. package/.github/workflows/npm-publish.yml +16 -2
  5. package/.htmlvalidate.mjs +30 -0
  6. package/CLAUDE.md +14 -7
  7. package/Dockerfile +1 -1
  8. package/LICENSE +11 -118
  9. package/README.md +3 -5
  10. package/eslint.config.ts +63 -0
  11. package/index.html +11 -2
  12. package/package.json +32 -10
  13. package/postcss.config.js +8 -0
  14. package/public/og-image.png +0 -0
  15. package/public/robots.txt +1 -1
  16. package/public/sitemap.xml +1 -1
  17. package/scripts/e2e-deploy.mjs +22 -17
  18. package/scripts/e2e-localnet.mjs +14 -12
  19. package/scripts/e2e-walrus-browser.mjs +1 -4
  20. package/scripts/gen-og-image.mjs +2 -2
  21. package/scripts/publish-localnet.mjs +5 -4
  22. package/src/App.vue +8 -6
  23. package/src/component-styles.css +5 -38
  24. package/src/components/ConfigForm.vue +74 -28
  25. package/src/components/DeployProgress.vue +2 -4
  26. package/src/components/GithubPush.vue +22 -7
  27. package/src/components/IconPicker.vue +103 -42
  28. package/src/components/LicensePicker.vue +66 -66
  29. package/src/components/MyTokens.vue +125 -0
  30. package/src/components/ResultPanel.vue +2 -4
  31. package/src/components/ReviewPanel.vue +1 -1
  32. package/src/components/TermsDialog.vue +28 -27
  33. package/src/components/TokenDeployerView.vue +109 -40
  34. package/src/components/WalletBar.vue +67 -78
  35. package/src/components/WalrusBlobBrowser.vue +33 -25
  36. package/src/composables/useAccessGate.ts +7 -2
  37. package/src/composables/useWalrusRelay.ts +1 -1
  38. package/src/config.ts +10 -13
  39. package/src/lib/accessGate.ts +28 -14
  40. package/src/lib/buildPublishTx.ts +1 -1
  41. package/src/lib/deploy.ts +36 -0
  42. package/src/lib/deployExecutor.ts +14 -12
  43. package/src/lib/generatePackage.ts +18 -13
  44. package/src/lib/licenses.ts +4 -3
  45. package/src/lib/listMyTokens.ts +41 -0
  46. package/src/lib/readClient.ts +15 -7
  47. package/src/lib/types.ts +1 -1
  48. package/src/lib/validation.ts +8 -4
  49. package/src/lib/walrus-constants.ts +1 -1
  50. package/src/lib/walrus.ts +22 -11
  51. package/src/main.ts +46 -58
  52. package/src/styles.css +13 -5
  53. package/src/template-src/files.json +7 -7
  54. package/stylelint.config.js +33 -0
  55. package/test-results/.last-run.json +1 -1
  56. package/tests/accessGate.test.ts +26 -21
  57. package/tests/deploy.test.ts +70 -2
  58. package/tests/generatePackage.test.ts +11 -0
  59. package/tests/licenses.test.ts +6 -3
  60. package/tests/listMyTokens.test.ts +30 -0
  61. package/tests/useAccessGate.test.ts +15 -19
  62. package/typedoc.json +2 -2
  63. package/vite.config.ts +9 -1
  64. package/src/components/WalrusIconUpload.vue +0 -205
package/.env.example CHANGED
@@ -16,12 +16,11 @@ VITE_FEE_MIST=1000000000
16
16
  VITE_FEE_TREASURY_TESTNET=0xe6b2810abfc5a6f37a375f73e3ba76cfc37584196e453255ad3c9ca2f0ede0ed
17
17
  VITE_FEE_TREASURY_MAINNET=0xe6b2810abfc5a6f37a375f73e3ba76cfc37584196e453255ad3c9ca2f0ede0ed
18
18
 
19
- # Optional RPC overrides. Set a paid/private endpoint for production to avoid public
20
- # rate limits. NOTE: the official testnet fullnode (fullnode.testnet.sui.io) is gRPC-only
21
- # and 404s for JSON-RPC — use a JSON-RPC-capable endpoint for testnet (the app defaults to
22
- # https://sui-testnet-rpc.publicnode.com). The same VITE_RPC_TESTNET is what the real-chain
23
- # e2e (npm run e2e:testnet) builds against; point E2E_RPC at the same endpoint.
24
- # VITE_RPC_TESTNET=https://sui-testnet-rpc.publicnode.com
19
+ # Optional gRPC fullnode overrides. Set a paid/private endpoint for production to avoid
20
+ # public rate limits. These must be gRPC(-web) endpoints — public fullnodes have deprecated
21
+ # JSON-RPC. The same VITE_RPC_TESTNET is what the real-chain e2e (npm run e2e:testnet)
22
+ # builds against; point E2E_RPC at the same endpoint.
23
+ # VITE_RPC_TESTNET=https://fullnode.testnet.sui.io:443
25
24
  # VITE_RPC_MAINNET=https://fullnode.mainnet.sui.io:443
26
25
 
27
26
  # Optional publish gas budget (MIST).
@@ -35,10 +34,8 @@ VITE_FEE_TREASURY_MAINNET=0xe6b2810abfc5a6f37a375f73e3ba76cfc37584196e453255ad3c
35
34
  # VITE_WALRUS_RELAY_TESTNET=https://sui-walrus-relay-testnet.meddleware.co.uk
36
35
  # VITE_WALRUS_RELAY_MAINNET=https://sui-walrus-relay.meddleware.co.uk
37
36
 
38
- # gRPC fullnode for the Walrus icon-upload client (a SuiGrpcClient). This is a
39
- # *gRPC* endpoint and is SEPARATE from VITE_RPC_* (the JSON-RPC deploy endpoints) —
40
- # the two protocols are not interchangeable. Defaults to the public gRPC fullnodes
41
- # (rate-limited); set your own for production to avoid limits.
37
+ # Optional separate gRPC fullnode for the Walrus icon-upload client. Defaults to
38
+ # VITE_RPC_* (also gRPC); set only if Walrus traffic should use a different node.
42
39
  # VITE_WALRUS_RPC_TESTNET=https://fullnode.testnet.sui.io:443
43
40
  # VITE_WALRUS_RPC_MAINNET=https://fullnode.mainnet.sui.io:443
44
41
 
@@ -72,4 +69,4 @@ VITE_FEE_TREASURY_MAINNET=0xe6b2810abfc5a6f37a375f73e3ba76cfc37584196e453255ad3c
72
69
  # Public site origin for canonical/OpenGraph/JSON-LD URLs (index.html). Committed
73
70
  # defaults live in .env.production / .env.development; a staging deploy should set
74
71
  # this so it never claims the production URL.
75
- # VITE_PUBLIC_URL=https://tokens.meddleware.co.uk
72
+ # VITE_PUBLIC_URL=https://sui-token-deployer.meddleware.co.uk
@@ -8,7 +8,7 @@
8
8
  # Secrets required (repository or environment secrets):
9
9
  # SUI_PRIV_TESTNET / SUI_PRIV_MAINNET — bech32 suiprivkey1… for a funded deployer key.
10
10
  # FEE_TREASURY_TESTNET / FEE_TREASURY_MAINNET — operator treasury address (fee recipient).
11
- # RPC_TESTNET / RPC_MAINNET (optional) — JSON-RPC endpoint override (public testnet is gRPC-only).
11
+ # RPC_TESTNET / RPC_MAINNET (optional) — gRPC endpoint override (defaults to the public fullnodes).
12
12
 
13
13
  name: token-deployer real-chain e2e
14
14
 
@@ -27,6 +27,15 @@ jobs:
27
27
  - name: Type-check
28
28
  run: npm run type-check
29
29
 
30
+ - name: Lint CSS (stylelint)
31
+ run: npm run lint:css --if-present
32
+
33
+ - name: Lint JS (eslint + vuejs-a11y)
34
+ run: npm run lint:js --if-present
35
+
36
+ - name: Lint HTML (html-validate)
37
+ run: npm run lint:html --if-present
38
+
30
39
  - name: Unit tests
31
40
  run: npm test
32
41
 
@@ -62,8 +62,22 @@ jobs:
62
62
  exit 0
63
63
  fi
64
64
  VERSION=$(node -p "require('./package.json').version")
65
- if npm view "@meddleware/token-deployer-ui@${VERSION}" version >/dev/null 2>&1; then
65
+ NAME=$(node -p "require('./package.json').name")
66
+ ENC=$(printf '%s' "$NAME" | sed 's#/#%2f#')
67
+ # Check the registry directly — `npm view` can transiently miss a freshly
68
+ # first-published version and then attempt a re-publish. A 200 means it's live.
69
+ if [ "$(curl -s -o /dev/null -w '%{http_code}' "https://registry.npmjs.org/${ENC}/${VERSION}")" = "200" ]; then
66
70
  echo "::notice::v${VERSION} already published to npmjs — skipping."
67
71
  else
68
- npm publish
72
+ # Publish, but treat a "version already exists" error as success so a
73
+ # manually-published version (or a registry race) leaves the job green.
74
+ set +e; OUT=$(npm publish 2>&1); RC=$?; set -e
75
+ printf '%s\n' "$OUT"
76
+ if [ "$RC" -ne 0 ]; then
77
+ if printf '%s' "$OUT" | grep -qiE 'cannot publish over|previously published|EPUBLISHCONFLICT'; then
78
+ echo "::notice::v${VERSION} already published — treating as success."
79
+ else
80
+ exit "$RC"
81
+ fi
82
+ fi
69
83
  fi
@@ -0,0 +1,30 @@
1
+ // html-validate over the Vue SFC templates (via html-validate-vue): checks element nesting and
2
+ // content models (e.g. no <p> inside <ul>, no button inside a label) on top of the eslint a11y gate.
3
+ export default {
4
+ plugins: ['html-validate-vue'],
5
+ extends: ['html-validate:recommended', 'html-validate-vue:recommended'],
6
+ elements: [
7
+ 'html5',
8
+ // @meddleware/ui components that render a single native element, described to the validator so
9
+ // content models / form rules see through them (keys are lowercased tag names).
10
+ {
11
+ uibutton: { inherit: 'button' },
12
+ uitoolbarbutton: { inherit: 'button' },
13
+ uiselect: { inherit: 'select' },
14
+ uinotice: { inherit: 'p' },
15
+ },
16
+ ],
17
+ transform: {
18
+ '^.*\\.vue$': 'html-validate-vue',
19
+ },
20
+ rules: {
21
+ // Vue components are written in PascalCase (<UiStatusDot>, <KeepAlive>).
22
+ 'element-case': ['error', { style: ['lowercase', 'pascalcase'] }],
23
+ 'element-name': ['error', { pattern: '^(?:[a-z][a-z0-9\\-._]*-[a-z0-9\\-._]*|[A-Z][A-Za-z0-9]*)$' }],
24
+ // role="list" on styled lists is a deliberate Safari/VoiceOver workaround: WebKit drops list
25
+ // semantics when list-style is removed, so the explicit role must stay (matches the eslint
26
+ // vuejs-accessibility/no-redundant-roles override).
27
+ 'no-redundant-role': 'off',
28
+ 'prefer-native-element': ['error', { exclude: ['list'] }],
29
+ },
30
+ }
package/CLAUDE.md CHANGED
@@ -27,11 +27,18 @@ The pattern mirrors `@meddleware/walrus-ui`, `@meddleware/seal-ui`, and
27
27
  must **not** render its own wallet bar, header, or footer when embedded.
28
28
 
29
29
  **Deploy executor note:** The wallet-adapter `Executor` only returns `{ digest }` — insufficient
30
- for the deploy flow, which requires `objectChanges` to extract the packageId, coin type,
31
- TreasuryCap, and MetadataCap. `src/lib/deployExecutor.ts` uses the wallet-adapter singleton for
32
- wallet connection state, but builds its own `SuiJsonRpcClient` (`@mysten/sui/jsonRpc`) to execute
33
- with `showEffects + showObjectChanges`. This is intentional — do not replace it with the
34
- wallet-adapter `buildExecutor`.
30
+ for the deploy flow, which requires the created objects to extract the packageId, coin type,
31
+ TreasuryCap, MetadataCap and the Currency ref. `src/lib/deployExecutor.ts` uses the wallet-adapter
32
+ singleton for wallet connection state, but executes through the app's own `SuiGrpcClient`
33
+ (`getReadClient`) with `include: { effects, objectTypes }`, and `toSuiTxResult` (`src/lib/deploy.ts`)
34
+ maps `effects.changedObjects` onto the `objectChanges` shape `extractPublishResult` reads. This is
35
+ intentional — do not replace it with the wallet-adapter `buildExecutor`.
36
+
37
+ **gRPC only.** Public fullnodes have deprecated JSON-RPC; every chain call (app and `scripts/`)
38
+ goes through `SuiGrpcClient`, and `VITE_RPC_*` / `E2E_RPC` must be gRPC(-web) endpoints. Do not
39
+ reintroduce `@mysten/sui/jsonRpc`. gRPC may render framework addresses in long form
40
+ (`0x000…02::coin::…`) — match types tolerantly. E2E builds (`VITE_E2E=1`) inject a stub client via
41
+ `setReadClient` because gRPC-web responses cannot be faked at the `fetch` layer.
35
42
 
36
43
  ## Architecture (the money/parity paths matter most)
37
44
 
@@ -49,7 +56,7 @@ wallet-adapter `buildExecutor`.
49
56
  - **Orchestration** — [src/lib/deploy.ts](src/lib/deploy.ts) sequences patch →
50
57
  publish → wait → (finalize) via an injectable `Executor` (so it is unit-testable;
51
58
  the real one is built from the wallet in
52
- [src/composables/useWallet.ts](src/composables/useWallet.ts)).
59
+ [src/lib/deployExecutor.ts](src/lib/deployExecutor.ts)).
53
60
  - **Package generation** — [src/lib/generatePackage.ts](src/lib/generatePackage.ts)
54
61
  substitutes the same inputs into the canonical template text
55
62
  ([src/template-src/files.json](src/template-src/files.json)) and zips it.
@@ -105,7 +112,7 @@ the relay source `crates/walrus-upload-relay`.)
105
112
  - **NFT / usage-ticket per-wallet gating is IMPLEMENTED (2026-08-05)** via the standalone
106
113
  `nft-gate` project: an `nft-gate` gateway fronts the operator relay and admits only
107
114
  holders of an `access_gate` NFT. The app gates the operator-relay option on ownership
108
- (`useAccessGate` → `getOwnedObjects`), offers a permissionless purchase CTA, and attaches
115
+ (`useAccessGate` → `listOwnedObjects`), offers a permissionless purchase CTA, and attaches
109
116
  a wallet-signed access proof (`sui:signPersonalMessage` → `uploadRelayAuthToken`) when the
110
117
  operator relay is used. Unset `VITE_ACCESS_GATE_*` → no gating (unchanged behaviour). The
111
118
  tip and the NFT are **independent levers** (tip = per-upload cost; NFT = access/abuse).
package/Dockerfile CHANGED
@@ -18,7 +18,7 @@
18
18
  # VITE_WALRUS_RELAY_MAINNET — operator relay URL for mainnet (optional)
19
19
  # VITE_WALRUS_RPC_TESTNET — gRPC fullnode for Walrus testnet (optional)
20
20
  # VITE_WALRUS_RPC_MAINNET — gRPC fullnode for Walrus mainnet (optional)
21
- # VITE_RPC_TESTNET / VITE_RPC_MAINNET — override JSON-RPC fullnode URLs (optional)
21
+ # VITE_RPC_TESTNET / VITE_RPC_MAINNET — override gRPC fullnode URLs (optional)
22
22
  # VITE_ACCESS_GATE_ID_{NET} — operator's Gate shared object ID (optional)
23
23
  # VITE_ACCESS_GATE_NFT_TYPE_{NET} — access NFT type (optional)
24
24
  # VITE_ACCESS_GATE_SOULBOUND_{NET} — "true" if soulbound (optional)
package/LICENSE CHANGED
@@ -1,121 +1,14 @@
1
- Creative Commons Legal Code
1
+ BSD Zero Clause License
2
2
 
3
- CC0 1.0 Universal
3
+ Copyright (c) 2026 MeddleWare
4
4
 
5
- CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE
6
- LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN
7
- ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS
8
- INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES
9
- REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS
10
- PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM
11
- THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED
12
- HEREUNDER.
5
+ Permission to use, copy, modify, and/or distribute this software for any
6
+ purpose with or without fee is hereby granted.
13
7
 
14
- Statement of Purpose
15
-
16
- The laws of most jurisdictions throughout the world automatically confer
17
- exclusive Copyright and Related Rights (defined below) upon the creator
18
- and subsequent owner(s) (each and all, an "owner") of an original work of
19
- authorship and/or a database (each, a "Work").
20
-
21
- Certain owners wish to permanently relinquish those rights to a Work for
22
- the purpose of contributing to a commons of creative, cultural and
23
- scientific works ("Commons") that the public can reliably and without fear
24
- of later claims of infringement build upon, modify, incorporate in other
25
- works, reuse and redistribute as freely as possible in any form whatsoever
26
- and for any purposes, including without limitation commercial purposes.
27
- These owners may contribute to the Commons to promote the ideal of a free
28
- culture and the further production of creative, cultural and scientific
29
- works, or to gain reputation or greater distribution for their Work in
30
- part through the use and efforts of others.
31
-
32
- For these and/or other purposes and motivations, and without any
33
- expectation of additional consideration or compensation, the person
34
- associating CC0 with a Work (the "Affirmer"), to the extent that he or she
35
- is an owner of Copyright and Related Rights in the Work, voluntarily
36
- elects to apply CC0 to the Work and publicly distribute the Work under its
37
- terms, with knowledge of his or her Copyright and Related Rights in the
38
- Work and the meaning and intended legal effect of CC0 on those rights.
39
-
40
- 1. Copyright and Related Rights. A Work made available under CC0 may be
41
- protected by copyright and related or neighboring rights ("Copyright and
42
- Related Rights"). Copyright and Related Rights include, but are not
43
- limited to, the following:
44
-
45
- i. the right to reproduce, adapt, distribute, perform, display,
46
- communicate, and translate a Work;
47
- ii. moral rights retained by the original author(s) and/or performer(s);
48
- iii. publicity and privacy rights pertaining to a person's image or
49
- likeness depicted in a Work;
50
- iv. rights protecting against unfair competition in regards to a Work,
51
- subject to the limitations in paragraph 4(a), below;
52
- v. rights protecting the extraction, dissemination, use and reuse of data
53
- in a Work;
54
- vi. database rights (such as those arising under Directive 96/9/EC of the
55
- European Parliament and of the Council of 11 March 1996 on the legal
56
- protection of databases, and under any national implementation
57
- thereof, including any amended or successor version of such
58
- directive); and
59
- vii. other similar, equivalent or corresponding rights throughout the
60
- world based on applicable law or treaty, and any national
61
- implementations thereof.
62
-
63
- 2. Waiver. To the greatest extent permitted by, but not in contravention
64
- of, applicable law, Affirmer hereby overtly, fully, permanently,
65
- irrevocably and unconditionally waives, abandons, and surrenders all of
66
- Affirmer's Copyright and Related Rights and associated claims and causes
67
- of action, whether now known or unknown (including existing as well as
68
- future claims and causes of action), in the Work (i) in all territories
69
- worldwide, (ii) for the maximum duration provided by applicable law or
70
- treaty (including future time extensions), (iii) in any current or future
71
- medium and for any number of copies, and (iv) for any purpose whatsoever,
72
- including without limitation commercial, advertising or promotional
73
- purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each
74
- member of the public at large and to the detriment of Affirmer's heirs and
75
- successors, fully intending that such Waiver shall not be subject to
76
- revocation, rescission, cancellation, termination, or any other legal or
77
- equitable action to disrupt the quiet enjoyment of the Work by the public
78
- as contemplated by Affirmer's express Statement of Purpose.
79
-
80
- 3. Public License Fallback. Should any part of the Waiver for any reason
81
- be judged legally invalid or ineffective under applicable law, then the
82
- Waiver shall be preserved to the maximum extent permitted taking into
83
- account Affirmer's express Statement of Purpose. In addition, to the
84
- extent the Waiver is so judged Affirmer hereby grants to each affected
85
- person a royalty-free, non transferable, non sublicensable, non exclusive,
86
- irrevocable and unconditional license to exercise Affirmer's Copyright and
87
- Related Rights in the Work (i) in all territories worldwide, (ii) for the
88
- maximum duration provided by applicable law or treaty (including future
89
- time extensions), (iii) in any current or future medium and for any number
90
- of copies, and (iv) for any purpose whatsoever, including without
91
- limitation commercial, advertising or promotional purposes (the
92
- "License"). The License shall be deemed effective as of the date CC0 was
93
- applied by Affirmer to the Work. Should any part of the License for any
94
- reason be judged legally invalid or ineffective under applicable law, such
95
- partial invalidity or ineffectiveness shall not invalidate the remainder
96
- of the License, and in such case Affirmer hereby affirms that he or she
97
- will not (i) exercise any of his or her remaining Copyright and Related
98
- Rights in the Work or (ii) assert any associated claims and causes of
99
- action with respect to the Work, in either case contrary to Affirmer's
100
- express Statement of Purpose.
101
-
102
- 4. Limitations and Disclaimers.
103
-
104
- a. No trademark or patent rights held by Affirmer are waived, abandoned,
105
- surrendered, licensed or otherwise affected by this document.
106
- b. Affirmer offers the Work as-is and makes no representations or
107
- warranties of any kind concerning the Work, express, implied,
108
- statutory or otherwise, including without limitation warranties of
109
- title, merchantability, fitness for a particular purpose, non
110
- infringement, or the absence of latent or other defects, accuracy, or
111
- the present or absence of errors, whether or not discoverable, all to
112
- the greatest extent permissible under applicable law.
113
- c. Affirmer disclaims responsibility for clearing rights of other persons
114
- that may apply to the Work or any use thereof, including without
115
- limitation any person's Copyright and Related Rights in the Work.
116
- Further, Affirmer disclaims responsibility for obtaining any necessary
117
- consents, permissions or other rights required for any use of the
118
- Work.
119
- d. Affirmer understands and acknowledges that Creative Commons is not a
120
- party to this document and has no duty or obligation with respect to
121
- this CC0 or use of the Work.
8
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
9
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
10
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
11
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
12
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
13
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
14
+ PERFORMANCE OF THIS SOFTWARE.
package/README.md CHANGED
@@ -68,9 +68,9 @@ host dashboard. See [.env.example](.env.example) for the full list.
68
68
  | --- | --- | --- |
69
69
  | `VITE_FEE_TREASURY_TESTNET` / `_MAINNET` | Operator treasury that receives the fee. **A production build fails if either is the zero address** (bypass with `VITE_ALLOW_UNSET_TREASURY=1`). | committed operator address |
70
70
  | `VITE_FEE_MIST` | Flat fee split from the user's gas coin. | `1000000000` (1 SUI) |
71
- | `VITE_RPC_TESTNET` / `_MAINNET` | JSON-RPC endpoint (set a paid RPC for production). | public endpoints |
71
+ | `VITE_RPC_TESTNET` / `_MAINNET` | gRPC fullnode endpoint (set a paid RPC for production). JSON-RPC-only endpoints do not work. | public fullnodes |
72
72
  | `VITE_PUBLISH_GAS_BUDGET` | Publish gas budget (MIST). | `500000000` |
73
- | `VITE_PUBLIC_URL` | Site origin for canonical/OG/JSON-LD URLs. | `https://tokens.meddleware.co.uk` |
73
+ | `VITE_PUBLIC_URL` | Site origin (no trailing slash) for the canonical URL and Open Graph tags in `index.html`. | `https://sui-token-deployer.meddleware.co.uk` (`.env.production`) |
74
74
  | `VITE_WALRUS_RELAY_TESTNET` / `_MAINNET` | Your own upload relay (to collect the tip). Unset → public Mysten relay (earns nothing). | public relay |
75
75
  | `VITE_WALRUS_MAX_TIP_MIST` | Client-side max relay tip. **Must exceed your relay's tip** or uploads fail. | `50000000` (0.05 SUI) |
76
76
  | `VITE_ICON_MAX_BYTES` / `VITE_ICON_ALLOWED_TYPES` | Client icon size/type gate (UX only). | `102400` / PNG,JPEG,WebP,SVG |
@@ -192,7 +192,7 @@ testnet mode with the RPC pointed at the local node).
192
192
  | `SUI_PRIV` | bech32 `suiprivkey1…` for a **funded** deployer key. Export the CLI key: `sui keytool export --key-identity <addr>`. Never faucet-funded on a real network. |
193
193
  | `VITE_FEE_TREASURY_TESTNET` / `_MAINNET` | Operator treasury baked into the build (already set in `.env.production`). The build fails if it is the zero address. |
194
194
  | `E2E_FEE_ADDR` | The treasury to watch for the fee-delta assertion — set it equal to the built treasury. If unset, the fee check is skipped (the app still charges the fee). |
195
- | `VITE_RPC_TESTNET` / `_MAINNET` and `E2E_RPC` | JSON-RPC endpoint for the build (browser) and the node-side verifier. Use a JSON-RPC-capable endpoint — the official testnet fullnode is gRPC-only. |
195
+ | `VITE_RPC_TESTNET` / `_MAINNET` and `E2E_RPC` | gRPC endpoint for the build (browser) and the node-side verifier. Defaults to the public fullnodes. |
196
196
  | `E2E_MAINNET_CONFIRM=1` | **Mainnet only.** Without it the mainnet runner aborts cleanly (fail-safe default) so it can never publish by accident. |
197
197
 
198
198
  A full fee-charging run needs the key to hold **≥ gas + fee** (~0.5 SUI gas + 1 SUI fee = ~1.5 SUI).
@@ -203,8 +203,6 @@ Example (testnet):
203
203
 
204
204
  ```bash
205
205
  export SUI_PRIV="$(sui keytool export --key-identity 0xYOURADDR --json | jq -r .exportedPrivateKey)"
206
- VITE_RPC_TESTNET=https://sui-testnet-rpc.publicnode.com \
207
- E2E_RPC=https://sui-testnet-rpc.publicnode.com \
208
206
  VITE_FEE_TREASURY_TESTNET=0xYOURTREASURY \
209
207
  E2E_FEE_ADDR=0xYOURTREASURY \
210
208
  npm run e2e:testnet
@@ -0,0 +1,63 @@
1
+ import { globalIgnores } from 'eslint/config'
2
+ import { defineConfigWithVueTs, vueTsConfigs } from '@vue/eslint-config-typescript'
3
+ import pluginVue from 'eslint-plugin-vue'
4
+ import pluginA11y from 'eslint-plugin-vuejs-accessibility'
5
+
6
+ // Flat ESLint config: layers vue-a11y (WAI-ARIA linting for templates) on top of
7
+ // the standard Vue + TypeScript recommended rules, so accessibility regressions
8
+ // are caught in CI.
9
+ export default defineConfigWithVueTs(
10
+ {
11
+ name: 'token-deployer-ui/files-to-lint',
12
+ files: ['**/*.{vue,ts,mts,tsx}'],
13
+ },
14
+
15
+ globalIgnores(['**/dist/**', '**/coverage/**', '**/*.d.ts', 'docs/api/**']),
16
+
17
+ ...pluginVue.configs['flat/essential'],
18
+ ...pluginA11y.configs['flat/recommended'],
19
+ vueTsConfigs.recommended,
20
+
21
+ {
22
+ name: 'token-deployer-ui/overrides',
23
+ rules: {
24
+ // Accept both valid label-association patterns: a label wrapping its
25
+ // control (nesting) or a label[for] pointing at a control[id]. UiSelect renders a native
26
+ // <select>, so a label nesting it is labelling a control.
27
+ 'vuejs-accessibility/label-has-for': [
28
+ 'error',
29
+ { required: { some: ['nesting', 'id'] }, controlComponents: ['UiSelect'] },
30
+ ],
31
+ // UiFormField renders the <label for> for the control in its default slot.
32
+ 'vuejs-accessibility/form-control-has-label': ['error', { labelComponents: ['UiFormField'] }],
33
+ // role="list" on styled lists is a deliberate Safari/VoiceOver workaround: WebKit drops
34
+ // list semantics when list-style is removed, so the explicit role stays.
35
+ 'vuejs-accessibility/no-redundant-roles': 'off',
36
+ // Underscore-prefixed args/vars are an intentional "unused" marker.
37
+ '@typescript-eslint/no-unused-vars': [
38
+ 'error',
39
+ { argsIgnorePattern: '^_', varsIgnorePattern: '^_' },
40
+ ],
41
+ },
42
+ },
43
+
44
+ {
45
+ // Tests use deliberately loose typing for mocks/stubs.
46
+ name: 'token-deployer-ui/test-overrides',
47
+ files: ['**/*.{test,spec}.{ts,tsx}', 'tests/**', 'e2e/**'],
48
+ rules: {
49
+ '@typescript-eslint/no-explicit-any': 'off',
50
+ },
51
+ },
52
+
53
+ {
54
+ // ConfigForm intentionally edits a parent-owned reactive FormModel in place
55
+ // (the parent passes `:form` and reads the same object back). Converting to
56
+ // defineModel is deferred; the in-place mutation is the current contract.
57
+ name: 'token-deployer-ui/config-form',
58
+ files: ['src/components/ConfigForm.vue'],
59
+ rules: {
60
+ 'vue/no-mutating-props': 'off',
61
+ },
62
+ },
63
+ )
package/index.html CHANGED
@@ -2,9 +2,18 @@
2
2
  <html lang="en">
3
3
  <head>
4
4
  <meta charset="UTF-8">
5
- <link rel="icon" href="/favicon.ico">
5
+ <link rel="icon" href="/favicon.svg" type="image/svg+xml">
6
+ <link rel="icon" href="/favicon.ico" sizes="any">
6
7
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
- <title>Vite App</title>
8
+ <title>Token Deployer · MeddleWare</title>
9
+ <meta name="description" content="Create your own Sui coin in the browser — your wallet signs and pays gas, nothing is compiled or signed on a server, and you keep the full, verifiable source package.">
10
+ <link rel="canonical" href="%VITE_PUBLIC_URL%/">
11
+ <meta property="og:type" content="website">
12
+ <meta property="og:title" content="Token Deployer · MeddleWare">
13
+ <meta property="og:description" content="Create your own Sui coin in the browser — no server, no custody, full source included.">
14
+ <meta property="og:url" content="%VITE_PUBLIC_URL%/">
15
+ <meta property="og:image" content="%VITE_PUBLIC_URL%/og-image.png">
16
+ <meta name="twitter:card" content="summary_large_image">
8
17
  </head>
9
18
  <body>
10
19
  <div id="app"></div>
package/package.json CHANGED
@@ -1,7 +1,8 @@
1
1
  {
2
2
  "name": "@meddleware/token-deployer-ui",
3
- "version": "0.0.8",
3
+ "version": "0.0.10",
4
4
  "type": "module",
5
+ "license": "0BSD",
5
6
  "exports": {
6
7
  ".": {
7
8
  "default": "./src/index.ts"
@@ -25,22 +26,25 @@
25
26
  "e2e:localnet": "VITE_RPC_TESTNET=${VITE_RPC_TESTNET:-http://127.0.0.1:9000} VITE_FEE_TREASURY_TESTNET=${VITE_FEE_TREASURY_TESTNET:-0xfee0000000000000000000000000000000000000000000000000000000000000} vite build && start-server-and-test preview http://localhost:4173 'E2E_NETWORK=localnet node scripts/e2e-deploy.mjs'",
26
27
  "e2e:testnet": "vite build && start-server-and-test preview http://localhost:4173 'E2E_NETWORK=testnet node scripts/e2e-deploy.mjs'",
27
28
  "e2e:mainnet": "vite build && start-server-and-test preview http://localhost:4173 'E2E_NETWORK=mainnet node scripts/e2e-deploy.mjs'",
28
- "lint": "oxlint . --fix",
29
+ "lint": "npm run lint:css && npm run lint:js && npm run lint:html",
29
30
  "format": "oxfmt src/",
30
31
  "docs": "typedoc",
31
32
  "regen:template": "bash scripts/regen-template.sh",
32
33
  "sync:template": "bash scripts/sync-template-src.sh",
33
34
  "gen:og-image": "node scripts/gen-og-image.mjs",
34
- "verify:template": "node scripts/verify-bytecode.mjs && vitest run tests/templateArtifact.test.ts tests/templateParity.test.ts"
35
+ "verify:template": "node scripts/verify-bytecode.mjs && vitest run tests/templateArtifact.test.ts tests/templateParity.test.ts",
36
+ "lint:css": "stylelint \"src/**/*.{css,vue}\"",
37
+ "lint:js": "eslint .",
38
+ "lint:html": "html-validate \"src/**/*.vue\""
35
39
  },
36
40
  "dependencies": {
37
- "@meddleware/design-tokens": "^0.1.6",
38
- "@meddleware/ui": "^0.1.27",
39
- "@meddleware/wallet-adapter": "^0.0.8",
40
- "@meddleware/walrus-relay": "^0.1.17",
41
+ "@meddleware/design-tokens": "^0.1.7",
42
+ "@meddleware/ui": "^0.1.28",
43
+ "@meddleware/wallet-adapter": "^0.0.10",
44
+ "@meddleware/walrus-relay": "^0.1.19",
41
45
  "@mysten/bcs": "~2.1.0",
42
46
  "@mysten/move-bytecode-template": "~0.4.0",
43
- "@mysten/sui": "^2.31.0",
47
+ "@mysten/sui": "^2.33.1",
44
48
  "@mysten/walrus": "~1.2.0",
45
49
  "fflate": "^0.8.3",
46
50
  "vue": "^3.5.0"
@@ -51,23 +55,41 @@
51
55
  "@vitejs/plugin-vue": "^6.0.8",
52
56
  "@vitejs/plugin-vue-jsx": "^5.1.6",
53
57
  "@vitest/eslint-plugin": "^1.6.23",
58
+ "@vue/eslint-config-typescript": "^14.9.0",
54
59
  "@vue/test-utils": "^2.4.0",
60
+ "autoprefixer": "^10.4.20",
61
+ "eslint": "^10.11.0",
62
+ "eslint-plugin-vue": "^10.11.1",
63
+ "eslint-plugin-vuejs-accessibility": "^2.6.0",
64
+ "html-validate": "^11.16.1",
65
+ "html-validate-vue": "^9.3.1",
66
+ "jiti": "^2.7.0",
55
67
  "jsdom": "^29.1.1",
56
68
  "oxfmt": "^0.59.0",
57
69
  "oxlint": "~1.76.0",
58
70
  "playwright": "^1.62.0",
71
+ "postcss": "^8.4.49",
72
+ "postcss-html": "^2.0.0",
59
73
  "start-server-and-test": "^3.0.11",
74
+ "stylelint": "^17.15.0",
75
+ "stylelint-config-standard": "^40.0.0",
60
76
  "typedoc": "^0.28.20",
61
77
  "typescript": "~6.0.0",
62
78
  "vite": "^8.1.5",
63
79
  "vite-plugin-vue-devtools": "^8.1.5",
64
80
  "vitest": "^4.1.10",
81
+ "vue-eslint-parser": "^10.4.1",
65
82
  "vue-tsc": "~3.3.0"
66
83
  },
67
84
  "optionalDependencies": {
68
- "@meddleware/sui-token-template": "^1.0.1"
85
+ "@meddleware/sui-token-template": "^1.0.5"
69
86
  },
70
87
  "engines": {
71
88
  "node": "^22.18.0 || >=24.12.0"
72
- }
89
+ },
90
+ "browserslist": [
91
+ "> 0.5%",
92
+ "last 2 versions",
93
+ "not dead"
94
+ ]
73
95
  }
@@ -0,0 +1,8 @@
1
+ // Autoprefixer runs over the library's shipped CSS (base.css) during `vite build`,
2
+ // using the `browserslist` field in package.json as the target. Consumers therefore
3
+ // receive vendor-prefixed component CSS without needing their own prefixing step.
4
+ import autoprefixer from 'autoprefixer'
5
+
6
+ export default {
7
+ plugins: [autoprefixer()],
8
+ }
Binary file
package/public/robots.txt CHANGED
@@ -1,3 +1,3 @@
1
1
  User-agent: *
2
2
  Allow: /
3
- Sitemap: https://tokens.meddleware.co.uk/sitemap.xml
3
+ Sitemap: https://sui-token-deployer.meddleware.co.uk/sitemap.xml
@@ -1,7 +1,7 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
2
  <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
3
3
  <url>
4
- <loc>https://tokens.meddleware.co.uk/</loc>
4
+ <loc>https://sui-token-deployer.meddleware.co.uk/</loc>
5
5
  <changefreq>monthly</changefreq>
6
6
  <priority>1.0</priority>
7
7
  </url>