Skip to content
This repository has been archived by the owner on Jan 30, 2024. It is now read-only.

Commit

Permalink
Merge pull request #115 from hgraph-io/feature/publish-typedoc
Browse files Browse the repository at this point in the history
build typedoc
  • Loading branch information
hgraphql authored Dec 20, 2023
2 parents 7d056fa + 454d9b8 commit 24b7957
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 4 deletions.
29 changes: 28 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,9 @@
"prettier": "^3.1.0",
"rimraf": "^5.0.5",
"ts-jest": "^29.1.1",
"ts-node": "^10.9.1",
"ts-node": "^10.9.2",
"typedoc": "^0.25.4",
"typedoc-theme-hierarchy": "^4.1.2",
"typescript": "^5.2.2"
},
"dependencies": {
Expand All @@ -54,6 +55,7 @@
"build": "npm run build:types && node scripts/lib/build.mjs",
"build:types": "tsc --emitDeclarationOnly --declaration --declarationMap --outDir dist/types",
"build:example": "node scripts/examples/build.mjs",
"build:docs": "typedoc --options typedoc.json",
"watch": "nodemon --watch src/lib/ --ext ts --exec \"npm run build\"",
"dev": "rimraf dist && npm run build && concurrently --raw \"npm run watch\" \"node scripts/examples/dev.mjs\"",
"test": "jest",
Expand Down
2 changes: 2 additions & 0 deletions src/lib/dapp/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -520,3 +520,5 @@ export class DAppConnector {
})
}
}

export default DAppConnector
9 changes: 7 additions & 2 deletions src/lib/wallet/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,11 @@ import { proto } from '@hashgraph/proto'
import Provider from './provider'
import type { HederaNativeWallet } from './types'

export type { HederaNativeWallet } from './types'
export { default as WalletProvider } from './provider'

// https://github.com/WalletConnect/walletconnect-monorepo/blob/v2.0/packages/web3wallet/src/client.ts
export default class Wallet extends Web3Wallet implements HederaNativeWallet {
export class HederaWeb3Wallet extends Web3Wallet implements HederaNativeWallet {
/*
* Set default values for chains, methods, events
*/
Expand All @@ -49,7 +52,7 @@ export default class Wallet extends Web3Wallet implements HederaNativeWallet {
methods?: string[],
sessionEvents?: HederaSessionEvent[] | string[],
) {
const wallet = new Wallet(
const wallet = new HederaWeb3Wallet(
{ core: new Core({ projectId }), metadata },
chains,
methods,
Expand Down Expand Up @@ -396,3 +399,5 @@ export default class Wallet extends Web3Wallet implements HederaNativeWallet {
return await this.respondSessionRequest(response)
}
}

export default HederaWeb3Wallet
10 changes: 10 additions & 0 deletions typedoc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"$schema": "https://typedoc.org/schema.json",
"entryPointStrategy": "expand",
"entryPoints": ["./src/lib"],
"plugin": ["typedoc-theme-hierarchy"],
"theme": "hierarchy",
"out": "dist/docs",
"sourceLinkExternal": true,
"basePath": "./docs"
}

0 comments on commit 24b7957

Please sign in to comment.