@omnisat/lasereyes 0.0.39 → 0.0.41
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 +8 -2
- package/dist/index.mjs +8 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1396,8 +1396,9 @@ var LaserEyesProvider = ({
|
|
|
1396
1396
|
if (provider === UNISAT) {
|
|
1397
1397
|
return yield library == null ? void 0 : library.signMessage(message);
|
|
1398
1398
|
} else if (provider === XVERSE) {
|
|
1399
|
+
const tempAddy = toSignAddress || paymentAddress;
|
|
1399
1400
|
const response = yield (0, import_sats_connect.request)("signMessage", {
|
|
1400
|
-
address:
|
|
1401
|
+
address: tempAddy,
|
|
1401
1402
|
message
|
|
1402
1403
|
});
|
|
1403
1404
|
if (response.status === "success") {
|
|
@@ -1438,10 +1439,15 @@ var LaserEyesProvider = ({
|
|
|
1438
1439
|
} else if (provider === OKX) {
|
|
1439
1440
|
return yield library == null ? void 0 : library.signMessage(message);
|
|
1440
1441
|
} else if (provider === LEATHER) {
|
|
1442
|
+
const paymentType = toSignAddress === address2 ? P2TR : P2WPKH;
|
|
1443
|
+
if (toSignAddress !== address2 && toSignAddress !== paymentAddress) {
|
|
1444
|
+
throw new Error("Invalid address to sign message");
|
|
1445
|
+
}
|
|
1441
1446
|
const signed = yield library == null ? void 0 : library.request("signMessage", {
|
|
1442
1447
|
message,
|
|
1443
|
-
paymentType
|
|
1448
|
+
paymentType
|
|
1444
1449
|
});
|
|
1450
|
+
console.log("signed", signed);
|
|
1445
1451
|
return (_a = signed == null ? void 0 : signed.result) == null ? void 0 : _a.signature;
|
|
1446
1452
|
} else if (provider === PHANTOM) {
|
|
1447
1453
|
const utf8Bytes = new TextEncoder().encode(message);
|
package/dist/index.mjs
CHANGED
|
@@ -1308,8 +1308,9 @@ var LaserEyesProvider = ({
|
|
|
1308
1308
|
if (provider === UNISAT) {
|
|
1309
1309
|
return yield library == null ? void 0 : library.signMessage(message);
|
|
1310
1310
|
} else if (provider === XVERSE) {
|
|
1311
|
+
const tempAddy = toSignAddress || paymentAddress;
|
|
1311
1312
|
const response = yield request("signMessage", {
|
|
1312
|
-
address:
|
|
1313
|
+
address: tempAddy,
|
|
1313
1314
|
message
|
|
1314
1315
|
});
|
|
1315
1316
|
if (response.status === "success") {
|
|
@@ -1350,10 +1351,15 @@ var LaserEyesProvider = ({
|
|
|
1350
1351
|
} else if (provider === OKX) {
|
|
1351
1352
|
return yield library == null ? void 0 : library.signMessage(message);
|
|
1352
1353
|
} else if (provider === LEATHER) {
|
|
1354
|
+
const paymentType = toSignAddress === address2 ? P2TR : P2WPKH;
|
|
1355
|
+
if (toSignAddress !== address2 && toSignAddress !== paymentAddress) {
|
|
1356
|
+
throw new Error("Invalid address to sign message");
|
|
1357
|
+
}
|
|
1353
1358
|
const signed = yield library == null ? void 0 : library.request("signMessage", {
|
|
1354
1359
|
message,
|
|
1355
|
-
paymentType
|
|
1360
|
+
paymentType
|
|
1356
1361
|
});
|
|
1362
|
+
console.log("signed", signed);
|
|
1357
1363
|
return (_a = signed == null ? void 0 : signed.result) == null ? void 0 : _a.signature;
|
|
1358
1364
|
} else if (provider === PHANTOM) {
|
|
1359
1365
|
const utf8Bytes = new TextEncoder().encode(message);
|