@glowlabs-org/utils 0.2.8 → 0.2.10

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.
@@ -617,27 +617,42 @@ function ControlRouter(baseUrl) {
617
617
  throw new Error(parseApiError$1(error));
618
618
  }
619
619
  };
620
- const fetchMintedEvents = async () => {
620
+ const fetchGlwPrice = async () => {
621
621
  try {
622
- const data = await request(`/events/minted?page=1&limit=50`);
622
+ const data = await request(`/price/glw`);
623
+ return data.currentPriceUsdc;
624
+ }
625
+ catch (error) {
626
+ throw new Error(parseApiError$1(error));
627
+ }
628
+ };
629
+ // Build pagination query helper
630
+ const buildPaginationQuery = (page, limit) => {
631
+ const p = page ?? 1;
632
+ const l = limit ?? 50;
633
+ return `?page=${p}&limit=${l}`;
634
+ };
635
+ const fetchMintedEvents = async (page, limit) => {
636
+ try {
637
+ const data = await request(`/events/minted${buildPaginationQuery(page, limit)}`);
623
638
  return data.events ?? [];
624
639
  }
625
640
  catch (error) {
626
641
  throw new Error(parseApiError$1(error));
627
642
  }
628
643
  };
629
- const fetchStakeEvents = async () => {
644
+ const fetchStakeEvents = async (page, limit) => {
630
645
  try {
631
- const data = await request(`/events/stake?page=1&limit=50`);
646
+ const data = await request(`/events/stake${buildPaginationQuery(page, limit)}`);
632
647
  return data.events ?? [];
633
648
  }
634
649
  catch (error) {
635
650
  throw new Error(parseApiError$1(error));
636
651
  }
637
652
  };
638
- const fetchPendingTransfers = async () => {
653
+ const fetchPendingTransfers = async (page, limit) => {
639
654
  try {
640
- const data = await request(`/transfers/pending?page=1&limit=50`);
655
+ const data = await request(`/transfers/pending${buildPaginationQuery(page, limit)}`);
641
656
  return data.transfers ?? [];
642
657
  }
643
658
  catch (error) {
@@ -652,9 +667,9 @@ function ControlRouter(baseUrl) {
652
667
  throw new Error(parseApiError$1(error));
653
668
  }
654
669
  };
655
- const fetchFailedOperations = async () => {
670
+ const fetchFailedOperations = async (page, limit) => {
656
671
  try {
657
- const data = await request(`/operations/failed?page=1&limit=50`);
672
+ const data = await request(`/operations/failed${buildPaginationQuery(page, limit)}`);
658
673
  return data.operations ?? [];
659
674
  }
660
675
  catch (error) {
@@ -759,6 +774,7 @@ function ControlRouter(baseUrl) {
759
774
  // Queries
760
775
  fetchGctlBalance,
761
776
  fetchGctlPrice,
777
+ fetchGlwPrice,
762
778
  fetchMintedEvents,
763
779
  fetchStakeEvents,
764
780
  fetchPendingTransfers,
@@ -785,6 +801,676 @@ function ControlRouter(baseUrl) {
785
801
  };
786
802
  }
787
803
 
804
+ // Region metadata for kickstarter campaigns
805
+ const regionMetadata = {
806
+ // US States
807
+ "US-AL": {
808
+ code: "US-AL",
809
+ name: "Alabama",
810
+ description: "The Heart of Dixie is ready for solar transformation",
811
+ isUs: true,
812
+ flag: "🇺🇸",
813
+ },
814
+ "US-AK": {
815
+ code: "US-AK",
816
+ name: "Alaska",
817
+ description: "The Last Frontier embracing renewable energy",
818
+ isUs: true,
819
+ flag: "🇺🇸",
820
+ },
821
+ "US-AZ": {
822
+ code: "US-AZ",
823
+ name: "Arizona",
824
+ description: "The Grand Canyon State with abundant sunshine",
825
+ isUs: true,
826
+ flag: "🇺🇸",
827
+ },
828
+ "US-AR": {
829
+ code: "US-AR",
830
+ name: "Arkansas",
831
+ description: "The Natural State going solar",
832
+ isUs: true,
833
+ flag: "🇺🇸",
834
+ },
835
+ "US-CA": {
836
+ code: "US-CA",
837
+ name: "California",
838
+ description: "The Golden State leading solar innovation",
839
+ isUs: true,
840
+ flag: "🇺🇸",
841
+ },
842
+ "US-CO": {
843
+ code: "US-CO",
844
+ name: "Colorado",
845
+ description: "The Centennial State with high-altitude solar potential",
846
+ isUs: true,
847
+ flag: "🇺🇸",
848
+ },
849
+ "US-CT": {
850
+ code: "US-CT",
851
+ name: "Connecticut",
852
+ description: "The Constitution State embracing clean energy",
853
+ isUs: true,
854
+ flag: "🇺🇸",
855
+ },
856
+ "US-DE": {
857
+ code: "US-DE",
858
+ name: "Delaware",
859
+ description: "The First State to go solar",
860
+ isUs: true,
861
+ flag: "🇺🇸",
862
+ },
863
+ "US-FL": {
864
+ code: "US-FL",
865
+ name: "Florida",
866
+ description: "The Sunshine State living up to its name",
867
+ isUs: true,
868
+ flag: "🇺🇸",
869
+ },
870
+ "US-GA": {
871
+ code: "US-GA",
872
+ name: "Georgia",
873
+ description: "The Peach State harvesting solar energy",
874
+ isUs: true,
875
+ flag: "🇺🇸",
876
+ },
877
+ "US-HI": {
878
+ code: "US-HI",
879
+ name: "Hawaii",
880
+ description: "The Aloha State with year-round solar potential",
881
+ isUs: true,
882
+ flag: "🇺🇸",
883
+ },
884
+ "US-ID": {
885
+ code: "US-ID",
886
+ name: "Idaho",
887
+ description: "The Gem State shining with solar power",
888
+ isUs: true,
889
+ flag: "🇺🇸",
890
+ },
891
+ "US-IL": {
892
+ code: "US-IL",
893
+ name: "Illinois",
894
+ description: "The Prairie State powering up with solar",
895
+ isUs: true,
896
+ flag: "🇺🇸",
897
+ },
898
+ "US-IN": {
899
+ code: "US-IN",
900
+ name: "Indiana",
901
+ description: "The Hoosier State joining the solar revolution",
902
+ isUs: true,
903
+ flag: "🇺🇸",
904
+ },
905
+ "US-IA": {
906
+ code: "US-IA",
907
+ name: "Iowa",
908
+ description: "The Hawkeye State expanding beyond wind to solar",
909
+ isUs: true,
910
+ flag: "🇺🇸",
911
+ },
912
+ "US-KS": {
913
+ code: "US-KS",
914
+ name: "Kansas",
915
+ description: "The Sunflower State growing solar energy",
916
+ isUs: true,
917
+ flag: "🇺🇸",
918
+ },
919
+ "US-KY": {
920
+ code: "US-KY",
921
+ name: "Kentucky",
922
+ description: "The Bluegrass State transitioning to clean energy",
923
+ isUs: true,
924
+ flag: "🇺🇸",
925
+ },
926
+ "US-LA": {
927
+ code: "US-LA",
928
+ name: "Louisiana",
929
+ description: "The Pelican State soaring with solar",
930
+ isUs: true,
931
+ flag: "🇺🇸",
932
+ },
933
+ "US-ME": {
934
+ code: "US-ME",
935
+ name: "Maine",
936
+ description: "The Pine Tree State branching into solar",
937
+ isUs: true,
938
+ flag: "🇺🇸",
939
+ },
940
+ "US-MD": {
941
+ code: "US-MD",
942
+ name: "Maryland",
943
+ description: "The Old Line State drawing new energy lines",
944
+ isUs: true,
945
+ flag: "🇺🇸",
946
+ },
947
+ "US-MA": {
948
+ code: "US-MA",
949
+ name: "Massachusetts",
950
+ description: "The Bay State leading in solar innovation",
951
+ isUs: true,
952
+ flag: "🇺🇸",
953
+ },
954
+ "US-MI": {
955
+ code: "US-MI",
956
+ name: "Michigan",
957
+ description: "The Great Lakes State harnessing solar power",
958
+ isUs: true,
959
+ flag: "🇺🇸",
960
+ },
961
+ "US-MN": {
962
+ code: "US-MN",
963
+ name: "Minnesota",
964
+ description: "The North Star State guiding solar adoption",
965
+ isUs: true,
966
+ flag: "🇺🇸",
967
+ },
968
+ "US-MS": {
969
+ code: "US-MS",
970
+ name: "Mississippi",
971
+ description: "The Magnolia State blooming with solar energy",
972
+ isUs: true,
973
+ flag: "🇺🇸",
974
+ },
975
+ "US-MO": {
976
+ code: "US-MO",
977
+ name: "Missouri",
978
+ description: "The Show-Me State showing solar leadership",
979
+ isUs: true,
980
+ flag: "🇺🇸",
981
+ },
982
+ "US-MT": {
983
+ code: "US-MT",
984
+ name: "Montana",
985
+ description: "Big Sky Country with big solar potential",
986
+ isUs: true,
987
+ flag: "🇺🇸",
988
+ },
989
+ "US-NE": {
990
+ code: "US-NE",
991
+ name: "Nebraska",
992
+ description: "The Cornhusker State cultivating solar power",
993
+ isUs: true,
994
+ flag: "🇺🇸",
995
+ },
996
+ "US-NV": {
997
+ code: "US-NV",
998
+ name: "Nevada",
999
+ description: "The Silver State striking solar gold",
1000
+ isUs: true,
1001
+ flag: "🇺🇸",
1002
+ },
1003
+ "US-NH": {
1004
+ code: "US-NH",
1005
+ name: "New Hampshire",
1006
+ description: "The Granite State building solid solar foundation",
1007
+ isUs: true,
1008
+ flag: "🇺🇸",
1009
+ },
1010
+ "US-NJ": {
1011
+ code: "US-NJ",
1012
+ name: "New Jersey",
1013
+ description: "The Garden State growing solar gardens",
1014
+ isUs: true,
1015
+ flag: "🇺🇸",
1016
+ },
1017
+ "US-NM": {
1018
+ code: "US-NM",
1019
+ name: "New Mexico",
1020
+ description: "The Land of Enchantment enchanted by solar",
1021
+ isUs: true,
1022
+ flag: "🇺🇸",
1023
+ },
1024
+ "US-NY": {
1025
+ code: "US-NY",
1026
+ name: "New York",
1027
+ description: "The Empire State building a solar empire",
1028
+ isUs: true,
1029
+ flag: "🇺🇸",
1030
+ },
1031
+ "US-NC": {
1032
+ code: "US-NC",
1033
+ name: "North Carolina",
1034
+ description: "The Tar Heel State stepping into solar",
1035
+ isUs: true,
1036
+ flag: "🇺🇸",
1037
+ },
1038
+ "US-ND": {
1039
+ code: "US-ND",
1040
+ name: "North Dakota",
1041
+ description: "The Peace Garden State cultivating solar peace",
1042
+ isUs: true,
1043
+ flag: "🇺🇸",
1044
+ },
1045
+ "US-OH": {
1046
+ code: "US-OH",
1047
+ name: "Ohio",
1048
+ description: "The Buckeye State branching into solar",
1049
+ isUs: true,
1050
+ flag: "🇺🇸",
1051
+ },
1052
+ "US-OK": {
1053
+ code: "US-OK",
1054
+ name: "Oklahoma",
1055
+ description: "The Sooner State adopting solar sooner",
1056
+ isUs: true,
1057
+ flag: "🇺🇸",
1058
+ },
1059
+ "US-OR": {
1060
+ code: "US-OR",
1061
+ name: "Oregon",
1062
+ description: "The Beaver State building solar dams",
1063
+ isUs: true,
1064
+ flag: "🇺🇸",
1065
+ },
1066
+ "US-PA": {
1067
+ code: "US-PA",
1068
+ name: "Pennsylvania",
1069
+ description: "The Keystone State unlocking solar potential",
1070
+ isUs: true,
1071
+ flag: "🇺🇸",
1072
+ },
1073
+ "US-RI": {
1074
+ code: "US-RI",
1075
+ name: "Rhode Island",
1076
+ description: "The Ocean State riding the solar wave",
1077
+ isUs: true,
1078
+ flag: "🇺🇸",
1079
+ },
1080
+ "US-SC": {
1081
+ code: "US-SC",
1082
+ name: "South Carolina",
1083
+ description: "The Palmetto State basking in solar",
1084
+ isUs: true,
1085
+ flag: "🇺🇸",
1086
+ },
1087
+ "US-SD": {
1088
+ code: "US-SD",
1089
+ name: "South Dakota",
1090
+ description: "Mount Rushmore State carving out solar future",
1091
+ isUs: true,
1092
+ flag: "🇺🇸",
1093
+ },
1094
+ "US-TN": {
1095
+ code: "US-TN",
1096
+ name: "Tennessee",
1097
+ description: "The Volunteer State volunteering for solar",
1098
+ isUs: true,
1099
+ flag: "🇺🇸",
1100
+ },
1101
+ "US-TX": {
1102
+ code: "US-TX",
1103
+ name: "Texas",
1104
+ description: "The Lone Star State shining with solar power",
1105
+ isUs: true,
1106
+ flag: "🇺🇸",
1107
+ },
1108
+ "US-UT": {
1109
+ code: "US-UT",
1110
+ name: "Utah",
1111
+ description: "The Beehive State buzzing with solar activity",
1112
+ isUs: true,
1113
+ flag: "🇺🇸",
1114
+ },
1115
+ "US-VT": {
1116
+ code: "US-VT",
1117
+ name: "Vermont",
1118
+ description: "The Green Mountain State going greener",
1119
+ isUs: true,
1120
+ flag: "🇺🇸",
1121
+ },
1122
+ "US-VA": {
1123
+ code: "US-VA",
1124
+ name: "Virginia",
1125
+ description: "The Old Dominion embracing new energy",
1126
+ isUs: true,
1127
+ flag: "🇺🇸",
1128
+ },
1129
+ "US-WA": {
1130
+ code: "US-WA",
1131
+ name: "Washington",
1132
+ description: "The Evergreen State staying green with solar",
1133
+ isUs: true,
1134
+ flag: "🇺🇸",
1135
+ },
1136
+ "US-WV": {
1137
+ code: "US-WV",
1138
+ name: "West Virginia",
1139
+ description: "The Mountain State reaching new heights",
1140
+ isUs: true,
1141
+ flag: "🇺🇸",
1142
+ },
1143
+ "US-WI": {
1144
+ code: "US-WI",
1145
+ name: "Wisconsin",
1146
+ description: "The Badger State digging into solar",
1147
+ isUs: true,
1148
+ flag: "🇺🇸",
1149
+ },
1150
+ "US-WY": {
1151
+ code: "US-WY",
1152
+ name: "Wyoming",
1153
+ description: "The Equality State equalizing energy access",
1154
+ isUs: true,
1155
+ flag: "🇺🇸",
1156
+ },
1157
+ // Countries
1158
+ CA: {
1159
+ code: "CA",
1160
+ name: "Canada",
1161
+ description: "The Great White North embracing solar energy",
1162
+ isUs: false,
1163
+ flag: "🇨🇦",
1164
+ },
1165
+ MX: {
1166
+ code: "MX",
1167
+ name: "Mexico",
1168
+ description: "Abundant sunshine powering the future",
1169
+ isUs: false,
1170
+ flag: "🇲🇽",
1171
+ },
1172
+ BR: {
1173
+ code: "BR",
1174
+ name: "Brazil",
1175
+ description: "The largest South American market for solar",
1176
+ isUs: false,
1177
+ flag: "🇧🇷",
1178
+ },
1179
+ AR: {
1180
+ code: "AR",
1181
+ name: "Argentina",
1182
+ description: "Pampas and sunshine creating energy independence",
1183
+ isUs: false,
1184
+ flag: "🇦🇷",
1185
+ },
1186
+ CL: {
1187
+ code: "CL",
1188
+ name: "Chile",
1189
+ description: "The Atacama Desert's solar potential unleashed",
1190
+ isUs: false,
1191
+ flag: "🇨🇱",
1192
+ },
1193
+ CO: {
1194
+ code: "CO",
1195
+ name: "Colombia",
1196
+ description: "Equatorial sunshine year-round",
1197
+ isUs: false,
1198
+ flag: "🇨🇴",
1199
+ },
1200
+ PE: {
1201
+ code: "PE",
1202
+ name: "Peru",
1203
+ description: "From the Andes to the Amazon with solar",
1204
+ isUs: false,
1205
+ flag: "🇵🇪",
1206
+ },
1207
+ GB: {
1208
+ code: "GB",
1209
+ name: "United Kingdom",
1210
+ description: "Leading Europe's renewable transition",
1211
+ isUs: false,
1212
+ flag: "🇬🇧",
1213
+ },
1214
+ FR: {
1215
+ code: "FR",
1216
+ name: "France",
1217
+ description: "La République embracing solar liberté",
1218
+ isUs: false,
1219
+ flag: "🇫🇷",
1220
+ },
1221
+ DE: {
1222
+ code: "DE",
1223
+ name: "Germany",
1224
+ description: "Engineering excellence in solar deployment",
1225
+ isUs: false,
1226
+ flag: "🇩🇪",
1227
+ },
1228
+ IT: {
1229
+ code: "IT",
1230
+ name: "Italy",
1231
+ description: "Mediterranean sunshine powering the boot",
1232
+ isUs: false,
1233
+ flag: "🇮🇹",
1234
+ },
1235
+ ES: {
1236
+ code: "ES",
1237
+ name: "Spain",
1238
+ description: "Iberian peninsula's solar powerhouse",
1239
+ isUs: false,
1240
+ flag: "🇪🇸",
1241
+ },
1242
+ PT: {
1243
+ code: "PT",
1244
+ name: "Portugal",
1245
+ description: "Atlantic coast harnessing solar waves",
1246
+ isUs: false,
1247
+ flag: "🇵🇹",
1248
+ },
1249
+ NL: {
1250
+ code: "NL",
1251
+ name: "Netherlands",
1252
+ description: "Low lands, high solar ambitions",
1253
+ isUs: false,
1254
+ flag: "🇳🇱",
1255
+ },
1256
+ BE: {
1257
+ code: "BE",
1258
+ name: "Belgium",
1259
+ description: "The heart of Europe goes solar",
1260
+ isUs: false,
1261
+ flag: "🇧🇪",
1262
+ },
1263
+ CH: {
1264
+ code: "CH",
1265
+ name: "Switzerland",
1266
+ description: "Alpine heights capturing pure sunlight",
1267
+ isUs: false,
1268
+ flag: "🇨🇭",
1269
+ },
1270
+ AT: {
1271
+ code: "AT",
1272
+ name: "Austria",
1273
+ description: "Mountain valleys filled with solar panels",
1274
+ isUs: false,
1275
+ flag: "🇦🇹",
1276
+ },
1277
+ SE: {
1278
+ code: "SE",
1279
+ name: "Sweden",
1280
+ description: "Nordic innovation in solar technology",
1281
+ isUs: false,
1282
+ flag: "🇸🇪",
1283
+ },
1284
+ NO: {
1285
+ code: "NO",
1286
+ name: "Norway",
1287
+ description: "Fjords reflecting solar possibilities",
1288
+ isUs: false,
1289
+ flag: "🇳🇴",
1290
+ },
1291
+ DK: {
1292
+ code: "DK",
1293
+ name: "Denmark",
1294
+ description: "Viking spirit conquering solar frontiers",
1295
+ isUs: false,
1296
+ flag: "🇩🇰",
1297
+ },
1298
+ FI: {
1299
+ code: "FI",
1300
+ name: "Finland",
1301
+ description: "Land of midnight sun going solar",
1302
+ isUs: false,
1303
+ flag: "🇫🇮",
1304
+ },
1305
+ PL: {
1306
+ code: "PL",
1307
+ name: "Poland",
1308
+ description: "Central Europe's emerging solar market",
1309
+ isUs: false,
1310
+ flag: "🇵🇱",
1311
+ },
1312
+ CZ: {
1313
+ code: "CZ",
1314
+ name: "Czech Republic",
1315
+ description: "Bohemian innovation in renewable energy",
1316
+ isUs: false,
1317
+ flag: "🇨🇿",
1318
+ },
1319
+ GR: {
1320
+ code: "GR",
1321
+ name: "Greece",
1322
+ description: "Aegean sunshine powering ancient lands",
1323
+ isUs: false,
1324
+ flag: "🇬🇷",
1325
+ },
1326
+ TR: {
1327
+ code: "TR",
1328
+ name: "Turkey",
1329
+ description: "Bridge between continents powered by sun",
1330
+ isUs: false,
1331
+ flag: "🇹🇷",
1332
+ },
1333
+ IN: {
1334
+ code: "IN",
1335
+ name: "India",
1336
+ description: "World's fastest growing solar market",
1337
+ isUs: false,
1338
+ flag: "🇮🇳",
1339
+ },
1340
+ CN: {
1341
+ code: "CN",
1342
+ name: "China",
1343
+ description: "Global solar manufacturing leader",
1344
+ isUs: false,
1345
+ flag: "🇨🇳",
1346
+ },
1347
+ JP: {
1348
+ code: "JP",
1349
+ name: "Japan",
1350
+ description: "Rising sun powering technological innovation",
1351
+ isUs: false,
1352
+ flag: "🇯🇵",
1353
+ },
1354
+ KR: {
1355
+ code: "KR",
1356
+ name: "South Korea",
1357
+ description: "High-tech nation embracing green energy",
1358
+ isUs: false,
1359
+ flag: "🇰🇷",
1360
+ },
1361
+ AU: {
1362
+ code: "AU",
1363
+ name: "Australia",
1364
+ description: "Outback sunshine creating energy abundance",
1365
+ isUs: false,
1366
+ flag: "🇦🇺",
1367
+ },
1368
+ NZ: {
1369
+ code: "NZ",
1370
+ name: "New Zealand",
1371
+ description: "Clean, green Aotearoa",
1372
+ isUs: false,
1373
+ flag: "🇳🇿",
1374
+ },
1375
+ ZA: {
1376
+ code: "ZA",
1377
+ name: "South Africa",
1378
+ description: "African sunshine lighting the continent",
1379
+ isUs: false,
1380
+ flag: "🇿🇦",
1381
+ },
1382
+ EG: {
1383
+ code: "EG",
1384
+ name: "Egypt",
1385
+ description: "Desert sun powering ancient civilizations",
1386
+ isUs: false,
1387
+ flag: "🇪🇬",
1388
+ },
1389
+ NG: {
1390
+ code: "NG",
1391
+ name: "Nigeria",
1392
+ description: "West Africa's solar giant awakening",
1393
+ isUs: false,
1394
+ flag: "🇳🇬",
1395
+ },
1396
+ KE: {
1397
+ code: "KE",
1398
+ name: "Kenya",
1399
+ description: "East African solar innovation hub",
1400
+ isUs: false,
1401
+ flag: "🇰🇪",
1402
+ },
1403
+ MA: {
1404
+ code: "MA",
1405
+ name: "Morocco",
1406
+ description: "Saharan edge harnessing desert power",
1407
+ isUs: false,
1408
+ flag: "🇲🇦",
1409
+ },
1410
+ SA: {
1411
+ code: "SA",
1412
+ name: "Saudi Arabia",
1413
+ description: "Oil kingdom transitioning to solar",
1414
+ isUs: false,
1415
+ flag: "🇸🇦",
1416
+ },
1417
+ AE: {
1418
+ code: "AE",
1419
+ name: "United Arab Emirates",
1420
+ description: "Desert emirates building solar oases",
1421
+ isUs: false,
1422
+ flag: "🇦🇪",
1423
+ },
1424
+ IL: {
1425
+ code: "IL",
1426
+ name: "Israel",
1427
+ description: "Innovation nation powered by sunshine",
1428
+ isUs: false,
1429
+ flag: "🇮🇱",
1430
+ },
1431
+ SG: {
1432
+ code: "SG",
1433
+ name: "Singapore",
1434
+ description: "City-state maximizing rooftop solar",
1435
+ isUs: false,
1436
+ flag: "🇸🇬",
1437
+ },
1438
+ ID: {
1439
+ code: "ID",
1440
+ name: "Indonesia",
1441
+ description: "Archipelago nation harnessing tropical sun",
1442
+ isUs: false,
1443
+ flag: "🇮🇩",
1444
+ },
1445
+ TH: {
1446
+ code: "TH",
1447
+ name: "Thailand",
1448
+ description: "Land of smiles powered by solar",
1449
+ isUs: false,
1450
+ flag: "🇹🇭",
1451
+ },
1452
+ VN: {
1453
+ code: "VN",
1454
+ name: "Vietnam",
1455
+ description: "Southeast Asian solar manufacturing hub",
1456
+ isUs: false,
1457
+ flag: "🇻🇳",
1458
+ },
1459
+ PH: {
1460
+ code: "PH",
1461
+ name: "Philippines",
1462
+ description: "7,000 islands unified by solar power",
1463
+ isUs: false,
1464
+ flag: "🇵🇭",
1465
+ },
1466
+ };
1467
+ // Helper to get all regions as array
1468
+ const allRegions = Object.values(regionMetadata);
1469
+ // Helper to get US states
1470
+ const usStates = allRegions.filter((r) => r.isUs);
1471
+ // Helper to get countries
1472
+ const countries = allRegions.filter((r) => !r.isUs);
1473
+
788
1474
  // ---------------------------------------------------------------------------
789
1475
  // Helpers
790
1476
  // ---------------------------------------------------------------------------
@@ -865,9 +1551,6 @@ function RegionRouter(baseUrl) {
865
1551
  // -------------------------------------------------------------------------
866
1552
  // Helpers (derived)
867
1553
  // -------------------------------------------------------------------------
868
- // NOTE: regionMetadata is imported lazily to avoid circular deps at load time.
869
- // eslint-disable-next-line @typescript-eslint/no-var-requires
870
- const { regionMetadata } = require("@/lib/region-metadata");
871
1554
  const getRegionByCode = (code) => {
872
1555
  const metadata = regionMetadata[code];
873
1556
  if (!metadata)
@@ -920,5 +1603,5 @@ function RegionRouter(baseUrl) {
920
1603
  };
921
1604
  }
922
1605
 
923
- export { ControlRouter as C, DECIMALS_BY_TOKEN as D, ForwarderError as F, GLOW_WEIGHT_DECIMAL_PRECISION as G, HUB_URL as H, MAX_WEIGHT as M, RegionRouter as R, USDG_WEIGHT_DECIMAL_PRECISION as U, GCA_URLS as a, getAddresses as g, useForwarder as u };
924
- //# sourceMappingURL=region-router-ClCO6Pac.js.map
1606
+ export { ControlRouter as C, DECIMALS_BY_TOKEN as D, ForwarderError as F, GLOW_WEIGHT_DECIMAL_PRECISION as G, HUB_URL as H, MAX_WEIGHT as M, RegionRouter as R, USDG_WEIGHT_DECIMAL_PRECISION as U, allRegions as a, usStates as b, countries as c, GCA_URLS as d, getAddresses as g, regionMetadata as r, useForwarder as u };
1607
+ //# sourceMappingURL=region-router-cix_f44H.js.map