@openzeppelin/ui-builder-adapter-evm 1.2.0 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (105) hide show
  1. package/README.md +33 -18
  2. package/dist/index.cjs +4651 -4448
  3. package/dist/index.cjs.map +1 -1
  4. package/dist/index.d.cts +12 -226
  5. package/dist/index.d.ts +12 -226
  6. package/dist/index.js +4737 -4535
  7. package/dist/index.js.map +1 -1
  8. package/package.json +7 -6
  9. package/src/__tests__/adapter-parsing.test.ts +4 -3
  10. package/src/__tests__/getDefaultServiceConfig.test.ts +185 -0
  11. package/src/__tests__/mocks/mock-network-configs.ts +1 -1
  12. package/src/__tests__/provenanceLinks.test.ts +6 -4
  13. package/src/__tests__/providerSelection.test.ts +5 -4
  14. package/src/__tests__/timeouts.test.ts +5 -3
  15. package/src/__tests__/wallet-connect.test.ts +2 -2
  16. package/src/adapter.ts +61 -107
  17. package/src/configuration/execution.ts +1 -52
  18. package/src/configuration/index.ts +2 -3
  19. package/src/configuration/network-services.ts +47 -60
  20. package/src/index.ts +22 -13
  21. package/src/networks/index.ts +2 -1
  22. package/src/networks/mainnet.ts +1 -1
  23. package/src/networks/testnet.ts +1 -1
  24. package/src/query/adapter-query.ts +72 -0
  25. package/src/query/index.ts +2 -2
  26. package/src/transaction/components/useEvmRelayerOptions.ts +5 -3
  27. package/src/transaction/index.ts +1 -5
  28. package/src/types/artifacts.ts +5 -30
  29. package/src/types/providers.ts +7 -18
  30. package/src/wallet/components/EvmWalletUiRoot.tsx +1 -1
  31. package/src/wallet/evmUiKitManager.ts +26 -129
  32. package/src/wallet/hooks/index.ts +0 -1
  33. package/src/wallet/implementation/wagmi-implementation.ts +45 -577
  34. package/src/wallet/index.ts +2 -3
  35. package/src/wallet/rainbowkit/__tests__/export-service.test.ts +1 -2
  36. package/src/wallet/rainbowkit/componentFactory.ts +10 -8
  37. package/src/wallet/rainbowkit/components.tsx +16 -133
  38. package/src/wallet/rainbowkit/index.ts +27 -5
  39. package/src/wallet/utils/__tests__/uiKitService.test.ts +5 -1
  40. package/src/wallet/utils/connection.ts +8 -52
  41. package/src/wallet/utils/index.ts +0 -2
  42. package/src/wallet/utils/uiKitService.ts +7 -3
  43. package/src/wallet/utils/walletImplementationManager.ts +5 -4
  44. package/src/wallet/utils.ts +1 -65
  45. package/src/abi/__tests__/etherscan-v2.test.ts +0 -117
  46. package/src/abi/__tests__/transformer.test.ts +0 -342
  47. package/src/abi/comparison.ts +0 -389
  48. package/src/abi/etherscan-v2.ts +0 -243
  49. package/src/abi/etherscan.ts +0 -158
  50. package/src/abi/index.ts +0 -7
  51. package/src/abi/loader.ts +0 -415
  52. package/src/abi/sourcify.ts +0 -75
  53. package/src/abi/transformer.ts +0 -163
  54. package/src/abi/types.ts +0 -101
  55. package/src/configuration/__tests__/explorer.test.ts +0 -174
  56. package/src/configuration/__tests__/rpc.test.ts +0 -176
  57. package/src/configuration/explorer.ts +0 -243
  58. package/src/configuration/rpc.ts +0 -257
  59. package/src/mapping/__tests__/field-generator.test.ts +0 -137
  60. package/src/mapping/__tests__/type-mapper.test.ts +0 -139
  61. package/src/mapping/constants.ts +0 -57
  62. package/src/mapping/field-generator.ts +0 -115
  63. package/src/mapping/index.ts +0 -4
  64. package/src/mapping/type-mapper.ts +0 -80
  65. package/src/proxy/detection.ts +0 -465
  66. package/src/query/handler.ts +0 -227
  67. package/src/query/view-checker.ts +0 -10
  68. package/src/transaction/eoa.ts +0 -98
  69. package/src/transaction/execution-strategy.ts +0 -33
  70. package/src/transaction/formatter.ts +0 -101
  71. package/src/transaction/relayer.ts +0 -380
  72. package/src/transaction/sender.ts +0 -185
  73. package/src/transform/index.ts +0 -3
  74. package/src/transform/input-parser.ts +0 -177
  75. package/src/transform/output-formatter.ts +0 -64
  76. package/src/types/__tests__/artifacts.test.ts +0 -105
  77. package/src/types.ts +0 -92
  78. package/src/utils/__tests__/artifacts.test.ts +0 -81
  79. package/src/utils/artifacts.ts +0 -30
  80. package/src/utils/formatting.ts +0 -25
  81. package/src/utils/gas.ts +0 -17
  82. package/src/utils/index.ts +0 -6
  83. package/src/utils/json.ts +0 -19
  84. package/src/utils/validation.ts +0 -10
  85. package/src/validation/eoa.ts +0 -33
  86. package/src/validation/index.ts +0 -2
  87. package/src/validation/relayer.ts +0 -13
  88. package/src/wallet/__tests__/utils.test.ts +0 -149
  89. package/src/wallet/components/account/AccountDisplay.tsx +0 -52
  90. package/src/wallet/components/connect/ConnectButton.tsx +0 -125
  91. package/src/wallet/components/connect/ConnectorDialog.tsx +0 -140
  92. package/src/wallet/components/index.ts +0 -4
  93. package/src/wallet/components/network/NetworkSwitcher.tsx +0 -90
  94. package/src/wallet/context/index.ts +0 -1
  95. package/src/wallet/context/wagmi-context.tsx +0 -7
  96. package/src/wallet/hooks/useIsWagmiProviderInitialized.ts +0 -11
  97. package/src/wallet/rainbowkit/config-generator.ts +0 -56
  98. package/src/wallet/rainbowkit/config-service.ts +0 -169
  99. package/src/wallet/rainbowkit/export-service.ts +0 -18
  100. package/src/wallet/rainbowkit/rainbowkitAssetManager.ts +0 -74
  101. package/src/wallet/rainbowkit/types.ts +0 -74
  102. package/src/wallet/rainbowkit/utils.ts +0 -96
  103. package/src/wallet/services/configResolutionService.ts +0 -65
  104. package/src/wallet/utils/SafeWagmiComponent.tsx +0 -72
  105. package/src/wallet/utils/filterWalletComponents.ts +0 -89
package/dist/index.d.cts CHANGED
@@ -1,44 +1,8 @@
1
- import { Chain, Abi, TransactionReceipt } from 'viem';
2
- import React$1 from 'react';
3
- import { EvmNetworkConfig, WalletConnectionStatus, ContractAdapter, UiKitConfiguration, NetworkServiceForm, ContractSchema, ProxyInfo, FieldType, FunctionParameter, FormFieldType, ExecutionConfig, TxStatus, TransactionStatusUpdate, RelayerDetails, RelayerDetailsRich, ExecutionMethodDetail, ContractFunction, Connector, NativeConfigLoader, EcosystemReactUiProviderProps, EcosystemSpecificReactHooks, EcosystemWalletComponents, AvailableUiKit, UserRpcProviderConfig, UserExplorerConfig, TypeMappingInfo, AdapterConfig } from '@openzeppelin/ui-types';
4
- import { RainbowKitProvider, ConnectButton } from '@rainbow-me/rainbowkit';
5
- import { Speed } from '@openzeppelin/relayer-sdk';
6
-
7
- /**
8
- * EVM Contract Definition Provider keys and ordering
9
- * Avoid magic strings by using typed constants and a union type.
10
- */
11
- declare const EvmProviderKeys: {
12
- readonly Etherscan: "etherscan";
13
- readonly Sourcify: "sourcify";
14
- };
15
- type EvmContractDefinitionProviderKey = (typeof EvmProviderKeys)[keyof typeof EvmProviderKeys];
16
-
17
- /**
18
- * EVM-specific type definitions
19
- */
20
- /**
21
- * EVM-specific network configuration with properly typed viem chain
22
- * This extends the base EvmNetworkConfig with the correct Chain type from viem
23
- */
24
- interface TypedEvmNetworkConfig extends EvmNetworkConfig {
25
- /**
26
- * Viem Chain object for this EVM network.
27
- * If provided, this will be used directly by Viem clients.
28
- * If not provided, a fallback chain object will be created.
29
- */
30
- viemChain?: Chain;
31
- }
32
- /**
33
- * Defines the structure for parameters required to execute a contract write operation via viem.
34
- */
35
- interface WriteContractParameters {
36
- address: `0x${string}`;
37
- abi: Abi;
38
- functionName: string;
39
- args: unknown[];
40
- value?: bigint;
41
- }
1
+ import { TransactionReceipt } from 'viem';
2
+ import React from 'react';
3
+ import { TypedEvmNetworkConfig, WriteContractParameters, EvmContractDefinitionProviderKey } from '@openzeppelin/ui-builder-adapter-evm-core';
4
+ export { AppInfo, EvmContractArtifacts, EvmRelayerTransactionOptions, RainbowKitConnectButtonProps, RainbowKitCustomizations, RainbowKitKitConfig, RainbowKitProviderProps, TypedEvmNetworkConfig, WriteContractParameters, abiComparisonService, extractRainbowKitCustomizations, isEvmContractArtifacts, isRainbowKitCustomizations } from '@openzeppelin/ui-builder-adapter-evm-core';
5
+ import { WalletConnectionStatus, ContractAdapter, UiKitConfiguration, NetworkServiceForm, ContractSchema, ProxyInfo, FieldType, FunctionParameter, FormFieldType, ExecutionConfig, TxStatus, TransactionStatusUpdate, RelayerDetails, RelayerDetailsRich, ExecutionMethodDetail, ContractFunction, Connector, NativeConfigLoader, EcosystemReactUiProviderProps, EcosystemSpecificReactHooks, EcosystemWalletComponents, AvailableUiKit, UserRpcProviderConfig, UserExplorerConfig, TypeMappingInfo, AdapterConfig } from '@openzeppelin/ui-types';
42
6
 
43
7
  /**
44
8
  * EVM-specific wallet connection status extending the base interface.
@@ -78,6 +42,10 @@ declare class EvmAdapter implements ContractAdapter {
78
42
  latency?: number;
79
43
  error?: string;
80
44
  }>;
45
+ /**
46
+ * @inheritdoc
47
+ */
48
+ getDefaultServiceConfig(serviceId: string): Record<string, unknown> | null;
81
49
  /**
82
50
  * @inheritdoc
83
51
  */
@@ -132,7 +100,7 @@ declare class EvmAdapter implements ContractAdapter {
132
100
  * Returns a React component for configuring EVM-specific relayer transaction options.
133
101
  * @returns The EVM relayer options component
134
102
  */
135
- getRelayerOptionsComponent(): React$1.ComponentType<{
103
+ getRelayerOptionsComponent(): React.ComponentType<{
136
104
  options: Record<string, unknown>;
137
105
  onChange: (options: Record<string, unknown>) => void;
138
106
  }> | undefined;
@@ -228,7 +196,7 @@ declare class EvmAdapter implements ContractAdapter {
228
196
  /**
229
197
  * @inheritdoc
230
198
  */
231
- getEcosystemReactUiContextProvider(): React$1.ComponentType<EcosystemReactUiProviderProps> | undefined;
199
+ getEcosystemReactUiContextProvider(): React.ComponentType<EcosystemReactUiProviderProps> | undefined;
232
200
  /**
233
201
  * @inheritdoc
234
202
  */
@@ -313,62 +281,6 @@ declare class EvmAdapter implements ContractAdapter {
313
281
  getTypeMappingInfo(): TypeMappingInfo;
314
282
  }
315
283
 
316
- /**
317
- * Custom RainbowKit configuration types for enhanced UI control
318
- */
319
- /**
320
- * Re-export RainbowKit's native types for ConnectButton props
321
- * This ensures we use the exact same types that RainbowKit expects,
322
- * reducing maintenance burden and letting RainbowKit handle type validation
323
- */
324
-
325
- /**
326
- * Extract the `AppInfo` type from the RainbowKitProvider's props.
327
- * This is the canonical way to get the type for the `appInfo` object.
328
- */
329
- type AppInfo = React.ComponentProps<typeof RainbowKitProvider>['appInfo'];
330
- /**
331
- * Extract the props type from RainbowKit's ConnectButton component
332
- * This gives us the exact same types that RainbowKit uses internally
333
- */
334
- type RainbowKitConnectButtonProps = React.ComponentProps<typeof ConnectButton>;
335
- /**
336
- * Represents the props expected by the RainbowKitProvider component.
337
- * It uses a nested `appInfo` object.
338
- */
339
- interface RainbowKitProviderProps {
340
- appInfo?: AppInfo;
341
- [key: string]: unknown;
342
- }
343
- /**
344
- * Represents the shape of the `kitConfig` object we use internally when the
345
- * selected kit is RainbowKit. It has a flat structure for `appName` and `learnMoreUrl`
346
- * for easier handling in our builder app, and can also contain pre-existing providerProps.
347
- */
348
- type RainbowKitKitConfig = Partial<AppInfo> & {
349
- providerProps?: RainbowKitProviderProps;
350
- [key: string]: unknown;
351
- };
352
- /**
353
- * Custom UI configuration that uses RainbowKit's native types
354
- * This extends our configuration system while leveraging RainbowKit's own type definitions
355
- */
356
- interface RainbowKitCustomizations {
357
- /**
358
- * Configuration for the RainbowKit ConnectButton component
359
- * Uses RainbowKit's native prop types for type safety and compatibility
360
- */
361
- connectButton?: Partial<RainbowKitConnectButtonProps>;
362
- }
363
- /**
364
- * Type guard to check if an object contains RainbowKit customizations
365
- */
366
- declare function isRainbowKitCustomizations(obj: unknown): obj is RainbowKitCustomizations;
367
- /**
368
- * Utility to extract RainbowKit customizations from a kit config
369
- */
370
- declare function extractRainbowKitCustomizations(kitConfig: Record<string, unknown> | undefined): RainbowKitCustomizations | undefined;
371
-
372
284
  declare const ethereumMainnet: TypedEvmNetworkConfig;
373
285
  declare const arbitrumMainnet: TypedEvmNetworkConfig;
374
286
  declare const polygonMainnet: TypedEvmNetworkConfig;
@@ -407,130 +319,4 @@ declare const evmNetworks: TypedEvmNetworkConfig[];
407
319
 
408
320
  declare const evmAdapterConfig: AdapterConfig;
409
321
 
410
- /**
411
- * EVM-specific transaction options for the OpenZeppelin Relayer.
412
- * These options map directly to the EvmTransactionRequest parameters in the SDK.
413
- */
414
- interface EvmRelayerTransactionOptions {
415
- speed?: Speed;
416
- gasLimit?: number;
417
- gasPrice?: number;
418
- maxFeePerGas?: number;
419
- maxPriorityFeePerGas?: number;
420
- validUntil?: string;
421
- }
422
-
423
- /**
424
- * EVM-specific contract artifacts interface
425
- * Defines the structure of data needed to load EVM contracts
426
- */
427
-
428
- interface EvmContractArtifacts {
429
- /** The deployed contract address (required) */
430
- contractAddress: string;
431
- /** Optional manual ABI JSON string (for unverified contracts) */
432
- contractDefinition?: string;
433
- /** Optional proxy detection configuration */
434
- __proxyDetectionOptions?: {
435
- /** Skip automatic proxy detection */
436
- skipProxyDetection?: boolean;
437
- };
438
- /** Optional forced provider for this load attempt (session-scoped override) */
439
- __forcedProvider?: EvmContractDefinitionProviderKey;
440
- }
441
- /**
442
- * Type guard to check if an object matches EvmContractArtifacts structure
443
- */
444
- declare function isEvmContractArtifacts(obj: unknown): obj is EvmContractArtifacts;
445
-
446
- /**
447
- * EVM-specific ABI types for comparison and validation
448
- * Uses viem's Abi type as the foundation for type safety
449
- */
450
-
451
- /**
452
- * Result of comparing two ABIs
453
- */
454
- interface AbiComparisonResult {
455
- /** Whether the ABIs are identical after normalization */
456
- identical: boolean;
457
- /** List of differences found between the ABIs */
458
- differences: AbiDifference[];
459
- /** Overall severity of the changes */
460
- severity: 'none' | 'minor' | 'major' | 'breaking';
461
- /** Human-readable summary of the comparison */
462
- summary: string;
463
- }
464
- /**
465
- * Represents a single difference between two ABIs
466
- */
467
- interface AbiDifference {
468
- /** Type of change */
469
- type: 'added' | 'removed' | 'modified';
470
- /** Which section of the ABI was affected */
471
- section: 'function' | 'event' | 'constructor' | 'error' | 'fallback' | 'receive';
472
- /** Name of the affected item (or type if no name) */
473
- name: string;
474
- /** Detailed description of the change */
475
- details: string;
476
- /** Impact level of this change */
477
- impact: 'low' | 'medium' | 'high';
478
- /** Signature before the change (for removed/modified) */
479
- oldSignature?: string;
480
- /** Signature after the change (for added/modified) */
481
- newSignature?: string;
482
- }
483
- /**
484
- * Result of validating an ABI structure
485
- */
486
- interface AbiValidationResult {
487
- /** Whether the ABI is structurally valid */
488
- valid: boolean;
489
- /** List of validation errors found */
490
- errors: string[];
491
- /** List of validation warnings */
492
- warnings: string[];
493
- /** Normalized ABI if validation passed */
494
- normalizedAbi?: Abi;
495
- }
496
-
497
- /**
498
- * ABI comparison service for EVM contracts
499
- * Provides detailed analysis of differences between ABIs
500
- */
501
-
502
- /**
503
- * Service for comparing and validating EVM ABIs
504
- */
505
- declare class AbiComparisonService {
506
- /**
507
- * Compares two ABIs and returns detailed difference analysis
508
- */
509
- compareAbis(abi1: string, abi2: string): AbiComparisonResult;
510
- /**
511
- * Validates ABI structure and format
512
- */
513
- validateAbi(abiString: string): AbiValidationResult;
514
- /**
515
- * Creates deterministic hash of ABI for quick comparison
516
- */
517
- hashAbi(abiString: string): string;
518
- /**
519
- * Normalizes ABI for consistent comparison
520
- */
521
- private normalizeAbi;
522
- /**
523
- * Finds detailed differences between two normalized ABIs
524
- */
525
- private findDifferences;
526
- private createAbiMap;
527
- private generateItemKey;
528
- private generateSignature;
529
- private itemsEqual;
530
- private calculateImpact;
531
- private calculateSeverity;
532
- private generateSummary;
533
- }
534
- declare const abiComparisonService: AbiComparisonService;
535
-
536
- export { type AppInfo, EvmAdapter, type EvmContractArtifacts, type EvmRelayerTransactionOptions, type RainbowKitConnectButtonProps, type RainbowKitCustomizations, type RainbowKitKitConfig, type RainbowKitProviderProps, type TypedEvmNetworkConfig, type WriteContractParameters, abiComparisonService, arbitrumMainnet, arbitrumSepolia, avalancheFuji, avalancheMainnet, baseMainnet, baseSepolia, bscMainnet, bscTestnet, ethereumMainnet, ethereumSepolia, evmAdapterConfig, evmMainnetNetworks, evmNetworks, evmTestnetNetworks, extractRainbowKitCustomizations, isEvmContractArtifacts, isRainbowKitCustomizations, lineaMainnet, lineaSepolia, optimismMainnet, optimismSepolia, polygonAmoy, polygonMainnet, polygonZkEvmCardona, polygonZkEvmMainnet, scrollMainnet, scrollSepolia, zkSyncEraMainnet, zksyncSepoliaTestnet };
322
+ export { EvmAdapter, arbitrumMainnet, arbitrumSepolia, avalancheFuji, avalancheMainnet, baseMainnet, baseSepolia, bscMainnet, bscTestnet, ethereumMainnet, ethereumSepolia, evmAdapterConfig, evmMainnetNetworks, evmNetworks, evmTestnetNetworks, lineaMainnet, lineaSepolia, optimismMainnet, optimismSepolia, polygonAmoy, polygonMainnet, polygonZkEvmCardona, polygonZkEvmMainnet, scrollMainnet, scrollSepolia, zkSyncEraMainnet, zksyncSepoliaTestnet };
package/dist/index.d.ts CHANGED
@@ -1,44 +1,8 @@
1
- import { Chain, Abi, TransactionReceipt } from 'viem';
2
- import React$1 from 'react';
3
- import { EvmNetworkConfig, WalletConnectionStatus, ContractAdapter, UiKitConfiguration, NetworkServiceForm, ContractSchema, ProxyInfo, FieldType, FunctionParameter, FormFieldType, ExecutionConfig, TxStatus, TransactionStatusUpdate, RelayerDetails, RelayerDetailsRich, ExecutionMethodDetail, ContractFunction, Connector, NativeConfigLoader, EcosystemReactUiProviderProps, EcosystemSpecificReactHooks, EcosystemWalletComponents, AvailableUiKit, UserRpcProviderConfig, UserExplorerConfig, TypeMappingInfo, AdapterConfig } from '@openzeppelin/ui-types';
4
- import { RainbowKitProvider, ConnectButton } from '@rainbow-me/rainbowkit';
5
- import { Speed } from '@openzeppelin/relayer-sdk';
6
-
7
- /**
8
- * EVM Contract Definition Provider keys and ordering
9
- * Avoid magic strings by using typed constants and a union type.
10
- */
11
- declare const EvmProviderKeys: {
12
- readonly Etherscan: "etherscan";
13
- readonly Sourcify: "sourcify";
14
- };
15
- type EvmContractDefinitionProviderKey = (typeof EvmProviderKeys)[keyof typeof EvmProviderKeys];
16
-
17
- /**
18
- * EVM-specific type definitions
19
- */
20
- /**
21
- * EVM-specific network configuration with properly typed viem chain
22
- * This extends the base EvmNetworkConfig with the correct Chain type from viem
23
- */
24
- interface TypedEvmNetworkConfig extends EvmNetworkConfig {
25
- /**
26
- * Viem Chain object for this EVM network.
27
- * If provided, this will be used directly by Viem clients.
28
- * If not provided, a fallback chain object will be created.
29
- */
30
- viemChain?: Chain;
31
- }
32
- /**
33
- * Defines the structure for parameters required to execute a contract write operation via viem.
34
- */
35
- interface WriteContractParameters {
36
- address: `0x${string}`;
37
- abi: Abi;
38
- functionName: string;
39
- args: unknown[];
40
- value?: bigint;
41
- }
1
+ import { TransactionReceipt } from 'viem';
2
+ import React from 'react';
3
+ import { TypedEvmNetworkConfig, WriteContractParameters, EvmContractDefinitionProviderKey } from '@openzeppelin/ui-builder-adapter-evm-core';
4
+ export { AppInfo, EvmContractArtifacts, EvmRelayerTransactionOptions, RainbowKitConnectButtonProps, RainbowKitCustomizations, RainbowKitKitConfig, RainbowKitProviderProps, TypedEvmNetworkConfig, WriteContractParameters, abiComparisonService, extractRainbowKitCustomizations, isEvmContractArtifacts, isRainbowKitCustomizations } from '@openzeppelin/ui-builder-adapter-evm-core';
5
+ import { WalletConnectionStatus, ContractAdapter, UiKitConfiguration, NetworkServiceForm, ContractSchema, ProxyInfo, FieldType, FunctionParameter, FormFieldType, ExecutionConfig, TxStatus, TransactionStatusUpdate, RelayerDetails, RelayerDetailsRich, ExecutionMethodDetail, ContractFunction, Connector, NativeConfigLoader, EcosystemReactUiProviderProps, EcosystemSpecificReactHooks, EcosystemWalletComponents, AvailableUiKit, UserRpcProviderConfig, UserExplorerConfig, TypeMappingInfo, AdapterConfig } from '@openzeppelin/ui-types';
42
6
 
43
7
  /**
44
8
  * EVM-specific wallet connection status extending the base interface.
@@ -78,6 +42,10 @@ declare class EvmAdapter implements ContractAdapter {
78
42
  latency?: number;
79
43
  error?: string;
80
44
  }>;
45
+ /**
46
+ * @inheritdoc
47
+ */
48
+ getDefaultServiceConfig(serviceId: string): Record<string, unknown> | null;
81
49
  /**
82
50
  * @inheritdoc
83
51
  */
@@ -132,7 +100,7 @@ declare class EvmAdapter implements ContractAdapter {
132
100
  * Returns a React component for configuring EVM-specific relayer transaction options.
133
101
  * @returns The EVM relayer options component
134
102
  */
135
- getRelayerOptionsComponent(): React$1.ComponentType<{
103
+ getRelayerOptionsComponent(): React.ComponentType<{
136
104
  options: Record<string, unknown>;
137
105
  onChange: (options: Record<string, unknown>) => void;
138
106
  }> | undefined;
@@ -228,7 +196,7 @@ declare class EvmAdapter implements ContractAdapter {
228
196
  /**
229
197
  * @inheritdoc
230
198
  */
231
- getEcosystemReactUiContextProvider(): React$1.ComponentType<EcosystemReactUiProviderProps> | undefined;
199
+ getEcosystemReactUiContextProvider(): React.ComponentType<EcosystemReactUiProviderProps> | undefined;
232
200
  /**
233
201
  * @inheritdoc
234
202
  */
@@ -313,62 +281,6 @@ declare class EvmAdapter implements ContractAdapter {
313
281
  getTypeMappingInfo(): TypeMappingInfo;
314
282
  }
315
283
 
316
- /**
317
- * Custom RainbowKit configuration types for enhanced UI control
318
- */
319
- /**
320
- * Re-export RainbowKit's native types for ConnectButton props
321
- * This ensures we use the exact same types that RainbowKit expects,
322
- * reducing maintenance burden and letting RainbowKit handle type validation
323
- */
324
-
325
- /**
326
- * Extract the `AppInfo` type from the RainbowKitProvider's props.
327
- * This is the canonical way to get the type for the `appInfo` object.
328
- */
329
- type AppInfo = React.ComponentProps<typeof RainbowKitProvider>['appInfo'];
330
- /**
331
- * Extract the props type from RainbowKit's ConnectButton component
332
- * This gives us the exact same types that RainbowKit uses internally
333
- */
334
- type RainbowKitConnectButtonProps = React.ComponentProps<typeof ConnectButton>;
335
- /**
336
- * Represents the props expected by the RainbowKitProvider component.
337
- * It uses a nested `appInfo` object.
338
- */
339
- interface RainbowKitProviderProps {
340
- appInfo?: AppInfo;
341
- [key: string]: unknown;
342
- }
343
- /**
344
- * Represents the shape of the `kitConfig` object we use internally when the
345
- * selected kit is RainbowKit. It has a flat structure for `appName` and `learnMoreUrl`
346
- * for easier handling in our builder app, and can also contain pre-existing providerProps.
347
- */
348
- type RainbowKitKitConfig = Partial<AppInfo> & {
349
- providerProps?: RainbowKitProviderProps;
350
- [key: string]: unknown;
351
- };
352
- /**
353
- * Custom UI configuration that uses RainbowKit's native types
354
- * This extends our configuration system while leveraging RainbowKit's own type definitions
355
- */
356
- interface RainbowKitCustomizations {
357
- /**
358
- * Configuration for the RainbowKit ConnectButton component
359
- * Uses RainbowKit's native prop types for type safety and compatibility
360
- */
361
- connectButton?: Partial<RainbowKitConnectButtonProps>;
362
- }
363
- /**
364
- * Type guard to check if an object contains RainbowKit customizations
365
- */
366
- declare function isRainbowKitCustomizations(obj: unknown): obj is RainbowKitCustomizations;
367
- /**
368
- * Utility to extract RainbowKit customizations from a kit config
369
- */
370
- declare function extractRainbowKitCustomizations(kitConfig: Record<string, unknown> | undefined): RainbowKitCustomizations | undefined;
371
-
372
284
  declare const ethereumMainnet: TypedEvmNetworkConfig;
373
285
  declare const arbitrumMainnet: TypedEvmNetworkConfig;
374
286
  declare const polygonMainnet: TypedEvmNetworkConfig;
@@ -407,130 +319,4 @@ declare const evmNetworks: TypedEvmNetworkConfig[];
407
319
 
408
320
  declare const evmAdapterConfig: AdapterConfig;
409
321
 
410
- /**
411
- * EVM-specific transaction options for the OpenZeppelin Relayer.
412
- * These options map directly to the EvmTransactionRequest parameters in the SDK.
413
- */
414
- interface EvmRelayerTransactionOptions {
415
- speed?: Speed;
416
- gasLimit?: number;
417
- gasPrice?: number;
418
- maxFeePerGas?: number;
419
- maxPriorityFeePerGas?: number;
420
- validUntil?: string;
421
- }
422
-
423
- /**
424
- * EVM-specific contract artifacts interface
425
- * Defines the structure of data needed to load EVM contracts
426
- */
427
-
428
- interface EvmContractArtifacts {
429
- /** The deployed contract address (required) */
430
- contractAddress: string;
431
- /** Optional manual ABI JSON string (for unverified contracts) */
432
- contractDefinition?: string;
433
- /** Optional proxy detection configuration */
434
- __proxyDetectionOptions?: {
435
- /** Skip automatic proxy detection */
436
- skipProxyDetection?: boolean;
437
- };
438
- /** Optional forced provider for this load attempt (session-scoped override) */
439
- __forcedProvider?: EvmContractDefinitionProviderKey;
440
- }
441
- /**
442
- * Type guard to check if an object matches EvmContractArtifacts structure
443
- */
444
- declare function isEvmContractArtifacts(obj: unknown): obj is EvmContractArtifacts;
445
-
446
- /**
447
- * EVM-specific ABI types for comparison and validation
448
- * Uses viem's Abi type as the foundation for type safety
449
- */
450
-
451
- /**
452
- * Result of comparing two ABIs
453
- */
454
- interface AbiComparisonResult {
455
- /** Whether the ABIs are identical after normalization */
456
- identical: boolean;
457
- /** List of differences found between the ABIs */
458
- differences: AbiDifference[];
459
- /** Overall severity of the changes */
460
- severity: 'none' | 'minor' | 'major' | 'breaking';
461
- /** Human-readable summary of the comparison */
462
- summary: string;
463
- }
464
- /**
465
- * Represents a single difference between two ABIs
466
- */
467
- interface AbiDifference {
468
- /** Type of change */
469
- type: 'added' | 'removed' | 'modified';
470
- /** Which section of the ABI was affected */
471
- section: 'function' | 'event' | 'constructor' | 'error' | 'fallback' | 'receive';
472
- /** Name of the affected item (or type if no name) */
473
- name: string;
474
- /** Detailed description of the change */
475
- details: string;
476
- /** Impact level of this change */
477
- impact: 'low' | 'medium' | 'high';
478
- /** Signature before the change (for removed/modified) */
479
- oldSignature?: string;
480
- /** Signature after the change (for added/modified) */
481
- newSignature?: string;
482
- }
483
- /**
484
- * Result of validating an ABI structure
485
- */
486
- interface AbiValidationResult {
487
- /** Whether the ABI is structurally valid */
488
- valid: boolean;
489
- /** List of validation errors found */
490
- errors: string[];
491
- /** List of validation warnings */
492
- warnings: string[];
493
- /** Normalized ABI if validation passed */
494
- normalizedAbi?: Abi;
495
- }
496
-
497
- /**
498
- * ABI comparison service for EVM contracts
499
- * Provides detailed analysis of differences between ABIs
500
- */
501
-
502
- /**
503
- * Service for comparing and validating EVM ABIs
504
- */
505
- declare class AbiComparisonService {
506
- /**
507
- * Compares two ABIs and returns detailed difference analysis
508
- */
509
- compareAbis(abi1: string, abi2: string): AbiComparisonResult;
510
- /**
511
- * Validates ABI structure and format
512
- */
513
- validateAbi(abiString: string): AbiValidationResult;
514
- /**
515
- * Creates deterministic hash of ABI for quick comparison
516
- */
517
- hashAbi(abiString: string): string;
518
- /**
519
- * Normalizes ABI for consistent comparison
520
- */
521
- private normalizeAbi;
522
- /**
523
- * Finds detailed differences between two normalized ABIs
524
- */
525
- private findDifferences;
526
- private createAbiMap;
527
- private generateItemKey;
528
- private generateSignature;
529
- private itemsEqual;
530
- private calculateImpact;
531
- private calculateSeverity;
532
- private generateSummary;
533
- }
534
- declare const abiComparisonService: AbiComparisonService;
535
-
536
- export { type AppInfo, EvmAdapter, type EvmContractArtifacts, type EvmRelayerTransactionOptions, type RainbowKitConnectButtonProps, type RainbowKitCustomizations, type RainbowKitKitConfig, type RainbowKitProviderProps, type TypedEvmNetworkConfig, type WriteContractParameters, abiComparisonService, arbitrumMainnet, arbitrumSepolia, avalancheFuji, avalancheMainnet, baseMainnet, baseSepolia, bscMainnet, bscTestnet, ethereumMainnet, ethereumSepolia, evmAdapterConfig, evmMainnetNetworks, evmNetworks, evmTestnetNetworks, extractRainbowKitCustomizations, isEvmContractArtifacts, isRainbowKitCustomizations, lineaMainnet, lineaSepolia, optimismMainnet, optimismSepolia, polygonAmoy, polygonMainnet, polygonZkEvmCardona, polygonZkEvmMainnet, scrollMainnet, scrollSepolia, zkSyncEraMainnet, zksyncSepoliaTestnet };
322
+ export { EvmAdapter, arbitrumMainnet, arbitrumSepolia, avalancheFuji, avalancheMainnet, baseMainnet, baseSepolia, bscMainnet, bscTestnet, ethereumMainnet, ethereumSepolia, evmAdapterConfig, evmMainnetNetworks, evmNetworks, evmTestnetNetworks, lineaMainnet, lineaSepolia, optimismMainnet, optimismSepolia, polygonAmoy, polygonMainnet, polygonZkEvmCardona, polygonZkEvmMainnet, scrollMainnet, scrollSepolia, zkSyncEraMainnet, zksyncSepoliaTestnet };