@mysten-incubation/dev-wallet 0.2.0 → 0.3.0
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/CHANGELOG.md +114 -0
- package/dist/adapters/devstack-paths.d.mts +0 -1
- package/dist/adapters/devstack-paths.d.mts.map +1 -1
- package/dist/adapters/devstack-paths.mjs +1 -2
- package/dist/adapters/devstack-paths.mjs.map +1 -1
- package/package.json +1 -1
- package/src/adapters/devstack-paths.ts +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,119 @@
|
|
|
1
1
|
# @mysten-incubation/dev-wallet
|
|
2
2
|
|
|
3
|
+
## 0.3.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- b6af6d2: Devstack: thorough-review remediation pass plus follow-up cleanup round.
|
|
8
|
+
|
|
9
|
+
Highlights:
|
|
10
|
+
- `runStack({ layers })` replaced by `runStack({ extendContext })`. Custom context extension now
|
|
11
|
+
goes through a typed seam.
|
|
12
|
+
- `executeSuiTx` returns a discriminated union (`$kind: 'ExecutedSuccess' | 'ExecutedFailure'`).
|
|
13
|
+
On-chain failure is a value, not an error. Plugins that previously caught the failure-tag in the
|
|
14
|
+
error channel must dispatch on `$kind` instead.
|
|
15
|
+
- New substrate helper `signAndDispatch` compacts the
|
|
16
|
+
`withTransactionSigner → build → sign → execute → $kind dispatch` pattern across five publisher
|
|
17
|
+
plugins.
|
|
18
|
+
- Supervisor module (1.8k LOC) split into 11 per-concern modules under
|
|
19
|
+
`substrate/runtime/supervisor/`. No behavior change.
|
|
20
|
+
- New `built-in-plugin-layers.ts` lives in `orchestrators/`, not `runtime/` — `run.ts` lifted into
|
|
21
|
+
`orchestrators/` similarly. Layer composition now lives at L3 only.
|
|
22
|
+
- New L0 helper `routed-url.ts` for `renderUrl`/`routedHostname`; L3 router/hostname.ts retained
|
|
23
|
+
as an intra-L3 adapter.
|
|
24
|
+
- Docker image builds now stamp ownership labels (`expectedImageOwnershipLabels`); prune can reach
|
|
25
|
+
previously-unlabelled images. New `BuildOptions.labels` on the container-runtime contract.
|
|
26
|
+
- Sweep evicts own endpoints and surfaces remaining `ForeignNetworkHolder` rather than failing
|
|
27
|
+
silently.
|
|
28
|
+
- Per-app shared-stack pinning: `_per-app_` stacks (e.g. shared chain-build cache) are pinned
|
|
29
|
+
while any app sibling is live.
|
|
30
|
+
- `atomicWriteFile` cleanup is now whole-pipeline (open/write/fsync/rename) via `Effect.onError`,
|
|
31
|
+
not rename-only.
|
|
32
|
+
- `cross-process-lock` typed errors: `StackLockTimeoutError | StackLockIoError` in the E channel;
|
|
33
|
+
no more `Effect.orDie`.
|
|
34
|
+
- Plugin-domain span/log keys namespaced via per-plugin `spans.ts` files.
|
|
35
|
+
- `ChainOperation` typed seam removed (zero plugin adoption signal); `ClientWithCoreApi` is the
|
|
36
|
+
sanctioned SDK cast at plugin boundaries.
|
|
37
|
+
- ARCHITECTURE.md / STYLE_GUIDE.md rewritten to describe current state (537→308, 894→477 lines).
|
|
38
|
+
- New style-enforcement tests: `l4-boundary`, `no-unknown-as` (globs every plugin barrel),
|
|
39
|
+
`plugin-boundary`, `span-attr-namespace`, `substrate/name-blindness`.
|
|
40
|
+
|
|
41
|
+
Dead-code purge and substrate race fixes:
|
|
42
|
+
- Orphan modules removed (no consumers): `orchestrators/codegen/extras.ts` (inlined into
|
|
43
|
+
`runtime-composition.ts`); `plugins/deepbook/routable.ts` + the `DEEPBOOK_ENTRYPOINTS`
|
|
44
|
+
aggregation; `plugins/sui/live-faucet-strategy.ts` (`suiLiveStrategy`, `LIVE_FAUCET_URLS`,
|
|
45
|
+
`SuiLiveNetwork`, `SuiLiveStrategyOptions`); `plugins/sui/seed-objects.ts`
|
|
46
|
+
(`SeedObjectsAccumulator`, `makeSeedObjectsAccumulator`, `SEED_OBJECTS_CAPABILITY_KEY`). The sui
|
|
47
|
+
plugin's emitted-capability count drops from 5 to 4.
|
|
48
|
+
- `plugins/walrus/faucet-strategy.ts`: `makeWalFaucetContribution` removed;
|
|
49
|
+
`makeWalFaucetStrategy` unaffected.
|
|
50
|
+
- `orchestrators/router/index.ts`: unused `STATIC_PROVIDER_FILENAME` export removed.
|
|
51
|
+
- `plugins/sui/fork-orchestration.ts`: `ForkGuardedSdk<Sdk>` derived type alias removed;
|
|
52
|
+
`wrapWithForkGuard` now returns `Sdk` directly (behavior identical).
|
|
53
|
+
- Capability-sink registration race fixed: install + finalizer wrapped in `Effect.uninterruptible`
|
|
54
|
+
so an interrupt between `Ref.modify` and `addFinalizer` cannot leak the sink past scope close.
|
|
55
|
+
- Cross-process command channel short-read fix: `readSync` may short-return on NFS / cross-FS;
|
|
56
|
+
offset advances by `bytesRead` rather than the requested length, with a clean bail on
|
|
57
|
+
`bytesRead <= 0`.
|
|
58
|
+
- Cross-process roster PID-recycle hazard fixed: `heartbeat` / `release` / `setIntent` now match
|
|
59
|
+
holders via `(pid, hostname, startTime)` triple via a new `isOwnEntry` helper (was matching
|
|
60
|
+
`(pid, hostname)` only).
|
|
61
|
+
- Background snapshot interrupt now awaits via `Fiber.interrupt(fiber)` (was fire-and-forget
|
|
62
|
+
`fiber.interruptUnsafe()`) so a follow-up capture can't start while the previous fiber is still
|
|
63
|
+
inside `pauseAndCommit` / `saveImages`.
|
|
64
|
+
- CLI restructure: `cli/main.ts` (1338 LOC) split into per-verb wirings under
|
|
65
|
+
`cli/wirings/{up,apply,snapshot,wipe,prune}.ts` plus shared `build-verb-layers.ts` /
|
|
66
|
+
`identity.ts` / `config-loader.ts` helpers. `main.ts` is now argv → identity → deps → dispatch
|
|
67
|
+
only (~290 LOC).
|
|
68
|
+
- Cross-process command-channel `ack` / `error` records gain an optional `payload: unknown` field
|
|
69
|
+
plumbed through `awaitCompletion`. `snapshot.capture` now carries the captured metadata (or
|
|
70
|
+
failure summary / skipped reason) on the reply directly — the CLI no longer tail-fibers
|
|
71
|
+
`events.ndjson` for the completion event.
|
|
72
|
+
- Repo-wide Prettier reformat.
|
|
73
|
+
|
|
74
|
+
User-visible behavior changes (minor-bump rationale):
|
|
75
|
+
- **Pyth types removed from the root barrel.** `PythFeed`, `PythHandle`, `PythOptions`,
|
|
76
|
+
`PythPackageMember`, and `PythPriceFeedId` no longer re-export from
|
|
77
|
+
`@mysten-incubation/devstack`. They remain reachable via the `DeepbookLocalOptions.pyth` field
|
|
78
|
+
chain. The value helpers (`pythPriceFeedId`, `DEEP_PRICE_FEED_ID`, `SUI_PRICE_FEED_ID`,
|
|
79
|
+
`USDC_PRICE_FEED_ID`) are kept because `examples/deepbook-trader/devstack.config.ts` is the
|
|
80
|
+
market-maker case the architecture permits.
|
|
81
|
+
- **Postgres password format changed.** `derivePassword(app, stack, stackRoot)` now incorporates
|
|
82
|
+
the stack's on-disk runtime root and an sha256 short hash. Existing dev databases created
|
|
83
|
+
against the previous `pg-${app+stack}` format will fail to authenticate on first `pg_isready`
|
|
84
|
+
probe. Either delete the existing container (`docker rm -f`) and let devstack recreate it, OR
|
|
85
|
+
set `password` explicitly on `PostgresServiceOptions` for stable credentials across the upgrade.
|
|
86
|
+
Multi-checkout shells of the same `(app, stack)` now derive distinct passwords by design.
|
|
87
|
+
- **CLI argv-parse failures now exit with code 64 (`USAGE`), not 1 (`GENERIC`).** Tests / CI
|
|
88
|
+
scripts that pattern-match exit codes for "user error vs internal error" should treat 64 the
|
|
89
|
+
same way they treat the `--help` exit code. `--json` mode now also emits a structured envelope
|
|
90
|
+
for these failures instead of plain stderr.
|
|
91
|
+
- **`DevstackOptions.stateDir` is now honored.** The field was declared on the type but silently
|
|
92
|
+
ignored by `runStack` (only `runtimeRoot` was read). Programs that set
|
|
93
|
+
`defineDevstack({ stateDir })` previously had no effect; they now do.
|
|
94
|
+
- **CLI now honors `config.options.stateDir` / `defineDevstack({ stateDir })`.** The `devstack`
|
|
95
|
+
CLI loads the config best-effort before resolving identity and feeds its `stateDir` into the
|
|
96
|
+
runtime-root ladder. Precedence: `--state-dir` flag > `config.options.stateDir` >
|
|
97
|
+
`$DEVSTACK_STATE_DIR` > `<cwd>/.devstack`. The `--state-dir` flag still wins, and no-config
|
|
98
|
+
verbs (`prune`, `wipe`) keep resolving without a config.
|
|
99
|
+
- **`setNetworkEnv` now save/restores `process.env.DEVSTACK_NETWORK`.** In-process CLI invocations
|
|
100
|
+
(tests, embedded use) no longer leak `--network` env state into subsequent calls. Single-process
|
|
101
|
+
CLI semantics are unchanged.
|
|
102
|
+
- **`stringifyCause` renamed to `formatUnknownError`.** Plugins importing the substrate helper
|
|
103
|
+
directly need to update their import (canonical path:
|
|
104
|
+
`substrate/runtime/format-unknown-error.ts`). The function's behavior is unchanged.
|
|
105
|
+
- **Wallet endpoint constant unified.** `WALLET_ENDPOINT_ALIAS` removed; `WALLET_ENDPOINT_KEY` is
|
|
106
|
+
the single canonical name. All exports surface through the same module paths.
|
|
107
|
+
- **`EndpointEntry.wireProtocol`, `Endpoint.wireProtocol`, `ResolvedEndpoint.wireProtocol`**
|
|
108
|
+
narrowed from `'http' | 'h2c' | string` to `'http' | 'h2c' | 'tcp'`. Persisted manifests and
|
|
109
|
+
projections now reject other values at decode time. Plugins emitting custom wire protocols (none
|
|
110
|
+
ship today) would need to extend the literal union.
|
|
111
|
+
|
|
112
|
+
dev-wallet:
|
|
113
|
+
- `DEVSTACK_WALLET_HTTP_PATH.EXECUTE` removed (devstack-side `/execute` endpoint deleted; the
|
|
114
|
+
dapp-kit / dev-wallet path bypasses it and the protocol shape didn't match the Sui Wallet
|
|
115
|
+
Standard).
|
|
116
|
+
|
|
3
117
|
## 0.2.0
|
|
4
118
|
|
|
5
119
|
### Minor Changes
|
|
@@ -4,7 +4,6 @@ declare const DEVSTACK_WALLET_HTTP_PATH: {
|
|
|
4
4
|
readonly ACCOUNTS: "/api/v1/devstack/accounts";
|
|
5
5
|
readonly SIGN_TRANSACTION: "/api/v1/devstack/sign-transaction";
|
|
6
6
|
readonly SIGN_PERSONAL_MESSAGE: "/api/v1/devstack/sign-personal-message";
|
|
7
|
-
readonly EXECUTE: "/api/v1/devstack/execute";
|
|
8
7
|
};
|
|
9
8
|
type DevstackWalletHttpPathValue = (typeof DEVSTACK_WALLET_HTTP_PATH)[keyof typeof DEVSTACK_WALLET_HTTP_PATH];
|
|
10
9
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"devstack-paths.d.mts","names":[],"sources":["../../src/adapters/devstack-paths.ts"],"mappings":";cAMa,yBAAA;EAAA
|
|
1
|
+
{"version":3,"file":"devstack-paths.d.mts","names":[],"sources":["../../src/adapters/devstack-paths.ts"],"mappings":";cAMa,yBAAA;EAAA;;;;;KAOD,2BAAA,WACH,yBAAA,eAAwC,yBAAA"}
|
|
@@ -3,8 +3,7 @@ const DEVSTACK_WALLET_HTTP_PATH = {
|
|
|
3
3
|
HEALTH: "/api/v1/devstack/health",
|
|
4
4
|
ACCOUNTS: "/api/v1/devstack/accounts",
|
|
5
5
|
SIGN_TRANSACTION: "/api/v1/devstack/sign-transaction",
|
|
6
|
-
SIGN_PERSONAL_MESSAGE: "/api/v1/devstack/sign-personal-message"
|
|
7
|
-
EXECUTE: "/api/v1/devstack/execute"
|
|
6
|
+
SIGN_PERSONAL_MESSAGE: "/api/v1/devstack/sign-personal-message"
|
|
8
7
|
};
|
|
9
8
|
//#endregion
|
|
10
9
|
export { DEVSTACK_WALLET_HTTP_PATH };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"devstack-paths.mjs","names":[],"sources":["../../src/adapters/devstack-paths.ts"],"sourcesContent":["// Mirror of `packages/devstack/src/plugins/wallet/protocol.ts` `WalletHttpPath`.\n// Duplicated here rather than imported because devstack already\n// (peer-)depends on `@mysten-incubation/dev-wallet` for codegen-emitted\n// wallet glue, and adding the reverse edge would close the workspace\n// cycle and break turbo's build ordering.\n\nexport const DEVSTACK_WALLET_HTTP_PATH = {\n\tHEALTH: '/api/v1/devstack/health',\n\tACCOUNTS: '/api/v1/devstack/accounts',\n\tSIGN_TRANSACTION: '/api/v1/devstack/sign-transaction',\n\tSIGN_PERSONAL_MESSAGE: '/api/v1/devstack/sign-personal-message',\n
|
|
1
|
+
{"version":3,"file":"devstack-paths.mjs","names":[],"sources":["../../src/adapters/devstack-paths.ts"],"sourcesContent":["// Mirror of `packages/devstack/src/plugins/wallet/protocol.ts` `WalletHttpPath`.\n// Duplicated here rather than imported because devstack already\n// (peer-)depends on `@mysten-incubation/dev-wallet` for codegen-emitted\n// wallet glue, and adding the reverse edge would close the workspace\n// cycle and break turbo's build ordering.\n\nexport const DEVSTACK_WALLET_HTTP_PATH = {\n\tHEALTH: '/api/v1/devstack/health',\n\tACCOUNTS: '/api/v1/devstack/accounts',\n\tSIGN_TRANSACTION: '/api/v1/devstack/sign-transaction',\n\tSIGN_PERSONAL_MESSAGE: '/api/v1/devstack/sign-personal-message',\n} as const;\n\nexport type DevstackWalletHttpPathValue =\n\t(typeof DEVSTACK_WALLET_HTTP_PATH)[keyof typeof DEVSTACK_WALLET_HTTP_PATH];\n"],"mappings":";AAMA,MAAa,4BAA4B;CACxC,QAAQ;CACR,UAAU;CACV,kBAAkB;CAClB,uBAAuB;CACvB"}
|
package/package.json
CHANGED
|
@@ -9,7 +9,6 @@ export const DEVSTACK_WALLET_HTTP_PATH = {
|
|
|
9
9
|
ACCOUNTS: '/api/v1/devstack/accounts',
|
|
10
10
|
SIGN_TRANSACTION: '/api/v1/devstack/sign-transaction',
|
|
11
11
|
SIGN_PERSONAL_MESSAGE: '/api/v1/devstack/sign-personal-message',
|
|
12
|
-
EXECUTE: '/api/v1/devstack/execute',
|
|
13
12
|
} as const;
|
|
14
13
|
|
|
15
14
|
export type DevstackWalletHttpPathValue =
|