Skip to content

Commit

Permalink
Merge pull request #17 from babylonlabs-io/npm-config
Browse files Browse the repository at this point in the history
configure npm
  • Loading branch information
jeremy-babylonlabs authored Nov 21, 2024
2 parents beb76eb + 5158491 commit 8c3e697
Show file tree
Hide file tree
Showing 7 changed files with 63 additions and 14 deletions.
8 changes: 8 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
src/
public/
tests/
.storybook/
.husky/
node_modules/
**/*.test.*
**/__tests__/
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<p align="center">
<img alt="Babylon Logo" src="https://github.com/user-attachments/assets/b21652b5-847d-48b2-89a7-0f0969a50900" width="100" />
<h3 align="center">@babylonlabs-io/bbn-wallet-connect</h3>
<p align="center">Babylon Wallet Connector</p>
</p>
<br/>

## Installation

```console
npm i @babylonlabs-io/bbn-wallet-connect
```

## Version Release

### Stable version

Stable release versions are manually released from the main branch.

## Storybook

```console
npm run storybook
```
11 changes: 7 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"name": "@babylonlabs-io/bbn-wallet-connect",
"version": "0.0.0",
"version": "0.0.1",
"type": "module",
"types": "dist/index.d.ts",
"publishConfig": {
"access": "public"
},
Expand All @@ -11,8 +12,11 @@
},
"main": "dist/index.cjs.js",
"exports": {
"require": "./dist/index.cjs.js",
"import": "./dist/index.es.js"
".": {
"types": "./dist/index.d.ts",
"require": "./dist/index.cjs.js",
"import": "./dist/index.es.js"
}
},
"scripts": {
"dev": "npm run storybook",
Expand All @@ -29,7 +33,6 @@
"react-icons": "^5.3.0"
},
"files": [
"src",
"dist"
],
"peerDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions src/core/wallets/btc/BTCProvider.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import type { Fees, InscriptionIdentifier, Network, NetworkConfig, UTXO, Provider } from "../../types";
import type { Fees, InscriptionIdentifier, Network, NetworkConfig, UTXO, IProvider } from "../../types";
import { createMempoolAPI, MempoolApi } from "../../utils/mempool";

/**
* Abstract class representing a wallet provider.
* Provides methods for connecting to a wallet, retrieving wallet information, signing transactions, and more.
*/
export abstract class BTCProvider implements Provider {
export abstract class BTCProvider implements IProvider {
protected mempool: MempoolApi;

constructor(protected config: NetworkConfig) {
Expand Down
20 changes: 14 additions & 6 deletions tsconfig.app.json
Original file line number Diff line number Diff line change
@@ -1,30 +1,38 @@
{
"compilerOptions": {
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
"incremental": true,
"target": "ES2020",
"baseUrl": "./src",
"useDefineForClassFields": true,
"lib": ["ES2020", "DOM", "DOM.Iterable"],
"module": "ESNext",
"skipLibCheck": true,

/* Bundler mode */
/* Bundler Resolution */
"moduleResolution": "Bundler",
"allowImportingTsExtensions": true,
"noImplicitAny": false,
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,
"noImplicitAny": true,
"isolatedModules": true,
"moduleDetection": "force",
"noEmit": true,
"jsx": "react-jsx",

/* Declarations */
"declaration": true,
"emitDeclarationOnly": true,
"declarationDir": "dist",

/* Linting */
"strict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noFallthroughCasesInSwitch": true,
"paths": {
"@/*": ["*", "./*"]
}
},
"outDir": "dist"
},
"include": ["src"]
"include": ["src"],
"keywords": ["react", "babylonlabs", "bbn", "wallet-connect", "bitcoin", "btc", "bitcoin-wallet"]
}
5 changes: 4 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{
"files": [],
"references": [{ "path": "./tsconfig.app.json" }, { "path": "./tsconfig.node.json" }]
"references": [{ "path": "./tsconfig.app.json" }, { "path": "./tsconfig.node.json" }],
"compilerOptions": {
"declaration": true
}
}
5 changes: 4 additions & 1 deletion vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,13 @@ export default defineConfig({
react(),
dts({
tsconfigPath: "./tsconfig.app.json",
exclude: ["src/**/*.stories.(ts|tsx)"],
insertTypesEntry: true,
include: ["src"],
exclude: ["src/**/*.stories.tsx"],
}),
],
build: {
outDir: "dist",
sourcemap: true,
lib: {
entry: path.resolve(__dirname, "src/index.tsx"),
Expand Down

0 comments on commit 8c3e697

Please sign in to comment.