@1sat/connect 0.0.17 → 0.0.19

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 +6 -4
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -41097,7 +41097,7 @@ var chromeTransport = (action, params) => {
41097
41097
  var createChromeCWI = () => createCWI(chromeTransport);
41098
41098
  var ChromeCWI = createChromeCWI();
41099
41099
  // ../wallet/dist/cwi/web.js
41100
- var DEFAULT_WALLET_URL = "https://1sat.market";
41100
+ var DEFAULT_WALLET_URL = "https://1satwallet.com";
41101
41101
  var DEFAULT_IFRAME_PATH = "/wallet/cwi";
41102
41102
  var DEFAULT_REQUEST_TIMEOUT_MS = 120000;
41103
41103
  var DEFAULT_HANDSHAKE_TIMEOUT_MS = 5000;
@@ -41322,7 +41322,7 @@ function createSigmaCWI(config) {
41322
41322
  const data = event.data;
41323
41323
  if (isState2(data)) {
41324
41324
  const { status, hasPermission } = data.cwiState;
41325
- if (status === "need_password" || hasPermission) {
41325
+ if (status === "need_password" || status === "need_biometric" || hasPermission) {
41326
41326
  updateIframeVisibility(true);
41327
41327
  } else {
41328
41328
  updateIframeVisibility(false);
@@ -41368,6 +41368,7 @@ function createSigmaCWI(config) {
41368
41368
  "pointer-events: none",
41369
41369
  "z-index: 2147483647"
41370
41370
  ].join("; ");
41371
+ el.setAttribute("allow", "publickey-credentials-get *");
41371
41372
  const parent = document.body ?? document.documentElement;
41372
41373
  if (!parent)
41373
41374
  throw new Error("Unable to mount Sigma CWI iframe");
@@ -41426,7 +41427,8 @@ function createSigmaCWI(config) {
41426
41427
  }
41427
41428
  });
41428
41429
  };
41429
- const sendCustomMessage = (type, payload) => {
41430
+ const sendCustomMessage = async (type, payload) => {
41431
+ await waitForHandshake();
41430
41432
  const target = iframe?.contentWindow;
41431
41433
  if (!target)
41432
41434
  return;
@@ -45163,7 +45165,7 @@ async function connectSigmaWallet(bapId) {
45163
45165
  const cwiConfig = { sigmaUrl: SIGMA_URL };
45164
45166
  const { wallet: wallet2, destroy, sendCustomMessage } = createSigmaCWI(cwiConfig);
45165
45167
  setSigmaIdentity(bapId);
45166
- sendCustomMessage("SET_IDENTITY", { bapId });
45168
+ await sendCustomMessage("SET_IDENTITY", { bapId });
45167
45169
  await wallet2.waitForAuthentication({});
45168
45170
  const { publicKey } = await wallet2.getPublicKey({ identityKey: true });
45169
45171
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@1sat/connect",
3
- "version": "0.0.17",
3
+ "version": "0.0.19",
4
4
  "description": "Connection layer for 1Sat wallet - popup flow, events, session management",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -19,7 +19,7 @@
19
19
  "keywords": ["1sat", "bsv", "ordinals", "wallet", "sdk", "connect"],
20
20
  "license": "MIT",
21
21
  "dependencies": {
22
- "@1sat/wallet": "0.0.26",
22
+ "@1sat/wallet": "0.0.28",
23
23
  "@sigma-auth/better-auth-plugin": "^0.0.84",
24
24
  "better-auth": "^1.5.4",
25
25
  "eventemitter3": "^5.0.1"