@omnisat/lasereyes 0.0.36 → 0.0.38
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 +31 -17
- package/dist/index.mjs +33 -17
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1002,6 +1002,8 @@ var LaserEyesProvider = ({
|
|
|
1002
1002
|
yield connectXverse();
|
|
1003
1003
|
} else if (walletName === OYL) {
|
|
1004
1004
|
yield connectOyl();
|
|
1005
|
+
} else if (walletName === MAGIC_EDEN) {
|
|
1006
|
+
yield connectMagicEden();
|
|
1005
1007
|
} else if (walletName === LEATHER) {
|
|
1006
1008
|
yield connectLeather();
|
|
1007
1009
|
} else {
|
|
@@ -1326,20 +1328,31 @@ var LaserEyesProvider = ({
|
|
|
1326
1328
|
throw new Error("Error sending BTC");
|
|
1327
1329
|
return psbt.txId;
|
|
1328
1330
|
} else if (provider === MAGIC_EDEN) {
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1331
|
+
let sendResponse;
|
|
1332
|
+
yield (0, import_sats_connect.sendBtcTransaction)({
|
|
1333
|
+
getProvider: () => __async(void 0, null, function* () {
|
|
1334
|
+
return library;
|
|
1335
|
+
}),
|
|
1336
|
+
payload: {
|
|
1337
|
+
network: {
|
|
1338
|
+
type: getXverseNetwork(network)
|
|
1339
|
+
},
|
|
1340
|
+
recipients: [
|
|
1341
|
+
{
|
|
1342
|
+
address: to,
|
|
1343
|
+
amountSats: BigInt(amount)
|
|
1344
|
+
}
|
|
1345
|
+
],
|
|
1346
|
+
senderAddress: paymentAddress
|
|
1347
|
+
},
|
|
1348
|
+
onFinish: (response) => {
|
|
1349
|
+
sendResponse = response;
|
|
1350
|
+
},
|
|
1351
|
+
onCancel: () => alert("Canceled")
|
|
1352
|
+
});
|
|
1353
|
+
if (!sendResponse)
|
|
1341
1354
|
throw new Error("Error sending BTC");
|
|
1342
|
-
return
|
|
1355
|
+
return sendResponse.txid;
|
|
1343
1356
|
} else if (provider === OKX) {
|
|
1344
1357
|
const txId = yield library == null ? void 0 : library.sendBitcoin(to, amount);
|
|
1345
1358
|
if (!txId)
|
|
@@ -1410,7 +1423,8 @@ var LaserEyesProvider = ({
|
|
|
1410
1423
|
type: import_sats_connect.BitcoinNetworkType.Mainnet
|
|
1411
1424
|
},
|
|
1412
1425
|
address: paymentAddress,
|
|
1413
|
-
message
|
|
1426
|
+
message,
|
|
1427
|
+
protocol: import_sats_connect.MessageSigningProtocols.BIP322
|
|
1414
1428
|
},
|
|
1415
1429
|
onFinish: (response) => {
|
|
1416
1430
|
signedMessage = response;
|
|
@@ -1622,14 +1636,14 @@ var LaserEyesProvider = ({
|
|
|
1622
1636
|
inputsToSign.push(paymentsAddressData);
|
|
1623
1637
|
}
|
|
1624
1638
|
let txId, signedPsbtHex, signedPsbtBase64;
|
|
1625
|
-
const
|
|
1639
|
+
const magicEdenNetwork = getXverseNetwork(network);
|
|
1626
1640
|
const signPsbtOptions = {
|
|
1627
1641
|
getProvider: () => __async(void 0, null, function* () {
|
|
1628
|
-
return
|
|
1642
|
+
return library;
|
|
1629
1643
|
}),
|
|
1630
1644
|
payload: {
|
|
1631
1645
|
network: {
|
|
1632
|
-
type:
|
|
1646
|
+
type: magicEdenNetwork
|
|
1633
1647
|
},
|
|
1634
1648
|
message: "Sign Transaction",
|
|
1635
1649
|
psbtBase64: toSignPsbt.toBase64(),
|
package/dist/index.mjs
CHANGED
|
@@ -439,8 +439,10 @@ function delay(ms) {
|
|
|
439
439
|
import {
|
|
440
440
|
BitcoinNetworkType,
|
|
441
441
|
getAddress,
|
|
442
|
+
MessageSigningProtocols,
|
|
442
443
|
request,
|
|
443
444
|
RpcErrorCode,
|
|
445
|
+
sendBtcTransaction,
|
|
444
446
|
signMessage as signMessageSatsConnect,
|
|
445
447
|
signTransaction
|
|
446
448
|
} from "sats-connect";
|
|
@@ -912,6 +914,8 @@ var LaserEyesProvider = ({
|
|
|
912
914
|
yield connectXverse();
|
|
913
915
|
} else if (walletName === OYL) {
|
|
914
916
|
yield connectOyl();
|
|
917
|
+
} else if (walletName === MAGIC_EDEN) {
|
|
918
|
+
yield connectMagicEden();
|
|
915
919
|
} else if (walletName === LEATHER) {
|
|
916
920
|
yield connectLeather();
|
|
917
921
|
} else {
|
|
@@ -1236,20 +1240,31 @@ var LaserEyesProvider = ({
|
|
|
1236
1240
|
throw new Error("Error sending BTC");
|
|
1237
1241
|
return psbt.txId;
|
|
1238
1242
|
} else if (provider === MAGIC_EDEN) {
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1243
|
+
let sendResponse;
|
|
1244
|
+
yield sendBtcTransaction({
|
|
1245
|
+
getProvider: () => __async(void 0, null, function* () {
|
|
1246
|
+
return library;
|
|
1247
|
+
}),
|
|
1248
|
+
payload: {
|
|
1249
|
+
network: {
|
|
1250
|
+
type: getXverseNetwork(network)
|
|
1251
|
+
},
|
|
1252
|
+
recipients: [
|
|
1253
|
+
{
|
|
1254
|
+
address: to,
|
|
1255
|
+
amountSats: BigInt(amount)
|
|
1256
|
+
}
|
|
1257
|
+
],
|
|
1258
|
+
senderAddress: paymentAddress
|
|
1259
|
+
},
|
|
1260
|
+
onFinish: (response) => {
|
|
1261
|
+
sendResponse = response;
|
|
1262
|
+
},
|
|
1263
|
+
onCancel: () => alert("Canceled")
|
|
1264
|
+
});
|
|
1265
|
+
if (!sendResponse)
|
|
1251
1266
|
throw new Error("Error sending BTC");
|
|
1252
|
-
return
|
|
1267
|
+
return sendResponse.txid;
|
|
1253
1268
|
} else if (provider === OKX) {
|
|
1254
1269
|
const txId = yield library == null ? void 0 : library.sendBitcoin(to, amount);
|
|
1255
1270
|
if (!txId)
|
|
@@ -1320,7 +1335,8 @@ var LaserEyesProvider = ({
|
|
|
1320
1335
|
type: BitcoinNetworkType.Mainnet
|
|
1321
1336
|
},
|
|
1322
1337
|
address: paymentAddress,
|
|
1323
|
-
message
|
|
1338
|
+
message,
|
|
1339
|
+
protocol: MessageSigningProtocols.BIP322
|
|
1324
1340
|
},
|
|
1325
1341
|
onFinish: (response) => {
|
|
1326
1342
|
signedMessage = response;
|
|
@@ -1532,14 +1548,14 @@ var LaserEyesProvider = ({
|
|
|
1532
1548
|
inputsToSign.push(paymentsAddressData);
|
|
1533
1549
|
}
|
|
1534
1550
|
let txId, signedPsbtHex, signedPsbtBase64;
|
|
1535
|
-
const
|
|
1551
|
+
const magicEdenNetwork = getXverseNetwork(network);
|
|
1536
1552
|
const signPsbtOptions = {
|
|
1537
1553
|
getProvider: () => __async(void 0, null, function* () {
|
|
1538
|
-
return
|
|
1554
|
+
return library;
|
|
1539
1555
|
}),
|
|
1540
1556
|
payload: {
|
|
1541
1557
|
network: {
|
|
1542
|
-
type:
|
|
1558
|
+
type: magicEdenNetwork
|
|
1543
1559
|
},
|
|
1544
1560
|
message: "Sign Transaction",
|
|
1545
1561
|
psbtBase64: toSignPsbt.toBase64(),
|