
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
@openzeppelin/adapter-stellar
Advanced tools
@openzeppelin/adapter-stellar)This package provides the ContractAdapter implementation for the Stellar (Soroban) ecosystem for the UI Builder.
It is responsible for:
ContractAdapter interface from @openzeppelin/ui-types.StellarNetworkConfig objects in src/networks/ (Horizon URL, Soroban RPC URL, network passphrase, explorer URL, icon, etc.).ContractSchema.ScVal types for transaction execution and formatting view results.src/wallet/ module.The Stellar adapter uses an execution strategy pattern similar to the EVM adapter to handle transaction submissions.
StellarRelayerOptions React component to configure strategy‑specific options in the Builder UI.The adapter selects the strategy at runtime based on the ExecutionConfig provided by the application.
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.
The Stellar adapter includes first-class support for OpenZeppelin Access Control and Ownable contracts through a dedicated service module.
Since OpenZeppelin's Stellar contracts don't expose a get_all_roles() method, the adapter supports multiple ways to obtain role identifiers:
const service = adapter.getAccessControlService();
service.registerContract(contractAddress, schema, ['admin', 'minter', 'burner']);
If no role IDs are provided, the service automatically queries the indexer for historical ROLE_GRANTED and ROLE_REVOKED events:
// Register without role IDs - discovery happens automatically
service.registerContract(contractAddress, schema);
// Or explicitly discover roles
const roles = await service.discoverKnownRoleIds(contractAddress);
// => ['admin', 'minter', 'burner']
For newly created roles that haven't been granted yet (no historical events), you can add them manually:
// Add roles that may not exist in historical events
service.addKnownRoleIds(contractAddress, ['new_role', 'another_role']);
Role IDs are validated against Soroban Symbol constraints:
For historical queries (e.g., getHistory()), the adapter integrates with the Stellar Access Control Indexer, a SubQuery project that indexes Access Control and Ownable events.
Add indexerUri to your StellarNetworkConfig:
const stellarTestnet: StellarNetworkConfig = {
// ... other config
indexerUri: 'https://api.subquery.network/sq/openzeppelin/stellar-access-control-indexer',
};
The indexer is production-ready and compatible with:
For deployment instructions, see the Indexer Deployment Guide.
If no indexer is configured or the indexer is unavailable:
All wallet integration logic, UI components, facade hooks, and the UI context provider for Stellar are located in src/wallet/.
The StellarAdapter implements the optional UI methods from ContractAdapter:
getEcosystemReactUiContextProvider() returns StellarWalletUiRoot, a stable provider root for Stellar wallet state.getEcosystemReactHooks() returns stellarFacadeHooks for account and connection status.getEcosystemWalletComponents() returns available wallet UI components (e.g., ConnectButton, AccountDisplay) for the active UI kit.For full documentation on the wallet module, see src/wallet/README.md.
This adapter follows the standard module structure outlined in the main project Adapter Architecture Guide.
adapter-stellar/
├── src/
│ ├── access-control/ # Access Control & Ownable support (service, indexer)
│ ├── configuration/ # Adapter-specific configuration (RPC, explorer, execution)
│ ├── contract/ # Contract loading & metadata
│ ├── mapping/ # Soroban ↔ form field mapping & generators
│ ├── networks/ # Stellar network configurations
│ ├── query/ # View function execution
│ ├── transaction/ # Transaction execution system (EOA, Relayer)
│ │ ├── components/ # React components for configuration
│ │ ├── formatter.ts # Build Soroban tx data from form inputs
│ │ ├── execution-strategy.ts # Strategy interface
│ │ ├── eoa.ts / relayer.ts # Strategy implementations
│ ├── transform/ # Input parsing and output formatting
│ ├── types/ # Adapter-specific types
│ ├── utils/ # Utilities (artifact handling, formatting, etc.)
│ ├── validation/ # Validation utilities (addresses, configs)
│ ├── wallet/ # Wallet integration (see wallet/README.md)
│ │ ├── components/ # Wallet UI components
│ │ ├── context/ # Wallet context
│ │ ├── hooks/ # Facade & low-level hooks
│ │ ├── implementation/ # Stellar Wallets Kit implementation
│ │ ├── services/ # Config resolution for wallet UI
│ │ ├── stellar-wallets-kit/ # Kit-specific helpers
│ │ ├── README.md # Detailed wallet documentation
│ ├── adapter.ts # Main StellarAdapter class implementation
│ └── index.ts # Public package exports
├── package.json
├── tsconfig.json
├── tsup.config.ts
├── vitest.config.ts
└── README.md
Instantiate the adapter with a specific StellarNetworkConfig:
import { StellarAdapter, stellarTestnet } from '@openzeppelin/adapter-stellar';
const networkConfig = stellarTestnet; // or stellarPublic
const stellarAdapter = new StellarAdapter(networkConfig);
// Use stellarAdapter for operations on the configured Stellar network
Network configurations for Stellar networks are exported from src/networks/index.ts (stellarPublic, stellarTestnet, arrays stellarMainnetNetworks, stellarTestnetNetworks, and stellarNetworks).
Each StellarNetworkConfig specifies a default sorobanRpcUrl.
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).
To override a RPC URL, define an entry in rpcEndpoints keyed by the network’s string ID (e.g., "stellar-testnet").
In .env for the Builder app:
VITE_APP_CFG_RPC_ENDPOINT_STELLAR_TESTNET="https://your-custom-soroban-rpc.testnet.example"
In public/app.config.json for an exported app:
{
"rpcEndpoints": {
"stellar-testnet": "https://your-custom-soroban-rpc.testnet.example",
"stellar-public": "https://your-custom-soroban-rpc.public.example"
}
}
The adapter resolves Soroban RPC in this order:
UserRpcConfigService (advanced user input)AppConfigService.getRpcEndpointOverride(networkId)sorobanRpcUrl from the active StellarNetworkConfigStellar explorers are used for display only. The adapter constructs URLs using explorerUrl from the network config:
getExplorerUrl(address) → .../account/{address} or .../contract/{id} (Soroban contracts)getExplorerTxUrl(txHash) → .../tx/{hash}No explorer API keys are required for adapter functionality.
Stellar networks are exported from src/networks/. Each StellarNetworkConfig includes:
id: Unique network identifier (e.g., "stellar-public", "stellar-testnet")name: Display nameecosystem: Always "stellar"network: Always "stellar"type: "mainnet" or "testnet"isTestnet: booleanhorizonUrl: Horizon endpoint for the networksorobanRpcUrl: Soroban JSON-RPC endpointnetworkPassphrase: The network passphrase used by Wallets Kit / SDKexplorerUrl: Base URL for the explorer (display only)icon: Icon identifierSee src/networks/README.md for details on adding networks and overriding RPC.
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.
@stellar/stellar-xdr-jsonThe @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.
Solution: The WASM module is loaded from CDN (unpkg.com) rather than bundled. This approach:
This adapter generally follows the standard module structure and developer experience provided by the EVM adapter, while keeping the core app chain‑agnostic.
FAQs
Stellar Adapter for UI Builder
We found that @openzeppelin/adapter-stellar demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 9 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.