@openzeppelin/ui-builder-adapter-stellar 1.1.2 → 1.2.0

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 (83) hide show
  1. package/README.md +1 -1
  2. package/dist/index.cjs +522 -486
  3. package/dist/index.cjs.map +1 -1
  4. package/dist/index.d.cts +5 -1
  5. package/dist/index.d.ts +5 -1
  6. package/dist/index.js +101 -78
  7. package/dist/index.js.map +1 -1
  8. package/package.json +5 -5
  9. package/src/access-control/actions.ts +1 -1
  10. package/src/access-control/feature-detection.ts +2 -2
  11. package/src/access-control/indexer-client.ts +3 -7
  12. package/src/access-control/onchain-reader.ts +3 -7
  13. package/src/access-control/service.ts +3 -3
  14. package/src/access-control/validation.ts +3 -3
  15. package/src/adapter.ts +12 -3
  16. package/src/config.ts +1 -1
  17. package/src/configuration/__tests__/explorer.test.ts +1 -1
  18. package/src/configuration/__tests__/rpc.test.ts +4 -4
  19. package/src/configuration/execution.ts +2 -2
  20. package/src/configuration/explorer.ts +2 -2
  21. package/src/configuration/network-services.ts +2 -2
  22. package/src/configuration/rpc.ts +2 -7
  23. package/src/contract/loader.ts +2 -2
  24. package/src/contract/type.ts +2 -2
  25. package/src/mapping/constants.ts +39 -1
  26. package/src/mapping/enum-metadata.ts +2 -2
  27. package/src/mapping/field-generator.ts +2 -2
  28. package/src/mapping/index.ts +1 -0
  29. package/src/mapping/struct-fields.ts +2 -2
  30. package/src/mapping/tuple-components.ts +1 -1
  31. package/src/mapping/type-coverage-validator.ts +2 -2
  32. package/src/mapping/type-mapper.ts +1 -1
  33. package/src/networks/index.ts +1 -1
  34. package/src/networks/mainnet.ts +2 -2
  35. package/src/networks/testnet.ts +1 -1
  36. package/src/query/handler.ts +2 -2
  37. package/src/query/view-checker.ts +1 -1
  38. package/src/sac/spec-cache.ts +1 -1
  39. package/src/sac/spec-source.ts +1 -1
  40. package/src/sac/xdr.ts +1 -1
  41. package/src/transaction/components/AdvancedInfo.tsx +1 -1
  42. package/src/transaction/components/FeeConfiguration.tsx +1 -1
  43. package/src/transaction/components/StellarRelayerOptions.tsx +1 -1
  44. package/src/transaction/components/TransactionTiming.tsx +1 -1
  45. package/src/transaction/eoa.ts +2 -2
  46. package/src/transaction/execution-strategy.ts +1 -1
  47. package/src/transaction/formatter.ts +3 -3
  48. package/src/transaction/relayer.ts +2 -2
  49. package/src/transaction/sender.ts +2 -2
  50. package/src/transform/output-formatter.ts +2 -2
  51. package/src/transform/parsers/complex-parser.ts +1 -1
  52. package/src/transform/parsers/generic-parser.ts +2 -2
  53. package/src/transform/parsers/index.ts +2 -2
  54. package/src/transform/parsers/primitive-parser.ts +1 -1
  55. package/src/transform/parsers/scval-converter.ts +2 -2
  56. package/src/transform/parsers/struct-parser.ts +2 -2
  57. package/src/utils/input-parsing.ts +1 -1
  58. package/src/utils/type-detection.ts +1 -1
  59. package/src/validation/eoa.ts +2 -2
  60. package/src/validation/relayer.ts +1 -1
  61. package/src/wallet/README.md +1 -1
  62. package/src/wallet/components/StellarWalletUiRoot.tsx +2 -2
  63. package/src/wallet/components/account/AccountDisplay.tsx +3 -3
  64. package/src/wallet/components/connect/ConnectButton.tsx +3 -3
  65. package/src/wallet/components/connect/ConnectorDialog.tsx +3 -3
  66. package/src/wallet/connection.ts +2 -2
  67. package/src/wallet/hooks/facade-hooks.ts +1 -1
  68. package/src/wallet/hooks/useStellarConnect.ts +1 -1
  69. package/src/wallet/hooks/useUiKitConfig.ts +2 -2
  70. package/src/wallet/implementation/wallets-kit-implementation.ts +2 -6
  71. package/src/wallet/services/__tests__/configResolutionService.test.ts +1 -1
  72. package/src/wallet/services/configResolutionService.ts +2 -2
  73. package/src/wallet/stellar-wallets-kit/StellarWalletsKitConnectButton.tsx +1 -1
  74. package/src/wallet/stellar-wallets-kit/__tests__/export-service.test.ts +1 -1
  75. package/src/wallet/stellar-wallets-kit/config-generator.ts +1 -1
  76. package/src/wallet/stellar-wallets-kit/export-service.ts +1 -1
  77. package/src/wallet/stellar-wallets-kit/stellarUiKitManager.ts +2 -2
  78. package/src/wallet/types.ts +1 -1
  79. package/src/wallet/utils/__tests__/filterWalletComponents.test.ts +1 -1
  80. package/src/wallet/utils/__tests__/uiKitService.test.ts +1 -1
  81. package/src/wallet/utils/filterWalletComponents.ts +3 -3
  82. package/src/wallet/utils/stellarWalletImplementationManager.ts +2 -2
  83. package/src/wallet/utils/uiKitService.ts +2 -2
package/dist/index.cjs CHANGED
@@ -44,25 +44,25 @@ __export(index_exports, {
44
44
  module.exports = __toCommonJS(index_exports);
45
45
 
46
46
  // src/adapter.ts
47
- var import_ui_builder_types12 = require("@openzeppelin/ui-builder-types");
48
- var import_ui_builder_utils44 = require("@openzeppelin/ui-builder-utils");
47
+ var import_ui_types12 = require("@openzeppelin/ui-types");
48
+ var import_ui_utils44 = require("@openzeppelin/ui-utils");
49
49
 
50
50
  // src/access-control/onchain-reader.ts
51
51
  var import_stellar_sdk8 = require("@stellar/stellar-sdk");
52
- var import_ui_builder_types5 = require("@openzeppelin/ui-builder-types");
53
- var import_ui_builder_utils10 = require("@openzeppelin/ui-builder-utils");
52
+ var import_ui_types5 = require("@openzeppelin/ui-types");
53
+ var import_ui_utils10 = require("@openzeppelin/ui-utils");
54
54
 
55
55
  // src/query/handler.ts
56
56
  var import_stellar_sdk7 = require("@stellar/stellar-sdk");
57
- var import_ui_builder_utils9 = require("@openzeppelin/ui-builder-utils");
57
+ var import_ui_utils9 = require("@openzeppelin/ui-utils");
58
58
 
59
59
  // src/transform/parsers/index.ts
60
- var import_ui_builder_types4 = require("@openzeppelin/ui-builder-types");
61
- var import_ui_builder_utils7 = require("@openzeppelin/ui-builder-utils");
60
+ var import_ui_types4 = require("@openzeppelin/ui-types");
61
+ var import_ui_utils7 = require("@openzeppelin/ui-utils");
62
62
 
63
63
  // src/utils/type-detection.ts
64
64
  var StellarSdk = __toESM(require("@stellar/stellar-sdk"), 1);
65
- var import_ui_builder_utils = require("@openzeppelin/ui-builder-utils");
65
+ var import_ui_utils = require("@openzeppelin/ui-utils");
66
66
  function extractSorobanTypeFromScSpec(scSpecType) {
67
67
  try {
68
68
  const typeSwitch = scSpecType.switch();
@@ -143,7 +143,7 @@ function extractSorobanTypeFromScSpec(scSpecType) {
143
143
  return udtType.name().toString();
144
144
  }
145
145
  default:
146
- import_ui_builder_utils.logger.error("extractSorobanTypeFromScSpec", `\u{1F6A8} MISSING SCSPEC TYPE HANDLER \u{1F6A8}`, {
146
+ import_ui_utils.logger.error("extractSorobanTypeFromScSpec", `\u{1F6A8} MISSING SCSPEC TYPE HANDLER \u{1F6A8}`, {
147
147
  typeSwitchValue: typeSwitch.value,
148
148
  typeSwitchName: typeSwitch.name,
149
149
  rawScSpecType: scSpecType,
@@ -157,16 +157,16 @@ function extractSorobanTypeFromScSpec(scSpecType) {
157
157
  value: typeSwitch.value,
158
158
  timestamp: (/* @__PURE__ */ new Date()).toISOString()
159
159
  };
160
- if ((0, import_ui_builder_utils.isDevelopmentOrTestEnvironment)()) {
160
+ if ((0, import_ui_utils.isDevelopmentOrTestEnvironment)()) {
161
161
  throw new Error(
162
162
  `Missing ScSpec type handler: ${typeSwitch.name} (value: ${typeSwitch.value}). Please add support for this type.`
163
163
  );
164
164
  }
165
- import_ui_builder_utils.logger.error("STELLAR_ADAPTER_MISSING_TYPE", "Missing ScSpec type handler:", errorReport);
165
+ import_ui_utils.logger.error("STELLAR_ADAPTER_MISSING_TYPE", "Missing ScSpec type handler:", errorReport);
166
166
  return "unknown";
167
167
  }
168
168
  } catch (error) {
169
- import_ui_builder_utils.logger.error("extractSorobanTypeFromScSpec", "Failed to extract type:", error);
169
+ import_ui_utils.logger.error("extractSorobanTypeFromScSpec", "Failed to extract type:", error);
170
170
  return "unknown";
171
171
  }
172
172
  }
@@ -189,8 +189,8 @@ function isBytesNType(parameterType) {
189
189
  }
190
190
 
191
191
  // src/transform/parsers/generic-parser.ts
192
- var import_ui_builder_types = require("@openzeppelin/ui-builder-types");
193
- var import_ui_builder_utils2 = require("@openzeppelin/ui-builder-utils");
192
+ var import_ui_types = require("@openzeppelin/ui-types");
193
+ var import_ui_utils2 = require("@openzeppelin/ui-utils");
194
194
  var SYSTEM_LOG_TAG = "GenericParser";
195
195
  function parseGenericType(typeString) {
196
196
  const match = typeString.match(/^(\w+)<(.*)>$/);
@@ -241,7 +241,7 @@ function parseGeneric(value, parameterType, parseInnerValue) {
241
241
  return value.map((item) => parseInnerValue(item, innerType));
242
242
  }
243
243
  case "Map": {
244
- if (!(0, import_ui_builder_types.isMapEntryArray)(value)) {
244
+ if (!(0, import_ui_types.isMapEntryArray)(value)) {
245
245
  throw new Error(`Array of MapEntry objects expected for Map type, got ${typeof value}`);
246
246
  }
247
247
  if (parameters.length < 2) {
@@ -289,11 +289,11 @@ function parseGeneric(value, parameterType, parseInnerValue) {
289
289
  return value;
290
290
  }
291
291
  default:
292
- import_ui_builder_utils2.logger.warn(SYSTEM_LOG_TAG, `Unknown generic type: ${baseType}`);
292
+ import_ui_utils2.logger.warn(SYSTEM_LOG_TAG, `Unknown generic type: ${baseType}`);
293
293
  return null;
294
294
  }
295
295
  } catch (error) {
296
- import_ui_builder_utils2.logger.error(SYSTEM_LOG_TAG, `Failed to parse generic type ${parameterType}:`, error);
296
+ import_ui_utils2.logger.error(SYSTEM_LOG_TAG, `Failed to parse generic type ${parameterType}:`, error);
297
297
  throw error;
298
298
  }
299
299
  }
@@ -304,7 +304,7 @@ function isGenericType(parameterType) {
304
304
 
305
305
  // src/transform/parsers/primitive-parser.ts
306
306
  var import_stellar_sdk = require("@stellar/stellar-sdk");
307
- var import_ui_builder_utils3 = require("@openzeppelin/ui-builder-utils");
307
+ var import_ui_utils3 = require("@openzeppelin/ui-utils");
308
308
  var SYSTEM_LOG_TAG2 = "PrimitiveParser";
309
309
  function parsePrimitive(value, parameterType) {
310
310
  try {
@@ -325,15 +325,15 @@ function parsePrimitive(value, parameterType) {
325
325
  case "Bytes":
326
326
  if (typeof value === "string") {
327
327
  const cleanValue = value.startsWith("0x") ? value.slice(2) : value;
328
- const encoding = (0, import_ui_builder_utils3.detectBytesEncoding)(cleanValue);
329
- return (0, import_ui_builder_utils3.stringToBytes)(cleanValue, encoding);
328
+ const encoding = (0, import_ui_utils3.detectBytesEncoding)(cleanValue);
329
+ return (0, import_ui_utils3.stringToBytes)(cleanValue, encoding);
330
330
  }
331
331
  throw new Error(`Bytes parameter must be a string, got ${typeof value}`);
332
332
  // DataUrl: handle base64 encoded data (similar to Bytes)
333
333
  case "DataUrl":
334
334
  if (typeof value === "string") {
335
- const encoding = (0, import_ui_builder_utils3.detectBytesEncoding)(value);
336
- return (0, import_ui_builder_utils3.stringToBytes)(value, encoding);
335
+ const encoding = (0, import_ui_utils3.detectBytesEncoding)(value);
336
+ return (0, import_ui_utils3.stringToBytes)(value, encoding);
337
337
  }
338
338
  throw new Error(`DataUrl parameter must be a string, got ${typeof value}`);
339
339
  // Address: validate format
@@ -358,8 +358,8 @@ function parsePrimitive(value, parameterType) {
358
358
  if (/^BytesN<\d+>$/.test(parameterType)) {
359
359
  if (typeof value === "string") {
360
360
  const cleanValue = value.startsWith("0x") ? value.slice(2) : value;
361
- const encoding = (0, import_ui_builder_utils3.detectBytesEncoding)(cleanValue);
362
- return (0, import_ui_builder_utils3.stringToBytes)(cleanValue, encoding);
361
+ const encoding = (0, import_ui_utils3.detectBytesEncoding)(cleanValue);
362
+ return (0, import_ui_utils3.stringToBytes)(cleanValue, encoding);
363
363
  }
364
364
  throw new Error(`Bytes parameter must be a string, got ${typeof value}`);
365
365
  }
@@ -378,7 +378,7 @@ function parsePrimitive(value, parameterType) {
378
378
  return null;
379
379
  }
380
380
  } catch (error) {
381
- import_ui_builder_utils3.logger.error(SYSTEM_LOG_TAG2, `Failed to parse primitive ${parameterType}:`, error);
381
+ import_ui_utils3.logger.error(SYSTEM_LOG_TAG2, `Failed to parse primitive ${parameterType}:`, error);
382
382
  throw error;
383
383
  }
384
384
  }
@@ -388,7 +388,7 @@ function isPrimitiveType(parameterType) {
388
388
 
389
389
  // src/transform/parsers/complex-parser.ts
390
390
  var import_stellar_sdk3 = require("@stellar/stellar-sdk");
391
- var import_ui_builder_utils5 = require("@openzeppelin/ui-builder-utils");
391
+ var import_ui_utils5 = require("@openzeppelin/ui-utils");
392
392
 
393
393
  // src/utils/safe-type-parser.ts
394
394
  var PARSING_LIMITS = {
@@ -612,7 +612,7 @@ function convertStellarTypeToScValType(stellarType) {
612
612
 
613
613
  // src/utils/input-parsing.ts
614
614
  var import_stellar_sdk2 = require("@stellar/stellar-sdk");
615
- var import_ui_builder_utils4 = require("@openzeppelin/ui-builder-utils");
615
+ var import_ui_utils4 = require("@openzeppelin/ui-utils");
616
616
 
617
617
  // src/utils/xdr-ordering.ts
618
618
  function compareScValsByXdr(a, b) {
@@ -665,13 +665,13 @@ function getScValFromPrimitive(v) {
665
665
  }
666
666
  if (v.type === "bytes") {
667
667
  const stringValue = v.value;
668
- const encoding = (0, import_ui_builder_utils4.detectBytesEncoding)(stringValue);
669
- return (0, import_stellar_sdk2.nativeToScVal)((0, import_ui_builder_utils4.stringToBytes)(stringValue, encoding));
668
+ const encoding = (0, import_ui_utils4.detectBytesEncoding)(stringValue);
669
+ return (0, import_stellar_sdk2.nativeToScVal)((0, import_ui_utils4.stringToBytes)(stringValue, encoding));
670
670
  }
671
671
  const typeHint = convertStellarTypeToScValType(v.type);
672
672
  return (0, import_stellar_sdk2.nativeToScVal)(v.value, { type: typeHint });
673
673
  } catch (error) {
674
- import_ui_builder_utils4.logger.error(SYSTEM_LOG_TAG3, `Failed to convert primitive ${v.type}:`, error);
674
+ import_ui_utils4.logger.error(SYSTEM_LOG_TAG3, `Failed to convert primitive ${v.type}:`, error);
675
675
  throw new Error(`Failed to convert primitive value of type ${v.type}: ${error}`);
676
676
  }
677
677
  }
@@ -718,7 +718,7 @@ function convertEnumToScVal(obj, scVals) {
718
718
  const tupleVec = import_stellar_sdk2.xdr.ScVal.scvVec([tagSymbol, ...valuesVal]);
719
719
  return tupleVec;
720
720
  } catch (error) {
721
- import_ui_builder_utils4.logger.error(SYSTEM_LOG_TAG3, "Failed to convert enum:", error);
721
+ import_ui_utils4.logger.error(SYSTEM_LOG_TAG3, "Failed to convert enum:", error);
722
722
  throw new Error(`Failed to convert enum: ${error}`);
723
723
  }
724
724
  }
@@ -762,14 +762,14 @@ function convertObjectToMap(mapArray) {
762
762
  }, {});
763
763
  return { mapVal, mapType };
764
764
  } catch (error) {
765
- import_ui_builder_utils4.logger.error(SYSTEM_LOG_TAG3, "Failed to convert map:", error);
765
+ import_ui_utils4.logger.error(SYSTEM_LOG_TAG3, "Failed to convert map:", error);
766
766
  throw new Error(`Failed to convert map: ${error}`);
767
767
  }
768
768
  }
769
769
 
770
770
  // src/transform/parsers/scval-converter.ts
771
771
  var import_stellar_sdk5 = require("@stellar/stellar-sdk");
772
- var import_ui_builder_types3 = require("@openzeppelin/ui-builder-types");
772
+ var import_ui_types3 = require("@openzeppelin/ui-types");
773
773
 
774
774
  // src/utils/stellar-types.ts
775
775
  var PRIMITIVE_STELLAR_TYPES = /* @__PURE__ */ new Set([
@@ -797,8 +797,8 @@ function isPrimitiveParamType(type) {
797
797
 
798
798
  // src/transform/parsers/struct-parser.ts
799
799
  var import_stellar_sdk4 = require("@stellar/stellar-sdk");
800
- var import_ui_builder_types2 = require("@openzeppelin/ui-builder-types");
801
- var import_ui_builder_utils6 = require("@openzeppelin/ui-builder-utils");
800
+ var import_ui_types2 = require("@openzeppelin/ui-types");
801
+ var import_ui_utils6 = require("@openzeppelin/ui-utils");
802
802
  var SYSTEM_LOG_TAG4 = "StructParser";
803
803
  function isTupleStructSchema(schema) {
804
804
  if (!schema?.components || schema.components.length === 0) {
@@ -825,7 +825,7 @@ function needsParsing(value, fieldType) {
825
825
  if (typeof value === "string") {
826
826
  return true;
827
827
  }
828
- if ((0, import_ui_builder_utils6.isPlainObject)(value)) {
828
+ if ((0, import_ui_utils6.isPlainObject)(value)) {
829
829
  return true;
830
830
  }
831
831
  return false;
@@ -888,7 +888,7 @@ function convertStructToScVal(structObj, parameterType, paramSchema, parseInnerV
888
888
  convertedValue[fieldName] = mapObject;
889
889
  typeHints[fieldName] = ["symbol", mapTypeHints];
890
890
  } else {
891
- if (convertToScVal && (fieldType.startsWith("Vec<") || (0, import_ui_builder_types2.isEnumValue)(parsedValue))) {
891
+ if (convertToScVal && (fieldType.startsWith("Vec<") || (0, import_ui_types2.isEnumValue)(parsedValue))) {
892
892
  const fieldSchema = paramSchema?.components?.find((c) => c.name === fieldName);
893
893
  convertedValue[fieldName] = convertToScVal(
894
894
  parsedValue,
@@ -911,14 +911,14 @@ function convertStructToScVal(structObj, parameterType, paramSchema, parseInnerV
911
911
  );
912
912
  }
913
913
  }
914
- import_ui_builder_utils6.logger.debug(SYSTEM_LOG_TAG4, "convertStructToScVal final values:", {
914
+ import_ui_utils6.logger.debug(SYSTEM_LOG_TAG4, "convertStructToScVal final values:", {
915
915
  parameterType,
916
916
  convertedValue,
917
917
  typeHints
918
918
  });
919
919
  const hasEnumFields = paramSchema?.components?.some((comp) => {
920
920
  const fieldValue = convertedValue[comp.name];
921
- return (0, import_ui_builder_types2.isEnumValue)(fieldValue);
921
+ return (0, import_ui_types2.isEnumValue)(fieldValue);
922
922
  });
923
923
  let scVal;
924
924
  if (hasEnumFields && convertToScVal && paramSchema?.components) {
@@ -928,7 +928,7 @@ function convertStructToScVal(structObj, parameterType, paramSchema, parseInnerV
928
928
  const fieldValue = convertedValue[fieldName];
929
929
  const keyScVal = (0, import_stellar_sdk4.nativeToScVal)(fieldName, { type: "symbol" });
930
930
  let valueScVal;
931
- if ((0, import_ui_builder_types2.isEnumValue)(fieldValue)) {
931
+ if ((0, import_ui_types2.isEnumValue)(fieldValue)) {
932
932
  valueScVal = convertToScVal(fieldValue, fieldSchema.type, fieldSchema, parseInnerValue);
933
933
  } else {
934
934
  const fieldTypeHint = typeHints[fieldName];
@@ -950,7 +950,7 @@ function convertStructToScVal(structObj, parameterType, paramSchema, parseInnerV
950
950
  } else {
951
951
  scVal = (0, import_stellar_sdk4.nativeToScVal)(convertedValue, { type: typeHints });
952
952
  }
953
- import_ui_builder_utils6.logger.debug(SYSTEM_LOG_TAG4, "convertStructToScVal generated ScVal:", {
953
+ import_ui_utils6.logger.debug(SYSTEM_LOG_TAG4, "convertStructToScVal generated ScVal:", {
954
954
  parameterType,
955
955
  scValType: scVal.switch().name,
956
956
  scValValue: scVal.value()
@@ -958,7 +958,7 @@ function convertStructToScVal(structObj, parameterType, paramSchema, parseInnerV
958
958
  return scVal;
959
959
  }
960
960
  function isStructType(value, parameterType) {
961
- if (!(0, import_ui_builder_utils6.isPlainObject)(value)) {
961
+ if (!(0, import_ui_utils6.isPlainObject)(value)) {
962
962
  return false;
963
963
  }
964
964
  const genericInfo = parseGenericType(parameterType);
@@ -987,7 +987,7 @@ function valueToScVal(value, parameterType, paramSchema, parseInnerValue) {
987
987
  numericValue = byName?.value ?? Number(value);
988
988
  } else if (typeof value === "number") {
989
989
  numericValue = value;
990
- } else if ((0, import_ui_builder_types3.isEnumValue)(value)) {
990
+ } else if ((0, import_ui_types3.isEnumValue)(value)) {
991
991
  const byTag = enumMetadata.variants.find((v) => v.name === value.tag);
992
992
  numericValue = byTag?.value;
993
993
  }
@@ -1007,7 +1007,7 @@ function valueToScVal(value, parameterType, paramSchema, parseInnerValue) {
1007
1007
  const typeHint2 = Array.isArray(scValType2) ? scValType2[0] : scValType2;
1008
1008
  return (0, import_stellar_sdk5.nativeToScVal)(finalVal, { type: typeHint2 });
1009
1009
  }
1010
- if ((0, import_ui_builder_types3.isEnumValue)(possibleEnumValue) || typeof possibleEnumValue === "object" && possibleEnumValue !== null && "enum" in possibleEnumValue) {
1010
+ if ((0, import_ui_types3.isEnumValue)(possibleEnumValue) || typeof possibleEnumValue === "object" && possibleEnumValue !== null && "enum" in possibleEnumValue) {
1011
1011
  const enumValue = possibleEnumValue;
1012
1012
  if ("enum" in enumValue && typeof enumValue.enum === "number") {
1013
1013
  return (0, import_stellar_sdk5.nativeToScVal)(enumValue.enum, { type: "u32" });
@@ -1243,10 +1243,10 @@ function parseStellarInput(value, parameterType) {
1243
1243
  const result = parseGeneric(value, parameterType, parseStellarInput);
1244
1244
  return result;
1245
1245
  }
1246
- if ((0, import_ui_builder_types4.isEnumValue)(value) && isLikelyEnumType(parameterType)) {
1246
+ if ((0, import_ui_types4.isEnumValue)(value) && isLikelyEnumType(parameterType)) {
1247
1247
  return value;
1248
1248
  }
1249
- if ((0, import_ui_builder_utils7.isPlainObject)(value)) {
1249
+ if ((0, import_ui_utils7.isPlainObject)(value)) {
1250
1250
  return value;
1251
1251
  }
1252
1252
  if (Array.isArray(value)) {
@@ -1257,14 +1257,14 @@ function parseStellarInput(value, parameterType) {
1257
1257
  }
1258
1258
  throw new Error(`Unsupported parameter type: ${parameterType} with value type ${typeof value}`);
1259
1259
  } catch (error) {
1260
- import_ui_builder_utils7.logger.error(SYSTEM_LOG_TAG5, "Failed to parse Stellar input:", error);
1260
+ import_ui_utils7.logger.error(SYSTEM_LOG_TAG5, "Failed to parse Stellar input:", error);
1261
1261
  throw error;
1262
1262
  }
1263
1263
  }
1264
1264
 
1265
1265
  // src/transform/output-formatter.ts
1266
1266
  var import_stellar_sdk6 = require("@stellar/stellar-sdk");
1267
- var import_ui_builder_utils8 = require("@openzeppelin/ui-builder-utils");
1267
+ var import_ui_utils8 = require("@openzeppelin/ui-utils");
1268
1268
 
1269
1269
  // src/types/artifacts.ts
1270
1270
  function isStellarContractArtifacts(obj) {
@@ -1287,7 +1287,7 @@ function validateAndConvertStellarArtifacts(source) {
1287
1287
  // src/transform/output-formatter.ts
1288
1288
  function formatStellarFunctionResult(result, functionDetails) {
1289
1289
  if (!functionDetails.outputs || !Array.isArray(functionDetails.outputs)) {
1290
- import_ui_builder_utils8.logger.warn(
1290
+ import_ui_utils8.logger.warn(
1291
1291
  "formatStellarFunctionResult",
1292
1292
  `Output definition missing or invalid for function ${functionDetails.name}.`
1293
1293
  );
@@ -1309,7 +1309,7 @@ function formatStellarFunctionResult(result, functionDetails) {
1309
1309
  valueToFormat = new Uint8Array(valueToFormat);
1310
1310
  }
1311
1311
  } catch (error) {
1312
- import_ui_builder_utils8.logger.error("formatStellarFunctionResult", "Failed to convert ScVal to native", {
1312
+ import_ui_utils8.logger.error("formatStellarFunctionResult", "Failed to convert ScVal to native", {
1313
1313
  functionName: functionDetails.name,
1314
1314
  error
1315
1315
  });
@@ -1327,7 +1327,7 @@ function formatStellarFunctionResult(result, functionDetails) {
1327
1327
  } else if (typeof valueToFormat === "boolean") {
1328
1328
  return String(valueToFormat);
1329
1329
  } else if (valueToFormat instanceof Uint8Array) {
1330
- return (0, import_ui_builder_utils8.bytesToHex)(valueToFormat, true);
1330
+ return (0, import_ui_utils8.bytesToHex)(valueToFormat, true);
1331
1331
  } else if (Array.isArray(valueToFormat)) {
1332
1332
  if (valueToFormat.length === 0) {
1333
1333
  return "[]";
@@ -1350,7 +1350,7 @@ function formatStellarFunctionResult(result, functionDetails) {
1350
1350
  }
1351
1351
  } catch (error) {
1352
1352
  const errorMessage = `Error formatting result for ${functionDetails.name}: ${error.message}`;
1353
- import_ui_builder_utils8.logger.error("formatStellarFunctionResult", errorMessage, {
1353
+ import_ui_utils8.logger.error("formatStellarFunctionResult", errorMessage, {
1354
1354
  functionName: functionDetails.name,
1355
1355
  result,
1356
1356
  error
@@ -1382,12 +1382,12 @@ function getStellarWritableFunctions(contractSchema) {
1382
1382
 
1383
1383
  // src/query/handler.ts
1384
1384
  function getSorobanRpcServer(networkConfig) {
1385
- const customRpcConfig = import_ui_builder_utils9.userRpcConfigService.getUserRpcConfig(networkConfig.id);
1385
+ const customRpcConfig = import_ui_utils9.userRpcConfigService.getUserRpcConfig(networkConfig.id);
1386
1386
  const rpcUrl = customRpcConfig?.url || networkConfig.sorobanRpcUrl;
1387
1387
  if (!rpcUrl) {
1388
1388
  throw new Error(`No Soroban RPC URL available for network ${networkConfig.name}`);
1389
1389
  }
1390
- import_ui_builder_utils9.logger.info(
1390
+ import_ui_utils9.logger.info(
1391
1391
  "getSorobanRpcServer",
1392
1392
  `Creating Soroban RPC server for ${networkConfig.name} using RPC: ${rpcUrl}`
1393
1393
  );
@@ -1418,12 +1418,12 @@ async function createSimulationTransaction(contractAddress, functionName, args,
1418
1418
  }).addOperation(contract2.call(functionName, ...scValArgs)).setTimeout(30);
1419
1419
  return transaction;
1420
1420
  } catch (error) {
1421
- import_ui_builder_utils9.logger.error("createSimulationTransaction", "Failed to create simulation transaction:", error);
1421
+ import_ui_utils9.logger.error("createSimulationTransaction", "Failed to create simulation transaction:", error);
1422
1422
  throw new Error(`Failed to create simulation transaction: ${error.message}`);
1423
1423
  }
1424
1424
  }
1425
1425
  async function checkStellarFunctionStateMutability(contractAddress, functionName, networkConfig, inputTypes = []) {
1426
- import_ui_builder_utils9.logger.info(
1426
+ import_ui_utils9.logger.info(
1427
1427
  "checkStellarFunctionStateMutability",
1428
1428
  `Checking state mutability for function: ${functionName} on ${contractAddress}`
1429
1429
  );
@@ -1465,7 +1465,7 @@ async function checkStellarFunctionStateMutability(contractAddress, functionName
1465
1465
  networkConfig
1466
1466
  );
1467
1467
  const transaction = transactionBuilder.build();
1468
- import_ui_builder_utils9.logger.debug(
1468
+ import_ui_utils9.logger.debug(
1469
1469
  "checkStellarFunctionStateMutability",
1470
1470
  `[Check ${functionName}] Simulating transaction for state mutability check`
1471
1471
  );
@@ -1473,7 +1473,7 @@ async function checkStellarFunctionStateMutability(contractAddress, functionName
1473
1473
  try {
1474
1474
  simulationResult = await rpcServer.simulateTransaction(transaction);
1475
1475
  } catch (simulationError) {
1476
- import_ui_builder_utils9.logger.warn(
1476
+ import_ui_utils9.logger.warn(
1477
1477
  "checkStellarFunctionStateMutability",
1478
1478
  `[Check ${functionName}] Simulation failed, assuming function modifies state:`,
1479
1479
  simulationError
@@ -1481,7 +1481,7 @@ async function checkStellarFunctionStateMutability(contractAddress, functionName
1481
1481
  return true;
1482
1482
  }
1483
1483
  if (import_stellar_sdk7.rpc.Api.isSimulationError(simulationResult)) {
1484
- import_ui_builder_utils9.logger.warn(
1484
+ import_ui_utils9.logger.warn(
1485
1485
  "checkStellarFunctionStateMutability",
1486
1486
  `[Check ${functionName}] Simulation error, assuming function modifies state:`,
1487
1487
  simulationResult.error
@@ -1489,7 +1489,7 @@ async function checkStellarFunctionStateMutability(contractAddress, functionName
1489
1489
  return true;
1490
1490
  }
1491
1491
  const hasStateChanges = simulationResult.stateChanges && simulationResult.stateChanges.length > 0;
1492
- import_ui_builder_utils9.logger.info(
1492
+ import_ui_utils9.logger.info(
1493
1493
  "checkStellarFunctionStateMutability",
1494
1494
  `[Check ${functionName}] State mutability check complete:`,
1495
1495
  {
@@ -1500,7 +1500,7 @@ async function checkStellarFunctionStateMutability(contractAddress, functionName
1500
1500
  );
1501
1501
  return Boolean(hasStateChanges);
1502
1502
  } catch (error) {
1503
- import_ui_builder_utils9.logger.warn(
1503
+ import_ui_utils9.logger.warn(
1504
1504
  "checkStellarFunctionStateMutability",
1505
1505
  `Failed to check state mutability for ${functionName}, assuming it modifies state:`,
1506
1506
  error
@@ -1509,7 +1509,7 @@ async function checkStellarFunctionStateMutability(contractAddress, functionName
1509
1509
  }
1510
1510
  }
1511
1511
  async function queryStellarViewFunction(contractAddress, functionId, networkConfig, params = [], contractSchema, loadContractFn) {
1512
- import_ui_builder_utils9.logger.info(
1512
+ import_ui_utils9.logger.info(
1513
1513
  "queryStellarViewFunction",
1514
1514
  `Querying Stellar view function: ${functionId} on ${contractAddress} (${networkConfig.name})`,
1515
1515
  { params }
@@ -1551,7 +1551,7 @@ async function queryStellarViewFunction(contractAddress, functionId, networkConf
1551
1551
  const rawValue = params[index];
1552
1552
  return parseStellarInput(rawValue, inputParam.type);
1553
1553
  });
1554
- import_ui_builder_utils9.logger.debug("queryStellarViewFunction", "Parsed Args for contract call:", args);
1554
+ import_ui_utils9.logger.debug("queryStellarViewFunction", "Parsed Args for contract call:", args);
1555
1555
  const paramTypes = expectedInputs.map((input) => input.type);
1556
1556
  const transactionBuilder = await createSimulationTransaction(
1557
1557
  contractAddress,
@@ -1561,7 +1561,7 @@ async function queryStellarViewFunction(contractAddress, functionId, networkConf
1561
1561
  stellarConfig
1562
1562
  );
1563
1563
  const transaction = transactionBuilder.build();
1564
- import_ui_builder_utils9.logger.debug(
1564
+ import_ui_utils9.logger.debug(
1565
1565
  "queryStellarViewFunction",
1566
1566
  `[Query ${functionDetails.name}] Simulating transaction:`,
1567
1567
  transaction.toXDR()
@@ -1570,7 +1570,7 @@ async function queryStellarViewFunction(contractAddress, functionId, networkConf
1570
1570
  try {
1571
1571
  simulationResult = await rpcServer.simulateTransaction(transaction);
1572
1572
  } catch (simulationError) {
1573
- import_ui_builder_utils9.logger.error(
1573
+ import_ui_utils9.logger.error(
1574
1574
  "queryStellarViewFunction",
1575
1575
  `[Query ${functionDetails.name}] Simulation failed:`,
1576
1576
  simulationError
@@ -1580,7 +1580,7 @@ async function queryStellarViewFunction(contractAddress, functionId, networkConf
1580
1580
  );
1581
1581
  }
1582
1582
  if (import_stellar_sdk7.rpc.Api.isSimulationError(simulationResult)) {
1583
- import_ui_builder_utils9.logger.error(
1583
+ import_ui_utils9.logger.error(
1584
1584
  "queryStellarViewFunction",
1585
1585
  `[Query ${functionDetails.name}] Simulation error:`,
1586
1586
  simulationResult.error
@@ -1591,13 +1591,13 @@ async function queryStellarViewFunction(contractAddress, functionId, networkConf
1591
1591
  throw new Error(`No result returned from contract simulation for ${functionDetails.name}`);
1592
1592
  }
1593
1593
  const rawResult = simulationResult.result.retval;
1594
- import_ui_builder_utils9.logger.debug(
1594
+ import_ui_utils9.logger.debug(
1595
1595
  "queryStellarViewFunction",
1596
1596
  `[Query ${functionDetails.name}] Raw simulation result:`,
1597
1597
  rawResult
1598
1598
  );
1599
1599
  const formattedResult = formatStellarFunctionResult(rawResult, functionDetails);
1600
- import_ui_builder_utils9.logger.info(
1600
+ import_ui_utils9.logger.info(
1601
1601
  "queryStellarViewFunction",
1602
1602
  `[Query ${functionDetails.name}] Formatted result:`,
1603
1603
  formattedResult
@@ -1605,7 +1605,7 @@ async function queryStellarViewFunction(contractAddress, functionId, networkConf
1605
1605
  return formattedResult;
1606
1606
  } catch (error) {
1607
1607
  const errorMessage = `Failed to query Stellar view function ${functionId} on network ${networkConfig.name}: ${error.message}`;
1608
- import_ui_builder_utils9.logger.error("queryStellarViewFunction", errorMessage, {
1608
+ import_ui_utils9.logger.error("queryStellarViewFunction", errorMessage, {
1609
1609
  contractAddress,
1610
1610
  functionId,
1611
1611
  params,
@@ -1640,7 +1640,7 @@ async function queryAccessControlFunction(contractAddress, functionName, params,
1640
1640
  return queryStellarViewFunction(contractAddress, functionName, networkConfig, params, schema);
1641
1641
  }
1642
1642
  async function readOwnership(contractAddress, networkConfig) {
1643
- import_ui_builder_utils10.logger.info("readOwnership", `Reading owner for contract ${contractAddress}`);
1643
+ import_ui_utils10.logger.info("readOwnership", `Reading owner for contract ${contractAddress}`);
1644
1644
  try {
1645
1645
  const result = await queryAccessControlFunction(
1646
1646
  contractAddress,
@@ -1652,11 +1652,11 @@ async function readOwnership(contractAddress, networkConfig) {
1652
1652
  return { owner: null };
1653
1653
  }
1654
1654
  const ownerAddress = typeof result === "string" ? result : String(result);
1655
- import_ui_builder_utils10.logger.debug("readOwnership", `Owner: ${ownerAddress}`);
1655
+ import_ui_utils10.logger.debug("readOwnership", `Owner: ${ownerAddress}`);
1656
1656
  return { owner: ownerAddress };
1657
1657
  } catch (error) {
1658
- import_ui_builder_utils10.logger.error("readOwnership", "Failed to read ownership:", error);
1659
- throw new import_ui_builder_types5.OperationFailed(
1658
+ import_ui_utils10.logger.error("readOwnership", "Failed to read ownership:", error);
1659
+ throw new import_ui_types5.OperationFailed(
1660
1660
  `Failed to read ownership: ${error.message}`,
1661
1661
  contractAddress,
1662
1662
  "readOwnership",
@@ -1665,7 +1665,7 @@ async function readOwnership(contractAddress, networkConfig) {
1665
1665
  }
1666
1666
  }
1667
1667
  async function getRoleMemberCount(contractAddress, roleId, networkConfig) {
1668
- import_ui_builder_utils10.logger.debug("getRoleMemberCount", `Getting member count for role ${roleId}`);
1668
+ import_ui_utils10.logger.debug("getRoleMemberCount", `Getting member count for role ${roleId}`);
1669
1669
  try {
1670
1670
  const inputs = [{ name: "role", type: "Symbol" }];
1671
1671
  const result = await queryAccessControlFunction(
@@ -1684,12 +1684,12 @@ async function getRoleMemberCount(contractAddress, roleId, networkConfig) {
1684
1684
  }
1685
1685
  return 0;
1686
1686
  } catch (error) {
1687
- import_ui_builder_utils10.logger.error("getRoleMemberCount", `Failed to get member count for role ${roleId}:`, error);
1687
+ import_ui_utils10.logger.error("getRoleMemberCount", `Failed to get member count for role ${roleId}:`, error);
1688
1688
  return 0;
1689
1689
  }
1690
1690
  }
1691
1691
  async function getRoleMember(contractAddress, roleId, index, networkConfig) {
1692
- import_ui_builder_utils10.logger.debug("getRoleMember", `Getting member at index ${index} for role ${roleId}`);
1692
+ import_ui_utils10.logger.debug("getRoleMember", `Getting member at index ${index} for role ${roleId}`);
1693
1693
  try {
1694
1694
  const inputs = [
1695
1695
  { name: "role", type: "Symbol" },
@@ -1707,15 +1707,15 @@ async function getRoleMember(contractAddress, roleId, index, networkConfig) {
1707
1707
  }
1708
1708
  return String(result);
1709
1709
  } catch (error) {
1710
- import_ui_builder_utils10.logger.error("getRoleMember", `Failed to get role member at index ${index}:`, error);
1710
+ import_ui_utils10.logger.error("getRoleMember", `Failed to get role member at index ${index}:`, error);
1711
1711
  return null;
1712
1712
  }
1713
1713
  }
1714
1714
  async function enumerateRoleMembers(contractAddress, roleId, networkConfig) {
1715
- import_ui_builder_utils10.logger.info("enumerateRoleMembers", `Enumerating members for role ${roleId}`);
1715
+ import_ui_utils10.logger.info("enumerateRoleMembers", `Enumerating members for role ${roleId}`);
1716
1716
  try {
1717
1717
  const count = await getRoleMemberCount(contractAddress, roleId, networkConfig);
1718
- import_ui_builder_utils10.logger.debug("enumerateRoleMembers", `Role ${roleId} has ${count} members`);
1718
+ import_ui_utils10.logger.debug("enumerateRoleMembers", `Role ${roleId} has ${count} members`);
1719
1719
  if (count === 0) {
1720
1720
  return [];
1721
1721
  }
@@ -1723,13 +1723,13 @@ async function enumerateRoleMembers(contractAddress, roleId, networkConfig) {
1723
1723
  { length: count },
1724
1724
  (_, i) => () => getRoleMember(contractAddress, roleId, i, networkConfig)
1725
1725
  );
1726
- const results = await (0, import_ui_builder_utils10.promiseAllWithLimit)(memberTasks, import_ui_builder_utils10.DEFAULT_CONCURRENCY_LIMIT);
1726
+ const results = await (0, import_ui_utils10.promiseAllWithLimit)(memberTasks, import_ui_utils10.DEFAULT_CONCURRENCY_LIMIT);
1727
1727
  const members = results.filter((m) => m !== null);
1728
- import_ui_builder_utils10.logger.debug("enumerateRoleMembers", `Retrieved ${members.length} members for role ${roleId}`);
1728
+ import_ui_utils10.logger.debug("enumerateRoleMembers", `Retrieved ${members.length} members for role ${roleId}`);
1729
1729
  return members;
1730
1730
  } catch (error) {
1731
- import_ui_builder_utils10.logger.error("enumerateRoleMembers", `Failed to enumerate role ${roleId}:`, error);
1732
- throw new import_ui_builder_types5.OperationFailed(
1731
+ import_ui_utils10.logger.error("enumerateRoleMembers", `Failed to enumerate role ${roleId}:`, error);
1732
+ throw new import_ui_types5.OperationFailed(
1733
1733
  `Failed to enumerate role members: ${error.message}`,
1734
1734
  contractAddress,
1735
1735
  "enumerateRoleMembers",
@@ -1738,7 +1738,7 @@ async function enumerateRoleMembers(contractAddress, roleId, networkConfig) {
1738
1738
  }
1739
1739
  }
1740
1740
  async function readCurrentRoles(contractAddress, roleIds, networkConfig) {
1741
- import_ui_builder_utils10.logger.info(
1741
+ import_ui_utils10.logger.info(
1742
1742
  "readCurrentRoles",
1743
1743
  `Reading ${roleIds.length} roles for contract ${contractAddress}`
1744
1744
  );
@@ -1752,13 +1752,13 @@ async function readCurrentRoles(contractAddress, roleIds, networkConfig) {
1752
1752
  };
1753
1753
  try {
1754
1754
  const members = await enumerateRoleMembers(contractAddress, roleId, networkConfig);
1755
- import_ui_builder_utils10.logger.debug("readCurrentRoles", `Role ${roleId} has ${members.length} members`);
1755
+ import_ui_utils10.logger.debug("readCurrentRoles", `Role ${roleId} has ${members.length} members`);
1756
1756
  return {
1757
1757
  role,
1758
1758
  members
1759
1759
  };
1760
1760
  } catch (error) {
1761
- import_ui_builder_utils10.logger.warn("readCurrentRoles", `Failed to read role ${roleId}:`, error);
1761
+ import_ui_utils10.logger.warn("readCurrentRoles", `Failed to read role ${roleId}:`, error);
1762
1762
  return {
1763
1763
  role,
1764
1764
  members: []
@@ -1766,14 +1766,14 @@ async function readCurrentRoles(contractAddress, roleIds, networkConfig) {
1766
1766
  }
1767
1767
  });
1768
1768
  const assignments = await Promise.all(assignmentPromises);
1769
- import_ui_builder_utils10.logger.info(
1769
+ import_ui_utils10.logger.info(
1770
1770
  "readCurrentRoles",
1771
1771
  `Completed reading ${assignments.length} roles with ${assignments.reduce((sum, a) => sum + a.members.length, 0)} total members`
1772
1772
  );
1773
1773
  return assignments;
1774
1774
  }
1775
1775
  async function getAdmin(contractAddress, networkConfig) {
1776
- import_ui_builder_utils10.logger.info("getAdmin", `Reading admin for contract ${contractAddress}`);
1776
+ import_ui_utils10.logger.info("getAdmin", `Reading admin for contract ${contractAddress}`);
1777
1777
  try {
1778
1778
  const result = await queryAccessControlFunction(
1779
1779
  contractAddress,
@@ -1786,20 +1786,20 @@ async function getAdmin(contractAddress, networkConfig) {
1786
1786
  }
1787
1787
  return String(result);
1788
1788
  } catch (error) {
1789
- import_ui_builder_utils10.logger.error("getAdmin", "Failed to read admin:", error);
1789
+ import_ui_utils10.logger.error("getAdmin", "Failed to read admin:", error);
1790
1790
  return null;
1791
1791
  }
1792
1792
  }
1793
1793
  async function getCurrentLedger(networkConfig) {
1794
- import_ui_builder_utils10.logger.info("getCurrentLedger", `Fetching current ledger from ${networkConfig.sorobanRpcUrl}`);
1794
+ import_ui_utils10.logger.info("getCurrentLedger", `Fetching current ledger from ${networkConfig.sorobanRpcUrl}`);
1795
1795
  try {
1796
1796
  const server = new import_stellar_sdk8.rpc.Server(networkConfig.sorobanRpcUrl);
1797
1797
  const latestLedger = await server.getLatestLedger();
1798
- import_ui_builder_utils10.logger.debug("getCurrentLedger", `Current ledger: ${latestLedger.sequence}`);
1798
+ import_ui_utils10.logger.debug("getCurrentLedger", `Current ledger: ${latestLedger.sequence}`);
1799
1799
  return latestLedger.sequence;
1800
1800
  } catch (error) {
1801
- import_ui_builder_utils10.logger.error("getCurrentLedger", "Failed to fetch current ledger:", error);
1802
- throw new import_ui_builder_types5.OperationFailed(
1801
+ import_ui_utils10.logger.error("getCurrentLedger", "Failed to fetch current ledger:", error);
1802
+ throw new import_ui_types5.OperationFailed(
1803
1803
  `Failed to get current ledger: ${error.message}`,
1804
1804
  networkConfig.sorobanRpcUrl,
1805
1805
  "getCurrentLedger",
@@ -1809,22 +1809,22 @@ async function getCurrentLedger(networkConfig) {
1809
1809
  }
1810
1810
 
1811
1811
  // src/access-control/service.ts
1812
- var import_ui_builder_types9 = require("@openzeppelin/ui-builder-types");
1813
- var import_ui_builder_utils22 = require("@openzeppelin/ui-builder-utils");
1812
+ var import_ui_types9 = require("@openzeppelin/ui-types");
1813
+ var import_ui_utils22 = require("@openzeppelin/ui-utils");
1814
1814
 
1815
1815
  // src/transaction/sender.ts
1816
1816
  var import_stellar_sdk11 = require("@stellar/stellar-sdk");
1817
- var import_ui_builder_utils19 = require("@openzeppelin/ui-builder-utils");
1817
+ var import_ui_utils19 = require("@openzeppelin/ui-utils");
1818
1818
 
1819
1819
  // src/transaction/eoa.ts
1820
1820
  var import_stellar_sdk9 = require("@stellar/stellar-sdk");
1821
- var import_ui_builder_utils17 = require("@openzeppelin/ui-builder-utils");
1821
+ var import_ui_utils17 = require("@openzeppelin/ui-utils");
1822
1822
 
1823
1823
  // src/access-control/actions.ts
1824
- var import_ui_builder_utils11 = require("@openzeppelin/ui-builder-utils");
1824
+ var import_ui_utils11 = require("@openzeppelin/ui-utils");
1825
1825
  var CALLER_PLACEHOLDER = "__CALLER__";
1826
1826
  function assembleGrantRoleAction(contractAddress, roleId, account, caller = CALLER_PLACEHOLDER) {
1827
- import_ui_builder_utils11.logger.info(
1827
+ import_ui_utils11.logger.info(
1828
1828
  "assembleGrantRoleAction",
1829
1829
  `Assembling grant_role action for ${roleId} to ${account} (caller: ${caller})`
1830
1830
  );
@@ -1838,7 +1838,7 @@ function assembleGrantRoleAction(contractAddress, roleId, account, caller = CALL
1838
1838
  };
1839
1839
  }
1840
1840
  function assembleRevokeRoleAction(contractAddress, roleId, account, caller = CALLER_PLACEHOLDER) {
1841
- import_ui_builder_utils11.logger.info(
1841
+ import_ui_utils11.logger.info(
1842
1842
  "assembleRevokeRoleAction",
1843
1843
  `Assembling revoke_role action for ${roleId} from ${account} (caller: ${caller})`
1844
1844
  );
@@ -1852,7 +1852,7 @@ function assembleRevokeRoleAction(contractAddress, roleId, account, caller = CAL
1852
1852
  };
1853
1853
  }
1854
1854
  function assembleTransferOwnershipAction(contractAddress, newOwner, liveUntilLedger) {
1855
- import_ui_builder_utils11.logger.info(
1855
+ import_ui_utils11.logger.info(
1856
1856
  "assembleTransferOwnershipAction",
1857
1857
  `Assembling transfer_ownership action to ${newOwner} with expiration at ledger ${liveUntilLedger}`
1858
1858
  );
@@ -1866,7 +1866,7 @@ function assembleTransferOwnershipAction(contractAddress, newOwner, liveUntilLed
1866
1866
  };
1867
1867
  }
1868
1868
  function assembleAcceptOwnershipAction(contractAddress) {
1869
- import_ui_builder_utils11.logger.info(
1869
+ import_ui_utils11.logger.info(
1870
1870
  "assembleAcceptOwnershipAction",
1871
1871
  `Assembling accept_ownership action for ${contractAddress}`
1872
1872
  );
@@ -1880,7 +1880,7 @@ function assembleAcceptOwnershipAction(contractAddress) {
1880
1880
  };
1881
1881
  }
1882
1882
  function assembleTransferAdminRoleAction(contractAddress, newAdmin, liveUntilLedger) {
1883
- import_ui_builder_utils11.logger.info(
1883
+ import_ui_utils11.logger.info(
1884
1884
  "assembleTransferAdminRoleAction",
1885
1885
  `Assembling transfer_admin_role action to ${newAdmin} with expiration at ledger ${liveUntilLedger}`
1886
1886
  );
@@ -1894,7 +1894,7 @@ function assembleTransferAdminRoleAction(contractAddress, newAdmin, liveUntilLed
1894
1894
  };
1895
1895
  }
1896
1896
  function assembleAcceptAdminTransferAction(contractAddress) {
1897
- import_ui_builder_utils11.logger.info(
1897
+ import_ui_utils11.logger.info(
1898
1898
  "assembleAcceptAdminTransferAction",
1899
1899
  `Assembling accept_admin_transfer action for ${contractAddress}`
1900
1900
  );
@@ -1909,14 +1909,14 @@ function assembleAcceptAdminTransferAction(contractAddress) {
1909
1909
  }
1910
1910
 
1911
1911
  // src/wallet/connection.ts
1912
- var import_ui_builder_utils16 = require("@openzeppelin/ui-builder-utils");
1912
+ var import_ui_utils16 = require("@openzeppelin/ui-utils");
1913
1913
 
1914
1914
  // src/wallet/utils/stellarWalletImplementationManager.ts
1915
- var import_ui_builder_utils13 = require("@openzeppelin/ui-builder-utils");
1915
+ var import_ui_utils13 = require("@openzeppelin/ui-utils");
1916
1916
 
1917
1917
  // src/wallet/implementation/wallets-kit-implementation.ts
1918
1918
  var import_stellar_wallets_kit = require("@creit.tech/stellar-wallets-kit");
1919
- var import_ui_builder_utils12 = require("@openzeppelin/ui-builder-utils");
1919
+ var import_ui_utils12 = require("@openzeppelin/ui-utils");
1920
1920
  var LOG_SYSTEM = "StellarWalletImplementation";
1921
1921
  var WalletsKitImplementation = class {
1922
1922
  /**
@@ -1937,7 +1937,7 @@ var WalletsKitImplementation = class {
1937
1937
  __publicField(this, "currentWalletId", null);
1938
1938
  __publicField(this, "connectionStatusListeners", /* @__PURE__ */ new Set());
1939
1939
  this.networkConfig = networkConfig || null;
1940
- import_ui_builder_utils12.logger.info(
1940
+ import_ui_utils12.logger.info(
1941
1941
  LOG_SYSTEM,
1942
1942
  "Constructor called. Initial anticipated kitName:",
1943
1943
  initialUiKitConfig?.kitName,
@@ -1945,7 +1945,7 @@ var WalletsKitImplementation = class {
1945
1945
  networkConfig?.name
1946
1946
  );
1947
1947
  this.initialized = true;
1948
- import_ui_builder_utils12.logger.info(
1948
+ import_ui_utils12.logger.info(
1949
1949
  LOG_SYSTEM,
1950
1950
  "StellarWalletImplementation instance initialized (StellarWalletsKit config creation deferred)."
1951
1951
  );
@@ -1955,10 +1955,10 @@ var WalletsKitImplementation = class {
1955
1955
  * @param config - The Stellar network configuration
1956
1956
  */
1957
1957
  setNetworkConfig(config) {
1958
- import_ui_builder_utils12.logger.info(LOG_SYSTEM, "Network config updated:", config.name);
1958
+ import_ui_utils12.logger.info(LOG_SYSTEM, "Network config updated:", config.name);
1959
1959
  this.networkConfig = config;
1960
1960
  if (this.activeStellarKit || this.defaultInstanceKit) {
1961
- import_ui_builder_utils12.logger.info(LOG_SYSTEM, "Active kits detected - may need reconfiguration for new network");
1961
+ import_ui_utils12.logger.info(LOG_SYSTEM, "Active kits detected - may need reconfiguration for new network");
1962
1962
  }
1963
1963
  }
1964
1964
  /**
@@ -1968,14 +1968,14 @@ var WalletsKitImplementation = class {
1968
1968
  * @param kit - The StellarWalletsKit object to set as active, or null to clear it.
1969
1969
  */
1970
1970
  setActiveStellarKit(kit) {
1971
- import_ui_builder_utils12.logger.info(
1971
+ import_ui_utils12.logger.info(
1972
1972
  LOG_SYSTEM,
1973
1973
  "setActiveStellarKit called with kit:",
1974
1974
  kit ? "Valid StellarWalletsKit" : "Null"
1975
1975
  );
1976
1976
  this.activeStellarKit = kit;
1977
1977
  if (this.unsubscribeFromStatusChanges) {
1978
- import_ui_builder_utils12.logger.info(LOG_SYSTEM, "Re-establishing connection status monitoring with new kit");
1978
+ import_ui_utils12.logger.info(LOG_SYSTEM, "Re-establishing connection status monitoring with new kit");
1979
1979
  }
1980
1980
  }
1981
1981
  /**
@@ -1984,14 +1984,14 @@ var WalletsKitImplementation = class {
1984
1984
  * @returns A default StellarWalletsKit instance
1985
1985
  */
1986
1986
  createDefaultKit() {
1987
- import_ui_builder_utils12.logger.info(LOG_SYSTEM, "Creating default StellarWalletsKit instance");
1987
+ import_ui_utils12.logger.info(LOG_SYSTEM, "Creating default StellarWalletsKit instance");
1988
1988
  const network = this.getWalletNetwork();
1989
1989
  const kit = new import_stellar_wallets_kit.StellarWalletsKit({
1990
1990
  network,
1991
1991
  selectedWalletId: void 0,
1992
1992
  modules: (0, import_stellar_wallets_kit.allowAllModules)()
1993
1993
  });
1994
- import_ui_builder_utils12.logger.info(LOG_SYSTEM, "Default StellarWalletsKit instance created");
1994
+ import_ui_utils12.logger.info(LOG_SYSTEM, "Default StellarWalletsKit instance created");
1995
1995
  return kit;
1996
1996
  }
1997
1997
  /**
@@ -1999,7 +1999,7 @@ var WalletsKitImplementation = class {
1999
1999
  */
2000
2000
  getWalletNetwork() {
2001
2001
  if (!this.networkConfig) {
2002
- import_ui_builder_utils12.logger.warn(LOG_SYSTEM, "No network config available, defaulting to TESTNET");
2002
+ import_ui_utils12.logger.warn(LOG_SYSTEM, "No network config available, defaulting to TESTNET");
2003
2003
  return import_stellar_wallets_kit.WalletNetwork.TESTNET;
2004
2004
  }
2005
2005
  return this.networkConfig.type === "mainnet" ? import_stellar_wallets_kit.WalletNetwork.PUBLIC : import_stellar_wallets_kit.WalletNetwork.TESTNET;
@@ -2017,7 +2017,7 @@ var WalletsKitImplementation = class {
2017
2017
  */
2018
2018
  async getAvailableConnectors() {
2019
2019
  if (!this.initialized) {
2020
- import_ui_builder_utils12.logger.warn(LOG_SYSTEM, "getAvailableConnectors called before initialization");
2020
+ import_ui_utils12.logger.warn(LOG_SYSTEM, "getAvailableConnectors called before initialization");
2021
2021
  return [];
2022
2022
  }
2023
2023
  try {
@@ -2030,10 +2030,10 @@ var WalletsKitImplementation = class {
2030
2030
  installed: wallet.isAvailable,
2031
2031
  type: wallet.type || "browser"
2032
2032
  }));
2033
- import_ui_builder_utils12.logger.info(LOG_SYSTEM, `Found ${connectors.length} available wallet connectors`);
2033
+ import_ui_utils12.logger.info(LOG_SYSTEM, `Found ${connectors.length} available wallet connectors`);
2034
2034
  return connectors;
2035
2035
  } catch (error) {
2036
- import_ui_builder_utils12.logger.error(LOG_SYSTEM, "Failed to get available connectors:", error);
2036
+ import_ui_utils12.logger.error(LOG_SYSTEM, "Failed to get available connectors:", error);
2037
2037
  return [];
2038
2038
  }
2039
2039
  }
@@ -2049,7 +2049,7 @@ var WalletsKitImplementation = class {
2049
2049
  try {
2050
2050
  const prevStatus = this.getWalletConnectionStatus();
2051
2051
  const kit = this.getKitToUse();
2052
- import_ui_builder_utils12.logger.info(LOG_SYSTEM, `Attempting to connect to wallet: ${connectorId}`);
2052
+ import_ui_utils12.logger.info(LOG_SYSTEM, `Attempting to connect to wallet: ${connectorId}`);
2053
2053
  kit.setWallet(connectorId);
2054
2054
  const result = await kit.getAddress();
2055
2055
  if (result.address) {
@@ -2057,7 +2057,7 @@ var WalletsKitImplementation = class {
2057
2057
  this.currentWalletId = connectorId;
2058
2058
  const newStatus = this.getWalletConnectionStatus();
2059
2059
  this.notifyConnectionListeners(newStatus, prevStatus);
2060
- import_ui_builder_utils12.logger.info(
2060
+ import_ui_utils12.logger.info(
2061
2061
  LOG_SYSTEM,
2062
2062
  `Successfully connected to wallet: ${connectorId}, address: ${result.address}`
2063
2063
  );
@@ -2073,7 +2073,7 @@ var WalletsKitImplementation = class {
2073
2073
  };
2074
2074
  }
2075
2075
  } catch (error) {
2076
- import_ui_builder_utils12.logger.error(LOG_SYSTEM, `Failed to connect to wallet ${connectorId}:`, error);
2076
+ import_ui_utils12.logger.error(LOG_SYSTEM, `Failed to connect to wallet ${connectorId}:`, error);
2077
2077
  return {
2078
2078
  connected: false,
2079
2079
  error: error instanceof Error ? error.message : "Unknown error occurred"
@@ -2090,15 +2090,15 @@ var WalletsKitImplementation = class {
2090
2090
  }
2091
2091
  try {
2092
2092
  const prevStatus = this.getWalletConnectionStatus();
2093
- import_ui_builder_utils12.logger.info(LOG_SYSTEM, "Disconnecting wallet");
2093
+ import_ui_utils12.logger.info(LOG_SYSTEM, "Disconnecting wallet");
2094
2094
  this.currentAddress = null;
2095
2095
  this.currentWalletId = null;
2096
2096
  const newStatus = this.getWalletConnectionStatus();
2097
2097
  this.notifyConnectionListeners(newStatus, prevStatus);
2098
- import_ui_builder_utils12.logger.info(LOG_SYSTEM, "Successfully disconnected wallet");
2098
+ import_ui_utils12.logger.info(LOG_SYSTEM, "Successfully disconnected wallet");
2099
2099
  return { disconnected: true };
2100
2100
  } catch (error) {
2101
- import_ui_builder_utils12.logger.error(LOG_SYSTEM, "Failed to disconnect wallet:", error);
2101
+ import_ui_utils12.logger.error(LOG_SYSTEM, "Failed to disconnect wallet:", error);
2102
2102
  return {
2103
2103
  disconnected: false,
2104
2104
  error: error instanceof Error ? error.message : "Unknown error occurred"
@@ -2131,15 +2131,15 @@ var WalletsKitImplementation = class {
2131
2131
  */
2132
2132
  onWalletConnectionChange(callback) {
2133
2133
  if (!this.initialized) {
2134
- import_ui_builder_utils12.logger.warn(LOG_SYSTEM, "onWalletConnectionChange called before initialization. No-op.");
2134
+ import_ui_utils12.logger.warn(LOG_SYSTEM, "onWalletConnectionChange called before initialization. No-op.");
2135
2135
  return () => {
2136
2136
  };
2137
2137
  }
2138
2138
  this.connectionStatusListeners.add(callback);
2139
- import_ui_builder_utils12.logger.info(LOG_SYSTEM, "Connection status listener added");
2139
+ import_ui_utils12.logger.info(LOG_SYSTEM, "Connection status listener added");
2140
2140
  return () => {
2141
2141
  this.connectionStatusListeners.delete(callback);
2142
- import_ui_builder_utils12.logger.debug(LOG_SYSTEM, "Connection status listener removed");
2142
+ import_ui_utils12.logger.debug(LOG_SYSTEM, "Connection status listener removed");
2143
2143
  };
2144
2144
  }
2145
2145
  /**
@@ -2174,7 +2174,7 @@ var WalletsKitImplementation = class {
2174
2174
  }
2175
2175
  const kit = this.getKitToUse();
2176
2176
  const networkPassphrase = this.getWalletNetwork();
2177
- import_ui_builder_utils12.logger.info(LOG_SYSTEM, "Signing transaction with wallet");
2177
+ import_ui_utils12.logger.info(LOG_SYSTEM, "Signing transaction with wallet");
2178
2178
  return await kit.signTransaction(xdr13, {
2179
2179
  address,
2180
2180
  networkPassphrase
@@ -2188,7 +2188,7 @@ var WalletsKitImplementation = class {
2188
2188
  try {
2189
2189
  listener(currentStatus, previousStatus);
2190
2190
  } catch (error) {
2191
- import_ui_builder_utils12.logger.error(LOG_SYSTEM, "Error in connection status listener:", String(error));
2191
+ import_ui_utils12.logger.error(LOG_SYSTEM, "Error in connection status listener:", String(error));
2192
2192
  }
2193
2193
  });
2194
2194
  }
@@ -2201,7 +2201,7 @@ var WalletsKitImplementation = class {
2201
2201
  this.unsubscribeFromStatusChanges = void 0;
2202
2202
  }
2203
2203
  this.connectionStatusListeners.clear();
2204
- import_ui_builder_utils12.logger.info(LOG_SYSTEM, "Cleanup completed");
2204
+ import_ui_utils12.logger.info(LOG_SYSTEM, "Cleanup completed");
2205
2205
  }
2206
2206
  };
2207
2207
 
@@ -2225,17 +2225,17 @@ async function getStellarWalletImplementation(networkConfig) {
2225
2225
  }
2226
2226
  walletImplementationPromise = (async () => {
2227
2227
  try {
2228
- import_ui_builder_utils13.logger.info(LOG_SYSTEM2, "Initializing StellarWalletImplementation singleton (async)...");
2229
- const initialUiKitConfig = import_ui_builder_utils13.appConfigService.getTypedNestedConfig(
2228
+ import_ui_utils13.logger.info(LOG_SYSTEM2, "Initializing StellarWalletImplementation singleton (async)...");
2229
+ const initialUiKitConfig = import_ui_utils13.appConfigService.getTypedNestedConfig(
2230
2230
  "walletui",
2231
2231
  "config"
2232
2232
  );
2233
2233
  const instance = new WalletsKitImplementation(networkConfig, initialUiKitConfig);
2234
- import_ui_builder_utils13.logger.info(LOG_SYSTEM2, "WalletsKitImplementation singleton created (async).");
2234
+ import_ui_utils13.logger.info(LOG_SYSTEM2, "WalletsKitImplementation singleton created (async).");
2235
2235
  walletImplementationInstance = instance;
2236
2236
  return instance;
2237
2237
  } catch (error) {
2238
- import_ui_builder_utils13.logger.error(LOG_SYSTEM2, "Failed to initialize WalletsKitImplementation (async):", error);
2238
+ import_ui_utils13.logger.error(LOG_SYSTEM2, "Failed to initialize WalletsKitImplementation (async):", error);
2239
2239
  const fallbackInstance = new WalletsKitImplementation(networkConfig);
2240
2240
  walletImplementationInstance = fallbackInstance;
2241
2241
  return fallbackInstance;
@@ -2245,7 +2245,7 @@ async function getStellarWalletImplementation(networkConfig) {
2245
2245
  }
2246
2246
  function getInitializedStellarWalletImplementation() {
2247
2247
  if (!walletImplementationInstance) {
2248
- import_ui_builder_utils13.logger.warn(
2248
+ import_ui_utils13.logger.warn(
2249
2249
  LOG_SYSTEM2,
2250
2250
  "getInitializedStellarWalletImplementation called before instance was ready."
2251
2251
  );
@@ -2255,7 +2255,7 @@ function getInitializedStellarWalletImplementation() {
2255
2255
 
2256
2256
  // src/wallet/stellar-wallets-kit/stellarUiKitManager.ts
2257
2257
  var import_stellar_wallets_kit2 = require("@creit.tech/stellar-wallets-kit");
2258
- var import_ui_builder_utils14 = require("@openzeppelin/ui-builder-utils");
2258
+ var import_ui_utils14 = require("@openzeppelin/ui-utils");
2259
2259
  var getInitialState = () => ({
2260
2260
  isConfigured: false,
2261
2261
  isInitializing: false,
@@ -2292,13 +2292,13 @@ function setNetworkConfig(config) {
2292
2292
  }
2293
2293
  function getWalletNetwork(networkConfig) {
2294
2294
  if (!networkConfig) {
2295
- import_ui_builder_utils14.logger.warn("StellarUiKitManager", "No network config available, defaulting to TESTNET");
2295
+ import_ui_utils14.logger.warn("StellarUiKitManager", "No network config available, defaulting to TESTNET");
2296
2296
  return import_stellar_wallets_kit2.WalletNetwork.TESTNET;
2297
2297
  }
2298
2298
  return networkConfig.type === "mainnet" ? import_stellar_wallets_kit2.WalletNetwork.PUBLIC : import_stellar_wallets_kit2.WalletNetwork.TESTNET;
2299
2299
  }
2300
2300
  async function configure(newFullUiKitConfig) {
2301
- import_ui_builder_utils14.logger.info(
2301
+ import_ui_utils14.logger.info(
2302
2302
  "StellarUiKitManager:configure",
2303
2303
  "Configuring UI kit. New config:",
2304
2304
  newFullUiKitConfig
@@ -2332,19 +2332,19 @@ async function configure(newFullUiKitConfig) {
2332
2332
  try {
2333
2333
  const impl = await getStellarWalletImplementation(state.networkConfig);
2334
2334
  impl.setActiveStellarKit(kit);
2335
- import_ui_builder_utils14.logger.debug(
2335
+ import_ui_utils14.logger.debug(
2336
2336
  "StellarUiKitManager:configure",
2337
2337
  "Active kit wired into wallet implementation for stellar-wallets-kit"
2338
2338
  );
2339
2339
  } catch (error) {
2340
- import_ui_builder_utils14.logger.warn(
2340
+ import_ui_utils14.logger.warn(
2341
2341
  "StellarUiKitManager:configure",
2342
2342
  "Failed to attach active kit to wallet implementation:",
2343
2343
  error
2344
2344
  );
2345
2345
  }
2346
2346
  }
2347
- import_ui_builder_utils14.logger.info(
2347
+ import_ui_utils14.logger.info(
2348
2348
  "StellarUiKitManager:configure",
2349
2349
  "Stellar Wallets Kit configured with built-in UI and all wallet modules"
2350
2350
  );
@@ -2362,19 +2362,19 @@ async function configure(newFullUiKitConfig) {
2362
2362
  try {
2363
2363
  const impl = await getStellarWalletImplementation(state.networkConfig);
2364
2364
  impl.setActiveStellarKit(kit);
2365
- import_ui_builder_utils14.logger.debug(
2365
+ import_ui_utils14.logger.debug(
2366
2366
  "StellarUiKitManager:configure",
2367
2367
  "Active kit wired into wallet implementation for custom"
2368
2368
  );
2369
2369
  } catch (error) {
2370
- import_ui_builder_utils14.logger.warn(
2370
+ import_ui_utils14.logger.warn(
2371
2371
  "StellarUiKitManager:configure",
2372
2372
  "Failed to attach active kit to wallet implementation:",
2373
2373
  error
2374
2374
  );
2375
2375
  }
2376
2376
  }
2377
- import_ui_builder_utils14.logger.info(
2377
+ import_ui_utils14.logger.info(
2378
2378
  "StellarUiKitManager:configure",
2379
2379
  "Stellar Wallets Kit configured for custom UI components"
2380
2380
  );
@@ -2387,19 +2387,19 @@ async function configure(newFullUiKitConfig) {
2387
2387
  try {
2388
2388
  const impl = await getStellarWalletImplementation(state.networkConfig);
2389
2389
  impl.setActiveStellarKit(null);
2390
- import_ui_builder_utils14.logger.debug(
2390
+ import_ui_utils14.logger.debug(
2391
2391
  "StellarUiKitManager:configure",
2392
2392
  "Active kit cleared from wallet implementation for none"
2393
2393
  );
2394
2394
  } catch (error) {
2395
- import_ui_builder_utils14.logger.warn(
2395
+ import_ui_utils14.logger.warn(
2396
2396
  "StellarUiKitManager:configure",
2397
2397
  "Failed to clear active kit from wallet implementation:",
2398
2398
  error
2399
2399
  );
2400
2400
  }
2401
2401
  }
2402
- import_ui_builder_utils14.logger.info("StellarUiKitManager:configure", 'UI kit set to "none", no wallet UI provided');
2402
+ import_ui_utils14.logger.info("StellarUiKitManager:configure", 'UI kit set to "none", no wallet UI provided');
2403
2403
  } else {
2404
2404
  throw new Error(`Unknown UI kit name: ${newKitName}`);
2405
2405
  }
@@ -2412,7 +2412,7 @@ async function configure(newFullUiKitConfig) {
2412
2412
  };
2413
2413
  notifyListeners();
2414
2414
  } catch (error) {
2415
- import_ui_builder_utils14.logger.error("StellarUiKitManager:configure", "Failed to configure UI kit:", error);
2415
+ import_ui_utils14.logger.error("StellarUiKitManager:configure", "Failed to configure UI kit:", error);
2416
2416
  state = {
2417
2417
  ...state,
2418
2418
  isInitializing: false,
@@ -2503,7 +2503,7 @@ function generateStellarWalletsKitExportables(uiKitConfig) {
2503
2503
 
2504
2504
  // src/wallet/stellar-wallets-kit/StellarWalletsKitConnectButton.tsx
2505
2505
  var import_react = require("react");
2506
- var import_ui_builder_utils15 = require("@openzeppelin/ui-builder-utils");
2506
+ var import_ui_utils15 = require("@openzeppelin/ui-utils");
2507
2507
  var import_jsx_runtime = require("react/jsx-runtime");
2508
2508
  function StellarWalletsKitConnectButton() {
2509
2509
  const containerRef = (0, import_react.useRef)(null);
@@ -2511,7 +2511,7 @@ function StellarWalletsKitConnectButton() {
2511
2511
  const state2 = stellarUiKitManager.getState();
2512
2512
  const kit = state2.stellarKitProvider;
2513
2513
  if (!kit || !containerRef.current) {
2514
- import_ui_builder_utils15.logger.error(
2514
+ import_ui_utils15.logger.error(
2515
2515
  "StellarWalletsKitConnectButton",
2516
2516
  "Kit not initialized or container not available"
2517
2517
  );
@@ -2520,11 +2520,11 @@ function StellarWalletsKitConnectButton() {
2520
2520
  kit.createButton({
2521
2521
  container: containerRef.current,
2522
2522
  onConnect: ({ address }) => {
2523
- import_ui_builder_utils15.logger.info("StellarWalletsKitConnectButton", `Connected to address: ${address}`);
2523
+ import_ui_utils15.logger.info("StellarWalletsKitConnectButton", `Connected to address: ${address}`);
2524
2524
  try {
2525
2525
  setStellarConnectedAddress(address ?? null);
2526
2526
  } catch (error) {
2527
- import_ui_builder_utils15.logger.warn(
2527
+ import_ui_utils15.logger.warn(
2528
2528
  "StellarWalletsKitConnectButton",
2529
2529
  "Failed to set connected address in adapter implementation:",
2530
2530
  error
@@ -2532,11 +2532,11 @@ function StellarWalletsKitConnectButton() {
2532
2532
  }
2533
2533
  },
2534
2534
  onDisconnect: () => {
2535
- import_ui_builder_utils15.logger.info("StellarWalletsKitConnectButton", "Disconnected");
2535
+ import_ui_utils15.logger.info("StellarWalletsKitConnectButton", "Disconnected");
2536
2536
  try {
2537
2537
  setStellarConnectedAddress(null);
2538
2538
  } catch (error) {
2539
- import_ui_builder_utils15.logger.warn(
2539
+ import_ui_utils15.logger.warn(
2540
2540
  "StellarWalletsKitConnectButton",
2541
2541
  "Failed to clear connected address in adapter implementation:",
2542
2542
  error
@@ -2550,10 +2550,10 @@ function StellarWalletsKitConnectButton() {
2550
2550
  try {
2551
2551
  kit.removeButton();
2552
2552
  } catch (error) {
2553
- import_ui_builder_utils15.logger.warn("StellarWalletsKitConnectButton", "Error removing button:", error);
2553
+ import_ui_utils15.logger.warn("StellarWalletsKitConnectButton", "Error removing button:", error);
2554
2554
  }
2555
2555
  } else {
2556
- import_ui_builder_utils15.logger.warn(
2556
+ import_ui_utils15.logger.warn(
2557
2557
  "StellarWalletsKitConnectButton",
2558
2558
  "removeButton method not available on kit instance"
2559
2559
  );
@@ -2582,7 +2582,7 @@ async function disconnectStellarWallet() {
2582
2582
  function getStellarWalletConnectionStatus() {
2583
2583
  const impl = getInitializedStellarWalletImplementation();
2584
2584
  if (!impl) {
2585
- import_ui_builder_utils16.logger.warn(
2585
+ import_ui_utils16.logger.warn(
2586
2586
  "getStellarWalletConnectionStatus",
2587
2587
  "Wallet implementation not ready. Returning default disconnected state."
2588
2588
  );
@@ -2606,7 +2606,7 @@ function setStellarConnectedAddress(address, walletId) {
2606
2606
  if (impl) {
2607
2607
  impl.updateConnectionStatus(address, walletId);
2608
2608
  } else {
2609
- import_ui_builder_utils16.logger.warn(
2609
+ import_ui_utils16.logger.warn(
2610
2610
  "setStellarConnectedAddress",
2611
2611
  "Wallet implementation not ready. Cannot update connection status."
2612
2612
  );
@@ -2615,7 +2615,7 @@ function setStellarConnectedAddress(address, walletId) {
2615
2615
  function onStellarWalletConnectionChange(callback) {
2616
2616
  const impl = getInitializedStellarWalletImplementation();
2617
2617
  if (!impl) {
2618
- import_ui_builder_utils16.logger.warn(
2618
+ import_ui_utils16.logger.warn(
2619
2619
  "onStellarWalletConnectionChange",
2620
2620
  "Wallet implementation not ready. Returning no-op."
2621
2621
  );
@@ -2638,7 +2638,7 @@ function onStellarWalletConnectionChange(callback) {
2638
2638
  try {
2639
2639
  callback(currentStatus, previousStatus);
2640
2640
  } catch (error) {
2641
- import_ui_builder_utils16.logger.error("Error in Stellar connection status listener:", String(error));
2641
+ import_ui_utils16.logger.error("Error in Stellar connection status listener:", String(error));
2642
2642
  }
2643
2643
  });
2644
2644
  }
@@ -2650,7 +2650,7 @@ async function signTransaction(xdr13, address) {
2650
2650
  // src/transaction/eoa.ts
2651
2651
  var SYSTEM_LOG_TAG6 = "EoaExecutionStrategy";
2652
2652
  function getSorobanRpcServer2(networkConfig) {
2653
- const customRpcConfig = import_ui_builder_utils17.userRpcConfigService.getUserRpcConfig(networkConfig.id);
2653
+ const customRpcConfig = import_ui_utils17.userRpcConfigService.getUserRpcConfig(networkConfig.id);
2654
2654
  const rpcUrl = customRpcConfig?.url || networkConfig.sorobanRpcUrl;
2655
2655
  if (!rpcUrl) {
2656
2656
  throw new Error(`No Soroban RPC URL available for network ${networkConfig.name}`);
@@ -2662,7 +2662,7 @@ function getSorobanRpcServer2(networkConfig) {
2662
2662
  }
2663
2663
  var EoaExecutionStrategy = class {
2664
2664
  async execute(transactionData, executionConfig, networkConfig, onStatusChange, _runtimeApiKey) {
2665
- import_ui_builder_utils17.logger.info(SYSTEM_LOG_TAG6, "Using Stellar EOA execution strategy");
2665
+ import_ui_utils17.logger.info(SYSTEM_LOG_TAG6, "Using Stellar EOA execution strategy");
2666
2666
  if (executionConfig.method !== "eoa") {
2667
2667
  throw new Error(`Expected EOA execution config, got: ${executionConfig.method}`);
2668
2668
  }
@@ -2672,7 +2672,7 @@ var EoaExecutionStrategy = class {
2672
2672
  try {
2673
2673
  const rpcServer = getSorobanRpcServer2(stellarConfig);
2674
2674
  const connectedAddress = this.getConnectedWalletAddress();
2675
- import_ui_builder_utils17.logger.info(SYSTEM_LOG_TAG6, `Connected address: ${connectedAddress}`);
2675
+ import_ui_utils17.logger.info(SYSTEM_LOG_TAG6, `Connected address: ${connectedAddress}`);
2676
2676
  let sourceAccount;
2677
2677
  try {
2678
2678
  const accountResponse = await rpcServer.getAccount(connectedAddress);
@@ -2734,7 +2734,7 @@ var EoaExecutionStrategy = class {
2734
2734
  throw new Error(`Transaction failed to submit: ${sendResult.status}`);
2735
2735
  }
2736
2736
  const txHash = sendResult.hash;
2737
- import_ui_builder_utils17.logger.info(SYSTEM_LOG_TAG6, `Transaction submitted successfully: ${txHash}`);
2737
+ import_ui_utils17.logger.info(SYSTEM_LOG_TAG6, `Transaction submitted successfully: ${txHash}`);
2738
2738
  try {
2739
2739
  let txResponse;
2740
2740
  const MAX_ATTEMPTS = 10;
@@ -2753,10 +2753,10 @@ var EoaExecutionStrategy = class {
2753
2753
  }
2754
2754
  }
2755
2755
  if (attempts >= MAX_ATTEMPTS || txResponse?.status !== "SUCCESS") {
2756
- import_ui_builder_utils17.logger.warn(SYSTEM_LOG_TAG6, `Transaction confirmation timeout for ${txHash}`);
2756
+ import_ui_utils17.logger.warn(SYSTEM_LOG_TAG6, `Transaction confirmation timeout for ${txHash}`);
2757
2757
  }
2758
2758
  } catch (confirmError) {
2759
- import_ui_builder_utils17.logger.error(SYSTEM_LOG_TAG6, "Error waiting for confirmation:", confirmError);
2759
+ import_ui_utils17.logger.error(SYSTEM_LOG_TAG6, "Error waiting for confirmation:", confirmError);
2760
2760
  }
2761
2761
  onStatusChange("success", {
2762
2762
  txHash
@@ -2764,7 +2764,7 @@ var EoaExecutionStrategy = class {
2764
2764
  return { txHash };
2765
2765
  } catch (error) {
2766
2766
  const errorMessage = `Failed to execute Stellar EOA transaction: ${error.message}`;
2767
- import_ui_builder_utils17.logger.error(SYSTEM_LOG_TAG6, errorMessage, error);
2767
+ import_ui_utils17.logger.error(SYSTEM_LOG_TAG6, errorMessage, error);
2768
2768
  onStatusChange("error", {});
2769
2769
  throw new Error(errorMessage);
2770
2770
  }
@@ -2781,7 +2781,7 @@ var EoaExecutionStrategy = class {
2781
2781
  // src/transaction/relayer.ts
2782
2782
  var import_stellar_sdk10 = require("@stellar/stellar-sdk");
2783
2783
  var import_relayer_sdk = require("@openzeppelin/relayer-sdk");
2784
- var import_ui_builder_utils18 = require("@openzeppelin/ui-builder-utils");
2784
+ var import_ui_utils18 = require("@openzeppelin/ui-utils");
2785
2785
  var RelayerExecutionStrategy = class {
2786
2786
  async execute(transactionData, executionConfig, networkConfig, onStatusChange, runtimeApiKey) {
2787
2787
  const relayerConfig = executionConfig;
@@ -2817,7 +2817,7 @@ var RelayerExecutionStrategy = class {
2817
2817
  * @throws If the API call fails or returns an unsuccessful response.
2818
2818
  */
2819
2819
  async getStellarRelayers(serviceUrl, accessToken, networkConfig) {
2820
- import_ui_builder_utils18.logger.info(
2820
+ import_ui_utils18.logger.info(
2821
2821
  "[StellarRelayer] Getting relayers with access token",
2822
2822
  accessToken.slice(0, 5).padEnd(accessToken.length, "*")
2823
2823
  );
@@ -2865,7 +2865,7 @@ var RelayerExecutionStrategy = class {
2865
2865
  * @throws If any API call fails or returns an unsuccessful response.
2866
2866
  */
2867
2867
  async getStellarRelayer(serviceUrl, accessToken, relayerId, _networkConfig) {
2868
- import_ui_builder_utils18.logger.info("[StellarRelayer] Getting detailed relayer info", relayerId);
2868
+ import_ui_utils18.logger.info("[StellarRelayer] Getting detailed relayer info", relayerId);
2869
2869
  const sdkConfig = new import_relayer_sdk.Configuration({
2870
2870
  basePath: serviceUrl,
2871
2871
  accessToken
@@ -2875,11 +2875,11 @@ var RelayerExecutionStrategy = class {
2875
2875
  const [relayerResponse, balanceResponse, statusResponse] = await Promise.all([
2876
2876
  relayersApi.getRelayer(relayerId),
2877
2877
  relayersApi.getRelayerBalance(relayerId).catch((err) => {
2878
- import_ui_builder_utils18.logger.warn("[StellarRelayer] Failed to fetch balance", err);
2878
+ import_ui_utils18.logger.warn("[StellarRelayer] Failed to fetch balance", err);
2879
2879
  return null;
2880
2880
  }),
2881
2881
  relayersApi.getRelayerStatus(relayerId).catch((err) => {
2882
- import_ui_builder_utils18.logger.warn("[StellarRelayer] Failed to fetch status", err);
2882
+ import_ui_utils18.logger.warn("[StellarRelayer] Failed to fetch status", err);
2883
2883
  return null;
2884
2884
  })
2885
2885
  ]);
@@ -2901,7 +2901,7 @@ var RelayerExecutionStrategy = class {
2901
2901
  const balanceInXlm = balanceInStroops / 1e7;
2902
2902
  enhancedDetails.balance = `${balanceInXlm.toFixed(7)} XLM`;
2903
2903
  } catch (error) {
2904
- import_ui_builder_utils18.logger.warn("[StellarRelayer] Failed to format balance, using raw value", String(error));
2904
+ import_ui_utils18.logger.warn("[StellarRelayer] Failed to format balance, using raw value", String(error));
2905
2905
  enhancedDetails.balance = String(balanceResponse.data.data.balance);
2906
2906
  }
2907
2907
  }
@@ -2920,13 +2920,13 @@ var RelayerExecutionStrategy = class {
2920
2920
  }
2921
2921
  }
2922
2922
  }
2923
- import_ui_builder_utils18.logger.info(
2923
+ import_ui_utils18.logger.info(
2924
2924
  "[StellarRelayer] Retrieved enhanced relayer details",
2925
2925
  JSON.stringify(enhancedDetails)
2926
2926
  );
2927
2927
  return enhancedDetails;
2928
2928
  } catch (error) {
2929
- import_ui_builder_utils18.logger.error(
2929
+ import_ui_utils18.logger.error(
2930
2930
  "[StellarRelayer] Failed to get relayer details",
2931
2931
  error instanceof Error ? error.message : String(error)
2932
2932
  );
@@ -3187,7 +3187,7 @@ var RelayerExecutionStrategy = class {
3187
3187
  // src/transaction/sender.ts
3188
3188
  var SYSTEM_LOG_TAG7 = "adapter-stellar";
3189
3189
  async function signAndBroadcastStellarTransaction(transactionData, executionConfig, networkConfig, onStatusChange, runtimeApiKey) {
3190
- import_ui_builder_utils19.logger.info(
3190
+ import_ui_utils19.logger.info(
3191
3191
  SYSTEM_LOG_TAG7,
3192
3192
  "Stellar signAndBroadcast called with executionConfig:",
3193
3193
  executionConfig
@@ -3208,7 +3208,7 @@ async function signAndBroadcastStellarTransaction(transactionData, executionConf
3208
3208
  throw new Error("Multisig execution method not yet implemented for Stellar.");
3209
3209
  default: {
3210
3210
  const exhaustiveCheck = executionConfig;
3211
- import_ui_builder_utils19.logger.error(SYSTEM_LOG_TAG7, `Unsupported execution method encountered: ${exhaustiveCheck}`);
3211
+ import_ui_utils19.logger.error(SYSTEM_LOG_TAG7, `Unsupported execution method encountered: ${exhaustiveCheck}`);
3212
3212
  throw new Error(`Unsupported execution method: ${exhaustiveCheck}`);
3213
3213
  }
3214
3214
  }
@@ -3223,7 +3223,7 @@ async function signAndBroadcastStellarTransaction(transactionData, executionConf
3223
3223
  }
3224
3224
 
3225
3225
  // src/access-control/feature-detection.ts
3226
- var import_ui_builder_types6 = require("@openzeppelin/ui-builder-types");
3226
+ var import_ui_types6 = require("@openzeppelin/ui-types");
3227
3227
  var OWNABLE_FUNCTIONS = {
3228
3228
  required: ["get_owner"],
3229
3229
  optional: ["transfer_ownership", "accept_ownership", "renounce_ownership"]
@@ -3333,21 +3333,21 @@ function verifyOZInterface(functionNames, hasOwnable, hasAccessControl, hasTwoSt
3333
3333
  }
3334
3334
 
3335
3335
  // src/access-control/indexer-client.ts
3336
- var import_ui_builder_types7 = require("@openzeppelin/ui-builder-types");
3337
- var import_ui_builder_utils20 = require("@openzeppelin/ui-builder-utils");
3336
+ var import_ui_types7 = require("@openzeppelin/ui-types");
3337
+ var import_ui_utils20 = require("@openzeppelin/ui-utils");
3338
3338
  var LOG_SYSTEM3 = "StellarIndexerClient";
3339
3339
  function getUserIndexerEndpoints(networkId) {
3340
- const svcCfg = import_ui_builder_utils20.userNetworkServiceConfigService.get(networkId, "indexer");
3340
+ const svcCfg = import_ui_utils20.userNetworkServiceConfigService.get(networkId, "indexer");
3341
3341
  if (!svcCfg || typeof svcCfg !== "object") {
3342
3342
  return void 0;
3343
3343
  }
3344
3344
  const endpoints = {};
3345
3345
  if ("indexerUri" in svcCfg && svcCfg.indexerUri) {
3346
3346
  const httpUrl = String(svcCfg.indexerUri).trim();
3347
- if (httpUrl && (0, import_ui_builder_utils20.isValidUrl)(httpUrl)) {
3347
+ if (httpUrl && (0, import_ui_utils20.isValidUrl)(httpUrl)) {
3348
3348
  endpoints.http = httpUrl;
3349
3349
  } else if (httpUrl) {
3350
- import_ui_builder_utils20.logger.warn(
3350
+ import_ui_utils20.logger.warn(
3351
3351
  LOG_SYSTEM3,
3352
3352
  `User-configured indexer HTTP URL for ${networkId} is invalid: ${httpUrl}. Ignoring.`
3353
3353
  );
@@ -3355,10 +3355,10 @@ function getUserIndexerEndpoints(networkId) {
3355
3355
  }
3356
3356
  if ("indexerWsUri" in svcCfg && svcCfg.indexerWsUri) {
3357
3357
  const wsUrl = String(svcCfg.indexerWsUri).trim();
3358
- if (wsUrl && (0, import_ui_builder_utils20.isValidUrl)(wsUrl)) {
3358
+ if (wsUrl && (0, import_ui_utils20.isValidUrl)(wsUrl)) {
3359
3359
  endpoints.ws = wsUrl;
3360
3360
  } else if (wsUrl) {
3361
- import_ui_builder_utils20.logger.warn(
3361
+ import_ui_utils20.logger.warn(
3362
3362
  LOG_SYSTEM3,
3363
3363
  `User-configured indexer WebSocket URL for ${networkId} is invalid: ${wsUrl}. Ignoring.`
3364
3364
  );
@@ -3377,11 +3377,11 @@ var StellarIndexerClient = class {
3377
3377
  __publicField(this, "isAvailable", false);
3378
3378
  __publicField(this, "unsubscribeFromConfigChanges");
3379
3379
  this.networkConfig = networkConfig;
3380
- this.unsubscribeFromConfigChanges = import_ui_builder_utils20.userNetworkServiceConfigService.subscribe(
3380
+ this.unsubscribeFromConfigChanges = import_ui_utils20.userNetworkServiceConfigService.subscribe(
3381
3381
  networkConfig.id,
3382
3382
  "indexer",
3383
3383
  () => {
3384
- import_ui_builder_utils20.logger.info(
3384
+ import_ui_utils20.logger.info(
3385
3385
  LOG_SYSTEM3,
3386
3386
  `User indexer config changed for ${networkConfig.id}, resetting cache`
3387
3387
  );
@@ -3415,7 +3415,7 @@ var StellarIndexerClient = class {
3415
3415
  }
3416
3416
  const endpoints = this.resolveIndexerEndpoints();
3417
3417
  if (!endpoints.http) {
3418
- import_ui_builder_utils20.logger.info(LOG_SYSTEM3, `No indexer configured for network ${this.networkConfig.id}`);
3418
+ import_ui_utils20.logger.info(LOG_SYSTEM3, `No indexer configured for network ${this.networkConfig.id}`);
3419
3419
  this.availabilityChecked = true;
3420
3420
  this.isAvailable = false;
3421
3421
  return false;
@@ -3429,20 +3429,20 @@ var StellarIndexerClient = class {
3429
3429
  })
3430
3430
  });
3431
3431
  if (response.ok) {
3432
- import_ui_builder_utils20.logger.info(
3432
+ import_ui_utils20.logger.info(
3433
3433
  LOG_SYSTEM3,
3434
3434
  `Indexer available for network ${this.networkConfig.id} at ${endpoints.http}`
3435
3435
  );
3436
3436
  this.isAvailable = true;
3437
3437
  } else {
3438
- import_ui_builder_utils20.logger.warn(
3438
+ import_ui_utils20.logger.warn(
3439
3439
  LOG_SYSTEM3,
3440
3440
  `Indexer endpoint ${endpoints.http} returned status ${response.status}`
3441
3441
  );
3442
3442
  this.isAvailable = false;
3443
3443
  }
3444
3444
  } catch (error) {
3445
- import_ui_builder_utils20.logger.warn(
3445
+ import_ui_utils20.logger.warn(
3446
3446
  LOG_SYSTEM3,
3447
3447
  `Failed to connect to indexer at ${endpoints.http}: ${error instanceof Error ? error.message : String(error)}`
3448
3448
  );
@@ -3462,7 +3462,7 @@ var StellarIndexerClient = class {
3462
3462
  async queryHistory(contractAddress, options) {
3463
3463
  const isAvailable = await this.checkAvailability();
3464
3464
  if (!isAvailable) {
3465
- throw new import_ui_builder_types7.IndexerUnavailable(
3465
+ throw new import_ui_types7.IndexerUnavailable(
3466
3466
  "Indexer not available for this network",
3467
3467
  contractAddress,
3468
3468
  this.networkConfig.id
@@ -3470,7 +3470,7 @@ var StellarIndexerClient = class {
3470
3470
  }
3471
3471
  const endpoints = this.resolveIndexerEndpoints();
3472
3472
  if (!endpoints.http) {
3473
- throw new import_ui_builder_types7.ConfigurationInvalid(
3473
+ throw new import_ui_types7.ConfigurationInvalid(
3474
3474
  "No indexer HTTP endpoint configured",
3475
3475
  contractAddress,
3476
3476
  "indexer.http"
@@ -3485,7 +3485,7 @@ var StellarIndexerClient = class {
3485
3485
  body: JSON.stringify({ query, variables })
3486
3486
  });
3487
3487
  if (!response.ok) {
3488
- throw new import_ui_builder_types7.OperationFailed(
3488
+ throw new import_ui_types7.OperationFailed(
3489
3489
  `Indexer query failed with status ${response.status}`,
3490
3490
  contractAddress,
3491
3491
  "queryHistory"
@@ -3494,14 +3494,14 @@ var StellarIndexerClient = class {
3494
3494
  const result = await response.json();
3495
3495
  if (result.errors && result.errors.length > 0) {
3496
3496
  const errorMessages = result.errors.map((e) => e.message).join("; ");
3497
- throw new import_ui_builder_types7.OperationFailed(
3497
+ throw new import_ui_types7.OperationFailed(
3498
3498
  `Indexer query errors: ${errorMessages}`,
3499
3499
  contractAddress,
3500
3500
  "queryHistory"
3501
3501
  );
3502
3502
  }
3503
3503
  if (!result.data?.accessControlEvents?.nodes) {
3504
- import_ui_builder_utils20.logger.debug(LOG_SYSTEM3, `No history data returned for contract ${contractAddress}`);
3504
+ import_ui_utils20.logger.debug(LOG_SYSTEM3, `No history data returned for contract ${contractAddress}`);
3505
3505
  return {
3506
3506
  items: [],
3507
3507
  pageInfo: { hasNextPage: false }
@@ -3514,7 +3514,7 @@ var StellarIndexerClient = class {
3514
3514
  };
3515
3515
  return { items, pageInfo };
3516
3516
  } catch (error) {
3517
- import_ui_builder_utils20.logger.error(
3517
+ import_ui_utils20.logger.error(
3518
3518
  LOG_SYSTEM3,
3519
3519
  `Failed to query indexer history: ${error instanceof Error ? error.message : String(error)}`
3520
3520
  );
@@ -3535,7 +3535,7 @@ var StellarIndexerClient = class {
3535
3535
  async discoverRoleIds(contractAddress) {
3536
3536
  const isAvailable = await this.checkAvailability();
3537
3537
  if (!isAvailable) {
3538
- throw new import_ui_builder_types7.IndexerUnavailable(
3538
+ throw new import_ui_types7.IndexerUnavailable(
3539
3539
  "Indexer not available for this network",
3540
3540
  contractAddress,
3541
3541
  this.networkConfig.id
@@ -3543,13 +3543,13 @@ var StellarIndexerClient = class {
3543
3543
  }
3544
3544
  const endpoints = this.resolveIndexerEndpoints();
3545
3545
  if (!endpoints.http) {
3546
- throw new import_ui_builder_types7.ConfigurationInvalid(
3546
+ throw new import_ui_types7.ConfigurationInvalid(
3547
3547
  "No indexer HTTP endpoint configured",
3548
3548
  contractAddress,
3549
3549
  "indexer.http"
3550
3550
  );
3551
3551
  }
3552
- import_ui_builder_utils20.logger.info(LOG_SYSTEM3, `Discovering role IDs for contract ${contractAddress}`);
3552
+ import_ui_utils20.logger.info(LOG_SYSTEM3, `Discovering role IDs for contract ${contractAddress}`);
3553
3553
  const query = this.buildRoleDiscoveryQuery();
3554
3554
  const variables = { contract: contractAddress };
3555
3555
  try {
@@ -3559,7 +3559,7 @@ var StellarIndexerClient = class {
3559
3559
  body: JSON.stringify({ query, variables })
3560
3560
  });
3561
3561
  if (!response.ok) {
3562
- throw new import_ui_builder_types7.OperationFailed(
3562
+ throw new import_ui_types7.OperationFailed(
3563
3563
  `Indexer query failed with status ${response.status}`,
3564
3564
  contractAddress,
3565
3565
  "discoverRoleIds"
@@ -3568,14 +3568,14 @@ var StellarIndexerClient = class {
3568
3568
  const result = await response.json();
3569
3569
  if (result.errors && result.errors.length > 0) {
3570
3570
  const errorMessages = result.errors.map((e) => e.message).join("; ");
3571
- throw new import_ui_builder_types7.OperationFailed(
3571
+ throw new import_ui_types7.OperationFailed(
3572
3572
  `Indexer query errors: ${errorMessages}`,
3573
3573
  contractAddress,
3574
3574
  "discoverRoleIds"
3575
3575
  );
3576
3576
  }
3577
3577
  if (!result.data?.accessControlEvents?.nodes) {
3578
- import_ui_builder_utils20.logger.debug(LOG_SYSTEM3, `No role events found for contract ${contractAddress}`);
3578
+ import_ui_utils20.logger.debug(LOG_SYSTEM3, `No role events found for contract ${contractAddress}`);
3579
3579
  return [];
3580
3580
  }
3581
3581
  const uniqueRoles = /* @__PURE__ */ new Set();
@@ -3585,7 +3585,7 @@ var StellarIndexerClient = class {
3585
3585
  }
3586
3586
  }
3587
3587
  const roleIds = Array.from(uniqueRoles);
3588
- import_ui_builder_utils20.logger.info(
3588
+ import_ui_utils20.logger.info(
3589
3589
  LOG_SYSTEM3,
3590
3590
  `Discovered ${roleIds.length} unique role(s) for ${contractAddress}`,
3591
3591
  {
@@ -3594,7 +3594,7 @@ var StellarIndexerClient = class {
3594
3594
  );
3595
3595
  return roleIds;
3596
3596
  } catch (error) {
3597
- import_ui_builder_utils20.logger.error(
3597
+ import_ui_utils20.logger.error(
3598
3598
  LOG_SYSTEM3,
3599
3599
  `Failed to discover role IDs: ${error instanceof Error ? error.message : String(error)}`
3600
3600
  );
@@ -3620,7 +3620,7 @@ var StellarIndexerClient = class {
3620
3620
  }
3621
3621
  const isAvailable = await this.checkAvailability();
3622
3622
  if (!isAvailable) {
3623
- throw new import_ui_builder_types7.IndexerUnavailable(
3623
+ throw new import_ui_types7.IndexerUnavailable(
3624
3624
  "Indexer not available for this network",
3625
3625
  contractAddress,
3626
3626
  this.networkConfig.id
@@ -3628,13 +3628,13 @@ var StellarIndexerClient = class {
3628
3628
  }
3629
3629
  const endpoints = this.resolveIndexerEndpoints();
3630
3630
  if (!endpoints.http) {
3631
- throw new import_ui_builder_types7.ConfigurationInvalid(
3631
+ throw new import_ui_types7.ConfigurationInvalid(
3632
3632
  "No indexer HTTP endpoint configured",
3633
3633
  contractAddress,
3634
3634
  "indexer.http"
3635
3635
  );
3636
3636
  }
3637
- import_ui_builder_utils20.logger.debug(
3637
+ import_ui_utils20.logger.debug(
3638
3638
  LOG_SYSTEM3,
3639
3639
  `Querying latest grants for ${memberAddresses.length} member(s) with role ${roleId}`
3640
3640
  );
@@ -3651,7 +3651,7 @@ var StellarIndexerClient = class {
3651
3651
  body: JSON.stringify({ query, variables })
3652
3652
  });
3653
3653
  if (!response.ok) {
3654
- throw new import_ui_builder_types7.OperationFailed(
3654
+ throw new import_ui_types7.OperationFailed(
3655
3655
  `Indexer query failed with status ${response.status}`,
3656
3656
  contractAddress,
3657
3657
  "queryLatestGrants"
@@ -3660,14 +3660,14 @@ var StellarIndexerClient = class {
3660
3660
  const result = await response.json();
3661
3661
  if (result.errors && result.errors.length > 0) {
3662
3662
  const errorMessages = result.errors.map((e) => e.message).join("; ");
3663
- throw new import_ui_builder_types7.OperationFailed(
3663
+ throw new import_ui_types7.OperationFailed(
3664
3664
  `Indexer query errors: ${errorMessages}`,
3665
3665
  contractAddress,
3666
3666
  "queryLatestGrants"
3667
3667
  );
3668
3668
  }
3669
3669
  if (!result.data?.accessControlEvents?.nodes) {
3670
- import_ui_builder_utils20.logger.debug(LOG_SYSTEM3, `No grant events found for role ${roleId}`);
3670
+ import_ui_utils20.logger.debug(LOG_SYSTEM3, `No grant events found for role ${roleId}`);
3671
3671
  return /* @__PURE__ */ new Map();
3672
3672
  }
3673
3673
  const grantMap = /* @__PURE__ */ new Map();
@@ -3680,13 +3680,13 @@ var StellarIndexerClient = class {
3680
3680
  });
3681
3681
  }
3682
3682
  }
3683
- import_ui_builder_utils20.logger.debug(
3683
+ import_ui_utils20.logger.debug(
3684
3684
  LOG_SYSTEM3,
3685
3685
  `Found grant info for ${grantMap.size} of ${memberAddresses.length} member(s)`
3686
3686
  );
3687
3687
  return grantMap;
3688
3688
  } catch (error) {
3689
- import_ui_builder_utils20.logger.error(
3689
+ import_ui_utils20.logger.error(
3690
3690
  LOG_SYSTEM3,
3691
3691
  `Failed to query latest grants: ${error instanceof Error ? error.message : String(error)}`
3692
3692
  );
@@ -3717,7 +3717,7 @@ var StellarIndexerClient = class {
3717
3717
  async queryPendingOwnershipTransfer(contractAddress) {
3718
3718
  const isAvailable = await this.checkAvailability();
3719
3719
  if (!isAvailable) {
3720
- throw new import_ui_builder_types7.IndexerUnavailable(
3720
+ throw new import_ui_types7.IndexerUnavailable(
3721
3721
  "Indexer not available for this network",
3722
3722
  contractAddress,
3723
3723
  this.networkConfig.id
@@ -3725,13 +3725,13 @@ var StellarIndexerClient = class {
3725
3725
  }
3726
3726
  const endpoints = this.resolveIndexerEndpoints();
3727
3727
  if (!endpoints.http) {
3728
- throw new import_ui_builder_types7.ConfigurationInvalid(
3728
+ throw new import_ui_types7.ConfigurationInvalid(
3729
3729
  "No indexer HTTP endpoint configured",
3730
3730
  contractAddress,
3731
3731
  "indexer.http"
3732
3732
  );
3733
3733
  }
3734
- import_ui_builder_utils20.logger.info(LOG_SYSTEM3, `Querying pending ownership transfer for ${contractAddress}`);
3734
+ import_ui_utils20.logger.info(LOG_SYSTEM3, `Querying pending ownership transfer for ${contractAddress}`);
3735
3735
  const initiationQuery = this.buildOwnershipTransferStartedQuery();
3736
3736
  const initiationVariables = { contract: contractAddress };
3737
3737
  try {
@@ -3741,7 +3741,7 @@ var StellarIndexerClient = class {
3741
3741
  body: JSON.stringify({ query: initiationQuery, variables: initiationVariables })
3742
3742
  });
3743
3743
  if (!initiationResponse.ok) {
3744
- throw new import_ui_builder_types7.OperationFailed(
3744
+ throw new import_ui_types7.OperationFailed(
3745
3745
  `Indexer query failed with status ${initiationResponse.status}`,
3746
3746
  contractAddress,
3747
3747
  "queryPendingOwnershipTransfer"
@@ -3750,7 +3750,7 @@ var StellarIndexerClient = class {
3750
3750
  const initiationResult = await initiationResponse.json();
3751
3751
  if (initiationResult.errors && initiationResult.errors.length > 0) {
3752
3752
  const errorMessages = initiationResult.errors.map((e) => e.message).join("; ");
3753
- throw new import_ui_builder_types7.OperationFailed(
3753
+ throw new import_ui_types7.OperationFailed(
3754
3754
  `Indexer query errors: ${errorMessages}`,
3755
3755
  contractAddress,
3756
3756
  "queryPendingOwnershipTransfer"
@@ -3758,7 +3758,7 @@ var StellarIndexerClient = class {
3758
3758
  }
3759
3759
  const initiatedNodes = initiationResult.data?.accessControlEvents?.nodes;
3760
3760
  if (!initiatedNodes || initiatedNodes.length === 0) {
3761
- import_ui_builder_utils20.logger.debug(LOG_SYSTEM3, `No ownership transfer initiated for ${contractAddress}`);
3761
+ import_ui_utils20.logger.debug(LOG_SYSTEM3, `No ownership transfer initiated for ${contractAddress}`);
3762
3762
  return null;
3763
3763
  }
3764
3764
  const latestInitiation = initiatedNodes[0];
@@ -3773,7 +3773,7 @@ var StellarIndexerClient = class {
3773
3773
  body: JSON.stringify({ query: completionQuery, variables: completionVariables })
3774
3774
  });
3775
3775
  if (!completionResponse.ok) {
3776
- throw new import_ui_builder_types7.OperationFailed(
3776
+ throw new import_ui_types7.OperationFailed(
3777
3777
  `Indexer completion query failed with status ${completionResponse.status}`,
3778
3778
  contractAddress,
3779
3779
  "queryPendingOwnershipTransfer"
@@ -3782,7 +3782,7 @@ var StellarIndexerClient = class {
3782
3782
  const completionResult = await completionResponse.json();
3783
3783
  if (completionResult.errors && completionResult.errors.length > 0) {
3784
3784
  const errorMessages = completionResult.errors.map((e) => e.message).join("; ");
3785
- throw new import_ui_builder_types7.OperationFailed(
3785
+ throw new import_ui_types7.OperationFailed(
3786
3786
  `Indexer completion query errors: ${errorMessages}`,
3787
3787
  contractAddress,
3788
3788
  "queryPendingOwnershipTransfer"
@@ -3790,24 +3790,24 @@ var StellarIndexerClient = class {
3790
3790
  }
3791
3791
  const completedNodes = completionResult.data?.accessControlEvents?.nodes;
3792
3792
  if (completedNodes && completedNodes.length > 0) {
3793
- import_ui_builder_utils20.logger.debug(LOG_SYSTEM3, `Ownership transfer was completed for ${contractAddress}`);
3793
+ import_ui_utils20.logger.debug(LOG_SYSTEM3, `Ownership transfer was completed for ${contractAddress}`);
3794
3794
  return null;
3795
3795
  }
3796
3796
  if (!latestInitiation.admin) {
3797
- import_ui_builder_utils20.logger.warn(
3797
+ import_ui_utils20.logger.warn(
3798
3798
  LOG_SYSTEM3,
3799
3799
  `Indexer returned OWNERSHIP_TRANSFER_STARTED event without admin field for ${contractAddress}. This indicates incomplete indexer data. Treating as no valid pending transfer.`
3800
3800
  );
3801
3801
  return null;
3802
3802
  }
3803
3803
  if (latestInitiation.liveUntilLedger === void 0 || latestInitiation.liveUntilLedger === null) {
3804
- import_ui_builder_utils20.logger.warn(
3804
+ import_ui_utils20.logger.warn(
3805
3805
  LOG_SYSTEM3,
3806
3806
  `Indexer returned OWNERSHIP_TRANSFER_STARTED event without liveUntilLedger for ${contractAddress}. This may indicate an older indexer version. Treating as no valid pending transfer.`
3807
3807
  );
3808
3808
  return null;
3809
3809
  }
3810
- import_ui_builder_utils20.logger.info(
3810
+ import_ui_utils20.logger.info(
3811
3811
  LOG_SYSTEM3,
3812
3812
  `Found pending ownership transfer for ${contractAddress}: pending owner=${latestInitiation.account}, expires at ledger ${latestInitiation.liveUntilLedger}`
3813
3813
  );
@@ -3820,14 +3820,14 @@ var StellarIndexerClient = class {
3820
3820
  liveUntilLedger: latestInitiation.liveUntilLedger
3821
3821
  };
3822
3822
  } catch (error) {
3823
- if (error instanceof import_ui_builder_types7.IndexerUnavailable || error instanceof import_ui_builder_types7.OperationFailed) {
3823
+ if (error instanceof import_ui_types7.IndexerUnavailable || error instanceof import_ui_types7.OperationFailed) {
3824
3824
  throw error;
3825
3825
  }
3826
- import_ui_builder_utils20.logger.error(
3826
+ import_ui_utils20.logger.error(
3827
3827
  LOG_SYSTEM3,
3828
3828
  `Failed to query pending ownership transfer: ${error instanceof Error ? error.message : String(error)}`
3829
3829
  );
3830
- throw new import_ui_builder_types7.OperationFailed(
3830
+ throw new import_ui_types7.OperationFailed(
3831
3831
  `Failed to query pending ownership transfer: ${error.message}`,
3832
3832
  contractAddress,
3833
3833
  "queryPendingOwnershipTransfer"
@@ -3858,7 +3858,7 @@ var StellarIndexerClient = class {
3858
3858
  async queryPendingAdminTransfer(contractAddress) {
3859
3859
  const isAvailable = await this.checkAvailability();
3860
3860
  if (!isAvailable) {
3861
- throw new import_ui_builder_types7.IndexerUnavailable(
3861
+ throw new import_ui_types7.IndexerUnavailable(
3862
3862
  "Indexer not available for this network",
3863
3863
  contractAddress,
3864
3864
  this.networkConfig.id
@@ -3866,13 +3866,13 @@ var StellarIndexerClient = class {
3866
3866
  }
3867
3867
  const endpoints = this.resolveIndexerEndpoints();
3868
3868
  if (!endpoints.http) {
3869
- throw new import_ui_builder_types7.ConfigurationInvalid(
3869
+ throw new import_ui_types7.ConfigurationInvalid(
3870
3870
  "No indexer HTTP endpoint configured",
3871
3871
  contractAddress,
3872
3872
  "indexer.http"
3873
3873
  );
3874
3874
  }
3875
- import_ui_builder_utils20.logger.info(LOG_SYSTEM3, `Querying pending admin transfer for ${contractAddress}`);
3875
+ import_ui_utils20.logger.info(LOG_SYSTEM3, `Querying pending admin transfer for ${contractAddress}`);
3876
3876
  const initiationQuery = this.buildAdminTransferInitiatedQuery();
3877
3877
  const initiationVariables = { contract: contractAddress };
3878
3878
  try {
@@ -3882,7 +3882,7 @@ var StellarIndexerClient = class {
3882
3882
  body: JSON.stringify({ query: initiationQuery, variables: initiationVariables })
3883
3883
  });
3884
3884
  if (!initiationResponse.ok) {
3885
- throw new import_ui_builder_types7.OperationFailed(
3885
+ throw new import_ui_types7.OperationFailed(
3886
3886
  `Indexer query failed with status ${initiationResponse.status}`,
3887
3887
  contractAddress,
3888
3888
  "queryPendingAdminTransfer"
@@ -3891,7 +3891,7 @@ var StellarIndexerClient = class {
3891
3891
  const initiationResult = await initiationResponse.json();
3892
3892
  if (initiationResult.errors && initiationResult.errors.length > 0) {
3893
3893
  const errorMessages = initiationResult.errors.map((e) => e.message).join("; ");
3894
- throw new import_ui_builder_types7.OperationFailed(
3894
+ throw new import_ui_types7.OperationFailed(
3895
3895
  `Indexer query errors: ${errorMessages}`,
3896
3896
  contractAddress,
3897
3897
  "queryPendingAdminTransfer"
@@ -3899,7 +3899,7 @@ var StellarIndexerClient = class {
3899
3899
  }
3900
3900
  const initiatedNodes = initiationResult.data?.accessControlEvents?.nodes;
3901
3901
  if (!initiatedNodes || initiatedNodes.length === 0) {
3902
- import_ui_builder_utils20.logger.debug(LOG_SYSTEM3, `No admin transfer initiated for ${contractAddress}`);
3902
+ import_ui_utils20.logger.debug(LOG_SYSTEM3, `No admin transfer initiated for ${contractAddress}`);
3903
3903
  return null;
3904
3904
  }
3905
3905
  const latestInitiation = initiatedNodes[0];
@@ -3914,7 +3914,7 @@ var StellarIndexerClient = class {
3914
3914
  body: JSON.stringify({ query: completionQuery, variables: completionVariables })
3915
3915
  });
3916
3916
  if (!completionResponse.ok) {
3917
- throw new import_ui_builder_types7.OperationFailed(
3917
+ throw new import_ui_types7.OperationFailed(
3918
3918
  `Indexer completion query failed with status ${completionResponse.status}`,
3919
3919
  contractAddress,
3920
3920
  "queryPendingAdminTransfer"
@@ -3923,7 +3923,7 @@ var StellarIndexerClient = class {
3923
3923
  const completionResult = await completionResponse.json();
3924
3924
  if (completionResult.errors && completionResult.errors.length > 0) {
3925
3925
  const errorMessages = completionResult.errors.map((e) => e.message).join("; ");
3926
- throw new import_ui_builder_types7.OperationFailed(
3926
+ throw new import_ui_types7.OperationFailed(
3927
3927
  `Indexer completion query errors: ${errorMessages}`,
3928
3928
  contractAddress,
3929
3929
  "queryPendingAdminTransfer"
@@ -3931,24 +3931,24 @@ var StellarIndexerClient = class {
3931
3931
  }
3932
3932
  const completedNodes = completionResult.data?.accessControlEvents?.nodes;
3933
3933
  if (completedNodes && completedNodes.length > 0) {
3934
- import_ui_builder_utils20.logger.debug(LOG_SYSTEM3, `Admin transfer was completed for ${contractAddress}`);
3934
+ import_ui_utils20.logger.debug(LOG_SYSTEM3, `Admin transfer was completed for ${contractAddress}`);
3935
3935
  return null;
3936
3936
  }
3937
3937
  if (!latestInitiation.admin) {
3938
- import_ui_builder_utils20.logger.warn(
3938
+ import_ui_utils20.logger.warn(
3939
3939
  LOG_SYSTEM3,
3940
3940
  `Indexer returned ADMIN_TRANSFER_INITIATED event without admin field for ${contractAddress}. This indicates incomplete indexer data. Treating as no valid pending transfer.`
3941
3941
  );
3942
3942
  return null;
3943
3943
  }
3944
3944
  if (latestInitiation.liveUntilLedger === void 0 || latestInitiation.liveUntilLedger === null) {
3945
- import_ui_builder_utils20.logger.warn(
3945
+ import_ui_utils20.logger.warn(
3946
3946
  LOG_SYSTEM3,
3947
3947
  `Indexer returned ADMIN_TRANSFER_INITIATED event without liveUntilLedger for ${contractAddress}. This may indicate an older indexer version. Treating as no valid pending transfer.`
3948
3948
  );
3949
3949
  return null;
3950
3950
  }
3951
- import_ui_builder_utils20.logger.info(
3951
+ import_ui_utils20.logger.info(
3952
3952
  LOG_SYSTEM3,
3953
3953
  `Found pending admin transfer for ${contractAddress}: pending admin=${latestInitiation.account}, expires at ledger ${latestInitiation.liveUntilLedger}`
3954
3954
  );
@@ -3961,14 +3961,14 @@ var StellarIndexerClient = class {
3961
3961
  liveUntilLedger: latestInitiation.liveUntilLedger
3962
3962
  };
3963
3963
  } catch (error) {
3964
- if (error instanceof import_ui_builder_types7.IndexerUnavailable || error instanceof import_ui_builder_types7.OperationFailed) {
3964
+ if (error instanceof import_ui_types7.IndexerUnavailable || error instanceof import_ui_types7.OperationFailed) {
3965
3965
  throw error;
3966
3966
  }
3967
- import_ui_builder_utils20.logger.error(
3967
+ import_ui_utils20.logger.error(
3968
3968
  LOG_SYSTEM3,
3969
3969
  `Failed to query pending admin transfer: ${error instanceof Error ? error.message : String(error)}`
3970
3970
  );
3971
- throw new import_ui_builder_types7.OperationFailed(
3971
+ throw new import_ui_types7.OperationFailed(
3972
3972
  `Failed to query pending admin transfer: ${error.message}`,
3973
3973
  contractAddress,
3974
3974
  "queryPendingAdminTransfer"
@@ -4123,7 +4123,7 @@ var StellarIndexerClient = class {
4123
4123
  endpoints.ws = userIndexerConfig.ws;
4124
4124
  }
4125
4125
  if (endpoints.http || endpoints.ws) {
4126
- import_ui_builder_utils20.logger.info(
4126
+ import_ui_utils20.logger.info(
4127
4127
  LOG_SYSTEM3,
4128
4128
  `Using user-configured indexer for ${networkId}: http=${endpoints.http}, ws=${endpoints.ws}`
4129
4129
  );
@@ -4131,11 +4131,11 @@ var StellarIndexerClient = class {
4131
4131
  return endpoints;
4132
4132
  }
4133
4133
  }
4134
- const indexerOverride = import_ui_builder_utils20.appConfigService.getIndexerEndpointOverride(networkId);
4134
+ const indexerOverride = import_ui_utils20.appConfigService.getIndexerEndpointOverride(networkId);
4135
4135
  if (indexerOverride) {
4136
4136
  if (typeof indexerOverride === "string") {
4137
4137
  endpoints.http = indexerOverride;
4138
- import_ui_builder_utils20.logger.info(
4138
+ import_ui_utils20.logger.info(
4139
4139
  LOG_SYSTEM3,
4140
4140
  `Using runtime indexer override for ${networkId}: ${indexerOverride}`
4141
4141
  );
@@ -4146,7 +4146,7 @@ var StellarIndexerClient = class {
4146
4146
  if ("ws" in indexerOverride && indexerOverride.ws) {
4147
4147
  endpoints.ws = indexerOverride.ws;
4148
4148
  }
4149
- import_ui_builder_utils20.logger.info(
4149
+ import_ui_utils20.logger.info(
4150
4150
  LOG_SYSTEM3,
4151
4151
  `Using runtime indexer override for ${networkId}: http=${endpoints.http}, ws=${endpoints.ws}`
4152
4152
  );
@@ -4156,14 +4156,14 @@ var StellarIndexerClient = class {
4156
4156
  }
4157
4157
  if (this.networkConfig.indexerUri) {
4158
4158
  endpoints.http = this.networkConfig.indexerUri;
4159
- import_ui_builder_utils20.logger.info(
4159
+ import_ui_utils20.logger.info(
4160
4160
  LOG_SYSTEM3,
4161
4161
  `Using network config indexer URI for ${networkId}: ${endpoints.http}`
4162
4162
  );
4163
4163
  }
4164
4164
  if (this.networkConfig.indexerWsUri) {
4165
4165
  endpoints.ws = this.networkConfig.indexerWsUri;
4166
- import_ui_builder_utils20.logger.debug(
4166
+ import_ui_utils20.logger.debug(
4167
4167
  LOG_SYSTEM3,
4168
4168
  `Using network config indexer WS URI for ${networkId}: ${endpoints.ws}`
4169
4169
  );
@@ -4172,8 +4172,8 @@ var StellarIndexerClient = class {
4172
4172
  this.resolvedEndpoints = endpoints;
4173
4173
  return endpoints;
4174
4174
  }
4175
- import_ui_builder_utils20.logger.debug(LOG_SYSTEM3, `No indexer derivation pattern available for ${networkId}`);
4176
- import_ui_builder_utils20.logger.debug(LOG_SYSTEM3, `No indexer endpoints configured for ${networkId}`);
4175
+ import_ui_utils20.logger.debug(LOG_SYSTEM3, `No indexer derivation pattern available for ${networkId}`);
4176
+ import_ui_utils20.logger.debug(LOG_SYSTEM3, `No indexer endpoints configured for ${networkId}`);
4177
4177
  this.resolvedEndpoints = endpoints;
4178
4178
  return endpoints;
4179
4179
  }
@@ -4360,7 +4360,7 @@ var StellarIndexerClient = class {
4360
4360
  changeType = "ADMIN_TRANSFER_COMPLETED";
4361
4361
  break;
4362
4362
  default:
4363
- import_ui_builder_utils20.logger.warn(
4363
+ import_ui_utils20.logger.warn(
4364
4364
  LOG_SYSTEM3,
4365
4365
  `Unknown event type: ${entry.type}, assigning changeType to UNKNOWN`
4366
4366
  );
@@ -4382,8 +4382,8 @@ function createIndexerClient(networkConfig) {
4382
4382
  }
4383
4383
 
4384
4384
  // src/access-control/validation.ts
4385
- var import_ui_builder_types8 = require("@openzeppelin/ui-builder-types");
4386
- var import_ui_builder_utils21 = require("@openzeppelin/ui-builder-utils");
4385
+ var import_ui_types8 = require("@openzeppelin/ui-types");
4386
+ var import_ui_utils21 = require("@openzeppelin/ui-utils");
4387
4387
 
4388
4388
  // src/validation/address.ts
4389
4389
  var import_stellar_sdk12 = require("@stellar/stellar-sdk");
@@ -4468,14 +4468,14 @@ function isValidAddress(address, addressType) {
4468
4468
  // src/access-control/validation.ts
4469
4469
  function validateContractAddress(address, paramName = "contractAddress") {
4470
4470
  if (!address || typeof address !== "string" || address.trim() === "") {
4471
- throw new import_ui_builder_types8.ConfigurationInvalid(
4471
+ throw new import_ui_types8.ConfigurationInvalid(
4472
4472
  `${paramName} is required and must be a non-empty string`,
4473
4473
  address,
4474
4474
  paramName
4475
4475
  );
4476
4476
  }
4477
4477
  if (!isValidContractAddress(address)) {
4478
- throw new import_ui_builder_types8.ConfigurationInvalid(
4478
+ throw new import_ui_types8.ConfigurationInvalid(
4479
4479
  `Invalid Stellar contract address: ${address}. Contract addresses must start with 'C' and be valid StrKey format.`,
4480
4480
  address,
4481
4481
  paramName
@@ -4484,14 +4484,14 @@ function validateContractAddress(address, paramName = "contractAddress") {
4484
4484
  }
4485
4485
  function validateAccountAddress(address, paramName = "account") {
4486
4486
  if (!address || typeof address !== "string" || address.trim() === "") {
4487
- throw new import_ui_builder_types8.ConfigurationInvalid(
4487
+ throw new import_ui_types8.ConfigurationInvalid(
4488
4488
  `${paramName} is required and must be a non-empty string`,
4489
4489
  address,
4490
4490
  paramName
4491
4491
  );
4492
4492
  }
4493
4493
  if (!isValidAccountAddress(address)) {
4494
- throw new import_ui_builder_types8.ConfigurationInvalid(
4494
+ throw new import_ui_types8.ConfigurationInvalid(
4495
4495
  `Invalid Stellar account address: ${address}. Account addresses must start with 'G' and be valid Ed25519 public keys.`,
4496
4496
  address,
4497
4497
  paramName
@@ -4500,14 +4500,14 @@ function validateAccountAddress(address, paramName = "account") {
4500
4500
  }
4501
4501
  function validateAddress(address, paramName = "address") {
4502
4502
  if (!address || typeof address !== "string" || address.trim() === "") {
4503
- throw new import_ui_builder_types8.ConfigurationInvalid(
4503
+ throw new import_ui_types8.ConfigurationInvalid(
4504
4504
  `${paramName} is required and must be a non-empty string`,
4505
4505
  address,
4506
4506
  paramName
4507
4507
  );
4508
4508
  }
4509
4509
  if (!isValidAccountAddress(address) && !isValidContractAddress(address)) {
4510
- throw new import_ui_builder_types8.ConfigurationInvalid(
4510
+ throw new import_ui_types8.ConfigurationInvalid(
4511
4511
  `Invalid Stellar address: ${address}. Address must be a valid account address (starts with 'G') or contract address (starts with 'C').`,
4512
4512
  address,
4513
4513
  paramName
@@ -4518,7 +4518,7 @@ var MAX_ROLE_ID_LENGTH = 32;
4518
4518
  var VALID_ROLE_ID_PATTERN = /^[a-zA-Z_][a-zA-Z0-9_]*$/;
4519
4519
  function validateRoleId(roleId, paramName = "roleId") {
4520
4520
  if (!roleId || typeof roleId !== "string") {
4521
- throw new import_ui_builder_types8.ConfigurationInvalid(
4521
+ throw new import_ui_types8.ConfigurationInvalid(
4522
4522
  `${paramName} is required and must be a non-empty string`,
4523
4523
  roleId,
4524
4524
  paramName
@@ -4526,21 +4526,21 @@ function validateRoleId(roleId, paramName = "roleId") {
4526
4526
  }
4527
4527
  const trimmed = roleId.trim();
4528
4528
  if (trimmed === "") {
4529
- throw new import_ui_builder_types8.ConfigurationInvalid(
4529
+ throw new import_ui_types8.ConfigurationInvalid(
4530
4530
  `${paramName} cannot be empty or whitespace-only`,
4531
4531
  roleId,
4532
4532
  paramName
4533
4533
  );
4534
4534
  }
4535
4535
  if (trimmed.length > MAX_ROLE_ID_LENGTH) {
4536
- throw new import_ui_builder_types8.ConfigurationInvalid(
4536
+ throw new import_ui_types8.ConfigurationInvalid(
4537
4537
  `${paramName} exceeds maximum length of ${MAX_ROLE_ID_LENGTH} characters: "${trimmed}" (${trimmed.length} chars)`,
4538
4538
  roleId,
4539
4539
  paramName
4540
4540
  );
4541
4541
  }
4542
4542
  if (!VALID_ROLE_ID_PATTERN.test(trimmed)) {
4543
- throw new import_ui_builder_types8.ConfigurationInvalid(
4543
+ throw new import_ui_types8.ConfigurationInvalid(
4544
4544
  `${paramName} contains invalid characters: "${trimmed}". Role IDs must start with a letter or underscore and contain only alphanumeric characters and underscores.`,
4545
4545
  roleId,
4546
4546
  paramName
@@ -4549,7 +4549,7 @@ function validateRoleId(roleId, paramName = "roleId") {
4549
4549
  }
4550
4550
  function validateRoleIds(roleIds, paramName = "roleIds") {
4551
4551
  if (!Array.isArray(roleIds)) {
4552
- throw new import_ui_builder_types8.ConfigurationInvalid(`${paramName} must be an array`, String(roleIds), paramName);
4552
+ throw new import_ui_types8.ConfigurationInvalid(`${paramName} must be an array`, String(roleIds), paramName);
4553
4553
  }
4554
4554
  for (let i = 0; i < roleIds.length; i++) {
4555
4555
  validateRoleId(roleIds[i], `${paramName}[${i}]`);
@@ -4593,7 +4593,7 @@ var StellarAccessControlService = class {
4593
4593
  contractSchema,
4594
4594
  knownRoleIds: validatedRoleIds
4595
4595
  });
4596
- import_ui_builder_utils22.logger.debug("StellarAccessControlService.registerContract", `Registered ${contractAddress}`, {
4596
+ import_ui_utils22.logger.debug("StellarAccessControlService.registerContract", `Registered ${contractAddress}`, {
4597
4597
  roleCount: validatedRoleIds?.length || 0
4598
4598
  });
4599
4599
  }
@@ -4613,7 +4613,7 @@ var StellarAccessControlService = class {
4613
4613
  validateContractAddress(contractAddress);
4614
4614
  const context = this.contractContexts.get(contractAddress);
4615
4615
  if (!context) {
4616
- throw new import_ui_builder_types9.ConfigurationInvalid(
4616
+ throw new import_ui_types9.ConfigurationInvalid(
4617
4617
  "Contract not registered. Call registerContract() first.",
4618
4618
  contractAddress,
4619
4619
  "contractAddress"
@@ -4621,7 +4621,7 @@ var StellarAccessControlService = class {
4621
4621
  }
4622
4622
  const validatedNewRoleIds = validateRoleIds(roleIds);
4623
4623
  if (validatedNewRoleIds.length === 0) {
4624
- import_ui_builder_utils22.logger.debug(
4624
+ import_ui_utils22.logger.debug(
4625
4625
  "StellarAccessControlService.addKnownRoleIds",
4626
4626
  `No valid role IDs to add for ${contractAddress}`
4627
4627
  );
@@ -4630,7 +4630,7 @@ var StellarAccessControlService = class {
4630
4630
  const existingRoleIds = context.knownRoleIds || context.discoveredRoleIds || [];
4631
4631
  const mergedRoleIds = [.../* @__PURE__ */ new Set([...existingRoleIds, ...validatedNewRoleIds])];
4632
4632
  context.knownRoleIds = mergedRoleIds;
4633
- import_ui_builder_utils22.logger.info(
4633
+ import_ui_utils22.logger.info(
4634
4634
  "StellarAccessControlService.addKnownRoleIds",
4635
4635
  `Added ${validatedNewRoleIds.length} role ID(s) for ${contractAddress}`,
4636
4636
  {
@@ -4649,13 +4649,13 @@ var StellarAccessControlService = class {
4649
4649
  */
4650
4650
  async getCapabilities(contractAddress) {
4651
4651
  validateContractAddress(contractAddress);
4652
- import_ui_builder_utils22.logger.info(
4652
+ import_ui_utils22.logger.info(
4653
4653
  "StellarAccessControlService.getCapabilities",
4654
4654
  `Detecting capabilities for ${contractAddress}`
4655
4655
  );
4656
4656
  const context = this.contractContexts.get(contractAddress);
4657
4657
  if (!context) {
4658
- throw new import_ui_builder_types9.ConfigurationInvalid(
4658
+ throw new import_ui_types9.ConfigurationInvalid(
4659
4659
  "Contract not registered. Call registerContract() first.",
4660
4660
  contractAddress,
4661
4661
  "contractAddress"
@@ -4663,7 +4663,7 @@ var StellarAccessControlService = class {
4663
4663
  }
4664
4664
  const indexerAvailable = await this.indexerClient.checkAvailability();
4665
4665
  const capabilities = detectAccessControlCapabilities(context.contractSchema, indexerAvailable);
4666
- import_ui_builder_utils22.logger.debug("StellarAccessControlService.getCapabilities", "Detected capabilities:", {
4666
+ import_ui_utils22.logger.debug("StellarAccessControlService.getCapabilities", "Detected capabilities:", {
4667
4667
  hasOwnable: capabilities.hasOwnable,
4668
4668
  hasAccessControl: capabilities.hasAccessControl,
4669
4669
  hasEnumerableRoles: capabilities.hasEnumerableRoles,
@@ -4704,13 +4704,13 @@ var StellarAccessControlService = class {
4704
4704
  */
4705
4705
  async getOwnership(contractAddress) {
4706
4706
  validateContractAddress(contractAddress);
4707
- import_ui_builder_utils22.logger.info(
4707
+ import_ui_utils22.logger.info(
4708
4708
  "StellarAccessControlService.getOwnership",
4709
4709
  `Reading ownership status for ${contractAddress}`
4710
4710
  );
4711
4711
  const basicOwnership = await readOwnership(contractAddress, this.networkConfig);
4712
4712
  if (basicOwnership.owner === null) {
4713
- import_ui_builder_utils22.logger.debug(
4713
+ import_ui_utils22.logger.debug(
4714
4714
  "StellarAccessControlService.getOwnership",
4715
4715
  `Contract ${contractAddress} has renounced ownership`
4716
4716
  );
@@ -4721,7 +4721,7 @@ var StellarAccessControlService = class {
4721
4721
  }
4722
4722
  const indexerAvailable = await this.indexerClient.checkAvailability();
4723
4723
  if (!indexerAvailable) {
4724
- import_ui_builder_utils22.logger.warn(
4724
+ import_ui_utils22.logger.warn(
4725
4725
  "StellarAccessControlService.getOwnership",
4726
4726
  `Indexer unavailable for ${this.networkConfig.id}: pending transfer status cannot be determined`
4727
4727
  );
@@ -4734,7 +4734,7 @@ var StellarAccessControlService = class {
4734
4734
  try {
4735
4735
  pendingTransfer = await this.indexerClient.queryPendingOwnershipTransfer(contractAddress);
4736
4736
  } catch (error) {
4737
- import_ui_builder_utils22.logger.warn(
4737
+ import_ui_utils22.logger.warn(
4738
4738
  "StellarAccessControlService.getOwnership",
4739
4739
  `Failed to query pending transfer: ${error instanceof Error ? error.message : String(error)}`
4740
4740
  );
@@ -4744,7 +4744,7 @@ var StellarAccessControlService = class {
4744
4744
  };
4745
4745
  }
4746
4746
  if (!pendingTransfer) {
4747
- import_ui_builder_utils22.logger.debug(
4747
+ import_ui_utils22.logger.debug(
4748
4748
  "StellarAccessControlService.getOwnership",
4749
4749
  `Contract ${contractAddress} has owner with no pending transfer`
4750
4750
  );
@@ -4757,7 +4757,7 @@ var StellarAccessControlService = class {
4757
4757
  try {
4758
4758
  currentLedger = await getCurrentLedger(this.networkConfig);
4759
4759
  } catch (error) {
4760
- import_ui_builder_utils22.logger.warn(
4760
+ import_ui_utils22.logger.warn(
4761
4761
  "StellarAccessControlService.getOwnership",
4762
4762
  `Failed to get current ledger: ${error instanceof Error ? error.message : String(error)}`
4763
4763
  );
@@ -4776,7 +4776,7 @@ var StellarAccessControlService = class {
4776
4776
  initiatedBlock: pendingTransfer.ledger
4777
4777
  };
4778
4778
  if (isExpired) {
4779
- import_ui_builder_utils22.logger.debug(
4779
+ import_ui_utils22.logger.debug(
4780
4780
  "StellarAccessControlService.getOwnership",
4781
4781
  `Contract ${contractAddress} has expired pending transfer (current: ${currentLedger}, expiration: ${liveUntilLedger})`
4782
4782
  );
@@ -4786,7 +4786,7 @@ var StellarAccessControlService = class {
4786
4786
  pendingTransfer: pendingTransferInfo
4787
4787
  };
4788
4788
  }
4789
- import_ui_builder_utils22.logger.debug(
4789
+ import_ui_utils22.logger.debug(
4790
4790
  "StellarAccessControlService.getOwnership",
4791
4791
  `Contract ${contractAddress} has pending transfer to ${pendingTransfer.pendingOwner} (expires at ledger ${liveUntilLedger})`
4792
4792
  );
@@ -4808,13 +4808,13 @@ var StellarAccessControlService = class {
4808
4808
  */
4809
4809
  async getCurrentRoles(contractAddress) {
4810
4810
  validateContractAddress(contractAddress);
4811
- import_ui_builder_utils22.logger.info(
4811
+ import_ui_utils22.logger.info(
4812
4812
  "StellarAccessControlService.getCurrentRoles",
4813
4813
  `Reading roles for ${contractAddress}`
4814
4814
  );
4815
4815
  const context = this.contractContexts.get(contractAddress);
4816
4816
  if (!context) {
4817
- throw new import_ui_builder_types9.ConfigurationInvalid(
4817
+ throw new import_ui_types9.ConfigurationInvalid(
4818
4818
  "Contract not registered. Call registerContract() first.",
4819
4819
  contractAddress,
4820
4820
  "contractAddress"
@@ -4822,14 +4822,14 @@ var StellarAccessControlService = class {
4822
4822
  }
4823
4823
  let roleIds = context.knownRoleIds || [];
4824
4824
  if (roleIds.length === 0) {
4825
- import_ui_builder_utils22.logger.debug(
4825
+ import_ui_utils22.logger.debug(
4826
4826
  "StellarAccessControlService.getCurrentRoles",
4827
4827
  "No role IDs provided, attempting discovery via indexer"
4828
4828
  );
4829
4829
  roleIds = await this.discoverKnownRoleIds(contractAddress);
4830
4830
  }
4831
4831
  if (roleIds.length === 0) {
4832
- import_ui_builder_utils22.logger.warn(
4832
+ import_ui_utils22.logger.warn(
4833
4833
  "StellarAccessControlService.getCurrentRoles",
4834
4834
  "No role IDs available (neither provided nor discoverable), returning empty array"
4835
4835
  );
@@ -4850,7 +4850,7 @@ var StellarAccessControlService = class {
4850
4850
  */
4851
4851
  async getCurrentRolesEnriched(contractAddress) {
4852
4852
  validateContractAddress(contractAddress);
4853
- import_ui_builder_utils22.logger.info(
4853
+ import_ui_utils22.logger.info(
4854
4854
  "StellarAccessControlService.getCurrentRolesEnriched",
4855
4855
  `Reading enriched roles for ${contractAddress}`
4856
4856
  );
@@ -4860,7 +4860,7 @@ var StellarAccessControlService = class {
4860
4860
  }
4861
4861
  const indexerAvailable = await this.indexerClient.checkAvailability();
4862
4862
  if (!indexerAvailable) {
4863
- import_ui_builder_utils22.logger.debug(
4863
+ import_ui_utils22.logger.debug(
4864
4864
  "StellarAccessControlService.getCurrentRolesEnriched",
4865
4865
  "Indexer not available, returning roles without timestamps"
4866
4866
  );
@@ -4878,7 +4878,7 @@ var StellarAccessControlService = class {
4878
4878
  };
4879
4879
  });
4880
4880
  const enrichedAssignments = await Promise.all(enrichmentPromises);
4881
- import_ui_builder_utils22.logger.debug(
4881
+ import_ui_utils22.logger.debug(
4882
4882
  "StellarAccessControlService.getCurrentRolesEnriched",
4883
4883
  `Enriched ${enrichedAssignments.length} role(s) with grant timestamps`
4884
4884
  );
@@ -4923,7 +4923,7 @@ var StellarAccessControlService = class {
4923
4923
  return { address };
4924
4924
  });
4925
4925
  } catch (error) {
4926
- import_ui_builder_utils22.logger.warn(
4926
+ import_ui_utils22.logger.warn(
4927
4927
  "StellarAccessControlService.enrichMembersWithGrantInfo",
4928
4928
  `Failed to fetch grant info for role ${roleId}, returning members without timestamps: ${error instanceof Error ? error.message : String(error)}`
4929
4929
  );
@@ -4945,12 +4945,12 @@ var StellarAccessControlService = class {
4945
4945
  async grantRole(contractAddress, roleId, account, executionConfig, onStatusChange, runtimeApiKey) {
4946
4946
  validateContractAddress(contractAddress);
4947
4947
  validateAccountAddress(account, "account");
4948
- import_ui_builder_utils22.logger.info(
4948
+ import_ui_utils22.logger.info(
4949
4949
  "StellarAccessControlService.grantRole",
4950
4950
  `Granting role ${roleId} to ${account} on ${contractAddress}`
4951
4951
  );
4952
4952
  const txData = assembleGrantRoleAction(contractAddress, roleId, account);
4953
- import_ui_builder_utils22.logger.debug("StellarAccessControlService.grantRole", "Transaction data prepared:", {
4953
+ import_ui_utils22.logger.debug("StellarAccessControlService.grantRole", "Transaction data prepared:", {
4954
4954
  contractAddress: txData.contractAddress,
4955
4955
  functionName: txData.functionName,
4956
4956
  argTypes: txData.argTypes
@@ -4962,7 +4962,7 @@ var StellarAccessControlService = class {
4962
4962
  onStatusChange,
4963
4963
  runtimeApiKey
4964
4964
  );
4965
- import_ui_builder_utils22.logger.info("StellarAccessControlService.grantRole", `Role granted. TxHash: ${result.txHash}`);
4965
+ import_ui_utils22.logger.info("StellarAccessControlService.grantRole", `Role granted. TxHash: ${result.txHash}`);
4966
4966
  return { id: result.txHash };
4967
4967
  }
4968
4968
  /**
@@ -4980,12 +4980,12 @@ var StellarAccessControlService = class {
4980
4980
  async revokeRole(contractAddress, roleId, account, executionConfig, onStatusChange, runtimeApiKey) {
4981
4981
  validateContractAddress(contractAddress);
4982
4982
  validateAccountAddress(account, "account");
4983
- import_ui_builder_utils22.logger.info(
4983
+ import_ui_utils22.logger.info(
4984
4984
  "StellarAccessControlService.revokeRole",
4985
4985
  `Revoking role ${roleId} from ${account} on ${contractAddress}`
4986
4986
  );
4987
4987
  const txData = assembleRevokeRoleAction(contractAddress, roleId, account);
4988
- import_ui_builder_utils22.logger.debug("StellarAccessControlService.revokeRole", "Transaction data prepared:", {
4988
+ import_ui_utils22.logger.debug("StellarAccessControlService.revokeRole", "Transaction data prepared:", {
4989
4989
  contractAddress: txData.contractAddress,
4990
4990
  functionName: txData.functionName,
4991
4991
  argTypes: txData.argTypes
@@ -4997,7 +4997,7 @@ var StellarAccessControlService = class {
4997
4997
  onStatusChange,
4998
4998
  runtimeApiKey
4999
4999
  );
5000
- import_ui_builder_utils22.logger.info("StellarAccessControlService.revokeRole", `Role revoked. TxHash: ${result.txHash}`);
5000
+ import_ui_utils22.logger.info("StellarAccessControlService.revokeRole", `Role revoked. TxHash: ${result.txHash}`);
5001
5001
  return { id: result.txHash };
5002
5002
  }
5003
5003
  /**
@@ -5034,21 +5034,21 @@ var StellarAccessControlService = class {
5034
5034
  async transferOwnership(contractAddress, newOwner, expirationLedger, executionConfig, onStatusChange, runtimeApiKey) {
5035
5035
  validateContractAddress(contractAddress);
5036
5036
  validateAddress(newOwner, "newOwner");
5037
- import_ui_builder_utils22.logger.info(
5037
+ import_ui_utils22.logger.info(
5038
5038
  "StellarAccessControlService.transferOwnership",
5039
5039
  `Initiating two-step ownership transfer to ${newOwner} on ${contractAddress} with expiration at ledger ${expirationLedger}`
5040
5040
  );
5041
5041
  const currentLedger = await getCurrentLedger(this.networkConfig);
5042
5042
  const validationResult = validateExpirationLedger(expirationLedger, currentLedger);
5043
5043
  if (!validationResult.valid) {
5044
- throw new import_ui_builder_types9.ConfigurationInvalid(
5044
+ throw new import_ui_types9.ConfigurationInvalid(
5045
5045
  validationResult.error || `Expiration ledger ${expirationLedger} must be strictly greater than current ledger ${currentLedger}.`,
5046
5046
  String(expirationLedger),
5047
5047
  "expirationLedger"
5048
5048
  );
5049
5049
  }
5050
5050
  const txData = assembleTransferOwnershipAction(contractAddress, newOwner, expirationLedger);
5051
- import_ui_builder_utils22.logger.debug("StellarAccessControlService.transferOwnership", "Transaction data prepared:", {
5051
+ import_ui_utils22.logger.debug("StellarAccessControlService.transferOwnership", "Transaction data prepared:", {
5052
5052
  contractAddress: txData.contractAddress,
5053
5053
  functionName: txData.functionName,
5054
5054
  argTypes: txData.argTypes,
@@ -5062,7 +5062,7 @@ var StellarAccessControlService = class {
5062
5062
  onStatusChange,
5063
5063
  runtimeApiKey
5064
5064
  );
5065
- import_ui_builder_utils22.logger.info(
5065
+ import_ui_utils22.logger.info(
5066
5066
  "StellarAccessControlService.transferOwnership",
5067
5067
  `Ownership transfer initiated. TxHash: ${result.txHash}, pending owner: ${newOwner}, expires at ledger: ${expirationLedger}`
5068
5068
  );
@@ -5096,12 +5096,12 @@ var StellarAccessControlService = class {
5096
5096
  */
5097
5097
  async acceptOwnership(contractAddress, executionConfig, onStatusChange, runtimeApiKey) {
5098
5098
  validateContractAddress(contractAddress);
5099
- import_ui_builder_utils22.logger.info(
5099
+ import_ui_utils22.logger.info(
5100
5100
  "StellarAccessControlService.acceptOwnership",
5101
5101
  `Accepting pending ownership transfer for ${contractAddress}`
5102
5102
  );
5103
5103
  const txData = assembleAcceptOwnershipAction(contractAddress);
5104
- import_ui_builder_utils22.logger.debug("StellarAccessControlService.acceptOwnership", "Transaction data prepared:", {
5104
+ import_ui_utils22.logger.debug("StellarAccessControlService.acceptOwnership", "Transaction data prepared:", {
5105
5105
  contractAddress: txData.contractAddress,
5106
5106
  functionName: txData.functionName
5107
5107
  });
@@ -5112,7 +5112,7 @@ var StellarAccessControlService = class {
5112
5112
  onStatusChange,
5113
5113
  runtimeApiKey
5114
5114
  );
5115
- import_ui_builder_utils22.logger.info(
5115
+ import_ui_utils22.logger.info(
5116
5116
  "StellarAccessControlService.acceptOwnership",
5117
5117
  `Ownership transfer accepted. TxHash: ${result.txHash}`
5118
5118
  );
@@ -5149,13 +5149,13 @@ var StellarAccessControlService = class {
5149
5149
  */
5150
5150
  async getAdminInfo(contractAddress) {
5151
5151
  validateContractAddress(contractAddress);
5152
- import_ui_builder_utils22.logger.info(
5152
+ import_ui_utils22.logger.info(
5153
5153
  "StellarAccessControlService.getAdminInfo",
5154
5154
  `Reading admin status for ${contractAddress}`
5155
5155
  );
5156
5156
  const currentAdmin = await getAdmin(contractAddress, this.networkConfig);
5157
5157
  if (currentAdmin === null) {
5158
- import_ui_builder_utils22.logger.debug(
5158
+ import_ui_utils22.logger.debug(
5159
5159
  "StellarAccessControlService.getAdminInfo",
5160
5160
  `Contract ${contractAddress} has renounced admin`
5161
5161
  );
@@ -5166,7 +5166,7 @@ var StellarAccessControlService = class {
5166
5166
  }
5167
5167
  const indexerAvailable = await this.indexerClient.checkAvailability();
5168
5168
  if (!indexerAvailable) {
5169
- import_ui_builder_utils22.logger.warn(
5169
+ import_ui_utils22.logger.warn(
5170
5170
  "StellarAccessControlService.getAdminInfo",
5171
5171
  `Indexer unavailable for ${this.networkConfig.id}: pending admin transfer status cannot be determined`
5172
5172
  );
@@ -5179,7 +5179,7 @@ var StellarAccessControlService = class {
5179
5179
  try {
5180
5180
  pendingTransfer = await this.indexerClient.queryPendingAdminTransfer(contractAddress);
5181
5181
  } catch (error) {
5182
- import_ui_builder_utils22.logger.warn(
5182
+ import_ui_utils22.logger.warn(
5183
5183
  "StellarAccessControlService.getAdminInfo",
5184
5184
  `Failed to query pending admin transfer: ${error instanceof Error ? error.message : String(error)}`
5185
5185
  );
@@ -5189,7 +5189,7 @@ var StellarAccessControlService = class {
5189
5189
  };
5190
5190
  }
5191
5191
  if (!pendingTransfer) {
5192
- import_ui_builder_utils22.logger.debug(
5192
+ import_ui_utils22.logger.debug(
5193
5193
  "StellarAccessControlService.getAdminInfo",
5194
5194
  `Contract ${contractAddress} has admin with no pending transfer`
5195
5195
  );
@@ -5202,7 +5202,7 @@ var StellarAccessControlService = class {
5202
5202
  try {
5203
5203
  currentLedger = await getCurrentLedger(this.networkConfig);
5204
5204
  } catch (error) {
5205
- import_ui_builder_utils22.logger.warn(
5205
+ import_ui_utils22.logger.warn(
5206
5206
  "StellarAccessControlService.getAdminInfo",
5207
5207
  `Failed to get current ledger: ${error instanceof Error ? error.message : String(error)}`
5208
5208
  );
@@ -5221,7 +5221,7 @@ var StellarAccessControlService = class {
5221
5221
  initiatedBlock: pendingTransfer.ledger
5222
5222
  };
5223
5223
  if (isExpired) {
5224
- import_ui_builder_utils22.logger.debug(
5224
+ import_ui_utils22.logger.debug(
5225
5225
  "StellarAccessControlService.getAdminInfo",
5226
5226
  `Contract ${contractAddress} has expired pending admin transfer (current: ${currentLedger}, expiration: ${liveUntilLedger})`
5227
5227
  );
@@ -5231,7 +5231,7 @@ var StellarAccessControlService = class {
5231
5231
  pendingTransfer: pendingTransferInfo
5232
5232
  };
5233
5233
  }
5234
- import_ui_builder_utils22.logger.debug(
5234
+ import_ui_utils22.logger.debug(
5235
5235
  "StellarAccessControlService.getAdminInfo",
5236
5236
  `Contract ${contractAddress} has pending admin transfer to ${pendingTransfer.pendingAdmin} (expires at ledger ${liveUntilLedger})`
5237
5237
  );
@@ -5275,21 +5275,21 @@ var StellarAccessControlService = class {
5275
5275
  async transferAdminRole(contractAddress, newAdmin, expirationLedger, executionConfig, onStatusChange, runtimeApiKey) {
5276
5276
  validateContractAddress(contractAddress);
5277
5277
  validateAddress(newAdmin, "newAdmin");
5278
- import_ui_builder_utils22.logger.info(
5278
+ import_ui_utils22.logger.info(
5279
5279
  "StellarAccessControlService.transferAdminRole",
5280
5280
  `Initiating two-step admin transfer to ${newAdmin} on ${contractAddress} with expiration at ledger ${expirationLedger}`
5281
5281
  );
5282
5282
  const currentLedger = await getCurrentLedger(this.networkConfig);
5283
5283
  const validationResult = validateExpirationLedger(expirationLedger, currentLedger);
5284
5284
  if (!validationResult.valid) {
5285
- throw new import_ui_builder_types9.ConfigurationInvalid(
5285
+ throw new import_ui_types9.ConfigurationInvalid(
5286
5286
  validationResult.error || `Expiration ledger ${expirationLedger} must be strictly greater than current ledger ${currentLedger}.`,
5287
5287
  String(expirationLedger),
5288
5288
  "expirationLedger"
5289
5289
  );
5290
5290
  }
5291
5291
  const txData = assembleTransferAdminRoleAction(contractAddress, newAdmin, expirationLedger);
5292
- import_ui_builder_utils22.logger.debug("StellarAccessControlService.transferAdminRole", "Transaction data prepared:", {
5292
+ import_ui_utils22.logger.debug("StellarAccessControlService.transferAdminRole", "Transaction data prepared:", {
5293
5293
  contractAddress: txData.contractAddress,
5294
5294
  functionName: txData.functionName,
5295
5295
  argTypes: txData.argTypes,
@@ -5303,7 +5303,7 @@ var StellarAccessControlService = class {
5303
5303
  onStatusChange,
5304
5304
  runtimeApiKey
5305
5305
  );
5306
- import_ui_builder_utils22.logger.info(
5306
+ import_ui_utils22.logger.info(
5307
5307
  "StellarAccessControlService.transferAdminRole",
5308
5308
  `Admin transfer initiated. TxHash: ${result.txHash}, pending admin: ${newAdmin}, expires at ledger: ${expirationLedger}`
5309
5309
  );
@@ -5337,12 +5337,12 @@ var StellarAccessControlService = class {
5337
5337
  */
5338
5338
  async acceptAdminTransfer(contractAddress, executionConfig, onStatusChange, runtimeApiKey) {
5339
5339
  validateContractAddress(contractAddress);
5340
- import_ui_builder_utils22.logger.info(
5340
+ import_ui_utils22.logger.info(
5341
5341
  "StellarAccessControlService.acceptAdminTransfer",
5342
5342
  `Accepting pending admin transfer for ${contractAddress}`
5343
5343
  );
5344
5344
  const txData = assembleAcceptAdminTransferAction(contractAddress);
5345
- import_ui_builder_utils22.logger.debug("StellarAccessControlService.acceptAdminTransfer", "Transaction data prepared:", {
5345
+ import_ui_utils22.logger.debug("StellarAccessControlService.acceptAdminTransfer", "Transaction data prepared:", {
5346
5346
  contractAddress: txData.contractAddress,
5347
5347
  functionName: txData.functionName
5348
5348
  });
@@ -5353,7 +5353,7 @@ var StellarAccessControlService = class {
5353
5353
  onStatusChange,
5354
5354
  runtimeApiKey
5355
5355
  );
5356
- import_ui_builder_utils22.logger.info(
5356
+ import_ui_utils22.logger.info(
5357
5357
  "StellarAccessControlService.acceptAdminTransfer",
5358
5358
  `Admin transfer accepted. TxHash: ${result.txHash}`
5359
5359
  );
@@ -5369,7 +5369,7 @@ var StellarAccessControlService = class {
5369
5369
  */
5370
5370
  async exportSnapshot(contractAddress) {
5371
5371
  validateContractAddress(contractAddress);
5372
- import_ui_builder_utils22.logger.info(
5372
+ import_ui_utils22.logger.info(
5373
5373
  "StellarAccessControlService.exportSnapshot",
5374
5374
  `Exporting snapshot for ${contractAddress}`
5375
5375
  );
@@ -5377,24 +5377,24 @@ var StellarAccessControlService = class {
5377
5377
  try {
5378
5378
  ownership = await this.getOwnership(contractAddress);
5379
5379
  } catch (error) {
5380
- import_ui_builder_utils22.logger.debug("StellarAccessControlService.exportSnapshot", "Ownership not available:", error);
5380
+ import_ui_utils22.logger.debug("StellarAccessControlService.exportSnapshot", "Ownership not available:", error);
5381
5381
  }
5382
5382
  let roles = [];
5383
5383
  try {
5384
5384
  roles = await this.getCurrentRoles(contractAddress);
5385
5385
  } catch (error) {
5386
- import_ui_builder_utils22.logger.debug("StellarAccessControlService.exportSnapshot", "Roles not available:", error);
5386
+ import_ui_utils22.logger.debug("StellarAccessControlService.exportSnapshot", "Roles not available:", error);
5387
5387
  }
5388
5388
  const snapshot = {
5389
5389
  roles,
5390
5390
  ownership
5391
5391
  };
5392
- if (!(0, import_ui_builder_utils22.validateSnapshot)(snapshot)) {
5392
+ if (!(0, import_ui_utils22.validateSnapshot)(snapshot)) {
5393
5393
  const errorMsg = `Invalid snapshot structure for contract ${contractAddress}`;
5394
- import_ui_builder_utils22.logger.error("StellarAccessControlService.exportSnapshot", errorMsg);
5395
- throw new import_ui_builder_types9.OperationFailed(errorMsg, contractAddress, "exportSnapshot");
5394
+ import_ui_utils22.logger.error("StellarAccessControlService.exportSnapshot", errorMsg);
5395
+ throw new import_ui_types9.OperationFailed(errorMsg, contractAddress, "exportSnapshot");
5396
5396
  }
5397
- import_ui_builder_utils22.logger.debug("StellarAccessControlService.exportSnapshot", "Snapshot created and validated:", {
5397
+ import_ui_utils22.logger.debug("StellarAccessControlService.exportSnapshot", "Snapshot created and validated:", {
5398
5398
  hasOwnership: !!ownership?.owner,
5399
5399
  roleCount: roles.length,
5400
5400
  totalMembers: roles.reduce((sum, r) => sum + r.members.length, 0)
@@ -5417,14 +5417,14 @@ var StellarAccessControlService = class {
5417
5417
  if (options?.account) {
5418
5418
  validateAccountAddress(options.account, "options.account");
5419
5419
  }
5420
- import_ui_builder_utils22.logger.info(
5420
+ import_ui_utils22.logger.info(
5421
5421
  "StellarAccessControlService.getHistory",
5422
5422
  `Fetching history for ${contractAddress}`,
5423
5423
  options
5424
5424
  );
5425
5425
  const isAvailable = await this.indexerClient.checkAvailability();
5426
5426
  if (!isAvailable) {
5427
- import_ui_builder_utils22.logger.warn(
5427
+ import_ui_utils22.logger.warn(
5428
5428
  "StellarAccessControlService.getHistory",
5429
5429
  `Indexer not available for network ${this.networkConfig.id}, returning empty history`
5430
5430
  );
@@ -5444,7 +5444,7 @@ var StellarAccessControlService = class {
5444
5444
  */
5445
5445
  async getAdminAccount(contractAddress) {
5446
5446
  validateContractAddress(contractAddress);
5447
- import_ui_builder_utils22.logger.info(
5447
+ import_ui_utils22.logger.info(
5448
5448
  "StellarAccessControlService.getAdminAccount",
5449
5449
  `Reading admin for ${contractAddress}`
5450
5450
  );
@@ -5467,40 +5467,40 @@ var StellarAccessControlService = class {
5467
5467
  validateContractAddress(contractAddress);
5468
5468
  const context = this.contractContexts.get(contractAddress);
5469
5469
  if (!context) {
5470
- throw new import_ui_builder_types9.ConfigurationInvalid(
5470
+ throw new import_ui_types9.ConfigurationInvalid(
5471
5471
  "Contract not registered. Call registerContract() first.",
5472
5472
  contractAddress,
5473
5473
  "contractAddress"
5474
5474
  );
5475
5475
  }
5476
5476
  if (context.knownRoleIds && context.knownRoleIds.length > 0) {
5477
- import_ui_builder_utils22.logger.debug(
5477
+ import_ui_utils22.logger.debug(
5478
5478
  "StellarAccessControlService.discoverKnownRoleIds",
5479
5479
  `Using ${context.knownRoleIds.length} explicitly provided role IDs for ${contractAddress}`
5480
5480
  );
5481
5481
  return context.knownRoleIds;
5482
5482
  }
5483
5483
  if (context.discoveredRoleIds) {
5484
- import_ui_builder_utils22.logger.debug(
5484
+ import_ui_utils22.logger.debug(
5485
5485
  "StellarAccessControlService.discoverKnownRoleIds",
5486
5486
  `Using ${context.discoveredRoleIds.length} cached discovered role IDs for ${contractAddress}`
5487
5487
  );
5488
5488
  return context.discoveredRoleIds;
5489
5489
  }
5490
5490
  if (context.roleDiscoveryAttempted) {
5491
- import_ui_builder_utils22.logger.debug(
5491
+ import_ui_utils22.logger.debug(
5492
5492
  "StellarAccessControlService.discoverKnownRoleIds",
5493
5493
  `Discovery already attempted for ${contractAddress}, returning empty array`
5494
5494
  );
5495
5495
  return [];
5496
5496
  }
5497
- import_ui_builder_utils22.logger.info(
5497
+ import_ui_utils22.logger.info(
5498
5498
  "StellarAccessControlService.discoverKnownRoleIds",
5499
5499
  `Discovering role IDs via indexer for ${contractAddress}`
5500
5500
  );
5501
5501
  const isAvailable = await this.indexerClient.checkAvailability();
5502
5502
  if (!isAvailable) {
5503
- import_ui_builder_utils22.logger.warn(
5503
+ import_ui_utils22.logger.warn(
5504
5504
  "StellarAccessControlService.discoverKnownRoleIds",
5505
5505
  `Indexer not available for network ${this.networkConfig.id}, cannot discover roles`
5506
5506
  );
@@ -5511,14 +5511,14 @@ var StellarAccessControlService = class {
5511
5511
  const roleIds = await this.indexerClient.discoverRoleIds(contractAddress);
5512
5512
  context.discoveredRoleIds = roleIds;
5513
5513
  context.roleDiscoveryAttempted = true;
5514
- import_ui_builder_utils22.logger.info(
5514
+ import_ui_utils22.logger.info(
5515
5515
  "StellarAccessControlService.discoverKnownRoleIds",
5516
5516
  `Discovered ${roleIds.length} role(s) for ${contractAddress}`,
5517
5517
  { roles: roleIds }
5518
5518
  );
5519
5519
  return roleIds;
5520
5520
  } catch (error) {
5521
- import_ui_builder_utils22.logger.error(
5521
+ import_ui_utils22.logger.error(
5522
5522
  "StellarAccessControlService.discoverKnownRoleIds",
5523
5523
  `Failed to discover roles: ${error instanceof Error ? error.message : String(error)}`
5524
5524
  );
@@ -5539,7 +5539,7 @@ var StellarAccessControlService = class {
5539
5539
  */
5540
5540
  dispose() {
5541
5541
  this.indexerClient.dispose();
5542
- import_ui_builder_utils22.logger.debug("StellarAccessControlService.dispose", "Service disposed");
5542
+ import_ui_utils22.logger.debug("StellarAccessControlService.dispose", "Service disposed");
5543
5543
  }
5544
5544
  };
5545
5545
  function createStellarAccessControlService(networkConfig) {
@@ -5547,19 +5547,19 @@ function createStellarAccessControlService(networkConfig) {
5547
5547
  }
5548
5548
 
5549
5549
  // src/configuration/network-services.ts
5550
- var import_ui_builder_utils24 = require("@openzeppelin/ui-builder-utils");
5550
+ var import_ui_utils24 = require("@openzeppelin/ui-utils");
5551
5551
 
5552
5552
  // src/configuration/rpc.ts
5553
- var import_ui_builder_utils23 = require("@openzeppelin/ui-builder-utils");
5553
+ var import_ui_utils23 = require("@openzeppelin/ui-utils");
5554
5554
  function validateStellarRpcEndpoint(rpcConfig) {
5555
5555
  try {
5556
- if (!(0, import_ui_builder_utils23.isValidUrl)(rpcConfig.url)) {
5557
- import_ui_builder_utils23.logger.error("validateStellarRpcEndpoint", `Invalid RPC URL format: ${rpcConfig.url}`);
5556
+ if (!(0, import_ui_utils23.isValidUrl)(rpcConfig.url)) {
5557
+ import_ui_utils23.logger.error("validateStellarRpcEndpoint", `Invalid RPC URL format: ${rpcConfig.url}`);
5558
5558
  return false;
5559
5559
  }
5560
5560
  return true;
5561
5561
  } catch (error) {
5562
- import_ui_builder_utils23.logger.error("validateStellarRpcEndpoint", "Error validating RPC endpoint:", error);
5562
+ import_ui_utils23.logger.error("validateStellarRpcEndpoint", "Error validating RPC endpoint:", error);
5563
5563
  return false;
5564
5564
  }
5565
5565
  }
@@ -5607,7 +5607,7 @@ async function testStellarRpcConnection(rpcConfig, timeoutMs = 5e3) {
5607
5607
  }
5608
5608
  return { success: true, latency };
5609
5609
  } catch (error) {
5610
- import_ui_builder_utils23.logger.error("testStellarRpcConnection", "Connection test failed:", error);
5610
+ import_ui_utils23.logger.error("testStellarRpcConnection", "Connection test failed:", error);
5611
5611
  if (error instanceof Error && error.name === "AbortError") {
5612
5612
  return {
5613
5613
  success: false,
@@ -5718,12 +5718,12 @@ async function validateStellarNetworkServiceConfig(serviceId, values) {
5718
5718
  }
5719
5719
  if (serviceId === "indexer") {
5720
5720
  if (values.indexerUri !== void 0 && values.indexerUri !== null && values.indexerUri !== "") {
5721
- if (!(0, import_ui_builder_utils24.isValidUrl)(String(values.indexerUri))) {
5721
+ if (!(0, import_ui_utils24.isValidUrl)(String(values.indexerUri))) {
5722
5722
  return false;
5723
5723
  }
5724
5724
  }
5725
5725
  if (values.indexerWsUri !== void 0 && values.indexerWsUri !== null && values.indexerWsUri !== "") {
5726
- if (!(0, import_ui_builder_utils24.isValidUrl)(String(values.indexerWsUri))) {
5726
+ if (!(0, import_ui_utils24.isValidUrl)(String(values.indexerWsUri))) {
5727
5727
  return false;
5728
5728
  }
5729
5729
  }
@@ -5744,7 +5744,7 @@ async function testStellarNetworkServiceConnection(serviceId, values) {
5744
5744
  if (!indexerUri || typeof indexerUri !== "string" || indexerUri.trim() === "") {
5745
5745
  return { success: true };
5746
5746
  }
5747
- if (!(0, import_ui_builder_utils24.isValidUrl)(indexerUri)) {
5747
+ if (!(0, import_ui_utils24.isValidUrl)(indexerUri)) {
5748
5748
  return { success: false, error: "Invalid indexer URI format" };
5749
5749
  }
5750
5750
  try {
@@ -5787,10 +5787,10 @@ async function testStellarNetworkServiceConnection(serviceId, values) {
5787
5787
 
5788
5788
  // src/contract/loader.ts
5789
5789
  var StellarSdk2 = __toESM(require("@stellar/stellar-sdk"), 1);
5790
- var import_ui_builder_utils31 = require("@openzeppelin/ui-builder-utils");
5790
+ var import_ui_utils31 = require("@openzeppelin/ui-utils");
5791
5791
 
5792
5792
  // src/validation/eoa.ts
5793
- var import_ui_builder_utils25 = require("@openzeppelin/ui-builder-utils");
5793
+ var import_ui_utils25 = require("@openzeppelin/ui-utils");
5794
5794
  var SYSTEM_LOG_TAG8 = "StellarEoaValidator";
5795
5795
  async function validateEoaConfig(config, walletStatus) {
5796
5796
  if (!config.allowAny) {
@@ -5805,7 +5805,7 @@ async function validateEoaConfig(config, walletStatus) {
5805
5805
  return `Connected wallet address (${walletStatus.address}) does not match the required specific Stellar address (${config.specificAddress}). Please connect the correct wallet.`;
5806
5806
  }
5807
5807
  } else if (walletStatus.isConnected && !walletStatus.address) {
5808
- import_ui_builder_utils25.logger.warn(
5808
+ import_ui_utils25.logger.warn(
5809
5809
  SYSTEM_LOG_TAG8,
5810
5810
  "Wallet is connected but address is unavailable for Stellar EOA validation."
5811
5811
  );
@@ -5845,7 +5845,7 @@ function getStellarExplorerTxUrl(txHash, networkConfig) {
5845
5845
 
5846
5846
  // src/mapping/struct-fields.ts
5847
5847
  var import_stellar_sdk13 = require("@stellar/stellar-sdk");
5848
- var import_ui_builder_utils26 = require("@openzeppelin/ui-builder-utils");
5848
+ var import_ui_utils26 = require("@openzeppelin/ui-utils");
5849
5849
  function extractStructFields(entries, structName) {
5850
5850
  try {
5851
5851
  const entry = entries.find((e) => {
@@ -5882,7 +5882,7 @@ function extractStructFields(entries, structName) {
5882
5882
  }
5883
5883
  return null;
5884
5884
  } catch (error) {
5885
- import_ui_builder_utils26.logger.error(
5885
+ import_ui_utils26.logger.error(
5886
5886
  "extractStructFields",
5887
5887
  `Failed to extract struct fields for ${structName}:`,
5888
5888
  error
@@ -5907,16 +5907,16 @@ function isStructType2(entries, typeName) {
5907
5907
  const isStruct = entryKind.value === import_stellar_sdk13.xdr.ScSpecEntryKind.scSpecEntryUdtStructV0().value;
5908
5908
  return isStruct;
5909
5909
  } catch (error) {
5910
- import_ui_builder_utils26.logger.error("isStructType", `Failed to check if ${typeName} is struct:`, error);
5910
+ import_ui_utils26.logger.error("isStructType", `Failed to check if ${typeName} is struct:`, error);
5911
5911
  return false;
5912
5912
  }
5913
5913
  }
5914
5914
 
5915
5915
  // src/sac/spec-cache.ts
5916
- var import_ui_builder_utils29 = require("@openzeppelin/ui-builder-utils");
5916
+ var import_ui_utils29 = require("@openzeppelin/ui-utils");
5917
5917
 
5918
5918
  // src/sac/spec-source.ts
5919
- var import_ui_builder_utils27 = require("@openzeppelin/ui-builder-utils");
5919
+ var import_ui_utils27 = require("@openzeppelin/ui-utils");
5920
5920
  var DEFAULT_SPEC = {
5921
5921
  repo: "stellar/stellar-asset-contract-spec",
5922
5922
  path: "refs/heads/main",
@@ -5937,7 +5937,7 @@ async function fetchSacSpecJson(cfg = {}) {
5937
5937
  }
5938
5938
  return await res.text();
5939
5939
  } catch (error) {
5940
- import_ui_builder_utils27.logger.error("stellar:sac:spec-source", "Failed to fetch SAC spec:", url, error);
5940
+ import_ui_utils27.logger.error("stellar:sac:spec-source", "Failed to fetch SAC spec:", url, error);
5941
5941
  throw new Error("Failed to load Stellar Asset Contract spec. Please try again later.");
5942
5942
  }
5943
5943
  }
@@ -5946,7 +5946,7 @@ async function fetchSacSpecJson(cfg = {}) {
5946
5946
  var import_stellar_sdk14 = require("@stellar/stellar-sdk");
5947
5947
  var import_package = __toESM(require("@stellar/stellar-xdr-json/package.json"), 1);
5948
5948
  var import_lossless_json = require("lossless-json");
5949
- var import_ui_builder_utils28 = require("@openzeppelin/ui-builder-utils");
5949
+ var import_ui_utils28 = require("@openzeppelin/ui-utils");
5950
5950
  var stellarXdrJsonVersion = import_package.default.version ?? "23.0.0";
5951
5951
  var CDN_WASM_URL = `https://unpkg.com/@stellar/stellar-xdr-json@${stellarXdrJsonVersion}/stellar_xdr_json_bg.wasm`;
5952
5952
  var initialized = false;
@@ -5960,7 +5960,7 @@ async function ensureXdrJsonInitialized() {
5960
5960
  encode = stellarXdrJson.encode;
5961
5961
  initialized = true;
5962
5962
  } catch (error) {
5963
- import_ui_builder_utils28.logger.error("stellar:sac:xdr", "Failed to initialize WASM module:", error);
5963
+ import_ui_utils28.logger.error("stellar:sac:xdr", "Failed to initialize WASM module:", error);
5964
5964
  throw error;
5965
5965
  }
5966
5966
  }
@@ -5982,7 +5982,7 @@ async function encodeSacSpecEntries(jsonString) {
5982
5982
  }
5983
5983
  return result;
5984
5984
  } catch (error) {
5985
- import_ui_builder_utils28.logger.error("stellar:sac:xdr", "Failed to encode SAC spec to XDR", error);
5985
+ import_ui_utils28.logger.error("stellar:sac:xdr", "Failed to encode SAC spec to XDR", error);
5986
5986
  throw new Error("Failed to process SAC spec.");
5987
5987
  }
5988
5988
  }
@@ -5997,7 +5997,7 @@ async function getSacSpecArtifacts(cfg = {}) {
5997
5997
  const cacheKey = getSacSpecUrl(cfg);
5998
5998
  const cached = sacSpecCache.get(cacheKey);
5999
5999
  if (cached) {
6000
- import_ui_builder_utils29.logger.debug("stellar:sac:spec-cache", "Returning cached SAC spec artifacts");
6000
+ import_ui_utils29.logger.debug("stellar:sac:spec-cache", "Returning cached SAC spec artifacts");
6001
6001
  return cached;
6002
6002
  }
6003
6003
  const inflight = sacSpecInflight.get(cacheKey);
@@ -6014,7 +6014,7 @@ async function getSacSpecArtifacts(cfg = {}) {
6014
6014
  };
6015
6015
  sacSpecCache.set(cacheKey, entry);
6016
6016
  sacSpecInflight.delete(cacheKey);
6017
- import_ui_builder_utils29.logger.debug("stellar:sac:spec-cache", "Cached SAC spec artifacts for future re-use");
6017
+ import_ui_utils29.logger.debug("stellar:sac:spec-cache", "Cached SAC spec artifacts for future re-use");
6018
6018
  return entry;
6019
6019
  })().catch((error) => {
6020
6020
  sacSpecInflight.delete(cacheKey);
@@ -6026,9 +6026,9 @@ async function getSacSpecArtifacts(cfg = {}) {
6026
6026
 
6027
6027
  // src/contract/type.ts
6028
6028
  var import_stellar_sdk15 = require("@stellar/stellar-sdk");
6029
- var import_ui_builder_utils30 = require("@openzeppelin/ui-builder-utils");
6029
+ var import_ui_utils30 = require("@openzeppelin/ui-utils");
6030
6030
  function getSorobanRpcServer3(networkConfig) {
6031
- const customRpcConfig = import_ui_builder_utils30.userRpcConfigService.getUserRpcConfig(networkConfig.id);
6031
+ const customRpcConfig = import_ui_utils30.userRpcConfigService.getUserRpcConfig(networkConfig.id);
6032
6032
  const rpcUrl = customRpcConfig?.url || networkConfig.sorobanRpcUrl;
6033
6033
  if (!rpcUrl) {
6034
6034
  throw new Error(`No Soroban RPC URL available for network ${networkConfig.name}`);
@@ -6059,7 +6059,7 @@ async function getStellarContractType(contractId, networkConfig) {
6059
6059
  if (detected === execStellarAssetType) return "contractExecutableStellarAsset";
6060
6060
  return null;
6061
6061
  } catch (error) {
6062
- import_ui_builder_utils30.logger.error("stellar:contract-type", "Failed to detect contract type:", error);
6062
+ import_ui_utils30.logger.error("stellar:contract-type", "Failed to detect contract type:", error);
6063
6063
  throw new Error(
6064
6064
  `Something went wrong getting contract type by contract ID. ${error.message}`
6065
6065
  );
@@ -6068,7 +6068,7 @@ async function getStellarContractType(contractId, networkConfig) {
6068
6068
 
6069
6069
  // src/contract/loader.ts
6070
6070
  async function loadStellarContractFromAddress(contractAddress, networkConfig) {
6071
- import_ui_builder_utils31.logger.info("loadStellarContractFromAddress", "Loading contract:", {
6071
+ import_ui_utils31.logger.info("loadStellarContractFromAddress", "Loading contract:", {
6072
6072
  contractAddress,
6073
6073
  network: networkConfig.name,
6074
6074
  rpcUrl: networkConfig.sorobanRpcUrl,
@@ -6099,7 +6099,7 @@ async function loadStellarContractFromAddress(contractAddress, networkConfig) {
6099
6099
  };
6100
6100
  }
6101
6101
  } catch (e) {
6102
- import_ui_builder_utils31.logger.warn(
6102
+ import_ui_utils31.logger.warn(
6103
6103
  "loadStellarContractFromAddress",
6104
6104
  "SAC detection failed, falling back to regular client:",
6105
6105
  e
@@ -6116,12 +6116,12 @@ async function loadStellarContractFromAddress(contractAddress, networkConfig) {
6116
6116
  const message = e?.message || String(e);
6117
6117
  if (message.includes("Cannot destructure property 'length'")) {
6118
6118
  const friendly = "Unable to fetch contract metadata from RPC. The contract appears to have no published Wasm/definition on this network.";
6119
- import_ui_builder_utils31.logger.error("loadStellarContractFromAddress", friendly);
6119
+ import_ui_utils31.logger.error("loadStellarContractFromAddress", friendly);
6120
6120
  throw new Error(`NO_WASM: ${friendly}`);
6121
6121
  }
6122
6122
  throw e;
6123
6123
  }
6124
- import_ui_builder_utils31.logger.info("loadStellarContractFromAddress", "Contract client created successfully");
6124
+ import_ui_utils31.logger.info("loadStellarContractFromAddress", "Contract client created successfully");
6125
6125
  let specEntries = [];
6126
6126
  try {
6127
6127
  if (contractClient.spec && typeof contractClient.spec === "object") {
@@ -6136,20 +6136,20 @@ async function loadStellarContractFromAddress(contractAddress, networkConfig) {
6136
6136
  try {
6137
6137
  specEntries = spec.entries();
6138
6138
  } catch (e) {
6139
- import_ui_builder_utils31.logger.warn("loadStellarContractFromAddress", "entries() method failed:", e);
6139
+ import_ui_utils31.logger.warn("loadStellarContractFromAddress", "entries() method failed:", e);
6140
6140
  }
6141
6141
  }
6142
6142
  if (specEntries.length === 0 && typeof spec.entries === "function") {
6143
6143
  try {
6144
6144
  specEntries = spec.entries();
6145
6145
  } catch (e) {
6146
- import_ui_builder_utils31.logger.warn("loadStellarContractFromAddress", "direct entries() method failed:", e);
6146
+ import_ui_utils31.logger.warn("loadStellarContractFromAddress", "direct entries() method failed:", e);
6147
6147
  }
6148
6148
  }
6149
- import_ui_builder_utils31.logger.info("loadStellarContractFromAddress", `Found ${specEntries.length} spec entries`);
6149
+ import_ui_utils31.logger.info("loadStellarContractFromAddress", `Found ${specEntries.length} spec entries`);
6150
6150
  }
6151
6151
  } catch (specError) {
6152
- import_ui_builder_utils31.logger.warn("loadStellarContractFromAddress", "Could not extract spec entries:", specError);
6152
+ import_ui_utils31.logger.warn("loadStellarContractFromAddress", "Could not extract spec entries:", specError);
6153
6153
  }
6154
6154
  const functions = await extractFunctionsFromSpec(
6155
6155
  contractClient.spec,
@@ -6157,7 +6157,7 @@ async function loadStellarContractFromAddress(contractAddress, networkConfig) {
6157
6157
  specEntries,
6158
6158
  networkConfig
6159
6159
  );
6160
- import_ui_builder_utils31.logger.info(
6160
+ import_ui_utils31.logger.info(
6161
6161
  "loadStellarContractFromAddress",
6162
6162
  `Successfully extracted ${functions.length} functions`
6163
6163
  );
@@ -6172,28 +6172,28 @@ async function loadStellarContractFromAddress(contractAddress, networkConfig) {
6172
6172
  } catch (error) {
6173
6173
  const msg = error?.message || String(error);
6174
6174
  if (msg.startsWith("NO_WASM:")) {
6175
- import_ui_builder_utils31.logger.error("loadStellarContractFromAddress", msg);
6175
+ import_ui_utils31.logger.error("loadStellarContractFromAddress", msg);
6176
6176
  throw new Error(msg);
6177
6177
  }
6178
- import_ui_builder_utils31.logger.error("loadStellarContractFromAddress", "Failed to load contract:", error);
6178
+ import_ui_utils31.logger.error("loadStellarContractFromAddress", "Failed to load contract:", error);
6179
6179
  throw new Error(`Failed to load contract: ${msg}`);
6180
6180
  }
6181
6181
  }
6182
6182
  async function extractFunctionsFromSpec(spec, contractAddress, specEntries, networkConfig) {
6183
6183
  try {
6184
6184
  const specFunctions = spec.funcs();
6185
- import_ui_builder_utils31.logger.info("extractFunctionsFromSpec", `Found ${specFunctions.length} functions in spec`);
6185
+ import_ui_utils31.logger.info("extractFunctionsFromSpec", `Found ${specFunctions.length} functions in spec`);
6186
6186
  return await Promise.all(
6187
6187
  specFunctions.map(async (func, index) => {
6188
6188
  try {
6189
6189
  const functionName = func.name().toString();
6190
- import_ui_builder_utils31.logger.info("extractFunctionsFromSpec", `Processing function: ${functionName}`);
6190
+ import_ui_utils31.logger.info("extractFunctionsFromSpec", `Processing function: ${functionName}`);
6191
6191
  const inputs = func.inputs().map((input, inputIndex) => {
6192
6192
  try {
6193
6193
  const inputName = input.name().toString();
6194
6194
  const inputType = extractSorobanTypeFromScSpec(input.type());
6195
6195
  if (inputType === "unknown") {
6196
- import_ui_builder_utils31.logger.warn(
6196
+ import_ui_utils31.logger.warn(
6197
6197
  "extractFunctionsFromSpec",
6198
6198
  `Unknown type for parameter "${inputName}" in function "${functionName}"`
6199
6199
  );
@@ -6203,12 +6203,12 @@ async function extractFunctionsFromSpec(spec, contractAddress, specEntries, netw
6203
6203
  const structFields = extractStructFields(specEntries, inputType);
6204
6204
  if (structFields && structFields.length > 0) {
6205
6205
  components = structFields;
6206
- import_ui_builder_utils31.logger.debug(
6206
+ import_ui_utils31.logger.debug(
6207
6207
  "extractFunctionsFromSpec",
6208
6208
  `Extracted ${structFields.length} fields for struct type "${inputType}": ${structFields.map((f) => `${f.name}:${f.type}`).join(", ")}`
6209
6209
  );
6210
6210
  } else {
6211
- import_ui_builder_utils31.logger.warn(
6211
+ import_ui_utils31.logger.warn(
6212
6212
  "extractFunctionsFromSpec",
6213
6213
  `No fields extracted for struct "${inputType}"`
6214
6214
  );
@@ -6220,7 +6220,7 @@ async function extractFunctionsFromSpec(spec, contractAddress, specEntries, netw
6220
6220
  ...components && { components }
6221
6221
  };
6222
6222
  } catch (error) {
6223
- import_ui_builder_utils31.logger.warn(
6223
+ import_ui_utils31.logger.warn(
6224
6224
  "extractFunctionsFromSpec",
6225
6225
  `Failed to parse input ${inputIndex}:`,
6226
6226
  error
@@ -6239,7 +6239,7 @@ async function extractFunctionsFromSpec(spec, contractAddress, specEntries, netw
6239
6239
  type: outputType
6240
6240
  };
6241
6241
  } catch (error) {
6242
- import_ui_builder_utils31.logger.warn(
6242
+ import_ui_utils31.logger.warn(
6243
6243
  "extractFunctionsFromSpec",
6244
6244
  `Failed to parse output ${outputIndex}:`,
6245
6245
  error
@@ -6255,7 +6255,7 @@ async function extractFunctionsFromSpec(spec, contractAddress, specEntries, netw
6255
6255
  if (networkConfig) {
6256
6256
  try {
6257
6257
  const inputTypes = inputs.map((input) => input.type);
6258
- import_ui_builder_utils31.logger.debug(
6258
+ import_ui_utils31.logger.debug(
6259
6259
  "extractFunctionsFromSpec",
6260
6260
  `Checking state mutability for ${functionName} with input types: ${inputTypes.join(", ")}`
6261
6261
  );
@@ -6266,20 +6266,20 @@ async function extractFunctionsFromSpec(spec, contractAddress, specEntries, netw
6266
6266
  inputTypes
6267
6267
  );
6268
6268
  stateMutability = modifiesState ? "nonpayable" : "view";
6269
- import_ui_builder_utils31.logger.info(
6269
+ import_ui_utils31.logger.info(
6270
6270
  "extractFunctionsFromSpec",
6271
6271
  `Function ${functionName} state mutability determined:`,
6272
6272
  { modifiesState, stateMutability }
6273
6273
  );
6274
6274
  } catch (error) {
6275
- import_ui_builder_utils31.logger.warn(
6275
+ import_ui_utils31.logger.warn(
6276
6276
  "extractFunctionsFromSpec",
6277
6277
  `Failed to determine state mutability for ${functionName}, assuming it modifies state:`,
6278
6278
  error
6279
6279
  );
6280
6280
  }
6281
6281
  } else {
6282
- import_ui_builder_utils31.logger.warn(
6282
+ import_ui_utils31.logger.warn(
6283
6283
  "extractFunctionsFromSpec",
6284
6284
  `No network config provided for ${functionName}, assuming it modifies state`
6285
6285
  );
@@ -6297,7 +6297,7 @@ async function extractFunctionsFromSpec(spec, contractAddress, specEntries, netw
6297
6297
  stateMutability
6298
6298
  };
6299
6299
  } catch (error) {
6300
- import_ui_builder_utils31.logger.error("extractFunctionsFromSpec", `Failed to process function ${index}:`, error);
6300
+ import_ui_utils31.logger.error("extractFunctionsFromSpec", `Failed to process function ${index}:`, error);
6301
6301
  return {
6302
6302
  id: `function_${index}`,
6303
6303
  name: `function_${index}`,
@@ -6313,7 +6313,7 @@ async function extractFunctionsFromSpec(spec, contractAddress, specEntries, netw
6313
6313
  })
6314
6314
  );
6315
6315
  } catch (error) {
6316
- import_ui_builder_utils31.logger.error("extractFunctionsFromSpec", "Failed to extract functions from spec:", error);
6316
+ import_ui_utils31.logger.error("extractFunctionsFromSpec", "Failed to extract functions from spec:", error);
6317
6317
  throw new Error(`Failed to extract functions: ${error.message}`);
6318
6318
  }
6319
6319
  }
@@ -6373,17 +6373,17 @@ async function loadStellarContractWithMetadata(artifacts, networkConfig) {
6373
6373
 
6374
6374
  // src/transaction/components/StellarRelayerOptions.tsx
6375
6375
  var import_react3 = __toESM(require("react"), 1);
6376
- var import_ui_builder_ui4 = require("@openzeppelin/ui-builder-ui");
6376
+ var import_ui_components4 = require("@openzeppelin/ui-components");
6377
6377
 
6378
6378
  // src/transaction/components/AdvancedInfo.tsx
6379
6379
  var import_lucide_react = require("lucide-react");
6380
- var import_ui_builder_ui = require("@openzeppelin/ui-builder-ui");
6380
+ var import_ui_components = require("@openzeppelin/ui-components");
6381
6381
  var import_jsx_runtime2 = require("react/jsx-runtime");
6382
6382
  var AdvancedInfo = ({ showAdvancedInfo, onToggle }) => {
6383
6383
  return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "space-y-2", children: [
6384
6384
  /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "flex items-center justify-between", children: [
6385
6385
  /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("label", { className: "text-base font-medium", children: "Stellar Transaction Configuration" }),
6386
- /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_ui_builder_ui.Button, { variant: "ghost", size: "sm", onClick: onToggle, className: "text-xs", type: "button", children: [
6386
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_ui_components.Button, { variant: "ghost", size: "sm", onClick: onToggle, className: "text-xs", type: "button", children: [
6387
6387
  /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_lucide_react.Info, { className: "h-3 w-3 mr-1" }),
6388
6388
  "Stellar Options"
6389
6389
  ] })
@@ -6401,7 +6401,7 @@ var AdvancedInfo = ({ showAdvancedInfo, onToggle }) => {
6401
6401
  };
6402
6402
 
6403
6403
  // src/transaction/components/FeeConfiguration.tsx
6404
- var import_ui_builder_ui2 = require("@openzeppelin/ui-builder-ui");
6404
+ var import_ui_components2 = require("@openzeppelin/ui-components");
6405
6405
  var import_jsx_runtime3 = require("react/jsx-runtime");
6406
6406
  var FeeConfiguration = ({
6407
6407
  control,
@@ -6409,7 +6409,7 @@ var FeeConfiguration = ({
6409
6409
  }) => {
6410
6410
  return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "space-y-4", children: [
6411
6411
  /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
6412
- import_ui_builder_ui2.NumberField,
6412
+ import_ui_components2.NumberField,
6413
6413
  {
6414
6414
  id: "maxFee",
6415
6415
  label: "Maximum Fee (stroops)",
@@ -6422,7 +6422,7 @@ var FeeConfiguration = ({
6422
6422
  }
6423
6423
  ),
6424
6424
  !showBasicFeeOnly && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
6425
- import_ui_builder_ui2.BooleanField,
6425
+ import_ui_components2.BooleanField,
6426
6426
  {
6427
6427
  id: "feeBump",
6428
6428
  label: "Enable Fee Bump",
@@ -6436,7 +6436,7 @@ var FeeConfiguration = ({
6436
6436
 
6437
6437
  // src/transaction/components/TransactionTiming.tsx
6438
6438
  var import_react_hook_form = require("react-hook-form");
6439
- var import_ui_builder_ui3 = require("@openzeppelin/ui-builder-ui");
6439
+ var import_ui_components3 = require("@openzeppelin/ui-components");
6440
6440
  var import_jsx_runtime4 = require("react/jsx-runtime");
6441
6441
  var TransactionTiming = ({ control }) => {
6442
6442
  const getOneHourFromNow = () => {
@@ -6451,7 +6451,7 @@ var TransactionTiming = ({ control }) => {
6451
6451
  };
6452
6452
  return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "space-y-4", children: [
6453
6453
  /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
6454
- import_ui_builder_ui3.DateTimeField,
6454
+ import_ui_components3.DateTimeField,
6455
6455
  {
6456
6456
  id: "validUntil",
6457
6457
  label: "Transaction Expiration",
@@ -6468,7 +6468,7 @@ var TransactionTiming = ({ control }) => {
6468
6468
  control,
6469
6469
  render: ({ field }) => /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
6470
6470
  /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
6471
- import_ui_builder_ui3.Button,
6471
+ import_ui_components3.Button,
6472
6472
  {
6473
6473
  type: "button",
6474
6474
  variant: "outline",
@@ -6479,7 +6479,7 @@ var TransactionTiming = ({ control }) => {
6479
6479
  }
6480
6480
  ),
6481
6481
  /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
6482
- import_ui_builder_ui3.Button,
6482
+ import_ui_components3.Button,
6483
6483
  {
6484
6484
  type: "button",
6485
6485
  variant: "outline",
@@ -6490,7 +6490,7 @@ var TransactionTiming = ({ control }) => {
6490
6490
  }
6491
6491
  ),
6492
6492
  /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
6493
- import_ui_builder_ui3.Button,
6493
+ import_ui_components3.Button,
6494
6494
  {
6495
6495
  type: "button",
6496
6496
  variant: "outline",
@@ -6595,13 +6595,13 @@ var StellarRelayerOptions = ({ options, onChange }) => {
6595
6595
  onToggle: () => setShowAdvancedInfo(!showAdvancedInfo)
6596
6596
  }
6597
6597
  ),
6598
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_ui_builder_ui4.Tabs, { value: configMode, onValueChange: handleModeChange, children: [
6599
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_ui_builder_ui4.TabsList, { className: "grid w-full grid-cols-2", children: [
6600
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_ui_builder_ui4.TabsTrigger, { value: "basic", children: "Basic" }),
6601
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_ui_builder_ui4.TabsTrigger, { value: "advanced", children: "Advanced" })
6598
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_ui_components4.Tabs, { value: configMode, onValueChange: handleModeChange, children: [
6599
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_ui_components4.TabsList, { className: "grid w-full grid-cols-2", children: [
6600
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_ui_components4.TabsTrigger, { value: "basic", children: "Basic" }),
6601
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_ui_components4.TabsTrigger, { value: "advanced", children: "Advanced" })
6602
6602
  ] }),
6603
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_ui_builder_ui4.TabsContent, { value: "basic", className: "space-y-4", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(FeeConfiguration, { control, showBasicFeeOnly: true }) }),
6604
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_ui_builder_ui4.TabsContent, { value: "advanced", className: "space-y-4", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "space-y-6", children: [
6603
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_ui_components4.TabsContent, { value: "basic", className: "space-y-4", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(FeeConfiguration, { control, showBasicFeeOnly: true }) }),
6604
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_ui_components4.TabsContent, { value: "advanced", className: "space-y-4", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "space-y-6", children: [
6605
6605
  /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(FeeConfiguration, { control, showBasicFeeOnly: false }),
6606
6606
  /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(TransactionTiming, { control })
6607
6607
  ] }) })
@@ -6610,10 +6610,10 @@ var StellarRelayerOptions = ({ options, onChange }) => {
6610
6610
  };
6611
6611
 
6612
6612
  // src/configuration/execution.ts
6613
- var import_ui_builder_utils32 = require("@openzeppelin/ui-builder-utils");
6613
+ var import_ui_utils32 = require("@openzeppelin/ui-utils");
6614
6614
  var SYSTEM_LOG_TAG9 = "adapter-stellar-execution-config";
6615
6615
  async function getStellarSupportedExecutionMethods() {
6616
- import_ui_builder_utils32.logger.warn(
6616
+ import_ui_utils32.logger.warn(
6617
6617
  "adapter-stellar-execution-config",
6618
6618
  "getStellarSupportedExecutionMethods is using placeholder implementation."
6619
6619
  );
@@ -6639,11 +6639,11 @@ async function getStellarSupportedExecutionMethods() {
6639
6639
  ]);
6640
6640
  }
6641
6641
  async function _validateMultisigConfig(_config, _walletStatus) {
6642
- import_ui_builder_utils32.logger.info(SYSTEM_LOG_TAG9, "Multisig execution config validation: Not yet fully implemented.");
6642
+ import_ui_utils32.logger.info(SYSTEM_LOG_TAG9, "Multisig execution config validation: Not yet fully implemented.");
6643
6643
  return true;
6644
6644
  }
6645
6645
  async function validateStellarExecutionConfig(config, walletStatus) {
6646
- import_ui_builder_utils32.logger.info(SYSTEM_LOG_TAG9, "Validating Stellar execution config:", { config, walletStatus });
6646
+ import_ui_utils32.logger.info(SYSTEM_LOG_TAG9, "Validating Stellar execution config:", { config, walletStatus });
6647
6647
  switch (config.method) {
6648
6648
  case "eoa":
6649
6649
  return validateEoaConfig(config, walletStatus);
@@ -6653,7 +6653,7 @@ async function validateStellarExecutionConfig(config, walletStatus) {
6653
6653
  return _validateMultisigConfig(config, walletStatus);
6654
6654
  default: {
6655
6655
  const unknownMethod = config.method;
6656
- import_ui_builder_utils32.logger.warn(
6656
+ import_ui_utils32.logger.warn(
6657
6657
  SYSTEM_LOG_TAG9,
6658
6658
  `Unsupported execution method type encountered: ${unknownMethod}`
6659
6659
  );
@@ -6694,6 +6694,36 @@ var STELLAR_TYPE_TO_FIELD_TYPE = {
6694
6694
  // Instance types (for compatibility)
6695
6695
  Instance: "object"
6696
6696
  };
6697
+ var STELLAR_DYNAMIC_PATTERNS = [
6698
+ { name: "vec", syntax: "Vec<T>", mapsTo: null, description: "Array (maps based on inner type)" },
6699
+ { name: "map", syntax: "Map<K,V>", mapsTo: "map", description: "Key-value map" },
6700
+ {
6701
+ name: "option",
6702
+ syntax: "Option<T>",
6703
+ mapsTo: "unwrap",
6704
+ description: "Optional, resolves to inner type"
6705
+ },
6706
+ {
6707
+ name: "result",
6708
+ syntax: "Result<T>",
6709
+ mapsTo: "unwrap",
6710
+ description: "Result, resolves to inner type"
6711
+ },
6712
+ { name: "bytes-n", syntax: "BytesN<N>", mapsTo: "bytes", description: "Fixed-size byte array" },
6713
+ {
6714
+ name: "struct",
6715
+ syntax: "StructName",
6716
+ mapsTo: "object",
6717
+ description: "Custom struct (PascalCase)"
6718
+ },
6719
+ { name: "enum", syntax: "EnumName", mapsTo: "select", description: "Enum type" }
6720
+ ];
6721
+ function getStellarTypeMappingInfo() {
6722
+ return {
6723
+ primitives: { ...STELLAR_TYPE_TO_FIELD_TYPE },
6724
+ dynamicPatterns: STELLAR_DYNAMIC_PATTERNS
6725
+ };
6726
+ }
6697
6727
 
6698
6728
  // src/mapping/type-mapper.ts
6699
6729
  function mapStellarParameterTypeToFieldType(parameterType) {
@@ -6829,11 +6859,11 @@ function getStellarCompatibleFieldTypes(parameterType) {
6829
6859
 
6830
6860
  // src/mapping/field-generator.ts
6831
6861
  var import_lodash = require("lodash");
6832
- var import_ui_builder_utils34 = require("@openzeppelin/ui-builder-utils");
6862
+ var import_ui_utils34 = require("@openzeppelin/ui-utils");
6833
6863
 
6834
6864
  // src/mapping/enum-metadata.ts
6835
6865
  var import_stellar_sdk16 = require("@stellar/stellar-sdk");
6836
- var import_ui_builder_utils33 = require("@openzeppelin/ui-builder-utils");
6866
+ var import_ui_utils33 = require("@openzeppelin/ui-utils");
6837
6867
 
6838
6868
  // src/mapping/tuple-components.ts
6839
6869
  function buildTupleComponents(parameterType, specEntries) {
@@ -6969,7 +6999,7 @@ function extractEnumVariants(entries, enumName) {
6969
6999
  }
6970
7000
  return null;
6971
7001
  } catch (error) {
6972
- import_ui_builder_utils33.logger.error("extractEnumVariants", `Failed to extract enum variants for ${enumName}:`, error);
7002
+ import_ui_utils33.logger.error("extractEnumVariants", `Failed to extract enum variants for ${enumName}:`, error);
6973
7003
  return null;
6974
7004
  }
6975
7005
  }
@@ -6990,7 +7020,7 @@ function isEnumType(entries, typeName) {
6990
7020
  const isEnum = entryKind.value === import_stellar_sdk16.xdr.ScSpecEntryKind.scSpecEntryUdtUnionV0().value || entryKind.value === import_stellar_sdk16.xdr.ScSpecEntryKind.scSpecEntryUdtEnumV0().value;
6991
7021
  return isEnum;
6992
7022
  } catch (error) {
6993
- import_ui_builder_utils33.logger.error("isEnumType", `Failed to check if ${typeName} is enum:`, error);
7023
+ import_ui_utils33.logger.error("isEnumType", `Failed to check if ${typeName} is enum:`, error);
6994
7024
  return false;
6995
7025
  }
6996
7026
  }
@@ -7011,7 +7041,7 @@ function generateStellarDefaultField(parameter, contractSchema) {
7011
7041
  const specEntries = contractSchema?.metadata?.specEntries;
7012
7042
  const fieldType = mapStellarParameterTypeToFieldType(parameter.type);
7013
7043
  if (parameter.type === "unknown") {
7014
- import_ui_builder_utils34.logger.warn(
7044
+ import_ui_utils34.logger.warn(
7015
7045
  "adapter-stellar",
7016
7046
  `[generateStellarDefaultField] Parameter "${parameter.name}" has type "unknown"`
7017
7047
  );
@@ -7066,12 +7096,12 @@ function generateStellarDefaultField(parameter, contractSchema) {
7066
7096
  type: finalFieldType,
7067
7097
  placeholder: enumMetadata ? `Select ${parameter.displayName || parameter.name || parameter.type}` : `Enter ${parameter.displayName || parameter.name || parameter.type}`,
7068
7098
  helperText: parameter.description || "",
7069
- defaultValue: (0, import_ui_builder_utils34.getDefaultValueForType)(finalFieldType),
7099
+ defaultValue: (0, import_ui_utils34.getDefaultValueForType)(finalFieldType),
7070
7100
  validation: getDefaultValidationForType(),
7071
7101
  width: "full",
7072
7102
  options
7073
7103
  };
7074
- baseField.validation = (0, import_ui_builder_utils34.enhanceNumericValidation)(
7104
+ baseField.validation = (0, import_ui_utils34.enhanceNumericValidation)(
7075
7105
  baseField.validation,
7076
7106
  parameter.type,
7077
7107
  STELLAR_NUMERIC_BOUNDS
@@ -7113,7 +7143,7 @@ function generateStellarDefaultField(parameter, contractSchema) {
7113
7143
  finalElementFieldType = "object";
7114
7144
  }
7115
7145
  let elementValidation = { required: true };
7116
- elementValidation = (0, import_ui_builder_utils34.enhanceNumericValidation)(
7146
+ elementValidation = (0, import_ui_utils34.enhanceNumericValidation)(
7117
7147
  elementValidation,
7118
7148
  elementType,
7119
7149
  STELLAR_NUMERIC_BOUNDS
@@ -7147,7 +7177,7 @@ function generateStellarDefaultField(parameter, contractSchema) {
7147
7177
  valueType: valueFieldType,
7148
7178
  keyFieldConfig: {
7149
7179
  type: keyFieldType,
7150
- validation: (0, import_ui_builder_utils34.enhanceNumericValidation)(
7180
+ validation: (0, import_ui_utils34.enhanceNumericValidation)(
7151
7181
  { required: true },
7152
7182
  mapTypes.keyType,
7153
7183
  STELLAR_NUMERIC_BOUNDS
@@ -7157,7 +7187,7 @@ function generateStellarDefaultField(parameter, contractSchema) {
7157
7187
  },
7158
7188
  valueFieldConfig: {
7159
7189
  type: valueFieldType,
7160
- validation: (0, import_ui_builder_utils34.enhanceNumericValidation)(
7190
+ validation: (0, import_ui_utils34.enhanceNumericValidation)(
7161
7191
  { required: true },
7162
7192
  mapTypes.valueType,
7163
7193
  STELLAR_NUMERIC_BOUNDS
@@ -7197,8 +7227,8 @@ function generateStellarDefaultField(parameter, contractSchema) {
7197
7227
 
7198
7228
  // src/transaction/formatter.ts
7199
7229
  var import_stellar_sdk17 = require("@stellar/stellar-sdk");
7200
- var import_ui_builder_types10 = require("@openzeppelin/ui-builder-types");
7201
- var import_ui_builder_utils35 = require("@openzeppelin/ui-builder-utils");
7230
+ var import_ui_types10 = require("@openzeppelin/ui-types");
7231
+ var import_ui_utils35 = require("@openzeppelin/ui-utils");
7202
7232
  function enrichParameterWithEnumMetadata(param, specEntries) {
7203
7233
  if (!specEntries) {
7204
7234
  return param;
@@ -7228,7 +7258,7 @@ function enrichParameterWithEnumMetadata(param, specEntries) {
7228
7258
  return enriched;
7229
7259
  }
7230
7260
  function formatStellarTransactionData(contractSchema, functionId, submittedInputs, fields) {
7231
- import_ui_builder_utils35.logger.info(
7261
+ import_ui_utils35.logger.info(
7232
7262
  "formatStellarTransactionData",
7233
7263
  `Formatting Stellar transaction data for function: ${functionId}`
7234
7264
  );
@@ -7246,7 +7276,7 @@ function formatStellarTransactionData(contractSchema, functionId, submittedInput
7246
7276
  let value;
7247
7277
  if (fieldConfig.isHardcoded) {
7248
7278
  if (fieldConfig.hardcodedValue === void 0 && fieldConfig.name in submittedInputs) {
7249
- import_ui_builder_utils35.logger.warn(
7279
+ import_ui_utils35.logger.warn(
7250
7280
  "formatStellarTransactionData",
7251
7281
  `Field '${fieldConfig.name}' is hardcoded with undefined value but has submitted input. Using submitted input instead.`
7252
7282
  );
@@ -7266,7 +7296,7 @@ function formatStellarTransactionData(contractSchema, functionId, submittedInput
7266
7296
  }
7267
7297
  const transformedArgs = expectedArgs.map((param, index) => {
7268
7298
  let valueToParse = orderedRawValues[index];
7269
- if ((0, import_ui_builder_types10.isEnumValue)(valueToParse)) {
7299
+ if ((0, import_ui_types10.isEnumValue)(valueToParse)) {
7270
7300
  const specEntries2 = contractSchema.metadata?.specEntries;
7271
7301
  if (specEntries2 && isEnumType(specEntries2, param.type)) {
7272
7302
  const enumMetadata = extractEnumVariants(specEntries2, param.type);
@@ -7369,7 +7399,7 @@ function formatStellarTransactionData(contractSchema, functionId, submittedInput
7369
7399
  // For example: fee, timeout, memo, etc.
7370
7400
  }
7371
7401
  };
7372
- import_ui_builder_utils35.logger.debug(
7402
+ import_ui_utils35.logger.debug(
7373
7403
  "formatStellarTransactionData",
7374
7404
  "Formatted transaction data:",
7375
7405
  stellarTransactionData
@@ -7379,7 +7409,7 @@ function formatStellarTransactionData(contractSchema, functionId, submittedInput
7379
7409
 
7380
7410
  // src/wallet/components/StellarWalletUiRoot.tsx
7381
7411
  var import_react5 = require("react");
7382
- var import_ui_builder_utils36 = require("@openzeppelin/ui-builder-utils");
7412
+ var import_ui_utils36 = require("@openzeppelin/ui-utils");
7383
7413
 
7384
7414
  // src/wallet/context/StellarWalletContext.ts
7385
7415
  var import_react4 = require("react");
@@ -7398,9 +7428,9 @@ function StellarWalletUiRoot({ children, uiKitConfig }) {
7398
7428
  const currentState = stellarUiKitManager.getState();
7399
7429
  if (uiKitConfig || !currentState.currentFullUiKitConfig) {
7400
7430
  const configToUse = uiKitConfig || { kitName: "custom", kitConfig: {} };
7401
- import_ui_builder_utils36.logger.debug("StellarWalletUiRoot", "Configuring UI kit with:", configToUse);
7431
+ import_ui_utils36.logger.debug("StellarWalletUiRoot", "Configuring UI kit with:", configToUse);
7402
7432
  stellarUiKitManager.configure(configToUse).catch((error) => {
7403
- import_ui_builder_utils36.logger.error("Failed to configure Stellar UI kit:", error);
7433
+ import_ui_utils36.logger.error("Failed to configure Stellar UI kit:", error);
7404
7434
  });
7405
7435
  }
7406
7436
  }, [uiKitConfig]);
@@ -7414,7 +7444,7 @@ function StellarWalletUiRoot({ children, uiKitConfig }) {
7414
7444
  const unsubscribeFromConnectionChanges = onStellarWalletConnectionChange(
7415
7445
  (currentStatus, _previousStatus) => {
7416
7446
  setAddress(currentStatus.address || null);
7417
- import_ui_builder_utils36.logger.debug(
7447
+ import_ui_utils36.logger.debug(
7418
7448
  "StellarWalletUiRoot",
7419
7449
  `Connection status changed: ${currentStatus.isConnected ? "connected" : "disconnected"}`,
7420
7450
  currentStatus.address
@@ -7433,7 +7463,7 @@ function StellarWalletUiRoot({ children, uiKitConfig }) {
7433
7463
  const connectors = await getStellarAvailableConnectors();
7434
7464
  setAvailableWallets(connectors);
7435
7465
  } catch (error) {
7436
- import_ui_builder_utils36.logger.error("Failed to load available wallets:", String(error));
7466
+ import_ui_utils36.logger.error("Failed to load available wallets:", String(error));
7437
7467
  }
7438
7468
  };
7439
7469
  if (!uiKitManagerState.isInitializing && uiKitManagerState.stellarKitProvider) {
@@ -7450,7 +7480,7 @@ function StellarWalletUiRoot({ children, uiKitConfig }) {
7450
7480
  throw new Error(result.error || "Failed to connect wallet");
7451
7481
  }
7452
7482
  } catch (error) {
7453
- import_ui_builder_utils36.logger.error("Failed to connect:", String(error));
7483
+ import_ui_utils36.logger.error("Failed to connect:", String(error));
7454
7484
  throw error;
7455
7485
  } finally {
7456
7486
  setIsConnecting(false);
@@ -7465,7 +7495,7 @@ function StellarWalletUiRoot({ children, uiKitConfig }) {
7465
7495
  throw new Error(result.error || "Failed to disconnect wallet");
7466
7496
  }
7467
7497
  } catch (error) {
7468
- import_ui_builder_utils36.logger.error("Failed to disconnect:", String(error));
7498
+ import_ui_utils36.logger.error("Failed to disconnect:", String(error));
7469
7499
  throw error;
7470
7500
  }
7471
7501
  }, []);
@@ -7584,20 +7614,20 @@ var stellarFacadeHooks = {
7584
7614
  };
7585
7615
 
7586
7616
  // src/wallet/hooks/useUiKitConfig.ts
7587
- var import_ui_builder_utils37 = require("@openzeppelin/ui-builder-utils");
7617
+ var import_ui_utils37 = require("@openzeppelin/ui-utils");
7588
7618
  var defaultConfig = {
7589
7619
  kitName: "custom",
7590
7620
  // Default to using our custom implementation for Stellar
7591
7621
  kitConfig: {}
7592
7622
  };
7593
7623
  function loadInitialConfigFromAppService() {
7594
- import_ui_builder_utils37.logger.debug(
7624
+ import_ui_utils37.logger.debug(
7595
7625
  "stellar:useUiKitConfig",
7596
7626
  "Attempting to load initial config from AppConfigService..."
7597
7627
  );
7598
- const configObj = import_ui_builder_utils37.appConfigService.getWalletUIConfig("stellar");
7628
+ const configObj = import_ui_utils37.appConfigService.getWalletUIConfig("stellar");
7599
7629
  if (configObj && configObj.kitName) {
7600
- import_ui_builder_utils37.logger.info(
7630
+ import_ui_utils37.logger.info(
7601
7631
  "stellar:useUiKitConfig",
7602
7632
  `Loaded initial config from AppConfigService: kitName=${configObj.kitName}`,
7603
7633
  configObj.kitConfig
@@ -7607,7 +7637,7 @@ function loadInitialConfigFromAppService() {
7607
7637
  kitConfig: { ...defaultConfig.kitConfig, ...configObj.kitConfig || {} }
7608
7638
  };
7609
7639
  }
7610
- import_ui_builder_utils37.logger.debug(
7640
+ import_ui_utils37.logger.debug(
7611
7641
  "stellar:useUiKitConfig",
7612
7642
  "No initial config found in AppConfigService, using module default."
7613
7643
  );
@@ -7617,13 +7647,13 @@ function loadInitialConfigFromAppService() {
7617
7647
  // src/wallet/components/connect/ConnectButton.tsx
7618
7648
  var import_lucide_react2 = require("lucide-react");
7619
7649
  var import_react10 = require("react");
7620
- var import_ui_builder_ui6 = require("@openzeppelin/ui-builder-ui");
7621
- var import_ui_builder_utils39 = require("@openzeppelin/ui-builder-utils");
7650
+ var import_ui_components6 = require("@openzeppelin/ui-components");
7651
+ var import_ui_utils39 = require("@openzeppelin/ui-utils");
7622
7652
 
7623
7653
  // src/wallet/components/connect/ConnectorDialog.tsx
7624
7654
  var import_react9 = require("react");
7625
- var import_ui_builder_ui5 = require("@openzeppelin/ui-builder-ui");
7626
- var import_ui_builder_utils38 = require("@openzeppelin/ui-builder-utils");
7655
+ var import_ui_components5 = require("@openzeppelin/ui-components");
7656
+ var import_ui_utils38 = require("@openzeppelin/ui-utils");
7627
7657
  var import_jsx_runtime7 = require("react/jsx-runtime");
7628
7658
  var ConnectorDialog = ({ open, onOpenChange }) => {
7629
7659
  const { connect } = useStellarConnect();
@@ -7638,7 +7668,7 @@ var ConnectorDialog = ({ open, onOpenChange }) => {
7638
7668
  const availableConnectors = await getStellarAvailableConnectors();
7639
7669
  setConnectors(availableConnectors);
7640
7670
  } catch (err) {
7641
- import_ui_builder_utils38.logger.error("Failed to load Stellar connectors:", String(err));
7671
+ import_ui_utils38.logger.error("Failed to load Stellar connectors:", String(err));
7642
7672
  setError("Failed to load available wallets");
7643
7673
  } finally {
7644
7674
  setLoadingConnectors(false);
@@ -7656,8 +7686,8 @@ var ConnectorDialog = ({ open, onOpenChange }) => {
7656
7686
  }
7657
7687
  }, [isConnected, connectingId, onOpenChange]);
7658
7688
  if (!connect) {
7659
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_ui_builder_ui5.Dialog, { open, onOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_ui_builder_ui5.DialogContent, { className: "sm:max-w-[425px]", children: [
7660
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_ui_builder_ui5.DialogHeader, { children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_ui_builder_ui5.DialogTitle, { children: "Error" }) }),
7689
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_ui_components5.Dialog, { open, onOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_ui_components5.DialogContent, { className: "sm:max-w-[425px]", children: [
7690
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_ui_components5.DialogHeader, { children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_ui_components5.DialogTitle, { children: "Error" }) }),
7661
7691
  /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("p", { children: "Wallet connection function is not available." })
7662
7692
  ] }) });
7663
7693
  }
@@ -7671,13 +7701,13 @@ var ConnectorDialog = ({ open, onOpenChange }) => {
7671
7701
  setConnectingId(null);
7672
7702
  }
7673
7703
  };
7674
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_ui_builder_ui5.Dialog, { open, onOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_ui_builder_ui5.DialogContent, { className: "sm:max-w-[425px]", children: [
7675
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_ui_builder_ui5.DialogHeader, { children: [
7676
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_ui_builder_ui5.DialogTitle, { children: "Connect Wallet" }),
7677
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_ui_builder_ui5.DialogDescription, { children: "Select a wallet provider to connect with this application." })
7704
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_ui_components5.Dialog, { open, onOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_ui_components5.DialogContent, { className: "sm:max-w-[425px]", children: [
7705
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_ui_components5.DialogHeader, { children: [
7706
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_ui_components5.DialogTitle, { children: "Connect Wallet" }),
7707
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_ui_components5.DialogDescription, { children: "Select a wallet provider to connect with this application." })
7678
7708
  ] }),
7679
7709
  /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "grid gap-4 py-4", children: loadingConnectors ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("p", { className: "text-center text-muted-foreground", children: "Loading available wallets..." }) : connectors.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("p", { className: "text-center text-muted-foreground", children: "No wallet connectors available." }) : connectors.map((connector) => /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
7680
- import_ui_builder_ui5.Button,
7710
+ import_ui_components5.Button,
7681
7711
  {
7682
7712
  onClick: () => handleConnectorSelect(connector),
7683
7713
  disabled: isConnecting && connectingId === connector.id,
@@ -7729,9 +7759,9 @@ var CustomConnectButton = ({
7729
7759
  return null;
7730
7760
  }
7731
7761
  const showButtonLoading = isConnecting || isManuallyInitiated;
7732
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: (0, import_ui_builder_utils39.cn)("flex items-center", className), children: [
7762
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: (0, import_ui_utils39.cn)("flex items-center", className), children: [
7733
7763
  /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
7734
- import_ui_builder_ui6.Button,
7764
+ import_ui_components6.Button,
7735
7765
  {
7736
7766
  onClick: handleConnectClick,
7737
7767
  disabled: showButtonLoading || isConnected,
@@ -7762,8 +7792,8 @@ var CustomConnectButton = ({
7762
7792
 
7763
7793
  // src/wallet/components/account/AccountDisplay.tsx
7764
7794
  var import_lucide_react3 = require("lucide-react");
7765
- var import_ui_builder_ui7 = require("@openzeppelin/ui-builder-ui");
7766
- var import_ui_builder_utils40 = require("@openzeppelin/ui-builder-utils");
7795
+ var import_ui_components7 = require("@openzeppelin/ui-components");
7796
+ var import_ui_utils40 = require("@openzeppelin/ui-utils");
7767
7797
  var import_jsx_runtime9 = require("react/jsx-runtime");
7768
7798
  var CustomAccountDisplay = ({ className }) => {
7769
7799
  const { isConnected, address } = useStellarAccount();
@@ -7771,13 +7801,13 @@ var CustomAccountDisplay = ({ className }) => {
7771
7801
  if (!isConnected || !address || !disconnect) {
7772
7802
  return null;
7773
7803
  }
7774
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: (0, import_ui_builder_utils40.cn)("flex items-center gap-2", className), children: [
7804
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: (0, import_ui_utils40.cn)("flex items-center gap-2", className), children: [
7775
7805
  /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex flex-col", children: [
7776
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "text-xs font-medium", children: (0, import_ui_builder_utils40.truncateMiddle)(address, 4, 4) }),
7806
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "text-xs font-medium", children: (0, import_ui_utils40.truncateMiddle)(address, 4, 4) }),
7777
7807
  /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "text-[9px] text-muted-foreground -mt-0.5", children: "Stellar Account" })
7778
7808
  ] }),
7779
7809
  /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
7780
- import_ui_builder_ui7.Button,
7810
+ import_ui_components7.Button,
7781
7811
  {
7782
7812
  onClick: () => disconnect(),
7783
7813
  variant: "ghost",
@@ -7791,19 +7821,19 @@ var CustomAccountDisplay = ({ className }) => {
7791
7821
  };
7792
7822
 
7793
7823
  // src/wallet/utils/filterWalletComponents.ts
7794
- var import_ui_builder_types11 = require("@openzeppelin/ui-builder-types");
7795
- var import_ui_builder_utils41 = require("@openzeppelin/ui-builder-utils");
7824
+ var import_ui_types11 = require("@openzeppelin/ui-types");
7825
+ var import_ui_utils41 = require("@openzeppelin/ui-utils");
7796
7826
  function filterWalletComponents(allPossibleComponents, exclusions, kitName = "custom") {
7797
- import_ui_builder_utils41.logger.debug(
7827
+ import_ui_utils41.logger.debug(
7798
7828
  "filterWalletComponents",
7799
7829
  `Filtering components for kit: ${kitName}. Exclusions: ${exclusions.join(", ")}.`
7800
7830
  );
7801
7831
  if (!allPossibleComponents || Object.keys(allPossibleComponents).length === 0) {
7802
- import_ui_builder_utils41.logger.debug("filterWalletComponents", `No components provided to filter for kit: ${kitName}.`);
7832
+ import_ui_utils41.logger.debug("filterWalletComponents", `No components provided to filter for kit: ${kitName}.`);
7803
7833
  return void 0;
7804
7834
  }
7805
7835
  if (exclusions.length === 0) {
7806
- import_ui_builder_utils41.logger.debug(
7836
+ import_ui_utils41.logger.debug(
7807
7837
  "filterWalletComponents",
7808
7838
  `Providing all components for kit: ${kitName}.`,
7809
7839
  allPossibleComponents
@@ -7822,14 +7852,14 @@ function filterWalletComponents(allPossibleComponents, exclusions, kitName = "cu
7822
7852
  }
7823
7853
  }
7824
7854
  if (componentCount > 0) {
7825
- import_ui_builder_utils41.logger.debug(
7855
+ import_ui_utils41.logger.debug(
7826
7856
  "filterWalletComponents",
7827
7857
  `Providing filtered components for kit: ${kitName} after exclusions (${exclusions.join(", ")}).`,
7828
7858
  filteredComponents
7829
7859
  );
7830
7860
  return filteredComponents;
7831
7861
  }
7832
- import_ui_builder_utils41.logger.debug("filterWalletComponents", `All components were excluded for kit: ${kitName}.`);
7862
+ import_ui_utils41.logger.debug("filterWalletComponents", `All components were excluded for kit: ${kitName}.`);
7833
7863
  return void 0;
7834
7864
  }
7835
7865
  function getComponentExclusionsFromConfig(kitConfig) {
@@ -7837,7 +7867,7 @@ function getComponentExclusionsFromConfig(kitConfig) {
7837
7867
  const componentsCfg = kitConfig.components;
7838
7868
  if (componentsCfg && typeof componentsCfg === "object" && "exclude" in componentsCfg && Array.isArray(componentsCfg.exclude)) {
7839
7869
  return componentsCfg.exclude.filter(
7840
- (key) => typeof key === "string" && import_ui_builder_types11.ECOSYSTEM_WALLET_COMPONENT_KEYS.includes(key)
7870
+ (key) => typeof key === "string" && import_ui_types11.ECOSYSTEM_WALLET_COMPONENT_KEYS.includes(key)
7841
7871
  );
7842
7872
  }
7843
7873
  }
@@ -7845,23 +7875,23 @@ function getComponentExclusionsFromConfig(kitConfig) {
7845
7875
  }
7846
7876
 
7847
7877
  // src/wallet/utils/uiKitService.ts
7848
- var import_ui_builder_utils42 = require("@openzeppelin/ui-builder-utils");
7878
+ var import_ui_utils42 = require("@openzeppelin/ui-utils");
7849
7879
  function getResolvedWalletComponents(uiKitConfiguration) {
7850
- import_ui_builder_utils42.logger.debug(
7880
+ import_ui_utils42.logger.debug(
7851
7881
  "stellar:uiKitService:getResolvedWalletComponents",
7852
7882
  "Received uiKitConfiguration:",
7853
7883
  JSON.stringify(uiKitConfiguration)
7854
7884
  );
7855
7885
  const currentKitName = uiKitConfiguration.kitName || "custom";
7856
7886
  if (currentKitName === "none") {
7857
- import_ui_builder_utils42.logger.info(
7887
+ import_ui_utils42.logger.info(
7858
7888
  "stellar:uiKitService",
7859
7889
  'UI Kit set to "none" for getResolvedWalletComponents, not providing wallet components.'
7860
7890
  );
7861
7891
  return void 0;
7862
7892
  }
7863
7893
  const exclusions = getComponentExclusionsFromConfig(uiKitConfiguration.kitConfig);
7864
- import_ui_builder_utils42.logger.debug(
7894
+ import_ui_utils42.logger.debug(
7865
7895
  "stellar:uiKitService",
7866
7896
  `Extracted component exclusions for ${currentKitName}: ${exclusions.join(", ") || "none"}.`
7867
7897
  );
@@ -7871,7 +7901,7 @@ function getResolvedWalletComponents(uiKitConfiguration) {
7871
7901
  AccountDisplay: CustomAccountDisplay
7872
7902
  // NetworkSwitcher is not included as Stellar doesn't support network switching
7873
7903
  };
7874
- import_ui_builder_utils42.logger.info(
7904
+ import_ui_utils42.logger.info(
7875
7905
  "stellar:uiKitService",
7876
7906
  `Providing custom Stellar wallet components for kit: ${currentKitName}`
7877
7907
  );
@@ -7883,10 +7913,10 @@ function getResolvedWalletComponents(uiKitConfiguration) {
7883
7913
  // The kit's native button handles account display internally
7884
7914
  AccountDisplay: void 0
7885
7915
  };
7886
- import_ui_builder_utils42.logger.info("stellar:uiKitService", "Using Stellar Wallets Kit native button");
7916
+ import_ui_utils42.logger.info("stellar:uiKitService", "Using Stellar Wallets Kit native button");
7887
7917
  return stellarKitComponents;
7888
7918
  }
7889
- import_ui_builder_utils42.logger.warn(
7919
+ import_ui_utils42.logger.warn(
7890
7920
  "stellar:uiKitService",
7891
7921
  `UI Kit "${currentKitName}" for getResolvedWalletComponents not explicitly supported. No components provided.`
7892
7922
  );
@@ -7894,9 +7924,9 @@ function getResolvedWalletComponents(uiKitConfiguration) {
7894
7924
  }
7895
7925
 
7896
7926
  // src/wallet/services/configResolutionService.ts
7897
- var import_ui_builder_utils43 = require("@openzeppelin/ui-builder-utils");
7927
+ var import_ui_utils43 = require("@openzeppelin/ui-utils");
7898
7928
  async function resolveFullUiKitConfiguration(programmaticOverrides, initialAppServiceKitName, currentAppServiceConfig, options) {
7899
- import_ui_builder_utils43.logger.debug(
7929
+ import_ui_utils43.logger.debug(
7900
7930
  "stellar:configResolutionService:resolveFullUiKitConfiguration",
7901
7931
  "Starting resolution with:",
7902
7932
  {
@@ -7907,7 +7937,7 @@ async function resolveFullUiKitConfiguration(programmaticOverrides, initialAppSe
7907
7937
  }
7908
7938
  );
7909
7939
  if (options?.loadUiKitNativeConfig) {
7910
- import_ui_builder_utils43.logger.debug(
7940
+ import_ui_utils43.logger.debug(
7911
7941
  "stellar:configResolutionService",
7912
7942
  "Native config loader provided but not currently supported for Stellar adapter"
7913
7943
  );
@@ -7920,7 +7950,7 @@ async function resolveFullUiKitConfiguration(programmaticOverrides, initialAppSe
7920
7950
  ...programmaticOverrides.kitConfig || {}
7921
7951
  }
7922
7952
  };
7923
- import_ui_builder_utils43.logger.debug(
7953
+ import_ui_utils43.logger.debug(
7924
7954
  "stellar:configResolutionService:resolveFullUiKitConfiguration",
7925
7955
  "Resolved finalFullConfig:",
7926
7956
  finalFullConfig
@@ -7934,14 +7964,14 @@ var StellarAdapter = class {
7934
7964
  __publicField(this, "networkConfig");
7935
7965
  __publicField(this, "initialAppServiceKitName");
7936
7966
  __publicField(this, "accessControlService");
7937
- if (!(0, import_ui_builder_types12.isStellarNetworkConfig)(networkConfig)) {
7967
+ if (!(0, import_ui_types12.isStellarNetworkConfig)(networkConfig)) {
7938
7968
  throw new Error("StellarAdapter requires a valid Stellar network configuration.");
7939
7969
  }
7940
7970
  this.networkConfig = networkConfig;
7941
7971
  this.accessControlService = createStellarAccessControlService(networkConfig);
7942
7972
  stellarUiKitManager.setNetworkConfig(networkConfig);
7943
7973
  getStellarWalletImplementation(networkConfig).catch((error) => {
7944
- import_ui_builder_utils44.logger.error(
7974
+ import_ui_utils44.logger.error(
7945
7975
  "StellarAdapter:constructor",
7946
7976
  "Failed to initialize wallet implementation:",
7947
7977
  error
@@ -7949,12 +7979,12 @@ var StellarAdapter = class {
7949
7979
  });
7950
7980
  const initialGlobalConfig = loadInitialConfigFromAppService();
7951
7981
  this.initialAppServiceKitName = initialGlobalConfig.kitName || "custom";
7952
- import_ui_builder_utils44.logger.info(
7982
+ import_ui_utils44.logger.info(
7953
7983
  "StellarAdapter:constructor",
7954
7984
  "Initial kitName from AppConfigService noted:",
7955
7985
  this.initialAppServiceKitName
7956
7986
  );
7957
- import_ui_builder_utils44.logger.info(
7987
+ import_ui_utils44.logger.info(
7958
7988
  "StellarAdapter",
7959
7989
  `Adapter initialized for network: ${networkConfig.name} (ID: ${networkConfig.id})`
7960
7990
  );
@@ -8145,7 +8175,7 @@ var StellarAdapter = class {
8145
8175
  onWalletConnectionChange(callback) {
8146
8176
  const walletImplementation = getInitializedStellarWalletImplementation();
8147
8177
  if (!walletImplementation) {
8148
- import_ui_builder_utils44.logger.warn(
8178
+ import_ui_utils44.logger.warn(
8149
8179
  "StellarAdapter:onWalletConnectionChange",
8150
8180
  "Wallet implementation not ready. Subscription may not work."
8151
8181
  );
@@ -8227,7 +8257,7 @@ var StellarAdapter = class {
8227
8257
  options
8228
8258
  );
8229
8259
  await stellarUiKitManager.configure(finalFullConfig);
8230
- import_ui_builder_utils44.logger.info(
8260
+ import_ui_utils44.logger.info(
8231
8261
  "StellarAdapter:configureUiKit",
8232
8262
  "StellarUiKitManager configuration requested with final config:",
8233
8263
  finalFullConfig
@@ -8248,7 +8278,7 @@ var StellarAdapter = class {
8248
8278
  getEcosystemWalletComponents() {
8249
8279
  const currentManagerState = stellarUiKitManager.getState();
8250
8280
  if (!currentManagerState.currentFullUiKitConfig) {
8251
- import_ui_builder_utils44.logger.debug(
8281
+ import_ui_utils44.logger.debug(
8252
8282
  "StellarAdapter:getEcosystemWalletComponents",
8253
8283
  "No UI kit configuration available in manager yet. Returning undefined components."
8254
8284
  );
@@ -8261,7 +8291,7 @@ var StellarAdapter = class {
8261
8291
  * @inheritdoc
8262
8292
  */
8263
8293
  getEcosystemReactUiContextProvider() {
8264
- import_ui_builder_utils44.logger.info(
8294
+ import_ui_utils44.logger.info(
8265
8295
  "StellarAdapter:getEcosystemReactUiContextProvider",
8266
8296
  "Returning StellarWalletUiRoot."
8267
8297
  );
@@ -8281,7 +8311,7 @@ var StellarAdapter = class {
8281
8311
  try {
8282
8312
  return await relayerStrategy.getStellarRelayers(serviceUrl, accessToken, this.networkConfig);
8283
8313
  } catch (error) {
8284
- import_ui_builder_utils44.logger.error("StellarAdapter", "Failed to fetch Stellar relayers:", error);
8314
+ import_ui_utils44.logger.error("StellarAdapter", "Failed to fetch Stellar relayers:", error);
8285
8315
  return Promise.resolve([]);
8286
8316
  }
8287
8317
  }
@@ -8298,7 +8328,7 @@ var StellarAdapter = class {
8298
8328
  this.networkConfig
8299
8329
  );
8300
8330
  } catch (error) {
8301
- import_ui_builder_utils44.logger.error("StellarAdapter", "Failed to fetch Stellar relayer details:", error);
8331
+ import_ui_utils44.logger.error("StellarAdapter", "Failed to fetch Stellar relayer details:", error);
8302
8332
  return Promise.resolve({});
8303
8333
  }
8304
8334
  }
@@ -8350,6 +8380,12 @@ var StellarAdapter = class {
8350
8380
  getAccessControlService() {
8351
8381
  return this.accessControlService;
8352
8382
  }
8383
+ /**
8384
+ * @inheritdoc
8385
+ */
8386
+ getTypeMappingInfo() {
8387
+ return getStellarTypeMappingInfo();
8388
+ }
8353
8389
  };
8354
8390
 
8355
8391
  // src/networks/mainnet.ts
@@ -8366,8 +8402,8 @@ var stellarPublic = {
8366
8402
  sorobanRpcUrl: "https://mainnet.sorobanrpc.com",
8367
8403
  networkPassphrase: "Public Global Stellar Network ; September 2015",
8368
8404
  explorerUrl: "https://stellar.expert/explorer/public",
8369
- iconComponent: import_react11.NetworkStellar
8370
- // indexerUri and indexerWsUri will be added here when stable mainnet indexer endpoints are available
8405
+ iconComponent: import_react11.NetworkStellar,
8406
+ indexerUri: "https://openzeppelin-stellar-mainnet.graphql.subquery.network/"
8371
8407
  };
8372
8408
 
8373
8409
  // src/networks/testnet.ts