Skip to content

Commit

Permalink
feat: export EIP1193EventMap (#1013)
Browse files Browse the repository at this point in the history
* improve: export  EIP1193Events

This PR exposes the `EIP1193Events` type for projects to use when importing Viem.

* chore: changeset

---------

Co-authored-by: moxey.eth <[email protected]>
  • Loading branch information
avasisht23 and jxom authored Aug 19, 2023
1 parent 75aadb7 commit dd1e102
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/orange-dogs-add.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"viem": patch
---

Added `EIP1193EventMap` type.
1 change: 1 addition & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -597,6 +597,7 @@ export type {
} from './types/chain.js'
export type {
AddEthereumChainParameter,
EIP1193EventMap,
EIP1193Events,
EIP1193Parameters,
EIP1193Provider,
Expand Down
2 changes: 1 addition & 1 deletion src/types/eip1193.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export type ProviderMessage = {
data: unknown
}

type EIP1193EventMap = {
export type EIP1193EventMap = {
accountsChanged(accounts: Address[]): void
chainChanged(chainId: string): void
connect(connectInfo: ProviderConnectInfo): void
Expand Down

1 comment on commit dd1e102

@vercel
Copy link

@vercel vercel bot commented on dd1e102 Aug 19, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.