@openzeppelin/ui-builder-adapter-evm 1.5.0 → 1.7.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/dist/index.cjs +3392 -516
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +29 -44
- package/dist/index.d.ts +29 -44
- package/dist/index.js +3339 -461
- package/dist/index.js.map +1 -1
- package/dist/metadata.cjs +42 -0
- package/dist/metadata.cjs.map +1 -0
- package/dist/metadata.d.cts +5 -0
- package/dist/metadata.d.ts +5 -0
- package/dist/metadata.js +17 -0
- package/dist/metadata.js.map +1 -0
- package/dist/networks.cjs +654 -0
- package/dist/networks.cjs.map +1 -0
- package/dist/networks.d.cts +12 -0
- package/dist/networks.d.ts +12 -0
- package/dist/networks.js +649 -0
- package/dist/networks.js.map +1 -0
- package/dist/testnet-kBf1DKlb.d.cts +252 -0
- package/dist/testnet-kBf1DKlb.d.ts +252 -0
- package/package.json +15 -5
- package/src/__tests__/getDefaultServiceConfig.test.ts +1 -1
- package/src/adapter.ts +46 -0
- package/src/configuration/network-services.ts +30 -1
- package/src/index.ts +19 -13
- package/src/metadata.ts +16 -0
- package/src/networks/mainnet.ts +11 -0
- package/src/networks/testnet.ts +12 -0
- package/src/networks.ts +2 -0
package/dist/index.d.cts
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
|
+
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, AccessControlService, TypeMappingInfo, EcosystemExport } from '@openzeppelin/ui-types';
|
|
2
|
+
export { ecosystemMetadata } from './metadata.cjs';
|
|
1
3
|
import { TransactionReceipt } from 'viem';
|
|
2
|
-
import
|
|
3
|
-
import { TypedEvmNetworkConfig, WriteContractParameters, EvmContractDefinitionProviderKey } from '
|
|
4
|
-
export { AppInfo, EvmContractArtifacts, EvmRelayerTransactionOptions, RainbowKitConnectButtonProps, RainbowKitCustomizations, RainbowKitKitConfig, RainbowKitProviderProps,
|
|
5
|
-
import
|
|
4
|
+
import React__default from 'react';
|
|
5
|
+
import { T as TypedEvmNetworkConfig, W as WriteContractParameters, E as EvmContractDefinitionProviderKey } from './testnet-kBf1DKlb.cjs';
|
|
6
|
+
export { A as AppInfo, a as EvmContractArtifacts, b as EvmRelayerTransactionOptions, R as RainbowKitConnectButtonProps, c as RainbowKitCustomizations, d as RainbowKitKitConfig, e as RainbowKitProviderProps, f as abiComparisonService, g as arbitrumMainnet, h as arbitrumSepolia, i as avalancheFuji, j as avalancheMainnet, k as baseMainnet, l as baseSepolia, m as bscMainnet, n as bscTestnet, o as ethereumMainnet, p as ethereumSepolia, q as extractRainbowKitCustomizations, r as isEvmContractArtifacts, s as isRainbowKitCustomizations, t as lineaMainnet, u as lineaSepolia, v as optimismMainnet, w as optimismSepolia, x as polygonAmoy, y as polygonMainnet, z as polygonZkEvmCardona, B as polygonZkEvmMainnet, C as scrollMainnet, D as scrollSepolia, F as zkSyncEraMainnet, G as zksyncSepoliaTestnet } from './testnet-kBf1DKlb.cjs';
|
|
7
|
+
import '@openzeppelin/relayer-sdk';
|
|
8
|
+
import '@rainbow-me/rainbowkit';
|
|
6
9
|
|
|
7
10
|
/**
|
|
8
11
|
* EVM-specific wallet connection status extending the base interface.
|
|
@@ -25,6 +28,12 @@ interface EvmWalletConnectionStatus extends WalletConnectionStatus {
|
|
|
25
28
|
declare class EvmAdapter implements ContractAdapter {
|
|
26
29
|
readonly networkConfig: TypedEvmNetworkConfig;
|
|
27
30
|
readonly initialAppServiceKitName: UiKitConfiguration['kitName'];
|
|
31
|
+
/**
|
|
32
|
+
* Lazily initialized access control service (NFR-004).
|
|
33
|
+
* Created on the first call to `getAccessControlService()` to avoid
|
|
34
|
+
* unnecessary initialization overhead when access control is not used.
|
|
35
|
+
*/
|
|
36
|
+
private accessControlService;
|
|
28
37
|
constructor(networkConfig: TypedEvmNetworkConfig);
|
|
29
38
|
/**
|
|
30
39
|
* @inheritdoc
|
|
@@ -100,7 +109,7 @@ declare class EvmAdapter implements ContractAdapter {
|
|
|
100
109
|
* Returns a React component for configuring EVM-specific relayer transaction options.
|
|
101
110
|
* @returns The EVM relayer options component
|
|
102
111
|
*/
|
|
103
|
-
getRelayerOptionsComponent():
|
|
112
|
+
getRelayerOptionsComponent(): React__default.ComponentType<{
|
|
104
113
|
options: Record<string, unknown>;
|
|
105
114
|
onChange: (options: Record<string, unknown>) => void;
|
|
106
115
|
}> | undefined;
|
|
@@ -196,7 +205,7 @@ declare class EvmAdapter implements ContractAdapter {
|
|
|
196
205
|
/**
|
|
197
206
|
* @inheritdoc
|
|
198
207
|
*/
|
|
199
|
-
getEcosystemReactUiContextProvider():
|
|
208
|
+
getEcosystemReactUiContextProvider(): React__default.ComponentType<EcosystemReactUiProviderProps> | undefined;
|
|
200
209
|
/**
|
|
201
210
|
* @inheritdoc
|
|
202
211
|
*/
|
|
@@ -275,48 +284,24 @@ declare class EvmAdapter implements ContractAdapter {
|
|
|
275
284
|
* @inheritdoc
|
|
276
285
|
*/
|
|
277
286
|
hashContractDefinition(definition: string): string;
|
|
287
|
+
/**
|
|
288
|
+
* @inheritdoc
|
|
289
|
+
*
|
|
290
|
+
* Returns a lazily initialized `EvmAccessControlService` instance.
|
|
291
|
+
* The service is created on first call with an `executeTransaction` callback
|
|
292
|
+
* that wraps `signAndBroadcast`, decoupling the access control module from
|
|
293
|
+
* wallet/signing infrastructure.
|
|
294
|
+
*
|
|
295
|
+
* @returns The AccessControlService for this adapter's network
|
|
296
|
+
* @see research.md §R9 — Service Lifecycle and Transaction Execution
|
|
297
|
+
*/
|
|
298
|
+
getAccessControlService(): AccessControlService;
|
|
278
299
|
/**
|
|
279
300
|
* @inheritdoc
|
|
280
301
|
*/
|
|
281
302
|
getTypeMappingInfo(): TypeMappingInfo;
|
|
282
303
|
}
|
|
283
304
|
|
|
284
|
-
declare const
|
|
285
|
-
declare const arbitrumMainnet: TypedEvmNetworkConfig;
|
|
286
|
-
declare const polygonMainnet: TypedEvmNetworkConfig;
|
|
287
|
-
declare const polygonZkEvmMainnet: TypedEvmNetworkConfig;
|
|
288
|
-
declare const baseMainnet: TypedEvmNetworkConfig;
|
|
289
|
-
declare const bscMainnet: TypedEvmNetworkConfig;
|
|
290
|
-
declare const optimismMainnet: TypedEvmNetworkConfig;
|
|
291
|
-
declare const avalancheMainnet: TypedEvmNetworkConfig;
|
|
292
|
-
declare const zkSyncEraMainnet: TypedEvmNetworkConfig;
|
|
293
|
-
declare const scrollMainnet: TypedEvmNetworkConfig;
|
|
294
|
-
declare const lineaMainnet: TypedEvmNetworkConfig;
|
|
295
|
-
|
|
296
|
-
declare const ethereumSepolia: TypedEvmNetworkConfig;
|
|
297
|
-
declare const arbitrumSepolia: TypedEvmNetworkConfig;
|
|
298
|
-
declare const polygonAmoy: TypedEvmNetworkConfig;
|
|
299
|
-
declare const polygonZkEvmCardona: TypedEvmNetworkConfig;
|
|
300
|
-
declare const baseSepolia: TypedEvmNetworkConfig;
|
|
301
|
-
declare const bscTestnet: TypedEvmNetworkConfig;
|
|
302
|
-
declare const optimismSepolia: TypedEvmNetworkConfig;
|
|
303
|
-
declare const avalancheFuji: TypedEvmNetworkConfig;
|
|
304
|
-
declare const zksyncSepoliaTestnet: TypedEvmNetworkConfig;
|
|
305
|
-
declare const scrollSepolia: TypedEvmNetworkConfig;
|
|
306
|
-
declare const lineaSepolia: TypedEvmNetworkConfig;
|
|
307
|
-
|
|
308
|
-
declare const evmMainnetNetworks: TypedEvmNetworkConfig[];
|
|
309
|
-
declare const evmTestnetNetworks: TypedEvmNetworkConfig[];
|
|
310
|
-
declare const evmNetworks: TypedEvmNetworkConfig[];
|
|
311
|
-
|
|
312
|
-
/**
|
|
313
|
-
* Configuration for the EVM adapter
|
|
314
|
-
*
|
|
315
|
-
* This file defines the dependencies required by the EVM adapter
|
|
316
|
-
* when generating exported projects. It follows the AdapterConfig
|
|
317
|
-
* interface to provide a structured approach to dependency management.
|
|
318
|
-
*/
|
|
319
|
-
|
|
320
|
-
declare const evmAdapterConfig: AdapterConfig;
|
|
305
|
+
declare const ecosystemDefinition: EcosystemExport;
|
|
321
306
|
|
|
322
|
-
export { EvmAdapter,
|
|
307
|
+
export { EvmAdapter, TypedEvmNetworkConfig, WriteContractParameters, ecosystemDefinition };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
|
+
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, AccessControlService, TypeMappingInfo, EcosystemExport } from '@openzeppelin/ui-types';
|
|
2
|
+
export { ecosystemMetadata } from './metadata.js';
|
|
1
3
|
import { TransactionReceipt } from 'viem';
|
|
2
|
-
import
|
|
3
|
-
import { TypedEvmNetworkConfig, WriteContractParameters, EvmContractDefinitionProviderKey } from '
|
|
4
|
-
export { AppInfo, EvmContractArtifacts, EvmRelayerTransactionOptions, RainbowKitConnectButtonProps, RainbowKitCustomizations, RainbowKitKitConfig, RainbowKitProviderProps,
|
|
5
|
-
import
|
|
4
|
+
import React__default from 'react';
|
|
5
|
+
import { T as TypedEvmNetworkConfig, W as WriteContractParameters, E as EvmContractDefinitionProviderKey } from './testnet-kBf1DKlb.js';
|
|
6
|
+
export { A as AppInfo, a as EvmContractArtifacts, b as EvmRelayerTransactionOptions, R as RainbowKitConnectButtonProps, c as RainbowKitCustomizations, d as RainbowKitKitConfig, e as RainbowKitProviderProps, f as abiComparisonService, g as arbitrumMainnet, h as arbitrumSepolia, i as avalancheFuji, j as avalancheMainnet, k as baseMainnet, l as baseSepolia, m as bscMainnet, n as bscTestnet, o as ethereumMainnet, p as ethereumSepolia, q as extractRainbowKitCustomizations, r as isEvmContractArtifacts, s as isRainbowKitCustomizations, t as lineaMainnet, u as lineaSepolia, v as optimismMainnet, w as optimismSepolia, x as polygonAmoy, y as polygonMainnet, z as polygonZkEvmCardona, B as polygonZkEvmMainnet, C as scrollMainnet, D as scrollSepolia, F as zkSyncEraMainnet, G as zksyncSepoliaTestnet } from './testnet-kBf1DKlb.js';
|
|
7
|
+
import '@openzeppelin/relayer-sdk';
|
|
8
|
+
import '@rainbow-me/rainbowkit';
|
|
6
9
|
|
|
7
10
|
/**
|
|
8
11
|
* EVM-specific wallet connection status extending the base interface.
|
|
@@ -25,6 +28,12 @@ interface EvmWalletConnectionStatus extends WalletConnectionStatus {
|
|
|
25
28
|
declare class EvmAdapter implements ContractAdapter {
|
|
26
29
|
readonly networkConfig: TypedEvmNetworkConfig;
|
|
27
30
|
readonly initialAppServiceKitName: UiKitConfiguration['kitName'];
|
|
31
|
+
/**
|
|
32
|
+
* Lazily initialized access control service (NFR-004).
|
|
33
|
+
* Created on the first call to `getAccessControlService()` to avoid
|
|
34
|
+
* unnecessary initialization overhead when access control is not used.
|
|
35
|
+
*/
|
|
36
|
+
private accessControlService;
|
|
28
37
|
constructor(networkConfig: TypedEvmNetworkConfig);
|
|
29
38
|
/**
|
|
30
39
|
* @inheritdoc
|
|
@@ -100,7 +109,7 @@ declare class EvmAdapter implements ContractAdapter {
|
|
|
100
109
|
* Returns a React component for configuring EVM-specific relayer transaction options.
|
|
101
110
|
* @returns The EVM relayer options component
|
|
102
111
|
*/
|
|
103
|
-
getRelayerOptionsComponent():
|
|
112
|
+
getRelayerOptionsComponent(): React__default.ComponentType<{
|
|
104
113
|
options: Record<string, unknown>;
|
|
105
114
|
onChange: (options: Record<string, unknown>) => void;
|
|
106
115
|
}> | undefined;
|
|
@@ -196,7 +205,7 @@ declare class EvmAdapter implements ContractAdapter {
|
|
|
196
205
|
/**
|
|
197
206
|
* @inheritdoc
|
|
198
207
|
*/
|
|
199
|
-
getEcosystemReactUiContextProvider():
|
|
208
|
+
getEcosystemReactUiContextProvider(): React__default.ComponentType<EcosystemReactUiProviderProps> | undefined;
|
|
200
209
|
/**
|
|
201
210
|
* @inheritdoc
|
|
202
211
|
*/
|
|
@@ -275,48 +284,24 @@ declare class EvmAdapter implements ContractAdapter {
|
|
|
275
284
|
* @inheritdoc
|
|
276
285
|
*/
|
|
277
286
|
hashContractDefinition(definition: string): string;
|
|
287
|
+
/**
|
|
288
|
+
* @inheritdoc
|
|
289
|
+
*
|
|
290
|
+
* Returns a lazily initialized `EvmAccessControlService` instance.
|
|
291
|
+
* The service is created on first call with an `executeTransaction` callback
|
|
292
|
+
* that wraps `signAndBroadcast`, decoupling the access control module from
|
|
293
|
+
* wallet/signing infrastructure.
|
|
294
|
+
*
|
|
295
|
+
* @returns The AccessControlService for this adapter's network
|
|
296
|
+
* @see research.md §R9 — Service Lifecycle and Transaction Execution
|
|
297
|
+
*/
|
|
298
|
+
getAccessControlService(): AccessControlService;
|
|
278
299
|
/**
|
|
279
300
|
* @inheritdoc
|
|
280
301
|
*/
|
|
281
302
|
getTypeMappingInfo(): TypeMappingInfo;
|
|
282
303
|
}
|
|
283
304
|
|
|
284
|
-
declare const
|
|
285
|
-
declare const arbitrumMainnet: TypedEvmNetworkConfig;
|
|
286
|
-
declare const polygonMainnet: TypedEvmNetworkConfig;
|
|
287
|
-
declare const polygonZkEvmMainnet: TypedEvmNetworkConfig;
|
|
288
|
-
declare const baseMainnet: TypedEvmNetworkConfig;
|
|
289
|
-
declare const bscMainnet: TypedEvmNetworkConfig;
|
|
290
|
-
declare const optimismMainnet: TypedEvmNetworkConfig;
|
|
291
|
-
declare const avalancheMainnet: TypedEvmNetworkConfig;
|
|
292
|
-
declare const zkSyncEraMainnet: TypedEvmNetworkConfig;
|
|
293
|
-
declare const scrollMainnet: TypedEvmNetworkConfig;
|
|
294
|
-
declare const lineaMainnet: TypedEvmNetworkConfig;
|
|
295
|
-
|
|
296
|
-
declare const ethereumSepolia: TypedEvmNetworkConfig;
|
|
297
|
-
declare const arbitrumSepolia: TypedEvmNetworkConfig;
|
|
298
|
-
declare const polygonAmoy: TypedEvmNetworkConfig;
|
|
299
|
-
declare const polygonZkEvmCardona: TypedEvmNetworkConfig;
|
|
300
|
-
declare const baseSepolia: TypedEvmNetworkConfig;
|
|
301
|
-
declare const bscTestnet: TypedEvmNetworkConfig;
|
|
302
|
-
declare const optimismSepolia: TypedEvmNetworkConfig;
|
|
303
|
-
declare const avalancheFuji: TypedEvmNetworkConfig;
|
|
304
|
-
declare const zksyncSepoliaTestnet: TypedEvmNetworkConfig;
|
|
305
|
-
declare const scrollSepolia: TypedEvmNetworkConfig;
|
|
306
|
-
declare const lineaSepolia: TypedEvmNetworkConfig;
|
|
307
|
-
|
|
308
|
-
declare const evmMainnetNetworks: TypedEvmNetworkConfig[];
|
|
309
|
-
declare const evmTestnetNetworks: TypedEvmNetworkConfig[];
|
|
310
|
-
declare const evmNetworks: TypedEvmNetworkConfig[];
|
|
311
|
-
|
|
312
|
-
/**
|
|
313
|
-
* Configuration for the EVM adapter
|
|
314
|
-
*
|
|
315
|
-
* This file defines the dependencies required by the EVM adapter
|
|
316
|
-
* when generating exported projects. It follows the AdapterConfig
|
|
317
|
-
* interface to provide a structured approach to dependency management.
|
|
318
|
-
*/
|
|
319
|
-
|
|
320
|
-
declare const evmAdapterConfig: AdapterConfig;
|
|
305
|
+
declare const ecosystemDefinition: EcosystemExport;
|
|
321
306
|
|
|
322
|
-
export { EvmAdapter,
|
|
307
|
+
export { EvmAdapter, TypedEvmNetworkConfig, WriteContractParameters, ecosystemDefinition };
|