Skip to content

Commit af9b282

Browse files
jiexiadonesky1
andauthored
feat: expose ui param option for createEVMClient (#140)
* expose headless * changelog * fix changelog * changelog --------- Co-authored-by: Alex Donesky <adonesky@gmail.com>
1 parent f0db2d5 commit af9b282

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

packages/connect-evm/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
### Added
11+
12+
- `createEVMClient` now accepts `ui` in its param options. See `@metamask/connect-multichain` for examples of usage ([#140](https://github.com/MetaMask/connect-monorepo/pull/140))
13+
1014
## [0.3.1]
1115

1216
### Fixed

packages/connect-evm/src/connect.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -939,12 +939,17 @@ export class MetamaskConnectEVM {
939939
* @param options.dapp - Dapp identification and branding settings
940940
* @param options.api - API configuration including read-only RPC map
941941
* @param options.api.supportedNetworks - A map of CAIP chain IDs to RPC URLs for read-only requests
942+
* @param options.ui - UI configuration options
943+
* @param options.ui.headless - Whether to run without UI
944+
* @param options.ui.preferExtension - Whether to prefer browser extension
945+
* @param options.ui.showInstallModal - Whether to render installation modal for desktop extension
942946
* @param options.eventEmitter - The event emitter to use for the Metamask Connect/EVM layer
943947
* @param options.eventHandlers - The event handlers to use for the Metamask Connect/EVM layer
944948
* @returns The Metamask Connect/EVM layer instance
945949
*/
946950
export async function createEVMClient(
947-
options: Pick<MultichainOptions, 'dapp' | 'api'> & {
951+
options: Pick<MultichainOptions, 'dapp' | 'api'> &
952+
{ ui?: Omit<MultichainOptions['ui'], 'factory'>; } & {
948953
eventHandlers?: Partial<EventHandlers>;
949954
debug?: boolean;
950955
},

0 commit comments

Comments
 (0)