@openzeppelin/adapter-stellar 1.0.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 (165) hide show
  1. package/README.md +272 -0
  2. package/dist/config.cjs +21 -0
  3. package/dist/config.cjs.map +1 -0
  4. package/dist/config.d.cts +8 -0
  5. package/dist/config.d.cts.map +1 -0
  6. package/dist/config.d.mts +8 -0
  7. package/dist/config.d.mts.map +1 -0
  8. package/dist/config.mjs +20 -0
  9. package/dist/config.mjs.map +1 -0
  10. package/dist/index.cjs +7564 -0
  11. package/dist/index.cjs.map +1 -0
  12. package/dist/index.d.cts +261 -0
  13. package/dist/index.d.cts.map +1 -0
  14. package/dist/index.d.mts +263 -0
  15. package/dist/index.d.mts.map +1 -0
  16. package/dist/index.mjs +7529 -0
  17. package/dist/index.mjs.map +1 -0
  18. package/dist/metadata.cjs +22 -0
  19. package/dist/metadata.cjs.map +1 -0
  20. package/dist/metadata.d.cts +7 -0
  21. package/dist/metadata.d.cts.map +1 -0
  22. package/dist/metadata.d.mts +7 -0
  23. package/dist/metadata.d.mts.map +1 -0
  24. package/dist/metadata.mjs +21 -0
  25. package/dist/metadata.mjs.map +1 -0
  26. package/dist/networks-BrV516-R.d.cts +15 -0
  27. package/dist/networks-BrV516-R.d.cts.map +1 -0
  28. package/dist/networks-C0MmhJcu.d.mts +15 -0
  29. package/dist/networks-C0MmhJcu.d.mts.map +1 -0
  30. package/dist/networks-DgUFSTiC.cjs +76 -0
  31. package/dist/networks-DgUFSTiC.cjs.map +1 -0
  32. package/dist/networks-QbEPbaGT.mjs +46 -0
  33. package/dist/networks-QbEPbaGT.mjs.map +1 -0
  34. package/dist/networks.cjs +8 -0
  35. package/dist/networks.d.cts +2 -0
  36. package/dist/networks.d.mts +2 -0
  37. package/dist/networks.mjs +3 -0
  38. package/dist/vite-config.cjs +43 -0
  39. package/dist/vite-config.cjs.map +1 -0
  40. package/dist/vite-config.d.cts +35 -0
  41. package/dist/vite-config.d.cts.map +1 -0
  42. package/dist/vite-config.d.mts +35 -0
  43. package/dist/vite-config.d.mts.map +1 -0
  44. package/dist/vite-config.mjs +42 -0
  45. package/dist/vite-config.mjs.map +1 -0
  46. package/package.json +114 -0
  47. package/src/__tests__/getDefaultServiceConfig.test.ts +105 -0
  48. package/src/access-control/actions.ts +214 -0
  49. package/src/access-control/feature-detection.ts +238 -0
  50. package/src/access-control/index.ts +54 -0
  51. package/src/access-control/indexer-client.ts +1474 -0
  52. package/src/access-control/onchain-reader.ts +446 -0
  53. package/src/access-control/service.ts +1431 -0
  54. package/src/access-control/validation.ts +256 -0
  55. package/src/adapter.ts +659 -0
  56. package/src/config.ts +43 -0
  57. package/src/configuration/__tests__/explorer.test.ts +80 -0
  58. package/src/configuration/__tests__/rpc.test.ts +355 -0
  59. package/src/configuration/execution.ts +83 -0
  60. package/src/configuration/explorer.ts +105 -0
  61. package/src/configuration/index.ts +5 -0
  62. package/src/configuration/network-services.ts +210 -0
  63. package/src/configuration/rpc.ts +270 -0
  64. package/src/configuration.ts +2 -0
  65. package/src/contract/__tests__/complete-type-coverage.test.ts +78 -0
  66. package/src/contract/index.ts +3 -0
  67. package/src/contract/loader.ts +498 -0
  68. package/src/contract/transformer.ts +1 -0
  69. package/src/contract/type.ts +65 -0
  70. package/src/index.ts +23 -0
  71. package/src/mapping/constants.ts +89 -0
  72. package/src/mapping/enum-metadata.ts +237 -0
  73. package/src/mapping/field-generator.ts +296 -0
  74. package/src/mapping/index.ts +5 -0
  75. package/src/mapping/struct-fields.ts +106 -0
  76. package/src/mapping/tuple-components.ts +43 -0
  77. package/src/mapping/type-coverage-validator.ts +151 -0
  78. package/src/mapping/type-mapper.ts +203 -0
  79. package/src/metadata.ts +16 -0
  80. package/src/networks/README.md +84 -0
  81. package/src/networks/index.ts +19 -0
  82. package/src/networks/mainnet.ts +20 -0
  83. package/src/networks/testnet.ts +20 -0
  84. package/src/networks.ts +2 -0
  85. package/src/query/handler.ts +411 -0
  86. package/src/query/index.ts +4 -0
  87. package/src/query/view-checker.ts +32 -0
  88. package/src/sac/spec-cache.ts +68 -0
  89. package/src/sac/spec-source.ts +35 -0
  90. package/src/sac/xdr.ts +101 -0
  91. package/src/transaction/components/AdvancedInfo.tsx +34 -0
  92. package/src/transaction/components/FeeConfiguration.tsx +41 -0
  93. package/src/transaction/components/StellarRelayerOptions.tsx +60 -0
  94. package/src/transaction/components/TransactionTiming.tsx +77 -0
  95. package/src/transaction/components/index.ts +5 -0
  96. package/src/transaction/components/useStellarRelayerOptions.ts +114 -0
  97. package/src/transaction/eoa.ts +229 -0
  98. package/src/transaction/execution-strategy.ts +33 -0
  99. package/src/transaction/formatter.ts +296 -0
  100. package/src/transaction/index.ts +4 -0
  101. package/src/transaction/relayer.ts +575 -0
  102. package/src/transaction/sender.ts +156 -0
  103. package/src/transform/index.ts +4 -0
  104. package/src/transform/input-parser.ts +9 -0
  105. package/src/transform/output-formatter.ts +133 -0
  106. package/src/transform/parsers/complex-parser.ts +157 -0
  107. package/src/transform/parsers/generic-parser.ts +171 -0
  108. package/src/transform/parsers/index.ts +86 -0
  109. package/src/transform/parsers/primitive-parser.ts +123 -0
  110. package/src/transform/parsers/scval-converter.ts +405 -0
  111. package/src/transform/parsers/struct-parser.ts +324 -0
  112. package/src/transform/parsers/types.ts +35 -0
  113. package/src/types/__tests__/artifacts.test.ts +89 -0
  114. package/src/types/artifacts.ts +19 -0
  115. package/src/utils/__tests__/artifacts.test.ts +77 -0
  116. package/src/utils/artifacts.ts +30 -0
  117. package/src/utils/formatting.ts +122 -0
  118. package/src/utils/index.ts +6 -0
  119. package/src/utils/input-parsing.ts +336 -0
  120. package/src/utils/safe-type-parser.ts +303 -0
  121. package/src/utils/stellar-types.ts +35 -0
  122. package/src/utils/type-detection.ts +163 -0
  123. package/src/utils/xdr-ordering.ts +36 -0
  124. package/src/validation/__tests__/address.test.ts +267 -0
  125. package/src/validation/address.ts +136 -0
  126. package/src/validation/eoa.ts +33 -0
  127. package/src/validation/index.ts +3 -0
  128. package/src/validation/relayer.ts +13 -0
  129. package/src/vite-config.ts +67 -0
  130. package/src/wallet/README.md +93 -0
  131. package/src/wallet/__tests__/connection.test.ts +72 -0
  132. package/src/wallet/components/StellarWalletUiRoot.tsx +161 -0
  133. package/src/wallet/components/account/AccountDisplay.tsx +50 -0
  134. package/src/wallet/components/connect/ConnectButton.tsx +100 -0
  135. package/src/wallet/components/connect/ConnectorDialog.tsx +125 -0
  136. package/src/wallet/components/index.ts +3 -0
  137. package/src/wallet/connection.ts +151 -0
  138. package/src/wallet/context/StellarWalletContext.ts +32 -0
  139. package/src/wallet/context/index.ts +4 -0
  140. package/src/wallet/context/useStellarWalletContext.ts +17 -0
  141. package/src/wallet/hooks/facade-hooks.ts +31 -0
  142. package/src/wallet/hooks/index.ts +7 -0
  143. package/src/wallet/hooks/useStellarAccount.ts +27 -0
  144. package/src/wallet/hooks/useStellarConnect.ts +60 -0
  145. package/src/wallet/hooks/useStellarDisconnect.ts +47 -0
  146. package/src/wallet/hooks/useUiKitConfig.ts +40 -0
  147. package/src/wallet/implementation/wallets-kit-implementation.ts +379 -0
  148. package/src/wallet/index.ts +11 -0
  149. package/src/wallet/services/__tests__/configResolutionService.test.ts +163 -0
  150. package/src/wallet/services/configResolutionService.ts +65 -0
  151. package/src/wallet/stellar-wallets-kit/StellarWalletsKitConnectButton.tsx +82 -0
  152. package/src/wallet/stellar-wallets-kit/__mocks__/@creit.tech/stellar-wallets-kit.ts +48 -0
  153. package/src/wallet/stellar-wallets-kit/__tests__/export-service.test.ts +93 -0
  154. package/src/wallet/stellar-wallets-kit/__tests__/stellarUiKitManager.test.ts +0 -0
  155. package/src/wallet/stellar-wallets-kit/config-generator.ts +75 -0
  156. package/src/wallet/stellar-wallets-kit/export-service.ts +19 -0
  157. package/src/wallet/stellar-wallets-kit/index.ts +3 -0
  158. package/src/wallet/stellar-wallets-kit/stellarUiKitManager.ts +235 -0
  159. package/src/wallet/types.ts +19 -0
  160. package/src/wallet/utils/__tests__/filterWalletComponents.test.ts +150 -0
  161. package/src/wallet/utils/__tests__/uiKitService.test.ts +189 -0
  162. package/src/wallet/utils/filterWalletComponents.ts +89 -0
  163. package/src/wallet/utils/index.ts +3 -0
  164. package/src/wallet/utils/stellarWalletImplementationManager.ts +118 -0
  165. package/src/wallet/utils/uiKitService.ts +74 -0
package/README.md ADDED
@@ -0,0 +1,272 @@
1
+ # Stellar Adapter (`@openzeppelin/adapter-stellar`)
2
+
3
+ This package provides the `ContractAdapter` implementation for the Stellar (Soroban) ecosystem for the UI Builder.
4
+
5
+ It is responsible for:
6
+
7
+ - Implementing the `ContractAdapter` interface from `@openzeppelin/ui-types`.
8
+ - Defining and exporting Stellar network configurations (Public Network and Testnet) as `StellarNetworkConfig` objects in `src/networks/` (Horizon URL, Soroban RPC URL, network passphrase, explorer URL, icon, etc.).
9
+ - Loading Stellar contract definitions and metadata and transforming them into the builder’s chain‑agnostic `ContractSchema`.
10
+ - Mapping Soroban value types to builder form fields and validating user input.
11
+ - Parsing user inputs into Soroban `ScVal` types for transaction execution and formatting view results.
12
+ - Transaction execution using an execution strategy pattern (EOA and Relayer strategies).
13
+ - Wallet integration and UI via the `src/wallet/` module.
14
+ - Adapter‑specific configuration and validation helpers (RPC resolution, explorer URLs, execution configuration validation).
15
+
16
+ ---
17
+
18
+ ## Transaction Execution
19
+
20
+ The Stellar adapter uses an execution strategy pattern similar to the EVM adapter to handle transaction submissions.
21
+
22
+ ### Supported Strategies
23
+
24
+ 1. EOA (Externally Owned Account): Uses the connected Stellar wallet (via Stellar Wallets Kit) to sign and submit Soroban transactions directly.
25
+ 2. Relayer: Uses the OpenZeppelin Relayer service to submit transactions. The adapter exposes a `StellarRelayerOptions` React component to configure strategy‑specific options in the Builder UI.
26
+
27
+ The adapter selects the strategy at runtime based on the `ExecutionConfig` provided by the application.
28
+
29
+ ### Configuration in the Builder
30
+
31
+ The Builder application’s “Customize” step passes an `ExecutionConfig` to the adapter’s `signAndBroadcast` method. The adapter uses a factory to instantiate the appropriate strategy and reports live status updates via the provided `onStatusChange` callback.
32
+
33
+ ---
34
+
35
+ ## Access Control Support
36
+
37
+ The Stellar adapter includes first-class support for OpenZeppelin Access Control and Ownable contracts through a dedicated service module.
38
+
39
+ ### Features
40
+
41
+ - **Feature Detection**: Automatically detects contracts implementing AccessControl, Ownable, or both
42
+ - **Role Management**: Query current roles, grant/revoke roles, check permissions
43
+ - **Ownership Management**: Transfer ownership, query current owner
44
+ - **Dynamic Role Discovery**: Automatically discover role IDs via indexer when not explicitly provided
45
+ - **Historical Queries**: View complete history of role changes and ownership transfers via SubQuery indexer
46
+ - **Server-Side Filtering**: Filter events by contract, role, account, and limit (when indexer is available)
47
+
48
+ ### Role Discovery
49
+
50
+ Since OpenZeppelin's Stellar contracts don't expose a `get_all_roles()` method, the adapter supports multiple ways to obtain role identifiers:
51
+
52
+ #### 1. Explicit Role IDs (Recommended for known contracts)
53
+
54
+ ```typescript
55
+ const service = adapter.getAccessControlService();
56
+ service.registerContract(contractAddress, schema, ['admin', 'minter', 'burner']);
57
+ ```
58
+
59
+ #### 2. Dynamic Discovery via Indexer
60
+
61
+ If no role IDs are provided, the service automatically queries the indexer for historical `ROLE_GRANTED` and `ROLE_REVOKED` events:
62
+
63
+ ```typescript
64
+ // Register without role IDs - discovery happens automatically
65
+ service.registerContract(contractAddress, schema);
66
+
67
+ // Or explicitly discover roles
68
+ const roles = await service.discoverKnownRoleIds(contractAddress);
69
+ // => ['admin', 'minter', 'burner']
70
+ ```
71
+
72
+ #### 3. Adding Roles Manually
73
+
74
+ For newly created roles that haven't been granted yet (no historical events), you can add them manually:
75
+
76
+ ```typescript
77
+ // Add roles that may not exist in historical events
78
+ service.addKnownRoleIds(contractAddress, ['new_role', 'another_role']);
79
+ ```
80
+
81
+ Role IDs are validated against Soroban Symbol constraints:
82
+
83
+ - Must start with a letter or underscore
84
+ - Can contain only alphanumeric characters and underscores
85
+ - Maximum 32 characters
86
+
87
+ ### Indexer Integration
88
+
89
+ For historical queries (e.g., `getHistory()`), the adapter integrates with the [Stellar Access Control Indexer](https://github.com/OpenZeppelin/stellar-access-control-indexer), a SubQuery project that indexes Access Control and Ownable events.
90
+
91
+ #### Configuring the Indexer
92
+
93
+ Add `indexerUri` to your `StellarNetworkConfig`:
94
+
95
+ ```typescript
96
+ const stellarTestnet: StellarNetworkConfig = {
97
+ // ... other config
98
+ indexerUri: 'https://api.subquery.network/sq/openzeppelin/stellar-access-control-indexer',
99
+ };
100
+ ```
101
+
102
+ #### Deployment
103
+
104
+ The indexer is production-ready and compatible with:
105
+
106
+ - **SubQuery Network** (decentralized, recommended for production)
107
+ - Self-hosted infrastructure (Docker)
108
+
109
+ For deployment instructions, see the [Indexer Deployment Guide](https://github.com/OpenZeppelin/stellar-access-control-indexer/blob/main/DEPLOYMENT.md).
110
+
111
+ #### Graceful Degradation
112
+
113
+ If no indexer is configured or the indexer is unavailable:
114
+
115
+ - On-chain queries (roles, ownership) work normally
116
+ - Historical queries return an empty array with a warning
117
+ - UI remains functional for all current-state operations
118
+
119
+ ---
120
+
121
+ ## Wallet Integration & UI
122
+
123
+ All wallet integration logic, UI components, facade hooks, and the UI context provider for Stellar are located in `src/wallet/`.
124
+
125
+ The `StellarAdapter` implements the optional UI methods from `ContractAdapter`:
126
+
127
+ - `getEcosystemReactUiContextProvider()` returns `StellarWalletUiRoot`, a stable provider root for Stellar wallet state.
128
+ - `getEcosystemReactHooks()` returns `stellarFacadeHooks` for account and connection status.
129
+ - `getEcosystemWalletComponents()` returns available wallet UI components (e.g., `ConnectButton`, `AccountDisplay`) for the active UI kit.
130
+
131
+ For full documentation on the wallet module, see `src/wallet/README.md`.
132
+
133
+ ---
134
+
135
+ This adapter follows the standard module structure outlined in the main project Adapter Architecture Guide.
136
+
137
+ ## Package Structure
138
+
139
+ ```text
140
+ adapter-stellar/
141
+ ├── src/
142
+ │ ├── access-control/ # Access Control & Ownable support (service, indexer)
143
+ │ ├── configuration/ # Adapter-specific configuration (RPC, explorer, execution)
144
+ │ ├── contract/ # Contract loading & metadata
145
+ │ ├── mapping/ # Soroban ↔ form field mapping & generators
146
+ │ ├── networks/ # Stellar network configurations
147
+ │ ├── query/ # View function execution
148
+ │ ├── transaction/ # Transaction execution system (EOA, Relayer)
149
+ │ │ ├── components/ # React components for configuration
150
+ │ │ ├── formatter.ts # Build Soroban tx data from form inputs
151
+ │ │ ├── execution-strategy.ts # Strategy interface
152
+ │ │ ├── eoa.ts / relayer.ts # Strategy implementations
153
+ │ ├── transform/ # Input parsing and output formatting
154
+ │ ├── types/ # Adapter-specific types
155
+ │ ├── utils/ # Utilities (artifact handling, formatting, etc.)
156
+ │ ├── validation/ # Validation utilities (addresses, configs)
157
+ │ ├── wallet/ # Wallet integration (see wallet/README.md)
158
+ │ │ ├── components/ # Wallet UI components
159
+ │ │ ├── context/ # Wallet context
160
+ │ │ ├── hooks/ # Facade & low-level hooks
161
+ │ │ ├── implementation/ # Stellar Wallets Kit implementation
162
+ │ │ ├── services/ # Config resolution for wallet UI
163
+ │ │ ├── stellar-wallets-kit/ # Kit-specific helpers
164
+ │ │ ├── README.md # Detailed wallet documentation
165
+ │ ├── adapter.ts # Main StellarAdapter class implementation
166
+ │ └── index.ts # Public package exports
167
+ ├── package.json
168
+ ├── tsconfig.json
169
+ ├── tsup.config.ts
170
+ ├── vitest.config.ts
171
+ └── README.md
172
+ ```
173
+
174
+ ---
175
+
176
+ ## Usage (Adapter Instantiation)
177
+
178
+ Instantiate the adapter with a specific `StellarNetworkConfig`:
179
+
180
+ ```typescript
181
+ import { StellarAdapter, stellarTestnet } from '@openzeppelin/adapter-stellar';
182
+
183
+ const networkConfig = stellarTestnet; // or stellarPublic
184
+ const stellarAdapter = new StellarAdapter(networkConfig);
185
+
186
+ // Use stellarAdapter for operations on the configured Stellar network
187
+ ```
188
+
189
+ Network configurations for Stellar networks are exported from `src/networks/index.ts` (`stellarPublic`, `stellarTestnet`, arrays `stellarMainnetNetworks`, `stellarTestnetNetworks`, and `stellarNetworks`).
190
+
191
+ ## Soroban RPC URL Configuration
192
+
193
+ Each `StellarNetworkConfig` specifies a default `sorobanRpcUrl`.
194
+
195
+ This URL can be overridden at runtime by the consuming application through the central `AppConfigService`. Configuration is loaded from environment variables (for the Builder app) or a `public/app.config.json` file (for exported apps).
196
+
197
+ To override a RPC URL, define an entry in `rpcEndpoints` keyed by the network’s string ID (e.g., `"stellar-testnet"`).
198
+
199
+ In `.env` for the Builder app:
200
+ `VITE_APP_CFG_RPC_ENDPOINT_STELLAR_TESTNET="https://your-custom-soroban-rpc.testnet.example"`
201
+
202
+ In `public/app.config.json` for an exported app:
203
+
204
+ ```json
205
+ {
206
+ "rpcEndpoints": {
207
+ "stellar-testnet": "https://your-custom-soroban-rpc.testnet.example",
208
+ "stellar-public": "https://your-custom-soroban-rpc.public.example"
209
+ }
210
+ }
211
+ ```
212
+
213
+ The adapter resolves Soroban RPC in this order:
214
+
215
+ 1. User-provided RPC config from `UserRpcConfigService` (advanced user input)
216
+ 2. RPC override via `AppConfigService.getRpcEndpointOverride(networkId)`
217
+ 3. Default `sorobanRpcUrl` from the active `StellarNetworkConfig`
218
+
219
+ ## Explorer URLs
220
+
221
+ Stellar explorers are used for display only. The adapter constructs URLs using `explorerUrl` from the network config:
222
+
223
+ - `getExplorerUrl(address)` → `.../account/{address}` or `.../contract/{id}` (Soroban contracts)
224
+ - `getExplorerTxUrl(txHash)` → `.../tx/{hash}`
225
+
226
+ No explorer API keys are required for adapter functionality.
227
+
228
+ ## Network Configurations
229
+
230
+ Stellar networks are exported from `src/networks/`. Each `StellarNetworkConfig` includes:
231
+
232
+ - `id`: Unique network identifier (e.g., `"stellar-public"`, `"stellar-testnet"`)
233
+ - `name`: Display name
234
+ - `ecosystem`: Always `"stellar"`
235
+ - `network`: Always `"stellar"`
236
+ - `type`: `"mainnet"` or `"testnet"`
237
+ - `isTestnet`: boolean
238
+ - `horizonUrl`: Horizon endpoint for the network
239
+ - `sorobanRpcUrl`: Soroban JSON-RPC endpoint
240
+ - `networkPassphrase`: The network passphrase used by Wallets Kit / SDK
241
+ - `explorerUrl`: Base URL for the explorer (display only)
242
+ - `icon`: Icon identifier
243
+
244
+ See `src/networks/README.md` for details on adding networks and overriding RPC.
245
+
246
+ ## Stellar Asset Contract (SAC) Support
247
+
248
+ The adapter fully supports Stellar Asset Contracts (SACs), which are special contracts that wrap native Stellar assets. SACs are automatically detected via RPC ledger entries and their specifications are loaded dynamically.
249
+
250
+ ### How SAC Support Works
251
+
252
+ 1. **Detection**: When loading a contract, the adapter checks its executable type via RPC
253
+ 2. **Specification Loading**: For SAC contracts, the adapter fetches the official SAC specification from GitHub
254
+ 3. **XDR Encoding**: The JSON spec is converted to XDR format using `@stellar/stellar-xdr-json`
255
+ 4. **UI Generation**: The adapter generates the same UI fields as regular WASM contracts
256
+
257
+ ### Technical Implementation Details
258
+
259
+ #### WASM Loading Strategy
260
+
261
+ The `@stellar/stellar-xdr-json` library requires a ~3MB WebAssembly module for XDR encoding. After extensive testing with various Vite bundling approaches (including `vite-plugin-wasm`, `vite-plugin-top-level-await`, and `?url` imports), we encountered persistent issues where Vite would serve HTML instead of the WASM binary, resulting in WebAssembly instantiation errors.
262
+
263
+ **Solution**: The WASM module is loaded from CDN (`unpkg.com`) rather than bundled. This approach:
264
+
265
+ - Avoids Vite bundling complexities and errors
266
+ - Reduces bundle size by 3MB for users who don't use SAC contracts
267
+ - Loads the WASM only when a SAC contract is actually detected (lazy loading)
268
+ - Simplifies the build configuration
269
+
270
+ ---
271
+
272
+ This adapter generally follows the standard module structure and developer experience provided by the EVM adapter, while keeping the core app chain‑agnostic.
@@ -0,0 +1,21 @@
1
+
2
+ //#region src/config.ts
3
+ const stellarAdapterConfig = { dependencies: {
4
+ runtime: {
5
+ "@stellar/stellar-sdk": "^14.1.1",
6
+ "@stellar/stellar-xdr-json": "^23.0.0",
7
+ "lossless-json": "^4.0.2",
8
+ "@creit.tech/stellar-wallets-kit": "^1.9.5",
9
+ "@openzeppelin/relayer-sdk": "1.9.0",
10
+ react: "^19.0.0",
11
+ "react-dom": "^19.0.0"
12
+ },
13
+ dev: {
14
+ "@types/react": "^19.0.0",
15
+ "@types/react-dom": "^19.0.0"
16
+ }
17
+ } };
18
+
19
+ //#endregion
20
+ exports.stellarAdapterConfig = stellarAdapterConfig;
21
+ //# sourceMappingURL=config.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.cjs","names":[],"sources":["../src/config.ts"],"sourcesContent":["/**\n * Configuration for the Stellar adapter\n *\n * This file defines the dependencies required by the Stellar adapter\n * when generating exported projects. It follows the AdapterConfig\n * interface to provide a structured approach to dependency management.\n */\nimport type { AdapterConfig } from '@openzeppelin/ui-types';\n\nexport const stellarAdapterConfig: AdapterConfig = {\n /**\n * Dependencies required by the Stellar adapter\n * These will be included in exported projects that use this adapter\n */\n dependencies: {\n // Runtime dependencies\n runtime: {\n // Core Stellar libraries\n '@stellar/stellar-sdk': '^14.1.1',\n\n // SAC (Stellar Asset Contract) support - dynamically loaded from CDN\n // These are needed for XDR encoding when working with SAC contracts\n '@stellar/stellar-xdr-json': '^23.0.0',\n 'lossless-json': '^4.0.2',\n\n // Wallet connection and integration\n '@creit.tech/stellar-wallets-kit': '^1.9.5',\n\n // OpenZeppelin Relayer integration for gasless transactions\n '@openzeppelin/relayer-sdk': '1.9.0',\n\n // React integration for wallet components\n react: '^19.0.0',\n 'react-dom': '^19.0.0',\n },\n\n // Development dependencies\n dev: {\n '@types/react': '^19.0.0',\n '@types/react-dom': '^19.0.0',\n },\n },\n};\n"],"mappings":";;AASA,MAAa,uBAAsC,EAKjD,cAAc;CAEZ,SAAS;EAEP,wBAAwB;EAIxB,6BAA6B;EAC7B,iBAAiB;EAGjB,mCAAmC;EAGnC,6BAA6B;EAG7B,OAAO;EACP,aAAa;EACd;CAGD,KAAK;EACH,gBAAgB;EAChB,oBAAoB;EACrB;CACF,EACF"}
@@ -0,0 +1,8 @@
1
+ import { AdapterConfig } from "@openzeppelin/ui-types";
2
+
3
+ //#region src/config.d.ts
4
+
5
+ declare const stellarAdapterConfig: AdapterConfig;
6
+ //#endregion
7
+ export { stellarAdapterConfig };
8
+ //# sourceMappingURL=config.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.d.cts","names":[],"sources":["../src/config.ts"],"sourcesContent":[],"mappings":";;;;cASa,sBAAsB"}
@@ -0,0 +1,8 @@
1
+ import { AdapterConfig } from "@openzeppelin/ui-types";
2
+
3
+ //#region src/config.d.ts
4
+
5
+ declare const stellarAdapterConfig: AdapterConfig;
6
+ //#endregion
7
+ export { stellarAdapterConfig };
8
+ //# sourceMappingURL=config.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.d.mts","names":[],"sources":["../src/config.ts"],"sourcesContent":[],"mappings":";;;;cASa,sBAAsB"}
@@ -0,0 +1,20 @@
1
+ //#region src/config.ts
2
+ const stellarAdapterConfig = { dependencies: {
3
+ runtime: {
4
+ "@stellar/stellar-sdk": "^14.1.1",
5
+ "@stellar/stellar-xdr-json": "^23.0.0",
6
+ "lossless-json": "^4.0.2",
7
+ "@creit.tech/stellar-wallets-kit": "^1.9.5",
8
+ "@openzeppelin/relayer-sdk": "1.9.0",
9
+ react: "^19.0.0",
10
+ "react-dom": "^19.0.0"
11
+ },
12
+ dev: {
13
+ "@types/react": "^19.0.0",
14
+ "@types/react-dom": "^19.0.0"
15
+ }
16
+ } };
17
+
18
+ //#endregion
19
+ export { stellarAdapterConfig };
20
+ //# sourceMappingURL=config.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.mjs","names":[],"sources":["../src/config.ts"],"sourcesContent":["/**\n * Configuration for the Stellar adapter\n *\n * This file defines the dependencies required by the Stellar adapter\n * when generating exported projects. It follows the AdapterConfig\n * interface to provide a structured approach to dependency management.\n */\nimport type { AdapterConfig } from '@openzeppelin/ui-types';\n\nexport const stellarAdapterConfig: AdapterConfig = {\n /**\n * Dependencies required by the Stellar adapter\n * These will be included in exported projects that use this adapter\n */\n dependencies: {\n // Runtime dependencies\n runtime: {\n // Core Stellar libraries\n '@stellar/stellar-sdk': '^14.1.1',\n\n // SAC (Stellar Asset Contract) support - dynamically loaded from CDN\n // These are needed for XDR encoding when working with SAC contracts\n '@stellar/stellar-xdr-json': '^23.0.0',\n 'lossless-json': '^4.0.2',\n\n // Wallet connection and integration\n '@creit.tech/stellar-wallets-kit': '^1.9.5',\n\n // OpenZeppelin Relayer integration for gasless transactions\n '@openzeppelin/relayer-sdk': '1.9.0',\n\n // React integration for wallet components\n react: '^19.0.0',\n 'react-dom': '^19.0.0',\n },\n\n // Development dependencies\n dev: {\n '@types/react': '^19.0.0',\n '@types/react-dom': '^19.0.0',\n },\n },\n};\n"],"mappings":";AASA,MAAa,uBAAsC,EAKjD,cAAc;CAEZ,SAAS;EAEP,wBAAwB;EAIxB,6BAA6B;EAC7B,iBAAiB;EAGjB,mCAAmC;EAGnC,6BAA6B;EAG7B,OAAO;EACP,aAAa;EACd;CAGD,KAAK;EACH,gBAAgB;EAChB,oBAAoB;EACrB;CACF,EACF"}