@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
@@ -1,6 +1,6 @@
1
1
  import { nativeToScVal, xdr } from '@stellar/stellar-sdk';
2
2
 
3
- import { isEnumValue, type FunctionParameter } from '@openzeppelin/ui-builder-types';
3
+ import { isEnumValue, type FunctionParameter } from '@openzeppelin/ui-types';
4
4
 
5
5
  import { convertStellarTypeToScValType } from '../../utils/formatting';
6
6
  import { convertEnumToScVal } from '../../utils/input-parsing';
@@ -12,7 +12,7 @@ import { parsePrimitive } from './primitive-parser';
12
12
  import { convertStructToScVal, isStructType } from './struct-parser';
13
13
  import type { SorobanEnumValue } from './types';
14
14
 
15
- // FunctionParameter already includes enumMetadata in its type definition (from @openzeppelin/ui-builder-types)
15
+ // FunctionParameter already includes enumMetadata in its type definition (from @openzeppelin/ui-types)
16
16
  // No need for a separate type wrapper
17
17
  type EnumAwareFunctionParameter = FunctionParameter;
18
18
 
@@ -1,7 +1,7 @@
1
1
  import { nativeToScVal, xdr } from '@stellar/stellar-sdk';
2
2
 
3
- import { isEnumValue, type FunctionParameter } from '@openzeppelin/ui-builder-types';
4
- import { isPlainObject, logger } from '@openzeppelin/ui-builder-utils';
3
+ import { isEnumValue, type FunctionParameter } from '@openzeppelin/ui-types';
4
+ import { isPlainObject, logger } from '@openzeppelin/ui-utils';
5
5
 
6
6
  import { convertStellarTypeToScValType } from '../../utils/formatting';
7
7
  import { isLikelyEnumType } from '../../utils/type-detection';
@@ -1,6 +1,6 @@
1
1
  import { nativeToScVal, xdr } from '@stellar/stellar-sdk';
2
2
 
3
- import { detectBytesEncoding, logger, stringToBytes } from '@openzeppelin/ui-builder-utils';
3
+ import { detectBytesEncoding, logger, stringToBytes } from '@openzeppelin/ui-utils';
4
4
 
5
5
  // Import types for internal use
6
6
  import type {
@@ -1,6 +1,6 @@
1
1
  import * as StellarSdk from '@stellar/stellar-sdk';
2
2
 
3
- import { isDevelopmentOrTestEnvironment, logger } from '@openzeppelin/ui-builder-utils';
3
+ import { isDevelopmentOrTestEnvironment, logger } from '@openzeppelin/ui-utils';
4
4
 
5
5
  /**
6
6
  * Utility functions for detecting and analyzing Stellar/Soroban parameter types
@@ -1,5 +1,5 @@
1
- import { EoaExecutionConfig } from '@openzeppelin/ui-builder-types';
2
- import { logger } from '@openzeppelin/ui-builder-utils';
1
+ import { EoaExecutionConfig } from '@openzeppelin/ui-types';
2
+ import { logger } from '@openzeppelin/ui-utils';
3
3
 
4
4
  import { StellarWalletConnectionStatus } from '../wallet/types';
5
5
  import { isValidAddress } from './address';
@@ -1,4 +1,4 @@
1
- import { RelayerExecutionConfig } from '@openzeppelin/ui-builder-types';
1
+ import { RelayerExecutionConfig } from '@openzeppelin/ui-types';
2
2
 
3
3
  export async function validateRelayerConfig(
4
4
  config: RelayerExecutionConfig
@@ -90,4 +90,4 @@ wallet/
90
90
 
91
91
  ## Usage in Application
92
92
 
93
- `StellarWalletUiRoot` is returned by the adapter and used by the Builder’s `WalletStateProvider`. Use `useWalletState()` and facade hooks from `@openzeppelin/ui-builder-react-core` to render the wallet UI components from `getEcosystemWalletComponents()`.
93
+ `StellarWalletUiRoot` is returned by the adapter and used by the Builder’s `WalletStateProvider`. Use `useWalletState()` and facade hooks from `@openzeppelin/ui-react` to render the wallet UI components from `getEcosystemWalletComponents()`.
@@ -1,8 +1,8 @@
1
1
  import type { ISupportedWallet } from '@creit.tech/stellar-wallets-kit';
2
2
  import { ReactNode, useCallback, useEffect, useState } from 'react';
3
3
 
4
- import type { UiKitConfiguration } from '@openzeppelin/ui-builder-types';
5
- import { logger } from '@openzeppelin/ui-builder-utils';
4
+ import type { UiKitConfiguration } from '@openzeppelin/ui-types';
5
+ import { logger } from '@openzeppelin/ui-utils';
6
6
 
7
7
  import {
8
8
  connectStellarWallet,
@@ -1,9 +1,9 @@
1
1
  import { LogOut } from 'lucide-react';
2
2
  import React from 'react';
3
3
 
4
- import type { BaseComponentProps } from '@openzeppelin/ui-builder-types';
5
- import { Button } from '@openzeppelin/ui-builder-ui';
6
- import { cn, truncateMiddle } from '@openzeppelin/ui-builder-utils';
4
+ import { Button } from '@openzeppelin/ui-components';
5
+ import type { BaseComponentProps } from '@openzeppelin/ui-types';
6
+ import { cn, truncateMiddle } from '@openzeppelin/ui-utils';
7
7
 
8
8
  import { useStellarAccount, useStellarDisconnect } from '../../hooks';
9
9
 
@@ -1,9 +1,9 @@
1
1
  import { Loader2, Wallet } from 'lucide-react';
2
2
  import React, { useEffect, useState } from 'react';
3
3
 
4
- import type { BaseComponentProps } from '@openzeppelin/ui-builder-types';
5
- import { Button } from '@openzeppelin/ui-builder-ui';
6
- import { cn } from '@openzeppelin/ui-builder-utils';
4
+ import { Button } from '@openzeppelin/ui-components';
5
+ import type { BaseComponentProps } from '@openzeppelin/ui-types';
6
+ import { cn } from '@openzeppelin/ui-utils';
7
7
 
8
8
  import { useStellarAccount } from '../../hooks';
9
9
  import { ConnectorDialog } from './ConnectorDialog';
@@ -1,6 +1,5 @@
1
1
  import React, { useEffect, useState } from 'react';
2
2
 
3
- import type { Connector } from '@openzeppelin/ui-builder-types';
4
3
  import {
5
4
  Button,
6
5
  Dialog,
@@ -8,8 +7,9 @@ import {
8
7
  DialogDescription,
9
8
  DialogHeader,
10
9
  DialogTitle,
11
- } from '@openzeppelin/ui-builder-ui';
12
- import { logger } from '@openzeppelin/ui-builder-utils';
10
+ } from '@openzeppelin/ui-components';
11
+ import type { Connector } from '@openzeppelin/ui-types';
12
+ import { logger } from '@openzeppelin/ui-utils';
13
13
 
14
14
  import { getStellarAvailableConnectors } from '../../connection';
15
15
  import { useStellarAccount, useStellarConnect } from '../../hooks';
@@ -1,5 +1,5 @@
1
- import type { Connector } from '@openzeppelin/ui-builder-types';
2
- import { logger } from '@openzeppelin/ui-builder-utils';
1
+ import type { Connector } from '@openzeppelin/ui-types';
2
+ import { logger } from '@openzeppelin/ui-utils';
3
3
 
4
4
  import {
5
5
  getInitializedStellarWalletImplementation,
@@ -1,4 +1,4 @@
1
- import type { EcosystemSpecificReactHooks } from '@openzeppelin/ui-builder-types';
1
+ import type { EcosystemSpecificReactHooks } from '@openzeppelin/ui-types';
2
2
 
3
3
  import { useStellarAccount } from './useStellarAccount';
4
4
  import { useStellarConnect } from './useStellarConnect';
@@ -1,7 +1,7 @@
1
1
  import type { ISupportedWallet } from '@creit.tech/stellar-wallets-kit';
2
2
  import { useCallback, useState } from 'react';
3
3
 
4
- import type { Connector } from '@openzeppelin/ui-builder-types';
4
+ import type { Connector } from '@openzeppelin/ui-types';
5
5
 
6
6
  import { useStellarWalletContext } from '../context';
7
7
 
@@ -1,5 +1,5 @@
1
- import type { UiKitConfiguration } from '@openzeppelin/ui-builder-types';
2
- import { appConfigService, logger } from '@openzeppelin/ui-builder-utils';
1
+ import type { UiKitConfiguration } from '@openzeppelin/ui-types';
2
+ import { appConfigService, logger } from '@openzeppelin/ui-utils';
3
3
 
4
4
  /**
5
5
  * Default configuration when no specific configuration is provided
@@ -11,12 +11,8 @@ import {
11
11
  WalletNetwork,
12
12
  } from '@creit.tech/stellar-wallets-kit';
13
13
 
14
- import type {
15
- Connector,
16
- StellarNetworkConfig,
17
- UiKitConfiguration,
18
- } from '@openzeppelin/ui-builder-types';
19
- import { logger } from '@openzeppelin/ui-builder-utils';
14
+ import type { Connector, StellarNetworkConfig, UiKitConfiguration } from '@openzeppelin/ui-types';
15
+ import { logger } from '@openzeppelin/ui-utils';
20
16
 
21
17
  import type { StellarConnectionStatusListener, StellarWalletConnectionStatus } from '../types';
22
18
 
@@ -1,6 +1,6 @@
1
1
  import { describe, expect, it, vi } from 'vitest';
2
2
 
3
- import type { UiKitConfiguration, UiKitName } from '@openzeppelin/ui-builder-types';
3
+ import type { UiKitConfiguration, UiKitName } from '@openzeppelin/ui-types';
4
4
 
5
5
  import { resolveFullUiKitConfiguration } from '../configResolutionService';
6
6
 
@@ -1,5 +1,5 @@
1
- import type { NativeConfigLoader, UiKitConfiguration } from '@openzeppelin/ui-builder-types';
2
- import { logger } from '@openzeppelin/ui-builder-utils';
1
+ import type { NativeConfigLoader, UiKitConfiguration } from '@openzeppelin/ui-types';
2
+ import { logger } from '@openzeppelin/ui-utils';
3
3
 
4
4
  /**
5
5
  * Resolves the final, complete UiKitConfiguration for Stellar by merging various sources.
@@ -1,6 +1,6 @@
1
1
  import { useEffect, useRef } from 'react';
2
2
 
3
- import { logger } from '@openzeppelin/ui-builder-utils';
3
+ import { logger } from '@openzeppelin/ui-utils';
4
4
 
5
5
  import { setStellarConnectedAddress } from '../connection';
6
6
  import { stellarUiKitManager } from './stellarUiKitManager';
@@ -1,6 +1,6 @@
1
1
  import { describe, expect, it } from 'vitest';
2
2
 
3
- import type { UiKitConfiguration } from '@openzeppelin/ui-builder-types';
3
+ import type { UiKitConfiguration } from '@openzeppelin/ui-types';
4
4
 
5
5
  import { generateStellarWalletsKitExportables } from '../export-service';
6
6
 
@@ -1,4 +1,4 @@
1
- import type { UiKitConfiguration } from '@openzeppelin/ui-builder-types';
1
+ import type { UiKitConfiguration } from '@openzeppelin/ui-types';
2
2
 
3
3
  /**
4
4
  * Generates the content for a `stellar-wallets-kit.config.ts` file for an exported project.
@@ -1,4 +1,4 @@
1
- import type { UiKitConfiguration } from '@openzeppelin/ui-builder-types';
1
+ import type { UiKitConfiguration } from '@openzeppelin/ui-types';
2
2
 
3
3
  import { generateStellarWalletsKitConfigFile } from './config-generator';
4
4
 
@@ -1,7 +1,7 @@
1
1
  import { allowAllModules, StellarWalletsKit, WalletNetwork } from '@creit.tech/stellar-wallets-kit';
2
2
 
3
- import type { StellarNetworkConfig, UiKitConfiguration } from '@openzeppelin/ui-builder-types';
4
- import { logger } from '@openzeppelin/ui-builder-utils';
3
+ import type { StellarNetworkConfig, UiKitConfiguration } from '@openzeppelin/ui-types';
4
+ import { logger } from '@openzeppelin/ui-utils';
5
5
 
6
6
  import { getStellarWalletImplementation } from '../utils/stellarWalletImplementationManager';
7
7
 
@@ -1,4 +1,4 @@
1
- import type { WalletConnectionStatus } from '@openzeppelin/ui-builder-types';
1
+ import type { WalletConnectionStatus } from '@openzeppelin/ui-types';
2
2
 
3
3
  /**
4
4
  * Stellar-specific wallet connection status extending the base interface.
@@ -1,6 +1,6 @@
1
1
  import { describe, expect, it } from 'vitest';
2
2
 
3
- import type { EcosystemWalletComponents } from '@openzeppelin/ui-builder-types';
3
+ import type { EcosystemWalletComponents } from '@openzeppelin/ui-types';
4
4
 
5
5
  import {
6
6
  filterWalletComponents,
@@ -1,6 +1,6 @@
1
1
  import { beforeEach, describe, expect, it, vi } from 'vitest';
2
2
 
3
- import type { UiKitConfiguration, UiKitName } from '@openzeppelin/ui-builder-types';
3
+ import type { UiKitConfiguration, UiKitName } from '@openzeppelin/ui-types';
4
4
 
5
5
  import { CustomAccountDisplay, CustomConnectButton } from '../../components';
6
6
  import { getResolvedWalletComponents } from '../uiKitService';
@@ -1,6 +1,6 @@
1
- import type { EcosystemWalletComponents, UiKitConfiguration } from '@openzeppelin/ui-builder-types';
2
- import { ECOSYSTEM_WALLET_COMPONENT_KEYS } from '@openzeppelin/ui-builder-types';
3
- import { logger } from '@openzeppelin/ui-builder-utils';
1
+ import type { EcosystemWalletComponents, UiKitConfiguration } from '@openzeppelin/ui-types';
2
+ import { ECOSYSTEM_WALLET_COMPONENT_KEYS } from '@openzeppelin/ui-types';
3
+ import { logger } from '@openzeppelin/ui-utils';
4
4
 
5
5
  /**
6
6
  * Filters a set of wallet components based on an exclusion list.
@@ -1,5 +1,5 @@
1
- import type { StellarNetworkConfig, UiKitConfiguration } from '@openzeppelin/ui-builder-types';
2
- import { appConfigService, logger } from '@openzeppelin/ui-builder-utils';
1
+ import type { StellarNetworkConfig, UiKitConfiguration } from '@openzeppelin/ui-types';
2
+ import { appConfigService, logger } from '@openzeppelin/ui-utils';
3
3
 
4
4
  import { WalletsKitImplementation } from '../implementation/wallets-kit-implementation';
5
5
 
@@ -1,5 +1,5 @@
1
- import type { EcosystemWalletComponents, UiKitConfiguration } from '@openzeppelin/ui-builder-types';
2
- import { logger } from '@openzeppelin/ui-builder-utils';
1
+ import type { EcosystemWalletComponents, UiKitConfiguration } from '@openzeppelin/ui-types';
2
+ import { logger } from '@openzeppelin/ui-utils';
3
3
 
4
4
  import { CustomAccountDisplay, CustomConnectButton } from '../components';
5
5
  import { StellarWalletsKitConnectButton } from '../stellar-wallets-kit';