@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.
- package/README.md +1 -1
- package/dist/index.cjs +522 -486
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.js +101 -78
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
- package/src/access-control/actions.ts +1 -1
- package/src/access-control/feature-detection.ts +2 -2
- package/src/access-control/indexer-client.ts +3 -7
- package/src/access-control/onchain-reader.ts +3 -7
- package/src/access-control/service.ts +3 -3
- package/src/access-control/validation.ts +3 -3
- package/src/adapter.ts +12 -3
- package/src/config.ts +1 -1
- package/src/configuration/__tests__/explorer.test.ts +1 -1
- package/src/configuration/__tests__/rpc.test.ts +4 -4
- package/src/configuration/execution.ts +2 -2
- package/src/configuration/explorer.ts +2 -2
- package/src/configuration/network-services.ts +2 -2
- package/src/configuration/rpc.ts +2 -7
- package/src/contract/loader.ts +2 -2
- package/src/contract/type.ts +2 -2
- package/src/mapping/constants.ts +39 -1
- package/src/mapping/enum-metadata.ts +2 -2
- package/src/mapping/field-generator.ts +2 -2
- package/src/mapping/index.ts +1 -0
- package/src/mapping/struct-fields.ts +2 -2
- package/src/mapping/tuple-components.ts +1 -1
- package/src/mapping/type-coverage-validator.ts +2 -2
- package/src/mapping/type-mapper.ts +1 -1
- package/src/networks/index.ts +1 -1
- package/src/networks/mainnet.ts +2 -2
- package/src/networks/testnet.ts +1 -1
- package/src/query/handler.ts +2 -2
- package/src/query/view-checker.ts +1 -1
- package/src/sac/spec-cache.ts +1 -1
- package/src/sac/spec-source.ts +1 -1
- package/src/sac/xdr.ts +1 -1
- package/src/transaction/components/AdvancedInfo.tsx +1 -1
- package/src/transaction/components/FeeConfiguration.tsx +1 -1
- package/src/transaction/components/StellarRelayerOptions.tsx +1 -1
- package/src/transaction/components/TransactionTiming.tsx +1 -1
- package/src/transaction/eoa.ts +2 -2
- package/src/transaction/execution-strategy.ts +1 -1
- package/src/transaction/formatter.ts +3 -3
- package/src/transaction/relayer.ts +2 -2
- package/src/transaction/sender.ts +2 -2
- package/src/transform/output-formatter.ts +2 -2
- package/src/transform/parsers/complex-parser.ts +1 -1
- package/src/transform/parsers/generic-parser.ts +2 -2
- package/src/transform/parsers/index.ts +2 -2
- package/src/transform/parsers/primitive-parser.ts +1 -1
- package/src/transform/parsers/scval-converter.ts +2 -2
- package/src/transform/parsers/struct-parser.ts +2 -2
- package/src/utils/input-parsing.ts +1 -1
- package/src/utils/type-detection.ts +1 -1
- package/src/validation/eoa.ts +2 -2
- package/src/validation/relayer.ts +1 -1
- package/src/wallet/README.md +1 -1
- package/src/wallet/components/StellarWalletUiRoot.tsx +2 -2
- package/src/wallet/components/account/AccountDisplay.tsx +3 -3
- package/src/wallet/components/connect/ConnectButton.tsx +3 -3
- package/src/wallet/components/connect/ConnectorDialog.tsx +3 -3
- package/src/wallet/connection.ts +2 -2
- package/src/wallet/hooks/facade-hooks.ts +1 -1
- package/src/wallet/hooks/useStellarConnect.ts +1 -1
- package/src/wallet/hooks/useUiKitConfig.ts +2 -2
- package/src/wallet/implementation/wallets-kit-implementation.ts +2 -6
- package/src/wallet/services/__tests__/configResolutionService.test.ts +1 -1
- package/src/wallet/services/configResolutionService.ts +2 -2
- package/src/wallet/stellar-wallets-kit/StellarWalletsKitConnectButton.tsx +1 -1
- package/src/wallet/stellar-wallets-kit/__tests__/export-service.test.ts +1 -1
- package/src/wallet/stellar-wallets-kit/config-generator.ts +1 -1
- package/src/wallet/stellar-wallets-kit/export-service.ts +1 -1
- package/src/wallet/stellar-wallets-kit/stellarUiKitManager.ts +2 -2
- package/src/wallet/types.ts +1 -1
- package/src/wallet/utils/__tests__/filterWalletComponents.test.ts +1 -1
- package/src/wallet/utils/__tests__/uiKitService.test.ts +1 -1
- package/src/wallet/utils/filterWalletComponents.ts +3 -3
- package/src/wallet/utils/stellarWalletImplementationManager.ts +2 -2
- 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-
|
|
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-
|
|
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-
|
|
4
|
-
import { isPlainObject, logger } from '@openzeppelin/ui-
|
|
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-
|
|
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-
|
|
3
|
+
import { isDevelopmentOrTestEnvironment, logger } from '@openzeppelin/ui-utils';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Utility functions for detecting and analyzing Stellar/Soroban parameter types
|
package/src/validation/eoa.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { EoaExecutionConfig } from '@openzeppelin/ui-
|
|
2
|
-
import { logger } from '@openzeppelin/ui-
|
|
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';
|
package/src/wallet/README.md
CHANGED
|
@@ -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-
|
|
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-
|
|
5
|
-
import { logger } from '@openzeppelin/ui-
|
|
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
|
|
5
|
-
import {
|
|
6
|
-
import { cn, truncateMiddle } from '@openzeppelin/ui-
|
|
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
|
|
5
|
-
import {
|
|
6
|
-
import { cn } from '@openzeppelin/ui-
|
|
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-
|
|
12
|
-
import {
|
|
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';
|
package/src/wallet/connection.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Connector } from '@openzeppelin/ui-
|
|
2
|
-
import { logger } from '@openzeppelin/ui-
|
|
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-
|
|
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-
|
|
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-
|
|
2
|
-
import { appConfigService, logger } from '@openzeppelin/ui-
|
|
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
|
-
|
|
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-
|
|
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-
|
|
2
|
-
import { logger } from '@openzeppelin/ui-
|
|
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-
|
|
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-
|
|
3
|
+
import type { UiKitConfiguration } from '@openzeppelin/ui-types';
|
|
4
4
|
|
|
5
5
|
import { generateStellarWalletsKitExportables } from '../export-service';
|
|
6
6
|
|
|
@@ -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-
|
|
4
|
-
import { logger } from '@openzeppelin/ui-
|
|
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
|
|
package/src/wallet/types.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { beforeEach, describe, expect, it, vi } from 'vitest';
|
|
2
2
|
|
|
3
|
-
import type { UiKitConfiguration, UiKitName } from '@openzeppelin/ui-
|
|
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-
|
|
2
|
-
import { ECOSYSTEM_WALLET_COMPONENT_KEYS } from '@openzeppelin/ui-
|
|
3
|
-
import { logger } from '@openzeppelin/ui-
|
|
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-
|
|
2
|
-
import { appConfigService, logger } from '@openzeppelin/ui-
|
|
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-
|
|
2
|
-
import { logger } from '@openzeppelin/ui-
|
|
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';
|