@mysten-incubation/dev-wallet 0.0.1 → 0.2.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.
Files changed (182) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/LICENSE +189 -0
  3. package/dist/_virtual/{_@oxc-project_runtime@0.107.0 → _@oxc-project_runtime@0.127.0}/helpers/decorate.mjs +2 -3
  4. package/dist/adapters/base-adapter.mjs +6 -7
  5. package/dist/adapters/base-adapter.mjs.map +1 -1
  6. package/dist/adapters/browser.d.mts +4 -1
  7. package/dist/adapters/browser.mjs +4 -2
  8. package/dist/adapters/build-managed-account.mjs +8 -10
  9. package/dist/adapters/build-managed-account.mjs.map +1 -1
  10. package/dist/adapters/devstack-adapter.d.mts +111 -0
  11. package/dist/adapters/devstack-adapter.d.mts.map +1 -0
  12. package/dist/adapters/devstack-adapter.mjs +224 -0
  13. package/dist/adapters/devstack-adapter.mjs.map +1 -0
  14. package/dist/adapters/devstack-paths.d.mts +12 -0
  15. package/dist/adapters/devstack-paths.d.mts.map +1 -0
  16. package/dist/adapters/devstack-paths.mjs +12 -0
  17. package/dist/adapters/devstack-paths.mjs.map +1 -0
  18. package/dist/adapters/fork-relay.d.mts +109 -0
  19. package/dist/adapters/fork-relay.d.mts.map +1 -0
  20. package/dist/adapters/fork-relay.mjs +208 -0
  21. package/dist/adapters/fork-relay.mjs.map +1 -0
  22. package/dist/adapters/idb-store.mjs +12 -16
  23. package/dist/adapters/idb-store.mjs.map +1 -1
  24. package/dist/adapters/in-memory-adapter.mjs +4 -10
  25. package/dist/adapters/in-memory-adapter.mjs.map +1 -1
  26. package/dist/adapters/passkey-adapter.mjs +4 -12
  27. package/dist/adapters/passkey-adapter.mjs.map +1 -1
  28. package/dist/adapters/remote-cli-adapter.mjs +37 -72
  29. package/dist/adapters/remote-cli-adapter.mjs.map +1 -1
  30. package/dist/adapters/webcrypto-adapter.mjs +2 -4
  31. package/dist/adapters/webcrypto-adapter.mjs.map +1 -1
  32. package/dist/bin/cli.mjs +9 -22
  33. package/dist/bin/cli.mjs.map +1 -1
  34. package/dist/client/dev-wallet-client.mjs +13 -28
  35. package/dist/client/dev-wallet-client.mjs.map +1 -1
  36. package/dist/client/index.mjs +1 -2
  37. package/dist/client/request-handler.mjs +36 -42
  38. package/dist/client/request-handler.mjs.map +1 -1
  39. package/dist/index.mjs +1 -2
  40. package/dist/react/components.d.mts +9 -9
  41. package/dist/react/components.d.mts.map +1 -1
  42. package/dist/react/components.mjs +2 -5
  43. package/dist/react/components.mjs.map +1 -1
  44. package/dist/react/context.d.mts +3 -3
  45. package/dist/react/context.d.mts.map +1 -1
  46. package/dist/react/context.mjs +3 -8
  47. package/dist/react/context.mjs.map +1 -1
  48. package/dist/react/index.mjs +1 -2
  49. package/dist/react/useDevWallet.d.mts +3 -0
  50. package/dist/react/useDevWallet.d.mts.map +1 -1
  51. package/dist/react/useDevWallet.mjs +9 -14
  52. package/dist/react/useDevWallet.mjs.map +1 -1
  53. package/dist/server/cli-signing-middleware.mjs +7 -20
  54. package/dist/server/cli-signing-middleware.mjs.map +1 -1
  55. package/dist/server/index.mjs +1 -2
  56. package/dist/standalone/assets/{in-memory-adapter-CBF4h2KD.js → in-memory-adapter-qRkNfj9O.js} +1 -1
  57. package/dist/standalone/assets/main-DDltQnzR.js +3954 -0
  58. package/dist/standalone/assets/{webcrypto-adapter-DysAubFb.js → webcrypto-adapter-FejcrL9x.js} +1 -1
  59. package/dist/standalone/index.html +11 -12
  60. package/dist/ui/copy-controller.mjs +3 -3
  61. package/dist/ui/copy-controller.mjs.map +1 -1
  62. package/dist/ui/dev-wallet-account-selector.d.mts +3 -4
  63. package/dist/ui/dev-wallet-account-selector.d.mts.map +1 -1
  64. package/dist/ui/dev-wallet-account-selector.mjs +48 -25
  65. package/dist/ui/dev-wallet-account-selector.mjs.map +1 -1
  66. package/dist/ui/dev-wallet-accounts.d.mts +9 -4
  67. package/dist/ui/dev-wallet-accounts.d.mts.map +1 -1
  68. package/dist/ui/dev-wallet-accounts.mjs +62 -140
  69. package/dist/ui/dev-wallet-accounts.mjs.map +1 -1
  70. package/dist/ui/dev-wallet-balances.d.mts +10 -3
  71. package/dist/ui/dev-wallet-balances.d.mts.map +1 -1
  72. package/dist/ui/dev-wallet-balances.mjs +241 -43
  73. package/dist/ui/dev-wallet-balances.mjs.map +1 -1
  74. package/dist/ui/dev-wallet-connect.d.mts +3 -3
  75. package/dist/ui/dev-wallet-connect.d.mts.map +1 -1
  76. package/dist/ui/dev-wallet-connect.mjs +24 -16
  77. package/dist/ui/dev-wallet-connect.mjs.map +1 -1
  78. package/dist/ui/dev-wallet-dropdown.d.mts +3 -3
  79. package/dist/ui/dev-wallet-dropdown.d.mts.map +1 -1
  80. package/dist/ui/dev-wallet-dropdown.mjs +37 -47
  81. package/dist/ui/dev-wallet-dropdown.mjs.map +1 -1
  82. package/dist/ui/dev-wallet-fork-panel.d.mts +43 -0
  83. package/dist/ui/dev-wallet-fork-panel.d.mts.map +1 -0
  84. package/dist/ui/dev-wallet-fork-panel.mjs +500 -0
  85. package/dist/ui/dev-wallet-fork-panel.mjs.map +1 -0
  86. package/dist/ui/dev-wallet-network-badge.d.mts +3 -4
  87. package/dist/ui/dev-wallet-network-badge.d.mts.map +1 -1
  88. package/dist/ui/dev-wallet-network-badge.mjs +52 -21
  89. package/dist/ui/dev-wallet-network-badge.mjs.map +1 -1
  90. package/dist/ui/dev-wallet-new-account.d.mts +3 -4
  91. package/dist/ui/dev-wallet-new-account.d.mts.map +1 -1
  92. package/dist/ui/dev-wallet-new-account.mjs +31 -105
  93. package/dist/ui/dev-wallet-new-account.mjs.map +1 -1
  94. package/dist/ui/dev-wallet-objects.d.mts +3 -3
  95. package/dist/ui/dev-wallet-objects.d.mts.map +1 -1
  96. package/dist/ui/dev-wallet-objects.mjs +76 -39
  97. package/dist/ui/dev-wallet-objects.mjs.map +1 -1
  98. package/dist/ui/dev-wallet-panel.d.mts +24 -4
  99. package/dist/ui/dev-wallet-panel.d.mts.map +1 -1
  100. package/dist/ui/dev-wallet-panel.mjs +247 -64
  101. package/dist/ui/dev-wallet-panel.mjs.map +1 -1
  102. package/dist/ui/dev-wallet-popup.d.mts +3 -5
  103. package/dist/ui/dev-wallet-popup.d.mts.map +1 -1
  104. package/dist/ui/dev-wallet-popup.mjs +19 -15
  105. package/dist/ui/dev-wallet-popup.mjs.map +1 -1
  106. package/dist/ui/dev-wallet-settings.d.mts +3 -4
  107. package/dist/ui/dev-wallet-settings.d.mts.map +1 -1
  108. package/dist/ui/dev-wallet-settings.mjs +149 -97
  109. package/dist/ui/dev-wallet-settings.mjs.map +1 -1
  110. package/dist/ui/dev-wallet-signing-modal.d.mts +11 -4
  111. package/dist/ui/dev-wallet-signing-modal.d.mts.map +1 -1
  112. package/dist/ui/dev-wallet-signing-modal.mjs +46 -18
  113. package/dist/ui/dev-wallet-signing-modal.mjs.map +1 -1
  114. package/dist/ui/dev-wallet-signing.d.mts +9 -3
  115. package/dist/ui/dev-wallet-signing.d.mts.map +1 -1
  116. package/dist/ui/dev-wallet-signing.mjs +119 -130
  117. package/dist/ui/dev-wallet-signing.mjs.map +1 -1
  118. package/dist/ui/dev-wallet-standalone.d.mts +8 -3
  119. package/dist/ui/dev-wallet-standalone.d.mts.map +1 -1
  120. package/dist/ui/dev-wallet-standalone.mjs +303 -38
  121. package/dist/ui/dev-wallet-standalone.mjs.map +1 -1
  122. package/dist/ui/dev-wallet-tab-bar.d.mts +13 -5
  123. package/dist/ui/dev-wallet-tab-bar.d.mts.map +1 -1
  124. package/dist/ui/dev-wallet-tab-bar.mjs +143 -82
  125. package/dist/ui/dev-wallet-tab-bar.mjs.map +1 -1
  126. package/dist/ui/index.d.mts +3 -2
  127. package/dist/ui/index.mjs +2 -2
  128. package/dist/ui/mount.d.mts +14 -1
  129. package/dist/ui/mount.d.mts.map +1 -1
  130. package/dist/ui/mount.mjs +5 -2
  131. package/dist/ui/mount.mjs.map +1 -1
  132. package/dist/ui/styles.mjs +428 -66
  133. package/dist/ui/styles.mjs.map +1 -1
  134. package/dist/ui/transaction-analyzer.mjs +19 -30
  135. package/dist/ui/transaction-analyzer.mjs.map +1 -1
  136. package/dist/ui/utils.d.mts +59 -0
  137. package/dist/ui/utils.d.mts.map +1 -0
  138. package/dist/ui/utils.mjs +42 -15
  139. package/dist/ui/utils.mjs.map +1 -1
  140. package/dist/ui/wallet-controller.mjs +89 -20
  141. package/dist/ui/wallet-controller.mjs.map +1 -1
  142. package/dist/wallet/constants.d.mts +9 -0
  143. package/dist/wallet/constants.d.mts.map +1 -0
  144. package/dist/wallet/constants.mjs +1 -1
  145. package/dist/wallet/dev-wallet.mjs +42 -99
  146. package/dist/wallet/dev-wallet.mjs.map +1 -1
  147. package/dist/wallet/initializer.d.mts +3 -0
  148. package/dist/wallet/initializer.d.mts.map +1 -1
  149. package/dist/wallet/initializer.mjs +9 -14
  150. package/dist/wallet/initializer.mjs.map +1 -1
  151. package/dist/wallet/signing.mjs +8 -21
  152. package/dist/wallet/signing.mjs.map +1 -1
  153. package/package.json +8 -6
  154. package/src/adapters/browser.ts +21 -0
  155. package/src/adapters/devstack-adapter.ts +342 -0
  156. package/src/adapters/devstack-paths.ts +16 -0
  157. package/src/adapters/fork-relay.ts +321 -0
  158. package/src/app/index.html +10 -11
  159. package/src/react/useDevWallet.ts +5 -1
  160. package/src/ui/dev-wallet-account-selector.ts +44 -17
  161. package/src/ui/dev-wallet-accounts.ts +87 -124
  162. package/src/ui/dev-wallet-balances.ts +248 -27
  163. package/src/ui/dev-wallet-connect.ts +19 -8
  164. package/src/ui/dev-wallet-dropdown.ts +7 -5
  165. package/src/ui/dev-wallet-fork-panel.ts +591 -0
  166. package/src/ui/dev-wallet-network-badge.ts +49 -10
  167. package/src/ui/dev-wallet-new-account.ts +21 -62
  168. package/src/ui/dev-wallet-objects.ts +59 -19
  169. package/src/ui/dev-wallet-panel.ts +261 -42
  170. package/src/ui/dev-wallet-popup.ts +12 -6
  171. package/src/ui/dev-wallet-settings.ts +159 -94
  172. package/src/ui/dev-wallet-signing-modal.ts +47 -7
  173. package/src/ui/dev-wallet-signing.ts +124 -97
  174. package/src/ui/dev-wallet-standalone.ts +310 -22
  175. package/src/ui/dev-wallet-tab-bar.ts +132 -70
  176. package/src/ui/index.ts +3 -0
  177. package/src/ui/mount.ts +23 -1
  178. package/src/ui/styles.ts +434 -58
  179. package/src/ui/utils.ts +66 -0
  180. package/src/ui/wallet-controller.ts +103 -5
  181. package/src/wallet/initializer.ts +7 -1
  182. package/dist/standalone/assets/main-VE4olb-Q.js +0 -2841
package/CHANGELOG.md CHANGED
@@ -1,5 +1,30 @@
1
1
  # @mysten-incubation/dev-wallet
2
2
 
3
+ ## 0.2.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 3806dc8: Add the devstack signer adapter and a custom panel API.
8
+
9
+ **Adapter.**
10
+ - New `DevstackSignerAdapter` (and `DevstackProxySigner`) under
11
+ `@mysten-incubation/dev-wallet/adapters`. Mirrors `RemoteCliAdapter`'s out-of-process model —
12
+ keys never enter the frontend bundle; signing goes over HTTP to a devstack-side wallet-app
13
+ server.
14
+ - `parseDevstackToken(pairedUrl)` and `createDevstackAdapterFromManifest(manifest)` helpers wire
15
+ the adapter up from the devstack manifest's wallet-server service entry.
16
+
17
+ **Panel API.**
18
+ - New `WalletPanelDescriptor` type (`{ id, label, icon?, tagName }`) plus
19
+ `DevWalletConfig.panels?` and `DevWalletInitializerConfig.panels?` options. The wallet appends
20
+ each registered tab after the built-in Assets / Objects / Settings; the registered custom
21
+ element gets `.wallet`, `.activeAddress`, and `.client` properties wired in automatically.
22
+
23
+ ### Patch Changes
24
+
25
+ - 9be42e5: Redesign the dev wallet UI with a clearer standalone layout, polished wallet panel
26
+ chrome, useful side content, refreshed settings and signing flows, and updated docs screenshots.
27
+
3
28
  ## 0.0.1
4
29
 
5
30
  ### Patch Changes
package/LICENSE ADDED
@@ -0,0 +1,189 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for describing the origin of the Work and
141
+ reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may accept and charge a
167
+ fee for, or grant additional or different rights or obligations
168
+ consistent with this License. However, in accepting such obligations,
169
+ You may act only on Your own behalf and on Your sole responsibility,
170
+ not on behalf of any other Contributor, and only if You agree to
171
+ indemnify, defend, and hold each Contributor harmless for any
172
+ liability incurred by, or claims asserted against, such Contributor
173
+ by reason of your accepting any such warranty or additional liability.
174
+
175
+ END OF TERMS AND CONDITIONS
176
+
177
+ Copyright 2026 Mysten Labs, Inc.
178
+
179
+ Licensed under the Apache License, Version 2.0 (the "License");
180
+ you may not use this file except in compliance with the License.
181
+ You may obtain a copy of the License at
182
+
183
+ http://www.apache.org/licenses/LICENSE-2.0
184
+
185
+ Unless required by applicable law or agreed to in writing, software
186
+ distributed under the License is distributed on an "AS IS" BASIS,
187
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
188
+ See the License for the specific language governing permissions and
189
+ limitations under the License.
@@ -1,10 +1,9 @@
1
- //#region \0@oxc-project+runtime@0.107.0/helpers/decorate.js
1
+ //#region \0@oxc-project+runtime@0.127.0/helpers/decorate.js
2
2
  function __decorate(decorators, target, key, desc) {
3
3
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
4
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
5
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
6
  return c > 3 && r && Object.defineProperty(target, key, r), r;
7
7
  }
8
-
9
8
  //#endregion
10
- export { __decorate };
9
+ export { __decorate };
@@ -1,5 +1,4 @@
1
1
  import { buildManagedAccount } from "./build-managed-account.mjs";
2
-
3
2
  //#region src/adapters/base-adapter.ts
4
3
  /**
5
4
  * Abstract base class implementing the shared boilerplate of {@link SignerAdapter}.
@@ -10,9 +9,11 @@ import { buildManagedAccount } from "./build-managed-account.mjs";
10
9
  var BaseSignerAdapter = class {
11
10
  constructor() {
12
11
  this.allowAutoSign = true;
12
+ this.#accounts = [];
13
+ this.#listeners = /* @__PURE__ */ new Set();
13
14
  }
14
- #accounts = [];
15
- #listeners = new Set();
15
+ #accounts;
16
+ #listeners;
16
17
  getAccounts() {
17
18
  return [...this.#accounts];
18
19
  }
@@ -66,12 +67,10 @@ var BaseSignerAdapter = class {
66
67
  }
67
68
  notifyListeners() {
68
69
  const accounts = this.getAccounts();
69
- for (const listener of this.#listeners) {
70
- listener(accounts);
71
- }
70
+ for (const listener of this.#listeners) listener(accounts);
72
71
  }
73
72
  };
74
-
75
73
  //#endregion
76
74
  export { BaseSignerAdapter };
75
+
77
76
  //# sourceMappingURL=base-adapter.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"base-adapter.mjs","names":["#accounts","#listeners"],"sources":["../../src/adapters/base-adapter.ts"],"sourcesContent":["// Copyright (c) Mysten Labs, Inc.\n// SPDX-License-Identifier: Apache-2.0\n\nimport type { ManagedAccount, SignerAdapter } from '../types.js';\nimport { buildManagedAccount } from './build-managed-account.js';\n\n/**\n * Abstract base class implementing the shared boilerplate of {@link SignerAdapter}.\n *\n * Subclasses only need to implement `initialize()`, `id`, and `name`.\n * All account list management, listener notification, and cleanup are handled here.\n */\nexport abstract class BaseSignerAdapter implements SignerAdapter {\n\tabstract readonly id: string;\n\tabstract readonly name: string;\n\treadonly allowAutoSign: boolean = true;\n\n\t#accounts: ManagedAccount[] = [];\n\t#listeners = new Set<(accounts: ManagedAccount[]) => void>();\n\n\tabstract initialize(): Promise<void>;\n\n\tgetAccounts(): ManagedAccount[] {\n\t\treturn [...this.#accounts];\n\t}\n\n\tgetAccount(address: string): ManagedAccount | undefined {\n\t\treturn this.#accounts.find((account) => account.address === address);\n\t}\n\n\tonAccountsChanged(callback: (accounts: ManagedAccount[]) => void): () => void {\n\t\tthis.#listeners.add(callback);\n\t\treturn () => {\n\t\t\tthis.#listeners.delete(callback);\n\t\t};\n\t}\n\n\tdestroy(): void {\n\t\tthis.#accounts = [];\n\t\tthis.#listeners.clear();\n\t}\n\n\t// ── Protected helpers for subclasses ─────────────────────────────────────\n\n\tprotected get _accounts(): readonly ManagedAccount[] {\n\t\treturn this.#accounts;\n\t}\n\n\tprotected setInitialAccounts(accounts: ManagedAccount[]): void {\n\t\tthis.#accounts = accounts;\n\t\tthis.notifyListeners();\n\t}\n\n\tprotected addAccount(account: ManagedAccount): void {\n\t\tthis.#accounts.push(account);\n\t\tthis.notifyListeners();\n\t}\n\n\tprotected removeAccountByAddress(address: string): boolean {\n\t\tconst index = this.#accounts.findIndex((a) => a.address === address);\n\t\tif (index === -1) return false;\n\t\tthis.#accounts.splice(index, 1);\n\t\tthis.notifyListeners();\n\t\treturn true;\n\t}\n\n\t/** Replace an account by address (e.g. after rename). */\n\tprotected replaceAccount(address: string, account: ManagedAccount): boolean {\n\t\tconst index = this.#accounts.findIndex((a) => a.address === address);\n\t\tif (index === -1) return false;\n\t\tthis.#accounts[index] = account;\n\t\tthis.notifyListeners();\n\t\treturn true;\n\t}\n\n\t/** Rename an account by rebuilding its ManagedAccount with a new label. */\n\tprotected _performRename(address: string, label: string): boolean {\n\t\tconst account = this.getAccount(address);\n\t\tif (!account) return false;\n\t\treturn this.replaceAccount(address, buildManagedAccount(account.signer, address, label));\n\t}\n\n\tprotected getDefaultLabel(): string {\n\t\treturn `Account ${this.getAccounts().length + 1}`;\n\t}\n\n\tprotected notifyListeners(): void {\n\t\tconst accounts = this.getAccounts();\n\t\tfor (const listener of this.#listeners) {\n\t\t\tlistener(accounts);\n\t\t}\n\t}\n}\n"],"mappings":";;;;;;;;;AAYA,IAAsB,oBAAtB,MAAiE;;uBAG9B;;CAElC,YAA8B,EAAE;CAChC,aAAa,IAAI,KAA2C;CAI5D,cAAgC;AAC/B,SAAO,CAAC,GAAG,MAAKA,SAAU;;CAG3B,WAAW,SAA6C;AACvD,SAAO,MAAKA,SAAU,MAAM,YAAY,QAAQ,YAAY,QAAQ;;CAGrE,kBAAkB,UAA4D;AAC7E,QAAKC,UAAW,IAAI,SAAS;AAC7B,eAAa;AACZ,SAAKA,UAAW,OAAO,SAAS;;;CAIlC,UAAgB;AACf,QAAKD,WAAY,EAAE;AACnB,QAAKC,UAAW,OAAO;;CAKxB,IAAc,YAAuC;AACpD,SAAO,MAAKD;;CAGb,AAAU,mBAAmB,UAAkC;AAC9D,QAAKA,WAAY;AACjB,OAAK,iBAAiB;;CAGvB,AAAU,WAAW,SAA+B;AACnD,QAAKA,SAAU,KAAK,QAAQ;AAC5B,OAAK,iBAAiB;;CAGvB,AAAU,uBAAuB,SAA0B;EAC1D,MAAM,QAAQ,MAAKA,SAAU,WAAW,MAAM,EAAE,YAAY,QAAQ;AACpE,MAAI,UAAU,CAAC,EAAG,QAAO;AACzB,QAAKA,SAAU,OAAO,OAAO,EAAE;AAC/B,OAAK,iBAAiB;AACtB,SAAO;;;CAIR,AAAU,eAAe,SAAiB,SAAkC;EAC3E,MAAM,QAAQ,MAAKA,SAAU,WAAW,MAAM,EAAE,YAAY,QAAQ;AACpE,MAAI,UAAU,CAAC,EAAG,QAAO;AACzB,QAAKA,SAAU,SAAS;AACxB,OAAK,iBAAiB;AACtB,SAAO;;;CAIR,AAAU,eAAe,SAAiB,OAAwB;EACjE,MAAM,UAAU,KAAK,WAAW,QAAQ;AACxC,MAAI,CAAC,QAAS,QAAO;AACrB,SAAO,KAAK,eAAe,SAAS,oBAAoB,QAAQ,QAAQ,SAAS,MAAM,CAAC;;CAGzF,AAAU,kBAA0B;AACnC,SAAO,WAAW,KAAK,aAAa,CAAC,SAAS;;CAG/C,AAAU,kBAAwB;EACjC,MAAM,WAAW,KAAK,aAAa;AACnC,OAAK,MAAM,YAAY,MAAKC,WAAY;AACvC,YAAS,SAAS"}
1
+ {"version":3,"file":"base-adapter.mjs","names":["#accounts","#listeners"],"sources":["../../src/adapters/base-adapter.ts"],"sourcesContent":["// Copyright (c) Mysten Labs, Inc.\n// SPDX-License-Identifier: Apache-2.0\n\nimport type { ManagedAccount, SignerAdapter } from '../types.js';\nimport { buildManagedAccount } from './build-managed-account.js';\n\n/**\n * Abstract base class implementing the shared boilerplate of {@link SignerAdapter}.\n *\n * Subclasses only need to implement `initialize()`, `id`, and `name`.\n * All account list management, listener notification, and cleanup are handled here.\n */\nexport abstract class BaseSignerAdapter implements SignerAdapter {\n\tabstract readonly id: string;\n\tabstract readonly name: string;\n\treadonly allowAutoSign: boolean = true;\n\n\t#accounts: ManagedAccount[] = [];\n\t#listeners = new Set<(accounts: ManagedAccount[]) => void>();\n\n\tabstract initialize(): Promise<void>;\n\n\tgetAccounts(): ManagedAccount[] {\n\t\treturn [...this.#accounts];\n\t}\n\n\tgetAccount(address: string): ManagedAccount | undefined {\n\t\treturn this.#accounts.find((account) => account.address === address);\n\t}\n\n\tonAccountsChanged(callback: (accounts: ManagedAccount[]) => void): () => void {\n\t\tthis.#listeners.add(callback);\n\t\treturn () => {\n\t\t\tthis.#listeners.delete(callback);\n\t\t};\n\t}\n\n\tdestroy(): void {\n\t\tthis.#accounts = [];\n\t\tthis.#listeners.clear();\n\t}\n\n\t// ── Protected helpers for subclasses ─────────────────────────────────────\n\n\tprotected get _accounts(): readonly ManagedAccount[] {\n\t\treturn this.#accounts;\n\t}\n\n\tprotected setInitialAccounts(accounts: ManagedAccount[]): void {\n\t\tthis.#accounts = accounts;\n\t\tthis.notifyListeners();\n\t}\n\n\tprotected addAccount(account: ManagedAccount): void {\n\t\tthis.#accounts.push(account);\n\t\tthis.notifyListeners();\n\t}\n\n\tprotected removeAccountByAddress(address: string): boolean {\n\t\tconst index = this.#accounts.findIndex((a) => a.address === address);\n\t\tif (index === -1) return false;\n\t\tthis.#accounts.splice(index, 1);\n\t\tthis.notifyListeners();\n\t\treturn true;\n\t}\n\n\t/** Replace an account by address (e.g. after rename). */\n\tprotected replaceAccount(address: string, account: ManagedAccount): boolean {\n\t\tconst index = this.#accounts.findIndex((a) => a.address === address);\n\t\tif (index === -1) return false;\n\t\tthis.#accounts[index] = account;\n\t\tthis.notifyListeners();\n\t\treturn true;\n\t}\n\n\t/** Rename an account by rebuilding its ManagedAccount with a new label. */\n\tprotected _performRename(address: string, label: string): boolean {\n\t\tconst account = this.getAccount(address);\n\t\tif (!account) return false;\n\t\treturn this.replaceAccount(address, buildManagedAccount(account.signer, address, label));\n\t}\n\n\tprotected getDefaultLabel(): string {\n\t\treturn `Account ${this.getAccounts().length + 1}`;\n\t}\n\n\tprotected notifyListeners(): void {\n\t\tconst accounts = this.getAccounts();\n\t\tfor (const listener of this.#listeners) {\n\t\t\tlistener(accounts);\n\t\t}\n\t}\n}\n"],"mappings":";;;;;;;;AAYA,IAAsB,oBAAtB,MAAiE;;uBAG9B;mBAEJ,EAAE;oCACnB,IAAI,KAA2C;;CAD5D;CACA;CAIA,cAAgC;AAC/B,SAAO,CAAC,GAAG,MAAA,SAAe;;CAG3B,WAAW,SAA6C;AACvD,SAAO,MAAA,SAAe,MAAM,YAAY,QAAQ,YAAY,QAAQ;;CAGrE,kBAAkB,UAA4D;AAC7E,QAAA,UAAgB,IAAI,SAAS;AAC7B,eAAa;AACZ,SAAA,UAAgB,OAAO,SAAS;;;CAIlC,UAAgB;AACf,QAAA,WAAiB,EAAE;AACnB,QAAA,UAAgB,OAAO;;CAKxB,IAAc,YAAuC;AACpD,SAAO,MAAA;;CAGR,mBAA6B,UAAkC;AAC9D,QAAA,WAAiB;AACjB,OAAK,iBAAiB;;CAGvB,WAAqB,SAA+B;AACnD,QAAA,SAAe,KAAK,QAAQ;AAC5B,OAAK,iBAAiB;;CAGvB,uBAAiC,SAA0B;EAC1D,MAAM,QAAQ,MAAA,SAAe,WAAW,MAAM,EAAE,YAAY,QAAQ;AACpE,MAAI,UAAU,GAAI,QAAO;AACzB,QAAA,SAAe,OAAO,OAAO,EAAE;AAC/B,OAAK,iBAAiB;AACtB,SAAO;;;CAIR,eAAyB,SAAiB,SAAkC;EAC3E,MAAM,QAAQ,MAAA,SAAe,WAAW,MAAM,EAAE,YAAY,QAAQ;AACpE,MAAI,UAAU,GAAI,QAAO;AACzB,QAAA,SAAe,SAAS;AACxB,OAAK,iBAAiB;AACtB,SAAO;;;CAIR,eAAyB,SAAiB,OAAwB;EACjE,MAAM,UAAU,KAAK,WAAW,QAAQ;AACxC,MAAI,CAAC,QAAS,QAAO;AACrB,SAAO,KAAK,eAAe,SAAS,oBAAoB,QAAQ,QAAQ,SAAS,MAAM,CAAC;;CAGzF,kBAAoC;AACnC,SAAO,WAAW,KAAK,aAAa,CAAC,SAAS;;CAG/C,kBAAkC;EACjC,MAAM,WAAW,KAAK,aAAa;AACnC,OAAK,MAAM,YAAY,MAAA,UACtB,UAAS,SAAS"}
@@ -3,6 +3,9 @@ import { BaseSignerAdapter } from "./base-adapter.mjs";
3
3
  import { buildManagedAccount } from "./build-managed-account.mjs";
4
4
  import { InMemorySignerAdapter } from "./in-memory-adapter.mjs";
5
5
  import { CliProxySigner, RemoteCliAdapter } from "./remote-cli-adapter.mjs";
6
+ import { DevstackAdapterManifest, DevstackProxySigner, DevstackSignerAdapter, DevstackSignerAdapterOptions, createDevstackAdapterFromManifest, parseDevstackToken } from "./devstack-adapter.mjs";
7
+ import { DEVSTACK_WALLET_HTTP_PATH, DevstackWalletHttpPathValue } from "./devstack-paths.mjs";
8
+ import { ForkImpersonationSlot, ForkRelay, ForkRelayHttpError, ForkRelayManifest, ForkRelayOptions, ForkRelayResult, ForkStatus, createForkRelayFromManifest } from "./fork-relay.mjs";
6
9
  import { WebCryptoSignerAdapter } from "./webcrypto-adapter.mjs";
7
10
  import { PasskeySignerAdapter } from "./passkey-adapter.mjs";
8
- export { BaseSignerAdapter, CliProxySigner, type CreateAccountOptions, type ImportAccountOptions, InMemorySignerAdapter, type ManagedAccount, PasskeySignerAdapter, RemoteCliAdapter, type SignerAdapter, WebCryptoSignerAdapter, buildManagedAccount };
11
+ export { BaseSignerAdapter, CliProxySigner, type CreateAccountOptions, DEVSTACK_WALLET_HTTP_PATH, type DevstackAdapterManifest, DevstackProxySigner, DevstackSignerAdapter, type DevstackSignerAdapterOptions, type DevstackWalletHttpPathValue, type ForkImpersonationSlot, ForkRelay, ForkRelayHttpError, type ForkRelayManifest, type ForkRelayOptions, type ForkRelayResult, type ForkStatus, type ImportAccountOptions, InMemorySignerAdapter, type ManagedAccount, PasskeySignerAdapter, RemoteCliAdapter, type SignerAdapter, WebCryptoSignerAdapter, buildManagedAccount, createDevstackAdapterFromManifest, createForkRelayFromManifest, parseDevstackToken };
@@ -2,7 +2,9 @@ import { buildManagedAccount } from "./build-managed-account.mjs";
2
2
  import { BaseSignerAdapter } from "./base-adapter.mjs";
3
3
  import { InMemorySignerAdapter } from "./in-memory-adapter.mjs";
4
4
  import { CliProxySigner, RemoteCliAdapter } from "./remote-cli-adapter.mjs";
5
+ import { DEVSTACK_WALLET_HTTP_PATH } from "./devstack-paths.mjs";
6
+ import { DevstackProxySigner, DevstackSignerAdapter, createDevstackAdapterFromManifest, parseDevstackToken } from "./devstack-adapter.mjs";
7
+ import { ForkRelay, ForkRelayHttpError, createForkRelayFromManifest } from "./fork-relay.mjs";
5
8
  import { WebCryptoSignerAdapter } from "./webcrypto-adapter.mjs";
6
9
  import { PasskeySignerAdapter } from "./passkey-adapter.mjs";
7
-
8
- export { BaseSignerAdapter, CliProxySigner, InMemorySignerAdapter, PasskeySignerAdapter, RemoteCliAdapter, WebCryptoSignerAdapter, buildManagedAccount };
10
+ export { BaseSignerAdapter, CliProxySigner, DEVSTACK_WALLET_HTTP_PATH, DevstackProxySigner, DevstackSignerAdapter, ForkRelay, ForkRelayHttpError, InMemorySignerAdapter, PasskeySignerAdapter, RemoteCliAdapter, WebCryptoSignerAdapter, buildManagedAccount, createDevstackAdapterFromManifest, createForkRelayFromManifest, parseDevstackToken };
@@ -1,5 +1,4 @@
1
1
  import { ReadonlyWalletAccount, SUI_CHAINS } from "@mysten/wallet-standard";
2
-
3
2
  //#region src/adapters/build-managed-account.ts
4
3
  const DEFAULT_FEATURES = [
5
4
  "sui:signTransaction",
@@ -10,21 +9,20 @@ const DEFAULT_FEATURES = [
10
9
  * Build a {@link ManagedAccount} from a signer, address, label, and optional feature list.
11
10
  */
12
11
  function buildManagedAccount(signer, address, label, features) {
13
- const walletAccount = new ReadonlyWalletAccount({
14
- address,
15
- label,
16
- publicKey: signer.getPublicKey().toSuiBytes(),
17
- chains: [...SUI_CHAINS],
18
- features: [...features ?? DEFAULT_FEATURES]
19
- });
20
12
  return {
21
13
  address,
22
14
  label,
23
15
  signer,
24
- walletAccount
16
+ walletAccount: new ReadonlyWalletAccount({
17
+ address,
18
+ label,
19
+ publicKey: signer.getPublicKey().toSuiBytes(),
20
+ chains: [...SUI_CHAINS],
21
+ features: [...features ?? DEFAULT_FEATURES]
22
+ })
25
23
  };
26
24
  }
27
-
28
25
  //#endregion
29
26
  export { buildManagedAccount };
27
+
30
28
  //# sourceMappingURL=build-managed-account.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"build-managed-account.mjs","names":[],"sources":["../../src/adapters/build-managed-account.ts"],"sourcesContent":["// Copyright (c) Mysten Labs, Inc.\n// SPDX-License-Identifier: Apache-2.0\n\nimport type { Signer } from '@mysten/sui/cryptography';\nimport type { IdentifierString } from '@mysten/wallet-standard';\nimport { ReadonlyWalletAccount, SUI_CHAINS } from '@mysten/wallet-standard';\n\nimport type { ManagedAccount } from '../types.js';\n\nconst DEFAULT_FEATURES: IdentifierString[] = [\n\t'sui:signTransaction',\n\t'sui:signAndExecuteTransaction',\n\t'sui:signPersonalMessage',\n];\n\n/**\n * Build a {@link ManagedAccount} from a signer, address, label, and optional feature list.\n */\nexport function buildManagedAccount(\n\tsigner: Signer,\n\taddress: string,\n\tlabel: string,\n\tfeatures?: readonly IdentifierString[],\n): ManagedAccount {\n\tconst walletAccount = new ReadonlyWalletAccount({\n\t\taddress,\n\t\tlabel,\n\t\tpublicKey: signer.getPublicKey().toSuiBytes(),\n\t\tchains: [...SUI_CHAINS],\n\t\tfeatures: [...(features ?? DEFAULT_FEATURES)],\n\t});\n\treturn { address, label, signer, walletAccount };\n}\n"],"mappings":";;;AASA,MAAM,mBAAuC;CAC5C;CACA;CACA;CACA;;;;AAKD,SAAgB,oBACf,QACA,SACA,OACA,UACiB;CACjB,MAAM,gBAAgB,IAAI,sBAAsB;EAC/C;EACA;EACA,WAAW,OAAO,cAAc,CAAC,YAAY;EAC7C,QAAQ,CAAC,GAAG,WAAW;EACvB,UAAU,CAAC,GAAI,YAAY,iBAAkB;EAC7C,CAAC;AACF,QAAO;EAAE;EAAS;EAAO;EAAQ;EAAe"}
1
+ {"version":3,"file":"build-managed-account.mjs","names":[],"sources":["../../src/adapters/build-managed-account.ts"],"sourcesContent":["// Copyright (c) Mysten Labs, Inc.\n// SPDX-License-Identifier: Apache-2.0\n\nimport type { Signer } from '@mysten/sui/cryptography';\nimport type { IdentifierString } from '@mysten/wallet-standard';\nimport { ReadonlyWalletAccount, SUI_CHAINS } from '@mysten/wallet-standard';\n\nimport type { ManagedAccount } from '../types.js';\n\nconst DEFAULT_FEATURES: IdentifierString[] = [\n\t'sui:signTransaction',\n\t'sui:signAndExecuteTransaction',\n\t'sui:signPersonalMessage',\n];\n\n/**\n * Build a {@link ManagedAccount} from a signer, address, label, and optional feature list.\n */\nexport function buildManagedAccount(\n\tsigner: Signer,\n\taddress: string,\n\tlabel: string,\n\tfeatures?: readonly IdentifierString[],\n): ManagedAccount {\n\tconst walletAccount = new ReadonlyWalletAccount({\n\t\taddress,\n\t\tlabel,\n\t\tpublicKey: signer.getPublicKey().toSuiBytes(),\n\t\tchains: [...SUI_CHAINS],\n\t\tfeatures: [...(features ?? DEFAULT_FEATURES)],\n\t});\n\treturn { address, label, signer, walletAccount };\n}\n"],"mappings":";;AASA,MAAM,mBAAuC;CAC5C;CACA;CACA;CACA;;;;AAKD,SAAgB,oBACf,QACA,SACA,OACA,UACiB;AAQjB,QAAO;EAAE;EAAS;EAAO;EAAQ,mBAPP,sBAAsB;GAC/C;GACA;GACA,WAAW,OAAO,cAAc,CAAC,YAAY;GAC7C,QAAQ,CAAC,GAAG,WAAW;GACvB,UAAU,CAAC,GAAI,YAAY,iBAAkB;GAC7C,CACgC;EAAe"}
@@ -0,0 +1,111 @@
1
+ import { BaseSignerAdapter } from "./base-adapter.mjs";
2
+ import { PublicKey, SignatureScheme, Signer } from "@mysten/sui/cryptography";
3
+
4
+ //#region src/adapters/devstack-adapter.d.ts
5
+ /**
6
+ * Signer that delegates transaction signing to the devstack wallet-app
7
+ * over HTTP. Mirrors {@link CliProxySigner} but talks to the
8
+ * `wallet()` plugin's endpoints under `/api/v1/devstack/*`.
9
+ */
10
+ declare class DevstackProxySigner extends Signer {
11
+ #private;
12
+ constructor(options: {
13
+ address: string;
14
+ publicKey: PublicKey;
15
+ scheme: SignatureScheme;
16
+ serverOrigin: string;
17
+ authToken?: string | null;
18
+ });
19
+ sign(_bytes: Uint8Array): Promise<Uint8Array<ArrayBuffer>>;
20
+ getKeyScheme(): SignatureScheme;
21
+ getPublicKey(): PublicKey;
22
+ toSuiAddress(): string;
23
+ signTransaction(bytes: Uint8Array): Promise<{
24
+ bytes: string;
25
+ signature: string;
26
+ }>;
27
+ signPersonalMessage(bytes: Uint8Array): Promise<{
28
+ bytes: string;
29
+ signature: string;
30
+ }>;
31
+ }
32
+ interface DevstackSignerAdapterOptions {
33
+ /** Wallet-app origin (e.g. `http://localhost:9420`). Read from the
34
+ * matching endpoint entry on the active manifest. */
35
+ serverOrigin: string;
36
+ /** Bearer token. Parse `?token=<hex>` from the manifest entry's
37
+ * `pairUrl`. Omit if the wallet-app runs without auth. */
38
+ token?: string | null;
39
+ /** Override the adapter's display name. Defaults to `'Devstack'`. */
40
+ name?: string;
41
+ }
42
+ /**
43
+ * {@link SignerAdapter} that surfaces every account resolved by `devstack up`
44
+ * (including `cliSigner`/`envSigner`/`generatedKeypair` slots) without
45
+ * shipping their private keys into the frontend bundle. All signing happens
46
+ * server-side via the `wallet()` plugin.
47
+ *
48
+ * The simplest construction uses devstack's generated `dapp-kit-config.ts`,
49
+ * which bakes the wallet adapter wiring at codegen time — apps spread
50
+ * `devstackDappKitConfig` into `createDAppKit(...)` and never touch the
51
+ * adapter directly.
52
+ *
53
+ * To construct one manually (e.g. from a non-manifest source):
54
+ *
55
+ * ```ts
56
+ * const adapter = new DevstackSignerAdapter({
57
+ * serverOrigin: 'http://localhost:9420',
58
+ * token: '<bearer hex>',
59
+ * });
60
+ * ```
61
+ */
62
+ declare class DevstackSignerAdapter extends BaseSignerAdapter {
63
+ #private;
64
+ readonly id = "devstack";
65
+ readonly name: string;
66
+ readonly allowAutoSign = true;
67
+ constructor(options: DevstackSignerAdapterOptions);
68
+ initialize(): Promise<void>;
69
+ destroy(): void;
70
+ }
71
+ /**
72
+ * Pull the bearer token off a paired URL produced by the `wallet()`
73
+ * plugin. Returns `null` if the input is undefined, malformed, or
74
+ * carries a `<redacted>` placeholder (the manifest's pairUrl carries
75
+ * the redacted form; the real token lives in a sibling 0o600 file the
76
+ * consumer reads separately).
77
+ *
78
+ * The token rides in the URL fragment as `#token=<hex>`.
79
+ */
80
+ declare function parseDevstackToken(pairedUrl: string | undefined): string | null;
81
+ /** Narrow input — the only field the adapter consumes is
82
+ * `app.wallet.{url, pairUrl}`. Codegen emits exactly this shape so
83
+ * generated `dapp-kit-config.ts` doesn't have to fabricate placeholder
84
+ * manifest fields (`stack.app`, `coins`, etc.) just to satisfy the
85
+ * full `Manifest` type. Mirrors a slice of `AppManifest` from
86
+ * `@mysten-incubation/devstack` without importing it (dev-wallet
87
+ * doesn't depend on devstack — circular). */
88
+ interface DevstackAdapterManifest {
89
+ app?: {
90
+ wallet?: {
91
+ url: string;
92
+ pairUrl?: string;
93
+ };
94
+ };
95
+ }
96
+ /**
97
+ * Convenience: read the wallet-app endpoint off a devstack manifest and
98
+ * build a configured adapter, or return `null` when the entry isn't
99
+ * present (no `wallet(...)` in the stack, or it hasn't come up yet).
100
+ *
101
+ * The wallet entry's `pairUrl` carries the `#token=…` fragment used to
102
+ * extract the bearer token. The full `Manifest` shape from
103
+ * `@mysten-incubation/devstack` is structurally compatible with
104
+ * {@link DevstackAdapterManifest}, so
105
+ * `createDevstackAdapterFromManifest(devstackManifest)` typechecks
106
+ * without a cast.
107
+ */
108
+ declare function createDevstackAdapterFromManifest(manifest: DevstackAdapterManifest): DevstackSignerAdapter | null;
109
+ //#endregion
110
+ export { DevstackAdapterManifest, DevstackProxySigner, DevstackSignerAdapter, DevstackSignerAdapterOptions, createDevstackAdapterFromManifest, parseDevstackToken };
111
+ //# sourceMappingURL=devstack-adapter.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"devstack-adapter.d.mts","names":[],"sources":["../../src/adapters/devstack-adapter.ts"],"mappings":";;;;;AAiEA;;;;cAAa,mBAAA,SAA4B,MAAA;EAAA;cAO5B,OAAA;IACX,OAAA;IACA,SAAA,EAAW,SAAA;IACX,MAAA,EAAQ,eAAA;IACR,YAAA;IACA,SAAA;EAAA;EAUK,IAAA,CAAK,MAAA,EAAQ,UAAA,GAAa,OAAA,CAAQ,UAAA,CAAW,WAAA;EAOnD,YAAA,CAAA,GAAgB,eAAA;EAIhB,YAAA,CAAA,GAAgB,SAAA;EAIP,YAAA,CAAA;EAIM,eAAA,CAAgB,KAAA,EAAO,UAAA,GAAU,OAAA;;;;EAqCjC,mBAAA,CAAoB,KAAA,EAAO,UAAA,GAAU,OAAA;;;;;UAyCpC,4BAAA;EA3Gf;;EA8GD,YAAA;EApGmB;;EAuGnB,KAAA;EAvGwC;EAyGxC,IAAA;AAAA;;;;;;;;;;;;;;;;;;;AARD;;cA+Ba,qBAAA,SAA8B,iBAAA;EAAA;WACjC,EAAA;EAAA,SACA,IAAA;EAAA,SACA,aAAA;cAKG,OAAA,EAAS,4BAAA;EAYf,UAAA,CAAA,GAAc,OAAA;EAaX,OAAA,CAAA;AAAA;;;;;;;;;;iBAyCM,kBAAA,CAAmB,SAAA;;;;;;;;UAsBlB,uBAAA;EAChB,GAAA;IACC,MAAA;MACC,GAAA;MACA,OAAA;IAAA;EAAA;AAAA;;;;;;;;;;AAiBH;;;iBAAgB,iCAAA,CACf,QAAA,EAAU,uBAAA,GACR,qBAAA"}