@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
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { WalletConnectionStatus, ContractAdapter, StellarNetworkConfig, UiKitConfiguration, NetworkServiceForm, FormFieldType, ContractSchema, FieldType, FunctionParameter, ExecutionConfig, TxStatus, TransactionStatusUpdate, ContractFunction, Connector, ExecutionMethodDetail, AvailableUiKit, NativeConfigLoader, EcosystemWalletComponents, EcosystemReactUiProviderProps, EcosystemSpecificReactHooks, RelayerDetails, RelayerDetailsRich, UserRpcProviderConfig, AccessControlService, AdapterConfig } from '@openzeppelin/ui-
|
|
2
|
+
import { WalletConnectionStatus, ContractAdapter, StellarNetworkConfig, UiKitConfiguration, NetworkServiceForm, FormFieldType, ContractSchema, FieldType, FunctionParameter, ExecutionConfig, TxStatus, TransactionStatusUpdate, ContractFunction, Connector, ExecutionMethodDetail, AvailableUiKit, NativeConfigLoader, EcosystemWalletComponents, EcosystemReactUiProviderProps, EcosystemSpecificReactHooks, RelayerDetails, RelayerDetailsRich, UserRpcProviderConfig, AccessControlService, TypeMappingInfo, AdapterConfig } from '@openzeppelin/ui-types';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Stellar-specific wallet connection status extending the base interface.
|
|
@@ -226,6 +226,10 @@ declare class StellarAdapter implements ContractAdapter {
|
|
|
226
226
|
* @inheritdoc
|
|
227
227
|
*/
|
|
228
228
|
getAccessControlService(): AccessControlService;
|
|
229
|
+
/**
|
|
230
|
+
* @inheritdoc
|
|
231
|
+
*/
|
|
232
|
+
getTypeMappingInfo(): TypeMappingInfo;
|
|
229
233
|
}
|
|
230
234
|
|
|
231
235
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { WalletConnectionStatus, ContractAdapter, StellarNetworkConfig, UiKitConfiguration, NetworkServiceForm, FormFieldType, ContractSchema, FieldType, FunctionParameter, ExecutionConfig, TxStatus, TransactionStatusUpdate, ContractFunction, Connector, ExecutionMethodDetail, AvailableUiKit, NativeConfigLoader, EcosystemWalletComponents, EcosystemReactUiProviderProps, EcosystemSpecificReactHooks, RelayerDetails, RelayerDetailsRich, UserRpcProviderConfig, AccessControlService, AdapterConfig } from '@openzeppelin/ui-
|
|
2
|
+
import { WalletConnectionStatus, ContractAdapter, StellarNetworkConfig, UiKitConfiguration, NetworkServiceForm, FormFieldType, ContractSchema, FieldType, FunctionParameter, ExecutionConfig, TxStatus, TransactionStatusUpdate, ContractFunction, Connector, ExecutionMethodDetail, AvailableUiKit, NativeConfigLoader, EcosystemWalletComponents, EcosystemReactUiProviderProps, EcosystemSpecificReactHooks, RelayerDetails, RelayerDetailsRich, UserRpcProviderConfig, AccessControlService, TypeMappingInfo, AdapterConfig } from '@openzeppelin/ui-types';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Stellar-specific wallet connection status extending the base interface.
|
|
@@ -226,6 +226,10 @@ declare class StellarAdapter implements ContractAdapter {
|
|
|
226
226
|
* @inheritdoc
|
|
227
227
|
*/
|
|
228
228
|
getAccessControlService(): AccessControlService;
|
|
229
|
+
/**
|
|
230
|
+
* @inheritdoc
|
|
231
|
+
*/
|
|
232
|
+
getTypeMappingInfo(): TypeMappingInfo;
|
|
229
233
|
}
|
|
230
234
|
|
|
231
235
|
/**
|
package/dist/index.js
CHANGED
|
@@ -3,17 +3,13 @@ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { en
|
|
|
3
3
|
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
4
4
|
|
|
5
5
|
// src/adapter.ts
|
|
6
|
-
import { isStellarNetworkConfig } from "@openzeppelin/ui-
|
|
7
|
-
import { logger as logger39 } from "@openzeppelin/ui-
|
|
6
|
+
import { isStellarNetworkConfig } from "@openzeppelin/ui-types";
|
|
7
|
+
import { logger as logger39 } from "@openzeppelin/ui-utils";
|
|
8
8
|
|
|
9
9
|
// src/access-control/onchain-reader.ts
|
|
10
10
|
import { rpc as StellarRpc2 } from "@stellar/stellar-sdk";
|
|
11
|
-
import { OperationFailed } from "@openzeppelin/ui-
|
|
12
|
-
import {
|
|
13
|
-
DEFAULT_CONCURRENCY_LIMIT,
|
|
14
|
-
logger as logger9,
|
|
15
|
-
promiseAllWithLimit
|
|
16
|
-
} from "@openzeppelin/ui-builder-utils";
|
|
11
|
+
import { OperationFailed } from "@openzeppelin/ui-types";
|
|
12
|
+
import { DEFAULT_CONCURRENCY_LIMIT, logger as logger9, promiseAllWithLimit } from "@openzeppelin/ui-utils";
|
|
17
13
|
|
|
18
14
|
// src/query/handler.ts
|
|
19
15
|
import {
|
|
@@ -25,15 +21,15 @@ import {
|
|
|
25
21
|
rpc as StellarRpc,
|
|
26
22
|
TransactionBuilder
|
|
27
23
|
} from "@stellar/stellar-sdk";
|
|
28
|
-
import { logger as logger8, userRpcConfigService } from "@openzeppelin/ui-
|
|
24
|
+
import { logger as logger8, userRpcConfigService } from "@openzeppelin/ui-utils";
|
|
29
25
|
|
|
30
26
|
// src/transform/parsers/index.ts
|
|
31
|
-
import { isEnumValue as isEnumValue3 } from "@openzeppelin/ui-
|
|
32
|
-
import { isPlainObject as isPlainObject2, logger as logger6 } from "@openzeppelin/ui-
|
|
27
|
+
import { isEnumValue as isEnumValue3 } from "@openzeppelin/ui-types";
|
|
28
|
+
import { isPlainObject as isPlainObject2, logger as logger6 } from "@openzeppelin/ui-utils";
|
|
33
29
|
|
|
34
30
|
// src/utils/type-detection.ts
|
|
35
31
|
import * as StellarSdk from "@stellar/stellar-sdk";
|
|
36
|
-
import { isDevelopmentOrTestEnvironment, logger } from "@openzeppelin/ui-
|
|
32
|
+
import { isDevelopmentOrTestEnvironment, logger } from "@openzeppelin/ui-utils";
|
|
37
33
|
function extractSorobanTypeFromScSpec(scSpecType) {
|
|
38
34
|
try {
|
|
39
35
|
const typeSwitch = scSpecType.switch();
|
|
@@ -160,8 +156,8 @@ function isBytesNType(parameterType) {
|
|
|
160
156
|
}
|
|
161
157
|
|
|
162
158
|
// src/transform/parsers/generic-parser.ts
|
|
163
|
-
import { isMapEntryArray } from "@openzeppelin/ui-
|
|
164
|
-
import { logger as logger2 } from "@openzeppelin/ui-
|
|
159
|
+
import { isMapEntryArray } from "@openzeppelin/ui-types";
|
|
160
|
+
import { logger as logger2 } from "@openzeppelin/ui-utils";
|
|
165
161
|
var SYSTEM_LOG_TAG = "GenericParser";
|
|
166
162
|
function parseGenericType(typeString) {
|
|
167
163
|
const match = typeString.match(/^(\w+)<(.*)>$/);
|
|
@@ -275,7 +271,7 @@ function isGenericType(parameterType) {
|
|
|
275
271
|
|
|
276
272
|
// src/transform/parsers/primitive-parser.ts
|
|
277
273
|
import { Address } from "@stellar/stellar-sdk";
|
|
278
|
-
import { detectBytesEncoding, logger as logger3, stringToBytes } from "@openzeppelin/ui-
|
|
274
|
+
import { detectBytesEncoding, logger as logger3, stringToBytes } from "@openzeppelin/ui-utils";
|
|
279
275
|
var SYSTEM_LOG_TAG2 = "PrimitiveParser";
|
|
280
276
|
function parsePrimitive(value, parameterType) {
|
|
281
277
|
try {
|
|
@@ -359,7 +355,7 @@ function isPrimitiveType(parameterType) {
|
|
|
359
355
|
|
|
360
356
|
// src/transform/parsers/complex-parser.ts
|
|
361
357
|
import { nativeToScVal as nativeToScVal2, xdr as xdr3 } from "@stellar/stellar-sdk";
|
|
362
|
-
import { detectBytesEncoding as detectBytesEncoding3, stringToBytes as stringToBytes3 } from "@openzeppelin/ui-
|
|
358
|
+
import { detectBytesEncoding as detectBytesEncoding3, stringToBytes as stringToBytes3 } from "@openzeppelin/ui-utils";
|
|
363
359
|
|
|
364
360
|
// src/utils/safe-type-parser.ts
|
|
365
361
|
var PARSING_LIMITS = {
|
|
@@ -583,7 +579,7 @@ function convertStellarTypeToScValType(stellarType) {
|
|
|
583
579
|
|
|
584
580
|
// src/utils/input-parsing.ts
|
|
585
581
|
import { nativeToScVal, xdr as xdr2 } from "@stellar/stellar-sdk";
|
|
586
|
-
import { detectBytesEncoding as detectBytesEncoding2, logger as logger4, stringToBytes as stringToBytes2 } from "@openzeppelin/ui-
|
|
582
|
+
import { detectBytesEncoding as detectBytesEncoding2, logger as logger4, stringToBytes as stringToBytes2 } from "@openzeppelin/ui-utils";
|
|
587
583
|
|
|
588
584
|
// src/utils/xdr-ordering.ts
|
|
589
585
|
function compareScValsByXdr(a, b) {
|
|
@@ -740,7 +736,7 @@ function convertObjectToMap(mapArray) {
|
|
|
740
736
|
|
|
741
737
|
// src/transform/parsers/scval-converter.ts
|
|
742
738
|
import { nativeToScVal as nativeToScVal4, xdr as xdr5 } from "@stellar/stellar-sdk";
|
|
743
|
-
import { isEnumValue as isEnumValue2 } from "@openzeppelin/ui-
|
|
739
|
+
import { isEnumValue as isEnumValue2 } from "@openzeppelin/ui-types";
|
|
744
740
|
|
|
745
741
|
// src/utils/stellar-types.ts
|
|
746
742
|
var PRIMITIVE_STELLAR_TYPES = /* @__PURE__ */ new Set([
|
|
@@ -768,8 +764,8 @@ function isPrimitiveParamType(type) {
|
|
|
768
764
|
|
|
769
765
|
// src/transform/parsers/struct-parser.ts
|
|
770
766
|
import { nativeToScVal as nativeToScVal3, xdr as xdr4 } from "@stellar/stellar-sdk";
|
|
771
|
-
import { isEnumValue } from "@openzeppelin/ui-
|
|
772
|
-
import { isPlainObject, logger as logger5 } from "@openzeppelin/ui-
|
|
767
|
+
import { isEnumValue } from "@openzeppelin/ui-types";
|
|
768
|
+
import { isPlainObject, logger as logger5 } from "@openzeppelin/ui-utils";
|
|
773
769
|
var SYSTEM_LOG_TAG4 = "StructParser";
|
|
774
770
|
function isTupleStructSchema(schema) {
|
|
775
771
|
if (!schema?.components || schema.components.length === 0) {
|
|
@@ -1235,7 +1231,7 @@ function parseStellarInput(value, parameterType) {
|
|
|
1235
1231
|
|
|
1236
1232
|
// src/transform/output-formatter.ts
|
|
1237
1233
|
import { scValToNative, xdr as xdr6 } from "@stellar/stellar-sdk";
|
|
1238
|
-
import { bytesToHex, logger as logger7 } from "@openzeppelin/ui-
|
|
1234
|
+
import { bytesToHex, logger as logger7 } from "@openzeppelin/ui-utils";
|
|
1239
1235
|
|
|
1240
1236
|
// src/types/artifacts.ts
|
|
1241
1237
|
function isStellarContractArtifacts(obj) {
|
|
@@ -1780,12 +1776,12 @@ async function getCurrentLedger(networkConfig) {
|
|
|
1780
1776
|
}
|
|
1781
1777
|
|
|
1782
1778
|
// src/access-control/service.ts
|
|
1783
|
-
import { ConfigurationInvalid as ConfigurationInvalid3, OperationFailed as OperationFailed3 } from "@openzeppelin/ui-
|
|
1784
|
-
import { logger as logger20, validateSnapshot } from "@openzeppelin/ui-
|
|
1779
|
+
import { ConfigurationInvalid as ConfigurationInvalid3, OperationFailed as OperationFailed3 } from "@openzeppelin/ui-types";
|
|
1780
|
+
import { logger as logger20, validateSnapshot } from "@openzeppelin/ui-utils";
|
|
1785
1781
|
|
|
1786
1782
|
// src/transaction/sender.ts
|
|
1787
1783
|
import { rpc as StellarRpc5 } from "@stellar/stellar-sdk";
|
|
1788
|
-
import { logger as logger18, userRpcConfigService as userRpcConfigService3 } from "@openzeppelin/ui-
|
|
1784
|
+
import { logger as logger18, userRpcConfigService as userRpcConfigService3 } from "@openzeppelin/ui-utils";
|
|
1789
1785
|
|
|
1790
1786
|
// src/transaction/eoa.ts
|
|
1791
1787
|
import {
|
|
@@ -1795,10 +1791,10 @@ import {
|
|
|
1795
1791
|
rpc as StellarRpc3,
|
|
1796
1792
|
TransactionBuilder as TransactionBuilder2
|
|
1797
1793
|
} from "@stellar/stellar-sdk";
|
|
1798
|
-
import { logger as logger16, userRpcConfigService as userRpcConfigService2 } from "@openzeppelin/ui-
|
|
1794
|
+
import { logger as logger16, userRpcConfigService as userRpcConfigService2 } from "@openzeppelin/ui-utils";
|
|
1799
1795
|
|
|
1800
1796
|
// src/access-control/actions.ts
|
|
1801
|
-
import { logger as logger10 } from "@openzeppelin/ui-
|
|
1797
|
+
import { logger as logger10 } from "@openzeppelin/ui-utils";
|
|
1802
1798
|
var CALLER_PLACEHOLDER = "__CALLER__";
|
|
1803
1799
|
function assembleGrantRoleAction(contractAddress, roleId, account, caller = CALLER_PLACEHOLDER) {
|
|
1804
1800
|
logger10.info(
|
|
@@ -1886,10 +1882,10 @@ function assembleAcceptAdminTransferAction(contractAddress) {
|
|
|
1886
1882
|
}
|
|
1887
1883
|
|
|
1888
1884
|
// src/wallet/connection.ts
|
|
1889
|
-
import { logger as logger15 } from "@openzeppelin/ui-
|
|
1885
|
+
import { logger as logger15 } from "@openzeppelin/ui-utils";
|
|
1890
1886
|
|
|
1891
1887
|
// src/wallet/utils/stellarWalletImplementationManager.ts
|
|
1892
|
-
import { appConfigService, logger as logger12 } from "@openzeppelin/ui-
|
|
1888
|
+
import { appConfigService, logger as logger12 } from "@openzeppelin/ui-utils";
|
|
1893
1889
|
|
|
1894
1890
|
// src/wallet/implementation/wallets-kit-implementation.ts
|
|
1895
1891
|
import {
|
|
@@ -1897,7 +1893,7 @@ import {
|
|
|
1897
1893
|
StellarWalletsKit,
|
|
1898
1894
|
WalletNetwork
|
|
1899
1895
|
} from "@creit.tech/stellar-wallets-kit";
|
|
1900
|
-
import { logger as logger11 } from "@openzeppelin/ui-
|
|
1896
|
+
import { logger as logger11 } from "@openzeppelin/ui-utils";
|
|
1901
1897
|
var LOG_SYSTEM = "StellarWalletImplementation";
|
|
1902
1898
|
var WalletsKitImplementation = class {
|
|
1903
1899
|
/**
|
|
@@ -2236,7 +2232,7 @@ function getInitializedStellarWalletImplementation() {
|
|
|
2236
2232
|
|
|
2237
2233
|
// src/wallet/stellar-wallets-kit/stellarUiKitManager.ts
|
|
2238
2234
|
import { allowAllModules as allowAllModules2, StellarWalletsKit as StellarWalletsKit2, WalletNetwork as WalletNetwork2 } from "@creit.tech/stellar-wallets-kit";
|
|
2239
|
-
import { logger as logger13 } from "@openzeppelin/ui-
|
|
2235
|
+
import { logger as logger13 } from "@openzeppelin/ui-utils";
|
|
2240
2236
|
var getInitialState = () => ({
|
|
2241
2237
|
isConfigured: false,
|
|
2242
2238
|
isInitializing: false,
|
|
@@ -2484,7 +2480,7 @@ function generateStellarWalletsKitExportables(uiKitConfig) {
|
|
|
2484
2480
|
|
|
2485
2481
|
// src/wallet/stellar-wallets-kit/StellarWalletsKitConnectButton.tsx
|
|
2486
2482
|
import { useEffect, useRef } from "react";
|
|
2487
|
-
import { logger as logger14 } from "@openzeppelin/ui-
|
|
2483
|
+
import { logger as logger14 } from "@openzeppelin/ui-utils";
|
|
2488
2484
|
import { jsx } from "react/jsx-runtime";
|
|
2489
2485
|
function StellarWalletsKitConnectButton() {
|
|
2490
2486
|
const containerRef = useRef(null);
|
|
@@ -2771,7 +2767,7 @@ import {
|
|
|
2771
2767
|
Configuration,
|
|
2772
2768
|
RelayersApi
|
|
2773
2769
|
} from "@openzeppelin/relayer-sdk";
|
|
2774
|
-
import { logger as logger17 } from "@openzeppelin/ui-
|
|
2770
|
+
import { logger as logger17 } from "@openzeppelin/ui-utils";
|
|
2775
2771
|
var RelayerExecutionStrategy = class {
|
|
2776
2772
|
async execute(transactionData, executionConfig, networkConfig, onStatusChange, runtimeApiKey) {
|
|
2777
2773
|
const relayerConfig = executionConfig;
|
|
@@ -3213,7 +3209,7 @@ async function signAndBroadcastStellarTransaction(transactionData, executionConf
|
|
|
3213
3209
|
}
|
|
3214
3210
|
|
|
3215
3211
|
// src/access-control/feature-detection.ts
|
|
3216
|
-
import { UnsupportedContractFeatures } from "@openzeppelin/ui-
|
|
3212
|
+
import { UnsupportedContractFeatures } from "@openzeppelin/ui-types";
|
|
3217
3213
|
var OWNABLE_FUNCTIONS = {
|
|
3218
3214
|
required: ["get_owner"],
|
|
3219
3215
|
optional: ["transfer_ownership", "accept_ownership", "renounce_ownership"]
|
|
@@ -3323,17 +3319,13 @@ function verifyOZInterface(functionNames, hasOwnable, hasAccessControl, hasTwoSt
|
|
|
3323
3319
|
}
|
|
3324
3320
|
|
|
3325
3321
|
// src/access-control/indexer-client.ts
|
|
3326
|
-
import {
|
|
3327
|
-
ConfigurationInvalid,
|
|
3328
|
-
IndexerUnavailable,
|
|
3329
|
-
OperationFailed as OperationFailed2
|
|
3330
|
-
} from "@openzeppelin/ui-builder-types";
|
|
3322
|
+
import { ConfigurationInvalid, IndexerUnavailable, OperationFailed as OperationFailed2 } from "@openzeppelin/ui-types";
|
|
3331
3323
|
import {
|
|
3332
3324
|
appConfigService as appConfigService2,
|
|
3333
3325
|
isValidUrl,
|
|
3334
3326
|
logger as logger19,
|
|
3335
3327
|
userNetworkServiceConfigService
|
|
3336
|
-
} from "@openzeppelin/ui-
|
|
3328
|
+
} from "@openzeppelin/ui-utils";
|
|
3337
3329
|
var LOG_SYSTEM3 = "StellarIndexerClient";
|
|
3338
3330
|
function getUserIndexerEndpoints(networkId) {
|
|
3339
3331
|
const svcCfg = userNetworkServiceConfigService.get(networkId, "indexer");
|
|
@@ -4381,8 +4373,8 @@ function createIndexerClient(networkConfig) {
|
|
|
4381
4373
|
}
|
|
4382
4374
|
|
|
4383
4375
|
// src/access-control/validation.ts
|
|
4384
|
-
import { ConfigurationInvalid as ConfigurationInvalid2 } from "@openzeppelin/ui-
|
|
4385
|
-
import { normalizeAddress } from "@openzeppelin/ui-
|
|
4376
|
+
import { ConfigurationInvalid as ConfigurationInvalid2 } from "@openzeppelin/ui-types";
|
|
4377
|
+
import { normalizeAddress } from "@openzeppelin/ui-utils";
|
|
4386
4378
|
|
|
4387
4379
|
// src/validation/address.ts
|
|
4388
4380
|
import { StrKey } from "@stellar/stellar-sdk";
|
|
@@ -5546,15 +5538,10 @@ function createStellarAccessControlService(networkConfig) {
|
|
|
5546
5538
|
}
|
|
5547
5539
|
|
|
5548
5540
|
// src/configuration/network-services.ts
|
|
5549
|
-
import { isValidUrl as isValidUrl3 } from "@openzeppelin/ui-
|
|
5541
|
+
import { isValidUrl as isValidUrl3 } from "@openzeppelin/ui-utils";
|
|
5550
5542
|
|
|
5551
5543
|
// src/configuration/rpc.ts
|
|
5552
|
-
import {
|
|
5553
|
-
appConfigService as appConfigService3,
|
|
5554
|
-
isValidUrl as isValidUrl2,
|
|
5555
|
-
logger as logger21,
|
|
5556
|
-
userRpcConfigService as userRpcConfigService4
|
|
5557
|
-
} from "@openzeppelin/ui-builder-utils";
|
|
5544
|
+
import { appConfigService as appConfigService3, isValidUrl as isValidUrl2, logger as logger21, userRpcConfigService as userRpcConfigService4 } from "@openzeppelin/ui-utils";
|
|
5558
5545
|
function validateStellarRpcEndpoint(rpcConfig) {
|
|
5559
5546
|
try {
|
|
5560
5547
|
if (!isValidUrl2(rpcConfig.url)) {
|
|
@@ -5791,10 +5778,10 @@ async function testStellarNetworkServiceConnection(serviceId, values) {
|
|
|
5791
5778
|
|
|
5792
5779
|
// src/contract/loader.ts
|
|
5793
5780
|
import * as StellarSdk2 from "@stellar/stellar-sdk";
|
|
5794
|
-
import { logger as logger28 } from "@openzeppelin/ui-
|
|
5781
|
+
import { logger as logger28 } from "@openzeppelin/ui-utils";
|
|
5795
5782
|
|
|
5796
5783
|
// src/validation/eoa.ts
|
|
5797
|
-
import { logger as logger22 } from "@openzeppelin/ui-
|
|
5784
|
+
import { logger as logger22 } from "@openzeppelin/ui-utils";
|
|
5798
5785
|
var SYSTEM_LOG_TAG8 = "StellarEoaValidator";
|
|
5799
5786
|
async function validateEoaConfig(config, walletStatus) {
|
|
5800
5787
|
if (!config.allowAny) {
|
|
@@ -5849,7 +5836,7 @@ function getStellarExplorerTxUrl(txHash, networkConfig) {
|
|
|
5849
5836
|
|
|
5850
5837
|
// src/mapping/struct-fields.ts
|
|
5851
5838
|
import { xdr as xdr8 } from "@stellar/stellar-sdk";
|
|
5852
|
-
import { logger as logger23 } from "@openzeppelin/ui-
|
|
5839
|
+
import { logger as logger23 } from "@openzeppelin/ui-utils";
|
|
5853
5840
|
function extractStructFields(entries, structName) {
|
|
5854
5841
|
try {
|
|
5855
5842
|
const entry = entries.find((e) => {
|
|
@@ -5917,10 +5904,10 @@ function isStructType2(entries, typeName) {
|
|
|
5917
5904
|
}
|
|
5918
5905
|
|
|
5919
5906
|
// src/sac/spec-cache.ts
|
|
5920
|
-
import { logger as logger26 } from "@openzeppelin/ui-
|
|
5907
|
+
import { logger as logger26 } from "@openzeppelin/ui-utils";
|
|
5921
5908
|
|
|
5922
5909
|
// src/sac/spec-source.ts
|
|
5923
|
-
import { logger as logger24 } from "@openzeppelin/ui-
|
|
5910
|
+
import { logger as logger24 } from "@openzeppelin/ui-utils";
|
|
5924
5911
|
var DEFAULT_SPEC = {
|
|
5925
5912
|
repo: "stellar/stellar-asset-contract-spec",
|
|
5926
5913
|
path: "refs/heads/main",
|
|
@@ -5950,7 +5937,7 @@ async function fetchSacSpecJson(cfg = {}) {
|
|
|
5950
5937
|
import { xdr as xdr9 } from "@stellar/stellar-sdk";
|
|
5951
5938
|
import stellarXdrJsonPackage from "@stellar/stellar-xdr-json/package.json";
|
|
5952
5939
|
import { parse, stringify } from "lossless-json";
|
|
5953
|
-
import { logger as logger25 } from "@openzeppelin/ui-
|
|
5940
|
+
import { logger as logger25 } from "@openzeppelin/ui-utils";
|
|
5954
5941
|
var stellarXdrJsonVersion = stellarXdrJsonPackage.version ?? "23.0.0";
|
|
5955
5942
|
var CDN_WASM_URL = `https://unpkg.com/@stellar/stellar-xdr-json@${stellarXdrJsonVersion}/stellar_xdr_json_bg.wasm`;
|
|
5956
5943
|
var initialized = false;
|
|
@@ -6030,7 +6017,7 @@ async function getSacSpecArtifacts(cfg = {}) {
|
|
|
6030
6017
|
|
|
6031
6018
|
// src/contract/type.ts
|
|
6032
6019
|
import { Contract as Contract4, rpc as StellarRpc6, xdr as xdr10 } from "@stellar/stellar-sdk";
|
|
6033
|
-
import { logger as logger27, userRpcConfigService as userRpcConfigService5 } from "@openzeppelin/ui-
|
|
6020
|
+
import { logger as logger27, userRpcConfigService as userRpcConfigService5 } from "@openzeppelin/ui-utils";
|
|
6034
6021
|
function getSorobanRpcServer3(networkConfig) {
|
|
6035
6022
|
const customRpcConfig = userRpcConfigService5.getUserRpcConfig(networkConfig.id);
|
|
6036
6023
|
const rpcUrl = customRpcConfig?.url || networkConfig.sorobanRpcUrl;
|
|
@@ -6377,11 +6364,11 @@ async function loadStellarContractWithMetadata(artifacts, networkConfig) {
|
|
|
6377
6364
|
|
|
6378
6365
|
// src/transaction/components/StellarRelayerOptions.tsx
|
|
6379
6366
|
import React from "react";
|
|
6380
|
-
import { Tabs, TabsContent, TabsList, TabsTrigger } from "@openzeppelin/ui-
|
|
6367
|
+
import { Tabs, TabsContent, TabsList, TabsTrigger } from "@openzeppelin/ui-components";
|
|
6381
6368
|
|
|
6382
6369
|
// src/transaction/components/AdvancedInfo.tsx
|
|
6383
6370
|
import { Info } from "lucide-react";
|
|
6384
|
-
import { Button } from "@openzeppelin/ui-
|
|
6371
|
+
import { Button } from "@openzeppelin/ui-components";
|
|
6385
6372
|
import { jsx as jsx2, jsxs } from "react/jsx-runtime";
|
|
6386
6373
|
var AdvancedInfo = ({ showAdvancedInfo, onToggle }) => {
|
|
6387
6374
|
return /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
|
|
@@ -6405,7 +6392,7 @@ var AdvancedInfo = ({ showAdvancedInfo, onToggle }) => {
|
|
|
6405
6392
|
};
|
|
6406
6393
|
|
|
6407
6394
|
// src/transaction/components/FeeConfiguration.tsx
|
|
6408
|
-
import { BooleanField, NumberField } from "@openzeppelin/ui-
|
|
6395
|
+
import { BooleanField, NumberField } from "@openzeppelin/ui-components";
|
|
6409
6396
|
import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
6410
6397
|
var FeeConfiguration = ({
|
|
6411
6398
|
control,
|
|
@@ -6440,7 +6427,7 @@ var FeeConfiguration = ({
|
|
|
6440
6427
|
|
|
6441
6428
|
// src/transaction/components/TransactionTiming.tsx
|
|
6442
6429
|
import { Controller } from "react-hook-form";
|
|
6443
|
-
import { Button as Button2, DateTimeField } from "@openzeppelin/ui-
|
|
6430
|
+
import { Button as Button2, DateTimeField } from "@openzeppelin/ui-components";
|
|
6444
6431
|
import { Fragment, jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
6445
6432
|
var TransactionTiming = ({ control }) => {
|
|
6446
6433
|
const getOneHourFromNow = () => {
|
|
@@ -6614,7 +6601,7 @@ var StellarRelayerOptions = ({ options, onChange }) => {
|
|
|
6614
6601
|
};
|
|
6615
6602
|
|
|
6616
6603
|
// src/configuration/execution.ts
|
|
6617
|
-
import { logger as logger29 } from "@openzeppelin/ui-
|
|
6604
|
+
import { logger as logger29 } from "@openzeppelin/ui-utils";
|
|
6618
6605
|
var SYSTEM_LOG_TAG9 = "adapter-stellar-execution-config";
|
|
6619
6606
|
async function getStellarSupportedExecutionMethods() {
|
|
6620
6607
|
logger29.warn(
|
|
@@ -6698,6 +6685,36 @@ var STELLAR_TYPE_TO_FIELD_TYPE = {
|
|
|
6698
6685
|
// Instance types (for compatibility)
|
|
6699
6686
|
Instance: "object"
|
|
6700
6687
|
};
|
|
6688
|
+
var STELLAR_DYNAMIC_PATTERNS = [
|
|
6689
|
+
{ name: "vec", syntax: "Vec<T>", mapsTo: null, description: "Array (maps based on inner type)" },
|
|
6690
|
+
{ name: "map", syntax: "Map<K,V>", mapsTo: "map", description: "Key-value map" },
|
|
6691
|
+
{
|
|
6692
|
+
name: "option",
|
|
6693
|
+
syntax: "Option<T>",
|
|
6694
|
+
mapsTo: "unwrap",
|
|
6695
|
+
description: "Optional, resolves to inner type"
|
|
6696
|
+
},
|
|
6697
|
+
{
|
|
6698
|
+
name: "result",
|
|
6699
|
+
syntax: "Result<T>",
|
|
6700
|
+
mapsTo: "unwrap",
|
|
6701
|
+
description: "Result, resolves to inner type"
|
|
6702
|
+
},
|
|
6703
|
+
{ name: "bytes-n", syntax: "BytesN<N>", mapsTo: "bytes", description: "Fixed-size byte array" },
|
|
6704
|
+
{
|
|
6705
|
+
name: "struct",
|
|
6706
|
+
syntax: "StructName",
|
|
6707
|
+
mapsTo: "object",
|
|
6708
|
+
description: "Custom struct (PascalCase)"
|
|
6709
|
+
},
|
|
6710
|
+
{ name: "enum", syntax: "EnumName", mapsTo: "select", description: "Enum type" }
|
|
6711
|
+
];
|
|
6712
|
+
function getStellarTypeMappingInfo() {
|
|
6713
|
+
return {
|
|
6714
|
+
primitives: { ...STELLAR_TYPE_TO_FIELD_TYPE },
|
|
6715
|
+
dynamicPatterns: STELLAR_DYNAMIC_PATTERNS
|
|
6716
|
+
};
|
|
6717
|
+
}
|
|
6701
6718
|
|
|
6702
6719
|
// src/mapping/type-mapper.ts
|
|
6703
6720
|
function mapStellarParameterTypeToFieldType(parameterType) {
|
|
@@ -6837,11 +6854,11 @@ import {
|
|
|
6837
6854
|
enhanceNumericValidation,
|
|
6838
6855
|
getDefaultValueForType,
|
|
6839
6856
|
logger as logger31
|
|
6840
|
-
} from "@openzeppelin/ui-
|
|
6857
|
+
} from "@openzeppelin/ui-utils";
|
|
6841
6858
|
|
|
6842
6859
|
// src/mapping/enum-metadata.ts
|
|
6843
6860
|
import { xdr as xdr11 } from "@stellar/stellar-sdk";
|
|
6844
|
-
import { logger as logger30 } from "@openzeppelin/ui-
|
|
6861
|
+
import { logger as logger30 } from "@openzeppelin/ui-utils";
|
|
6845
6862
|
|
|
6846
6863
|
// src/mapping/tuple-components.ts
|
|
6847
6864
|
function buildTupleComponents(parameterType, specEntries) {
|
|
@@ -7205,8 +7222,8 @@ function generateStellarDefaultField(parameter, contractSchema) {
|
|
|
7205
7222
|
|
|
7206
7223
|
// src/transaction/formatter.ts
|
|
7207
7224
|
import { Address as Address3 } from "@stellar/stellar-sdk";
|
|
7208
|
-
import { isEnumValue as isEnumValue4 } from "@openzeppelin/ui-
|
|
7209
|
-
import { logger as logger32 } from "@openzeppelin/ui-
|
|
7225
|
+
import { isEnumValue as isEnumValue4 } from "@openzeppelin/ui-types";
|
|
7226
|
+
import { logger as logger32 } from "@openzeppelin/ui-utils";
|
|
7210
7227
|
function enrichParameterWithEnumMetadata(param, specEntries) {
|
|
7211
7228
|
if (!specEntries) {
|
|
7212
7229
|
return param;
|
|
@@ -7387,7 +7404,7 @@ function formatStellarTransactionData(contractSchema, functionId, submittedInput
|
|
|
7387
7404
|
|
|
7388
7405
|
// src/wallet/components/StellarWalletUiRoot.tsx
|
|
7389
7406
|
import { useCallback, useEffect as useEffect3, useState as useState2 } from "react";
|
|
7390
|
-
import { logger as logger33 } from "@openzeppelin/ui-
|
|
7407
|
+
import { logger as logger33 } from "@openzeppelin/ui-utils";
|
|
7391
7408
|
|
|
7392
7409
|
// src/wallet/context/StellarWalletContext.ts
|
|
7393
7410
|
import { createContext } from "react";
|
|
@@ -7592,7 +7609,7 @@ var stellarFacadeHooks = {
|
|
|
7592
7609
|
};
|
|
7593
7610
|
|
|
7594
7611
|
// src/wallet/hooks/useUiKitConfig.ts
|
|
7595
|
-
import { appConfigService as appConfigService4, logger as logger34 } from "@openzeppelin/ui-
|
|
7612
|
+
import { appConfigService as appConfigService4, logger as logger34 } from "@openzeppelin/ui-utils";
|
|
7596
7613
|
var defaultConfig = {
|
|
7597
7614
|
kitName: "custom",
|
|
7598
7615
|
// Default to using our custom implementation for Stellar
|
|
@@ -7625,8 +7642,8 @@ function loadInitialConfigFromAppService() {
|
|
|
7625
7642
|
// src/wallet/components/connect/ConnectButton.tsx
|
|
7626
7643
|
import { Loader2, Wallet } from "lucide-react";
|
|
7627
7644
|
import { useEffect as useEffect5, useState as useState6 } from "react";
|
|
7628
|
-
import { Button as Button4 } from "@openzeppelin/ui-
|
|
7629
|
-
import { cn } from "@openzeppelin/ui-
|
|
7645
|
+
import { Button as Button4 } from "@openzeppelin/ui-components";
|
|
7646
|
+
import { cn } from "@openzeppelin/ui-utils";
|
|
7630
7647
|
|
|
7631
7648
|
// src/wallet/components/connect/ConnectorDialog.tsx
|
|
7632
7649
|
import { useEffect as useEffect4, useState as useState5 } from "react";
|
|
@@ -7637,8 +7654,8 @@ import {
|
|
|
7637
7654
|
DialogDescription,
|
|
7638
7655
|
DialogHeader,
|
|
7639
7656
|
DialogTitle
|
|
7640
|
-
} from "@openzeppelin/ui-
|
|
7641
|
-
import { logger as logger35 } from "@openzeppelin/ui-
|
|
7657
|
+
} from "@openzeppelin/ui-components";
|
|
7658
|
+
import { logger as logger35 } from "@openzeppelin/ui-utils";
|
|
7642
7659
|
import { jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
7643
7660
|
var ConnectorDialog = ({ open, onOpenChange }) => {
|
|
7644
7661
|
const { connect } = useStellarConnect();
|
|
@@ -7777,8 +7794,8 @@ var CustomConnectButton = ({
|
|
|
7777
7794
|
|
|
7778
7795
|
// src/wallet/components/account/AccountDisplay.tsx
|
|
7779
7796
|
import { LogOut } from "lucide-react";
|
|
7780
|
-
import { Button as Button5 } from "@openzeppelin/ui-
|
|
7781
|
-
import { cn as cn2, truncateMiddle } from "@openzeppelin/ui-
|
|
7797
|
+
import { Button as Button5 } from "@openzeppelin/ui-components";
|
|
7798
|
+
import { cn as cn2, truncateMiddle } from "@openzeppelin/ui-utils";
|
|
7782
7799
|
import { jsx as jsx9, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
7783
7800
|
var CustomAccountDisplay = ({ className }) => {
|
|
7784
7801
|
const { isConnected, address } = useStellarAccount();
|
|
@@ -7806,8 +7823,8 @@ var CustomAccountDisplay = ({ className }) => {
|
|
|
7806
7823
|
};
|
|
7807
7824
|
|
|
7808
7825
|
// src/wallet/utils/filterWalletComponents.ts
|
|
7809
|
-
import { ECOSYSTEM_WALLET_COMPONENT_KEYS } from "@openzeppelin/ui-
|
|
7810
|
-
import { logger as logger36 } from "@openzeppelin/ui-
|
|
7826
|
+
import { ECOSYSTEM_WALLET_COMPONENT_KEYS } from "@openzeppelin/ui-types";
|
|
7827
|
+
import { logger as logger36 } from "@openzeppelin/ui-utils";
|
|
7811
7828
|
function filterWalletComponents(allPossibleComponents, exclusions, kitName = "custom") {
|
|
7812
7829
|
logger36.debug(
|
|
7813
7830
|
"filterWalletComponents",
|
|
@@ -7860,7 +7877,7 @@ function getComponentExclusionsFromConfig(kitConfig) {
|
|
|
7860
7877
|
}
|
|
7861
7878
|
|
|
7862
7879
|
// src/wallet/utils/uiKitService.ts
|
|
7863
|
-
import { logger as logger37 } from "@openzeppelin/ui-
|
|
7880
|
+
import { logger as logger37 } from "@openzeppelin/ui-utils";
|
|
7864
7881
|
function getResolvedWalletComponents(uiKitConfiguration) {
|
|
7865
7882
|
logger37.debug(
|
|
7866
7883
|
"stellar:uiKitService:getResolvedWalletComponents",
|
|
@@ -7909,7 +7926,7 @@ function getResolvedWalletComponents(uiKitConfiguration) {
|
|
|
7909
7926
|
}
|
|
7910
7927
|
|
|
7911
7928
|
// src/wallet/services/configResolutionService.ts
|
|
7912
|
-
import { logger as logger38 } from "@openzeppelin/ui-
|
|
7929
|
+
import { logger as logger38 } from "@openzeppelin/ui-utils";
|
|
7913
7930
|
async function resolveFullUiKitConfiguration(programmaticOverrides, initialAppServiceKitName, currentAppServiceConfig, options) {
|
|
7914
7931
|
logger38.debug(
|
|
7915
7932
|
"stellar:configResolutionService:resolveFullUiKitConfiguration",
|
|
@@ -8365,6 +8382,12 @@ var StellarAdapter = class {
|
|
|
8365
8382
|
getAccessControlService() {
|
|
8366
8383
|
return this.accessControlService;
|
|
8367
8384
|
}
|
|
8385
|
+
/**
|
|
8386
|
+
* @inheritdoc
|
|
8387
|
+
*/
|
|
8388
|
+
getTypeMappingInfo() {
|
|
8389
|
+
return getStellarTypeMappingInfo();
|
|
8390
|
+
}
|
|
8368
8391
|
};
|
|
8369
8392
|
|
|
8370
8393
|
// src/networks/mainnet.ts
|
|
@@ -8381,8 +8404,8 @@ var stellarPublic = {
|
|
|
8381
8404
|
sorobanRpcUrl: "https://mainnet.sorobanrpc.com",
|
|
8382
8405
|
networkPassphrase: "Public Global Stellar Network ; September 2015",
|
|
8383
8406
|
explorerUrl: "https://stellar.expert/explorer/public",
|
|
8384
|
-
iconComponent: NetworkStellar
|
|
8385
|
-
|
|
8407
|
+
iconComponent: NetworkStellar,
|
|
8408
|
+
indexerUri: "https://openzeppelin-stellar-mainnet.graphql.subquery.network/"
|
|
8386
8409
|
};
|
|
8387
8410
|
|
|
8388
8411
|
// src/networks/testnet.ts
|