Skip to content

Bitshala-Incubator/silent-pay-indexer

Repository files navigation

Silent Payment Indexer

A service that simplifies receiving Bitcoin silent payments for wallets and applications.

Warning

This application 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 Payment Indexer is a service designed to efficiently index and organize Bitcoin silent payment data, simplifying the process of receiving silent payments for wallets and applications. By providing a reliable and performant indexing solution, this project aims to also accelerate the adoption of silent payments on the Bitcoin network.

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

🚉 Features

  • Efficient Indexing: Processes Bitcoin blocks to extract silent payment data.
  • Structured Data Storage: Stores indexed data for easy retrieval.
  • API Queries: Enables applications to search for specific silent payment information.
  • Continuous Updates: Maintains data freshness by indexing new blocks.

🔌 Installation

  1. Clone the repository:
  $ git clone https://github.com/Bitshala-Incubator/silent-pay-indexer.git
  1. Navigate to the project directory:
  $ cd silent-pay-indexer
  1. Install dependencies:
  $ npm install

📓 Prerequisites

  • Node.js
  • Docker (optional)

🔧 Configuration

  • Create a config.yaml file in the project config folder. e.g:
    $ cd config
    $ cp config.yaml test.config.yaml
  • Set the necessary environment variables (e.g., provider type, app port, etc.).

🚀 Running the Application

    $ npm run start:dev

📁 File Structure

This is a basic overview of the project structure, it reflects the main components of the silent payment indexer application. The src directory is further divided into subdirectories based on the different functionalities of the application.

├── config
├── docs
├── dev
├── src
│   ├── block-data-providers
│   ├── common
│   ├── indexer
│   ├── operation-state
│   ├── transactions
│       ├── controller.ts
│       ├── service.ts
│   ├── controller.ts
│   └── configuration.ts
│   └── main.ts
Directory/File Description
config Stores configuration files for the project
dev Contains development-specific files (e.g., Docker Compose)
docs Contains documentation files (e.g., design.md)
src Contains the source code for the application

src Directory Structure

Directory/File Description
block-data-providers Contains logic for fetching data from different block data providers periodically
common Contains shared utility functions and constants
indexer Contains the core logic for indexing silent payments
operation-state Handles the state of indexing operations
transactions Handles transaction-related logic and API querying requests
configuration Handles project configuration

🌸 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.

🔥 Contribution

We welcome and encourage contributions to this actively developed project! For details on contributing, please refer to CONTRIBUTING.md.

Few directions for new contributors:

  • The list of issues is a good place to look for contributable tasks and open problems.

  • Issues marked with good first issue are good places to get started.

  • Tests are a good place to start gathering a contextual understanding of the codebase.

  • Reviewing open PRs are a good place to understand the codebase and the contribution process.

🔧 Experimental Warning

This service is experimental and under active development. By using it, you acknowledge the following:

  1. Risk of Loss of Funds: Using this service may result in the loss of your funds. You should be aware that any funds you use with this service are at risk and could become inaccessible or irretrievable.
  2. No Guarantee of Performance: The service 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 service. It is distributed "as is" without any guarantees of functionality, security, or reliability.
  4. Security Considerations: This service 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 service may be incomplete, inaccurate, or outdated.
  6. API and Compatibility Changes: This code 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 service effectively.

We strongly recommend using this service for testing and development purposes only.

Use it at your own risk.