@omnisat/lasereyes 0.0.28 → 0.0.29

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 (3) hide show
  1. package/dist/index.js +617 -241
  2. package/dist/index.mjs +630 -198
  3. package/package.json +2 -2
package/dist/index.mjs CHANGED
@@ -186,14 +186,14 @@ var createConfig = (config) => {
186
186
 
187
187
  // src/providers/LaserEyesProvider.tsx
188
188
  import {
189
- createContext as createContext13,
190
- useCallback as useCallback25,
191
- useContext as useContext13,
192
- useEffect as useEffect25,
193
- useRef as useRef13,
194
- useState as useState25
189
+ createContext as createContext17,
190
+ useCallback as useCallback33,
191
+ useContext as useContext17,
192
+ useEffect as useEffect33,
193
+ useRef as useRef17,
194
+ useState as useState33
195
195
  } from "react";
196
- import * as bitcoin15 from "bitcoinjs-lib";
196
+ import * as bitcoin19 from "bitcoinjs-lib";
197
197
 
198
198
  // src/consts/settings.ts
199
199
  var LOCAL_STORAGE_DEFAULT_WALLET = "defaultWallet";
@@ -263,7 +263,7 @@ var initialWalletContext = {
263
263
  };
264
264
 
265
265
  // src/providers/LaserEyesProvider.tsx
266
- import { useLocalStorage as useLocalStorage13 } from "usehooks-ts";
266
+ import { useLocalStorage as useLocalStorage17 } from "usehooks-ts";
267
267
 
268
268
  // src/lib/helpers.ts
269
269
  import * as bitcoin from "bitcoinjs-lib";
@@ -415,6 +415,100 @@ function delay(ms) {
415
415
  }
416
416
 
417
417
  // src/providers/LaserEyesProvider.tsx
418
+ import {
419
+ BitcoinNetworkType as BitcoinNetworkType17,
420
+ getAddress as getAddress17,
421
+ request as request17,
422
+ RpcErrorCode as RpcErrorCode17,
423
+ signMessage as signMessageSatsConnect17,
424
+ signTransaction as signTransaction17
425
+ } from "sats-connect";
426
+ import { fromOutputScript as fromOutputScript17 } from "bitcoinjs-lib/src/address";
427
+ import axios35 from "axios";
428
+
429
+ // dist/index.mjs
430
+ import {
431
+ createContext as createContext16,
432
+ useCallback as useCallback31,
433
+ useContext as useContext16,
434
+ useEffect as useEffect31,
435
+ useRef as useRef16,
436
+ useState as useState31
437
+ } from "react";
438
+ import * as bitcoin18 from "bitcoinjs-lib";
439
+ import { useLocalStorage as useLocalStorage16 } from "usehooks-ts";
440
+ import * as bitcoin2 from "bitcoinjs-lib";
441
+ import axios2 from "axios";
442
+ import * as ecc2 from "@bitcoinerlab/secp256k1";
443
+ import {
444
+ BitcoinNetworkType as BitcoinNetworkType16,
445
+ getAddress as getAddress16,
446
+ request as request16,
447
+ RpcErrorCode as RpcErrorCode16,
448
+ signMessage as signMessageSatsConnect16,
449
+ signTransaction as signTransaction16
450
+ } from "sats-connect";
451
+ import { fromOutputScript as fromOutputScript16 } from "bitcoinjs-lib/src/address";
452
+ import axios33 from "axios";
453
+ import {
454
+ createContext as createContext15,
455
+ useCallback as useCallback29,
456
+ useContext as useContext15,
457
+ useEffect as useEffect29,
458
+ useRef as useRef15,
459
+ useState as useState29
460
+ } from "react";
461
+ import * as bitcoin17 from "bitcoinjs-lib";
462
+ import { useLocalStorage as useLocalStorage15 } from "usehooks-ts";
463
+ import * as bitcoin22 from "bitcoinjs-lib";
464
+ import axios22 from "axios";
465
+ import * as ecc22 from "@bitcoinerlab/secp256k1";
466
+ import {
467
+ BitcoinNetworkType as BitcoinNetworkType15,
468
+ getAddress as getAddress15,
469
+ request as request15,
470
+ RpcErrorCode as RpcErrorCode15,
471
+ signMessage as signMessageSatsConnect15,
472
+ signTransaction as signTransaction15
473
+ } from "sats-connect";
474
+ import { fromOutputScript as fromOutputScript15 } from "bitcoinjs-lib/src/address";
475
+ import axios31 from "axios";
476
+ import {
477
+ createContext as createContext14,
478
+ useCallback as useCallback27,
479
+ useContext as useContext14,
480
+ useEffect as useEffect27,
481
+ useRef as useRef14,
482
+ useState as useState27
483
+ } from "react";
484
+ import * as bitcoin16 from "bitcoinjs-lib";
485
+ import { useLocalStorage as useLocalStorage14 } from "usehooks-ts";
486
+ import * as bitcoin222 from "bitcoinjs-lib";
487
+ import axios222 from "axios";
488
+ import * as ecc222 from "@bitcoinerlab/secp256k1";
489
+ import {
490
+ BitcoinNetworkType as BitcoinNetworkType14,
491
+ getAddress as getAddress14,
492
+ request as request14,
493
+ RpcErrorCode as RpcErrorCode14,
494
+ signMessage as signMessageSatsConnect14,
495
+ signTransaction as signTransaction14
496
+ } from "sats-connect";
497
+ import { fromOutputScript as fromOutputScript14 } from "bitcoinjs-lib/src/address";
498
+ import axios29 from "axios";
499
+ import {
500
+ createContext as createContext13,
501
+ useCallback as useCallback25,
502
+ useContext as useContext13,
503
+ useEffect as useEffect25,
504
+ useRef as useRef13,
505
+ useState as useState25
506
+ } from "react";
507
+ import * as bitcoin15 from "bitcoinjs-lib";
508
+ import { useLocalStorage as useLocalStorage13 } from "usehooks-ts";
509
+ import * as bitcoin2222 from "bitcoinjs-lib";
510
+ import axios2222 from "axios";
511
+ import * as ecc2222 from "@bitcoinerlab/secp256k1";
418
512
  import {
419
513
  BitcoinNetworkType as BitcoinNetworkType13,
420
514
  getAddress as getAddress13,
@@ -425,8 +519,6 @@ import {
425
519
  } from "sats-connect";
426
520
  import { fromOutputScript as fromOutputScript13 } from "bitcoinjs-lib/src/address";
427
521
  import axios27 from "axios";
428
-
429
- // dist/index.mjs
430
522
  import {
431
523
  createContext as createContext12,
432
524
  useCallback as useCallback23,
@@ -437,9 +529,9 @@ import {
437
529
  } from "react";
438
530
  import * as bitcoin14 from "bitcoinjs-lib";
439
531
  import { useLocalStorage as useLocalStorage12 } from "usehooks-ts";
440
- import * as bitcoin2 from "bitcoinjs-lib";
441
- import axios2 from "axios";
442
- import * as ecc2 from "@bitcoinerlab/secp256k1";
532
+ import * as bitcoin22222 from "bitcoinjs-lib";
533
+ import axios22222 from "axios";
534
+ import * as ecc22222 from "@bitcoinerlab/secp256k1";
443
535
  import {
444
536
  BitcoinNetworkType as BitcoinNetworkType12,
445
537
  getAddress as getAddress12,
@@ -460,9 +552,9 @@ import {
460
552
  } from "react";
461
553
  import * as bitcoin13 from "bitcoinjs-lib";
462
554
  import { useLocalStorage as useLocalStorage11 } from "usehooks-ts";
463
- import * as bitcoin22 from "bitcoinjs-lib";
464
- import axios22 from "axios";
465
- import * as ecc22 from "@bitcoinerlab/secp256k1";
555
+ import * as bitcoin222222 from "bitcoinjs-lib";
556
+ import axios222222 from "axios";
557
+ import * as ecc222222 from "@bitcoinerlab/secp256k1";
466
558
  import {
467
559
  BitcoinNetworkType as BitcoinNetworkType11,
468
560
  getAddress as getAddress11,
@@ -483,9 +575,9 @@ import {
483
575
  } from "react";
484
576
  import * as bitcoin12 from "bitcoinjs-lib";
485
577
  import { useLocalStorage as useLocalStorage10 } from "usehooks-ts";
486
- import * as bitcoin222 from "bitcoinjs-lib";
487
- import axios222 from "axios";
488
- import * as ecc222 from "@bitcoinerlab/secp256k1";
578
+ import * as bitcoin2222222 from "bitcoinjs-lib";
579
+ import axios2222222 from "axios";
580
+ import * as ecc2222222 from "@bitcoinerlab/secp256k1";
489
581
  import {
490
582
  BitcoinNetworkType as BitcoinNetworkType10,
491
583
  getAddress as getAddress10,
@@ -506,9 +598,9 @@ import {
506
598
  } from "react";
507
599
  import * as bitcoin11 from "bitcoinjs-lib";
508
600
  import { useLocalStorage as useLocalStorage9 } from "usehooks-ts";
509
- import * as bitcoin2222 from "bitcoinjs-lib";
510
- import axios2222 from "axios";
511
- import * as ecc2222 from "@bitcoinerlab/secp256k1";
601
+ import * as bitcoin22222222 from "bitcoinjs-lib";
602
+ import axios22222222 from "axios";
603
+ import * as ecc22222222 from "@bitcoinerlab/secp256k1";
512
604
  import {
513
605
  BitcoinNetworkType as BitcoinNetworkType9,
514
606
  getAddress as getAddress9,
@@ -529,9 +621,9 @@ import {
529
621
  } from "react";
530
622
  import * as bitcoin10 from "bitcoinjs-lib";
531
623
  import { useLocalStorage as useLocalStorage8 } from "usehooks-ts";
532
- import * as bitcoin22222 from "bitcoinjs-lib";
533
- import axios22222 from "axios";
534
- import * as ecc22222 from "@bitcoinerlab/secp256k1";
624
+ import * as bitcoin222222222 from "bitcoinjs-lib";
625
+ import axios222222222 from "axios";
626
+ import * as ecc222222222 from "@bitcoinerlab/secp256k1";
535
627
  import {
536
628
  BitcoinNetworkType as BitcoinNetworkType8,
537
629
  getAddress as getAddress8,
@@ -552,9 +644,9 @@ import {
552
644
  } from "react";
553
645
  import * as bitcoin9 from "bitcoinjs-lib";
554
646
  import { useLocalStorage as useLocalStorage7 } from "usehooks-ts";
555
- import * as bitcoin222222 from "bitcoinjs-lib";
556
- import axios222222 from "axios";
557
- import * as ecc222222 from "@bitcoinerlab/secp256k1";
647
+ import * as bitcoin2222222222 from "bitcoinjs-lib";
648
+ import axios2222222222 from "axios";
649
+ import * as ecc2222222222 from "@bitcoinerlab/secp256k1";
558
650
  import {
559
651
  BitcoinNetworkType as BitcoinNetworkType7,
560
652
  getAddress as getAddress7,
@@ -575,9 +667,9 @@ import {
575
667
  } from "react";
576
668
  import * as bitcoin8 from "bitcoinjs-lib";
577
669
  import { useLocalStorage as useLocalStorage6 } from "usehooks-ts";
578
- import * as bitcoin2222222 from "bitcoinjs-lib";
579
- import axios2222222 from "axios";
580
- import * as ecc2222222 from "@bitcoinerlab/secp256k1";
670
+ import * as bitcoin22222222222 from "bitcoinjs-lib";
671
+ import axios22222222222 from "axios";
672
+ import * as ecc22222222222 from "@bitcoinerlab/secp256k1";
581
673
  import {
582
674
  BitcoinNetworkType as BitcoinNetworkType6,
583
675
  getAddress as getAddress6,
@@ -598,9 +690,9 @@ import {
598
690
  } from "react";
599
691
  import * as bitcoin7 from "bitcoinjs-lib";
600
692
  import { useLocalStorage as useLocalStorage5 } from "usehooks-ts";
601
- import * as bitcoin22222222 from "bitcoinjs-lib";
602
- import axios22222222 from "axios";
603
- import * as ecc22222222 from "@bitcoinerlab/secp256k1";
693
+ import * as bitcoin222222222222 from "bitcoinjs-lib";
694
+ import axios222222222222 from "axios";
695
+ import * as ecc222222222222 from "@bitcoinerlab/secp256k1";
604
696
  import {
605
697
  BitcoinNetworkType as BitcoinNetworkType5,
606
698
  getAddress as getAddress5,
@@ -621,9 +713,9 @@ import {
621
713
  } from "react";
622
714
  import * as bitcoin6 from "bitcoinjs-lib";
623
715
  import { useLocalStorage as useLocalStorage4 } from "usehooks-ts";
624
- import * as bitcoin222222222 from "bitcoinjs-lib";
625
- import axios222222222 from "axios";
626
- import * as ecc222222222 from "@bitcoinerlab/secp256k1";
716
+ import * as bitcoin2222222222222 from "bitcoinjs-lib";
717
+ import axios2222222222222 from "axios";
718
+ import * as ecc2222222222222 from "@bitcoinerlab/secp256k1";
627
719
  import {
628
720
  BitcoinNetworkType as BitcoinNetworkType4,
629
721
  getAddress as getAddress4,
@@ -644,9 +736,9 @@ import {
644
736
  } from "react";
645
737
  import * as bitcoin5 from "bitcoinjs-lib";
646
738
  import { useLocalStorage as useLocalStorage3 } from "usehooks-ts";
647
- import * as bitcoin2222222222 from "bitcoinjs-lib";
648
- import axios2222222222 from "axios";
649
- import * as ecc2222222222 from "@bitcoinerlab/secp256k1";
739
+ import * as bitcoin22222222222222 from "bitcoinjs-lib";
740
+ import axios22222222222222 from "axios";
741
+ import * as ecc22222222222222 from "@bitcoinerlab/secp256k1";
650
742
  import {
651
743
  BitcoinNetworkType as BitcoinNetworkType3,
652
744
  getAddress as getAddress3,
@@ -667,9 +759,9 @@ import {
667
759
  } from "react";
668
760
  import * as bitcoin4 from "bitcoinjs-lib";
669
761
  import { useLocalStorage as useLocalStorage2 } from "usehooks-ts";
670
- import * as bitcoin22222222222 from "bitcoinjs-lib";
671
- import axios22222222222 from "axios";
672
- import * as ecc22222222222 from "@bitcoinerlab/secp256k1";
762
+ import * as bitcoin222222222222222 from "bitcoinjs-lib";
763
+ import axios222222222222222 from "axios";
764
+ import * as ecc222222222222222 from "@bitcoinerlab/secp256k1";
673
765
  import {
674
766
  BitcoinNetworkType as BitcoinNetworkType2,
675
767
  getAddress as getAddress2,
@@ -688,11 +780,11 @@ import {
688
780
  useRef,
689
781
  useState
690
782
  } from "react";
691
- import * as bitcoin222222222222 from "bitcoinjs-lib";
783
+ import * as bitcoin2222222222222222 from "bitcoinjs-lib";
692
784
  import { useLocalStorage } from "usehooks-ts";
693
785
  import * as bitcoin3 from "bitcoinjs-lib";
694
- import axios222222222222 from "axios";
695
- import * as ecc222222222222 from "@bitcoinerlab/secp256k1";
786
+ import axios2222222222222222 from "axios";
787
+ import * as ecc2222222222222222 from "@bitcoinerlab/secp256k1";
696
788
  import {
697
789
  BitcoinNetworkType,
698
790
  getAddress,
@@ -702,7 +794,7 @@ import {
702
794
  signTransaction
703
795
  } from "sats-connect";
704
796
  import { fromOutputScript } from "bitcoinjs-lib/src/address";
705
- import axios2222222222222 from "axios";
797
+ import axios22222222222222222 from "axios";
706
798
  import { jsx } from "react/jsx-runtime";
707
799
  import { useCallback as useCallback2, useEffect as useEffect2, useState as useState2 } from "react";
708
800
  import axios3 from "axios";
@@ -739,6 +831,18 @@ import axios24 from "axios";
739
831
  import { jsx as jsx12 } from "react/jsx-runtime";
740
832
  import { useCallback as useCallback24, useEffect as useEffect24, useState as useState24 } from "react";
741
833
  import axios26 from "axios";
834
+ import { jsx as jsx13 } from "react/jsx-runtime";
835
+ import { useCallback as useCallback26, useEffect as useEffect26, useState as useState26 } from "react";
836
+ import axios28 from "axios";
837
+ import { jsx as jsx14 } from "react/jsx-runtime";
838
+ import { useCallback as useCallback28, useEffect as useEffect28, useState as useState28 } from "react";
839
+ import axios30 from "axios";
840
+ import { jsx as jsx15 } from "react/jsx-runtime";
841
+ import { useCallback as useCallback30, useEffect as useEffect30, useState as useState30 } from "react";
842
+ import axios32 from "axios";
843
+ import { jsx as jsx16 } from "react/jsx-runtime";
844
+ import { useCallback as useCallback32, useEffect as useEffect32, useState as useState32 } from "react";
845
+ import axios34 from "axios";
742
846
  var __async2 = (__this, __arguments, generator) => {
743
847
  return new Promise((resolve, reject) => {
744
848
  var fulfilled = (value) => {
@@ -913,6 +1017,72 @@ var initialWalletContext22 = {
913
1017
  isInscribing: false
914
1018
  };
915
1019
  bitcoin22.initEccLib(ecc22);
1020
+ var MAINNET422 = "mainnet";
1021
+ var initialWalletContext222 = {
1022
+ hasUnisat: false,
1023
+ hasXverse: false,
1024
+ hasOyl: false,
1025
+ hasMagicEden: false,
1026
+ hasOkx: false,
1027
+ hasLeather: false,
1028
+ hasPhantom: false,
1029
+ hasWizz: false,
1030
+ isInitializing: true,
1031
+ connected: false,
1032
+ isConnecting: false,
1033
+ publicKey: "",
1034
+ address: "",
1035
+ paymentAddress: "",
1036
+ paymentPublicKey: "",
1037
+ balance: void 0,
1038
+ network: MAINNET422,
1039
+ library: null,
1040
+ provider: null,
1041
+ accounts: [],
1042
+ connect: (walletName) => __async22(void 0, null, function* () {
1043
+ }),
1044
+ disconnect: () => {
1045
+ },
1046
+ requestAccounts: () => __async22(void 0, null, function* () {
1047
+ return [];
1048
+ }),
1049
+ getNetwork: () => __async22(void 0, null, function* () {
1050
+ return MAINNET422;
1051
+ }),
1052
+ switchNetwork: (network) => __async22(void 0, null, function* () {
1053
+ }),
1054
+ getPublicKey: () => __async22(void 0, null, function* () {
1055
+ return "";
1056
+ }),
1057
+ getBalance: () => __async22(void 0, null, function* () {
1058
+ return "";
1059
+ }),
1060
+ getInscriptions: () => __async22(void 0, null, function* () {
1061
+ return [];
1062
+ }),
1063
+ sendBTC: (to, amount) => __async22(void 0, null, function* () {
1064
+ return "";
1065
+ }),
1066
+ signMessage: (message) => __async22(void 0, null, function* () {
1067
+ return "";
1068
+ }),
1069
+ signPsbt: (tx) => __async22(void 0, null, function* () {
1070
+ return {
1071
+ signedPsbtHex: "",
1072
+ signedPsbtBase64: "",
1073
+ txId: ""
1074
+ };
1075
+ }),
1076
+ pushPsbt: (tx) => __async22(void 0, null, function* () {
1077
+ return "";
1078
+ }),
1079
+ inscribe: (content) => __async22(void 0, null, function* () {
1080
+ return "";
1081
+ }),
1082
+ isCreatingCommit: false,
1083
+ isInscribing: false
1084
+ };
1085
+ bitcoin222.initEccLib(ecc222);
916
1086
  var __async222 = (__this, __arguments, generator) => {
917
1087
  return new Promise((resolve, reject) => {
918
1088
  var fulfilled = (value) => {
@@ -933,8 +1103,8 @@ var __async222 = (__this, __arguments, generator) => {
933
1103
  step((generator = generator.apply(__this, __arguments)).next());
934
1104
  });
935
1105
  };
936
- var MAINNET422 = "mainnet";
937
- var initialWalletContext222 = {
1106
+ var MAINNET4222 = "mainnet";
1107
+ var initialWalletContext2222 = {
938
1108
  hasUnisat: false,
939
1109
  hasXverse: false,
940
1110
  hasOyl: false,
@@ -951,7 +1121,7 @@ var initialWalletContext222 = {
951
1121
  paymentAddress: "",
952
1122
  paymentPublicKey: "",
953
1123
  balance: void 0,
954
- network: MAINNET422,
1124
+ network: MAINNET4222,
955
1125
  library: null,
956
1126
  provider: null,
957
1127
  accounts: [],
@@ -963,7 +1133,7 @@ var initialWalletContext222 = {
963
1133
  return [];
964
1134
  }),
965
1135
  getNetwork: () => __async222(void 0, null, function* () {
966
- return MAINNET422;
1136
+ return MAINNET4222;
967
1137
  }),
968
1138
  switchNetwork: (network) => __async222(void 0, null, function* () {
969
1139
  }),
@@ -998,7 +1168,7 @@ var initialWalletContext222 = {
998
1168
  isCreatingCommit: false,
999
1169
  isInscribing: false
1000
1170
  };
1001
- bitcoin222.initEccLib(ecc222);
1171
+ bitcoin2222.initEccLib(ecc2222);
1002
1172
  var __async2222 = (__this, __arguments, generator) => {
1003
1173
  return new Promise((resolve, reject) => {
1004
1174
  var fulfilled = (value) => {
@@ -1019,8 +1189,8 @@ var __async2222 = (__this, __arguments, generator) => {
1019
1189
  step((generator = generator.apply(__this, __arguments)).next());
1020
1190
  });
1021
1191
  };
1022
- var MAINNET4222 = "mainnet";
1023
- var initialWalletContext2222 = {
1192
+ var MAINNET42222 = "mainnet";
1193
+ var initialWalletContext22222 = {
1024
1194
  hasUnisat: false,
1025
1195
  hasXverse: false,
1026
1196
  hasOyl: false,
@@ -1037,7 +1207,7 @@ var initialWalletContext2222 = {
1037
1207
  paymentAddress: "",
1038
1208
  paymentPublicKey: "",
1039
1209
  balance: void 0,
1040
- network: MAINNET4222,
1210
+ network: MAINNET42222,
1041
1211
  library: null,
1042
1212
  provider: null,
1043
1213
  accounts: [],
@@ -1049,7 +1219,7 @@ var initialWalletContext2222 = {
1049
1219
  return [];
1050
1220
  }),
1051
1221
  getNetwork: () => __async2222(void 0, null, function* () {
1052
- return MAINNET4222;
1222
+ return MAINNET42222;
1053
1223
  }),
1054
1224
  switchNetwork: (network) => __async2222(void 0, null, function* () {
1055
1225
  }),
@@ -1084,7 +1254,7 @@ var initialWalletContext2222 = {
1084
1254
  isCreatingCommit: false,
1085
1255
  isInscribing: false
1086
1256
  };
1087
- bitcoin2222.initEccLib(ecc2222);
1257
+ bitcoin22222.initEccLib(ecc22222);
1088
1258
  var __async22222 = (__this, __arguments, generator) => {
1089
1259
  return new Promise((resolve, reject) => {
1090
1260
  var fulfilled = (value) => {
@@ -1105,8 +1275,8 @@ var __async22222 = (__this, __arguments, generator) => {
1105
1275
  step((generator = generator.apply(__this, __arguments)).next());
1106
1276
  });
1107
1277
  };
1108
- var MAINNET42222 = "mainnet";
1109
- var initialWalletContext22222 = {
1278
+ var MAINNET422222 = "mainnet";
1279
+ var initialWalletContext222222 = {
1110
1280
  hasUnisat: false,
1111
1281
  hasXverse: false,
1112
1282
  hasOyl: false,
@@ -1123,7 +1293,7 @@ var initialWalletContext22222 = {
1123
1293
  paymentAddress: "",
1124
1294
  paymentPublicKey: "",
1125
1295
  balance: void 0,
1126
- network: MAINNET42222,
1296
+ network: MAINNET422222,
1127
1297
  library: null,
1128
1298
  provider: null,
1129
1299
  accounts: [],
@@ -1135,7 +1305,7 @@ var initialWalletContext22222 = {
1135
1305
  return [];
1136
1306
  }),
1137
1307
  getNetwork: () => __async22222(void 0, null, function* () {
1138
- return MAINNET42222;
1308
+ return MAINNET422222;
1139
1309
  }),
1140
1310
  switchNetwork: (network) => __async22222(void 0, null, function* () {
1141
1311
  }),
@@ -1170,7 +1340,7 @@ var initialWalletContext22222 = {
1170
1340
  isCreatingCommit: false,
1171
1341
  isInscribing: false
1172
1342
  };
1173
- bitcoin22222.initEccLib(ecc22222);
1343
+ bitcoin222222.initEccLib(ecc222222);
1174
1344
  var __async222222 = (__this, __arguments, generator) => {
1175
1345
  return new Promise((resolve, reject) => {
1176
1346
  var fulfilled = (value) => {
@@ -1191,8 +1361,8 @@ var __async222222 = (__this, __arguments, generator) => {
1191
1361
  step((generator = generator.apply(__this, __arguments)).next());
1192
1362
  });
1193
1363
  };
1194
- var MAINNET422222 = "mainnet";
1195
- var initialWalletContext222222 = {
1364
+ var MAINNET4222222 = "mainnet";
1365
+ var initialWalletContext2222222 = {
1196
1366
  hasUnisat: false,
1197
1367
  hasXverse: false,
1198
1368
  hasOyl: false,
@@ -1209,7 +1379,7 @@ var initialWalletContext222222 = {
1209
1379
  paymentAddress: "",
1210
1380
  paymentPublicKey: "",
1211
1381
  balance: void 0,
1212
- network: MAINNET422222,
1382
+ network: MAINNET4222222,
1213
1383
  library: null,
1214
1384
  provider: null,
1215
1385
  accounts: [],
@@ -1221,7 +1391,7 @@ var initialWalletContext222222 = {
1221
1391
  return [];
1222
1392
  }),
1223
1393
  getNetwork: () => __async222222(void 0, null, function* () {
1224
- return MAINNET422222;
1394
+ return MAINNET4222222;
1225
1395
  }),
1226
1396
  switchNetwork: (network) => __async222222(void 0, null, function* () {
1227
1397
  }),
@@ -1256,7 +1426,7 @@ var initialWalletContext222222 = {
1256
1426
  isCreatingCommit: false,
1257
1427
  isInscribing: false
1258
1428
  };
1259
- bitcoin222222.initEccLib(ecc222222);
1429
+ bitcoin2222222.initEccLib(ecc2222222);
1260
1430
  var __async2222222 = (__this, __arguments, generator) => {
1261
1431
  return new Promise((resolve, reject) => {
1262
1432
  var fulfilled = (value) => {
@@ -1277,8 +1447,8 @@ var __async2222222 = (__this, __arguments, generator) => {
1277
1447
  step((generator = generator.apply(__this, __arguments)).next());
1278
1448
  });
1279
1449
  };
1280
- var MAINNET4222222 = "mainnet";
1281
- var initialWalletContext2222222 = {
1450
+ var MAINNET42222222 = "mainnet";
1451
+ var initialWalletContext22222222 = {
1282
1452
  hasUnisat: false,
1283
1453
  hasXverse: false,
1284
1454
  hasOyl: false,
@@ -1295,7 +1465,7 @@ var initialWalletContext2222222 = {
1295
1465
  paymentAddress: "",
1296
1466
  paymentPublicKey: "",
1297
1467
  balance: void 0,
1298
- network: MAINNET4222222,
1468
+ network: MAINNET42222222,
1299
1469
  library: null,
1300
1470
  provider: null,
1301
1471
  accounts: [],
@@ -1307,7 +1477,7 @@ var initialWalletContext2222222 = {
1307
1477
  return [];
1308
1478
  }),
1309
1479
  getNetwork: () => __async2222222(void 0, null, function* () {
1310
- return MAINNET4222222;
1480
+ return MAINNET42222222;
1311
1481
  }),
1312
1482
  switchNetwork: (network) => __async2222222(void 0, null, function* () {
1313
1483
  }),
@@ -1342,7 +1512,7 @@ var initialWalletContext2222222 = {
1342
1512
  isCreatingCommit: false,
1343
1513
  isInscribing: false
1344
1514
  };
1345
- bitcoin2222222.initEccLib(ecc2222222);
1515
+ bitcoin22222222.initEccLib(ecc22222222);
1346
1516
  var __async22222222 = (__this, __arguments, generator) => {
1347
1517
  return new Promise((resolve, reject) => {
1348
1518
  var fulfilled = (value) => {
@@ -1363,8 +1533,8 @@ var __async22222222 = (__this, __arguments, generator) => {
1363
1533
  step((generator = generator.apply(__this, __arguments)).next());
1364
1534
  });
1365
1535
  };
1366
- var MAINNET42222222 = "mainnet";
1367
- var initialWalletContext22222222 = {
1536
+ var MAINNET422222222 = "mainnet";
1537
+ var initialWalletContext222222222 = {
1368
1538
  hasUnisat: false,
1369
1539
  hasXverse: false,
1370
1540
  hasOyl: false,
@@ -1381,7 +1551,7 @@ var initialWalletContext22222222 = {
1381
1551
  paymentAddress: "",
1382
1552
  paymentPublicKey: "",
1383
1553
  balance: void 0,
1384
- network: MAINNET42222222,
1554
+ network: MAINNET422222222,
1385
1555
  library: null,
1386
1556
  provider: null,
1387
1557
  accounts: [],
@@ -1393,7 +1563,7 @@ var initialWalletContext22222222 = {
1393
1563
  return [];
1394
1564
  }),
1395
1565
  getNetwork: () => __async22222222(void 0, null, function* () {
1396
- return MAINNET42222222;
1566
+ return MAINNET422222222;
1397
1567
  }),
1398
1568
  switchNetwork: (network) => __async22222222(void 0, null, function* () {
1399
1569
  }),
@@ -1428,7 +1598,7 @@ var initialWalletContext22222222 = {
1428
1598
  isCreatingCommit: false,
1429
1599
  isInscribing: false
1430
1600
  };
1431
- bitcoin22222222.initEccLib(ecc22222222);
1601
+ bitcoin222222222.initEccLib(ecc222222222);
1432
1602
  var __async222222222 = (__this, __arguments, generator) => {
1433
1603
  return new Promise((resolve, reject) => {
1434
1604
  var fulfilled = (value) => {
@@ -1449,8 +1619,8 @@ var __async222222222 = (__this, __arguments, generator) => {
1449
1619
  step((generator = generator.apply(__this, __arguments)).next());
1450
1620
  });
1451
1621
  };
1452
- var MAINNET422222222 = "mainnet";
1453
- var initialWalletContext222222222 = {
1622
+ var MAINNET4222222222 = "mainnet";
1623
+ var initialWalletContext2222222222 = {
1454
1624
  hasUnisat: false,
1455
1625
  hasXverse: false,
1456
1626
  hasOyl: false,
@@ -1467,7 +1637,7 @@ var initialWalletContext222222222 = {
1467
1637
  paymentAddress: "",
1468
1638
  paymentPublicKey: "",
1469
1639
  balance: void 0,
1470
- network: MAINNET422222222,
1640
+ network: MAINNET4222222222,
1471
1641
  library: null,
1472
1642
  provider: null,
1473
1643
  accounts: [],
@@ -1479,7 +1649,7 @@ var initialWalletContext222222222 = {
1479
1649
  return [];
1480
1650
  }),
1481
1651
  getNetwork: () => __async222222222(void 0, null, function* () {
1482
- return MAINNET422222222;
1652
+ return MAINNET4222222222;
1483
1653
  }),
1484
1654
  switchNetwork: (network) => __async222222222(void 0, null, function* () {
1485
1655
  }),
@@ -1514,7 +1684,7 @@ var initialWalletContext222222222 = {
1514
1684
  isCreatingCommit: false,
1515
1685
  isInscribing: false
1516
1686
  };
1517
- bitcoin222222222.initEccLib(ecc222222222);
1687
+ bitcoin2222222222.initEccLib(ecc2222222222);
1518
1688
  var __async2222222222 = (__this, __arguments, generator) => {
1519
1689
  return new Promise((resolve, reject) => {
1520
1690
  var fulfilled = (value) => {
@@ -1535,8 +1705,8 @@ var __async2222222222 = (__this, __arguments, generator) => {
1535
1705
  step((generator = generator.apply(__this, __arguments)).next());
1536
1706
  });
1537
1707
  };
1538
- var MAINNET4222222222 = "mainnet";
1539
- var initialWalletContext2222222222 = {
1708
+ var MAINNET42222222222 = "mainnet";
1709
+ var initialWalletContext22222222222 = {
1540
1710
  hasUnisat: false,
1541
1711
  hasXverse: false,
1542
1712
  hasOyl: false,
@@ -1553,7 +1723,7 @@ var initialWalletContext2222222222 = {
1553
1723
  paymentAddress: "",
1554
1724
  paymentPublicKey: "",
1555
1725
  balance: void 0,
1556
- network: MAINNET4222222222,
1726
+ network: MAINNET42222222222,
1557
1727
  library: null,
1558
1728
  provider: null,
1559
1729
  accounts: [],
@@ -1565,7 +1735,7 @@ var initialWalletContext2222222222 = {
1565
1735
  return [];
1566
1736
  }),
1567
1737
  getNetwork: () => __async2222222222(void 0, null, function* () {
1568
- return MAINNET4222222222;
1738
+ return MAINNET42222222222;
1569
1739
  }),
1570
1740
  switchNetwork: (network) => __async2222222222(void 0, null, function* () {
1571
1741
  }),
@@ -1600,7 +1770,7 @@ var initialWalletContext2222222222 = {
1600
1770
  isCreatingCommit: false,
1601
1771
  isInscribing: false
1602
1772
  };
1603
- bitcoin2222222222.initEccLib(ecc2222222222);
1773
+ bitcoin22222222222.initEccLib(ecc22222222222);
1604
1774
  var __async22222222222 = (__this, __arguments, generator) => {
1605
1775
  return new Promise((resolve, reject) => {
1606
1776
  var fulfilled = (value) => {
@@ -1621,8 +1791,8 @@ var __async22222222222 = (__this, __arguments, generator) => {
1621
1791
  step((generator = generator.apply(__this, __arguments)).next());
1622
1792
  });
1623
1793
  };
1624
- var MAINNET42222222222 = "mainnet";
1625
- var initialWalletContext22222222222 = {
1794
+ var MAINNET422222222222 = "mainnet";
1795
+ var initialWalletContext222222222222 = {
1626
1796
  hasUnisat: false,
1627
1797
  hasXverse: false,
1628
1798
  hasOyl: false,
@@ -1639,7 +1809,7 @@ var initialWalletContext22222222222 = {
1639
1809
  paymentAddress: "",
1640
1810
  paymentPublicKey: "",
1641
1811
  balance: void 0,
1642
- network: MAINNET42222222222,
1812
+ network: MAINNET422222222222,
1643
1813
  library: null,
1644
1814
  provider: null,
1645
1815
  accounts: [],
@@ -1651,7 +1821,7 @@ var initialWalletContext22222222222 = {
1651
1821
  return [];
1652
1822
  }),
1653
1823
  getNetwork: () => __async22222222222(void 0, null, function* () {
1654
- return MAINNET42222222222;
1824
+ return MAINNET422222222222;
1655
1825
  }),
1656
1826
  switchNetwork: (network) => __async22222222222(void 0, null, function* () {
1657
1827
  }),
@@ -1686,7 +1856,7 @@ var initialWalletContext22222222222 = {
1686
1856
  isCreatingCommit: false,
1687
1857
  isInscribing: false
1688
1858
  };
1689
- bitcoin22222222222.initEccLib(ecc22222222222);
1859
+ bitcoin222222222222.initEccLib(ecc222222222222);
1690
1860
  var __async222222222222 = (__this, __arguments, generator) => {
1691
1861
  return new Promise((resolve, reject) => {
1692
1862
  var fulfilled = (value) => {
@@ -1707,8 +1877,8 @@ var __async222222222222 = (__this, __arguments, generator) => {
1707
1877
  step((generator = generator.apply(__this, __arguments)).next());
1708
1878
  });
1709
1879
  };
1710
- var MAINNET422222222222 = "mainnet";
1711
- var initialWalletContext222222222222 = {
1880
+ var MAINNET4222222222222 = "mainnet";
1881
+ var initialWalletContext2222222222222 = {
1712
1882
  hasUnisat: false,
1713
1883
  hasXverse: false,
1714
1884
  hasOyl: false,
@@ -1725,7 +1895,7 @@ var initialWalletContext222222222222 = {
1725
1895
  paymentAddress: "",
1726
1896
  paymentPublicKey: "",
1727
1897
  balance: void 0,
1728
- network: MAINNET422222222222,
1898
+ network: MAINNET4222222222222,
1729
1899
  library: null,
1730
1900
  provider: null,
1731
1901
  accounts: [],
@@ -1737,7 +1907,7 @@ var initialWalletContext222222222222 = {
1737
1907
  return [];
1738
1908
  }),
1739
1909
  getNetwork: () => __async222222222222(void 0, null, function* () {
1740
- return MAINNET422222222222;
1910
+ return MAINNET4222222222222;
1741
1911
  }),
1742
1912
  switchNetwork: (network) => __async222222222222(void 0, null, function* () {
1743
1913
  }),
@@ -1772,19 +1942,281 @@ var initialWalletContext222222222222 = {
1772
1942
  isCreatingCommit: false,
1773
1943
  isInscribing: false
1774
1944
  };
1775
- bitcoin3.initEccLib(ecc222222222222);
1776
- var LaserEyesContext = createContext(initialWalletContext222222222222);
1777
- var LaserEyesContext2 = createContext2(initialWalletContext22222222222);
1778
- var LaserEyesContext3 = createContext3(initialWalletContext2222222222);
1779
- var LaserEyesContext4 = createContext4(initialWalletContext222222222);
1780
- var LaserEyesContext5 = createContext5(initialWalletContext22222222);
1781
- var LaserEyesContext6 = createContext6(initialWalletContext2222222);
1782
- var LaserEyesContext7 = createContext7(initialWalletContext222222);
1783
- var LaserEyesContext8 = createContext8(initialWalletContext22222);
1784
- var LaserEyesContext9 = createContext9(initialWalletContext2222);
1785
- var LaserEyesContext10 = createContext10(initialWalletContext222);
1786
- var LaserEyesContext11 = createContext11(initialWalletContext22);
1787
- var LaserEyesContext12 = createContext12(initialWalletContext2);
1945
+ bitcoin2222222222222.initEccLib(ecc2222222222222);
1946
+ var __async2222222222222 = (__this, __arguments, generator) => {
1947
+ return new Promise((resolve, reject) => {
1948
+ var fulfilled = (value) => {
1949
+ try {
1950
+ step(generator.next(value));
1951
+ } catch (e) {
1952
+ reject(e);
1953
+ }
1954
+ };
1955
+ var rejected = (value) => {
1956
+ try {
1957
+ step(generator.throw(value));
1958
+ } catch (e) {
1959
+ reject(e);
1960
+ }
1961
+ };
1962
+ var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
1963
+ step((generator = generator.apply(__this, __arguments)).next());
1964
+ });
1965
+ };
1966
+ var MAINNET42222222222222 = "mainnet";
1967
+ var initialWalletContext22222222222222 = {
1968
+ hasUnisat: false,
1969
+ hasXverse: false,
1970
+ hasOyl: false,
1971
+ hasMagicEden: false,
1972
+ hasOkx: false,
1973
+ hasLeather: false,
1974
+ hasPhantom: false,
1975
+ hasWizz: false,
1976
+ isInitializing: true,
1977
+ connected: false,
1978
+ isConnecting: false,
1979
+ publicKey: "",
1980
+ address: "",
1981
+ paymentAddress: "",
1982
+ paymentPublicKey: "",
1983
+ balance: void 0,
1984
+ network: MAINNET42222222222222,
1985
+ library: null,
1986
+ provider: null,
1987
+ accounts: [],
1988
+ connect: (walletName) => __async2222222222222(void 0, null, function* () {
1989
+ }),
1990
+ disconnect: () => {
1991
+ },
1992
+ requestAccounts: () => __async2222222222222(void 0, null, function* () {
1993
+ return [];
1994
+ }),
1995
+ getNetwork: () => __async2222222222222(void 0, null, function* () {
1996
+ return MAINNET42222222222222;
1997
+ }),
1998
+ switchNetwork: (network) => __async2222222222222(void 0, null, function* () {
1999
+ }),
2000
+ getPublicKey: () => __async2222222222222(void 0, null, function* () {
2001
+ return "";
2002
+ }),
2003
+ getBalance: () => __async2222222222222(void 0, null, function* () {
2004
+ return "";
2005
+ }),
2006
+ getInscriptions: () => __async2222222222222(void 0, null, function* () {
2007
+ return [];
2008
+ }),
2009
+ sendBTC: (to, amount) => __async2222222222222(void 0, null, function* () {
2010
+ return "";
2011
+ }),
2012
+ signMessage: (message) => __async2222222222222(void 0, null, function* () {
2013
+ return "";
2014
+ }),
2015
+ signPsbt: (tx) => __async2222222222222(void 0, null, function* () {
2016
+ return {
2017
+ signedPsbtHex: "",
2018
+ signedPsbtBase64: "",
2019
+ txId: ""
2020
+ };
2021
+ }),
2022
+ pushPsbt: (tx) => __async2222222222222(void 0, null, function* () {
2023
+ return "";
2024
+ }),
2025
+ inscribe: (content) => __async2222222222222(void 0, null, function* () {
2026
+ return "";
2027
+ }),
2028
+ isCreatingCommit: false,
2029
+ isInscribing: false
2030
+ };
2031
+ bitcoin22222222222222.initEccLib(ecc22222222222222);
2032
+ var __async22222222222222 = (__this, __arguments, generator) => {
2033
+ return new Promise((resolve, reject) => {
2034
+ var fulfilled = (value) => {
2035
+ try {
2036
+ step(generator.next(value));
2037
+ } catch (e) {
2038
+ reject(e);
2039
+ }
2040
+ };
2041
+ var rejected = (value) => {
2042
+ try {
2043
+ step(generator.throw(value));
2044
+ } catch (e) {
2045
+ reject(e);
2046
+ }
2047
+ };
2048
+ var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
2049
+ step((generator = generator.apply(__this, __arguments)).next());
2050
+ });
2051
+ };
2052
+ var MAINNET422222222222222 = "mainnet";
2053
+ var initialWalletContext222222222222222 = {
2054
+ hasUnisat: false,
2055
+ hasXverse: false,
2056
+ hasOyl: false,
2057
+ hasMagicEden: false,
2058
+ hasOkx: false,
2059
+ hasLeather: false,
2060
+ hasPhantom: false,
2061
+ hasWizz: false,
2062
+ isInitializing: true,
2063
+ connected: false,
2064
+ isConnecting: false,
2065
+ publicKey: "",
2066
+ address: "",
2067
+ paymentAddress: "",
2068
+ paymentPublicKey: "",
2069
+ balance: void 0,
2070
+ network: MAINNET422222222222222,
2071
+ library: null,
2072
+ provider: null,
2073
+ accounts: [],
2074
+ connect: (walletName) => __async22222222222222(void 0, null, function* () {
2075
+ }),
2076
+ disconnect: () => {
2077
+ },
2078
+ requestAccounts: () => __async22222222222222(void 0, null, function* () {
2079
+ return [];
2080
+ }),
2081
+ getNetwork: () => __async22222222222222(void 0, null, function* () {
2082
+ return MAINNET422222222222222;
2083
+ }),
2084
+ switchNetwork: (network) => __async22222222222222(void 0, null, function* () {
2085
+ }),
2086
+ getPublicKey: () => __async22222222222222(void 0, null, function* () {
2087
+ return "";
2088
+ }),
2089
+ getBalance: () => __async22222222222222(void 0, null, function* () {
2090
+ return "";
2091
+ }),
2092
+ getInscriptions: () => __async22222222222222(void 0, null, function* () {
2093
+ return [];
2094
+ }),
2095
+ sendBTC: (to, amount) => __async22222222222222(void 0, null, function* () {
2096
+ return "";
2097
+ }),
2098
+ signMessage: (message) => __async22222222222222(void 0, null, function* () {
2099
+ return "";
2100
+ }),
2101
+ signPsbt: (tx) => __async22222222222222(void 0, null, function* () {
2102
+ return {
2103
+ signedPsbtHex: "",
2104
+ signedPsbtBase64: "",
2105
+ txId: ""
2106
+ };
2107
+ }),
2108
+ pushPsbt: (tx) => __async22222222222222(void 0, null, function* () {
2109
+ return "";
2110
+ }),
2111
+ inscribe: (content) => __async22222222222222(void 0, null, function* () {
2112
+ return "";
2113
+ }),
2114
+ isCreatingCommit: false,
2115
+ isInscribing: false
2116
+ };
2117
+ bitcoin222222222222222.initEccLib(ecc222222222222222);
2118
+ var __async222222222222222 = (__this, __arguments, generator) => {
2119
+ return new Promise((resolve, reject) => {
2120
+ var fulfilled = (value) => {
2121
+ try {
2122
+ step(generator.next(value));
2123
+ } catch (e) {
2124
+ reject(e);
2125
+ }
2126
+ };
2127
+ var rejected = (value) => {
2128
+ try {
2129
+ step(generator.throw(value));
2130
+ } catch (e) {
2131
+ reject(e);
2132
+ }
2133
+ };
2134
+ var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
2135
+ step((generator = generator.apply(__this, __arguments)).next());
2136
+ });
2137
+ };
2138
+ var MAINNET4222222222222222 = "mainnet";
2139
+ var initialWalletContext2222222222222222 = {
2140
+ hasUnisat: false,
2141
+ hasXverse: false,
2142
+ hasOyl: false,
2143
+ hasMagicEden: false,
2144
+ hasOkx: false,
2145
+ hasLeather: false,
2146
+ hasPhantom: false,
2147
+ hasWizz: false,
2148
+ isInitializing: true,
2149
+ connected: false,
2150
+ isConnecting: false,
2151
+ publicKey: "",
2152
+ address: "",
2153
+ paymentAddress: "",
2154
+ paymentPublicKey: "",
2155
+ balance: void 0,
2156
+ network: MAINNET4222222222222222,
2157
+ library: null,
2158
+ provider: null,
2159
+ accounts: [],
2160
+ connect: (walletName) => __async222222222222222(void 0, null, function* () {
2161
+ }),
2162
+ disconnect: () => {
2163
+ },
2164
+ requestAccounts: () => __async222222222222222(void 0, null, function* () {
2165
+ return [];
2166
+ }),
2167
+ getNetwork: () => __async222222222222222(void 0, null, function* () {
2168
+ return MAINNET4222222222222222;
2169
+ }),
2170
+ switchNetwork: (network) => __async222222222222222(void 0, null, function* () {
2171
+ }),
2172
+ getPublicKey: () => __async222222222222222(void 0, null, function* () {
2173
+ return "";
2174
+ }),
2175
+ getBalance: () => __async222222222222222(void 0, null, function* () {
2176
+ return "";
2177
+ }),
2178
+ getInscriptions: () => __async222222222222222(void 0, null, function* () {
2179
+ return [];
2180
+ }),
2181
+ sendBTC: (to, amount) => __async222222222222222(void 0, null, function* () {
2182
+ return "";
2183
+ }),
2184
+ signMessage: (message) => __async222222222222222(void 0, null, function* () {
2185
+ return "";
2186
+ }),
2187
+ signPsbt: (tx) => __async222222222222222(void 0, null, function* () {
2188
+ return {
2189
+ signedPsbtHex: "",
2190
+ signedPsbtBase64: "",
2191
+ txId: ""
2192
+ };
2193
+ }),
2194
+ pushPsbt: (tx) => __async222222222222222(void 0, null, function* () {
2195
+ return "";
2196
+ }),
2197
+ inscribe: (content) => __async222222222222222(void 0, null, function* () {
2198
+ return "";
2199
+ }),
2200
+ isCreatingCommit: false,
2201
+ isInscribing: false
2202
+ };
2203
+ bitcoin3.initEccLib(ecc2222222222222222);
2204
+ var LaserEyesContext = createContext(initialWalletContext2222222222222222);
2205
+ var LaserEyesContext2 = createContext2(initialWalletContext222222222222222);
2206
+ var LaserEyesContext3 = createContext3(initialWalletContext22222222222222);
2207
+ var LaserEyesContext4 = createContext4(initialWalletContext2222222222222);
2208
+ var LaserEyesContext5 = createContext5(initialWalletContext222222222222);
2209
+ var LaserEyesContext6 = createContext6(initialWalletContext22222222222);
2210
+ var LaserEyesContext7 = createContext7(initialWalletContext2222222222);
2211
+ var LaserEyesContext8 = createContext8(initialWalletContext222222222);
2212
+ var LaserEyesContext9 = createContext9(initialWalletContext22222222);
2213
+ var LaserEyesContext10 = createContext10(initialWalletContext2222222);
2214
+ var LaserEyesContext11 = createContext11(initialWalletContext222222);
2215
+ var LaserEyesContext12 = createContext12(initialWalletContext22222);
2216
+ var LaserEyesContext13 = createContext13(initialWalletContext2222);
2217
+ var LaserEyesContext14 = createContext14(initialWalletContext222);
2218
+ var LaserEyesContext15 = createContext15(initialWalletContext22);
2219
+ var LaserEyesContext16 = createContext16(initialWalletContext2);
1788
2220
 
1789
2221
  // example/lib/urls.ts
1790
2222
  var MEMPOOL_SPACE_URL3 = "https://mempool.space";
@@ -1793,42 +2225,42 @@ var MEMPOOL_SPACE_SIGNET_URL2 = "https://mempool.space/signet";
1793
2225
  var getMempoolSpaceUrl3 = (network) => network === TESTNET3 ? MEMPOOL_SPACE_TESTNET_URL3 : network === SIGNET3 ? MEMPOOL_SPACE_SIGNET_URL2 : MEMPOOL_SPACE_URL3;
1794
2226
 
1795
2227
  // src/providers/LaserEyesProvider.tsx
1796
- import { jsx as jsx13 } from "react/jsx-runtime";
1797
- var LaserEyesContext13 = createContext13(initialWalletContext);
2228
+ import { jsx as jsx17 } from "react/jsx-runtime";
2229
+ var LaserEyesContext17 = createContext17(initialWalletContext);
1798
2230
  var useLaserEyes = () => {
1799
- return useContext13(LaserEyesContext13);
2231
+ return useContext17(LaserEyesContext17);
1800
2232
  };
1801
2233
  var LaserEyesProvider = ({
1802
2234
  children,
1803
2235
  config
1804
2236
  }) => {
1805
- const selfRef = useRef13({
2237
+ const selfRef = useRef17({
1806
2238
  accounts: []
1807
2239
  });
1808
2240
  const self = selfRef.current;
1809
- const [library, setLibrary] = useState25(null);
1810
- const [provider, setProvider] = useState25();
1811
- const [isInitializing, setIsInitializing] = useState25(true);
1812
- const [connected, setConnected] = useState25(false);
1813
- const [isConnecting, setIsConnecting] = useState25(false);
1814
- const [accounts, setAccounts] = useState25([]);
1815
- const [publicKey, setPublicKey] = useState25("");
1816
- const [paymentPublicKey, setPaymentPublicKey] = useState25("");
1817
- const [address3, setAddress] = useState25("");
1818
- const [paymentAddress, setPaymentAddress] = useState25("");
1819
- const [balance, setBalance] = useState25();
1820
- const [hasUnisat, setHasUnisat] = useState25(false);
1821
- const [hasXverse, setHasXverse] = useState25(false);
1822
- const [hasOyl, setHasOyl] = useState25(false);
1823
- const [hasMagicEden, setHasMagicEden] = useState25(false);
1824
- const [hasOkx, setHasOkx] = useState25(false);
1825
- const [hasLeather, setHasLeather] = useState25(false);
1826
- const [hasPhantom, setHasPhantom] = useState25(false);
1827
- const [hasWizz, setHasWizz] = useState25(false);
1828
- const [network, setNetwork] = useLocalStorage13("network", MAINNET, {
2241
+ const [library, setLibrary] = useState33(null);
2242
+ const [provider, setProvider] = useState33();
2243
+ const [isInitializing, setIsInitializing] = useState33(true);
2244
+ const [connected, setConnected] = useState33(false);
2245
+ const [isConnecting, setIsConnecting] = useState33(false);
2246
+ const [accounts, setAccounts] = useState33([]);
2247
+ const [publicKey, setPublicKey] = useState33("");
2248
+ const [paymentPublicKey, setPaymentPublicKey] = useState33("");
2249
+ const [address3, setAddress] = useState33("");
2250
+ const [paymentAddress, setPaymentAddress] = useState33("");
2251
+ const [balance, setBalance] = useState33();
2252
+ const [hasUnisat, setHasUnisat] = useState33(false);
2253
+ const [hasXverse, setHasXverse] = useState33(false);
2254
+ const [hasOyl, setHasOyl] = useState33(false);
2255
+ const [hasMagicEden, setHasMagicEden] = useState33(false);
2256
+ const [hasOkx, setHasOkx] = useState33(false);
2257
+ const [hasLeather, setHasLeather] = useState33(false);
2258
+ const [hasPhantom, setHasPhantom] = useState33(false);
2259
+ const [hasWizz, setHasWizz] = useState33(false);
2260
+ const [network, setNetwork] = useLocalStorage17("network", MAINNET, {
1829
2261
  initializeWithValue: false
1830
2262
  });
1831
- useEffect25(() => {
2263
+ useEffect33(() => {
1832
2264
  if (config) {
1833
2265
  setNetwork(config.network);
1834
2266
  getNetwork().then((foundNetwork) => {
@@ -1845,7 +2277,7 @@ var LaserEyesProvider = ({
1845
2277
  setIsInitializing(false);
1846
2278
  }
1847
2279
  };
1848
- useEffect25(() => {
2280
+ useEffect33(() => {
1849
2281
  const observer = new MutationObserver(() => {
1850
2282
  const unisatLib = window == null ? void 0 : window.unisat;
1851
2283
  if (unisatLib) {
@@ -1858,7 +2290,7 @@ var LaserEyesProvider = ({
1858
2290
  observer.disconnect();
1859
2291
  };
1860
2292
  }, []);
1861
- useEffect25(() => {
2293
+ useEffect33(() => {
1862
2294
  const observer = new MutationObserver(() => {
1863
2295
  var _a;
1864
2296
  const xverseLib = (_a = window == null ? void 0 : window.XverseProviders) == null ? void 0 : _a.BitcoinProvider;
@@ -1872,7 +2304,7 @@ var LaserEyesProvider = ({
1872
2304
  observer.disconnect();
1873
2305
  };
1874
2306
  }, []);
1875
- useEffect25(() => {
2307
+ useEffect33(() => {
1876
2308
  const observer = new MutationObserver(() => {
1877
2309
  const oylLib = window == null ? void 0 : window.oyl;
1878
2310
  if (oylLib) {
@@ -1885,7 +2317,7 @@ var LaserEyesProvider = ({
1885
2317
  observer.disconnect();
1886
2318
  };
1887
2319
  }, []);
1888
- useEffect25(() => {
2320
+ useEffect33(() => {
1889
2321
  const observer = new MutationObserver(() => {
1890
2322
  const magicEdenLib = window == null ? void 0 : window.magicEden;
1891
2323
  if (magicEdenLib) {
@@ -1898,7 +2330,7 @@ var LaserEyesProvider = ({
1898
2330
  observer.disconnect();
1899
2331
  };
1900
2332
  }, []);
1901
- useEffect25(() => {
2333
+ useEffect33(() => {
1902
2334
  const observer = new MutationObserver(() => {
1903
2335
  var _a, _b;
1904
2336
  let foundOkx;
@@ -1917,7 +2349,7 @@ var LaserEyesProvider = ({
1917
2349
  observer.disconnect();
1918
2350
  };
1919
2351
  }, [network]);
1920
- useEffect25(() => {
2352
+ useEffect33(() => {
1921
2353
  const observer = new MutationObserver(() => {
1922
2354
  const leatherLib = window == null ? void 0 : window.LeatherProvider;
1923
2355
  if (leatherLib) {
@@ -1930,7 +2362,7 @@ var LaserEyesProvider = ({
1930
2362
  observer.disconnect();
1931
2363
  };
1932
2364
  }, []);
1933
- useEffect25(() => {
2365
+ useEffect33(() => {
1934
2366
  const observer = new MutationObserver(() => {
1935
2367
  var _a;
1936
2368
  const phantomLib = (_a = window == null ? void 0 : window.phantom) == null ? void 0 : _a.bitcoin;
@@ -1947,7 +2379,7 @@ var LaserEyesProvider = ({
1947
2379
  observer.disconnect();
1948
2380
  };
1949
2381
  }, []);
1950
- useEffect25(() => {
2382
+ useEffect33(() => {
1951
2383
  const observer = new MutationObserver(() => {
1952
2384
  const wizzLib = window == null ? void 0 : window.wizz;
1953
2385
  if (wizzLib) {
@@ -1960,7 +2392,7 @@ var LaserEyesProvider = ({
1960
2392
  observer.disconnect();
1961
2393
  };
1962
2394
  }, []);
1963
- useEffect25(() => {
2395
+ useEffect33(() => {
1964
2396
  checkInitializationComplete();
1965
2397
  }, [
1966
2398
  hasUnisat,
@@ -1972,10 +2404,10 @@ var LaserEyesProvider = ({
1972
2404
  hasPhantom,
1973
2405
  hasWizz
1974
2406
  ]);
1975
- useEffect25(() => {
2407
+ useEffect33(() => {
1976
2408
  setBalance(void 0);
1977
2409
  }, [network]);
1978
- useEffect25(() => {
2410
+ useEffect33(() => {
1979
2411
  if (provider !== UNISAT && provider !== WIZZ) {
1980
2412
  return;
1981
2413
  }
@@ -1989,7 +2421,7 @@ var LaserEyesProvider = ({
1989
2421
  library.removeListener("networkChanged", handleNetworkChanged);
1990
2422
  };
1991
2423
  }, [library]);
1992
- useEffect25(() => {
2424
+ useEffect33(() => {
1993
2425
  if (!isInitializing) {
1994
2426
  const defaultWallet = localStorage == null ? void 0 : localStorage.getItem(
1995
2427
  LOCAL_STORAGE_DEFAULT_WALLET
@@ -2000,7 +2432,7 @@ var LaserEyesProvider = ({
2000
2432
  }
2001
2433
  }
2002
2434
  }, [isInitializing]);
2003
- const connectUnisat = useCallback25(() => __async(void 0, null, function* () {
2435
+ const connectUnisat = useCallback33(() => __async(void 0, null, function* () {
2004
2436
  try {
2005
2437
  localStorage == null ? void 0 : localStorage.setItem(LOCAL_STORAGE_DEFAULT_WALLET, UNISAT);
2006
2438
  const lib = window.unisat;
@@ -2024,7 +2456,7 @@ var LaserEyesProvider = ({
2024
2456
  throw error;
2025
2457
  }
2026
2458
  }), [hasUnisat]);
2027
- const connectXverse = useCallback25(() => __async(void 0, null, function* () {
2459
+ const connectXverse = useCallback33(() => __async(void 0, null, function* () {
2028
2460
  try {
2029
2461
  localStorage == null ? void 0 : localStorage.setItem(LOCAL_STORAGE_DEFAULT_WALLET, XVERSE);
2030
2462
  let xverseNetwork = getXverseNetwork((config == null ? void 0 : config.network) || MAINNET);
@@ -2058,7 +2490,7 @@ var LaserEyesProvider = ({
2058
2490
  throw new Error(`Can't lasereyes to ${XVERSE} wallet`);
2059
2491
  }
2060
2492
  };
2061
- yield getAddress13(getAddressOptions);
2493
+ yield getAddress17(getAddressOptions);
2062
2494
  setConnected(true);
2063
2495
  } catch (error) {
2064
2496
  throw error;
@@ -2123,7 +2555,7 @@ var LaserEyesProvider = ({
2123
2555
  }
2124
2556
  };
2125
2557
  console.log(JSON.stringify(getAddressOptions));
2126
- yield getAddress13(getAddressOptions);
2558
+ yield getAddress17(getAddressOptions);
2127
2559
  setConnected(true);
2128
2560
  } catch (error) {
2129
2561
  console.log("error", error);
@@ -2154,7 +2586,7 @@ var LaserEyesProvider = ({
2154
2586
  throw error;
2155
2587
  }
2156
2588
  });
2157
- const connectLeather = useCallback25(() => __async(void 0, null, function* () {
2589
+ const connectLeather = useCallback33(() => __async(void 0, null, function* () {
2158
2590
  try {
2159
2591
  localStorage == null ? void 0 : localStorage.setItem(LOCAL_STORAGE_DEFAULT_WALLET, LEATHER);
2160
2592
  const lib = window.LeatherProvider;
@@ -2547,7 +2979,7 @@ var LaserEyesProvider = ({
2547
2979
  throw new Error("Transaction failed");
2548
2980
  return txId;
2549
2981
  } else if (provider === XVERSE) {
2550
- const response = yield request13("sendTransfer", {
2982
+ const response = yield request17("sendTransfer", {
2551
2983
  recipients: [
2552
2984
  {
2553
2985
  address: to,
@@ -2558,7 +2990,7 @@ var LaserEyesProvider = ({
2558
2990
  if (response.status === "success") {
2559
2991
  return response.result.txid;
2560
2992
  } else {
2561
- if (response.error.code === RpcErrorCode13.USER_REJECTION) {
2993
+ if (response.error.code === RpcErrorCode17.USER_REJECTION) {
2562
2994
  throw new Error("User rejected the request");
2563
2995
  } else {
2564
2996
  throw new Error("Error sending BTC: " + response.error.message);
@@ -2611,7 +3043,7 @@ var LaserEyesProvider = ({
2611
3043
  if ((_a = response == null ? void 0 : response.result) == null ? void 0 : _a.txid) {
2612
3044
  return response.result.txid;
2613
3045
  } else {
2614
- if (response.error.code === RpcErrorCode13.USER_REJECTION) {
3046
+ if (response.error.code === RpcErrorCode17.USER_REJECTION) {
2615
3047
  throw new Error("User rejected the request");
2616
3048
  } else {
2617
3049
  throw new Error("Error sending BTC: " + response.error.message);
@@ -2637,14 +3069,14 @@ var LaserEyesProvider = ({
2637
3069
  if (provider === UNISAT) {
2638
3070
  return yield library == null ? void 0 : library.signMessage(message);
2639
3071
  } else if (provider === XVERSE) {
2640
- const response = yield request13("signMessage", {
3072
+ const response = yield request17("signMessage", {
2641
3073
  address: address3,
2642
3074
  message
2643
3075
  });
2644
3076
  if (response.status === "success") {
2645
3077
  return response.result.signature;
2646
3078
  } else {
2647
- if (response.error.code === RpcErrorCode13.USER_REJECTION) {
3079
+ if (response.error.code === RpcErrorCode17.USER_REJECTION) {
2648
3080
  throw new Error("User rejected the request");
2649
3081
  } else {
2650
3082
  throw new Error("Error signing message: " + response.error.message);
@@ -2652,13 +3084,13 @@ var LaserEyesProvider = ({
2652
3084
  }
2653
3085
  } else if (provider === MAGIC_EDEN) {
2654
3086
  let signedMessage;
2655
- yield signMessageSatsConnect13({
3087
+ yield signMessageSatsConnect17({
2656
3088
  getProvider: () => __async(void 0, null, function* () {
2657
3089
  return window.magicEden.bitcoin;
2658
3090
  }),
2659
3091
  payload: {
2660
3092
  network: {
2661
- type: BitcoinNetworkType13.Mainnet
3093
+ type: BitcoinNetworkType17.Mainnet
2662
3094
  },
2663
3095
  address: paymentAddress,
2664
3096
  message
@@ -2702,11 +3134,11 @@ var LaserEyesProvider = ({
2702
3134
  if (!psbt)
2703
3135
  throw new Error("No PSBT provided");
2704
3136
  if (isHex(psbt)) {
2705
- psbtBase64 = bitcoin15.Psbt.fromHex(psbt).toBase64();
3137
+ psbtBase64 = bitcoin19.Psbt.fromHex(psbt).toBase64();
2706
3138
  psbtHex = psbt;
2707
3139
  } else if (isBase64(psbt)) {
2708
3140
  psbtBase64 = psbt;
2709
- psbtHex = bitcoin15.Psbt.fromBase64(psbt).toHex();
3141
+ psbtHex = bitcoin19.Psbt.fromBase64(psbt).toHex();
2710
3142
  } else {
2711
3143
  throw new Error("Invalid PSBT format");
2712
3144
  }
@@ -2714,7 +3146,7 @@ var LaserEyesProvider = ({
2714
3146
  const signedPsbt = yield library == null ? void 0 : library.signPsbt(psbtHex, {
2715
3147
  autoFinalized: finalize
2716
3148
  });
2717
- const psbtSignedPsbt = bitcoin15.Psbt.fromHex(signedPsbt);
3149
+ const psbtSignedPsbt = bitcoin19.Psbt.fromHex(signedPsbt);
2718
3150
  if (finalize && broadcast) {
2719
3151
  const txId = yield pushPsbt(signedPsbt);
2720
3152
  return {
@@ -2729,7 +3161,7 @@ var LaserEyesProvider = ({
2729
3161
  txId: void 0
2730
3162
  };
2731
3163
  } else if (provider === XVERSE) {
2732
- const toSignPsbt = bitcoin15.Psbt.fromBase64(String(psbtBase64), {
3164
+ const toSignPsbt = bitcoin19.Psbt.fromBase64(String(psbtBase64), {
2733
3165
  network: getBitcoinNetwork(network)
2734
3166
  });
2735
3167
  const inputs = toSignPsbt.data.inputs;
@@ -2747,7 +3179,7 @@ var LaserEyesProvider = ({
2747
3179
  for (var iter = __forAwait(inputs), more, temp, error; more = !(temp = yield iter.next()).done; more = false) {
2748
3180
  let input = temp.value;
2749
3181
  const { script } = input.witnessUtxo;
2750
- const addressFromScript = fromOutputScript13(
3182
+ const addressFromScript = fromOutputScript17(
2751
3183
  script,
2752
3184
  getBitcoinNetwork(network)
2753
3185
  );
@@ -2790,7 +3222,7 @@ var LaserEyesProvider = ({
2790
3222
  if (response.txId) {
2791
3223
  txId = response.txId;
2792
3224
  } else if (response.psbtBase64) {
2793
- const signedPsbt = bitcoin15.Psbt.fromBase64(
3225
+ const signedPsbt = bitcoin19.Psbt.fromBase64(
2794
3226
  String(response.psbtBase64),
2795
3227
  {
2796
3228
  network: getBitcoinNetwork(network)
@@ -2802,7 +3234,7 @@ var LaserEyesProvider = ({
2802
3234
  },
2803
3235
  onCancel: () => console.log("Canceled")
2804
3236
  };
2805
- yield signTransaction13(signPsbtOptions);
3237
+ yield signTransaction17(signPsbtOptions);
2806
3238
  return {
2807
3239
  signedPsbtHex,
2808
3240
  signedPsbtBase64,
@@ -2811,7 +3243,7 @@ var LaserEyesProvider = ({
2811
3243
  } else if (provider === OYL) {
2812
3244
  const signedPsbt = yield library == null ? void 0 : library.signPsbt(psbtHex, true, true);
2813
3245
  console.log({ signedPsbt });
2814
- const psbtSignedPsbt = bitcoin15.Psbt.fromHex(signedPsbt);
3246
+ const psbtSignedPsbt = bitcoin19.Psbt.fromHex(signedPsbt);
2815
3247
  if (broadcast) {
2816
3248
  const txId = yield pushPsbt(psbtSignedPsbt.toHex());
2817
3249
  return {
@@ -2827,7 +3259,7 @@ var LaserEyesProvider = ({
2827
3259
  };
2828
3260
  }
2829
3261
  } else if (provider === MAGIC_EDEN) {
2830
- const toSignPsbt = bitcoin15.Psbt.fromBase64(String(psbtBase64), {
3262
+ const toSignPsbt = bitcoin19.Psbt.fromBase64(String(psbtBase64), {
2831
3263
  network: getBitcoinNetwork(network)
2832
3264
  });
2833
3265
  const inputs = toSignPsbt.data.inputs;
@@ -2845,7 +3277,7 @@ var LaserEyesProvider = ({
2845
3277
  for (var iter2 = __forAwait(inputs), more2, temp2, error2; more2 = !(temp2 = yield iter2.next()).done; more2 = false) {
2846
3278
  let input = temp2.value;
2847
3279
  const { script } = input.witnessUtxo;
2848
- const addressFromScript = fromOutputScript13(
3280
+ const addressFromScript = fromOutputScript17(
2849
3281
  script,
2850
3282
  getBitcoinNetwork(network)
2851
3283
  );
@@ -2889,7 +3321,7 @@ var LaserEyesProvider = ({
2889
3321
  },
2890
3322
  onFinish: (response) => {
2891
3323
  if (response.psbtBase64) {
2892
- const signedPsbt = bitcoin15.Psbt.fromBase64(
3324
+ const signedPsbt = bitcoin19.Psbt.fromBase64(
2893
3325
  String(response.psbtBase64),
2894
3326
  {
2895
3327
  network: getBitcoinNetwork(network)
@@ -2908,9 +3340,9 @@ var LaserEyesProvider = ({
2908
3340
  throw error3;
2909
3341
  }
2910
3342
  };
2911
- yield signTransaction13(signPsbtOptions);
3343
+ yield signTransaction17(signPsbtOptions);
2912
3344
  if (broadcast) {
2913
- const signed = bitcoin15.Psbt.fromBase64(String(signedPsbtBase64));
3345
+ const signed = bitcoin19.Psbt.fromBase64(String(signedPsbtBase64));
2914
3346
  const finalized = signed.finalizeAllInputs();
2915
3347
  const extracted = finalized.extractTransaction();
2916
3348
  const txId2 = yield pushPsbt(extracted.toHex());
@@ -2930,7 +3362,7 @@ var LaserEyesProvider = ({
2930
3362
  const signedPsbt = yield library == null ? void 0 : library.signPsbt(psbtHex, {
2931
3363
  autoFinalized: finalize
2932
3364
  });
2933
- const psbtSignedPsbt = bitcoin15.Psbt.fromHex(signedPsbt);
3365
+ const psbtSignedPsbt = bitcoin19.Psbt.fromHex(signedPsbt);
2934
3366
  if (finalize && broadcast) {
2935
3367
  const txId = yield pushPsbt(signedPsbt);
2936
3368
  return {
@@ -2956,7 +3388,7 @@ var LaserEyesProvider = ({
2956
3388
  );
2957
3389
  const leatherHexResult = response.result;
2958
3390
  const signedTx = leatherHexResult.hex;
2959
- const signed = bitcoin15.Psbt.fromHex(String(signedTx));
3391
+ const signed = bitcoin19.Psbt.fromHex(String(signedTx));
2960
3392
  if (finalize && broadcast) {
2961
3393
  const finalized = signed.finalizeAllInputs();
2962
3394
  const txId = yield pushPsbt(finalized.toHex());
@@ -2984,7 +3416,7 @@ var LaserEyesProvider = ({
2984
3416
  autoFinalized: finalize,
2985
3417
  broadcast: false
2986
3418
  });
2987
- const psbtSignedPsbt = bitcoin15.Psbt.fromHex(signedPsbt);
3419
+ const psbtSignedPsbt = bitcoin19.Psbt.fromHex(signedPsbt);
2988
3420
  if (finalize && broadcast) {
2989
3421
  const txId = yield pushPsbt(signedPsbt);
2990
3422
  return {
@@ -3016,11 +3448,11 @@ var LaserEyesProvider = ({
3016
3448
  } else if (provider === OKX) {
3017
3449
  return yield library == null ? void 0 : library.pushPsbt(psbt);
3018
3450
  } else if (provider === MAGIC_EDEN) {
3019
- return yield axios27.post(`${getMempoolSpaceUrl3(network)}/api/tx`, psbt).then((res) => res.data);
3451
+ return yield axios35.post(`${getMempoolSpaceUrl3(network)}/api/tx`, psbt).then((res) => res.data);
3020
3452
  } else if (provider === LEATHER) {
3021
- const decoded = bitcoin15.Psbt.fromHex(psbt);
3453
+ const decoded = bitcoin19.Psbt.fromHex(psbt);
3022
3454
  const extracted = decoded.extractTransaction();
3023
- return yield axios27.post(`${getMempoolSpaceUrl3(network)}/api/tx`, extracted.toHex()).then((res) => res.data);
3455
+ return yield axios35.post(`${getMempoolSpaceUrl3(network)}/api/tx`, extracted.toHex()).then((res) => res.data);
3024
3456
  } else if (provider === WIZZ) {
3025
3457
  return yield library == null ? void 0 : library.pushPsbt(psbt);
3026
3458
  } else {
@@ -3030,8 +3462,8 @@ var LaserEyesProvider = ({
3030
3462
  throw error;
3031
3463
  }
3032
3464
  });
3033
- return /* @__PURE__ */ jsx13(
3034
- LaserEyesContext13.Provider,
3465
+ return /* @__PURE__ */ jsx17(
3466
+ LaserEyesContext17.Provider,
3035
3467
  {
3036
3468
  value: {
3037
3469
  library,
@@ -3074,36 +3506,36 @@ var LaserEyesProvider = ({
3074
3506
  };
3075
3507
 
3076
3508
  // src/hooks/useInscriber.ts
3077
- import { useCallback as useCallback26, useEffect as useEffect26, useState as useState26 } from "react";
3509
+ import { useCallback as useCallback34, useEffect as useEffect34, useState as useState34 } from "react";
3078
3510
 
3079
3511
  // src/consts/inscribe.ts
3080
3512
  var MIME_TYPE_TEXT = "text/plain;charset=utf-8";
3081
3513
 
3082
3514
  // src/hooks/useInscriber.ts
3083
- import axios28 from "axios";
3515
+ import axios36 from "axios";
3084
3516
  var DESCRIBE_API_URL = "http://localhost:3000/api";
3085
3517
  var useInscriber = ({
3086
3518
  inscribeApiUrl = DESCRIBE_API_URL
3087
3519
  }) => {
3088
3520
  const { address: address3, paymentAddress, paymentPublicKey, publicKey, signPsbt } = useLaserEyes();
3089
- const [content, setContent] = useState26("");
3090
- const [mimeType, setMimeType] = useState26(MIME_TYPE_TEXT);
3091
- const [commitPsbtHex, setCommitPsbtHex] = useState26("");
3092
- const [commitPsbtBase64, setCommitPsbtBase64] = useState26("");
3093
- const [commitTxId, setCommitTxId] = useState26("");
3094
- const [feeRate, setFeeRate] = useState26(10);
3095
- const [totalFees, setTotalFees] = useState26(0);
3096
- const [inscriberAddress, setInscriberAddress] = useState26("");
3097
- const [inscriptionTxId, setInscriptionTxId] = useState26("");
3098
- const [previewUrl, setPreviewUrl] = useState26("");
3099
- const [isFetchingCommitPsbt, setIsFetchingCommitPsbt] = useState26(false);
3100
- const [isInscribing, setIsInscribing] = useState26(false);
3101
- useEffect26(() => {
3521
+ const [content, setContent] = useState34("");
3522
+ const [mimeType, setMimeType] = useState34(MIME_TYPE_TEXT);
3523
+ const [commitPsbtHex, setCommitPsbtHex] = useState34("");
3524
+ const [commitPsbtBase64, setCommitPsbtBase64] = useState34("");
3525
+ const [commitTxId, setCommitTxId] = useState34("");
3526
+ const [feeRate, setFeeRate] = useState34(10);
3527
+ const [totalFees, setTotalFees] = useState34(0);
3528
+ const [inscriberAddress, setInscriberAddress] = useState34("");
3529
+ const [inscriptionTxId, setInscriptionTxId] = useState34("");
3530
+ const [previewUrl, setPreviewUrl] = useState34("");
3531
+ const [isFetchingCommitPsbt, setIsFetchingCommitPsbt] = useState34(false);
3532
+ const [isInscribing, setIsInscribing] = useState34(false);
3533
+ useEffect34(() => {
3102
3534
  setCommitPsbtHex("");
3103
3535
  setCommitPsbtBase64("");
3104
3536
  setCommitTxId("");
3105
3537
  }, [content, address3, mimeType, feeRate]);
3106
- const getCommitPsbt = useCallback26(() => __async(void 0, null, function* () {
3538
+ const getCommitPsbt = useCallback34(() => __async(void 0, null, function* () {
3107
3539
  try {
3108
3540
  if (!content)
3109
3541
  throw new Error("missing content");
@@ -3116,7 +3548,7 @@ var useInscriber = ({
3116
3548
  if (!mimeType)
3117
3549
  throw new Error("missing mimeType");
3118
3550
  setIsFetchingCommitPsbt(true);
3119
- return yield axios28.post(`${inscribeApiUrl}/create-inscription`, {
3551
+ return yield axios36.post(`${inscribeApiUrl}/create-inscription`, {
3120
3552
  content,
3121
3553
  paymentAddress,
3122
3554
  paymentPublicKey,
@@ -3150,7 +3582,7 @@ var useInscriber = ({
3150
3582
  throw e;
3151
3583
  }
3152
3584
  });
3153
- const inscribe = useCallback26(
3585
+ const inscribe = useCallback34(
3154
3586
  (_0) => __async(void 0, [_0], function* ({
3155
3587
  content: providedContent,
3156
3588
  mimeType: providedMimeType,
@@ -3179,7 +3611,7 @@ var useInscriber = ({
3179
3611
  yield delay(1e4);
3180
3612
  if (!inscribeCommitTxId)
3181
3613
  throw new Error("missing commitTxId");
3182
- return yield axios28.post(`${inscribeApiUrl}/inscribe`, {
3614
+ return yield axios36.post(`${inscribeApiUrl}/inscribe`, {
3183
3615
  content,
3184
3616
  mimeType,
3185
3617
  ordinalAddress: address3,