Skip to content

Commit

Permalink
chore: add keplr and metamask injected connector exports
Browse files Browse the repository at this point in the history
  • Loading branch information
Cussone committed Dec 10, 2024
1 parent f383f4b commit 7eed317
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 0 deletions.
10 changes: 10 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,16 @@
"import": "./dist/braavos.js",
"require": "./dist/braavos.cjs"
},
"./metamask": {
"types": "./dist/metamask.d.ts",
"import": "./dist/metamask.js",
"require": "./dist/metamask.cjs"
},
"./keplr": {
"types": "./dist/keplr.d.ts",
"import": "./dist/keplr.js",
"require": "./dist/keplr.cjs"
},
"./braavosMobile": {
"types": "./dist/braavosMobile.d.ts",
"import": "./dist/braavosMobile.js",
Expand Down
7 changes: 7 additions & 0 deletions src/connectors/injected/keplr.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { InjectedConnector, InjectedConnectorOptions } from "./index"

export class Keplr extends InjectedConnector {
constructor(options?: Omit<InjectedConnectorOptions, "id">) {
super({ options: { id: "keplr", ...options } })
}
}
7 changes: 7 additions & 0 deletions src/connectors/injected/metamask.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { InjectedConnector, InjectedConnectorOptions } from "./index"

export class MetaMask extends InjectedConnector {
constructor(options?: Omit<InjectedConnectorOptions, "id">) {
super({ options: { id: "metamask", ...options } })
}
}
2 changes: 2 additions & 0 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ export default defineConfig({
argent: resolve(__dirname, "src/connectors/argent/index.ts"),
argentX: resolve(__dirname, "src/connectors/injected/argentX.ts"),
braavos: resolve(__dirname, "src/connectors/injected/braavos.ts"),
metamask: resolve(__dirname, "src/connectors/injected/metamask.ts"),
keplr: resolve(__dirname, "src/connectors/injected/keplr.ts"),
},
formats: ["es", "cjs"],
},
Expand Down

0 comments on commit 7eed317

Please sign in to comment.