@1sat/connect 0.0.32 → 0.0.33
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/dist/index.js +25 -25
- package/package.json +32 -41
package/dist/index.js
CHANGED
|
@@ -100620,14 +100620,14 @@ async function connectWallet(config) {
|
|
|
100620
100620
|
saveLastProvider(result.provider);
|
|
100621
100621
|
return result;
|
|
100622
100622
|
}
|
|
100623
|
-
// ../../node_modules/.bun/nanostores@1.
|
|
100623
|
+
// ../../node_modules/.bun/nanostores@1.3.0/node_modules/nanostores/clean-stores/index.js
|
|
100624
100624
|
var clean2 = Symbol("clean");
|
|
100625
100625
|
|
|
100626
|
-
// ../../node_modules/.bun/nanostores@1.
|
|
100626
|
+
// ../../node_modules/.bun/nanostores@1.3.0/node_modules/nanostores/atom/index.js
|
|
100627
100627
|
var listenerQueue = [];
|
|
100628
100628
|
var lqIndex = 0;
|
|
100629
100629
|
var QUEUE_ITEMS_PER_LISTENER = 4;
|
|
100630
|
-
var
|
|
100630
|
+
var nanostoresGlobal = globalThis.nanostoresGlobal ||= { epoch: 0 };
|
|
100631
100631
|
var atom = (initialValue) => {
|
|
100632
100632
|
let listeners = [];
|
|
100633
100633
|
let $atom = {
|
|
@@ -100658,7 +100658,7 @@ var atom = (initialValue) => {
|
|
|
100658
100658
|
};
|
|
100659
100659
|
},
|
|
100660
100660
|
notify(oldValue, changedKey) {
|
|
100661
|
-
epoch++;
|
|
100661
|
+
nanostoresGlobal.epoch++;
|
|
100662
100662
|
let runListenerQueue = !listenerQueue.length;
|
|
100663
100663
|
for (let listener of listeners) {
|
|
100664
100664
|
listenerQueue.push(listener, $atom.value, oldValue, changedKey);
|
|
@@ -100694,7 +100694,7 @@ var atom = (initialValue) => {
|
|
|
100694
100694
|
}
|
|
100695
100695
|
return $atom;
|
|
100696
100696
|
};
|
|
100697
|
-
// ../../node_modules/.bun/nanostores@1.
|
|
100697
|
+
// ../../node_modules/.bun/nanostores@1.3.0/node_modules/nanostores/lifecycle/index.js
|
|
100698
100698
|
var MOUNT = 5;
|
|
100699
100699
|
var UNMOUNT = 6;
|
|
100700
100700
|
var REVERT_MUTATION = 10;
|
|
@@ -100766,7 +100766,7 @@ var onMount = ($store, initialize) => {
|
|
|
100766
100766
|
};
|
|
100767
100767
|
});
|
|
100768
100768
|
};
|
|
100769
|
-
// ../../node_modules/.bun/better-auth@1.6.5+
|
|
100769
|
+
// ../../node_modules/.bun/better-auth@1.6.5+7fd54d833fe5b310/node_modules/better-auth/dist/client/query.mjs
|
|
100770
100770
|
var isServer = () => typeof window === "undefined";
|
|
100771
100771
|
var useAuthQuery = (initializedAtom, path, $fetch, options) => {
|
|
100772
100772
|
const value = atom({
|
|
@@ -100979,7 +100979,7 @@ var InternalAPIError = class extends Error {
|
|
|
100979
100979
|
var kAPIErrorHeaderSymbol = Symbol.for("better-call:api-error-headers");
|
|
100980
100980
|
var APIError = makeErrorForHideStackFrame(InternalAPIError, Error);
|
|
100981
100981
|
|
|
100982
|
-
// ../../node_modules/.bun/@better-auth+core@1.6.5+
|
|
100982
|
+
// ../../node_modules/.bun/@better-auth+core@1.6.5+52327739b267453f/node_modules/@better-auth/core/dist/error/index.mjs
|
|
100983
100983
|
var BetterAuthError = class extends Error {
|
|
100984
100984
|
constructor(message, options) {
|
|
100985
100985
|
super(message, options);
|
|
@@ -100989,7 +100989,7 @@ var BetterAuthError = class extends Error {
|
|
|
100989
100989
|
}
|
|
100990
100990
|
};
|
|
100991
100991
|
|
|
100992
|
-
// ../../node_modules/.bun/@sigma-auth+better-auth-plugin@0.0.84+
|
|
100992
|
+
// ../../node_modules/.bun/@sigma-auth+better-auth-plugin@0.0.84+da88477f301ea18f/node_modules/@sigma-auth/better-auth-plugin/dist/client/local-signer.js
|
|
100993
100993
|
class LocalServerSigner {
|
|
100994
100994
|
baseUrl;
|
|
100995
100995
|
timeout;
|
|
@@ -101217,7 +101217,7 @@ class LocalServerSigner {
|
|
|
101217
101217
|
}
|
|
101218
101218
|
}
|
|
101219
101219
|
|
|
101220
|
-
// ../../node_modules/.bun/@sigma-auth+better-auth-plugin@0.0.84+
|
|
101220
|
+
// ../../node_modules/.bun/@sigma-auth+better-auth-plugin@0.0.84+da88477f301ea18f/node_modules/@sigma-auth/better-auth-plugin/dist/client/sigma-cwi.js
|
|
101221
101221
|
var isRecord3 = (v) => typeof v === "object" && v !== null;
|
|
101222
101222
|
var isResponse3 = (v) => isRecord3(v) && v.type === "CWI" && v.isInvocation === false && typeof v.id === "string";
|
|
101223
101223
|
var isState3 = (v) => isRecord3(v) && v.type === "CWI" && isRecord3(v.cwiState);
|
|
@@ -101458,7 +101458,7 @@ class SigmaCWISigner {
|
|
|
101458
101458
|
this.pending.clear();
|
|
101459
101459
|
}
|
|
101460
101460
|
}
|
|
101461
|
-
// ../../node_modules/.bun/@sigma-auth+better-auth-plugin@0.0.84+
|
|
101461
|
+
// ../../node_modules/.bun/@sigma-auth+better-auth-plugin@0.0.84+da88477f301ea18f/node_modules/@sigma-auth/better-auth-plugin/dist/client/signer.js
|
|
101462
101462
|
class SigmaIframeSigner {
|
|
101463
101463
|
iframe = null;
|
|
101464
101464
|
pendingRequests = new Map;
|
|
@@ -101856,7 +101856,7 @@ class SigmaIframeSigner {
|
|
|
101856
101856
|
this.rejectAllPending(new Error("Signer destroyed"));
|
|
101857
101857
|
}
|
|
101858
101858
|
}
|
|
101859
|
-
// ../../node_modules/.bun/@sigma-auth+better-auth-plugin@0.0.84+
|
|
101859
|
+
// ../../node_modules/.bun/@sigma-auth+better-auth-plugin@0.0.84+da88477f301ea18f/node_modules/@sigma-auth/better-auth-plugin/dist/client/index.js
|
|
101860
101860
|
var signer = null;
|
|
101861
101861
|
var signerType = null;
|
|
101862
101862
|
var storedBapId = null;
|
|
@@ -102364,7 +102364,7 @@ Backend: ${status} (${endpoint})`;
|
|
|
102364
102364
|
};
|
|
102365
102365
|
};
|
|
102366
102366
|
|
|
102367
|
-
// ../../node_modules/.bun/better-auth@1.6.5+
|
|
102367
|
+
// ../../node_modules/.bun/better-auth@1.6.5+7fd54d833fe5b310/node_modules/better-auth/dist/client/broadcast-channel.mjs
|
|
102368
102368
|
var kBroadcastChannel = Symbol.for("better-auth:broadcast-channel");
|
|
102369
102369
|
var now = () => Math.floor(Date.now() / 1000);
|
|
102370
102370
|
var WindowBroadcastChannel = class {
|
|
@@ -102412,7 +102412,7 @@ function getGlobalBroadcastChannel(name = "better-auth.message") {
|
|
|
102412
102412
|
return globalThis[kBroadcastChannel];
|
|
102413
102413
|
}
|
|
102414
102414
|
|
|
102415
|
-
// ../../node_modules/.bun/better-auth@1.6.5+
|
|
102415
|
+
// ../../node_modules/.bun/better-auth@1.6.5+7fd54d833fe5b310/node_modules/better-auth/dist/client/focus-manager.mjs
|
|
102416
102416
|
var kFocusManager = Symbol.for("better-auth:focus-manager");
|
|
102417
102417
|
var WindowFocusManager = class {
|
|
102418
102418
|
listeners = /* @__PURE__ */ new Set;
|
|
@@ -102444,7 +102444,7 @@ function getGlobalFocusManager() {
|
|
|
102444
102444
|
return globalThis[kFocusManager];
|
|
102445
102445
|
}
|
|
102446
102446
|
|
|
102447
|
-
// ../../node_modules/.bun/better-auth@1.6.5+
|
|
102447
|
+
// ../../node_modules/.bun/better-auth@1.6.5+7fd54d833fe5b310/node_modules/better-auth/dist/client/online-manager.mjs
|
|
102448
102448
|
var kOnlineManager = Symbol.for("better-auth:online-manager");
|
|
102449
102449
|
var WindowOnlineManager = class {
|
|
102450
102450
|
listeners = /* @__PURE__ */ new Set;
|
|
@@ -102478,7 +102478,7 @@ function getGlobalOnlineManager() {
|
|
|
102478
102478
|
return globalThis[kOnlineManager];
|
|
102479
102479
|
}
|
|
102480
102480
|
|
|
102481
|
-
// ../../node_modules/.bun/better-auth@1.6.5+
|
|
102481
|
+
// ../../node_modules/.bun/better-auth@1.6.5+7fd54d833fe5b310/node_modules/better-auth/dist/client/parser.mjs
|
|
102482
102482
|
var PROTO_POLLUTION_PATTERNS = {
|
|
102483
102483
|
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*:/,
|
|
102484
102484
|
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*:/,
|
|
@@ -102558,7 +102558,7 @@ function parseJSON(value, options = { strict: true }) {
|
|
|
102558
102558
|
return betterJSONParse(value, options);
|
|
102559
102559
|
}
|
|
102560
102560
|
|
|
102561
|
-
// ../../node_modules/.bun/better-auth@1.6.5+
|
|
102561
|
+
// ../../node_modules/.bun/better-auth@1.6.5+7fd54d833fe5b310/node_modules/better-auth/dist/client/session-refresh.mjs
|
|
102562
102562
|
var now2 = () => Math.floor(Date.now() / 1000);
|
|
102563
102563
|
function normalizeSessionResponse(res) {
|
|
102564
102564
|
if (typeof res === "object" && res !== null && "data" in res && "error" in res)
|
|
@@ -102698,7 +102698,7 @@ function createSessionRefreshManager(opts) {
|
|
|
102698
102698
|
};
|
|
102699
102699
|
}
|
|
102700
102700
|
|
|
102701
|
-
// ../../node_modules/.bun/@better-auth+core@1.6.5+
|
|
102701
|
+
// ../../node_modules/.bun/@better-auth+core@1.6.5+52327739b267453f/node_modules/@better-auth/core/dist/env/env-impl.mjs
|
|
102702
102702
|
var _envShim = Object.create(null);
|
|
102703
102703
|
var _getEnv = (useShim) => globalThis.process?.env || globalThis.Deno?.env.toObject() || globalThis.__env__ || (useShim ? _envShim : globalThis);
|
|
102704
102704
|
var env = new Proxy(_envShim, {
|
|
@@ -102758,7 +102758,7 @@ var ENV = Object.freeze({
|
|
|
102758
102758
|
return getEnvVar("BETTER_AUTH_TELEMETRY_ENDPOINT", "");
|
|
102759
102759
|
}
|
|
102760
102760
|
});
|
|
102761
|
-
// ../../node_modules/.bun/better-auth@1.6.5+
|
|
102761
|
+
// ../../node_modules/.bun/better-auth@1.6.5+7fd54d833fe5b310/node_modules/better-auth/dist/utils/url.mjs
|
|
102762
102762
|
function checkHasPath(url) {
|
|
102763
102763
|
try {
|
|
102764
102764
|
return (new URL(url).pathname.replace(/\/+$/, "") || "/") !== "/";
|
|
@@ -102842,7 +102842,7 @@ function getOrigin(url) {
|
|
|
102842
102842
|
}
|
|
102843
102843
|
}
|
|
102844
102844
|
|
|
102845
|
-
// ../../node_modules/.bun/better-auth@1.6.5+
|
|
102845
|
+
// ../../node_modules/.bun/better-auth@1.6.5+7fd54d833fe5b310/node_modules/better-auth/dist/client/fetch-plugins.mjs
|
|
102846
102846
|
var redirectPlugin = {
|
|
102847
102847
|
id: "redirect",
|
|
102848
102848
|
name: "Redirect",
|
|
@@ -102858,7 +102858,7 @@ var redirectPlugin = {
|
|
|
102858
102858
|
} }
|
|
102859
102859
|
};
|
|
102860
102860
|
|
|
102861
|
-
// ../../node_modules/.bun/better-auth@1.6.5+
|
|
102861
|
+
// ../../node_modules/.bun/better-auth@1.6.5+7fd54d833fe5b310/node_modules/better-auth/dist/client/session-atom.mjs
|
|
102862
102862
|
function getSessionAtom($fetch, options) {
|
|
102863
102863
|
const $signal = atom(false);
|
|
102864
102864
|
const session = useAuthQuery($signal, "/get-session", $fetch, { method: "GET" });
|
|
@@ -103514,7 +103514,7 @@ var betterFetch = async (url, options) => {
|
|
|
103514
103514
|
};
|
|
103515
103515
|
};
|
|
103516
103516
|
|
|
103517
|
-
// ../../node_modules/.bun/better-auth@1.6.5+
|
|
103517
|
+
// ../../node_modules/.bun/better-auth@1.6.5+7fd54d833fe5b310/node_modules/better-auth/dist/client/config.mjs
|
|
103518
103518
|
var resolvePublicAuthUrl = (basePath) => {
|
|
103519
103519
|
if (typeof process === "undefined")
|
|
103520
103520
|
return;
|
|
@@ -103624,12 +103624,12 @@ var getClientConfig = (options, loadEnv) => {
|
|
|
103624
103624
|
};
|
|
103625
103625
|
};
|
|
103626
103626
|
|
|
103627
|
-
// ../../node_modules/.bun/better-auth@1.6.5+
|
|
103627
|
+
// ../../node_modules/.bun/better-auth@1.6.5+7fd54d833fe5b310/node_modules/better-auth/dist/utils/is-atom.mjs
|
|
103628
103628
|
function isAtom(value) {
|
|
103629
103629
|
return typeof value === "object" && value !== null && "get" in value && typeof value.get === "function" && "lc" in value && typeof value.lc === "number";
|
|
103630
103630
|
}
|
|
103631
103631
|
|
|
103632
|
-
// ../../node_modules/.bun/better-auth@1.6.5+
|
|
103632
|
+
// ../../node_modules/.bun/better-auth@1.6.5+7fd54d833fe5b310/node_modules/better-auth/dist/client/proxy.mjs
|
|
103633
103633
|
function getMethod3(path, knownPathMethods, args) {
|
|
103634
103634
|
const method = knownPathMethods[path];
|
|
103635
103635
|
const { fetchOptions, query: _query, ...body } = args || {};
|
|
@@ -103711,12 +103711,12 @@ function createDynamicPathProxy(routes, client, knownPathMethods, atoms, atomLis
|
|
|
103711
103711
|
return createProxy();
|
|
103712
103712
|
}
|
|
103713
103713
|
|
|
103714
|
-
// ../../node_modules/.bun/@better-auth+core@1.6.5+
|
|
103714
|
+
// ../../node_modules/.bun/@better-auth+core@1.6.5+52327739b267453f/node_modules/@better-auth/core/dist/utils/string.mjs
|
|
103715
103715
|
function capitalizeFirstLetter(str) {
|
|
103716
103716
|
return str.charAt(0).toUpperCase() + str.slice(1);
|
|
103717
103717
|
}
|
|
103718
103718
|
|
|
103719
|
-
// ../../node_modules/.bun/better-auth@1.6.5+
|
|
103719
|
+
// ../../node_modules/.bun/better-auth@1.6.5+7fd54d833fe5b310/node_modules/better-auth/dist/client/vanilla.mjs
|
|
103720
103720
|
function createAuthClient(options) {
|
|
103721
103721
|
const { pluginPathMethods, pluginsActions, pluginsAtoms, $fetch, atomListeners, $store } = getClientConfig(options);
|
|
103722
103722
|
const resolvedHooks = {};
|
package/package.json
CHANGED
|
@@ -1,43 +1,34 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
"eventemitter3": "^5.0.1"
|
|
35
|
-
},
|
|
36
|
-
"peerDependencies": {
|
|
37
|
-
"@bsv/sdk": "^2.0.13"
|
|
38
|
-
},
|
|
39
|
-
"devDependencies": {
|
|
40
|
-
"@bsv/sdk": "^2.0.13",
|
|
41
|
-
"typescript": "^5.9.3"
|
|
42
|
-
}
|
|
2
|
+
"name": "@1sat/connect",
|
|
3
|
+
"version": "0.0.33",
|
|
4
|
+
"description": "Connection layer for 1Sat wallet - popup flow, events, session management",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/index.js",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"import": "./dist/index.js"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"files": ["dist"],
|
|
15
|
+
"scripts": {
|
|
16
|
+
"build": "bun build ./src/index.ts --outdir ./dist --target browser && tsc --emitDeclarationOnly",
|
|
17
|
+
"dev": "tsc --watch"
|
|
18
|
+
},
|
|
19
|
+
"keywords": ["1sat", "bsv", "ordinals", "wallet", "sdk", "connect"],
|
|
20
|
+
"license": "MIT",
|
|
21
|
+
"dependencies": {
|
|
22
|
+
"@1sat/wallet": "0.0.45",
|
|
23
|
+
"@sigma-auth/better-auth-plugin": "^0.0.84",
|
|
24
|
+
"better-auth": "^1.5.4",
|
|
25
|
+
"eventemitter3": "^5.0.1"
|
|
26
|
+
},
|
|
27
|
+
"peerDependencies": {
|
|
28
|
+
"@bsv/sdk": "^2.0.13"
|
|
29
|
+
},
|
|
30
|
+
"devDependencies": {
|
|
31
|
+
"@bsv/sdk": "^2.0.13",
|
|
32
|
+
"typescript": "^5.9.3"
|
|
33
|
+
}
|
|
43
34
|
}
|