@1sat/connect 0.0.49 → 0.0.50

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +21 -74
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -100057,59 +100057,6 @@ function createSigmaCWI(config) {
100057
100057
  };
100058
100058
  return { wallet: createCWI(transport), destroy, sendCustomMessage };
100059
100059
  }
100060
- // ../wallet/dist/backupRegistration.js
100061
- class BackupRegistration {
100062
- opts;
100063
- pending;
100064
- attempting = new Set;
100065
- attempts = new Map;
100066
- timers = new Map;
100067
- stopped = false;
100068
- constructor(opts) {
100069
- this.opts = opts;
100070
- this.pending = new Set(opts.urls);
100071
- }
100072
- start() {
100073
- for (const url of this.pending)
100074
- this.attempt(url);
100075
- }
100076
- stop() {
100077
- this.stopped = true;
100078
- for (const t of this.timers.values())
100079
- clearTimeout(t);
100080
- this.timers.clear();
100081
- }
100082
- attempt(url) {
100083
- if (this.stopped)
100084
- return;
100085
- if (!this.pending.has(url))
100086
- return;
100087
- if (this.attempting.has(url))
100088
- return;
100089
- this.attempting.add(url);
100090
- const count = (this.attempts.get(url) ?? 0) + 1;
100091
- this.attempts.set(url, count);
100092
- (async () => {
100093
- try {
100094
- await this.opts.register(url);
100095
- this.pending.delete(url);
100096
- this.attempts.delete(url);
100097
- } catch (err) {
100098
- if (this.opts.onError)
100099
- this.opts.onError(url, err, count);
100100
- if (!this.stopped && this.pending.has(url)) {
100101
- const t = setTimeout(() => {
100102
- this.timers.delete(url);
100103
- this.attempt(url);
100104
- }, this.opts.retryMsecs);
100105
- this.timers.set(url, t);
100106
- }
100107
- } finally {
100108
- this.attempting.delete(url);
100109
- }
100110
- })();
100111
- }
100112
- }
100113
100060
  // ../wallet/dist/permissions/key.js
100114
100061
  var DEFAULT_PORTS = {
100115
100062
  "http:": "80",
@@ -100905,7 +100852,7 @@ var onMount = ($store, initialize) => {
100905
100852
  };
100906
100853
  });
100907
100854
  };
100908
- // ../../node_modules/.bun/better-auth@1.6.9+5b359f2b516881c0/node_modules/better-auth/dist/client/query.mjs
100855
+ // ../../node_modules/.bun/better-auth@1.6.9+29364d72b6645b13/node_modules/better-auth/dist/client/query.mjs
100909
100856
  var isServer = () => typeof window === "undefined";
100910
100857
  var useAuthQuery = (initializedAtom, path, $fetch, options) => {
100911
100858
  const value = atom({
@@ -101004,7 +100951,7 @@ var useAuthQuery = (initializedAtom, path, $fetch, options) => {
101004
100951
  return value;
101005
100952
  };
101006
100953
 
101007
- // ../../node_modules/.bun/better-call@1.3.5+3c5d820c62823f0b/node_modules/better-call/dist/error.mjs
100954
+ // ../../node_modules/.bun/better-call@1.3.5+6eee28663eec23d9/node_modules/better-call/dist/error.mjs
101008
100955
  function isErrorStackTraceLimitWritable() {
101009
100956
  const desc = Object.getOwnPropertyDescriptor(Error, "stackTraceLimit");
101010
100957
  if (desc === undefined)
@@ -101118,7 +101065,7 @@ var InternalAPIError = class extends Error {
101118
101065
  var kAPIErrorHeaderSymbol = Symbol.for("better-call:api-error-headers");
101119
101066
  var APIError = makeErrorForHideStackFrame(InternalAPIError, Error);
101120
101067
 
101121
- // ../../node_modules/.bun/@better-auth+core@1.6.9+52327739b267453f/node_modules/@better-auth/core/dist/error/index.mjs
101068
+ // ../../node_modules/.bun/@better-auth+core@1.6.9+bc248d5ac810b69a/node_modules/@better-auth/core/dist/error/index.mjs
101122
101069
  var BetterAuthError = class extends Error {
101123
101070
  constructor(message, options) {
101124
101071
  super(message, options);
@@ -101128,7 +101075,7 @@ var BetterAuthError = class extends Error {
101128
101075
  }
101129
101076
  };
101130
101077
 
101131
- // ../../node_modules/.bun/@sigma-auth+better-auth-plugin@0.0.84+9f726a97e5e0cb02/node_modules/@sigma-auth/better-auth-plugin/dist/client/local-signer.js
101078
+ // ../../node_modules/.bun/@sigma-auth+better-auth-plugin@0.0.84+bb929f0b4951eb5f/node_modules/@sigma-auth/better-auth-plugin/dist/client/local-signer.js
101132
101079
  class LocalServerSigner {
101133
101080
  baseUrl;
101134
101081
  timeout;
@@ -101356,7 +101303,7 @@ class LocalServerSigner {
101356
101303
  }
101357
101304
  }
101358
101305
 
101359
- // ../../node_modules/.bun/@sigma-auth+better-auth-plugin@0.0.84+9f726a97e5e0cb02/node_modules/@sigma-auth/better-auth-plugin/dist/client/sigma-cwi.js
101306
+ // ../../node_modules/.bun/@sigma-auth+better-auth-plugin@0.0.84+bb929f0b4951eb5f/node_modules/@sigma-auth/better-auth-plugin/dist/client/sigma-cwi.js
101360
101307
  var isRecord3 = (v) => typeof v === "object" && v !== null;
101361
101308
  var isResponse3 = (v) => isRecord3(v) && v.type === "CWI" && v.isInvocation === false && typeof v.id === "string";
101362
101309
  var isState3 = (v) => isRecord3(v) && v.type === "CWI" && isRecord3(v.cwiState);
@@ -101597,7 +101544,7 @@ class SigmaCWISigner {
101597
101544
  this.pending.clear();
101598
101545
  }
101599
101546
  }
101600
- // ../../node_modules/.bun/@sigma-auth+better-auth-plugin@0.0.84+9f726a97e5e0cb02/node_modules/@sigma-auth/better-auth-plugin/dist/client/signer.js
101547
+ // ../../node_modules/.bun/@sigma-auth+better-auth-plugin@0.0.84+bb929f0b4951eb5f/node_modules/@sigma-auth/better-auth-plugin/dist/client/signer.js
101601
101548
  class SigmaIframeSigner {
101602
101549
  iframe = null;
101603
101550
  pendingRequests = new Map;
@@ -101995,7 +101942,7 @@ class SigmaIframeSigner {
101995
101942
  this.rejectAllPending(new Error("Signer destroyed"));
101996
101943
  }
101997
101944
  }
101998
- // ../../node_modules/.bun/@sigma-auth+better-auth-plugin@0.0.84+9f726a97e5e0cb02/node_modules/@sigma-auth/better-auth-plugin/dist/client/index.js
101945
+ // ../../node_modules/.bun/@sigma-auth+better-auth-plugin@0.0.84+bb929f0b4951eb5f/node_modules/@sigma-auth/better-auth-plugin/dist/client/index.js
101999
101946
  var signer = null;
102000
101947
  var signerType = null;
102001
101948
  var storedBapId = null;
@@ -102503,7 +102450,7 @@ Backend: ${status} (${endpoint})`;
102503
102450
  };
102504
102451
  };
102505
102452
 
102506
- // ../../node_modules/.bun/better-auth@1.6.9+5b359f2b516881c0/node_modules/better-auth/dist/client/broadcast-channel.mjs
102453
+ // ../../node_modules/.bun/better-auth@1.6.9+29364d72b6645b13/node_modules/better-auth/dist/client/broadcast-channel.mjs
102507
102454
  var kBroadcastChannel = Symbol.for("better-auth:broadcast-channel");
102508
102455
  var now = () => Math.floor(Date.now() / 1000);
102509
102456
  var WindowBroadcastChannel = class {
@@ -102551,7 +102498,7 @@ function getGlobalBroadcastChannel(name = "better-auth.message") {
102551
102498
  return globalThis[kBroadcastChannel];
102552
102499
  }
102553
102500
 
102554
- // ../../node_modules/.bun/better-auth@1.6.9+5b359f2b516881c0/node_modules/better-auth/dist/client/focus-manager.mjs
102501
+ // ../../node_modules/.bun/better-auth@1.6.9+29364d72b6645b13/node_modules/better-auth/dist/client/focus-manager.mjs
102555
102502
  var kFocusManager = Symbol.for("better-auth:focus-manager");
102556
102503
  var WindowFocusManager = class {
102557
102504
  listeners = /* @__PURE__ */ new Set;
@@ -102583,7 +102530,7 @@ function getGlobalFocusManager() {
102583
102530
  return globalThis[kFocusManager];
102584
102531
  }
102585
102532
 
102586
- // ../../node_modules/.bun/better-auth@1.6.9+5b359f2b516881c0/node_modules/better-auth/dist/client/online-manager.mjs
102533
+ // ../../node_modules/.bun/better-auth@1.6.9+29364d72b6645b13/node_modules/better-auth/dist/client/online-manager.mjs
102587
102534
  var kOnlineManager = Symbol.for("better-auth:online-manager");
102588
102535
  var WindowOnlineManager = class {
102589
102536
  listeners = /* @__PURE__ */ new Set;
@@ -102617,7 +102564,7 @@ function getGlobalOnlineManager() {
102617
102564
  return globalThis[kOnlineManager];
102618
102565
  }
102619
102566
 
102620
- // ../../node_modules/.bun/better-auth@1.6.9+5b359f2b516881c0/node_modules/better-auth/dist/client/parser.mjs
102567
+ // ../../node_modules/.bun/better-auth@1.6.9+29364d72b6645b13/node_modules/better-auth/dist/client/parser.mjs
102621
102568
  var PROTO_POLLUTION_PATTERNS = {
102622
102569
  proto: /"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,
102623
102570
  constructor: /"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,
@@ -102697,7 +102644,7 @@ function parseJSON(value, options = { strict: true }) {
102697
102644
  return betterJSONParse(value, options);
102698
102645
  }
102699
102646
 
102700
- // ../../node_modules/.bun/better-auth@1.6.9+5b359f2b516881c0/node_modules/better-auth/dist/client/session-refresh.mjs
102647
+ // ../../node_modules/.bun/better-auth@1.6.9+29364d72b6645b13/node_modules/better-auth/dist/client/session-refresh.mjs
102701
102648
  var now2 = () => Math.floor(Date.now() / 1000);
102702
102649
  function normalizeSessionResponse(res) {
102703
102650
  if (typeof res === "object" && res !== null && "data" in res && "error" in res)
@@ -102837,7 +102784,7 @@ function createSessionRefreshManager(opts) {
102837
102784
  };
102838
102785
  }
102839
102786
 
102840
- // ../../node_modules/.bun/@better-auth+core@1.6.9+52327739b267453f/node_modules/@better-auth/core/dist/env/env-impl.mjs
102787
+ // ../../node_modules/.bun/@better-auth+core@1.6.9+bc248d5ac810b69a/node_modules/@better-auth/core/dist/env/env-impl.mjs
102841
102788
  var _envShim = Object.create(null);
102842
102789
  var _getEnv = (useShim) => globalThis.process?.env || globalThis.Deno?.env.toObject() || globalThis.__env__ || (useShim ? _envShim : globalThis);
102843
102790
  var env = new Proxy(_envShim, {
@@ -102897,7 +102844,7 @@ var ENV = Object.freeze({
102897
102844
  return getEnvVar("BETTER_AUTH_TELEMETRY_ENDPOINT", "");
102898
102845
  }
102899
102846
  });
102900
- // ../../node_modules/.bun/better-auth@1.6.9+5b359f2b516881c0/node_modules/better-auth/dist/utils/url.mjs
102847
+ // ../../node_modules/.bun/better-auth@1.6.9+29364d72b6645b13/node_modules/better-auth/dist/utils/url.mjs
102901
102848
  function checkHasPath(url) {
102902
102849
  try {
102903
102850
  return (new URL(url).pathname.replace(/\/+$/, "") || "/") !== "/";
@@ -102981,7 +102928,7 @@ function getOrigin(url) {
102981
102928
  }
102982
102929
  }
102983
102930
 
102984
- // ../../node_modules/.bun/better-auth@1.6.9+5b359f2b516881c0/node_modules/better-auth/dist/client/fetch-plugins.mjs
102931
+ // ../../node_modules/.bun/better-auth@1.6.9+29364d72b6645b13/node_modules/better-auth/dist/client/fetch-plugins.mjs
102985
102932
  var redirectPlugin = {
102986
102933
  id: "redirect",
102987
102934
  name: "Redirect",
@@ -102997,7 +102944,7 @@ var redirectPlugin = {
102997
102944
  } }
102998
102945
  };
102999
102946
 
103000
- // ../../node_modules/.bun/better-auth@1.6.9+5b359f2b516881c0/node_modules/better-auth/dist/client/session-atom.mjs
102947
+ // ../../node_modules/.bun/better-auth@1.6.9+29364d72b6645b13/node_modules/better-auth/dist/client/session-atom.mjs
103001
102948
  function getSessionAtom($fetch, options) {
103002
102949
  const $signal = atom(false);
103003
102950
  const session = useAuthQuery($signal, "/get-session", $fetch, { method: "GET" });
@@ -103653,7 +103600,7 @@ var betterFetch = async (url, options) => {
103653
103600
  };
103654
103601
  };
103655
103602
 
103656
- // ../../node_modules/.bun/better-auth@1.6.9+5b359f2b516881c0/node_modules/better-auth/dist/client/config.mjs
103603
+ // ../../node_modules/.bun/better-auth@1.6.9+29364d72b6645b13/node_modules/better-auth/dist/client/config.mjs
103657
103604
  var resolvePublicAuthUrl = (basePath) => {
103658
103605
  if (typeof process === "undefined")
103659
103606
  return;
@@ -103763,12 +103710,12 @@ var getClientConfig = (options, loadEnv) => {
103763
103710
  };
103764
103711
  };
103765
103712
 
103766
- // ../../node_modules/.bun/better-auth@1.6.9+5b359f2b516881c0/node_modules/better-auth/dist/utils/is-atom.mjs
103713
+ // ../../node_modules/.bun/better-auth@1.6.9+29364d72b6645b13/node_modules/better-auth/dist/utils/is-atom.mjs
103767
103714
  function isAtom(value) {
103768
103715
  return typeof value === "object" && value !== null && "get" in value && typeof value.get === "function" && "lc" in value && typeof value.lc === "number";
103769
103716
  }
103770
103717
 
103771
- // ../../node_modules/.bun/better-auth@1.6.9+5b359f2b516881c0/node_modules/better-auth/dist/client/proxy.mjs
103718
+ // ../../node_modules/.bun/better-auth@1.6.9+29364d72b6645b13/node_modules/better-auth/dist/client/proxy.mjs
103772
103719
  function getMethod3(path, knownPathMethods, args) {
103773
103720
  const method = knownPathMethods[path];
103774
103721
  const { fetchOptions, query: _query, ...body } = args || {};
@@ -103850,12 +103797,12 @@ function createDynamicPathProxy(routes, client, knownPathMethods, atoms, atomLis
103850
103797
  return createProxy();
103851
103798
  }
103852
103799
 
103853
- // ../../node_modules/.bun/@better-auth+core@1.6.9+52327739b267453f/node_modules/@better-auth/core/dist/utils/string.mjs
103800
+ // ../../node_modules/.bun/@better-auth+core@1.6.9+bc248d5ac810b69a/node_modules/@better-auth/core/dist/utils/string.mjs
103854
103801
  function capitalizeFirstLetter(str) {
103855
103802
  return str.charAt(0).toUpperCase() + str.slice(1);
103856
103803
  }
103857
103804
 
103858
- // ../../node_modules/.bun/better-auth@1.6.9+5b359f2b516881c0/node_modules/better-auth/dist/client/vanilla.mjs
103805
+ // ../../node_modules/.bun/better-auth@1.6.9+29364d72b6645b13/node_modules/better-auth/dist/client/vanilla.mjs
103859
103806
  function createAuthClient(options) {
103860
103807
  const { pluginPathMethods, pluginsActions, pluginsAtoms, $fetch, atomListeners, $store } = getClientConfig(options);
103861
103808
  const resolvedHooks = {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@1sat/connect",
3
- "version": "0.0.49",
3
+ "version": "0.0.50",
4
4
  "description": "Connection layer for 1Sat wallet - popup flow, events, session management",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -28,7 +28,7 @@
28
28
  ],
29
29
  "license": "MIT",
30
30
  "dependencies": {
31
- "@1sat/wallet": "0.0.63",
31
+ "@1sat/wallet": "0.0.66",
32
32
  "@sigma-auth/better-auth-plugin": "^0.0.84",
33
33
  "better-auth": "^1.5.4",
34
34
  "eventemitter3": "^5.0.1"