@openzeppelin/ui-types 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.
- package/LICENSE +661 -0
- package/README.md +174 -0
- package/dist/index-BvxkLrGC.d.cts +2965 -0
- package/dist/index-BvxkLrGC.d.cts.map +1 -0
- package/dist/index-yVZ0ZDGy.d.ts +2965 -0
- package/dist/index-yVZ0ZDGy.d.ts.map +1 -0
- package/dist/index.cjs +380 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +2965 -0
- package/dist/index.d.ts +2965 -0
- package/dist/index.js +361 -0
- package/dist/index.js.map +1 -0
- package/package.json +57 -0
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,2965 @@
|
|
|
1
|
+
import React$1 from "react";
|
|
2
|
+
|
|
3
|
+
//#region src/config/app-config.d.ts
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Configuration types for the runtime application.
|
|
7
|
+
* These types define the structure for application-wide configurations,
|
|
8
|
+
* including API keys, feature flags, and other settings.
|
|
9
|
+
* @packageDocumentation
|
|
10
|
+
*/
|
|
11
|
+
/**
|
|
12
|
+
* Configuration for specific explorer/network services.
|
|
13
|
+
*/
|
|
14
|
+
interface ExplorerApiConfig {
|
|
15
|
+
/** The API key for this specific service. */
|
|
16
|
+
apiKey?: string;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* A collection of configurations for various network services,
|
|
20
|
+
* keyed by a unique service identifier.
|
|
21
|
+
* Example identifiers: "etherscan-mainnet", "polygonscan-matic", "arbiscan-mainnet"
|
|
22
|
+
*/
|
|
23
|
+
interface NetworkServiceConfigs {
|
|
24
|
+
[serviceIdentifier: string]: ExplorerApiConfig | undefined;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Generic configuration for a service parameter.
|
|
28
|
+
*
|
|
29
|
+
* This can contain:
|
|
30
|
+
* - Primitive values (string, number, boolean)
|
|
31
|
+
* - Nested objects for more complex configuration
|
|
32
|
+
* - Arrays of primitive values or objects
|
|
33
|
+
*/
|
|
34
|
+
interface ServiceParameterConfig {
|
|
35
|
+
[paramName: string]: string | number | boolean | object | Array<unknown> | undefined;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* A collection of configurations for global services, keyed by service name.
|
|
39
|
+
* Adapters or services will look up their specific configurations here.
|
|
40
|
+
* Example: globalServiceConfigs['walletconnect']?.['projectId']
|
|
41
|
+
*/
|
|
42
|
+
interface GlobalServiceConfigs {
|
|
43
|
+
[serviceName: string]: ServiceParameterConfig | undefined;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Feature flags for enabling/disabling application features.
|
|
47
|
+
* Keyed by the feature flag name.
|
|
48
|
+
*/
|
|
49
|
+
interface FeatureFlags {
|
|
50
|
+
[flagName: string]: boolean;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Configuration for an RPC endpoint, allowing for different transport types.
|
|
54
|
+
*/
|
|
55
|
+
interface RpcEndpointConfig {
|
|
56
|
+
http?: string;
|
|
57
|
+
webSocket?: string;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Configuration for a user-provided RPC provider.
|
|
61
|
+
* This allows users to configure their own RPC endpoints with API keys.
|
|
62
|
+
*/
|
|
63
|
+
interface UserRpcProviderConfig {
|
|
64
|
+
/** The RPC endpoint URL */
|
|
65
|
+
url: string;
|
|
66
|
+
/** Optional API key for providers that require authentication */
|
|
67
|
+
apiKey?: string;
|
|
68
|
+
/** User-friendly name for this configuration (e.g., "My Alchemy Key") */
|
|
69
|
+
name?: string;
|
|
70
|
+
/** Whether this is a custom user-provided configuration */
|
|
71
|
+
isCustom: boolean;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Configuration for a user-provided block explorer.
|
|
75
|
+
* This allows users to configure their own explorer endpoints and API keys.
|
|
76
|
+
*/
|
|
77
|
+
interface UserExplorerConfig {
|
|
78
|
+
/** The explorer base URL (e.g., "https://etherscan.io") */
|
|
79
|
+
explorerUrl?: string;
|
|
80
|
+
/** The explorer API URL (e.g., "https://api.etherscan.io/api") - V1 only */
|
|
81
|
+
apiUrl?: string;
|
|
82
|
+
/** API key for the explorer service */
|
|
83
|
+
apiKey?: string;
|
|
84
|
+
/** User-friendly name for this configuration (e.g., "My Etherscan API") */
|
|
85
|
+
name?: string;
|
|
86
|
+
/** Whether this is a custom user-provided configuration */
|
|
87
|
+
isCustom: boolean;
|
|
88
|
+
/** Whether this configuration should be applied to all compatible networks */
|
|
89
|
+
applyToAllNetworks?: boolean;
|
|
90
|
+
/** List of network IDs this config applies to (if applyToAllNetworks is false) */
|
|
91
|
+
appliedNetworkIds?: string[];
|
|
92
|
+
/** Optional default contract definition provider key (adapter-defined options, chain-agnostic in UI) */
|
|
93
|
+
defaultProvider?: string;
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Configuration for indexer endpoints.
|
|
97
|
+
* Similar to RPC endpoint config but specifically for blockchain data indexers.
|
|
98
|
+
*/
|
|
99
|
+
interface IndexerEndpointConfig {
|
|
100
|
+
http?: string;
|
|
101
|
+
ws?: string;
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* A collection of indexer endpoint overrides, keyed by network ID (e.g., networkConfig.id).
|
|
105
|
+
* Values can be a simple string (assumed to be HTTP) or an IndexerEndpointConfig object.
|
|
106
|
+
*/
|
|
107
|
+
interface NetworkSpecificIndexerEndpoints {
|
|
108
|
+
[networkId: string]: string | IndexerEndpointConfig | undefined;
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* A collection of RPC endpoint overrides, keyed by network ID (e.g., networkConfig.id).
|
|
112
|
+
* Values can be a simple string (assumed to be HTTP), an RpcEndpointConfig object,
|
|
113
|
+
* or a UserRpcProviderConfig for user-configured endpoints.
|
|
114
|
+
*/
|
|
115
|
+
interface NetworkSpecificRpcEndpoints {
|
|
116
|
+
[networkId: string]: string | RpcEndpointConfig | UserRpcProviderConfig | undefined;
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* The main application runtime configuration structure.
|
|
120
|
+
* This object holds all configurable parameters for the application.
|
|
121
|
+
*/
|
|
122
|
+
interface AppRuntimeConfig {
|
|
123
|
+
/** Configurations for various network-related services like block explorers. */
|
|
124
|
+
networkServiceConfigs?: NetworkServiceConfigs;
|
|
125
|
+
/** Configurations for global services. */
|
|
126
|
+
globalServiceConfigs?: GlobalServiceConfigs;
|
|
127
|
+
/** Feature flags to toggle application behavior. */
|
|
128
|
+
featureFlags?: FeatureFlags;
|
|
129
|
+
/** Default language for the application (e.g., "en", "es"). */
|
|
130
|
+
defaultLanguage?: string;
|
|
131
|
+
/** RPC endpoint overrides for different networks. */
|
|
132
|
+
rpcEndpoints?: NetworkSpecificRpcEndpoints;
|
|
133
|
+
/** Indexer endpoint overrides for different networks (for historical data queries). */
|
|
134
|
+
indexerEndpoints?: NetworkSpecificIndexerEndpoints;
|
|
135
|
+
}
|
|
136
|
+
//# sourceMappingURL=app-config.d.ts.map
|
|
137
|
+
//#endregion
|
|
138
|
+
//#region src/contracts/proxy.d.ts
|
|
139
|
+
/**
|
|
140
|
+
* Proxy Contract Detection and Analysis Types
|
|
141
|
+
*
|
|
142
|
+
* These types support runtime proxy pattern detection and analysis.
|
|
143
|
+
* Note: These are NOT persisted to storage - proxy information should be fresh on each load.
|
|
144
|
+
*/
|
|
145
|
+
/**
|
|
146
|
+
* Chain-agnostic proxy contract detection information
|
|
147
|
+
* Contains information about proxy pattern detection and implementation addresses
|
|
148
|
+
*/
|
|
149
|
+
interface ProxyInfo {
|
|
150
|
+
/** Whether the contract is detected as a proxy */
|
|
151
|
+
isProxy: boolean;
|
|
152
|
+
/** Type of proxy pattern detected (e.g., 'uups', 'transparent', 'beacon', 'diamond', 'minimal') */
|
|
153
|
+
proxyType: string;
|
|
154
|
+
/** Implementation contract address that contains the business logic */
|
|
155
|
+
implementationAddress?: string;
|
|
156
|
+
/** Admin address for admin-managed proxies (when determinable via storage slots) */
|
|
157
|
+
adminAddress?: string;
|
|
158
|
+
/** Original proxy contract address provided by the user */
|
|
159
|
+
proxyAddress: string;
|
|
160
|
+
/** Method used to detect the proxy pattern (e.g., 'abi-analysis', 'eip1967-storage', 'direct-call') */
|
|
161
|
+
detectionMethod?: string;
|
|
162
|
+
/** Confidence level of the proxy detection */
|
|
163
|
+
confidence?: 'high' | 'medium' | 'low';
|
|
164
|
+
/** When the proxy information was detected */
|
|
165
|
+
detectionTimestamp?: Date;
|
|
166
|
+
/** Error message if proxy detection failed */
|
|
167
|
+
detectionError?: string;
|
|
168
|
+
}
|
|
169
|
+
//# sourceMappingURL=proxy.d.ts.map
|
|
170
|
+
//#endregion
|
|
171
|
+
//#region src/common/ecosystem.d.ts
|
|
172
|
+
/**
|
|
173
|
+
* Blockchain Ecosystem Types
|
|
174
|
+
*
|
|
175
|
+
* This file defines core types related to blockchain ecosystems supported
|
|
176
|
+
* by the OpenZeppelin UI ecosystem. It consolidates previously scattered
|
|
177
|
+
* ecosystem-related types into a single source of truth.
|
|
178
|
+
*/
|
|
179
|
+
/**
|
|
180
|
+
* Supported blockchain ecosystems
|
|
181
|
+
*/
|
|
182
|
+
type Ecosystem = 'evm' | 'solana' | 'stellar' | 'midnight';
|
|
183
|
+
/**
|
|
184
|
+
* Network environment types
|
|
185
|
+
*/
|
|
186
|
+
type NetworkType = 'mainnet' | 'testnet' | 'devnet';
|
|
187
|
+
/**
|
|
188
|
+
* Configuration for ecosystem feature flags
|
|
189
|
+
*/
|
|
190
|
+
interface EcosystemFeatureConfig {
|
|
191
|
+
/** Whether the ecosystem is enabled and functional */
|
|
192
|
+
enabled: boolean;
|
|
193
|
+
/** Whether to show the ecosystem in the UI (even if disabled) */
|
|
194
|
+
showInUI: boolean;
|
|
195
|
+
/** Label to display when the ecosystem is disabled */
|
|
196
|
+
disabledLabel?: string;
|
|
197
|
+
/** Description to show when the ecosystem is disabled */
|
|
198
|
+
disabledDescription?: string;
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* Interface for ecosystem-specific data in the registry
|
|
202
|
+
*/
|
|
203
|
+
interface EcosystemInfo {
|
|
204
|
+
/** Display name (e.g., 'Ethereum (EVM)') */
|
|
205
|
+
name: string;
|
|
206
|
+
/** Detailed description of the blockchain */
|
|
207
|
+
description: string;
|
|
208
|
+
/** Explorer/verification platform guidance */
|
|
209
|
+
explorerGuidance: string;
|
|
210
|
+
/** Address format example (if applicable) */
|
|
211
|
+
addressExample?: string;
|
|
212
|
+
/** Icon path for the ecosystem (if available) */
|
|
213
|
+
iconPath?: string;
|
|
214
|
+
/** Network icon name for @web3icons/react NetworkIcon component */
|
|
215
|
+
networkIconName?: string;
|
|
216
|
+
/** Background color class for UI elements */
|
|
217
|
+
bgColorClass?: string;
|
|
218
|
+
/** Text color class for UI elements */
|
|
219
|
+
textColorClass?: string;
|
|
220
|
+
/** Default feature flag configuration */
|
|
221
|
+
defaultFeatureConfig: EcosystemFeatureConfig;
|
|
222
|
+
}
|
|
223
|
+
/**
|
|
224
|
+
* Blockchain ecosystem metadata for UI display and configuration
|
|
225
|
+
*/
|
|
226
|
+
interface EcosystemDefinition {
|
|
227
|
+
/**
|
|
228
|
+
* Unique identifier for the ecosystem
|
|
229
|
+
*/
|
|
230
|
+
id: Ecosystem;
|
|
231
|
+
/**
|
|
232
|
+
* Human-readable name of the ecosystem
|
|
233
|
+
*/
|
|
234
|
+
name: string;
|
|
235
|
+
/**
|
|
236
|
+
* Description of the ecosystem's purpose or characteristics
|
|
237
|
+
*/
|
|
238
|
+
description: string;
|
|
239
|
+
/**
|
|
240
|
+
* Optional icon for UI display
|
|
241
|
+
* Note: This uses a generic type as we don't want to introduce React dependencies
|
|
242
|
+
*/
|
|
243
|
+
icon?: unknown;
|
|
244
|
+
}
|
|
245
|
+
/**
|
|
246
|
+
* Type guards for ecosystem types
|
|
247
|
+
*/
|
|
248
|
+
declare const isEvmEcosystem: (ecosystem: Ecosystem) => ecosystem is "evm";
|
|
249
|
+
declare const isSolanaEcosystem: (ecosystem: Ecosystem) => ecosystem is "solana";
|
|
250
|
+
declare const isStellarEcosystem: (ecosystem: Ecosystem) => ecosystem is "stellar";
|
|
251
|
+
declare const isMidnightEcosystem: (ecosystem: Ecosystem) => ecosystem is "midnight";
|
|
252
|
+
//# sourceMappingURL=ecosystem.d.ts.map
|
|
253
|
+
//#endregion
|
|
254
|
+
//#region src/contracts/schema.d.ts
|
|
255
|
+
/**
|
|
256
|
+
* Represents a parameter within a contract function or event. This is a generalized, internal
|
|
257
|
+
* representation used by the OpenZeppelin UI ecosystem. Blockchain-specific adapters are
|
|
258
|
+
* responsible for mapping their native parameter types (e.g., from an EVM ABI or Solana IDL)
|
|
259
|
+
* to this structure.
|
|
260
|
+
*/
|
|
261
|
+
interface FunctionParameter {
|
|
262
|
+
/**
|
|
263
|
+
* Parameter name as defined in the contract's native interface (e.g., ABI).
|
|
264
|
+
*/
|
|
265
|
+
name: string;
|
|
266
|
+
/**
|
|
267
|
+
* The parameter's type as a string, specific to the blockchain ecosystem.
|
|
268
|
+
* For EVM, this would be Solidity types like 'uint256', 'address', 'tuple'.
|
|
269
|
+
* Adapters interpret this string to determine appropriate UI fields and data encoding.
|
|
270
|
+
*/
|
|
271
|
+
type: string;
|
|
272
|
+
/**
|
|
273
|
+
* Optional user-friendly display name, often derived from the `name` or provided
|
|
274
|
+
* by the adapter or user for better UI presentation.
|
|
275
|
+
*/
|
|
276
|
+
displayName?: string;
|
|
277
|
+
/**
|
|
278
|
+
* Optional description for documentation, UI tooltips, or helper text in forms.
|
|
279
|
+
* This may come from comments in the contract source or be added by the user.
|
|
280
|
+
*/
|
|
281
|
+
description?: string;
|
|
282
|
+
/**
|
|
283
|
+
* For complex/nested types (e.g., structs in Solidity, tuples), this array holds
|
|
284
|
+
* the definition of each component parameter, recursively using `FunctionParameter`.
|
|
285
|
+
* Adapters populate this based on the structure of the complex type.
|
|
286
|
+
*/
|
|
287
|
+
components?: FunctionParameter[];
|
|
288
|
+
/**
|
|
289
|
+
* Optional enum metadata for adapters to describe variant structure.
|
|
290
|
+
*/
|
|
291
|
+
enumMetadata?: {
|
|
292
|
+
name: string;
|
|
293
|
+
variants: Array<{
|
|
294
|
+
name: string;
|
|
295
|
+
type: 'void' | 'tuple' | 'integer';
|
|
296
|
+
payloadTypes?: string[];
|
|
297
|
+
payloadComponents?: (FunctionParameter[] | undefined)[];
|
|
298
|
+
value?: number;
|
|
299
|
+
isSingleTuplePayload?: boolean;
|
|
300
|
+
}>;
|
|
301
|
+
isUnitOnly: boolean;
|
|
302
|
+
};
|
|
303
|
+
}
|
|
304
|
+
/**
|
|
305
|
+
* Represents a function in a smart contract. This is a generalized, internal representation.
|
|
306
|
+
* Adapters map functions from the contract's native interface (e.g., ABI) to this structure.
|
|
307
|
+
*/
|
|
308
|
+
interface ContractFunction {
|
|
309
|
+
/**
|
|
310
|
+
* A unique identifier for the function, often generated by combining its name and input types
|
|
311
|
+
* to handle function overloading. This ID is used internally by the builder app.
|
|
312
|
+
*/
|
|
313
|
+
id: string;
|
|
314
|
+
/**
|
|
315
|
+
* Function name as defined in the contract's native interface.
|
|
316
|
+
*/
|
|
317
|
+
name: string;
|
|
318
|
+
/**
|
|
319
|
+
* User-friendly display name for UI, typically derived from `name` or customized.
|
|
320
|
+
*/
|
|
321
|
+
displayName: string;
|
|
322
|
+
/**
|
|
323
|
+
* Optional description for documentation or UI tooltips.
|
|
324
|
+
*/
|
|
325
|
+
description?: string;
|
|
326
|
+
/**
|
|
327
|
+
* Input parameters for the function, each defined as a `FunctionParameter`.
|
|
328
|
+
*/
|
|
329
|
+
inputs: FunctionParameter[];
|
|
330
|
+
/**
|
|
331
|
+
* Optional output parameters for the function, each defined as a `FunctionParameter`.
|
|
332
|
+
* Relevant for view/pure functions or for displaying return values after a transaction.
|
|
333
|
+
*/
|
|
334
|
+
outputs?: FunctionParameter[];
|
|
335
|
+
/**
|
|
336
|
+
* Represents the function's state mutability (e.g., 'view', 'pure', 'nonpayable', 'payable' for EVM).
|
|
337
|
+
* While inspired by EVM, adapters for other chains should map their concepts of read-only
|
|
338
|
+
* vs. state-modifying functions to this field or related fields like `modifiesState`.
|
|
339
|
+
* The exact string values may be ecosystem-specific and interpreted by the adapter.
|
|
340
|
+
*/
|
|
341
|
+
stateMutability?: string;
|
|
342
|
+
/**
|
|
343
|
+
* The type of the ABI item (e.g., 'function', 'constructor', 'fallback' for EVM).
|
|
344
|
+
* Adapters should map the native function type to this string.
|
|
345
|
+
*/
|
|
346
|
+
type: string;
|
|
347
|
+
/**
|
|
348
|
+
* Indicates if the function is expected to modify blockchain state.
|
|
349
|
+
* This is often derived from `stateMutability` but provides a clear boolean flag
|
|
350
|
+
* for UI logic (e.g., determining if a transaction needs to be signed).
|
|
351
|
+
*/
|
|
352
|
+
modifiesState: boolean;
|
|
353
|
+
}
|
|
354
|
+
/**
|
|
355
|
+
* Represents a contract event. This is a generalized, internal representation.
|
|
356
|
+
* Adapters map events from the contract's native interface (e.g., ABI) to this structure.
|
|
357
|
+
*/
|
|
358
|
+
interface ContractEvent {
|
|
359
|
+
/**
|
|
360
|
+
* A unique identifier for the event, often generated by combining its name and input types.
|
|
361
|
+
*/
|
|
362
|
+
id: string;
|
|
363
|
+
/**
|
|
364
|
+
* Event name as defined in the contract's native interface.
|
|
365
|
+
*/
|
|
366
|
+
name: string;
|
|
367
|
+
/**
|
|
368
|
+
* Input parameters for the event (indexed and non-indexed), each defined as a `FunctionParameter`.
|
|
369
|
+
*/
|
|
370
|
+
inputs: FunctionParameter[];
|
|
371
|
+
}
|
|
372
|
+
/**
|
|
373
|
+
* Represents the overall schema of a smart contract, including its functions and events.
|
|
374
|
+
* This is a generalized, internal model used by the OpenZeppelin UI ecosystem.
|
|
375
|
+
* Blockchain-specific adapters are responsible for parsing a contract's native interface
|
|
376
|
+
* (e.g., an EVM ABI JSON, Solana IDL) and transforming it into this `ContractSchema` structure.
|
|
377
|
+
* The goal is to provide a consistent data model for applications to work with,
|
|
378
|
+
* abstracting away the specifics of different blockchain ecosystems.
|
|
379
|
+
*/
|
|
380
|
+
interface ContractSchema {
|
|
381
|
+
/**
|
|
382
|
+
* Optional contract name, which might be derived from metadata or user input.
|
|
383
|
+
*/
|
|
384
|
+
name?: string;
|
|
385
|
+
/**
|
|
386
|
+
* The blockchain ecosystem this contract belongs to (e.g., 'evm', 'solana').
|
|
387
|
+
* This helps the builder application select the appropriate adapter and interpret types.
|
|
388
|
+
*/
|
|
389
|
+
ecosystem: Ecosystem;
|
|
390
|
+
/**
|
|
391
|
+
* An array of `ContractFunction` objects representing the functions available in the contract.
|
|
392
|
+
*/
|
|
393
|
+
functions: ContractFunction[];
|
|
394
|
+
/**
|
|
395
|
+
* Optional array of `ContractEvent` objects representing the events defined in the contract.
|
|
396
|
+
*/
|
|
397
|
+
events?: ContractEvent[];
|
|
398
|
+
/**
|
|
399
|
+
* Optional address where the contract is deployed on its respective blockchain.
|
|
400
|
+
*/
|
|
401
|
+
address?: string;
|
|
402
|
+
/**
|
|
403
|
+
* Optional chain-specific metadata that adapters can use for enhanced functionality.
|
|
404
|
+
* This allows adapters to store additional context (e.g., Stellar spec entries, EVM ABI metadata)
|
|
405
|
+
* without polluting the core schema interface.
|
|
406
|
+
*/
|
|
407
|
+
metadata?: Record<string, unknown>;
|
|
408
|
+
}
|
|
409
|
+
//# sourceMappingURL=schema.d.ts.map
|
|
410
|
+
//#endregion
|
|
411
|
+
//#region src/contracts/storage.d.ts
|
|
412
|
+
/**
|
|
413
|
+
* Contract Definition Storage and Persistence Types
|
|
414
|
+
*
|
|
415
|
+
* These types support chain-agnostic contract definition storage and comparison functionality
|
|
416
|
+
* while allowing chain-specific implementations in adapters.
|
|
417
|
+
*/
|
|
418
|
+
/**
|
|
419
|
+
* Metadata associated with a contract definition
|
|
420
|
+
*/
|
|
421
|
+
interface ContractDefinitionMetadata {
|
|
422
|
+
/** Block explorer URL where definition was fetched from */
|
|
423
|
+
fetchedFrom?: string;
|
|
424
|
+
/** Contract name from verification data */
|
|
425
|
+
contractName?: string;
|
|
426
|
+
/** Compiler version used for contract */
|
|
427
|
+
compilerVersion?: string;
|
|
428
|
+
/** Contract verification status */
|
|
429
|
+
verificationStatus?: 'verified' | 'unverified' | 'unknown';
|
|
430
|
+
/** When the definition was fetched */
|
|
431
|
+
fetchTimestamp?: Date;
|
|
432
|
+
/** Error message if fetch failed */
|
|
433
|
+
fetchError?: string;
|
|
434
|
+
/** Non-cryptographic hash of the raw contract definition for quick comparison */
|
|
435
|
+
definitionHash?: string;
|
|
436
|
+
}
|
|
437
|
+
/**
|
|
438
|
+
* Result of comparing two contract definitions (raw ABI, IDL, etc.)
|
|
439
|
+
*/
|
|
440
|
+
interface ContractDefinitionComparisonResult {
|
|
441
|
+
/** Whether the definitions are functionally identical */
|
|
442
|
+
identical: boolean;
|
|
443
|
+
/** List of differences between the definitions */
|
|
444
|
+
differences: ContractDefinitionDifference[];
|
|
445
|
+
/** Overall severity of differences */
|
|
446
|
+
severity: 'none' | 'minor' | 'major' | 'breaking';
|
|
447
|
+
/** Human-readable summary of the comparison */
|
|
448
|
+
summary: string;
|
|
449
|
+
}
|
|
450
|
+
/**
|
|
451
|
+
* A specific difference between two contract definitions (raw ABI, IDL, etc.)
|
|
452
|
+
*/
|
|
453
|
+
interface ContractDefinitionDifference {
|
|
454
|
+
/** Type of change */
|
|
455
|
+
type: 'added' | 'removed' | 'modified';
|
|
456
|
+
/** Section of definition that changed (chain-specific: function, event, etc.) */
|
|
457
|
+
section: string;
|
|
458
|
+
/** Name of the changed element */
|
|
459
|
+
name: string;
|
|
460
|
+
/** Detailed description of the change */
|
|
461
|
+
details: string;
|
|
462
|
+
/** Impact level of this change */
|
|
463
|
+
impact: 'low' | 'medium' | 'high';
|
|
464
|
+
/** Original signature (for removed/modified items) */
|
|
465
|
+
oldSignature?: string;
|
|
466
|
+
/** New signature (for added/modified items) */
|
|
467
|
+
newSignature?: string;
|
|
468
|
+
}
|
|
469
|
+
/**
|
|
470
|
+
* Result of contract definition validation (raw ABI, IDL, etc.)
|
|
471
|
+
*/
|
|
472
|
+
interface ContractDefinitionValidationResult {
|
|
473
|
+
/** Whether the definition is structurally valid */
|
|
474
|
+
valid: boolean;
|
|
475
|
+
/** List of validation errors */
|
|
476
|
+
errors: string[];
|
|
477
|
+
/** List of validation warnings */
|
|
478
|
+
warnings: string[];
|
|
479
|
+
/** Normalized definition if validation passed */
|
|
480
|
+
normalizedDefinition?: unknown;
|
|
481
|
+
}
|
|
482
|
+
//# sourceMappingURL=storage.d.ts.map
|
|
483
|
+
//#endregion
|
|
484
|
+
//#region src/execution/eoa.d.ts
|
|
485
|
+
interface EoaExecutionConfig {
|
|
486
|
+
method: 'eoa';
|
|
487
|
+
allowAny: boolean;
|
|
488
|
+
specificAddress?: string;
|
|
489
|
+
}
|
|
490
|
+
//# sourceMappingURL=eoa.d.ts.map
|
|
491
|
+
//#endregion
|
|
492
|
+
//#region src/execution/multisig.d.ts
|
|
493
|
+
interface MultisigExecutionConfig {
|
|
494
|
+
method: 'multisig';
|
|
495
|
+
}
|
|
496
|
+
//# sourceMappingURL=multisig.d.ts.map
|
|
497
|
+
//#endregion
|
|
498
|
+
//#region src/execution/relayer.d.ts
|
|
499
|
+
interface RelayerDetails {
|
|
500
|
+
relayerId: string;
|
|
501
|
+
name: string;
|
|
502
|
+
address: string;
|
|
503
|
+
network: string;
|
|
504
|
+
paused: boolean;
|
|
505
|
+
}
|
|
506
|
+
interface RelayerDetailsRich extends RelayerDetails {
|
|
507
|
+
systemDisabled: boolean;
|
|
508
|
+
balance?: string;
|
|
509
|
+
nonce?: string;
|
|
510
|
+
pendingTransactionsCount?: number;
|
|
511
|
+
lastConfirmedTransactionTimestamp?: string;
|
|
512
|
+
}
|
|
513
|
+
interface RelayerExecutionConfig {
|
|
514
|
+
method: 'relayer';
|
|
515
|
+
serviceUrl: string;
|
|
516
|
+
relayer: RelayerDetails;
|
|
517
|
+
transactionOptions?: Record<string, unknown>;
|
|
518
|
+
}
|
|
519
|
+
//# sourceMappingURL=relayer.d.ts.map
|
|
520
|
+
//#endregion
|
|
521
|
+
//#region src/execution/index.d.ts
|
|
522
|
+
/**
|
|
523
|
+
* Execution configuration type (union of all execution methods)
|
|
524
|
+
*/
|
|
525
|
+
type ExecutionConfig = EoaExecutionConfig | RelayerExecutionConfig | MultisigExecutionConfig;
|
|
526
|
+
//# sourceMappingURL=index.d.ts.map
|
|
527
|
+
|
|
528
|
+
//#endregion
|
|
529
|
+
//#region src/common/enum.d.ts
|
|
530
|
+
/**
|
|
531
|
+
* Chain-Agnostic Enum Types
|
|
532
|
+
*
|
|
533
|
+
* This module defines standardized enum types that work across all blockchain adapters.
|
|
534
|
+
* These types represent the UI layer's understanding of enums before they are converted
|
|
535
|
+
* to blockchain-specific formats by individual adapters.
|
|
536
|
+
*/
|
|
537
|
+
/**
|
|
538
|
+
* Chain-agnostic enum value representation.
|
|
539
|
+
* This is the standardized format that enum fields produce, regardless of the target blockchain.
|
|
540
|
+
* Each adapter transforms this generic format into its blockchain-specific representation.
|
|
541
|
+
*
|
|
542
|
+
* @example Basic Usage
|
|
543
|
+
* ```typescript
|
|
544
|
+
* Unit variant (no payload)
|
|
545
|
+
* const unitEnum: EnumValue = { tag: "None" };
|
|
546
|
+
*
|
|
547
|
+
* Tuple variant (with payload)
|
|
548
|
+
* const tupleEnum: EnumValue = {
|
|
549
|
+
* tag: "Some",
|
|
550
|
+
* values: ["hello", 42]
|
|
551
|
+
* };
|
|
552
|
+
* ```
|
|
553
|
+
*
|
|
554
|
+
* @example Cross-Chain Compatibility
|
|
555
|
+
* ```typescript
|
|
556
|
+
* Stellar/Soroban: Transforms to ScVec([Symbol("Active"), payload?])
|
|
557
|
+
* const stellarEnum: EnumValue = { tag: "Active", values: [123] };
|
|
558
|
+
* → ScVec([Symbol("Active"), ScU32(123)])
|
|
559
|
+
*
|
|
560
|
+
* EVM/Solidity: Transforms to integer or struct
|
|
561
|
+
* const evmEnum: EnumValue = { tag: "Pending" };
|
|
562
|
+
* → uint8(0) for simple enums
|
|
563
|
+
* → { variant: 0, data: [...] } for complex enums
|
|
564
|
+
*
|
|
565
|
+
* Solana/Rust: Transforms to Borsh-encoded enum
|
|
566
|
+
* const solanaEnum: EnumValue = { tag: "Ok", values: ["success"] };
|
|
567
|
+
* → Result::Ok("success") via Borsh serialization
|
|
568
|
+
*
|
|
569
|
+
* Complex nested example
|
|
570
|
+
* const complexEnum: EnumValue = {
|
|
571
|
+
* tag: "TransferResult",
|
|
572
|
+
* values: [
|
|
573
|
+
* { tag: "Success", values: ["0x123...", 1000] },
|
|
574
|
+
* { tag: "Error", values: ["Insufficient funds"] }
|
|
575
|
+
* ]
|
|
576
|
+
* };
|
|
577
|
+
* ```
|
|
578
|
+
*/
|
|
579
|
+
interface EnumValue {
|
|
580
|
+
/** The variant name (e.g., 'None', 'Some', 'Success', 'Error') */
|
|
581
|
+
tag: string;
|
|
582
|
+
/** Optional payload values for tuple variants */
|
|
583
|
+
values?: unknown[];
|
|
584
|
+
}
|
|
585
|
+
/**
|
|
586
|
+
* Type guard to check if a value is an EnumValue
|
|
587
|
+
*/
|
|
588
|
+
declare function isEnumValue(value: unknown): value is EnumValue;
|
|
589
|
+
//# sourceMappingURL=enum.d.ts.map
|
|
590
|
+
//#endregion
|
|
591
|
+
//#region src/common/map.d.ts
|
|
592
|
+
/**
|
|
593
|
+
* Chain-Agnostic Map Types
|
|
594
|
+
*
|
|
595
|
+
* This module defines standardized map types that work across all blockchain adapters.
|
|
596
|
+
* These types represent the UI layer's understanding of maps before they are converted
|
|
597
|
+
* to blockchain-specific formats by individual adapters.
|
|
598
|
+
*/
|
|
599
|
+
/**
|
|
600
|
+
* Chain-agnostic map entry representation.
|
|
601
|
+
* This is the standardized format that map fields produce, regardless of the target blockchain.
|
|
602
|
+
* Each adapter transforms this generic format into its blockchain-specific representation.
|
|
603
|
+
*
|
|
604
|
+
* @example Basic Usage
|
|
605
|
+
* ```typescript
|
|
606
|
+
* Simple key-value pairs
|
|
607
|
+
* const stringMap: MapEntry[] = [
|
|
608
|
+
* { key: "name", value: "Alice" },
|
|
609
|
+
* { key: "age", value: 30 }
|
|
610
|
+
* ];
|
|
611
|
+
*
|
|
612
|
+
* Mixed type pairs
|
|
613
|
+
* const mixedMap: MapEntry[] = [
|
|
614
|
+
* { key: "config", value: { enabled: true, timeout: 5000 } },
|
|
615
|
+
* { key: "tags", value: ["production", "api"] }
|
|
616
|
+
* ];
|
|
617
|
+
* ```
|
|
618
|
+
*
|
|
619
|
+
* @example Cross-Chain Compatibility
|
|
620
|
+
* ```typescript
|
|
621
|
+
* Stellar/Soroban: Transforms to SorobanMapEntry[]
|
|
622
|
+
* const stellarMap: MapEntry[] = [
|
|
623
|
+
* { key: "symbol", value: "USDC" },
|
|
624
|
+
* { key: "decimals", value: 6 }
|
|
625
|
+
* ];
|
|
626
|
+
* → [
|
|
627
|
+
* { key: ScSymbol("symbol"), value: ScSymbol("USDC") },
|
|
628
|
+
* { key: ScSymbol("decimals"), value: ScU32(6) }
|
|
629
|
+
* ]
|
|
630
|
+
*
|
|
631
|
+
* EVM/Solidity: Transforms to struct array (mappings not supported in function params)
|
|
632
|
+
* const evmMap: MapEntry[] = [
|
|
633
|
+
* { key: "0x123...", value: 1000 },
|
|
634
|
+
* { key: "0x456...", value: 2000 }
|
|
635
|
+
* ];
|
|
636
|
+
* → AddressAmount[] struct array for function parameters
|
|
637
|
+
*
|
|
638
|
+
* Complex nested maps
|
|
639
|
+
* const nestedMap: MapEntry[] = [
|
|
640
|
+
* {
|
|
641
|
+
* key: "user_data",
|
|
642
|
+
* value: [
|
|
643
|
+
* { key: "balance", value: "1000" },
|
|
644
|
+
* { key: "permissions", value: ["read", "write"] }
|
|
645
|
+
* ]
|
|
646
|
+
* }
|
|
647
|
+
* ];
|
|
648
|
+
* ```
|
|
649
|
+
*/
|
|
650
|
+
interface MapEntry {
|
|
651
|
+
/** The map key (can be any serializable type) */
|
|
652
|
+
key: unknown;
|
|
653
|
+
/** The map value (can be any serializable type) */
|
|
654
|
+
value: unknown;
|
|
655
|
+
}
|
|
656
|
+
/**
|
|
657
|
+
* Type guard to check if a value is a MapEntry
|
|
658
|
+
*/
|
|
659
|
+
declare function isMapEntry(value: unknown): value is MapEntry;
|
|
660
|
+
/**
|
|
661
|
+
* Type guard to check if a value is an array of MapEntry objects
|
|
662
|
+
*/
|
|
663
|
+
declare function isMapEntryArray(value: unknown): value is MapEntry[];
|
|
664
|
+
//# sourceMappingURL=map.d.ts.map
|
|
665
|
+
//#endregion
|
|
666
|
+
//#region src/forms/validation.d.ts
|
|
667
|
+
/**
|
|
668
|
+
* Validation rules for form fields
|
|
669
|
+
*/
|
|
670
|
+
interface FieldValidation {
|
|
671
|
+
/**
|
|
672
|
+
* Whether the field is required
|
|
673
|
+
*/
|
|
674
|
+
required?: boolean;
|
|
675
|
+
/**
|
|
676
|
+
* Minimum value for number fields
|
|
677
|
+
*/
|
|
678
|
+
min?: number;
|
|
679
|
+
/**
|
|
680
|
+
* Maximum value for number fields
|
|
681
|
+
*/
|
|
682
|
+
max?: number;
|
|
683
|
+
/**
|
|
684
|
+
* Minimum length for text fields
|
|
685
|
+
*/
|
|
686
|
+
minLength?: number;
|
|
687
|
+
/**
|
|
688
|
+
* Maximum length for text fields
|
|
689
|
+
*/
|
|
690
|
+
maxLength?: number;
|
|
691
|
+
/**
|
|
692
|
+
* Regular expression pattern for text validation
|
|
693
|
+
*/
|
|
694
|
+
pattern?: string | RegExp;
|
|
695
|
+
/**
|
|
696
|
+
* Validation rules that depend on other fields
|
|
697
|
+
*/
|
|
698
|
+
conditions?: FieldCondition[];
|
|
699
|
+
}
|
|
700
|
+
//# sourceMappingURL=validation.d.ts.map
|
|
701
|
+
//#endregion
|
|
702
|
+
//#region src/forms/form-field.d.ts
|
|
703
|
+
/**
|
|
704
|
+
* Form field definition with validation, display, and transformation options
|
|
705
|
+
*/
|
|
706
|
+
interface FormFieldType<T extends FieldType = FieldType> {
|
|
707
|
+
/**
|
|
708
|
+
* Unique identifier for the field
|
|
709
|
+
*/
|
|
710
|
+
id: string;
|
|
711
|
+
/**
|
|
712
|
+
* Parameter name used when submitting to the blockchain
|
|
713
|
+
*/
|
|
714
|
+
name: string;
|
|
715
|
+
/**
|
|
716
|
+
* Human-readable label shown in the form
|
|
717
|
+
*/
|
|
718
|
+
label: string;
|
|
719
|
+
/**
|
|
720
|
+
* Type of form field to render
|
|
721
|
+
*/
|
|
722
|
+
type: T;
|
|
723
|
+
/**
|
|
724
|
+
* Placeholder text shown when empty
|
|
725
|
+
*/
|
|
726
|
+
placeholder?: string;
|
|
727
|
+
/**
|
|
728
|
+
* Help text displayed below the field
|
|
729
|
+
*/
|
|
730
|
+
helperText?: string;
|
|
731
|
+
/**
|
|
732
|
+
* Additional information required to render or validate the field.
|
|
733
|
+
* Used for field-type-specific configuration (e.g., bytes length constraints).
|
|
734
|
+
*/
|
|
735
|
+
metadata?: Record<string, unknown>;
|
|
736
|
+
/**
|
|
737
|
+
* Default value for the field
|
|
738
|
+
*/
|
|
739
|
+
defaultValue?: FieldValue<T>;
|
|
740
|
+
/**
|
|
741
|
+
* Validation rules for the field
|
|
742
|
+
*/
|
|
743
|
+
validation: FieldValidation;
|
|
744
|
+
/**
|
|
745
|
+
* Options for select, radio, checkbox fields
|
|
746
|
+
*/
|
|
747
|
+
options?: {
|
|
748
|
+
label: string;
|
|
749
|
+
value: string;
|
|
750
|
+
}[];
|
|
751
|
+
/**
|
|
752
|
+
* Field width for layout
|
|
753
|
+
*/
|
|
754
|
+
width?: 'full' | 'half' | 'third';
|
|
755
|
+
/**
|
|
756
|
+
* Transform functions for data conversion between UI and blockchain
|
|
757
|
+
*/
|
|
758
|
+
transforms?: FieldTransforms<FieldValue<T>>;
|
|
759
|
+
/**
|
|
760
|
+
* Conditions that determine when this field should be visible
|
|
761
|
+
*/
|
|
762
|
+
visibleWhen?: FieldCondition | FieldCondition[];
|
|
763
|
+
/**
|
|
764
|
+
* Original blockchain parameter type
|
|
765
|
+
* Used to determine compatible field types and for data transformation
|
|
766
|
+
*/
|
|
767
|
+
originalParameterType?: string;
|
|
768
|
+
/**
|
|
769
|
+
* Whether this field should be hidden from the rendered form UI
|
|
770
|
+
* @default false
|
|
771
|
+
*/
|
|
772
|
+
isHidden?: boolean;
|
|
773
|
+
/**
|
|
774
|
+
* Whether this field's value is fixed and not user-editable
|
|
775
|
+
* If true and isHidden is false, the field might be rendered as read-only
|
|
776
|
+
* @default false
|
|
777
|
+
*/
|
|
778
|
+
isHardcoded?: boolean;
|
|
779
|
+
/**
|
|
780
|
+
* The fixed value to use if isHardcoded is true
|
|
781
|
+
* The type should ideally correspond to FieldValue<T>, but using any for initial flexibility
|
|
782
|
+
*/
|
|
783
|
+
hardcodedValue?: FieldValue<T>;
|
|
784
|
+
/**
|
|
785
|
+
* Whether the field should be displayed as read-only in the UI.
|
|
786
|
+
* Typically used when isHardcoded is true but isHidden is false.
|
|
787
|
+
* @default false
|
|
788
|
+
*/
|
|
789
|
+
readOnly?: boolean;
|
|
790
|
+
/**
|
|
791
|
+
* Components/properties for object and array-object field types.
|
|
792
|
+
* Defines the structure of nested objects.
|
|
793
|
+
*/
|
|
794
|
+
components?: FunctionParameter[];
|
|
795
|
+
/**
|
|
796
|
+
* Element type for array fields (e.g., 'text', 'number', 'blockchain-address')
|
|
797
|
+
*/
|
|
798
|
+
elementType?: FieldType;
|
|
799
|
+
/**
|
|
800
|
+
* Base configuration for array element fields
|
|
801
|
+
*/
|
|
802
|
+
elementFieldConfig?: Partial<FormFieldType>;
|
|
803
|
+
/**
|
|
804
|
+
* Configuration specific to code editor fields
|
|
805
|
+
*/
|
|
806
|
+
codeEditorProps?: {
|
|
807
|
+
language?: string;
|
|
808
|
+
placeholder?: string;
|
|
809
|
+
theme?: string;
|
|
810
|
+
height?: string;
|
|
811
|
+
maxHeight?: string;
|
|
812
|
+
performanceThreshold?: number;
|
|
813
|
+
};
|
|
814
|
+
/**
|
|
815
|
+
* Enum metadata for enum field types.
|
|
816
|
+
* Contains information about enum variants and their payload types.
|
|
817
|
+
*/
|
|
818
|
+
enumMetadata?: {
|
|
819
|
+
name: string;
|
|
820
|
+
variants: Array<{
|
|
821
|
+
name: string;
|
|
822
|
+
type: 'void' | 'tuple' | 'integer';
|
|
823
|
+
payloadTypes?: string[];
|
|
824
|
+
payloadComponents?: (FunctionParameter[] | undefined)[];
|
|
825
|
+
value?: number;
|
|
826
|
+
}>;
|
|
827
|
+
isUnitOnly: boolean;
|
|
828
|
+
};
|
|
829
|
+
/**
|
|
830
|
+
* Map metadata for map field types.
|
|
831
|
+
* Contains information about key and value types and their field configurations.
|
|
832
|
+
*/
|
|
833
|
+
mapMetadata?: {
|
|
834
|
+
keyType?: string;
|
|
835
|
+
valueType?: string;
|
|
836
|
+
keyFieldConfig?: Partial<FormFieldType>;
|
|
837
|
+
valueFieldConfig?: Partial<FormFieldType>;
|
|
838
|
+
};
|
|
839
|
+
/**
|
|
840
|
+
* File upload field properties
|
|
841
|
+
*/
|
|
842
|
+
accept?: string;
|
|
843
|
+
maxSize?: number;
|
|
844
|
+
convertToBase64?: boolean;
|
|
845
|
+
/**
|
|
846
|
+
* (Optional) Adapter binding metadata for runtimeSecret fields.
|
|
847
|
+
* Specifies how this field's value should be bound to the adapter for execution.
|
|
848
|
+
* Only applicable when type is 'runtimeSecret'.
|
|
849
|
+
*/
|
|
850
|
+
adapterBinding?: {
|
|
851
|
+
/**
|
|
852
|
+
* The key used to reference this field value during execution
|
|
853
|
+
* (e.g., 'organizerSecret' for Midnight)
|
|
854
|
+
*/
|
|
855
|
+
key: string;
|
|
856
|
+
/**
|
|
857
|
+
* Optional adapter-specific metadata for runtime secret fields.
|
|
858
|
+
* Adapters can opt-in to additional Customize step controls by supplying metadata.
|
|
859
|
+
*/
|
|
860
|
+
metadata?: Record<string, unknown>;
|
|
861
|
+
};
|
|
862
|
+
}
|
|
863
|
+
//# sourceMappingURL=form-field.d.ts.map
|
|
864
|
+
//#endregion
|
|
865
|
+
//#region src/forms/layout.d.ts
|
|
866
|
+
/**
|
|
867
|
+
* Layout configuration for app rendering (fixed values)
|
|
868
|
+
*/
|
|
869
|
+
interface FormLayout {
|
|
870
|
+
/**
|
|
871
|
+
* Number of columns in the layout grid (fixed to 1)
|
|
872
|
+
*/
|
|
873
|
+
columns: 1;
|
|
874
|
+
/**
|
|
875
|
+
* Spacing between form elements (fixed to 'normal')
|
|
876
|
+
*/
|
|
877
|
+
spacing: 'normal';
|
|
878
|
+
/**
|
|
879
|
+
* Position of field labels (fixed to 'top')
|
|
880
|
+
*/
|
|
881
|
+
labelPosition: 'top';
|
|
882
|
+
}
|
|
883
|
+
/**
|
|
884
|
+
* Submit button configuration
|
|
885
|
+
*/
|
|
886
|
+
interface SubmitButtonConfig {
|
|
887
|
+
/**
|
|
888
|
+
* Text displayed on the button
|
|
889
|
+
*/
|
|
890
|
+
text: string;
|
|
891
|
+
/**
|
|
892
|
+
* Text displayed while submitting
|
|
893
|
+
*/
|
|
894
|
+
loadingText: string;
|
|
895
|
+
/**
|
|
896
|
+
* Custom button style
|
|
897
|
+
*/
|
|
898
|
+
variant?: 'primary' | 'secondary' | 'outline';
|
|
899
|
+
}
|
|
900
|
+
//# sourceMappingURL=layout.d.ts.map
|
|
901
|
+
//#endregion
|
|
902
|
+
//#region src/forms/schema.d.ts
|
|
903
|
+
/**
|
|
904
|
+
* Common properties shared between different form schema types
|
|
905
|
+
*/
|
|
906
|
+
interface CommonFormProperties {
|
|
907
|
+
/**
|
|
908
|
+
* Form fields
|
|
909
|
+
*/
|
|
910
|
+
fields: FormFieldType[];
|
|
911
|
+
/**
|
|
912
|
+
* Layout configuration
|
|
913
|
+
*/
|
|
914
|
+
layout: FormLayout;
|
|
915
|
+
/**
|
|
916
|
+
* Validation behavior (fixed values)
|
|
917
|
+
*/
|
|
918
|
+
validation: {
|
|
919
|
+
mode: 'onChange';
|
|
920
|
+
showErrors: 'inline';
|
|
921
|
+
};
|
|
922
|
+
/**
|
|
923
|
+
* Theme configuration
|
|
924
|
+
*/
|
|
925
|
+
theme?: {
|
|
926
|
+
primaryColor?: string;
|
|
927
|
+
borderRadius?: string;
|
|
928
|
+
};
|
|
929
|
+
}
|
|
930
|
+
/**
|
|
931
|
+
* Complete form schema used for rendering
|
|
932
|
+
*/
|
|
933
|
+
interface RenderFormSchema extends CommonFormProperties {
|
|
934
|
+
/**
|
|
935
|
+
* Unique identifier for the form, typically derived from the function ID
|
|
936
|
+
*/
|
|
937
|
+
id: string;
|
|
938
|
+
/**
|
|
939
|
+
* Human-readable title for the form
|
|
940
|
+
*/
|
|
941
|
+
title: string;
|
|
942
|
+
/**
|
|
943
|
+
* Description explaining the form's purpose
|
|
944
|
+
*/
|
|
945
|
+
description?: string;
|
|
946
|
+
/**
|
|
947
|
+
* Submit button configuration
|
|
948
|
+
*/
|
|
949
|
+
submitButton: SubmitButtonConfig;
|
|
950
|
+
/**
|
|
951
|
+
* Optional metadata for the form
|
|
952
|
+
*/
|
|
953
|
+
metadata?: Record<string, unknown>;
|
|
954
|
+
/**
|
|
955
|
+
* Default values for form fields
|
|
956
|
+
*/
|
|
957
|
+
defaultValues?: FormValues;
|
|
958
|
+
/**
|
|
959
|
+
* Function ID for the contract function this form represents.
|
|
960
|
+
* Note: Also stored at top-level in ContractUIRecord for database indexing/queries.
|
|
961
|
+
*/
|
|
962
|
+
functionId?: string;
|
|
963
|
+
/**
|
|
964
|
+
* The deployed contract address for this form.
|
|
965
|
+
* Required for widgets like ContractStateWidget and for transaction execution.
|
|
966
|
+
* Note: Also stored at top-level in ContractUIRecord for database indexing/queries.
|
|
967
|
+
*/
|
|
968
|
+
contractAddress: string;
|
|
969
|
+
/**
|
|
970
|
+
* Runtime-only secret values keyed by adapter binding key.
|
|
971
|
+
* These are populated from runtimeSecret fields at execution time.
|
|
972
|
+
* Not persisted; for fields like organizer keys that should only exist at runtime.
|
|
973
|
+
* Example: { organizerSecret: '0xabcd...' }
|
|
974
|
+
*/
|
|
975
|
+
runtimeSecrets?: Record<string, string>;
|
|
976
|
+
}
|
|
977
|
+
//# sourceMappingURL=schema.d.ts.map
|
|
978
|
+
//#endregion
|
|
979
|
+
//#region src/forms/fields.d.ts
|
|
980
|
+
/**
|
|
981
|
+
* Type representing form values in a submission or form state
|
|
982
|
+
*/
|
|
983
|
+
type FormValues = Record<string, unknown>;
|
|
984
|
+
/**
|
|
985
|
+
* Field types supported by the renderer
|
|
986
|
+
*/
|
|
987
|
+
type FieldType = 'text' | 'number' | 'bigint' | 'checkbox' | 'radio' | 'select' | 'textarea' | 'bytes' | 'code-editor' | 'date' | 'email' | 'password' | 'blockchain-address' | 'amount' | 'array' | 'object' | 'array-object' | 'map' | 'url' | 'select-grouped' | 'enum' | 'hidden' | 'file-upload' | 'runtimeSecret';
|
|
988
|
+
/**
|
|
989
|
+
* Maps field types to their expected value types
|
|
990
|
+
*/
|
|
991
|
+
type FieldValue<T extends FieldType> = T extends 'text' | 'email' | 'password' | 'textarea' | 'bytes' | 'code-editor' | 'blockchain-address' | 'bigint' ? string : T extends 'number' | 'amount' ? number : T extends 'checkbox' ? boolean : T extends 'date' ? Date : T extends 'select' | 'radio' ? string : T extends 'enum' ? EnumValue : T extends 'array' ? unknown[] : T extends 'object' ? Record<string, unknown> : T extends 'array-object' ? Record<string, unknown>[] : T extends 'map' ? MapEntry[] : T extends 'runtimeSecret' ? string : unknown;
|
|
992
|
+
/**
|
|
993
|
+
* Shared condition interface for both validation and visibility rules
|
|
994
|
+
*/
|
|
995
|
+
interface FieldCondition {
|
|
996
|
+
/**
|
|
997
|
+
* The field ID this condition depends on
|
|
998
|
+
*/
|
|
999
|
+
field: string;
|
|
1000
|
+
/**
|
|
1001
|
+
* The value to compare against
|
|
1002
|
+
*/
|
|
1003
|
+
value?: unknown;
|
|
1004
|
+
/**
|
|
1005
|
+
* The comparison operator to use
|
|
1006
|
+
*/
|
|
1007
|
+
operator: 'equals' | 'notEquals' | 'contains' | 'greaterThan' | 'lessThan' | 'matches';
|
|
1008
|
+
/**
|
|
1009
|
+
* Error message to display when validation fails
|
|
1010
|
+
*/
|
|
1011
|
+
message?: string;
|
|
1012
|
+
}
|
|
1013
|
+
/**
|
|
1014
|
+
* Transform function interface for converting between UI and blockchain data formats
|
|
1015
|
+
*/
|
|
1016
|
+
interface FieldTransforms<T = unknown> {
|
|
1017
|
+
/**
|
|
1018
|
+
* Function to transform data from blockchain format to UI format
|
|
1019
|
+
* Used when displaying values in the form
|
|
1020
|
+
*/
|
|
1021
|
+
input?: (value: T) => unknown;
|
|
1022
|
+
/**
|
|
1023
|
+
* Function to transform data from UI format to blockchain format
|
|
1024
|
+
* Used when submitting the form
|
|
1025
|
+
*/
|
|
1026
|
+
output?: (value: unknown) => T;
|
|
1027
|
+
}
|
|
1028
|
+
/**
|
|
1029
|
+
* Type for React Hook Form error objects
|
|
1030
|
+
*/
|
|
1031
|
+
type FormError = string | {
|
|
1032
|
+
message?: string;
|
|
1033
|
+
type?: string;
|
|
1034
|
+
[key: string]: unknown;
|
|
1035
|
+
};
|
|
1036
|
+
/**
|
|
1037
|
+
* Props for the top-level TransactionForm component
|
|
1038
|
+
*/
|
|
1039
|
+
interface TransactionFormProps {
|
|
1040
|
+
/**
|
|
1041
|
+
* The form schema to render
|
|
1042
|
+
*/
|
|
1043
|
+
schema: RenderFormSchema;
|
|
1044
|
+
/**
|
|
1045
|
+
* The full contract schema containing function definitions and details
|
|
1046
|
+
* for the target contract on the specific blockchain.
|
|
1047
|
+
* Required by the adapter to format transaction data correctly.
|
|
1048
|
+
*/
|
|
1049
|
+
contractSchema: ContractSchema;
|
|
1050
|
+
/**
|
|
1051
|
+
* The chain-specific adapter instance, pre-configured for a specific network.
|
|
1052
|
+
* It should contain the networkConfig internally.
|
|
1053
|
+
*/
|
|
1054
|
+
adapter: ContractAdapter;
|
|
1055
|
+
/**
|
|
1056
|
+
* Optional flag indicating if a wallet is currently connected.
|
|
1057
|
+
* Used to control UI elements like the submit button.
|
|
1058
|
+
* If not provided, components might assume not connected or use other means if available.
|
|
1059
|
+
*/
|
|
1060
|
+
isWalletConnected?: boolean;
|
|
1061
|
+
/**
|
|
1062
|
+
* Execution configuration for the transaction
|
|
1063
|
+
*/
|
|
1064
|
+
executionConfig?: ExecutionConfig;
|
|
1065
|
+
}
|
|
1066
|
+
//# sourceMappingURL=fields.d.ts.map
|
|
1067
|
+
//#endregion
|
|
1068
|
+
//#region src/networks/config.d.ts
|
|
1069
|
+
/**
|
|
1070
|
+
* Base interface with common properties shared across all network configurations
|
|
1071
|
+
*/
|
|
1072
|
+
interface BaseNetworkConfig {
|
|
1073
|
+
/**
|
|
1074
|
+
* Unique identifier for the network, e.g., 'ethereum-mainnet', 'polygon-amoy'
|
|
1075
|
+
*/
|
|
1076
|
+
id: string;
|
|
1077
|
+
/**
|
|
1078
|
+
* User-friendly network name, e.g., 'Ethereum Mainnet'
|
|
1079
|
+
*/
|
|
1080
|
+
name: string;
|
|
1081
|
+
/**
|
|
1082
|
+
* The blockchain ecosystem this network belongs to (discriminant for the union type)
|
|
1083
|
+
*/
|
|
1084
|
+
ecosystem: Ecosystem;
|
|
1085
|
+
/**
|
|
1086
|
+
* Parent network name, e.g., 'ethereum', 'polygon'
|
|
1087
|
+
*/
|
|
1088
|
+
network: string;
|
|
1089
|
+
/**
|
|
1090
|
+
* Network type/environment: 'mainnet', 'testnet', or 'devnet'
|
|
1091
|
+
*/
|
|
1092
|
+
type: NetworkType;
|
|
1093
|
+
/**
|
|
1094
|
+
* Explicit flag for easy filtering of test networks
|
|
1095
|
+
*/
|
|
1096
|
+
isTestnet: boolean;
|
|
1097
|
+
/**
|
|
1098
|
+
* The constant name under which this specific network configuration object
|
|
1099
|
+
* is exported from its adapter package's network index file.
|
|
1100
|
+
* Used by the export system to dynamically import the correct config.
|
|
1101
|
+
* Example: 'ethereumMainnet', 'ethereumSepolia'
|
|
1102
|
+
*/
|
|
1103
|
+
exportConstName: string;
|
|
1104
|
+
/**
|
|
1105
|
+
* Base URL for the block explorer (common across ecosystems)
|
|
1106
|
+
*/
|
|
1107
|
+
explorerUrl?: string;
|
|
1108
|
+
/**
|
|
1109
|
+
* Optional React component for the network icon.
|
|
1110
|
+
* This allows embedding the icon component directly in the network config,
|
|
1111
|
+
* avoiding dynamic imports and improving build performance.
|
|
1112
|
+
* If provided, this takes precedence over the icon string.
|
|
1113
|
+
*/
|
|
1114
|
+
iconComponent?: React$1.ComponentType<{
|
|
1115
|
+
size?: number;
|
|
1116
|
+
className?: string;
|
|
1117
|
+
variant?: 'mono' | 'branded';
|
|
1118
|
+
}>;
|
|
1119
|
+
/**
|
|
1120
|
+
* A unique identifier for the specific explorer API service used by this network.
|
|
1121
|
+
* This is used by the AppConfigService to fetch the correct API key.
|
|
1122
|
+
* Examples: "etherscan-mainnet", "polygonscan-mainnet", "bscscan-mainnet"
|
|
1123
|
+
* Should align with keys in AppRuntimeConfig.networkServiceConfigs
|
|
1124
|
+
*/
|
|
1125
|
+
primaryExplorerApiIdentifier?: string;
|
|
1126
|
+
/**
|
|
1127
|
+
* Optional indexer GraphQL HTTP endpoint
|
|
1128
|
+
* Used for querying historical blockchain data (e.g., access control events)
|
|
1129
|
+
*/
|
|
1130
|
+
indexerUri?: string;
|
|
1131
|
+
/**
|
|
1132
|
+
* Optional indexer GraphQL WebSocket endpoint
|
|
1133
|
+
* Used for real-time blockchain data subscriptions
|
|
1134
|
+
*/
|
|
1135
|
+
indexerWsUri?: string;
|
|
1136
|
+
}
|
|
1137
|
+
/**
|
|
1138
|
+
* EVM-specific network configuration
|
|
1139
|
+
*/
|
|
1140
|
+
interface EvmNetworkConfig extends BaseNetworkConfig {
|
|
1141
|
+
ecosystem: 'evm';
|
|
1142
|
+
/**
|
|
1143
|
+
* EVM chain ID, e.g., 1 for Ethereum Mainnet, 11155111 for Sepolia
|
|
1144
|
+
*/
|
|
1145
|
+
chainId: number;
|
|
1146
|
+
/**
|
|
1147
|
+
* JSON-RPC endpoint for the network (can be a base URL if API key is resolved from env)
|
|
1148
|
+
*/
|
|
1149
|
+
rpcUrl: string;
|
|
1150
|
+
/**
|
|
1151
|
+
* Native currency information
|
|
1152
|
+
*/
|
|
1153
|
+
nativeCurrency: {
|
|
1154
|
+
name: string;
|
|
1155
|
+
symbol: string;
|
|
1156
|
+
decimals: number;
|
|
1157
|
+
};
|
|
1158
|
+
/**
|
|
1159
|
+
* Optional icon name for the network (for use with @web3icons/react or similar)
|
|
1160
|
+
* If not provided, the network property will be used as a fallback
|
|
1161
|
+
*/
|
|
1162
|
+
apiUrl?: string;
|
|
1163
|
+
/**
|
|
1164
|
+
* Whether this network supports Etherscan V2 API (default: true for all Etherscan-compatible explorers)
|
|
1165
|
+
*/
|
|
1166
|
+
supportsEtherscanV2?: boolean;
|
|
1167
|
+
/**
|
|
1168
|
+
* Whether this network's explorer requires an API key for basic operations (default: true)
|
|
1169
|
+
* Some explorers like routescan.io provide free access without API keys
|
|
1170
|
+
*/
|
|
1171
|
+
requiresExplorerApiKey?: boolean;
|
|
1172
|
+
/**
|
|
1173
|
+
* Optional chain-specific configuration object for this network.
|
|
1174
|
+
* For EVM networks, this should be a Viem Chain object.
|
|
1175
|
+
* If provided, this will be used directly by the chain's clients.
|
|
1176
|
+
* If not provided, a fallback or minimal custom chain object might be used.
|
|
1177
|
+
*/
|
|
1178
|
+
viemChain?: unknown;
|
|
1179
|
+
}
|
|
1180
|
+
/**
|
|
1181
|
+
* Solana-specific network configuration
|
|
1182
|
+
*/
|
|
1183
|
+
interface SolanaNetworkConfig extends BaseNetworkConfig {
|
|
1184
|
+
ecosystem: 'solana';
|
|
1185
|
+
/**
|
|
1186
|
+
* RPC endpoint for Solana network
|
|
1187
|
+
*/
|
|
1188
|
+
rpcEndpoint: string;
|
|
1189
|
+
/**
|
|
1190
|
+
* Solana transaction confirmation commitment level
|
|
1191
|
+
*/
|
|
1192
|
+
commitment: 'confirmed' | 'finalized';
|
|
1193
|
+
}
|
|
1194
|
+
/**
|
|
1195
|
+
* Stellar-specific network configuration
|
|
1196
|
+
*/
|
|
1197
|
+
interface StellarNetworkConfig extends BaseNetworkConfig {
|
|
1198
|
+
ecosystem: 'stellar';
|
|
1199
|
+
/**
|
|
1200
|
+
* Horizon server URL (for Stellar Classic operations)
|
|
1201
|
+
*/
|
|
1202
|
+
horizonUrl: string;
|
|
1203
|
+
/**
|
|
1204
|
+
* Soroban RPC server URL (for smart contract operations)
|
|
1205
|
+
*/
|
|
1206
|
+
sorobanRpcUrl: string;
|
|
1207
|
+
/**
|
|
1208
|
+
* Stellar network passphrase
|
|
1209
|
+
*/
|
|
1210
|
+
networkPassphrase: string;
|
|
1211
|
+
}
|
|
1212
|
+
/**
|
|
1213
|
+
* Midnight-specific network configuration
|
|
1214
|
+
*/
|
|
1215
|
+
interface MidnightNetworkConfig extends BaseNetworkConfig {
|
|
1216
|
+
ecosystem: 'midnight';
|
|
1217
|
+
/**
|
|
1218
|
+
* Midnight Network ID enum value
|
|
1219
|
+
* Maps to @midnight-ntwrk/midnight-js-network-id NetworkId enum
|
|
1220
|
+
* Single source of truth for network identity when mapping is not provided.
|
|
1221
|
+
*/
|
|
1222
|
+
/**
|
|
1223
|
+
* Mapping of numeric network ID to its enum name.
|
|
1224
|
+
* Example: { 2: 'TestNet' }
|
|
1225
|
+
*/
|
|
1226
|
+
networkId: Partial<Record<2 | 3 | 1 | 0, 'TestNet' | 'MainNet' | 'DevNet' | 'Undeployed'>>;
|
|
1227
|
+
/**
|
|
1228
|
+
* RPC endpoints for the Midnight network
|
|
1229
|
+
*/
|
|
1230
|
+
rpcEndpoints?: {
|
|
1231
|
+
default?: string;
|
|
1232
|
+
[key: string]: string | undefined;
|
|
1233
|
+
};
|
|
1234
|
+
}
|
|
1235
|
+
/**
|
|
1236
|
+
* Union type for all network configurations
|
|
1237
|
+
* This allows us to handle network configurations in a type-safe manner
|
|
1238
|
+
*/
|
|
1239
|
+
type NetworkConfig = EvmNetworkConfig | SolanaNetworkConfig | StellarNetworkConfig | MidnightNetworkConfig;
|
|
1240
|
+
/**
|
|
1241
|
+
* Type guard to check if a network config is for EVM
|
|
1242
|
+
* @param config The network configuration to check
|
|
1243
|
+
* @returns True if the config is for EVM
|
|
1244
|
+
*/
|
|
1245
|
+
declare const isEvmNetworkConfig: (config: NetworkConfig) => config is EvmNetworkConfig;
|
|
1246
|
+
/**
|
|
1247
|
+
* Type guard to check if a network config is for Solana
|
|
1248
|
+
* @param config The network configuration to check
|
|
1249
|
+
* @returns True if the config is for Solana
|
|
1250
|
+
*/
|
|
1251
|
+
declare const isSolanaNetworkConfig: (config: NetworkConfig) => config is SolanaNetworkConfig;
|
|
1252
|
+
/**
|
|
1253
|
+
* Type guard to check if a network config is for Stellar
|
|
1254
|
+
* @param config The network configuration to check
|
|
1255
|
+
* @returns True if the config is for Stellar
|
|
1256
|
+
*/
|
|
1257
|
+
declare const isStellarNetworkConfig: (config: NetworkConfig) => config is StellarNetworkConfig;
|
|
1258
|
+
/**
|
|
1259
|
+
* Type guard to check if a network config is for Midnight
|
|
1260
|
+
* @param config The network configuration to check
|
|
1261
|
+
* @returns True if the config is for Midnight
|
|
1262
|
+
*/
|
|
1263
|
+
declare const isMidnightNetworkConfig: (config: NetworkConfig) => config is MidnightNetworkConfig;
|
|
1264
|
+
//# sourceMappingURL=config.d.ts.map
|
|
1265
|
+
//#endregion
|
|
1266
|
+
//#region src/networks/validation.d.ts
|
|
1267
|
+
/**
|
|
1268
|
+
* Validate a network configuration
|
|
1269
|
+
* @param config The network configuration to validate
|
|
1270
|
+
* @returns True if the configuration is valid
|
|
1271
|
+
*/
|
|
1272
|
+
declare function validateNetworkConfig(config: NetworkConfig): boolean;
|
|
1273
|
+
//# sourceMappingURL=validation.d.ts.map
|
|
1274
|
+
//#endregion
|
|
1275
|
+
//#region src/transactions/status.d.ts
|
|
1276
|
+
/**
|
|
1277
|
+
* Defines the possible states for a transaction lifecycle.
|
|
1278
|
+
*/
|
|
1279
|
+
type TxStatus = 'idle' | 'pendingSignature' | 'pendingConfirmation' | 'pendingRelayer' | 'success' | 'error';
|
|
1280
|
+
/**
|
|
1281
|
+
* Represents the details passed along with a status update.
|
|
1282
|
+
* It can contain the following optional fields:
|
|
1283
|
+
* - `transactionId`: Provided by a relayer.
|
|
1284
|
+
* - `txHash`: Provided by a direct broadcast.
|
|
1285
|
+
* - `title`: Optional UI copy for a better chain-specific UX.
|
|
1286
|
+
* - `message`: Optional UI copy for a better chain-specific UX.
|
|
1287
|
+
*/
|
|
1288
|
+
type TransactionStatusUpdate = {
|
|
1289
|
+
transactionId?: string;
|
|
1290
|
+
txHash?: string;
|
|
1291
|
+
title?: string;
|
|
1292
|
+
message?: string;
|
|
1293
|
+
};
|
|
1294
|
+
//# sourceMappingURL=status.d.ts.map
|
|
1295
|
+
//#endregion
|
|
1296
|
+
//#region src/adapters/access-control.d.ts
|
|
1297
|
+
/**
|
|
1298
|
+
* Capabilities of an access control contract
|
|
1299
|
+
*/
|
|
1300
|
+
interface AccessControlCapabilities {
|
|
1301
|
+
/** Whether the contract implements Ownable */
|
|
1302
|
+
hasOwnable: boolean;
|
|
1303
|
+
/** Whether the contract supports two-step transfer with expiration (e.g. Stellar Ownable) */
|
|
1304
|
+
hasTwoStepOwnable: boolean;
|
|
1305
|
+
/** Whether the contract implements AccessControl */
|
|
1306
|
+
hasAccessControl: boolean;
|
|
1307
|
+
/** Whether the contract supports two-step admin transfer with expiration (e.g. Stellar AccessControl) */
|
|
1308
|
+
hasTwoStepAdmin: boolean;
|
|
1309
|
+
/** Whether roles can be enumerated directly (vs requiring event reconstruction) */
|
|
1310
|
+
hasEnumerableRoles: boolean;
|
|
1311
|
+
/** Whether historical data is available (via indexer or similar) */
|
|
1312
|
+
supportsHistory: boolean;
|
|
1313
|
+
/** Whether the contract has been verified against OpenZeppelin interfaces */
|
|
1314
|
+
verifiedAgainstOZInterfaces: boolean;
|
|
1315
|
+
/** Optional notes about capabilities or limitations */
|
|
1316
|
+
notes?: string[];
|
|
1317
|
+
}
|
|
1318
|
+
/**
|
|
1319
|
+
* Ownership state enumeration for two-step Ownable contracts
|
|
1320
|
+
*
|
|
1321
|
+
* - 'owned': Contract has an active owner with no pending transfer
|
|
1322
|
+
* - 'pending': Ownership transfer initiated, awaiting acceptance
|
|
1323
|
+
* - 'expired': Previous transfer attempt expired without completion
|
|
1324
|
+
* - 'renounced': Contract has no owner (ownership was renounced)
|
|
1325
|
+
*/
|
|
1326
|
+
type OwnershipState = 'owned' | 'pending' | 'expired' | 'renounced';
|
|
1327
|
+
/**
|
|
1328
|
+
* Pending ownership transfer details for two-step Ownable contracts
|
|
1329
|
+
*
|
|
1330
|
+
* Contains information about an initiated but not yet accepted ownership transfer.
|
|
1331
|
+
*/
|
|
1332
|
+
interface PendingOwnershipTransfer {
|
|
1333
|
+
/** Address designated to receive ownership */
|
|
1334
|
+
pendingOwner: string;
|
|
1335
|
+
/** Block/ledger number by which transfer must be accepted */
|
|
1336
|
+
expirationBlock: number;
|
|
1337
|
+
/** ISO8601 timestamp of transfer initiation (from indexer) */
|
|
1338
|
+
initiatedAt?: string;
|
|
1339
|
+
/** Transaction ID of the initiation (from indexer) */
|
|
1340
|
+
initiatedTxId?: string;
|
|
1341
|
+
/** Block/ledger number at which transfer was initiated (from indexer) */
|
|
1342
|
+
initiatedBlock?: number;
|
|
1343
|
+
}
|
|
1344
|
+
/**
|
|
1345
|
+
* Ownership information
|
|
1346
|
+
*
|
|
1347
|
+
* Extended to support two-step Ownable contracts with pending transfer state.
|
|
1348
|
+
*
|
|
1349
|
+
* @example Owned state (basic)
|
|
1350
|
+
* ```typescript
|
|
1351
|
+
* { owner: '0xABC...123', state: 'owned' }
|
|
1352
|
+
* ```
|
|
1353
|
+
*
|
|
1354
|
+
* @example Pending state
|
|
1355
|
+
* ```typescript
|
|
1356
|
+
* {
|
|
1357
|
+
* owner: '0xABC...123',
|
|
1358
|
+
* state: 'pending',
|
|
1359
|
+
* pendingTransfer: {
|
|
1360
|
+
* pendingOwner: '0xDEF...456',
|
|
1361
|
+
* expirationBlock: 12345678,
|
|
1362
|
+
* initiatedAt: '2025-12-10T10:30:00Z',
|
|
1363
|
+
* }
|
|
1364
|
+
* }
|
|
1365
|
+
* ```
|
|
1366
|
+
*
|
|
1367
|
+
* @example Renounced state
|
|
1368
|
+
* ```typescript
|
|
1369
|
+
* { owner: null, state: 'renounced' }
|
|
1370
|
+
* ```
|
|
1371
|
+
*/
|
|
1372
|
+
interface OwnershipInfo {
|
|
1373
|
+
/** The current owner address, or null if no owner */
|
|
1374
|
+
owner: string | null;
|
|
1375
|
+
/** Current ownership state (optional for backward compatibility) */
|
|
1376
|
+
state?: OwnershipState;
|
|
1377
|
+
/** Pending transfer details (present when state is 'pending') */
|
|
1378
|
+
pendingTransfer?: PendingOwnershipTransfer;
|
|
1379
|
+
}
|
|
1380
|
+
/**
|
|
1381
|
+
* Admin state enumeration for two-step AccessControl admin transfer
|
|
1382
|
+
*
|
|
1383
|
+
* - 'active': Contract has an active admin with no pending transfer
|
|
1384
|
+
* - 'pending': Admin transfer initiated, awaiting acceptance
|
|
1385
|
+
* - 'expired': Previous transfer attempt expired without completion
|
|
1386
|
+
* - 'renounced': Contract has no admin (admin role was renounced)
|
|
1387
|
+
*/
|
|
1388
|
+
type AdminState = 'active' | 'pending' | 'expired' | 'renounced';
|
|
1389
|
+
/**
|
|
1390
|
+
* Pending admin transfer details for two-step AccessControl contracts
|
|
1391
|
+
*
|
|
1392
|
+
* Contains information about an initiated but not yet accepted admin transfer.
|
|
1393
|
+
*/
|
|
1394
|
+
interface PendingAdminTransfer {
|
|
1395
|
+
/** Address designated to receive admin role */
|
|
1396
|
+
pendingAdmin: string;
|
|
1397
|
+
/** Block/ledger number by which transfer must be accepted */
|
|
1398
|
+
expirationBlock: number;
|
|
1399
|
+
/** ISO8601 timestamp of transfer initiation (from indexer) */
|
|
1400
|
+
initiatedAt?: string;
|
|
1401
|
+
/** Transaction ID of the initiation (from indexer) */
|
|
1402
|
+
initiatedTxId?: string;
|
|
1403
|
+
/** Block/ledger number at which transfer was initiated (from indexer) */
|
|
1404
|
+
initiatedBlock?: number;
|
|
1405
|
+
}
|
|
1406
|
+
/**
|
|
1407
|
+
* Admin information for AccessControl contracts
|
|
1408
|
+
*
|
|
1409
|
+
* Extended to support two-step admin transfer with pending transfer state.
|
|
1410
|
+
*
|
|
1411
|
+
* @example Active state (basic)
|
|
1412
|
+
* ```typescript
|
|
1413
|
+
* { admin: 'GABC...123', state: 'active' }
|
|
1414
|
+
* ```
|
|
1415
|
+
*
|
|
1416
|
+
* @example Pending state
|
|
1417
|
+
* ```typescript
|
|
1418
|
+
* {
|
|
1419
|
+
* admin: 'GABC...123',
|
|
1420
|
+
* state: 'pending',
|
|
1421
|
+
* pendingTransfer: {
|
|
1422
|
+
* pendingAdmin: 'GDEF...456',
|
|
1423
|
+
* expirationBlock: 12345678,
|
|
1424
|
+
* initiatedAt: '2025-12-10T10:30:00Z',
|
|
1425
|
+
* }
|
|
1426
|
+
* }
|
|
1427
|
+
* ```
|
|
1428
|
+
*
|
|
1429
|
+
* @example Renounced state
|
|
1430
|
+
* ```typescript
|
|
1431
|
+
* { admin: null, state: 'renounced' }
|
|
1432
|
+
* ```
|
|
1433
|
+
*/
|
|
1434
|
+
interface AdminInfo {
|
|
1435
|
+
/** The current admin address, or null if no admin */
|
|
1436
|
+
admin: string | null;
|
|
1437
|
+
/** Current admin state (optional for backward compatibility) */
|
|
1438
|
+
state?: AdminState;
|
|
1439
|
+
/** Pending transfer details (present when state is 'pending') */
|
|
1440
|
+
pendingTransfer?: PendingAdminTransfer;
|
|
1441
|
+
}
|
|
1442
|
+
/**
|
|
1443
|
+
* Role identifier
|
|
1444
|
+
*/
|
|
1445
|
+
interface RoleIdentifier {
|
|
1446
|
+
/** Stable identifier for the role (e.g., name, bytes, symbol rendered to string) */
|
|
1447
|
+
id: string;
|
|
1448
|
+
/** Optional human-friendly label for the role */
|
|
1449
|
+
label?: string;
|
|
1450
|
+
}
|
|
1451
|
+
/**
|
|
1452
|
+
* Role assignment with members
|
|
1453
|
+
*/
|
|
1454
|
+
interface RoleAssignment {
|
|
1455
|
+
/** The role identifier */
|
|
1456
|
+
role: RoleIdentifier;
|
|
1457
|
+
/** Array of addresses/accounts that have this role */
|
|
1458
|
+
members: string[];
|
|
1459
|
+
}
|
|
1460
|
+
/**
|
|
1461
|
+
* Enriched role member with grant metadata
|
|
1462
|
+
* Used when historical data is available via indexer
|
|
1463
|
+
*/
|
|
1464
|
+
interface EnrichedRoleMember {
|
|
1465
|
+
/** The member's address */
|
|
1466
|
+
address: string;
|
|
1467
|
+
/** ISO8601 timestamp of when the role was granted (undefined if indexer unavailable) */
|
|
1468
|
+
grantedAt?: string;
|
|
1469
|
+
/** Transaction ID of the grant operation */
|
|
1470
|
+
grantedTxId?: string;
|
|
1471
|
+
/** Block/ledger number of the grant operation */
|
|
1472
|
+
grantedLedger?: number;
|
|
1473
|
+
}
|
|
1474
|
+
/**
|
|
1475
|
+
* Enriched role assignment with detailed member information
|
|
1476
|
+
* Includes grant timestamps when indexer data is available
|
|
1477
|
+
*/
|
|
1478
|
+
interface EnrichedRoleAssignment {
|
|
1479
|
+
/** The role identifier */
|
|
1480
|
+
role: RoleIdentifier;
|
|
1481
|
+
/** Array of enriched member information */
|
|
1482
|
+
members: EnrichedRoleMember[];
|
|
1483
|
+
}
|
|
1484
|
+
/**
|
|
1485
|
+
* Snapshot of access control state at a point in time
|
|
1486
|
+
*/
|
|
1487
|
+
interface AccessSnapshot {
|
|
1488
|
+
/** Array of role assignments */
|
|
1489
|
+
roles: RoleAssignment[];
|
|
1490
|
+
/** Optional ownership information */
|
|
1491
|
+
ownership?: OwnershipInfo;
|
|
1492
|
+
}
|
|
1493
|
+
/**
|
|
1494
|
+
* Change type for history events
|
|
1495
|
+
*
|
|
1496
|
+
* - GRANTED: Role was granted to an account
|
|
1497
|
+
* - REVOKED: Role was revoked from an account
|
|
1498
|
+
* - OWNERSHIP_TRANSFER_STARTED: Two-step ownership transfer initiated
|
|
1499
|
+
* - OWNERSHIP_TRANSFER_COMPLETED: Two-step ownership transfer accepted
|
|
1500
|
+
* - ADMIN_TRANSFER_INITIATED: Two-step admin transfer initiated
|
|
1501
|
+
* - ADMIN_TRANSFER_COMPLETED: Two-step admin transfer accepted
|
|
1502
|
+
* - UNKNOWN: Unrecognized event type from indexer (indicates schema mismatch)
|
|
1503
|
+
*/
|
|
1504
|
+
type HistoryChangeType = 'GRANTED' | 'REVOKED' | 'OWNERSHIP_TRANSFER_STARTED' | 'OWNERSHIP_TRANSFER_COMPLETED' | 'ADMIN_TRANSFER_INITIATED' | 'ADMIN_TRANSFER_COMPLETED' | 'UNKNOWN';
|
|
1505
|
+
/**
|
|
1506
|
+
* History entry for role changes (adapter-specific, when history is supported)
|
|
1507
|
+
*/
|
|
1508
|
+
interface HistoryEntry {
|
|
1509
|
+
/** The role that was changed */
|
|
1510
|
+
role: RoleIdentifier;
|
|
1511
|
+
/** The account that was granted or revoked */
|
|
1512
|
+
account: string;
|
|
1513
|
+
/** Type of change */
|
|
1514
|
+
changeType: HistoryChangeType;
|
|
1515
|
+
/** Transaction identifier */
|
|
1516
|
+
txId: string;
|
|
1517
|
+
/** Optional timestamp (ISO8601 format) */
|
|
1518
|
+
timestamp?: string;
|
|
1519
|
+
/** Optional ledger/sequence number */
|
|
1520
|
+
ledger?: number;
|
|
1521
|
+
}
|
|
1522
|
+
/**
|
|
1523
|
+
* Pagination info for cursor-based pagination
|
|
1524
|
+
*/
|
|
1525
|
+
interface PageInfo {
|
|
1526
|
+
/** Whether there are more items after the current page */
|
|
1527
|
+
hasNextPage: boolean;
|
|
1528
|
+
/** Cursor to use for fetching the next page */
|
|
1529
|
+
endCursor?: string;
|
|
1530
|
+
}
|
|
1531
|
+
/**
|
|
1532
|
+
* Paginated result for history queries
|
|
1533
|
+
*/
|
|
1534
|
+
interface PaginatedHistoryResult {
|
|
1535
|
+
/** Array of history entries */
|
|
1536
|
+
items: HistoryEntry[];
|
|
1537
|
+
/** Pagination information */
|
|
1538
|
+
pageInfo: PageInfo;
|
|
1539
|
+
}
|
|
1540
|
+
/**
|
|
1541
|
+
* Options for querying history with pagination
|
|
1542
|
+
*/
|
|
1543
|
+
interface HistoryQueryOptions {
|
|
1544
|
+
/** Filter by role identifier */
|
|
1545
|
+
roleId?: string;
|
|
1546
|
+
/** Filter by account address */
|
|
1547
|
+
account?: string;
|
|
1548
|
+
/** Filter by change type (grant, revoke, or ownership transfer) */
|
|
1549
|
+
changeType?: HistoryChangeType;
|
|
1550
|
+
/** Filter by transaction ID (exact match) */
|
|
1551
|
+
txId?: string;
|
|
1552
|
+
/** Filter by timestamp - return events on or after this time (format: 'YYYY-MM-DDTHH:mm:ss', no timezone) */
|
|
1553
|
+
timestampFrom?: string;
|
|
1554
|
+
/** Filter by timestamp - return events on or before this time (format: 'YYYY-MM-DDTHH:mm:ss', no timezone) */
|
|
1555
|
+
timestampTo?: string;
|
|
1556
|
+
/** Filter by ledger/block number (exact match) */
|
|
1557
|
+
ledger?: number;
|
|
1558
|
+
/** Maximum number of items to return (page size) */
|
|
1559
|
+
limit?: number;
|
|
1560
|
+
/** Cursor for fetching the next page */
|
|
1561
|
+
cursor?: string;
|
|
1562
|
+
}
|
|
1563
|
+
/**
|
|
1564
|
+
* Result of an operation (grant, revoke, transfer)
|
|
1565
|
+
*/
|
|
1566
|
+
interface OperationResult {
|
|
1567
|
+
/** Transaction/operation identifier */
|
|
1568
|
+
id: string;
|
|
1569
|
+
}
|
|
1570
|
+
/**
|
|
1571
|
+
* Service interface for access control operations
|
|
1572
|
+
*/
|
|
1573
|
+
interface AccessControlService {
|
|
1574
|
+
/**
|
|
1575
|
+
* Get the capabilities of the contract
|
|
1576
|
+
* @param contractAddress The contract address to check
|
|
1577
|
+
* @returns Promise resolving to capabilities
|
|
1578
|
+
*/
|
|
1579
|
+
getCapabilities(contractAddress: string): Promise<AccessControlCapabilities>;
|
|
1580
|
+
/**
|
|
1581
|
+
* Get the current owner of the contract
|
|
1582
|
+
* @param contractAddress The contract address
|
|
1583
|
+
* @returns Promise resolving to ownership information
|
|
1584
|
+
*/
|
|
1585
|
+
getOwnership(contractAddress: string): Promise<OwnershipInfo>;
|
|
1586
|
+
/**
|
|
1587
|
+
* Get current role assignments
|
|
1588
|
+
* @param contractAddress The contract address
|
|
1589
|
+
* @returns Promise resolving to array of role assignments
|
|
1590
|
+
*/
|
|
1591
|
+
getCurrentRoles(contractAddress: string): Promise<RoleAssignment[]>;
|
|
1592
|
+
/**
|
|
1593
|
+
* Get current role assignments with enriched member information
|
|
1594
|
+
*
|
|
1595
|
+
* Returns role assignments with metadata about when each member was granted
|
|
1596
|
+
* the role. If the indexer is unavailable, gracefully degrades to returning
|
|
1597
|
+
* members without timestamp information.
|
|
1598
|
+
*
|
|
1599
|
+
* @param contractAddress The contract address
|
|
1600
|
+
* @returns Promise resolving to array of enriched role assignments
|
|
1601
|
+
*/
|
|
1602
|
+
getCurrentRolesEnriched(contractAddress: string): Promise<EnrichedRoleAssignment[]>;
|
|
1603
|
+
/**
|
|
1604
|
+
* Grant a role to an account
|
|
1605
|
+
* @param contractAddress The contract address
|
|
1606
|
+
* @param roleId The role identifier
|
|
1607
|
+
* @param account The account to grant the role to
|
|
1608
|
+
* @param executionConfig Execution configuration specifying method (eoa, relayer, etc.)
|
|
1609
|
+
* @param onStatusChange Optional callback for status updates
|
|
1610
|
+
* @param runtimeApiKey Optional session-only API key for methods like Relayer
|
|
1611
|
+
* @returns Promise resolving to operation result
|
|
1612
|
+
*/
|
|
1613
|
+
grantRole(contractAddress: string, roleId: string, account: string, executionConfig: ExecutionConfig, onStatusChange?: (status: TxStatus, details: TransactionStatusUpdate) => void, runtimeApiKey?: string): Promise<OperationResult>;
|
|
1614
|
+
/**
|
|
1615
|
+
* Revoke a role from an account
|
|
1616
|
+
* @param contractAddress The contract address
|
|
1617
|
+
* @param roleId The role identifier
|
|
1618
|
+
* @param account The account to revoke the role from
|
|
1619
|
+
* @param executionConfig Execution configuration specifying method (eoa, relayer, etc.)
|
|
1620
|
+
* @param onStatusChange Optional callback for status updates
|
|
1621
|
+
* @param runtimeApiKey Optional session-only API key for methods like Relayer
|
|
1622
|
+
* @returns Promise resolving to operation result
|
|
1623
|
+
*/
|
|
1624
|
+
revokeRole(contractAddress: string, roleId: string, account: string, executionConfig: ExecutionConfig, onStatusChange?: (status: TxStatus, details: TransactionStatusUpdate) => void, runtimeApiKey?: string): Promise<OperationResult>;
|
|
1625
|
+
/**
|
|
1626
|
+
* Transfer ownership of the contract
|
|
1627
|
+
*
|
|
1628
|
+
* For two-step Ownable contracts (e.g., Stellar), the expirationBlock parameter
|
|
1629
|
+
* specifies when the pending transfer expires. The pending owner must call
|
|
1630
|
+
* acceptOwnership() before this block/ledger to complete the transfer.
|
|
1631
|
+
*
|
|
1632
|
+
* @param contractAddress The contract address
|
|
1633
|
+
* @param newOwner The new owner address
|
|
1634
|
+
* @param expirationBlock For two-step transfers: the block/ledger number by which the transfer
|
|
1635
|
+
* must be accepted. Required for chains with two-step Ownable (e.g., Stellar).
|
|
1636
|
+
* @param executionConfig Execution configuration specifying method (eoa, relayer, etc.)
|
|
1637
|
+
* @param onStatusChange Optional callback for status updates
|
|
1638
|
+
* @param runtimeApiKey Optional session-only API key for methods like Relayer
|
|
1639
|
+
* @returns Promise resolving to operation result
|
|
1640
|
+
*/
|
|
1641
|
+
transferOwnership(contractAddress: string, newOwner: string, expirationBlock: number, executionConfig: ExecutionConfig, onStatusChange?: (status: TxStatus, details: TransactionStatusUpdate) => void, runtimeApiKey?: string): Promise<OperationResult>;
|
|
1642
|
+
/**
|
|
1643
|
+
* Accept a pending ownership transfer (two-step transfer)
|
|
1644
|
+
*
|
|
1645
|
+
* Must be called by the pending owner (the address specified in transferOwnership)
|
|
1646
|
+
* before the expiration block/ledger. Only applicable for contracts that support
|
|
1647
|
+
* two-step ownership transfer (check `hasTwoStepOwnable` capability).
|
|
1648
|
+
*
|
|
1649
|
+
* The on-chain contract validates:
|
|
1650
|
+
* 1. Caller is the pending owner
|
|
1651
|
+
* 2. Transfer has not expired
|
|
1652
|
+
*
|
|
1653
|
+
* @param contractAddress The contract address
|
|
1654
|
+
* @param executionConfig Execution configuration specifying method (eoa, relayer, etc.)
|
|
1655
|
+
* @param onStatusChange Optional callback for status updates
|
|
1656
|
+
* @param runtimeApiKey Optional session-only API key for methods like Relayer
|
|
1657
|
+
* @returns Promise resolving to operation result with transaction ID
|
|
1658
|
+
*/
|
|
1659
|
+
acceptOwnership?(contractAddress: string, executionConfig: ExecutionConfig, onStatusChange?: (status: TxStatus, details: TransactionStatusUpdate) => void, runtimeApiKey?: string): Promise<OperationResult>;
|
|
1660
|
+
/**
|
|
1661
|
+
* Get the current admin and admin transfer state of an AccessControl contract
|
|
1662
|
+
*
|
|
1663
|
+
* Retrieves the current admin and checks for pending two-step admin transfers.
|
|
1664
|
+
* Only applicable for contracts that support two-step admin transfer
|
|
1665
|
+
* (check `hasTwoStepAdmin` capability).
|
|
1666
|
+
*
|
|
1667
|
+
* @param contractAddress The contract address
|
|
1668
|
+
* @returns Promise resolving to admin information with state
|
|
1669
|
+
*/
|
|
1670
|
+
getAdminInfo?(contractAddress: string): Promise<AdminInfo>;
|
|
1671
|
+
/**
|
|
1672
|
+
* Initiate an admin role transfer (two-step transfer)
|
|
1673
|
+
*
|
|
1674
|
+
* For two-step AccessControl contracts, this initiates a transfer that must be
|
|
1675
|
+
* accepted by the pending admin before the expiration ledger. Only applicable
|
|
1676
|
+
* for contracts that support two-step admin transfer (check `hasTwoStepAdmin` capability).
|
|
1677
|
+
*
|
|
1678
|
+
* @param contractAddress The contract address
|
|
1679
|
+
* @param newAdmin The new admin address
|
|
1680
|
+
* @param expirationBlock The block/ledger number by which the transfer must be accepted
|
|
1681
|
+
* @param executionConfig Execution configuration specifying method (eoa, relayer, etc.)
|
|
1682
|
+
* @param onStatusChange Optional callback for status updates
|
|
1683
|
+
* @param runtimeApiKey Optional session-only API key for methods like Relayer
|
|
1684
|
+
* @returns Promise resolving to operation result with transaction ID
|
|
1685
|
+
*/
|
|
1686
|
+
transferAdminRole?(contractAddress: string, newAdmin: string, expirationBlock: number, executionConfig: ExecutionConfig, onStatusChange?: (status: TxStatus, details: TransactionStatusUpdate) => void, runtimeApiKey?: string): Promise<OperationResult>;
|
|
1687
|
+
/**
|
|
1688
|
+
* Accept a pending admin transfer (two-step transfer)
|
|
1689
|
+
*
|
|
1690
|
+
* Must be called by the pending admin (the address specified in transferAdminRole)
|
|
1691
|
+
* before the expiration block/ledger. Only applicable for contracts that support
|
|
1692
|
+
* two-step admin transfer (check `hasTwoStepAdmin` capability).
|
|
1693
|
+
*
|
|
1694
|
+
* The on-chain contract validates:
|
|
1695
|
+
* 1. Caller is the pending admin
|
|
1696
|
+
* 2. Transfer has not expired
|
|
1697
|
+
*
|
|
1698
|
+
* @param contractAddress The contract address
|
|
1699
|
+
* @param executionConfig Execution configuration specifying method (eoa, relayer, etc.)
|
|
1700
|
+
* @param onStatusChange Optional callback for status updates
|
|
1701
|
+
* @param runtimeApiKey Optional session-only API key for methods like Relayer
|
|
1702
|
+
* @returns Promise resolving to operation result with transaction ID
|
|
1703
|
+
*/
|
|
1704
|
+
acceptAdminTransfer?(contractAddress: string, executionConfig: ExecutionConfig, onStatusChange?: (status: TxStatus, details: TransactionStatusUpdate) => void, runtimeApiKey?: string): Promise<OperationResult>;
|
|
1705
|
+
/**
|
|
1706
|
+
* Export a snapshot of current access control state
|
|
1707
|
+
* @param contractAddress The contract address
|
|
1708
|
+
* @returns Promise resolving to access snapshot
|
|
1709
|
+
*/
|
|
1710
|
+
exportSnapshot(contractAddress: string): Promise<AccessSnapshot>;
|
|
1711
|
+
/**
|
|
1712
|
+
* Get history of role changes (if supported)
|
|
1713
|
+
*
|
|
1714
|
+
* Supports cursor-based pagination. Use `pageInfo.endCursor` from the response
|
|
1715
|
+
* as the `cursor` option in subsequent calls to fetch more pages.
|
|
1716
|
+
*
|
|
1717
|
+
* @param contractAddress The contract address
|
|
1718
|
+
* @param options Optional filtering and pagination options
|
|
1719
|
+
* @returns Promise resolving to paginated history result, or empty result if not supported
|
|
1720
|
+
*/
|
|
1721
|
+
getHistory(contractAddress: string, options?: HistoryQueryOptions): Promise<PaginatedHistoryResult>;
|
|
1722
|
+
}
|
|
1723
|
+
//# sourceMappingURL=access-control.d.ts.map
|
|
1724
|
+
//#endregion
|
|
1725
|
+
//#region src/adapters/export.d.ts
|
|
1726
|
+
/**
|
|
1727
|
+
* Minimal subset of BuilderFormConfig needed for adapter export context.
|
|
1728
|
+
* Avoids circular dependencies by not importing the full builder types.
|
|
1729
|
+
*/
|
|
1730
|
+
interface BuilderFormConfigLike {
|
|
1731
|
+
functionId: string;
|
|
1732
|
+
contractAddress: string;
|
|
1733
|
+
[key: string]: any;
|
|
1734
|
+
}
|
|
1735
|
+
/**
|
|
1736
|
+
* Context provided to adapters during export to enable artifact bundling.
|
|
1737
|
+
*/
|
|
1738
|
+
interface AdapterExportContext {
|
|
1739
|
+
/** The form configuration from the builder */
|
|
1740
|
+
formConfig: BuilderFormConfigLike;
|
|
1741
|
+
/** The full contract schema */
|
|
1742
|
+
contractSchema: ContractSchema;
|
|
1743
|
+
/** The network configuration for the selected network */
|
|
1744
|
+
networkConfig: NetworkConfig;
|
|
1745
|
+
/**
|
|
1746
|
+
* Optional adapter-specific artifacts stored during contract loading.
|
|
1747
|
+
* For Midnight: privateStateId, contractModule, witnessCode, verifierKeys, etc.
|
|
1748
|
+
*/
|
|
1749
|
+
artifacts?: Record<string, unknown> | null;
|
|
1750
|
+
/**
|
|
1751
|
+
* Original contract definition (e.g., TypeScript .d.ts for Midnight).
|
|
1752
|
+
* Stored separately from the parsed schema for export purposes.
|
|
1753
|
+
*/
|
|
1754
|
+
definitionOriginal?: string | null;
|
|
1755
|
+
}
|
|
1756
|
+
/**
|
|
1757
|
+
* Result returned by adapters to bundle files and initialization code.
|
|
1758
|
+
*/
|
|
1759
|
+
interface AdapterExportBootstrap {
|
|
1760
|
+
/**
|
|
1761
|
+
* Files to add to the exported project.
|
|
1762
|
+
* Key: relative path (e.g., 'src/midnight/artifacts.ts')
|
|
1763
|
+
* Value: file content as string
|
|
1764
|
+
*/
|
|
1765
|
+
files?: Record<string, string>;
|
|
1766
|
+
/**
|
|
1767
|
+
* Binary files to add to the exported project (e.g., ZIP files).
|
|
1768
|
+
* Key: relative path (e.g., 'public/midnight/contract.zip')
|
|
1769
|
+
* Value: binary content as Uint8Array or Blob
|
|
1770
|
+
*/
|
|
1771
|
+
binaryFiles?: Record<string, Uint8Array | Blob>;
|
|
1772
|
+
/**
|
|
1773
|
+
* Optional import statements to inject into main.tsx
|
|
1774
|
+
* Example: ["import { midnightArtifacts } from './midnight/artifacts';"]
|
|
1775
|
+
*/
|
|
1776
|
+
imports?: string[];
|
|
1777
|
+
/**
|
|
1778
|
+
* Optional initialization code to run after adapter construction.
|
|
1779
|
+
* This code will be injected inside the resolveAdapter function,
|
|
1780
|
+
* right after the adapter instance is created.
|
|
1781
|
+
*
|
|
1782
|
+
* Example:
|
|
1783
|
+
* ```
|
|
1784
|
+
* if (typeof (adapter as any).loadContractWithMetadata === "function") {
|
|
1785
|
+
* await (adapter as any).loadContractWithMetadata(midnightArtifacts);
|
|
1786
|
+
* }
|
|
1787
|
+
* ```
|
|
1788
|
+
*/
|
|
1789
|
+
initAfterAdapterConstruct?: string;
|
|
1790
|
+
}
|
|
1791
|
+
//# sourceMappingURL=export.d.ts.map
|
|
1792
|
+
//#endregion
|
|
1793
|
+
//#region src/adapters/ui-enhancements.d.ts
|
|
1794
|
+
/**
|
|
1795
|
+
* Configuration for excluding specific wallet components provided by an adapter for its 'custom' kit.
|
|
1796
|
+
*/
|
|
1797
|
+
interface ComponentExclusionConfig {
|
|
1798
|
+
/**
|
|
1799
|
+
* Array of component keys (e.g., 'ConnectButton', 'NetworkSwitcher') to exclude
|
|
1800
|
+
* when the adapter provides its 'custom' set of UI components.
|
|
1801
|
+
*/
|
|
1802
|
+
exclude?: Array<keyof EcosystemWalletComponents>;
|
|
1803
|
+
}
|
|
1804
|
+
/**
|
|
1805
|
+
* Configuration for the desired UI kit to be used by an adapter.
|
|
1806
|
+
*/
|
|
1807
|
+
interface UiKitConfiguration {
|
|
1808
|
+
/** Name of the chosen UI kit (e.g., 'rainbowkit', 'connectkit'). Use 'custom' for adapter-provided default components or 'none' to disable adapter UI. */
|
|
1809
|
+
kitName: UiKitName;
|
|
1810
|
+
/**
|
|
1811
|
+
* Kit-specific configuration options.
|
|
1812
|
+
* This is an open-ended object to allow adapters to define their own configuration.
|
|
1813
|
+
* The adapter is responsible for validating and type-checking these values.
|
|
1814
|
+
*/
|
|
1815
|
+
kitConfig: FormValues;
|
|
1816
|
+
customCode?: string;
|
|
1817
|
+
}
|
|
1818
|
+
/**
|
|
1819
|
+
* A generic hook function type that can be called with any parameters and returns any result.
|
|
1820
|
+
* This allows us to maintain flexibility for adapter implementations while avoiding the use of 'any'.
|
|
1821
|
+
*/
|
|
1822
|
+
type GenericHook<TParams extends unknown[] = [], TResult = unknown> = (...args: TParams) => TResult;
|
|
1823
|
+
/**
|
|
1824
|
+
* Defines the shape of facade hooks provided by an adapter for its ecosystem.
|
|
1825
|
+
* These typically wrap underlying library hooks (e.g., from wagmi for EVM).
|
|
1826
|
+
*
|
|
1827
|
+
* We use generic hook signatures to allow direct use of library hooks
|
|
1828
|
+
* without tightly coupling to their specific parameter and return types.
|
|
1829
|
+
*
|
|
1830
|
+
* Adapters implementing these facade hooks are responsible for mapping their native
|
|
1831
|
+
* library's return values to a conventional set of properties expected by consumers.
|
|
1832
|
+
* This ensures that UI components using these facade hooks can remain chain-agnostic.
|
|
1833
|
+
*
|
|
1834
|
+
* @example For `useSwitchChain`:
|
|
1835
|
+
* Consumers will expect an object like:
|
|
1836
|
+
* ```typescript
|
|
1837
|
+
* {
|
|
1838
|
+
* switchChain: (args: { chainId: number }) => void; // Function to initiate the switch
|
|
1839
|
+
* isPending: boolean; // True if the switch is in progress
|
|
1840
|
+
* error: Error | null; // Error object if the switch failed
|
|
1841
|
+
* // chains?: Chain[]; // Optional: array of available chains, if provided by underlying hook
|
|
1842
|
+
* }
|
|
1843
|
+
* ```
|
|
1844
|
+
* If an adapter's underlying library uses `isLoading` instead of `isPending`,
|
|
1845
|
+
* the adapter's facade implementation for `useSwitchChain` should map `isLoading` to `isPending`.
|
|
1846
|
+
*
|
|
1847
|
+
* @example For `useAccount`:
|
|
1848
|
+
* Consumers will expect an object like:
|
|
1849
|
+
* ```typescript
|
|
1850
|
+
* {
|
|
1851
|
+
* isConnected: boolean;
|
|
1852
|
+
* address?: string;
|
|
1853
|
+
* chainId?: number;
|
|
1854
|
+
* // Other properties like `connector`, `status` might also be conventionally expected.
|
|
1855
|
+
* }
|
|
1856
|
+
* ```
|
|
1857
|
+
*/
|
|
1858
|
+
interface EcosystemSpecificReactHooks {
|
|
1859
|
+
useAccount?: GenericHook;
|
|
1860
|
+
useConnect?: GenericHook;
|
|
1861
|
+
useDisconnect?: GenericHook;
|
|
1862
|
+
useSwitchChain?: GenericHook;
|
|
1863
|
+
useChainId?: GenericHook;
|
|
1864
|
+
useChains?: GenericHook;
|
|
1865
|
+
useBalance?: GenericHook;
|
|
1866
|
+
useSendTransaction?: GenericHook;
|
|
1867
|
+
useWaitForTransactionReceipt?: GenericHook;
|
|
1868
|
+
useSignMessage?: GenericHook;
|
|
1869
|
+
useSignTypedData?: GenericHook;
|
|
1870
|
+
}
|
|
1871
|
+
/**
|
|
1872
|
+
* Props for the ecosystem-specific UI context provider component.
|
|
1873
|
+
*/
|
|
1874
|
+
interface EcosystemReactUiProviderProps {
|
|
1875
|
+
children: React$1.ReactNode;
|
|
1876
|
+
}
|
|
1877
|
+
/**
|
|
1878
|
+
* Base props interface that all component props should be compatible with.
|
|
1879
|
+
* Components can extend this with additional props as needed.
|
|
1880
|
+
*/
|
|
1881
|
+
interface BaseComponentProps {
|
|
1882
|
+
className?: string;
|
|
1883
|
+
}
|
|
1884
|
+
/**
|
|
1885
|
+
* Defines standardized names for commonly needed wallet UI components
|
|
1886
|
+
* that an adapter might provide.
|
|
1887
|
+
*/
|
|
1888
|
+
interface EcosystemWalletComponents {
|
|
1889
|
+
ConnectButton?: React$1.ComponentType<BaseComponentProps>;
|
|
1890
|
+
AccountDisplay?: React$1.ComponentType<BaseComponentProps>;
|
|
1891
|
+
NetworkSwitcher?: React$1.ComponentType<BaseComponentProps>;
|
|
1892
|
+
}
|
|
1893
|
+
/**
|
|
1894
|
+
* Valid component keys for EcosystemWalletComponents.
|
|
1895
|
+
* Used for type-safe runtime validation of component exclusion lists.
|
|
1896
|
+
*/
|
|
1897
|
+
declare const ECOSYSTEM_WALLET_COMPONENT_KEYS: ["ConnectButton", "AccountDisplay", "NetworkSwitcher"];
|
|
1898
|
+
type EcosystemWalletComponentKey = (typeof ECOSYSTEM_WALLET_COMPONENT_KEYS)[number];
|
|
1899
|
+
type NativeConfigLoader = (relativePath: string) => Promise<Record<string, unknown> | null>;
|
|
1900
|
+
/**
|
|
1901
|
+
* Describes a UI kit available for a specific adapter, providing all necessary
|
|
1902
|
+
* metadata for the builder app to render its configuration options.
|
|
1903
|
+
*/
|
|
1904
|
+
interface AvailableUiKit {
|
|
1905
|
+
/** A unique identifier for the UI kit (e.g., 'rainbowkit'). */
|
|
1906
|
+
id: string;
|
|
1907
|
+
/** The display name of the UI kit (e.g., 'RainbowKit'). */
|
|
1908
|
+
name: string;
|
|
1909
|
+
/** An optional link to the UI kit's documentation. */
|
|
1910
|
+
linkToDocs?: string;
|
|
1911
|
+
/**
|
|
1912
|
+
* An optional description of the UI kit and its configuration.
|
|
1913
|
+
* This can contain HTML for formatting (e.g., code blocks, links).
|
|
1914
|
+
*/
|
|
1915
|
+
description?: string;
|
|
1916
|
+
/** An array of form fields required to configure the UI kit. */
|
|
1917
|
+
configFields: FormFieldType[];
|
|
1918
|
+
/**
|
|
1919
|
+
* If true, indicates that this UI kit supports advanced configuration via a code editor.
|
|
1920
|
+
* @default false
|
|
1921
|
+
*/
|
|
1922
|
+
hasCodeEditor?: boolean;
|
|
1923
|
+
/**
|
|
1924
|
+
* The default boilerplate code to display if `hasCodeEditor` is true.
|
|
1925
|
+
*/
|
|
1926
|
+
defaultCode?: string;
|
|
1927
|
+
}
|
|
1928
|
+
type UiKitName = 'rainbowkit' | 'connectkit' | 'appkit' | 'stellar-wallets-kit' | 'custom' | 'none';
|
|
1929
|
+
/**
|
|
1930
|
+
* Badge variant for function decorations
|
|
1931
|
+
*/
|
|
1932
|
+
type FunctionBadgeVariant = 'info' | 'warning' | 'neutral';
|
|
1933
|
+
/**
|
|
1934
|
+
* Badge displayed next to a function in the UI
|
|
1935
|
+
*/
|
|
1936
|
+
interface FunctionBadge {
|
|
1937
|
+
/** Display text for the badge */
|
|
1938
|
+
text: string;
|
|
1939
|
+
/** Visual variant of the badge */
|
|
1940
|
+
variant?: FunctionBadgeVariant;
|
|
1941
|
+
/** Optional tooltip text shown on hover */
|
|
1942
|
+
tooltip?: string;
|
|
1943
|
+
}
|
|
1944
|
+
/**
|
|
1945
|
+
* Decoration for a contract function (badges, notes, etc.)
|
|
1946
|
+
*/
|
|
1947
|
+
interface FunctionDecoration {
|
|
1948
|
+
/** Array of badges to display next to the function */
|
|
1949
|
+
badges?: FunctionBadge[];
|
|
1950
|
+
/** Optional note to display when the function is selected */
|
|
1951
|
+
note?: {
|
|
1952
|
+
/** Optional title for the note */
|
|
1953
|
+
title?: string;
|
|
1954
|
+
/** Body text of the note */
|
|
1955
|
+
body: string;
|
|
1956
|
+
};
|
|
1957
|
+
/**
|
|
1958
|
+
* (Optional) If true, the form should auto-add a runtime secret field (if adapter provides getRuntimeFieldBinding).
|
|
1959
|
+
* Used to mark functions like organizer-only circuits that require credentials.
|
|
1960
|
+
* User can customize (hide, hardcode) or remove the field after auto-add.
|
|
1961
|
+
*/
|
|
1962
|
+
requiresRuntimeSecret?: boolean;
|
|
1963
|
+
}
|
|
1964
|
+
/**
|
|
1965
|
+
* Map of function IDs to their decorations
|
|
1966
|
+
*/
|
|
1967
|
+
type FunctionDecorationsMap = Record<string, FunctionDecoration>;
|
|
1968
|
+
//#endregion
|
|
1969
|
+
//#region src/adapters/base.d.ts
|
|
1970
|
+
type ExecutionMethodType = 'eoa' | 'relayer' | 'multisig';
|
|
1971
|
+
interface ExecutionMethodDetail {
|
|
1972
|
+
type: ExecutionMethodType;
|
|
1973
|
+
name: string;
|
|
1974
|
+
description?: string;
|
|
1975
|
+
disabled?: boolean;
|
|
1976
|
+
}
|
|
1977
|
+
/**
|
|
1978
|
+
* Represents a wallet connector option available for connection.
|
|
1979
|
+
*/
|
|
1980
|
+
type Connector = {
|
|
1981
|
+
id: string;
|
|
1982
|
+
name: string;
|
|
1983
|
+
};
|
|
1984
|
+
/**
|
|
1985
|
+
* Base wallet connection status interface with universal properties.
|
|
1986
|
+
* Chain-specific adapters should extend this interface with their specific fields.
|
|
1987
|
+
*/
|
|
1988
|
+
interface WalletConnectionStatus {
|
|
1989
|
+
/** Core connection state - always present for backward compatibility */
|
|
1990
|
+
isConnected: boolean;
|
|
1991
|
+
/** Wallet address - always present when connected */
|
|
1992
|
+
address?: string;
|
|
1993
|
+
/** Chain/network ID - format may vary by chain (number for EVM, string for others) */
|
|
1994
|
+
chainId?: string | number;
|
|
1995
|
+
/** Enhanced connection states for better UX */
|
|
1996
|
+
isConnecting?: boolean;
|
|
1997
|
+
isDisconnected?: boolean;
|
|
1998
|
+
isReconnecting?: boolean;
|
|
1999
|
+
/** Detailed status string */
|
|
2000
|
+
status?: 'connected' | 'connecting' | 'disconnected' | 'reconnecting';
|
|
2001
|
+
/** Connector/wallet information - universal across all chains */
|
|
2002
|
+
connector?: {
|
|
2003
|
+
id: string;
|
|
2004
|
+
name?: string;
|
|
2005
|
+
type?: string;
|
|
2006
|
+
};
|
|
2007
|
+
}
|
|
2008
|
+
/**
|
|
2009
|
+
* Adapter-declared networking configuration form.
|
|
2010
|
+
* Rendered by the application using DynamicFormField components.
|
|
2011
|
+
*/
|
|
2012
|
+
interface NetworkServiceForm {
|
|
2013
|
+
/** Stable identifier for the service (e.g., 'rpc', 'explorer', 'indexer') */
|
|
2014
|
+
id: string;
|
|
2015
|
+
/** User-facing label for tabs/sections */
|
|
2016
|
+
label: string;
|
|
2017
|
+
/** Optional description shown above the form */
|
|
2018
|
+
description?: string;
|
|
2019
|
+
/** Whether this service supports connection testing via testNetworkServiceConnection */
|
|
2020
|
+
supportsConnectionTest?: boolean;
|
|
2021
|
+
/** Form schema fields using the standard FormFieldType */
|
|
2022
|
+
fields: FormFieldType[];
|
|
2023
|
+
}
|
|
2024
|
+
/**
|
|
2025
|
+
* Configuration for an adapter-driven dynamic property input in the Customize step.
|
|
2026
|
+
* When provided via getRuntimeFieldBinding().propertyNameInput, the builder renders
|
|
2027
|
+
* a TextField control and persists the value under field.adapterBinding.metadata[metadataKey].
|
|
2028
|
+
*/
|
|
2029
|
+
interface RuntimeSecretPropertyInput {
|
|
2030
|
+
/** Metadata key to persist the value under field.adapterBinding.metadata */
|
|
2031
|
+
metadataKey: string;
|
|
2032
|
+
/** Optional label override for the input */
|
|
2033
|
+
label?: string;
|
|
2034
|
+
/** Optional helper text to display below the input */
|
|
2035
|
+
helperText?: string;
|
|
2036
|
+
/** Optional placeholder text */
|
|
2037
|
+
placeholder?: string;
|
|
2038
|
+
/**
|
|
2039
|
+
* Optional default value to seed when the field is auto-added.
|
|
2040
|
+
* If metadata[metadataKey] already has a value, that value takes precedence.
|
|
2041
|
+
*/
|
|
2042
|
+
defaultValue?: string;
|
|
2043
|
+
/** Whether to render the control (default: true when metadataKey provided) */
|
|
2044
|
+
visible?: boolean;
|
|
2045
|
+
}
|
|
2046
|
+
/**
|
|
2047
|
+
* Minimal adapter interface for the renderer and contract interaction
|
|
2048
|
+
*
|
|
2049
|
+
* This is the base interface that all chain-specific adapters must implement.
|
|
2050
|
+
* It defines the core functionality needed for app rendering and contract interaction.
|
|
2051
|
+
*/
|
|
2052
|
+
interface ContractAdapter {
|
|
2053
|
+
/**
|
|
2054
|
+
* The network configuration this adapter instance is configured for.
|
|
2055
|
+
*/
|
|
2056
|
+
readonly networkConfig: NetworkConfig;
|
|
2057
|
+
/**
|
|
2058
|
+
* The initial kitName from AppConfigService at the time of adapter construction.
|
|
2059
|
+
* This provides a baseline kitName preference from the application's static/global configuration.
|
|
2060
|
+
* It defaults to 'custom' if no specific kitName is found in AppConfigService.
|
|
2061
|
+
* This value is stored on the instance to inform the first call to configureUiKit if no programmatic overrides are given.
|
|
2062
|
+
*/
|
|
2063
|
+
readonly initialAppServiceKitName: UiKitConfiguration['kitName'];
|
|
2064
|
+
/**
|
|
2065
|
+
* Load a contract from a source (address or JSON ABI string).
|
|
2066
|
+
* The adapter instance should be pre-configured with the necessary network context.
|
|
2067
|
+
*
|
|
2068
|
+
* @param source - The contract address or JSON ABI string.
|
|
2069
|
+
* @returns A promise resolving to the ContractSchema.
|
|
2070
|
+
*/
|
|
2071
|
+
loadContract(source: string | Record<string, unknown>): Promise<ContractSchema>;
|
|
2072
|
+
/**
|
|
2073
|
+
* (Optional) Load a contract with source metadata information.
|
|
2074
|
+
* Returns both the contract schema and information about how it was loaded.
|
|
2075
|
+
*
|
|
2076
|
+
* @param source - The contract artifacts/source data.
|
|
2077
|
+
* @returns A promise resolving to both ContractSchema and source metadata.
|
|
2078
|
+
*/
|
|
2079
|
+
loadContractWithMetadata?(source: string | Record<string, unknown>): Promise<{
|
|
2080
|
+
schema: ContractSchema;
|
|
2081
|
+
source: 'fetched' | 'manual';
|
|
2082
|
+
metadata?: {
|
|
2083
|
+
fetchedFrom?: string;
|
|
2084
|
+
contractName?: string;
|
|
2085
|
+
verificationStatus?: 'verified' | 'unverified' | 'unknown';
|
|
2086
|
+
fetchTimestamp?: Date;
|
|
2087
|
+
definitionHash?: string;
|
|
2088
|
+
};
|
|
2089
|
+
/** Chain-agnostic proxy information */
|
|
2090
|
+
proxyInfo?: ProxyInfo;
|
|
2091
|
+
}>;
|
|
2092
|
+
/**
|
|
2093
|
+
* Get only the functions that modify state (writable functions)
|
|
2094
|
+
* @param contractSchema The contract schema to filter
|
|
2095
|
+
* @returns Array of writable functions
|
|
2096
|
+
*/
|
|
2097
|
+
getWritableFunctions(contractSchema: ContractSchema): ContractSchema['functions'];
|
|
2098
|
+
/**
|
|
2099
|
+
* Map a blockchain-specific parameter type to a form field type
|
|
2100
|
+
* @param parameterType The blockchain parameter type
|
|
2101
|
+
* @returns The appropriate form field type
|
|
2102
|
+
*/
|
|
2103
|
+
mapParameterTypeToFieldType(parameterType: string): FieldType;
|
|
2104
|
+
/**
|
|
2105
|
+
* Format transaction data for the specific chain,
|
|
2106
|
+
* considering submitted inputs and field configurations.
|
|
2107
|
+
*
|
|
2108
|
+
* @param contractSchema - The schema of the contract containing the function.
|
|
2109
|
+
* @param functionId - The ID of the function being called
|
|
2110
|
+
* @param submittedInputs - The data submitted from the rendered form fields
|
|
2111
|
+
* @param fields - The configuration for all fields
|
|
2112
|
+
* @returns The formatted data payload for the blockchain transaction, suitable for signAndBroadcast.
|
|
2113
|
+
*/
|
|
2114
|
+
formatTransactionData(contractSchema: ContractSchema, functionId: string, submittedInputs: Record<string, unknown>, fields: FormFieldType[]): unknown;
|
|
2115
|
+
/**
|
|
2116
|
+
* Sign and broadcast a transaction
|
|
2117
|
+
*
|
|
2118
|
+
* @param transactionData - The formatted transaction data
|
|
2119
|
+
* @param executionConfig - Configuration for the execution method (e.g., relayer settings)
|
|
2120
|
+
* @param onStatusChange - Callback for transaction status updates
|
|
2121
|
+
* @param runtimeApiKey - Optional API key or token for execution method (e.g., relayer API key)
|
|
2122
|
+
* @param runtimeSecret - Optional runtime secret required by the adapter (e.g., organizer key for privacy circuits)
|
|
2123
|
+
* @returns Transaction hash upon successful broadcast, and optionally the execution result if the ecosystem supports it
|
|
2124
|
+
*/
|
|
2125
|
+
signAndBroadcast: (transactionData: unknown, executionConfig: ExecutionConfig, onStatusChange: (status: string, details: TransactionStatusUpdate) => void, runtimeApiKey?: string, runtimeSecret?: string) => Promise<{
|
|
2126
|
+
txHash: string;
|
|
2127
|
+
result?: unknown;
|
|
2128
|
+
}>;
|
|
2129
|
+
/**
|
|
2130
|
+
* Validate a blockchain address for this chain
|
|
2131
|
+
*
|
|
2132
|
+
* @param address - The address to validate
|
|
2133
|
+
* @param addressType - Optional specific address type to validate (chain-specific)
|
|
2134
|
+
* @returns Whether the address is valid for this chain
|
|
2135
|
+
*/
|
|
2136
|
+
isValidAddress(address: string, addressType?: string): boolean;
|
|
2137
|
+
/**
|
|
2138
|
+
* Returns details for execution methods supported by this chain adapter.
|
|
2139
|
+
*/
|
|
2140
|
+
getSupportedExecutionMethods(): Promise<ExecutionMethodDetail[]>;
|
|
2141
|
+
/**
|
|
2142
|
+
* Validates the complete execution configuration object against the
|
|
2143
|
+
* requirements and capabilities of this chain adapter.
|
|
2144
|
+
*
|
|
2145
|
+
* @param config - The execution configuration object
|
|
2146
|
+
* @returns A promise resolving to true if valid, or an error message if invalid
|
|
2147
|
+
*/
|
|
2148
|
+
validateExecutionConfig(config: ExecutionConfig): Promise<true | string>;
|
|
2149
|
+
/**
|
|
2150
|
+
* Determines if a function is a view/pure function (read-only)
|
|
2151
|
+
* @param functionDetails The function details
|
|
2152
|
+
* @returns True if the function is read-only
|
|
2153
|
+
*/
|
|
2154
|
+
isViewFunction(functionDetails: ContractFunction): boolean;
|
|
2155
|
+
/**
|
|
2156
|
+
* Optionally filter which view functions are safe to auto-query without user input.
|
|
2157
|
+
* Adapters can exclude chain-specific management/admin functions that are likely
|
|
2158
|
+
* to revert or require special permissions.
|
|
2159
|
+
* If not implemented, the UI will assume all parameterless view functions are safe.
|
|
2160
|
+
*/
|
|
2161
|
+
filterAutoQueryableFunctions?(functions: ContractFunction[]): ContractFunction[];
|
|
2162
|
+
/**
|
|
2163
|
+
* Queries a view function on a contract.
|
|
2164
|
+
* The adapter instance should be pre-configured with the necessary network context.
|
|
2165
|
+
*
|
|
2166
|
+
* @param contractAddress The contract address
|
|
2167
|
+
* @param functionId The function identifier
|
|
2168
|
+
* @param params Optional parameters for the function call
|
|
2169
|
+
* @param contractSchema Optional pre-loaded contract schema
|
|
2170
|
+
* @returns The query result
|
|
2171
|
+
*/
|
|
2172
|
+
queryViewFunction(contractAddress: string, functionId: string, params?: unknown[], contractSchema?: ContractSchema): Promise<unknown>;
|
|
2173
|
+
/**
|
|
2174
|
+
* Formats a function result for display
|
|
2175
|
+
* @param result The raw result from the contract
|
|
2176
|
+
* @param functionDetails The function details
|
|
2177
|
+
* @returns Formatted result ready for display
|
|
2178
|
+
*/
|
|
2179
|
+
formatFunctionResult(result: unknown, functionDetails: ContractFunction): string;
|
|
2180
|
+
/**
|
|
2181
|
+
* Get field types compatible with a specific parameter type
|
|
2182
|
+
*
|
|
2183
|
+
* @param parameterType - The blockchain parameter type
|
|
2184
|
+
* @returns Array of compatible field types
|
|
2185
|
+
*/
|
|
2186
|
+
getCompatibleFieldTypes(parameterType: string): FieldType[];
|
|
2187
|
+
/**
|
|
2188
|
+
* Generate default field configuration for a function parameter
|
|
2189
|
+
*
|
|
2190
|
+
* @param parameter - The function parameter to convert to a form field
|
|
2191
|
+
* @param contractSchema - Optional contract schema for additional context (e.g., spec entries)
|
|
2192
|
+
* @returns A form field configuration with appropriate defaults
|
|
2193
|
+
*/
|
|
2194
|
+
generateDefaultField(parameter: FunctionParameter, contractSchema?: ContractSchema): FormFieldType;
|
|
2195
|
+
/**
|
|
2196
|
+
* Indicates if this adapter supports wallet connection
|
|
2197
|
+
*
|
|
2198
|
+
* @returns Whether wallet connection is supported by this adapter
|
|
2199
|
+
*/
|
|
2200
|
+
supportsWalletConnection(): boolean;
|
|
2201
|
+
/**
|
|
2202
|
+
* Gets the list of available wallet connectors supported by this adapter.
|
|
2203
|
+
*
|
|
2204
|
+
* The UI can use this list to present connection options to the user.
|
|
2205
|
+
* Each connector should have a unique ID and a user-friendly name.
|
|
2206
|
+
*
|
|
2207
|
+
* @returns A promise resolving to an array of available Connector objects.
|
|
2208
|
+
* Returns an empty array if wallet connection is not supported or no connectors are found.
|
|
2209
|
+
*/
|
|
2210
|
+
getAvailableConnectors(): Promise<Connector[]>;
|
|
2211
|
+
/**
|
|
2212
|
+
* Initiates the wallet connection process for a specific, chosen connector.
|
|
2213
|
+
*
|
|
2214
|
+
* @param connectorId The unique identifier (e.g., Wagmi's `uid`) of the connector
|
|
2215
|
+
* selected by the user from the list provided by `getAvailableConnectors`.
|
|
2216
|
+
* @returns A promise resolving to an object indicating the connection result:
|
|
2217
|
+
* - `connected`: `true` if successful, `false` otherwise.
|
|
2218
|
+
* - `address`: The connected wallet address if successful.
|
|
2219
|
+
* - `error`: An error message if the connection failed.
|
|
2220
|
+
*/
|
|
2221
|
+
connectWallet(connectorId: string): Promise<{
|
|
2222
|
+
connected: boolean;
|
|
2223
|
+
address?: string;
|
|
2224
|
+
error?: string;
|
|
2225
|
+
}>;
|
|
2226
|
+
/**
|
|
2227
|
+
* Disconnects the currently connected wallet
|
|
2228
|
+
* @returns Disconnection result object
|
|
2229
|
+
*/
|
|
2230
|
+
disconnectWallet(): Promise<{
|
|
2231
|
+
disconnected: boolean;
|
|
2232
|
+
error?: string;
|
|
2233
|
+
}>;
|
|
2234
|
+
/**
|
|
2235
|
+
* Gets current wallet connection status
|
|
2236
|
+
*
|
|
2237
|
+
* @returns Rich status object with detailed connection state and address information
|
|
2238
|
+
*/
|
|
2239
|
+
getWalletConnectionStatus(): WalletConnectionStatus;
|
|
2240
|
+
/**
|
|
2241
|
+
* Gets a blockchain explorer URL for an address in this chain.
|
|
2242
|
+
* The adapter instance should be pre-configured with the necessary network context.
|
|
2243
|
+
*
|
|
2244
|
+
* @param address - The address to get the explorer URL for
|
|
2245
|
+
* @returns A URL to view the address on a blockchain explorer, or null if not supported
|
|
2246
|
+
*/
|
|
2247
|
+
getExplorerUrl(address: string): string | null;
|
|
2248
|
+
/**
|
|
2249
|
+
* Optional method to subscribe to wallet connection changes
|
|
2250
|
+
*
|
|
2251
|
+
* @param callback Function to call when connection status changes
|
|
2252
|
+
* @returns Cleanup function to unsubscribe
|
|
2253
|
+
*/
|
|
2254
|
+
onWalletConnectionChange?(callback: (status: WalletConnectionStatus, previousStatus: WalletConnectionStatus) => void): () => void;
|
|
2255
|
+
/**
|
|
2256
|
+
* Gets a blockchain explorer URL for a transaction in this chain.
|
|
2257
|
+
* The adapter instance should be pre-configured with the necessary network context.
|
|
2258
|
+
*
|
|
2259
|
+
* @param txHash - The hash of the transaction to get the explorer URL for
|
|
2260
|
+
* @returns A URL to view the transaction on a blockchain explorer, or null if not supported
|
|
2261
|
+
*/
|
|
2262
|
+
getExplorerTxUrl?(txHash: string): string | null;
|
|
2263
|
+
/**
|
|
2264
|
+
* Gets the current block/ledger number from the blockchain.
|
|
2265
|
+
*
|
|
2266
|
+
* This is used for:
|
|
2267
|
+
* - Calculating appropriate expiration blocks for time-sensitive operations
|
|
2268
|
+
* - Validating expiration parameters before submitting transactions
|
|
2269
|
+
* - Determining if pending operations have expired
|
|
2270
|
+
*
|
|
2271
|
+
* @returns A promise resolving to the current block/ledger number
|
|
2272
|
+
* @throws Error if the RPC call fails
|
|
2273
|
+
*
|
|
2274
|
+
* @example
|
|
2275
|
+
* ```typescript
|
|
2276
|
+
* const currentBlock = await adapter.getCurrentBlock();
|
|
2277
|
+
* // Set expiration to ~1 hour from now
|
|
2278
|
+
* const expirationBlock = currentBlock + 300; // ~300 blocks at 12s/block for EVM
|
|
2279
|
+
* ```
|
|
2280
|
+
*/
|
|
2281
|
+
getCurrentBlock(): Promise<number>;
|
|
2282
|
+
/**
|
|
2283
|
+
* (Optional) Waits for a transaction to be confirmed on the blockchain.
|
|
2284
|
+
*
|
|
2285
|
+
* @param txHash - The hash of the transaction to wait for.
|
|
2286
|
+
* @returns A promise resolving to the final status and receipt/error.
|
|
2287
|
+
*/
|
|
2288
|
+
waitForTransactionConfirmation?(txHash: string): Promise<{
|
|
2289
|
+
status: 'success' | 'error';
|
|
2290
|
+
receipt?: unknown;
|
|
2291
|
+
error?: Error;
|
|
2292
|
+
}>;
|
|
2293
|
+
/**
|
|
2294
|
+
* (Optional) Configures the UI kit to be used by this adapter instance.
|
|
2295
|
+
* This setting can influence the components and providers returned by other UI facilitation methods.
|
|
2296
|
+
* It's typically called by the application during initialization based on global settings or user preferences.
|
|
2297
|
+
*
|
|
2298
|
+
* @param config - The UI kit configuration, specifying the `kitName` (e.g., 'custom', 'rainbowkit')
|
|
2299
|
+
* and any `kitConfig` options specific to that kit.
|
|
2300
|
+
* @param options - Optional additional options including callback functions for loading configs
|
|
2301
|
+
*/
|
|
2302
|
+
configureUiKit?(config: UiKitConfiguration, options?: {
|
|
2303
|
+
/** Optional generic function to load configuration modules by path from the consuming app's source. */
|
|
2304
|
+
loadUiKitNativeConfig?: (relativePath: string) => Promise<Record<string, unknown> | null>;
|
|
2305
|
+
}): void | Promise<void>;
|
|
2306
|
+
/**
|
|
2307
|
+
* (Optional) Returns a React component that sets up the necessary UI context for this adapter's ecosystem.
|
|
2308
|
+
* For instance, an EVM adapter might return a component that provides WagmiProvider and QueryClientProvider.
|
|
2309
|
+
* If a third-party UI kit is configured (via `configureUiKit`), this provider component should also
|
|
2310
|
+
* compose that kit's specific provider(s) (e.g., RainbowKitProvider).
|
|
2311
|
+
* The returned component is expected to accept `children` props.
|
|
2312
|
+
*
|
|
2313
|
+
* @returns A React functional component that accepts children, or `undefined` if UI context facilitation is not supported or not configured.
|
|
2314
|
+
*/
|
|
2315
|
+
getEcosystemReactUiContextProvider?(): React.ComponentType<EcosystemReactUiProviderProps> | undefined;
|
|
2316
|
+
/**
|
|
2317
|
+
* (Optional) Returns an object containing facade React hooks for common wallet and blockchain interactions
|
|
2318
|
+
* specific to this adapter's ecosystem. These hooks are designed to be used within the context
|
|
2319
|
+
* established by the component from `getEcosystemReactUiContextProvider`.
|
|
2320
|
+
* For an EVM adapter, these would typically wrap `wagmi/react` hooks to abstract direct library usage.
|
|
2321
|
+
*
|
|
2322
|
+
* @returns An object of facade hooks, or `undefined` if not supported.
|
|
2323
|
+
*/
|
|
2324
|
+
getEcosystemReactHooks?(): EcosystemSpecificReactHooks | undefined;
|
|
2325
|
+
/**
|
|
2326
|
+
* (Optional) Returns an object containing standardized, ready-to-use wallet UI components for this ecosystem.
|
|
2327
|
+
* The actual components are sourced either from a configured third-party UI kit (specified via `configureUiKit`)
|
|
2328
|
+
* or are basic custom implementations provided by the adapter itself if `kitName` is 'custom' or undefined.
|
|
2329
|
+
* Examples include `ConnectButton`, `AccountDisplay`, `NetworkSwitcher`.
|
|
2330
|
+
*
|
|
2331
|
+
* @returns An object mapping standard component names to React components, or `undefined` if not supported or configured.
|
|
2332
|
+
*/
|
|
2333
|
+
getEcosystemWalletComponents?(): EcosystemWalletComponents | undefined;
|
|
2334
|
+
/**
|
|
2335
|
+
* Gets the list of available UI kits supported by this adapter.
|
|
2336
|
+
*
|
|
2337
|
+
* @returns A promise resolving to an array of available UiKit objects.
|
|
2338
|
+
*/
|
|
2339
|
+
getAvailableUiKits(): Promise<AvailableUiKit[]>;
|
|
2340
|
+
/**
|
|
2341
|
+
* (Optional) Returns adapter-provided UI label overrides for chain-specific verbiage.
|
|
2342
|
+
* Keys are consumed by chain-agnostic UI to avoid ecosystem-centric terms.
|
|
2343
|
+
* Example keys used today (non-exhaustive):
|
|
2344
|
+
* - relayerConfigTitle
|
|
2345
|
+
* - relayerConfigActiveDesc
|
|
2346
|
+
* - relayerConfigInactiveDesc
|
|
2347
|
+
* - relayerConfigPresetTitle
|
|
2348
|
+
* - relayerConfigPresetDesc
|
|
2349
|
+
* - relayerConfigCustomizeBtn
|
|
2350
|
+
* - detailsTitle
|
|
2351
|
+
* - network
|
|
2352
|
+
* - relayerId
|
|
2353
|
+
* - active
|
|
2354
|
+
* - paused
|
|
2355
|
+
* - systemDisabled
|
|
2356
|
+
* - balance
|
|
2357
|
+
* - nonce
|
|
2358
|
+
* - pending
|
|
2359
|
+
* - lastTransaction
|
|
2360
|
+
*/
|
|
2361
|
+
getUiLabels?(): Record<string, string> | undefined;
|
|
2362
|
+
/**
|
|
2363
|
+
* Generates adapter-specific wallet configuration files for export.
|
|
2364
|
+
*
|
|
2365
|
+
* @param uiKitConfig The selected UI kit configuration from the builder.
|
|
2366
|
+
* @returns A promise resolving to a record of file paths to their content.
|
|
2367
|
+
*/
|
|
2368
|
+
getExportableWalletConfigFiles?(uiKitConfig?: UiKitConfiguration): Promise<Record<string, string>>;
|
|
2369
|
+
/**
|
|
2370
|
+
* Returns the set of supported contract definition providers for this adapter.
|
|
2371
|
+
* The UI can use this to present a provider selection without hardcoding
|
|
2372
|
+
* chain-specific values. When not implemented, the UI may fall back to
|
|
2373
|
+
* application configuration or hide the selector.
|
|
2374
|
+
*
|
|
2375
|
+
* Example keys: "etherscan", "sourcify".
|
|
2376
|
+
*/
|
|
2377
|
+
getSupportedContractDefinitionProviders?(): Array<{
|
|
2378
|
+
key: string;
|
|
2379
|
+
label?: string;
|
|
2380
|
+
}>;
|
|
2381
|
+
/**
|
|
2382
|
+
* Returns a schema for the inputs required to define a contract.
|
|
2383
|
+
* This allows adapters to specify what information they need (e.g., address, ABI, artifacts).
|
|
2384
|
+
*
|
|
2385
|
+
* @returns An array of FormFieldType objects representing the required inputs.
|
|
2386
|
+
*/
|
|
2387
|
+
getContractDefinitionInputs(): FormFieldType[];
|
|
2388
|
+
/**
|
|
2389
|
+
* Gets the list of available relayers for a specific service.
|
|
2390
|
+
*
|
|
2391
|
+
* @param serviceUrl The URL of the relayer service.
|
|
2392
|
+
* @param accessToken The access token for the relayer service.
|
|
2393
|
+
* @returns A promise that resolves to an array of relayer details.
|
|
2394
|
+
*/
|
|
2395
|
+
getRelayers(serviceUrl: string, accessToken: string): Promise<RelayerDetails[]>;
|
|
2396
|
+
/**
|
|
2397
|
+
* Gets detailed information about a specific relayer including balance and status.
|
|
2398
|
+
*
|
|
2399
|
+
* @param serviceUrl The URL of the relayer service.
|
|
2400
|
+
* @param accessToken The access token for the relayer service.
|
|
2401
|
+
* @param relayerId The unique identifier of the relayer.
|
|
2402
|
+
* @returns A promise that resolves to enhanced relayer details including balance, status, and other metrics.
|
|
2403
|
+
*/
|
|
2404
|
+
getRelayer(serviceUrl: string, accessToken: string, relayerId: string): Promise<RelayerDetailsRich>;
|
|
2405
|
+
/**
|
|
2406
|
+
* (Optional) Returns a React component for configuring relayer transaction options.
|
|
2407
|
+
* This component should render chain-specific transaction options (e.g., gas settings for EVM).
|
|
2408
|
+
* The component will receive props for getting and setting the transaction options.
|
|
2409
|
+
*
|
|
2410
|
+
* @returns A React component for relayer options configuration, or undefined if not supported.
|
|
2411
|
+
*/
|
|
2412
|
+
getRelayerOptionsComponent?(): React.ComponentType<{
|
|
2413
|
+
options: Record<string, unknown>;
|
|
2414
|
+
onChange: (options: Record<string, unknown>) => void;
|
|
2415
|
+
}> | undefined;
|
|
2416
|
+
/**
|
|
2417
|
+
* (Optional) Validates an RPC endpoint configuration.
|
|
2418
|
+
* Chain-specific validation logic to ensure the RPC URL and configuration are valid.
|
|
2419
|
+
*
|
|
2420
|
+
* @param rpcConfig - The RPC provider configuration to validate
|
|
2421
|
+
* @returns A promise resolving to true if valid, false otherwise
|
|
2422
|
+
*/
|
|
2423
|
+
validateRpcEndpoint?(rpcConfig: UserRpcProviderConfig): Promise<boolean>;
|
|
2424
|
+
/**
|
|
2425
|
+
* (Optional) Tests the connection to an RPC endpoint.
|
|
2426
|
+
* Performs a health check on the RPC endpoint to verify connectivity and measure latency.
|
|
2427
|
+
*
|
|
2428
|
+
* @param rpcConfig - The RPC provider configuration to test
|
|
2429
|
+
* @returns A promise resolving to connection test results
|
|
2430
|
+
*/
|
|
2431
|
+
testRpcConnection?(rpcConfig: UserRpcProviderConfig): Promise<{
|
|
2432
|
+
success: boolean;
|
|
2433
|
+
latency?: number;
|
|
2434
|
+
error?: string;
|
|
2435
|
+
}>;
|
|
2436
|
+
/**
|
|
2437
|
+
* (Optional) Validates a user-provided explorer configuration.
|
|
2438
|
+
* Chain-specific validation logic to ensure the explorer URLs and API key are valid.
|
|
2439
|
+
*
|
|
2440
|
+
* @param explorerConfig - The explorer configuration to validate
|
|
2441
|
+
* @returns A promise resolving to true if valid, false otherwise
|
|
2442
|
+
*/
|
|
2443
|
+
validateExplorerConfig?(explorerConfig: UserExplorerConfig): Promise<boolean>;
|
|
2444
|
+
/**
|
|
2445
|
+
* (Optional) Tests the connection to an explorer API.
|
|
2446
|
+
* Performs a health check on the explorer API to verify the API key works and measure latency.
|
|
2447
|
+
*
|
|
2448
|
+
* @param explorerConfig - The explorer configuration to test
|
|
2449
|
+
* @returns A promise resolving to connection test results
|
|
2450
|
+
*/
|
|
2451
|
+
testExplorerConnection?(explorerConfig: UserExplorerConfig): Promise<{
|
|
2452
|
+
success: boolean;
|
|
2453
|
+
latency?: number;
|
|
2454
|
+
error?: string;
|
|
2455
|
+
}>;
|
|
2456
|
+
/**
|
|
2457
|
+
* (Optional) Compares two contract schemas and returns detailed analysis.
|
|
2458
|
+
* Provides chain-specific comparison logic for detecting differences between schemas.
|
|
2459
|
+
*
|
|
2460
|
+
* @param storedSchema - The previously stored contract schema as JSON string
|
|
2461
|
+
* @param freshSchema - The newly fetched contract schema as JSON string
|
|
2462
|
+
* @returns A promise resolving to detailed comparison results
|
|
2463
|
+
*/
|
|
2464
|
+
compareContractDefinitions?(storedSchema: string, freshSchema: string): Promise<{
|
|
2465
|
+
identical: boolean;
|
|
2466
|
+
differences: Array<{
|
|
2467
|
+
type: 'added' | 'removed' | 'modified';
|
|
2468
|
+
section: string;
|
|
2469
|
+
name: string;
|
|
2470
|
+
details: string;
|
|
2471
|
+
impact: 'low' | 'medium' | 'high';
|
|
2472
|
+
oldSignature?: string;
|
|
2473
|
+
newSignature?: string;
|
|
2474
|
+
}>;
|
|
2475
|
+
severity: 'none' | 'minor' | 'major' | 'breaking';
|
|
2476
|
+
summary: string;
|
|
2477
|
+
}>;
|
|
2478
|
+
/**
|
|
2479
|
+
* (Optional) Validates contract definition structure and format for this chain.
|
|
2480
|
+
* Provides chain-specific validation logic for contract definitions.
|
|
2481
|
+
*
|
|
2482
|
+
* @param definition - The contract definition as JSON string to validate
|
|
2483
|
+
* @returns Validation result with errors and warnings
|
|
2484
|
+
*/
|
|
2485
|
+
validateContractDefinition?(definition: string): {
|
|
2486
|
+
valid: boolean;
|
|
2487
|
+
errors: string[];
|
|
2488
|
+
warnings: string[];
|
|
2489
|
+
};
|
|
2490
|
+
/**
|
|
2491
|
+
* (Optional) Creates a deterministic hash of a contract definition for quick comparison.
|
|
2492
|
+
* Provides chain-specific normalization and hashing for contract definitions.
|
|
2493
|
+
*
|
|
2494
|
+
* @param definition - The contract definition as JSON string to hash
|
|
2495
|
+
* @returns A deterministic hash string for quick comparison
|
|
2496
|
+
*/
|
|
2497
|
+
hashContractDefinition?(definition: string): string;
|
|
2498
|
+
/**
|
|
2499
|
+
* (Optional) Provides adapter-specific files and initialization code for exported applications.
|
|
2500
|
+
* This method enables adapters to bundle ecosystem-specific artifacts (e.g., Midnight contract artifacts)
|
|
2501
|
+
* into exported applications in a chain-agnostic manner.
|
|
2502
|
+
*
|
|
2503
|
+
* The method receives context including form configuration, contract schema, network configuration,
|
|
2504
|
+
* and any adapter-specific artifacts stored during contract loading.
|
|
2505
|
+
*
|
|
2506
|
+
* Example use case: Midnight adapter bundles ZK proof artifacts, contract modules, and witness code
|
|
2507
|
+
* needed for offline transaction execution in exported apps.
|
|
2508
|
+
*
|
|
2509
|
+
* @param context - Export context containing form config, schema, network, and artifacts
|
|
2510
|
+
* @returns Bootstrap configuration with files to include and initialization code, or null if not needed
|
|
2511
|
+
*/
|
|
2512
|
+
getExportBootstrapFiles?(context: AdapterExportContext): Promise<AdapterExportBootstrap | null>;
|
|
2513
|
+
/**
|
|
2514
|
+
* Optional: guide when and how large artifacts should be persisted.
|
|
2515
|
+
*/
|
|
2516
|
+
getArtifactPersistencePolicy?(): {
|
|
2517
|
+
mode: 'immediate' | 'deferredUntilFunctionSelected';
|
|
2518
|
+
sizeThresholdBytes?: number;
|
|
2519
|
+
} | undefined;
|
|
2520
|
+
/**
|
|
2521
|
+
* Optional: prepare trimmed artifacts when a function is chosen.
|
|
2522
|
+
*/
|
|
2523
|
+
prepareArtifactsForFunction?(args: {
|
|
2524
|
+
functionId: string;
|
|
2525
|
+
currentArtifacts: Record<string, unknown>;
|
|
2526
|
+
definitionOriginal?: string | null;
|
|
2527
|
+
}): Promise<{
|
|
2528
|
+
persistableArtifacts?: Record<string, unknown>;
|
|
2529
|
+
publicAssets?: Record<string, Uint8Array | Blob>;
|
|
2530
|
+
bootstrapSource?: Record<string, unknown>;
|
|
2531
|
+
}>;
|
|
2532
|
+
/**
|
|
2533
|
+
* (Optional) Returns metadata for a runtime secret field required by the ecosystem.
|
|
2534
|
+
* This allows adapters to declare that forms should include a runtime-only secret field
|
|
2535
|
+
* (not persisted, chain-specific e.g., organizer key for Midnight).
|
|
2536
|
+
*
|
|
2537
|
+
* When implemented, the builder will auto-add a 'runtimeSecret' field to forms for organizer-only functions,
|
|
2538
|
+
* and the field can be customized like any other (hidden, hardcoded, etc.).
|
|
2539
|
+
* The field value is passed to the adapter at execution time via the runtimeSecrets bag.
|
|
2540
|
+
*
|
|
2541
|
+
* @returns Binding metadata with key and display info, or undefined if not needed.
|
|
2542
|
+
*/
|
|
2543
|
+
getRuntimeFieldBinding?(): {
|
|
2544
|
+
/**
|
|
2545
|
+
* Unique key to bind the field value during execution (e.g., 'organizerSecret')
|
|
2546
|
+
*/
|
|
2547
|
+
key: string;
|
|
2548
|
+
/**
|
|
2549
|
+
* Display label for the field
|
|
2550
|
+
*/
|
|
2551
|
+
label: string;
|
|
2552
|
+
/**
|
|
2553
|
+
* Optional helper text for the field
|
|
2554
|
+
*/
|
|
2555
|
+
helperText?: string;
|
|
2556
|
+
/**
|
|
2557
|
+
* Optional adapter-specific metadata for the runtimeSecret field.
|
|
2558
|
+
* The builder does not interpret keys here; it simply persists them with the field.
|
|
2559
|
+
*/
|
|
2560
|
+
metadata?: Record<string, unknown>;
|
|
2561
|
+
/**
|
|
2562
|
+
* Optional generic configuration for an additional "property name" input that the builder
|
|
2563
|
+
* may render under the runtime secret field. This remains chain-agnostic: the adapter
|
|
2564
|
+
* specifies which metadata key to use and optional UI hints.
|
|
2565
|
+
*/
|
|
2566
|
+
propertyNameInput?: RuntimeSecretPropertyInput;
|
|
2567
|
+
} | undefined;
|
|
2568
|
+
/**
|
|
2569
|
+
* (Optional) Returns a map of function IDs to their decorations.
|
|
2570
|
+
* This allows adapters to add badges, notes, or other UI elements to specific functions.
|
|
2571
|
+
*
|
|
2572
|
+
* @returns A map of function IDs to their decorations.
|
|
2573
|
+
*/
|
|
2574
|
+
getFunctionDecorations?(): Promise<FunctionDecorationsMap | undefined>;
|
|
2575
|
+
/**
|
|
2576
|
+
* Returns network service forms (e.g., RPC, Explorer, Indexer) this adapter supports.
|
|
2577
|
+
* The UI renders these via DynamicFormField without chain-specific UI code.
|
|
2578
|
+
*/
|
|
2579
|
+
getNetworkServiceForms(): NetworkServiceForm[];
|
|
2580
|
+
/**
|
|
2581
|
+
* Optional validation for a given service configuration prior to save.
|
|
2582
|
+
*/
|
|
2583
|
+
validateNetworkServiceConfig?(serviceId: string, values: Record<string, unknown>): Promise<boolean>;
|
|
2584
|
+
/**
|
|
2585
|
+
* Optional connectivity test for a given service configuration.
|
|
2586
|
+
*/
|
|
2587
|
+
testNetworkServiceConnection?(serviceId: string, values: Record<string, unknown>): Promise<{
|
|
2588
|
+
success: boolean;
|
|
2589
|
+
latency?: number;
|
|
2590
|
+
error?: string;
|
|
2591
|
+
}>;
|
|
2592
|
+
/**
|
|
2593
|
+
* Optional accessor for the Access Control service.
|
|
2594
|
+
* Returns an AccessControlService instance if the adapter supports access control operations.
|
|
2595
|
+
*
|
|
2596
|
+
* @returns The AccessControlService instance, or undefined if not supported
|
|
2597
|
+
*/
|
|
2598
|
+
getAccessControlService?(): AccessControlService | undefined;
|
|
2599
|
+
}
|
|
2600
|
+
//# sourceMappingURL=base.d.ts.map
|
|
2601
|
+
//#endregion
|
|
2602
|
+
//#region src/adapters/contract-state.d.ts
|
|
2603
|
+
/**
|
|
2604
|
+
* Extension interface for adapters that support contract state querying
|
|
2605
|
+
*
|
|
2606
|
+
* This interface defines the capabilities needed for querying and displaying
|
|
2607
|
+
* contract state data from read-only (view/pure) functions.
|
|
2608
|
+
*/
|
|
2609
|
+
interface ContractStateCapabilities {
|
|
2610
|
+
/**
|
|
2611
|
+
* Determines if a function is a view/pure function (read-only)
|
|
2612
|
+
*
|
|
2613
|
+
* @param functionDetails - The function details
|
|
2614
|
+
* @returns True if the function is read-only
|
|
2615
|
+
*/
|
|
2616
|
+
isViewFunction(functionDetails: ContractFunction): boolean;
|
|
2617
|
+
/**
|
|
2618
|
+
* Queries a view function on a contract.
|
|
2619
|
+
* The adapter instance should be pre-configured with the necessary network context.
|
|
2620
|
+
*
|
|
2621
|
+
* @param contractAddress - The contract address
|
|
2622
|
+
* @param functionId - The function identifier
|
|
2623
|
+
* @param params - Optional parameters for the function call
|
|
2624
|
+
* @param contractSchema - Optional pre-loaded contract schema
|
|
2625
|
+
* @returns The query result, properly formatted
|
|
2626
|
+
*/
|
|
2627
|
+
queryViewFunction(contractAddress: string, functionId: string, params?: unknown[], contractSchema?: ContractSchema): Promise<unknown>;
|
|
2628
|
+
/**
|
|
2629
|
+
* Formats a function result for display
|
|
2630
|
+
*
|
|
2631
|
+
* @param result - The raw result from the contract
|
|
2632
|
+
* @param functionDetails - The function details
|
|
2633
|
+
* @returns Formatted result ready for display
|
|
2634
|
+
*/
|
|
2635
|
+
formatFunctionResult(result: unknown, functionDetails: ContractFunction): string | Record<string, unknown>;
|
|
2636
|
+
}
|
|
2637
|
+
//# sourceMappingURL=contract-state.d.ts.map
|
|
2638
|
+
//#endregion
|
|
2639
|
+
//#region src/adapters/config.d.ts
|
|
2640
|
+
/**
|
|
2641
|
+
* Types related to blockchain adapters configuration.
|
|
2642
|
+
* @packageDocumentation
|
|
2643
|
+
*/
|
|
2644
|
+
/**
|
|
2645
|
+
* Vite configuration fragments for adapters with special build requirements
|
|
2646
|
+
*/
|
|
2647
|
+
interface ViteConfigInfo {
|
|
2648
|
+
/**
|
|
2649
|
+
* Import statements needed in vite.config.ts
|
|
2650
|
+
* @example ["import wasm from 'vite-plugin-wasm';", "import topLevelAwait from 'vite-plugin-top-level-await';"]
|
|
2651
|
+
*/
|
|
2652
|
+
imports: string[];
|
|
2653
|
+
/**
|
|
2654
|
+
* Initialization code to run at the top of defineConfig
|
|
2655
|
+
* @example "const midnightConfig = getMidnightViteConfig({ wasm, topLevelAwait });"
|
|
2656
|
+
*/
|
|
2657
|
+
configInit?: string;
|
|
2658
|
+
/**
|
|
2659
|
+
* Plugin entries to add to the plugins array
|
|
2660
|
+
* @example "...midnightConfig.plugins,"
|
|
2661
|
+
*/
|
|
2662
|
+
plugins?: string;
|
|
2663
|
+
/**
|
|
2664
|
+
* Dedupe configuration
|
|
2665
|
+
* @example "dedupe: [...(midnightConfig.resolve?.dedupe || [])],"
|
|
2666
|
+
*/
|
|
2667
|
+
dedupe?: string;
|
|
2668
|
+
/**
|
|
2669
|
+
* OptimizeDeps configuration
|
|
2670
|
+
* @example { include: "...", exclude: "..." }
|
|
2671
|
+
*/
|
|
2672
|
+
optimizeDeps?: {
|
|
2673
|
+
include?: string;
|
|
2674
|
+
exclude?: string;
|
|
2675
|
+
};
|
|
2676
|
+
}
|
|
2677
|
+
/**
|
|
2678
|
+
* Configuration for blockchain adapters.
|
|
2679
|
+
* This interface defines the structure for adapter-specific configuration
|
|
2680
|
+
* including dependencies required by the adapter for exported projects.
|
|
2681
|
+
*/
|
|
2682
|
+
interface AdapterConfig {
|
|
2683
|
+
/**
|
|
2684
|
+
* Dependencies configuration for this adapter.
|
|
2685
|
+
*/
|
|
2686
|
+
dependencies: {
|
|
2687
|
+
/**
|
|
2688
|
+
* Runtime dependencies required by this adapter for an exported project.
|
|
2689
|
+
* These will be included in the `dependencies` section of the exported `package.json`.
|
|
2690
|
+
*
|
|
2691
|
+
* @example { "viem": "^2.0.0" }
|
|
2692
|
+
*/
|
|
2693
|
+
runtime: Record<string, string>;
|
|
2694
|
+
/**
|
|
2695
|
+
* Development dependencies for the adapter, usually type definitions.
|
|
2696
|
+
* These will be included in the `devDependencies` of the exported `package.json`.
|
|
2697
|
+
*
|
|
2698
|
+
* @example { "@types/react": "^18.0.0" }
|
|
2699
|
+
*/
|
|
2700
|
+
dev?: Record<string, string>;
|
|
2701
|
+
/**
|
|
2702
|
+
* Build tool dependencies required by this adapter (e.g., Vite plugins, bundler config).
|
|
2703
|
+
* These will be included in the `devDependencies` of the exported `package.json`.
|
|
2704
|
+
* Used by adapters with special build requirements (e.g., Midnight's WASM support).
|
|
2705
|
+
*
|
|
2706
|
+
* @example { "vite-plugin-wasm": "^3.3.0", "vite-plugin-top-level-await": "^1.4.4" }
|
|
2707
|
+
*/
|
|
2708
|
+
build?: Record<string, string>;
|
|
2709
|
+
};
|
|
2710
|
+
/**
|
|
2711
|
+
* Optional Vite configuration fragments for adapters with special build requirements.
|
|
2712
|
+
* When present, the export system will generate a vite.config.ts that includes these configurations.
|
|
2713
|
+
*
|
|
2714
|
+
* @example
|
|
2715
|
+
* ```typescript
|
|
2716
|
+
* viteConfig: {
|
|
2717
|
+
* imports: ["import wasm from 'vite-plugin-wasm';"],
|
|
2718
|
+
* configInit: "const config = getAdapterConfig({ wasm });",
|
|
2719
|
+
* plugins: "...config.plugins,"
|
|
2720
|
+
* }
|
|
2721
|
+
* ```
|
|
2722
|
+
*/
|
|
2723
|
+
viteConfig?: ViteConfigInfo;
|
|
2724
|
+
/**
|
|
2725
|
+
* Overrides for transitive dependencies.
|
|
2726
|
+
* These will be included in the `overrides` section of the exported `package.json`.
|
|
2727
|
+
* This is useful for resolving peer dependency conflicts (e.g., with React 19).
|
|
2728
|
+
*
|
|
2729
|
+
* @example { "use-sync-external-store": "^1.2.0" }
|
|
2730
|
+
*/
|
|
2731
|
+
overrides?: Record<string, string>;
|
|
2732
|
+
/**
|
|
2733
|
+
* Optional UI kits that can be used with this adapter.
|
|
2734
|
+
* Each UI kit can specify its own set of dependencies and overrides.
|
|
2735
|
+
*
|
|
2736
|
+
* Note: Package patches are automatically applied when the adapter is installed.
|
|
2737
|
+
* Adapters that require patches (e.g., Midnight SDK fixes) bundle them in their
|
|
2738
|
+
* package and configure pnpm.patchedDependencies in their own package.json.
|
|
2739
|
+
* No additional configuration is needed in exported apps.
|
|
2740
|
+
*/
|
|
2741
|
+
uiKits?: Record<string, {
|
|
2742
|
+
dependencies: {
|
|
2743
|
+
runtime: Record<string, string>;
|
|
2744
|
+
dev?: Record<string, string>;
|
|
2745
|
+
};
|
|
2746
|
+
/**
|
|
2747
|
+
* UI Kit-specific overrides for transitive dependencies.
|
|
2748
|
+
*/
|
|
2749
|
+
overrides?: Record<string, string>;
|
|
2750
|
+
}>;
|
|
2751
|
+
}
|
|
2752
|
+
//# sourceMappingURL=config.d.ts.map
|
|
2753
|
+
//#endregion
|
|
2754
|
+
//#region src/adapters/access-control-errors.d.ts
|
|
2755
|
+
/**
|
|
2756
|
+
* Access Control Error Types
|
|
2757
|
+
*
|
|
2758
|
+
* Chain-agnostic error classes for access control operations.
|
|
2759
|
+
* These errors can be used across any adapter (EVM, Stellar, Solana, Midnight, etc.)
|
|
2760
|
+
* that implements access control functionality.
|
|
2761
|
+
*
|
|
2762
|
+
* Each error type provides specific context for debugging and user-friendly error messages.
|
|
2763
|
+
*/
|
|
2764
|
+
/**
|
|
2765
|
+
* Base class for all Access Control errors
|
|
2766
|
+
*
|
|
2767
|
+
* This abstract class serves as the foundation for all access control-related errors.
|
|
2768
|
+
* It provides a common structure with optional contract address context.
|
|
2769
|
+
*/
|
|
2770
|
+
declare abstract class AccessControlError extends Error {
|
|
2771
|
+
readonly contractAddress?: string | undefined;
|
|
2772
|
+
/**
|
|
2773
|
+
* Creates a new AccessControlError.
|
|
2774
|
+
* @param message - Error message describing the issue
|
|
2775
|
+
* @param contractAddress - Optional contract address for context
|
|
2776
|
+
*/
|
|
2777
|
+
constructor(message: string, contractAddress?: string | undefined);
|
|
2778
|
+
}
|
|
2779
|
+
/**
|
|
2780
|
+
* Error thrown when a contract does not implement required interfaces
|
|
2781
|
+
*
|
|
2782
|
+
* This error indicates that a contract is missing necessary access control functionality
|
|
2783
|
+
* or has a partial/incompatible implementation.
|
|
2784
|
+
*
|
|
2785
|
+
* @example
|
|
2786
|
+
* ```typescript
|
|
2787
|
+
* throw new UnsupportedContractFeatures(
|
|
2788
|
+
* 'Contract missing required Ownable methods',
|
|
2789
|
+
* contractAddress,
|
|
2790
|
+
* ['transfer_ownership', 'renounce_ownership']
|
|
2791
|
+
* );
|
|
2792
|
+
* ```
|
|
2793
|
+
*
|
|
2794
|
+
* Common use cases:
|
|
2795
|
+
* - Contract missing Ownable or AccessControl methods
|
|
2796
|
+
* - Contract has partial implementation that doesn't conform to standards
|
|
2797
|
+
* - Contract is a custom access control implementation not compatible with expected interfaces
|
|
2798
|
+
*/
|
|
2799
|
+
declare class UnsupportedContractFeatures extends AccessControlError {
|
|
2800
|
+
readonly missingFeatures?: string[] | undefined;
|
|
2801
|
+
/**
|
|
2802
|
+
* Creates a new UnsupportedContractFeatures error.
|
|
2803
|
+
* @param message - Error message describing the issue
|
|
2804
|
+
* @param contractAddress - Optional contract address for context
|
|
2805
|
+
* @param missingFeatures - Optional list of missing feature names
|
|
2806
|
+
*/
|
|
2807
|
+
constructor(message: string, contractAddress?: string, missingFeatures?: string[] | undefined);
|
|
2808
|
+
}
|
|
2809
|
+
/**
|
|
2810
|
+
* Error thrown when the caller lacks required permissions for an operation
|
|
2811
|
+
*
|
|
2812
|
+
* This error indicates an authorization failure where the calling account doesn't
|
|
2813
|
+
* have the necessary permissions to execute the requested operation.
|
|
2814
|
+
*
|
|
2815
|
+
* @example
|
|
2816
|
+
* ```typescript
|
|
2817
|
+
* throw new PermissionDenied(
|
|
2818
|
+
* 'Caller is not an admin',
|
|
2819
|
+
* contractAddress,
|
|
2820
|
+
* 'ADMIN_ROLE',
|
|
2821
|
+
* callerAddress
|
|
2822
|
+
* );
|
|
2823
|
+
* ```
|
|
2824
|
+
*
|
|
2825
|
+
* Common use cases:
|
|
2826
|
+
* - Attempting to grant/revoke roles without admin rights
|
|
2827
|
+
* - Trying to transfer ownership without being the owner
|
|
2828
|
+
* - Executing operations that require specific role membership
|
|
2829
|
+
*/
|
|
2830
|
+
declare class PermissionDenied extends AccessControlError {
|
|
2831
|
+
readonly requiredRole?: string | undefined;
|
|
2832
|
+
readonly callerAddress?: string | undefined;
|
|
2833
|
+
/**
|
|
2834
|
+
* Creates a new PermissionDenied error.
|
|
2835
|
+
* @param message - Error message describing the issue
|
|
2836
|
+
* @param contractAddress - Optional contract address for context
|
|
2837
|
+
* @param requiredRole - Optional role that was required
|
|
2838
|
+
* @param callerAddress - Optional address of the caller who lacked permission
|
|
2839
|
+
*/
|
|
2840
|
+
constructor(message: string, contractAddress?: string, requiredRole?: string | undefined, callerAddress?: string | undefined);
|
|
2841
|
+
}
|
|
2842
|
+
/**
|
|
2843
|
+
* Error thrown when an indexer is required but not available
|
|
2844
|
+
*
|
|
2845
|
+
* This error indicates that an operation requires indexer support (e.g., for historical data),
|
|
2846
|
+
* but the indexer is not configured, unreachable, or not functioning properly.
|
|
2847
|
+
*
|
|
2848
|
+
* @example
|
|
2849
|
+
* ```typescript
|
|
2850
|
+
* throw new IndexerUnavailable(
|
|
2851
|
+
* 'History queries require indexer support',
|
|
2852
|
+
* contractAddress,
|
|
2853
|
+
* networkId,
|
|
2854
|
+
* indexerEndpoint
|
|
2855
|
+
* );
|
|
2856
|
+
* ```
|
|
2857
|
+
*
|
|
2858
|
+
* Common use cases:
|
|
2859
|
+
* - No indexer endpoint configured in network config
|
|
2860
|
+
* - Indexer endpoint is unreachable or returning errors
|
|
2861
|
+
* - Indexer health check fails
|
|
2862
|
+
* - Network doesn't have indexer support
|
|
2863
|
+
*/
|
|
2864
|
+
declare class IndexerUnavailable extends AccessControlError {
|
|
2865
|
+
readonly networkId?: string | undefined;
|
|
2866
|
+
readonly endpointUrl?: string | undefined;
|
|
2867
|
+
/**
|
|
2868
|
+
* Creates a new IndexerUnavailable error.
|
|
2869
|
+
* @param message - Error message describing the issue
|
|
2870
|
+
* @param contractAddress - Optional contract address for context
|
|
2871
|
+
* @param networkId - Optional network identifier
|
|
2872
|
+
* @param endpointUrl - Optional indexer endpoint URL that was unavailable
|
|
2873
|
+
*/
|
|
2874
|
+
constructor(message: string, contractAddress?: string, networkId?: string | undefined, endpointUrl?: string | undefined);
|
|
2875
|
+
}
|
|
2876
|
+
/**
|
|
2877
|
+
* Error thrown when configuration is invalid or incomplete
|
|
2878
|
+
*
|
|
2879
|
+
* This error indicates a problem with the configuration provided to access control operations,
|
|
2880
|
+
* such as invalid addresses, missing required config, or malformed parameters.
|
|
2881
|
+
*
|
|
2882
|
+
* @example
|
|
2883
|
+
* ```typescript
|
|
2884
|
+
* throw new ConfigurationInvalid(
|
|
2885
|
+
* 'Contract not registered',
|
|
2886
|
+
* contractAddress,
|
|
2887
|
+
* 'contractAddress',
|
|
2888
|
+
* providedAddress
|
|
2889
|
+
* );
|
|
2890
|
+
* ```
|
|
2891
|
+
*
|
|
2892
|
+
* Common use cases:
|
|
2893
|
+
* - Invalid contract address format
|
|
2894
|
+
* - Missing required network configuration
|
|
2895
|
+
* - Invalid role identifier
|
|
2896
|
+
* - Malformed indexer endpoint
|
|
2897
|
+
* - Contract not registered before use
|
|
2898
|
+
*/
|
|
2899
|
+
declare class ConfigurationInvalid extends AccessControlError {
|
|
2900
|
+
readonly configField?: string | undefined;
|
|
2901
|
+
readonly providedValue?: unknown | undefined;
|
|
2902
|
+
/**
|
|
2903
|
+
* Creates a new ConfigurationInvalid error.
|
|
2904
|
+
* @param message - Error message describing the issue
|
|
2905
|
+
* @param contractAddress - Optional contract address for context
|
|
2906
|
+
* @param configField - Optional name of the invalid configuration field
|
|
2907
|
+
* @param providedValue - Optional value that was invalid
|
|
2908
|
+
*/
|
|
2909
|
+
constructor(message: string, contractAddress?: string, configField?: string | undefined, providedValue?: unknown | undefined);
|
|
2910
|
+
}
|
|
2911
|
+
/**
|
|
2912
|
+
* Error thrown when an operation fails during execution
|
|
2913
|
+
*
|
|
2914
|
+
* This error indicates a runtime failure during an access control operation.
|
|
2915
|
+
* It includes the operation name and can chain the underlying cause for debugging.
|
|
2916
|
+
*
|
|
2917
|
+
* @example
|
|
2918
|
+
* ```typescript
|
|
2919
|
+
* try {
|
|
2920
|
+
* // ... operation code
|
|
2921
|
+
* } catch (err) {
|
|
2922
|
+
* throw new OperationFailed(
|
|
2923
|
+
* 'Failed to read ownership',
|
|
2924
|
+
* contractAddress,
|
|
2925
|
+
* 'readOwnership',
|
|
2926
|
+
* err as Error
|
|
2927
|
+
* );
|
|
2928
|
+
* }
|
|
2929
|
+
* ```
|
|
2930
|
+
*
|
|
2931
|
+
* Common use cases:
|
|
2932
|
+
* - Transaction assembly fails
|
|
2933
|
+
* - RPC call returns an error
|
|
2934
|
+
* - Transaction simulation fails
|
|
2935
|
+
* - On-chain read operation fails
|
|
2936
|
+
* - GraphQL query to indexer fails
|
|
2937
|
+
* - Snapshot validation fails
|
|
2938
|
+
*/
|
|
2939
|
+
declare class OperationFailed extends AccessControlError {
|
|
2940
|
+
readonly operation?: string | undefined;
|
|
2941
|
+
readonly cause?: Error | undefined;
|
|
2942
|
+
/**
|
|
2943
|
+
* Creates a new OperationFailed error.
|
|
2944
|
+
* @param message - Error message describing the issue
|
|
2945
|
+
* @param contractAddress - Optional contract address for context
|
|
2946
|
+
* @param operation - Optional name of the operation that failed
|
|
2947
|
+
* @param cause - Optional underlying error that caused the failure
|
|
2948
|
+
*/
|
|
2949
|
+
constructor(message: string, contractAddress?: string, operation?: string | undefined, cause?: Error | undefined);
|
|
2950
|
+
}
|
|
2951
|
+
//# sourceMappingURL=access-control-errors.d.ts.map
|
|
2952
|
+
//#endregion
|
|
2953
|
+
//#region src/adapters/index.d.ts
|
|
2954
|
+
/**
|
|
2955
|
+
* Combined adapter interface with all capabilities
|
|
2956
|
+
*
|
|
2957
|
+
* This type represents a full-featured adapter that implements both the base
|
|
2958
|
+
* ContractAdapter interface and additional capabilities like contract state querying.
|
|
2959
|
+
*/
|
|
2960
|
+
type FullContractAdapter = ContractAdapter & ContractStateCapabilities;
|
|
2961
|
+
//# sourceMappingURL=index.d.ts.map
|
|
2962
|
+
|
|
2963
|
+
//#endregion
|
|
2964
|
+
export { AccessControlCapabilities, AccessControlError, AccessControlService, AccessSnapshot, AdapterConfig, AdapterExportBootstrap, AdapterExportContext, AdminInfo, AdminState, AppRuntimeConfig, AvailableUiKit, BaseComponentProps, BaseNetworkConfig, BuilderFormConfigLike, CommonFormProperties, ComponentExclusionConfig, ConfigurationInvalid, Connector, ContractAdapter, ContractDefinitionComparisonResult, ContractDefinitionDifference, ContractDefinitionMetadata, ContractDefinitionValidationResult, ContractEvent, ContractFunction, ContractSchema, ContractStateCapabilities, ECOSYSTEM_WALLET_COMPONENT_KEYS, Ecosystem, EcosystemDefinition, EcosystemFeatureConfig, EcosystemInfo, EcosystemReactUiProviderProps, EcosystemSpecificReactHooks, EcosystemWalletComponentKey, EcosystemWalletComponents, EnrichedRoleAssignment, EnrichedRoleMember, EnumValue, EoaExecutionConfig, EvmNetworkConfig, ExecutionConfig, ExecutionMethodDetail, ExecutionMethodType, ExplorerApiConfig, FeatureFlags, FieldCondition, FieldTransforms, FieldType, FieldValidation, FieldValue, FormError, FormFieldType, FormLayout, FormValues, FullContractAdapter, FunctionBadge, FunctionBadgeVariant, FunctionDecoration, FunctionDecorationsMap, FunctionParameter, GlobalServiceConfigs, HistoryChangeType, HistoryEntry, HistoryQueryOptions, IndexerEndpointConfig, IndexerUnavailable, MapEntry, MidnightNetworkConfig, MultisigExecutionConfig, NativeConfigLoader, NetworkConfig, NetworkServiceConfigs, NetworkServiceForm, NetworkSpecificIndexerEndpoints, NetworkSpecificRpcEndpoints, NetworkType, OperationFailed, OperationResult, OwnershipInfo, OwnershipState, PageInfo, PaginatedHistoryResult, PendingAdminTransfer, PendingOwnershipTransfer, PermissionDenied, ProxyInfo, RelayerDetails, RelayerDetailsRich, RelayerExecutionConfig, RenderFormSchema, RoleAssignment, RoleIdentifier, RpcEndpointConfig, RuntimeSecretPropertyInput, ServiceParameterConfig, SolanaNetworkConfig, StellarNetworkConfig, SubmitButtonConfig, TransactionFormProps, TransactionStatusUpdate, TxStatus, UiKitConfiguration, UiKitName, UnsupportedContractFeatures, UserExplorerConfig, UserRpcProviderConfig, ViteConfigInfo, WalletConnectionStatus, isEnumValue, isEvmEcosystem, isEvmNetworkConfig, isMapEntry, isMapEntryArray, isMidnightEcosystem, isMidnightNetworkConfig, isSolanaEcosystem, isSolanaNetworkConfig, isStellarEcosystem, isStellarNetworkConfig, validateNetworkConfig };
|
|
2965
|
+
//# sourceMappingURL=index-BvxkLrGC.d.cts.map
|