Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Initial integration docs #140

Merged
merged 24 commits into from
Jan 6, 2025
Merged
Show file tree
Hide file tree
Changes from 18 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 12 additions & 7 deletions .changeset/README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
# Changesets
gbarkhatov marked this conversation as resolved.
Show resolved Hide resolved

Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
with multi-package repos, or single-package repos to help you version and publish your code. You can
find the full documentation for it [in our repository](https://github.com/changesets/changesets)

We have a quick list of common questions to get you started engaging with this project in
Hello and welcome! This folder has been automatically generated by
`@changesets/cli`, a build tool that works with multi-package repos, or
single-package repos to help you version and publish your code. You can find the
full documentation for it
[in our repository](https://github.com/changesets/changesets)

We have a quick list of common questions to get you started engaging with this
project in
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)

# Usage
Expand All @@ -30,9 +33,11 @@ Patch:
6. Edit the file in .changeset for further details
7. Commit change and push to Github
8. Github Actions will automatically create a new PR named `Version Packages`
9. After reviewing, merge the `Version Packages` PR on Github, the package version is then updated and published to npm.
9. After reviewing, merge the `Version Packages` PR on Github, the package
version is then updated and published to npm.

Notes:

- The `Version Packages` is automatically updated with the latest changeset(s).
- The `Version Packages` will only update the package versions and publish to npm, not the actual code.
- The `Version Packages` will only update the package versions and publish to
npm, not the actual code.
5 changes: 5 additions & 0 deletions .changeset/six-boxes-add.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@babylonlabs-io/bbn-wallet-connect": patch
---

docs: add wallet integration guide
267 changes: 267 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,271 @@ dist-ssr
*.njsproj
*.sln
*.sw?
/test-results/
/playwright-report/
/blob-report/
/playwright/.cache/

tests/e2e/fixtures/extensions

### macOS ###
# General
.DS_Store
.AppleDouble
.LSOverride

# Icon must end with two \r
Icon


# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk

### macOS Patch ###
# iCloud generated files
*.icloud

### Node ###
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
.pnpm-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
*.lcov

# nyc test coverage
.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# Snowpack dependency directory (https://snowpack.dev/)
web_modules/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional stylelint cache
.stylelintcache

# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variable files
.env
.env.development.local
.env.test.local
.env.production.local
.env.local

# parcel-bundler cache (https://parceljs.org/)
.cache
.parcel-cache

# Next.js build output
.next
out

# Nuxt.js build / generate output
.nuxt
dist

# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and not Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public

# vuepress build output
.vuepress/dist

# vuepress v2.x temp and cache directory
.temp

# Docusaurus cache and generated files
.docusaurus

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

# TernJS port file
.tern-port

# Stores VSCode versions used for testing VSCode extensions
.vscode-test

# yarn v2
.yarn/cache
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*

### Node Patch ###
# Serverless Webpack directories
.webpack/

# Optional stylelint cache

# SvelteKit build / generate output
.svelte-kit

### VisualStudioCode ###
.vscode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
!.vscode/*.code-snippets

# Local History for Visual Studio Code
.history/

# Built Visual Studio Code Extensions
*.vsix

### VisualStudioCode Patch ###
# Ignore all local history of files
.history
.ionide

### Windows ###
# Windows thumbnail cache files
Thumbs.db
Thumbs.db:encryptable
ehthumbs.db
ehthumbs_vista.db

# Dump file
*.stackdump

# Folder config file
[Dd]esktop.ini

# Recycle Bin used on file shares
$RECYCLE.BIN/

# Windows Installer files
*.cab
*.msi
*.msix
*.msm
*.msp

# Windows shortcuts
*.lnk

# End of https://www.toptal.com/developers/gitignore/api/macos,windows,visualstudiocode,node

# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js
.yarn/install-state.gz

# testing
/coverage

# next.js
/.next/
/out/

# production
/build

# misc
.DS_Store
*.pem

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# local env files
.env*.local

# vercel
.vercel

# typescript
*.tsbuildinfo
next-env.d.ts

.env


8 changes: 8 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"endOfLine": "lf",
"singleQuote": false,
"useTabs": false,
"proseWrap": "always",
"overrides": [
{
"files": ["*.ts", "*.tsx"],
Expand All @@ -20,6 +21,13 @@
"options": {
"parser": "babel"
}
},
{
"files": ["*.md"],
"options": {
"proseWrap": "always",
"printWidth": 80
}
}
]
}
50 changes: 46 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,39 @@
<p align="center">
<img alt="Babylon Logo" src="https://github.com/user-attachments/assets/b21652b5-847d-48b2-89a7-0f0969a50900" width="100" />
<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/>

The Babylon Wallet Connector repository provides the wallet connection component
used in the Babylon Staking Dashboard. This component enables the connection of
both Bitcoin and Babylon chain wallets.

## Key Features

- Unified interfaces for Bitcoin and Babylon wallet connections
- Support for browser extension wallets
- Support for hardware wallets
- Mobile wallet compatibility through injectable interfaces
- Tomo Connect integration for broader wallet ecosystem

## Overview

The Babylon Wallet Connector provides a unified interface for integrating both
Bitcoin and Babylon wallets into Babylon dApp. It supports both native wallet
extensions and injectable mobile wallets.

The main architectural difference is that native wallets are built into the
library, while injectable wallets can be dynamically added by injecting their
implementation into the webpage's `window` object before the dApp loads.

## Installation

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

Expand All @@ -19,6 +45,22 @@ Stable release versions are manually released from the main branch.

## Storybook

```console
npm run storybook
```bash
npm run dev
```

## Wallet Developers

Wallet developers that want to integrate their wallet into the Babylon Wallet
Connect interface for listing in the Babylon staking dashboard have the
following options:

- **Browser Extension Wallets** can integrate through the
[Tomo Connet SDK](https://docs.tomo.inc/tomo-sdk/tomo-connect-sdk-lite), which
is our external Wallet Connection interface that ensures compatibility with
gbarkhatov marked this conversation as resolved.
Show resolved Hide resolved
our application. Native integrations into the Babylon Wallet Connector require
significant maintenance from our team and will happen only for critical
gbarkhatov marked this conversation as resolved.
Show resolved Hide resolved
wallets for the staking application.
- **Mobile Wallets** can integrate through the mobile injectable interface. For
detailed integration specifications and alternatives, please refer to our
gbarkhatov marked this conversation as resolved.
Show resolved Hide resolved
[Wallet Integration Guide](docs/wallet-integration.md).
Loading