@etherplay/dev-wallet-host 0.1.0 → 0.1.1

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 (27) hide show
  1. package/README.md +3 -1
  2. package/lib/server.js +13 -2
  3. package/package.json +1 -1
  4. package/site/assets/{App-n-xKxOMT.js → App-DKwr3SmI.js} +13 -13
  5. package/site/assets/{App-n-xKxOMT.js.map → App-DKwr3SmI.js.map} +1 -1
  6. package/site/assets/{bignumbers-tTSUAFen.js → bignumbers-CXLDZ_hX.js} +2 -2
  7. package/site/assets/{bignumbers-tTSUAFen.js.map → bignumbers-CXLDZ_hX.js.map} +1 -1
  8. package/site/assets/{index-Y5uolvJQ.js → index-BpymDBD4.js} +3 -3
  9. package/site/assets/{index-Y5uolvJQ.js.map → index-BpymDBD4.js.map} +1 -1
  10. package/site/assets/{index-BqqAh48J.js → index-CXJHxToF.js} +6 -6
  11. package/site/assets/{index-BqqAh48J.js.map → index-CXJHxToF.js.map} +1 -1
  12. package/site/assets/{index-DqysTtwQ.js → index-ClPYLG7G.js} +6 -6
  13. package/site/assets/{index-DqysTtwQ.js.map → index-ClPYLG7G.js.map} +1 -1
  14. package/site/assets/{index-dhS1shEX.js → index-DhaZfSXv.js} +8 -8
  15. package/site/assets/{index-dhS1shEX.js.map → index-DhaZfSXv.js.map} +1 -1
  16. package/site/assets/{index-CnVGoVpH.js → index-MU9KXKKX.js} +4 -4
  17. package/site/assets/{index-CnVGoVpH.js.map → index-MU9KXKKX.js.map} +1 -1
  18. package/site/assets/{index-Wu-sMuYC.js → index-kfVihtzM.js} +2 -2
  19. package/site/assets/{index-Wu-sMuYC.js.map → index-kfVihtzM.js.map} +1 -1
  20. package/site/assets/{login-CbHgl9FL.js → login-BHg03x5C.js} +22 -7
  21. package/site/assets/login-BHg03x5C.js.map +1 -0
  22. package/site/assets/{typed-data-Xi7g-SpO.js → typed-data-BgFaC7At.js} +4 -4
  23. package/site/assets/{typed-data-Xi7g-SpO.js.map → typed-data-BgFaC7At.js.map} +1 -1
  24. package/site/assets/{utf8-B9sGmk3K.js → utf8-C_RblMvC.js} +2 -2
  25. package/site/assets/{utf8-B9sGmk3K.js.map → utf8-C_RblMvC.js.map} +1 -1
  26. package/site/login/index.html +1 -1
  27. package/site/assets/login-CbHgl9FL.js.map +0 -1
package/README.md CHANGED
@@ -47,7 +47,9 @@ With no configuration at all it serves a working sign-in. The mnemonic mechanism
47
47
 
48
48
  ## Configuring it
49
49
 
50
- Optional. Write a JSON file anywhere in your project and pass `--config`; it is re-read on every request, so editing it and reloading the popup is the whole loop. Copy `node_modules/@etherplay/dev-wallet-host/config.example.json` to start from.
50
+ Optional. Write a JSON file anywhere in your project and pass `--config`; it is re-read on every request, so editing it and reloading the popup is the whole loop. Copy `node_modules/@etherplay/dev-wallet-host/config.example.json` to start from. A `config.json` sitting in the served directory works too.
51
+
52
+ With neither, `/config.json` answers with an empty document rather than a 404: absence is this file's normal state and the host asks for it on every popup, so a red line in the console of a correctly configured host would only teach you to ignore that line. The host then says, on startup, that it is on its built-in defaults. When a document DOES change something, it names the fields it changed, which is the quickest way to catch a typo'd field name that is being silently ignored.
51
53
 
52
54
  | field | what it is |
53
55
  | --------------------------- | ------------------------------------------------------------------------------ |
package/lib/server.js CHANGED
@@ -109,8 +109,19 @@ async function handle(request, response, root, options) {
109
109
  try {
110
110
  info = await stat(file);
111
111
  } catch {
112
- // DELIBERATELY NOT index.html. See the header of this file: a fallback here turns a missing
113
- // configuration document into one that silently did nothing.
112
+ // THE ONE PATH WITH AN ANSWER FOR "ABSENT", because absent is its normal state. The host
113
+ // asks for this on every popup, the document is optional, and a 404 in the console of a
114
+ // correctly configured host is a red line that means nothing is wrong, which is exactly the
115
+ // kind of noise that gets real errors ignored. An empty document is what "no configuration"
116
+ // IS, and the host says so in as many words rather than claiming it was configured.
117
+ //
118
+ // Only when there is no such file: a `config.json` sitting in the served directory is served
119
+ // above, and `--config` is answered earlier still.
120
+ if (pathname === '/config.json') {
121
+ return send(200, '{}', MIME['.json']);
122
+ }
123
+ // DELIBERATELY NOT index.html for anything else. See the header of this file: a fallback
124
+ // turns a missing configuration document into one that silently did nothing.
114
125
  return send(404, `not found: ${pathname}`);
115
126
  }
116
127
  if (info.isDirectory()) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@etherplay/dev-wallet-host",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "The Etherplay sign-in host, prebuilt, for DEVELOPMENT and e2e only - run it next to your app the way you run a faucet. Unfit for real accounts by construction.",
5
5
  "keywords": [
6
6
  "etherplay",
@@ -1,4 +1,4 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-Y5uolvJQ.js","assets/index-client-8kPxwRn_.js","assets/login-CbHgl9FL.js","assets/login-bn0FJsfM.css","assets/index-BqqAh48J.js","assets/typed-data-Xi7g-SpO.js","assets/utf8-B9sGmk3K.js","assets/index-Wu-sMuYC.js","assets/index-DqysTtwQ.js","assets/bignumbers-tTSUAFen.js","assets/index-dhS1shEX.js","assets/index-CnVGoVpH.js"])))=>i.map(i=>d[i]);
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-BpymDBD4.js","assets/index-client-8kPxwRn_.js","assets/login-BHg03x5C.js","assets/login-bn0FJsfM.css","assets/index-CXJHxToF.js","assets/typed-data-BgFaC7At.js","assets/utf8-C_RblMvC.js","assets/index-kfVihtzM.js","assets/index-ClPYLG7G.js","assets/bignumbers-CXLDZ_hX.js","assets/index-DhaZfSXv.js","assets/index-MU9KXKKX.js"])))=>i.map(i=>d[i]);
2
2
  var __defProp = Object.defineProperty;
3
3
  var __typeError = (msg) => {
4
4
  throw TypeError(msg);
@@ -20,7 +20,7 @@ var __privateWrapper = (obj, member, setter, getter) => ({
20
20
  });
21
21
  var _a, _b, _c, _d, _e, _t, _e2, _s, _a2, _i, _r, _o, _n, _h, _d2, _c2, _p, _E_instances, m_fn, _f, _e3, _s2, _t2, _i2, _o2, _r2, _n2, _a3, _c3, _g2, _h2, _d3, _l, _g, _h3;
22
22
  import { i as is_array, g as get_prototype_of, o as object_prototype, c as create_text, a as active_effect, b as get_first_child, d as is_firefox, T as TEMPLATE_FRAGMENT, e as TEMPLATE_USE_IMPORT_NODE, f as block, E as EFFECT_TRANSPARENT, r as resume_effect, h as branch, p as pause_effect, U as UNINITIALIZED, j as get$1, k as derived_safe_equal, I as INERT, l as array_from, m as mutable_source, s as source$1, n as internal_set, q as pause_children, t as clear_text_content, u as run_out_transitions, v as destroy_effect, w as EACH_INDEX_REACTIVE, x as EACH_ITEM_REACTIVE, y as EACH_ITEM_IMMUTABLE, z as get_next_sibling, A as EACH_IS_CONTROLLED, B as queue_micro_task, C as EACH_IS_ANIMATED, D as effect, F as untrack, G as render_effect, H as deep_read_state, J as safe_not_equal$1, L as LOADING_ATTR_SYMBOL, N as NAMESPACE_HTML, K as get_descriptors, S as STATE_SYMBOL, M as component_context, O as user_pre_effect, P as user_effect, Q as run_all, R as run, V as derived, W as noop$3, X as teardown, Y as define_property, Z as set, _ as proxy, $ as get_descriptor, a0 as props_invalid_value, a1 as LEGACY_DERIVED_PROP, a2 as PROPS_IS_UPDATED, a3 as safe_equals, a4 as PROPS_IS_BINDABLE, a5 as LEGACY_PROPS, a6 as PROPS_IS_LAZY_INITIAL, a7 as legacy_mode_flag, a8 as PROPS_IS_RUNES, a9 as PROPS_IS_IMMUTABLE, aa as enable_legacy_mode_flag, ab as delegate, ac as push, ad as user_derived, ae as sibling, af as pop, ag as child, ah as template_effect, ai as set_text, aj as first_child, ak as onMount, al as event, am as state } from "./index-client-8kPxwRn_.js";
23
- import { _ as __vitePreload, h as hostConfig } from "./login-CbHgl9FL.js";
23
+ import { _ as __vitePreload, h as hostConfig } from "./login-BHg03x5C.js";
24
24
  const empty = [];
25
25
  function snapshot(value, skip_warning = false) {
26
26
  return clone(value, /* @__PURE__ */ new Map(), "", empty);
@@ -15111,7 +15111,7 @@ let n$9 = (_e = class {
15111
15111
  }
15112
15112
  static async init({ sentry: e4, configuration: o5 }) {
15113
15113
  if (e4) return void (_e.sentry = e4);
15114
- const a5 = await __vitePreload(() => import("./index-Y5uolvJQ.js"), true ? __vite__mapDeps([0,1,2,3]) : void 0);
15114
+ const a5 = await __vitePreload(() => import("./index-BpymDBD4.js"), true ? __vite__mapDeps([0,1,2,3]) : void 0);
15115
15115
  _e.sentry = new a5.BrowserClient({ dsn: r$a, integrations: [], stackParser: a5.defaultStackParser, transport: a5.makeFetchTransport }), _e.baseTags = { projectId: (o5 == null ? void 0 : o5.baseConfiguration.publishableKey) ?? "", sdk: t$d, sdkVersion: o$9 }, _e.processQueuedCalls();
15116
15116
  }
15117
15117
  static processQueuedCalls() {
@@ -15504,15 +15504,15 @@ const t$8 = async (t6) => {
15504
15504
  let g2 = a5;
15505
15505
  if ([T$1.UPGRADEABLE_V5, T$1.UPGRADEABLE_V6].includes(d2)) {
15506
15506
  const e4 = { name: "Openfort", version: "0.5", chainId: Number(o5), verifyingContract: c3 }, t7 = { OpenfortMessage: [{ name: "hashedMessage", type: "bytes32" }] }, a6 = { hashedMessage: g2 }, { _TypedDataEncoder: s6 } = await __vitePreload(async () => {
15507
- const { _TypedDataEncoder: s7 } = await import("./index-BqqAh48J.js");
15507
+ const { _TypedDataEncoder: s7 } = await import("./index-CXJHxToF.js");
15508
15508
  return { _TypedDataEncoder: s7 };
15509
15509
  }, true ? __vite__mapDeps([4,5,6,7,1,2,3]) : void 0);
15510
15510
  g2 = s6.hash(e4, t7, a6);
15511
15511
  }
15512
15512
  const P3 = await s5.sign(g2, false, false);
15513
15513
  if (i3 && n4 && [T$1.UPGRADEABLE_V5, T$1.UPGRADEABLE_V6].includes(d2)) {
15514
- const { id: e4 } = await __vitePreload(() => import("./index-BqqAh48J.js"), true ? __vite__mapDeps([4,5,6,7,1,2,3]) : void 0), { defaultAbiCoder: t7 } = await __vitePreload(async () => {
15515
- const { defaultAbiCoder: t8 } = await import("./index-DqysTtwQ.js");
15514
+ const { id: e4 } = await __vitePreload(() => import("./index-CXJHxToF.js"), true ? __vite__mapDeps([4,5,6,7,1,2,3]) : void 0), { defaultAbiCoder: t7 } = await __vitePreload(async () => {
15515
+ const { defaultAbiCoder: t8 } = await import("./index-ClPYLG7G.js");
15516
15516
  return { defaultAbiCoder: t8 };
15517
15517
  }, true ? __vite__mapDeps([8,7,9,6,1,2,3]) : void 0), { hexConcat: a6 } = await __vitePreload(async () => {
15518
15518
  const { hexConcat: a7 } = await Promise.resolve().then(() => index$1);
@@ -15558,7 +15558,7 @@ const t$7 = async ({ params: t6, signer: o5, account: n4 }) => {
15558
15558
  const i3 = t6[0], d2 = t6[1];
15559
15559
  if (!d2 || !i3) throw new A$1(E$2.INVALID_PARAMS, "personal_sign requires an address and a message");
15560
15560
  if (d2.toLowerCase() !== n4.address.toLowerCase()) throw new A$1(E$2.INVALID_PARAMS, "personal_sign requires the signer to be the from address");
15561
- const { hashMessage: p5 } = await __vitePreload(() => import("./index-BqqAh48J.js"), true ? __vite__mapDeps([4,5,6,7,1,2,3]) : void 0);
15561
+ const { hashMessage: p5 } = await __vitePreload(() => import("./index-CXJHxToF.js"), true ? __vite__mapDeps([4,5,6,7,1,2,3]) : void 0);
15562
15562
  return await t$8({ hash: p5(n$a(i3)), implementationType: n4.implementationType || n4.type, chainId: Number(n4.chainId), signer: o5, address: d2, salt: n4.salt, factoryAddress: n4.factoryAddress, ownerAddress: n4.ownerAddress });
15563
15563
  };
15564
15564
  function a$6(t6) {
@@ -17048,7 +17048,7 @@ const r$5 = ["types", "domain", "primaryType", "message"], n$5 = (a5, n4) => {
17048
17048
  if (!c3 || !h2) throw new A$1(E$2.INVALID_PARAMS, `${s5} requires an address and a typed data JSON`);
17049
17049
  const { chainId: m2 } = await o5.detectNetwork(), I3 = n$5(h2, m2), y3 = { ...I3.types };
17050
17050
  delete y3.EIP712Domain;
17051
- const { _TypedDataEncoder: A3 } = await __vitePreload(() => import("./index-BqqAh48J.js"), true ? __vite__mapDeps([4,5,6,7,1,2,3]) : void 0), w2 = A3.hash(I3.domain, y3, I3.message);
17051
+ const { _TypedDataEncoder: A3 } = await __vitePreload(() => import("./index-CXJHxToF.js"), true ? __vite__mapDeps([4,5,6,7,1,2,3]) : void 0), w2 = A3.hash(I3.domain, y3, I3.message);
17052
17052
  return await t$8({ hash: w2, implementationType: i3, chainId: m2, signer: d2, address: c3, ownerAddress: p5.ownerAddress, factoryAddress: p5.factoryAddress, salt: p5.salt });
17053
17053
  };
17054
17054
  var C$2;
@@ -17083,7 +17083,7 @@ let E$1 = (_f = class {
17083
17083
  async getRpcProvider() {
17084
17084
  if (!__privateGet(this, _o)) {
17085
17085
  const e4 = await s$9.fromStorage(__privateGet(this, _t)), s5 = (e4 == null ? void 0 : e4.chainId) || (__privateGet(this, _s) ? Number(Object.keys(__privateGet(this, _s))[0]) : void 0) || 8453;
17086
- await __vitePreload(() => import("./index-dhS1shEX.js"), true ? __vite__mapDeps([10,7,5,6,11,9,1,2,3]) : void 0).then((t6) => {
17086
+ await __vitePreload(() => import("./index-DhaZfSXv.js"), true ? __vite__mapDeps([10,7,5,6,11,9,1,2,3]) : void 0).then((t6) => {
17087
17087
  const e5 = __privateGet(this, _s) ? __privateGet(this, _s)[s5] : void 0;
17088
17088
  __privateSet(this, _o, new t6.StaticJsonRpcProvider(e5 ?? t$a[s5]));
17089
17089
  });
@@ -17127,7 +17127,7 @@ let E$1 = (_f = class {
17127
17127
  const o5 = await this.getRpcProvider(), { chainId: n4 } = await o5.detectNetwork(), [h2] = s5.params || [];
17128
17128
  h2.chainId || (h2.chainId = n4.toString());
17129
17129
  const c3 = s$8(h2), { serialize: p5 } = await __vitePreload(async () => {
17130
- const { serialize: p6 } = await import("./index-CnVGoVpH.js").then((n5) => n5.i);
17130
+ const { serialize: p6 } = await import("./index-MU9KXKKX.js").then((n5) => n5.i);
17131
17131
  return { serialize: p6 };
17132
17132
  }, true ? __vite__mapDeps([11,7,9]) : void 0), w2 = (t6) => ({ legacy: 0, eip2930: 1, eip1559: 2 })[t6], { gas: u4, ...l3 } = c3, g2 = { ...l3, gasLimit: u4, to: c3.to ?? void 0, type: w2(c3.type) }, f3 = p5(g2), { keccak256: S2 } = await __vitePreload(async () => {
17133
17133
  const { keccak256: S3 } = await Promise.resolve().then(() => index);
@@ -17184,7 +17184,7 @@ let E$1 = (_f = class {
17184
17184
  await __privateGet(this, _i).call(this);
17185
17185
  try {
17186
17186
  const e4 = parseInt(s5.params[0].chainId, 16);
17187
- await t6.switchChain({ chainId: e4 }), await __vitePreload(() => import("./index-dhS1shEX.js"), true ? __vite__mapDeps([10,7,5,6,11,9,1,2,3]) : void 0).then((t7) => {
17187
+ await t6.switchChain({ chainId: e4 }), await __vitePreload(() => import("./index-DhaZfSXv.js"), true ? __vite__mapDeps([10,7,5,6,11,9,1,2,3]) : void 0).then((t7) => {
17188
17188
  const s6 = __privateGet(this, _s) ? __privateGet(this, _s)[e4] : void 0;
17189
17189
  __privateSet(this, _o, new t7.StaticJsonRpcProvider(s6 ?? t$a[e4]));
17190
17190
  }), __privateGet(this, _r).emit(C$2.CHAIN_CHANGED, r$b(e4));
@@ -18055,7 +18055,7 @@ class k {
18055
18055
  if (!i3) throw new s$b(E$4.MISSING_SIGNER, "No account found");
18056
18056
  const n4 = { ...r7 };
18057
18057
  delete n4.EIP712Domain;
18058
- const { _TypedDataEncoder: d2 } = await __vitePreload(() => import("./index-BqqAh48J.js"), true ? __vite__mapDeps([4,5,6,7,1,2,3]) : void 0), h2 = d2.hash(e4, n4, t6);
18058
+ const { _TypedDataEncoder: d2 } = await __vitePreload(() => import("./index-CXJHxToF.js"), true ? __vite__mapDeps([4,5,6,7,1,2,3]) : void 0), h2 = d2.hash(e4, n4, t6);
18059
18059
  return await t$8({ hash: h2, implementationType: i3.implementationType || i3.type, chainId: Number(i3.chainId), signer: s5, address: i3.address, ownerAddress: i3.ownerAddress, factoryAddress: i3.factoryAddress, salt: i3.salt });
18060
18060
  }
18061
18061
  async exportPrivateKey() {
@@ -21246,4 +21246,4 @@ export {
21246
21246
  process$1 as p,
21247
21247
  splitSignature as s
21248
21248
  };
21249
- //# sourceMappingURL=App-n-xKxOMT.js.map
21249
+ //# sourceMappingURL=App-DKwr3SmI.js.map