Giter Site home page Giter Site logo

britttttk / btctransmuter Goto Github PK

View Code? Open in Web Editor NEW

This project forked from btcpayserver/btctransmuter

0.0 1.0 0.0 9.72 MB

A self-hosted ,modular IFTTT-inspired system for bitcoin services written in C#

Home Page: https://btcpayserver.org

C# 63.47% HTML 18.18% JavaScript 0.53% CSS 17.60% Dockerfile 0.22%

btctransmuter's Introduction

BtcTransmuter Docs

Introduction - What is BtcTransmuter?

BtcTransmuter is a free, open-source & self-hosted tool that allows you to configure actions that execute automatically upon specified conditions. Its primary focus is the integration of cryptocurrency services to help users manage their funds and business workflow.

How does it work?

There are 3 main components in BtcTransmuter - External Services, Recipes and Extensions.

  • External services integrated with third parties, such as a BTCPayServer instance or a Cryptocurrency Exchange.
  • Recipes is a set of instructions created by the user: What to execute and when. The execution part is called a Recipe Action while the condition is called a Recipe Trigger. An action could be Send an Email using the SMTP External Service and the trigger being If a new invoice was created on my BtcPay External Service
  • Extensions provide a way to add more external service types, actions and triggers without needing to modify the original code.

Can I use this in production

This project is still in early development and most likely has some bugs and quirks that need to be ironed out. The project is considered to be in ALPHA state, meaning not all desired functionality has been implemented and there can be breaking changes.

How do I deploy?

If you set up BTCPay using any dockerized install method, you can enable BTC Transmuter easily.

First, SSH into your server. Then run the following commands:

sudo su -
cd BTCPayServer-docker
export BTCPAYGEN_ADDITIONAL_FRAGMENTS="$BTCPAYGEN_ADDITIONAL_FRAGMENTS;opt-add-btctransmuter"

. ./btcpay-setup.sh -i

Once completed, your Transmuter will be available at your configured BTCPay website under /btctransmuter/, where the first account to register becomes the Transmuter admin. Open that link in your browser and you’ll see the homepage.

What extensions are provided?

You can see a list of built-in extensions once you log into your transmuter application under /extensions.

Currently there are 12 extensions that come bundled with the main application:

  • Tor - Provides TOR access to your Transmuter app
  • Presets - Provides one page wizards for quick setups of common scenarios
  • BtcPayServer - Provides you a way to interact with BTCPayServer stores
  • Email - Provides you with a way to check a POP3 for incoming emails and a way to send Email via SMTP
  • Exchange - Provides you a way to connect to a variety of exchanges and place orders on them
  • Lightning - Provides you interoperability with lightning nodes to be able to do basic channel and invoice management
  • NBXplorer - Provides you ways to detect detect incoming funds, send funds, and generate addresses.
  • Operators - Lets you create conditional workflows
  • Recipe - Lets you manage existing or create recipes with your workflows
  • Timer - Run X every Y
  • WebHook - Trigger Recipes with an http call or execute external web hooks with a recipe

What preset recipes are provided?

Currently there are three preset recipes that you can enable easily. In addition to the list below, you can create your own recipes for automating other tasks.

  1. On-chain Forwarder - Forward funds from a wallet elsewhere
  2. BTCPay Email Receipts - Send an email when a BTCPay invoice gets paid
  3. Fiat Conversion - Convert incoming money to fiat on an exchange by market selling when BTCPay invoice statuses change.

How do I write an extension?

An extension must be its own .net core class library project that references BtcTransmuter.Abstractions There must be a class implementing BtcTransmuterExtension in this library. This file bootstraps the plugin name and adds all the services to system on startup.

Adding a Trigger

  • Implement BaseTrigger This class will be used to transport the event data

  • Implement BaseTriggerHandler This handles:

    • Describing the trigger to the main system.
    • Telling the main UI how to create/edit a recipe trigger using it.
    • The logic needed to see if a trigger is...triggered.

    You will see that BaseTriggerHandler has 2 generic arguments, a Data and Parameters Data is the trigger that that was detected, while Parameters is the data from a Recipe to see if it triggers its actions.

  • Implement a Partial View (named as the same value as the property ViewPartial in the BaseTriggerHandler implementation) This handles displaying the trigger settings in a recipe

  • Implement a Controller that allows a user to create/edit the necessary data to set the trigger on a recipe.

Adding an Action

  • Implement BaseActionHandler This handles:

    • Describing the action to the main system.
    • Telling the main UI how to create/edit a recipe action using it.
    • The logic needed to execute the action

    You will see that BaseActionHandler has a generic argument, Data Data is the type of the action that holds the payload needed to exeucte the action through the instructions of recipe action

  • Implement a Partial View (named as the same value as the property ViewPartial in the BaseActionHandler implementation) This handles displaying the action settings in a recipe

  • Implement a Controller that allows a user to create/edit the necessary data to set the action on a recipe.

Adding an External Service

  • Implement BaseExternalService & IExternalServiceDescriptor
  • Implement a Partial View (named as the same value as the property ViewPartial in the IExternalServiceDescriptor implementation)
  • Implement a Controller that allows a user to create/edit the necessary data for an external service.

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.