Coder Social home page Coder Social logo

beaverweaver7 / btcpayserver.vault Goto Github PK

View Code? Open in Web Editor NEW

This project forked from btcpayserver/btcpayserver.vault

0.0 0.0 0.0 2.32 MB

Sign with software or hardware wallets

License: MIT License

Shell 11.02% C# 79.55% PowerShell 0.39% Dockerfile 9.04%

btcpayserver.vault's Introduction

NuGet Build status

BTCPayServer.Vault

This project is composed of two parts:

The video below explains how to use BTCPay Vault with BTCPay Server.

Why BTCPayServer Vault

BTCPayServer Vault allows web applications to access your hardware wallet, this enables a better integrated user experience.

How to install

Direct download

The binaries are on our release page.

Via brew (macOS only)

You can use brew:

brew install btcpayserver-vault

How does BTCPayServer Vault work

When running the BTCPayServer Vault, a local webserver is hosted on http://127.0.0.1:65092 which web applications, via your local browser, can connect to in order to interact with your hardware wallet.

The protocol is fairly simple:

First, the web application needs to make a permission request to the Vault by sending a HTTP request GET to http://127.0.0.1:65092/hwi-bridge/v1/request-permission

This will prompt the user to grant access to the web application and if the user accepts, the request returns HTTP 200. Note that internally, the Vault relies on the ORIGIN HTTP header to identify the web application requesting access. If the access was granted previously, the request returns HTTP 200.

Second, the web application can query the hardware through POST requests to http://127.0.0.1:65092/hwi-bridge/v1.

{
    "params": [ "param1", "param2" ]
}

Those parameters are then passed as-is to hwi and the result is returned as a string.

NuGet

Is it safe?

Hardware wallets have been created to protect your money, even if your computer was compromised.

However, while it protects your money, it will not protect your privacy if you allow an untrusted application to access your public keys. This is why BTCPayServer Vault always ask permission to user first before allowing any web application to access your hardware wallet.

How to build?

This is a two step process:

  1. Install the latest version of the .NET Core 6.0 SDK
  2. Run dotnet build

If you want to run it for testing:

cd BTCPayServer.Vault
dotnet run

Documentation

Video below explains how to use BTCPay Vault with BTCPay Server.

Licence

This project is under MIT License.

Special thanks

Special thanks to Wasabi Wallet, this code is based on their work, and as well to the bitcoin developers and achow101 for the HWI Project.

btcpayserver.vault's People

Contributors

nicolasdorier avatar pavlenex avatar britttttk avatar jtone123 avatar yahiheb avatar dennisreimann avatar bas02 avatar molnard avatar maltokyo avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.