Skip to content

Commit

Permalink
new provider "boilerplate"
Browse files Browse the repository at this point in the history
  • Loading branch information
KaffinPX committed Jan 23, 2024
1 parent 0dcc735 commit c6daa01
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 10 deletions.
7 changes: 0 additions & 7 deletions src/provider/Api.d.ts

This file was deleted.

20 changes: 17 additions & 3 deletions src/provider/Content.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
window.kaspa = {
network: "TESTNET"
interface ProviderInfo {
name: string
}

export {}
function announceProvider() {
const info: ProviderInfo = {
name: "Kaspian"
}

window.dispatchEvent(new CustomEvent("kaspa:provider", {
detail: Object.freeze({ info }),
}))
}

window.addEventListener("kaspa:requestProviders", () => {
announceProvider()
})

announceProvider()

0 comments on commit c6daa01

Please sign in to comment.