@openzeppelin/ui-builder-adapter-stellar 1.1.3 → 1.3.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 +540 -494
- 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 +122 -89
- 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 +1 -1
- 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 +22 -11
- package/src/wallet/components/connect/ConnectButton.tsx +14 -9
- 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
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openzeppelin/ui-builder-adapter-stellar",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"description": "Stellar Adapter for UI Builder",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"openzeppelin",
|
|
@@ -35,16 +35,16 @@
|
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@creit.tech/stellar-wallets-kit": "^1.8.0",
|
|
37
37
|
"@openzeppelin/relayer-sdk": "1.4.0",
|
|
38
|
+
"@openzeppelin/ui-components": "^1.0.4",
|
|
39
|
+
"@openzeppelin/ui-types": "^1.2.0",
|
|
40
|
+
"@openzeppelin/ui-utils": "^1.1.0",
|
|
38
41
|
"@stellar/stellar-sdk": "^14.1.1",
|
|
39
42
|
"@stellar/stellar-xdr-json": "^23.0.0",
|
|
40
43
|
"@web3icons/react": "^4.0.19",
|
|
41
44
|
"lodash": "^4.17.21",
|
|
42
45
|
"lossless-json": "^4.0.2",
|
|
43
46
|
"lucide-react": "^0.510.0",
|
|
44
|
-
"react-hook-form": "^7.62.0"
|
|
45
|
-
"@openzeppelin/ui-builder-types": "1.0.0",
|
|
46
|
-
"@openzeppelin/ui-builder-utils": "^1.1.0",
|
|
47
|
-
"@openzeppelin/ui-builder-ui": "1.1.0"
|
|
47
|
+
"react-hook-form": "^7.62.0"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
50
|
"@types/lodash": "^4.17.20",
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
* from OpenZeppelin Stellar Contracts.
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
import type { AccessControlCapabilities, ContractSchema } from '@openzeppelin/ui-
|
|
10
|
-
import { UnsupportedContractFeatures } from '@openzeppelin/ui-
|
|
9
|
+
import type { AccessControlCapabilities, ContractSchema } from '@openzeppelin/ui-types';
|
|
10
|
+
import { UnsupportedContractFeatures } from '@openzeppelin/ui-types';
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
* Known OpenZeppelin Ownable function signatures
|
|
@@ -14,18 +14,14 @@ import type {
|
|
|
14
14
|
PaginatedHistoryResult,
|
|
15
15
|
RoleIdentifier,
|
|
16
16
|
StellarNetworkConfig,
|
|
17
|
-
} from '@openzeppelin/ui-
|
|
18
|
-
import {
|
|
19
|
-
ConfigurationInvalid,
|
|
20
|
-
IndexerUnavailable,
|
|
21
|
-
OperationFailed,
|
|
22
|
-
} from '@openzeppelin/ui-builder-types';
|
|
17
|
+
} from '@openzeppelin/ui-types';
|
|
18
|
+
import { ConfigurationInvalid, IndexerUnavailable, OperationFailed } from '@openzeppelin/ui-types';
|
|
23
19
|
import {
|
|
24
20
|
appConfigService,
|
|
25
21
|
isValidUrl,
|
|
26
22
|
logger,
|
|
27
23
|
userNetworkServiceConfigService,
|
|
28
|
-
} from '@openzeppelin/ui-
|
|
24
|
+
} from '@openzeppelin/ui-utils';
|
|
29
25
|
|
|
30
26
|
const LOG_SYSTEM = 'StellarIndexerClient';
|
|
31
27
|
|
|
@@ -13,13 +13,9 @@ import type {
|
|
|
13
13
|
RoleAssignment,
|
|
14
14
|
RoleIdentifier,
|
|
15
15
|
StellarNetworkConfig,
|
|
16
|
-
} from '@openzeppelin/ui-
|
|
17
|
-
import { OperationFailed } from '@openzeppelin/ui-
|
|
18
|
-
import {
|
|
19
|
-
DEFAULT_CONCURRENCY_LIMIT,
|
|
20
|
-
logger,
|
|
21
|
-
promiseAllWithLimit,
|
|
22
|
-
} from '@openzeppelin/ui-builder-utils';
|
|
16
|
+
} from '@openzeppelin/ui-types';
|
|
17
|
+
import { OperationFailed } from '@openzeppelin/ui-types';
|
|
18
|
+
import { DEFAULT_CONCURRENCY_LIMIT, logger, promiseAllWithLimit } from '@openzeppelin/ui-utils';
|
|
23
19
|
|
|
24
20
|
import { queryStellarViewFunction } from '../query/handler';
|
|
25
21
|
|
|
@@ -22,9 +22,9 @@ import type {
|
|
|
22
22
|
StellarNetworkConfig,
|
|
23
23
|
TransactionStatusUpdate,
|
|
24
24
|
TxStatus,
|
|
25
|
-
} from '@openzeppelin/ui-
|
|
26
|
-
import { ConfigurationInvalid, OperationFailed } from '@openzeppelin/ui-
|
|
27
|
-
import { logger, validateSnapshot } from '@openzeppelin/ui-
|
|
25
|
+
} from '@openzeppelin/ui-types';
|
|
26
|
+
import { ConfigurationInvalid, OperationFailed } from '@openzeppelin/ui-types';
|
|
27
|
+
import { logger, validateSnapshot } from '@openzeppelin/ui-utils';
|
|
28
28
|
|
|
29
29
|
import { signAndBroadcastStellarTransaction } from '../transaction/sender';
|
|
30
30
|
import {
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Centralizes address validation for access control operations.
|
|
5
5
|
* Uses Stellar-specific validation from the validation module and
|
|
6
|
-
* shared normalization utilities from @openzeppelin/ui-
|
|
6
|
+
* shared normalization utilities from @openzeppelin/ui-utils.
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
import { ConfigurationInvalid } from '@openzeppelin/ui-
|
|
10
|
-
import { normalizeAddress } from '@openzeppelin/ui-
|
|
9
|
+
import { ConfigurationInvalid } from '@openzeppelin/ui-types';
|
|
10
|
+
import { normalizeAddress } from '@openzeppelin/ui-utils';
|
|
11
11
|
|
|
12
12
|
import { isValidAccountAddress, isValidContractAddress } from '../validation/address';
|
|
13
13
|
|
package/src/adapter.ts
CHANGED
|
@@ -22,12 +22,13 @@ import type {
|
|
|
22
22
|
StellarNetworkConfig,
|
|
23
23
|
TransactionStatusUpdate,
|
|
24
24
|
TxStatus,
|
|
25
|
+
TypeMappingInfo,
|
|
25
26
|
UiKitConfiguration,
|
|
26
27
|
UserRpcProviderConfig,
|
|
27
28
|
WalletConnectionStatus,
|
|
28
|
-
} from '@openzeppelin/ui-
|
|
29
|
-
import { isStellarNetworkConfig } from '@openzeppelin/ui-
|
|
30
|
-
import { logger } from '@openzeppelin/ui-
|
|
29
|
+
} from '@openzeppelin/ui-types';
|
|
30
|
+
import { isStellarNetworkConfig } from '@openzeppelin/ui-types';
|
|
31
|
+
import { logger } from '@openzeppelin/ui-utils';
|
|
31
32
|
|
|
32
33
|
import { getCurrentLedger } from './access-control/onchain-reader';
|
|
33
34
|
import { createStellarAccessControlService } from './access-control/service';
|
|
@@ -52,6 +53,7 @@ import {
|
|
|
52
53
|
import {
|
|
53
54
|
generateStellarDefaultField,
|
|
54
55
|
getStellarCompatibleFieldTypes,
|
|
56
|
+
getStellarTypeMappingInfo,
|
|
55
57
|
mapStellarParameterTypeToFieldType,
|
|
56
58
|
} from './mapping';
|
|
57
59
|
import {
|
|
@@ -636,6 +638,13 @@ export class StellarAdapter implements ContractAdapter {
|
|
|
636
638
|
public getAccessControlService(): AccessControlService {
|
|
637
639
|
return this.accessControlService;
|
|
638
640
|
}
|
|
641
|
+
|
|
642
|
+
/**
|
|
643
|
+
* @inheritdoc
|
|
644
|
+
*/
|
|
645
|
+
public getTypeMappingInfo(): TypeMappingInfo {
|
|
646
|
+
return getStellarTypeMappingInfo();
|
|
647
|
+
}
|
|
639
648
|
}
|
|
640
649
|
|
|
641
650
|
// Also export as default to ensure compatibility with various import styles
|
package/src/config.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* when generating exported projects. It follows the AdapterConfig
|
|
6
6
|
* interface to provide a structured approach to dependency management.
|
|
7
7
|
*/
|
|
8
|
-
import type { AdapterConfig } from '@openzeppelin/ui-
|
|
8
|
+
import type { AdapterConfig } from '@openzeppelin/ui-types';
|
|
9
9
|
|
|
10
10
|
export const stellarAdapterConfig: AdapterConfig = {
|
|
11
11
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
|
|
2
2
|
|
|
3
|
-
import type { StellarNetworkConfig } from '@openzeppelin/ui-
|
|
4
|
-
import { appConfigService } from '@openzeppelin/ui-
|
|
3
|
+
import type { StellarNetworkConfig } from '@openzeppelin/ui-types';
|
|
4
|
+
import { appConfigService } from '@openzeppelin/ui-utils';
|
|
5
5
|
|
|
6
6
|
import { resolveRpcUrl, testStellarRpcConnection, validateStellarRpcEndpoint } from '../rpc';
|
|
7
7
|
|
|
@@ -25,8 +25,8 @@ const createMockConfig = (
|
|
|
25
25
|
});
|
|
26
26
|
|
|
27
27
|
// Mock the appConfigService from the correct package
|
|
28
|
-
vi.mock('@openzeppelin/ui-
|
|
29
|
-
const original = await importOriginal<typeof import('@openzeppelin/ui-
|
|
28
|
+
vi.mock('@openzeppelin/ui-utils', async (importOriginal) => {
|
|
29
|
+
const original = await importOriginal<typeof import('@openzeppelin/ui-utils')>();
|
|
30
30
|
return {
|
|
31
31
|
...original,
|
|
32
32
|
logger: {
|
|
@@ -4,8 +4,8 @@ import type {
|
|
|
4
4
|
ExecutionMethodDetail,
|
|
5
5
|
MultisigExecutionConfig,
|
|
6
6
|
RelayerExecutionConfig,
|
|
7
|
-
} from '@openzeppelin/ui-
|
|
8
|
-
import { logger } from '@openzeppelin/ui-
|
|
7
|
+
} from '@openzeppelin/ui-types';
|
|
8
|
+
import { logger } from '@openzeppelin/ui-utils';
|
|
9
9
|
|
|
10
10
|
import { validateEoaConfig, validateRelayerConfig } from '../validation';
|
|
11
11
|
import { StellarWalletConnectionStatus } from '../wallet/types';
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
* are critical infrastructure for ABI fetching. See comments below for detailed explanation.
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
import { NetworkConfig } from '@openzeppelin/ui-
|
|
10
|
-
import type { UserExplorerConfig } from '@openzeppelin/ui-
|
|
9
|
+
import { NetworkConfig } from '@openzeppelin/ui-types';
|
|
10
|
+
import type { UserExplorerConfig } from '@openzeppelin/ui-types';
|
|
11
11
|
|
|
12
12
|
import { isValidContractAddress } from '../validation';
|
|
13
13
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { NetworkServiceForm, UserRpcProviderConfig } from '@openzeppelin/ui-
|
|
2
|
-
import { isValidUrl } from '@openzeppelin/ui-
|
|
1
|
+
import type { NetworkServiceForm, UserRpcProviderConfig } from '@openzeppelin/ui-types';
|
|
2
|
+
import { isValidUrl } from '@openzeppelin/ui-utils';
|
|
3
3
|
|
|
4
4
|
import { testStellarRpcConnection, validateStellarRpcEndpoint } from './rpc';
|
|
5
5
|
|
package/src/configuration/rpc.ts
CHANGED
|
@@ -1,10 +1,5 @@
|
|
|
1
|
-
import type { StellarNetworkConfig, UserRpcProviderConfig } from '@openzeppelin/ui-
|
|
2
|
-
import {
|
|
3
|
-
appConfigService,
|
|
4
|
-
isValidUrl,
|
|
5
|
-
logger,
|
|
6
|
-
userRpcConfigService,
|
|
7
|
-
} from '@openzeppelin/ui-builder-utils';
|
|
1
|
+
import type { StellarNetworkConfig, UserRpcProviderConfig } from '@openzeppelin/ui-types';
|
|
2
|
+
import { appConfigService, isValidUrl, logger, userRpcConfigService } from '@openzeppelin/ui-utils';
|
|
8
3
|
|
|
9
4
|
/**
|
|
10
5
|
* Builds a complete RPC URL from a user RPC provider configuration.
|
package/src/contract/loader.ts
CHANGED
|
@@ -6,8 +6,8 @@ import type {
|
|
|
6
6
|
ContractSchema,
|
|
7
7
|
FunctionParameter,
|
|
8
8
|
StellarNetworkConfig,
|
|
9
|
-
} from '@openzeppelin/ui-
|
|
10
|
-
import { logger } from '@openzeppelin/ui-
|
|
9
|
+
} from '@openzeppelin/ui-types';
|
|
10
|
+
import { logger } from '@openzeppelin/ui-utils';
|
|
11
11
|
|
|
12
12
|
import { getStellarExplorerAddressUrl } from '../configuration/explorer';
|
|
13
13
|
import { extractStructFields, isStructType } from '../mapping/struct-fields';
|
package/src/contract/type.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Contract, rpc as StellarRpc, xdr } from '@stellar/stellar-sdk';
|
|
2
2
|
|
|
3
|
-
import type { StellarNetworkConfig } from '@openzeppelin/ui-
|
|
4
|
-
import { logger, userRpcConfigService } from '@openzeppelin/ui-
|
|
3
|
+
import type { StellarNetworkConfig } from '@openzeppelin/ui-types';
|
|
4
|
+
import { logger, userRpcConfigService } from '@openzeppelin/ui-utils';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Returns a Soroban RPC server instance honoring user overrides.
|
package/src/mapping/constants.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { FieldType } from '@openzeppelin/ui-
|
|
1
|
+
import type { FieldType, TypeMappingInfo } from '@openzeppelin/ui-types';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Stellar/Soroban-specific type mapping to default form field types.
|
|
@@ -49,3 +49,41 @@ export const STELLAR_TYPE_TO_FIELD_TYPE: Record<string, FieldType> = {
|
|
|
49
49
|
// Instance types (for compatibility)
|
|
50
50
|
Instance: 'object',
|
|
51
51
|
};
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Stellar dynamic type patterns handled through pattern matching.
|
|
55
|
+
*/
|
|
56
|
+
const STELLAR_DYNAMIC_PATTERNS: TypeMappingInfo['dynamicPatterns'] = [
|
|
57
|
+
{ name: 'vec', syntax: 'Vec<T>', mapsTo: null, description: 'Array (maps based on inner type)' },
|
|
58
|
+
{ name: 'map', syntax: 'Map<K,V>', mapsTo: 'map', description: 'Key-value map' },
|
|
59
|
+
{
|
|
60
|
+
name: 'option',
|
|
61
|
+
syntax: 'Option<T>',
|
|
62
|
+
mapsTo: 'unwrap',
|
|
63
|
+
description: 'Optional, resolves to inner type',
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
name: 'result',
|
|
67
|
+
syntax: 'Result<T>',
|
|
68
|
+
mapsTo: 'unwrap',
|
|
69
|
+
description: 'Result, resolves to inner type',
|
|
70
|
+
},
|
|
71
|
+
{ name: 'bytes-n', syntax: 'BytesN<N>', mapsTo: 'bytes', description: 'Fixed-size byte array' },
|
|
72
|
+
{
|
|
73
|
+
name: 'struct',
|
|
74
|
+
syntax: 'StructName',
|
|
75
|
+
mapsTo: 'object',
|
|
76
|
+
description: 'Custom struct (PascalCase)',
|
|
77
|
+
},
|
|
78
|
+
{ name: 'enum', syntax: 'EnumName', mapsTo: 'select', description: 'Enum type' },
|
|
79
|
+
];
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* Returns complete type mapping information for Stellar.
|
|
83
|
+
*/
|
|
84
|
+
export function getStellarTypeMappingInfo(): TypeMappingInfo {
|
|
85
|
+
return {
|
|
86
|
+
primitives: { ...STELLAR_TYPE_TO_FIELD_TYPE },
|
|
87
|
+
dynamicPatterns: STELLAR_DYNAMIC_PATTERNS,
|
|
88
|
+
};
|
|
89
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { xdr } from '@stellar/stellar-sdk';
|
|
2
2
|
|
|
3
|
-
import type { FunctionParameter } from '@openzeppelin/ui-
|
|
4
|
-
import { logger } from '@openzeppelin/ui-
|
|
3
|
+
import type { FunctionParameter } from '@openzeppelin/ui-types';
|
|
4
|
+
import { logger } from '@openzeppelin/ui-utils';
|
|
5
5
|
|
|
6
6
|
// Import the type extraction utility from the shared utils module
|
|
7
7
|
import { extractSorobanTypeFromScSpec } from '../utils/type-detection';
|
|
@@ -8,13 +8,13 @@ import type {
|
|
|
8
8
|
FieldValue,
|
|
9
9
|
FormFieldType,
|
|
10
10
|
FunctionParameter,
|
|
11
|
-
} from '@openzeppelin/ui-
|
|
11
|
+
} from '@openzeppelin/ui-types';
|
|
12
12
|
import {
|
|
13
13
|
enhanceNumericValidation,
|
|
14
14
|
getDefaultValueForType,
|
|
15
15
|
logger,
|
|
16
16
|
type NumericBoundsMap,
|
|
17
|
-
} from '@openzeppelin/ui-
|
|
17
|
+
} from '@openzeppelin/ui-utils';
|
|
18
18
|
|
|
19
19
|
import { extractMapTypes, extractVecElementType } from '../utils/safe-type-parser';
|
|
20
20
|
import { isBytesNType, isLikelyEnumType } from '../utils/type-detection';
|
package/src/mapping/index.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { xdr } from '@stellar/stellar-sdk';
|
|
2
2
|
|
|
3
|
-
import type { FunctionParameter } from '@openzeppelin/ui-
|
|
4
|
-
import { logger } from '@openzeppelin/ui-
|
|
3
|
+
import type { FunctionParameter } from '@openzeppelin/ui-types';
|
|
4
|
+
import { logger } from '@openzeppelin/ui-utils';
|
|
5
5
|
|
|
6
6
|
// Import the type extraction utility from the shared utils module
|
|
7
7
|
import { extractSorobanTypeFromScSpec } from '../utils/type-detection';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { xdr } from '@stellar/stellar-sdk';
|
|
2
2
|
|
|
3
|
-
import type { FunctionParameter } from '@openzeppelin/ui-
|
|
3
|
+
import type { FunctionParameter } from '@openzeppelin/ui-types';
|
|
4
4
|
|
|
5
5
|
import { extractTupleTypes } from '../utils/safe-type-parser';
|
|
6
6
|
import { extractStructFields, isStructType } from './struct-fields';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { FieldType } from '@openzeppelin/ui-
|
|
2
|
-
import { logger } from '@openzeppelin/ui-
|
|
1
|
+
import type { FieldType } from '@openzeppelin/ui-types';
|
|
2
|
+
import { logger } from '@openzeppelin/ui-utils';
|
|
3
3
|
|
|
4
4
|
import { STELLAR_TYPE_TO_FIELD_TYPE } from './constants';
|
|
5
5
|
import { mapStellarParameterTypeToFieldType } from './type-mapper';
|
package/src/networks/index.ts
CHANGED
package/src/networks/mainnet.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { NetworkStellar } from '@web3icons/react';
|
|
2
2
|
|
|
3
|
-
import { StellarNetworkConfig } from '@openzeppelin/ui-
|
|
3
|
+
import { StellarNetworkConfig } from '@openzeppelin/ui-types';
|
|
4
4
|
|
|
5
5
|
// Stellar Public Network (Mainnet)
|
|
6
6
|
export const stellarPublic: StellarNetworkConfig = {
|
package/src/networks/testnet.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { NetworkStellar } from '@web3icons/react';
|
|
2
2
|
|
|
3
|
-
import { StellarNetworkConfig } from '@openzeppelin/ui-
|
|
3
|
+
import { StellarNetworkConfig } from '@openzeppelin/ui-types';
|
|
4
4
|
|
|
5
5
|
// Stellar Testnet
|
|
6
6
|
export const stellarTestnet: StellarNetworkConfig = {
|
package/src/query/handler.ts
CHANGED
|
@@ -13,8 +13,8 @@ import type {
|
|
|
13
13
|
FunctionParameter,
|
|
14
14
|
NetworkConfig,
|
|
15
15
|
StellarNetworkConfig,
|
|
16
|
-
} from '@openzeppelin/ui-
|
|
17
|
-
import { logger, userRpcConfigService } from '@openzeppelin/ui-
|
|
16
|
+
} from '@openzeppelin/ui-types';
|
|
17
|
+
import { logger, userRpcConfigService } from '@openzeppelin/ui-utils';
|
|
18
18
|
|
|
19
19
|
import { parseStellarInput } from '../transform';
|
|
20
20
|
import { formatStellarFunctionResult } from '../transform/output-formatter';
|
package/src/sac/spec-cache.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { xdr } from '@stellar/stellar-sdk';
|
|
2
2
|
|
|
3
|
-
import { logger } from '@openzeppelin/ui-
|
|
3
|
+
import { logger } from '@openzeppelin/ui-utils';
|
|
4
4
|
|
|
5
5
|
import type { SacSpecSourceConfig } from './spec-source';
|
|
6
6
|
import { fetchSacSpecJson, getSacSpecUrl } from './spec-source';
|
package/src/sac/spec-source.ts
CHANGED
package/src/sac/xdr.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { xdr } from '@stellar/stellar-sdk';
|
|
|
2
2
|
import stellarXdrJsonPackage from '@stellar/stellar-xdr-json/package.json' with { type: 'json' };
|
|
3
3
|
import { parse, stringify } from 'lossless-json';
|
|
4
4
|
|
|
5
|
-
import { logger } from '@openzeppelin/ui-
|
|
5
|
+
import { logger } from '@openzeppelin/ui-utils';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* CDN URL for the stellar-xdr-json WASM module.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Control } from 'react-hook-form';
|
|
3
3
|
|
|
4
|
-
import { BooleanField, NumberField } from '@openzeppelin/ui-
|
|
4
|
+
import { BooleanField, NumberField } from '@openzeppelin/ui-components';
|
|
5
5
|
|
|
6
6
|
import type { StellarRelayerFormData } from './useStellarRelayerOptions';
|
|
7
7
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
|
|
3
|
-
import { Tabs, TabsContent, TabsList, TabsTrigger } from '@openzeppelin/ui-
|
|
3
|
+
import { Tabs, TabsContent, TabsList, TabsTrigger } from '@openzeppelin/ui-components';
|
|
4
4
|
|
|
5
5
|
import { AdvancedInfo } from './AdvancedInfo';
|
|
6
6
|
import { FeeConfiguration } from './FeeConfiguration';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Control, Controller } from 'react-hook-form';
|
|
3
3
|
|
|
4
|
-
import { Button, DateTimeField } from '@openzeppelin/ui-
|
|
4
|
+
import { Button, DateTimeField } from '@openzeppelin/ui-components';
|
|
5
5
|
|
|
6
6
|
import type { StellarRelayerFormData } from './useStellarRelayerOptions';
|
|
7
7
|
|
package/src/transaction/eoa.ts
CHANGED
|
@@ -11,8 +11,8 @@ import type {
|
|
|
11
11
|
StellarNetworkConfig,
|
|
12
12
|
TransactionStatusUpdate,
|
|
13
13
|
TxStatus,
|
|
14
|
-
} from '@openzeppelin/ui-
|
|
15
|
-
import { logger, userRpcConfigService } from '@openzeppelin/ui-
|
|
14
|
+
} from '@openzeppelin/ui-types';
|
|
15
|
+
import { logger, userRpcConfigService } from '@openzeppelin/ui-utils';
|
|
16
16
|
|
|
17
17
|
import { CALLER_PLACEHOLDER } from '../access-control/actions';
|
|
18
18
|
import { valueToScVal } from '../transform/input-parser';
|
|
@@ -5,9 +5,9 @@ import type {
|
|
|
5
5
|
EnumValue,
|
|
6
6
|
FormFieldType,
|
|
7
7
|
FunctionParameter,
|
|
8
|
-
} from '@openzeppelin/ui-
|
|
9
|
-
import { isEnumValue } from '@openzeppelin/ui-
|
|
10
|
-
import { logger } from '@openzeppelin/ui-
|
|
8
|
+
} from '@openzeppelin/ui-types';
|
|
9
|
+
import { isEnumValue } from '@openzeppelin/ui-types';
|
|
10
|
+
import { logger } from '@openzeppelin/ui-utils';
|
|
11
11
|
|
|
12
12
|
import { extractEnumVariants, isEnumType } from '../mapping/enum-metadata';
|
|
13
13
|
import { parseStellarInput } from '../transform';
|
|
@@ -24,8 +24,8 @@ import type {
|
|
|
24
24
|
StellarNetworkConfig,
|
|
25
25
|
TransactionStatusUpdate,
|
|
26
26
|
TxStatus,
|
|
27
|
-
} from '@openzeppelin/ui-
|
|
28
|
-
import { logger } from '@openzeppelin/ui-
|
|
27
|
+
} from '@openzeppelin/ui-types';
|
|
28
|
+
import { logger } from '@openzeppelin/ui-utils';
|
|
29
29
|
|
|
30
30
|
import { CALLER_PLACEHOLDER } from '../access-control/actions';
|
|
31
31
|
import { valueToScVal } from '../transform/input-parser';
|
|
@@ -5,8 +5,8 @@ import type {
|
|
|
5
5
|
StellarNetworkConfig,
|
|
6
6
|
TransactionStatusUpdate,
|
|
7
7
|
TxStatus,
|
|
8
|
-
} from '@openzeppelin/ui-
|
|
9
|
-
import { logger, userRpcConfigService } from '@openzeppelin/ui-
|
|
8
|
+
} from '@openzeppelin/ui-types';
|
|
9
|
+
import { logger, userRpcConfigService } from '@openzeppelin/ui-utils';
|
|
10
10
|
|
|
11
11
|
import { EoaExecutionStrategy } from './eoa';
|
|
12
12
|
import { ExecutionStrategy } from './execution-strategy';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { scValToNative, xdr } from '@stellar/stellar-sdk';
|
|
2
2
|
|
|
3
|
-
import type { ContractFunction } from '@openzeppelin/ui-
|
|
4
|
-
import { bytesToHex, logger } from '@openzeppelin/ui-
|
|
3
|
+
import type { ContractFunction } from '@openzeppelin/ui-types';
|
|
4
|
+
import { bytesToHex, logger } from '@openzeppelin/ui-utils';
|
|
5
5
|
|
|
6
6
|
import { isSerializableObject, stringifyWithBigInt } from '../utils';
|
|
7
7
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { nativeToScVal, xdr } from '@stellar/stellar-sdk';
|
|
2
2
|
|
|
3
|
-
import { detectBytesEncoding, stringToBytes } from '@openzeppelin/ui-
|
|
3
|
+
import { detectBytesEncoding, stringToBytes } from '@openzeppelin/ui-utils';
|
|
4
4
|
|
|
5
5
|
import { convertStellarTypeToScValType } from '../../utils/formatting';
|
|
6
6
|
import {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { isMapEntryArray } from '@openzeppelin/ui-
|
|
2
|
-
import { logger } from '@openzeppelin/ui-
|
|
1
|
+
import { isMapEntryArray } from '@openzeppelin/ui-types';
|
|
2
|
+
import { logger } from '@openzeppelin/ui-utils';
|
|
3
3
|
|
|
4
4
|
const SYSTEM_LOG_TAG = 'GenericParser';
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { isEnumValue } from '@openzeppelin/ui-
|
|
2
|
-
import { isPlainObject, logger } from '@openzeppelin/ui-
|
|
1
|
+
import { isEnumValue } from '@openzeppelin/ui-types';
|
|
2
|
+
import { isPlainObject, logger } from '@openzeppelin/ui-utils';
|
|
3
3
|
|
|
4
4
|
import { isLikelyEnumType } from '../../utils/type-detection';
|
|
5
5
|
import { isGenericType, parseGeneric } from './generic-parser';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Address } 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
|
const SYSTEM_LOG_TAG = 'PrimitiveParser';
|
|
6
6
|
|
|
@@ -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
|
|