Bitshala-Incubator / silent-pay

a TS library for silent payments
MIT License
11 stars 12 forks source link

SilentPay - A wallet library for silent payments

A bitcoin wallet library that supports silent payments out of the box.

MIT Licensed Tests CI Status Lint CI Status Code Styled using prettier

[!WARNING] This library is currently in an experimental stage and should be used with caution. It has not undergone extensive testing and may contain bugs, vulnerabilities, or unexpected behavior. Mainnet use is strictly NOT recommended.

Table of Contents

About

Silent payments in Bitcoin is a new way to receive private payments from anyone on a single static address without on-chain linkability of payments or a need for on-chain notifications.

This library is a JavaScript/TypeScript implementation of silent payments. The library exposes core functionalities to send to a silent payment address, receive payments to a silent payment address and spend from a silent payment address. The library also provides a simple wallet implementation that provides support for silent payments out of the box.

Read more about silent payments in BIP 352 and Ruben Somsen's post.

Uses

Architecture

The project is divided into four modules.

├── packages
│   ├── core
│   │   ├── src
│   │   └── test
│   ├── esplora
│   │   ├── src
│   │   └── test
│   ├── level
│   │   ├── src
│   │   └── test
│   └── wallet
│       ├── src
│       └── test
Directory Description
packages/core Contains core library functions that are needed to support silent payment integration in a wallet.
packages/esplora Provides an Esplora client which implements the network interface.
packages/level Provides a file-based key value database which implements the db interface.
packages/wallet Encompasses the wallet class which is responsible for all wallet-operations.

Project Status

The project is currently in a pre-alpha stage, intended for demonstration and prototyping. The wallet may have known/unknown bugs. Basic silent payments functionality works on regtest and testnet networks, but it's not recommended for mainnet use.

If you're interested in contributing to the project, explore the open issues and submit a PR.

Contributing

The project is under active development by a few motivated Bitcoin devs. Any contribution for features, tests, docs and other fixes/upgrades is encouraged and welcomed. The maintainers will use the PR thread to provide reviews and suggestions, and are generally proactive at merging good contributions.

Few directions for new contributors:

Developer Community

The dev community lurks in a small corner of Discord here (say 👋, if you drop there from this readme).

Dev discussions predominantly happen via FOSS best practices, and by using Github as the Community Forum.

Experimental Warning Acknowledgement

By using this library, you acknowledge the following:

  1. Risk of Loss of Funds: Using this library may result in the loss of your funds. You should be aware that any funds you use with this library are at risk and could become inaccessible or irretrievable.
  2. No Guarantee of Performance: The library may not perform as expected and may lead to unintended outcomes, including data loss, loss of funds, or other adverse effects.
  3. No Warranty: There is no warranty provided for this library. It is distributed "as is" without any guarantees of functionality, security, or reliability.
  4. Security Considerations: This library may contain security vulnerabilities or weaknesses that could expose your data or funds to risks. You are responsible for conducting your own security assessments and risk evaluations.
  5. Limited Documentation: The documentation for this library may be incomplete, inaccurate, or outdated.
  6. API and Compatibility Changes: This library is subject to frequent changes, including modifications to its API, features, or compatibility with other software. These changes may affect your ability to use the library effectively.