Coder Social home page Coder Social logo

lnpay / lnpay-core Goto Github PK

View Code? Open in Web Editor NEW
7.0 7.0 4.0 2.24 MB

Open source software for the Bitcoin Lightning Network. Built with Yii2/PHP.

Home Page: https://lnpay.org

License: MIT License

PHP 87.48% Batchfile 0.14% Shell 0.15% CSS 2.60% JavaScript 4.06% Hack 0.09% HTML 5.47%

lnpay-core's People

Contributors

tkthundr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

lnpay-core's Issues

Support spontaneous incoming AMP payments

lncli sendpayment -d 028e74f2598db804d8ae1319a5140679bd1df10811a33cbb82a183035110343760 -a 4 --amp --data 696969=77616c5f744446754945364b4779567644

accept-amp in config

  • Make sure RPC receiver parses AMP correctly
  • Include tests

Implement Keysend Send UI

Description

We want to add keysend functionality to our UI. We want to add a form that enables users to submit keysend payments to destination nodes with key/value pairs.

Page

image

Code

public function actionKeysend($id)
{
$walletObject = $this->findModel($id);
$searchModel = new WalletTransactionSearch();
$searchModel->user_id = \LNPay::$app->user->id;
$searchModel->wallet_id = $walletObject->id;
$dataProvider = $searchModel->search(\LNPay::$app->request->queryParams);
$query = $dataProvider->query;
$query->innerJoinWith('lnTx');
$query->andFilterWhere(['ln_tx.is_keysend'=>1]);
return $this->render('views/_keysend',['wallet'=>$walletObject,'wtxDataProvider'=>$dataProvider,'wtxSearchModel'=>$searchModel]);
}
.

https://github.com/lnpay/lnpay-core/blob/master/src/wallet/views/wallet/views/_keysend.php

Requirements

  • Must have a text field for node destination, this will intake a pubkey
  • A way to add key / value pairs that will be sent with the keysend
  • should be contained in a form with a submit button

Example

This is a good example of what a form should look like
image

How it works

public function actionLoop($id)
{
$walletObject = $this->findModel($id);
$lnLoopOutForm = new LnLoopOutForm();
$lnLoopOutForm->wallet_id = $walletObject->external_hash;
if ($lnLoopOutForm->load(\LNPay::$app->request->post()) && $lnLoopOutForm->validate()) {
$lnLoopOutForm->attemptLoopOut();
return $this->redirect(\LNPay::$app->request->referrer);
}
return $this->render('views/_loop',['wallet'=>$walletObject,'lnLoopOutForm'=>$lnLoopOutForm]);
}

https://github.com/lnpay/lnpay-core/blob/master/src/wallet/views/wallet/views/_loop.php

Improve keysend transaction UI

Description

The incoming keysends to the wallet are not really readable. Come up with a UI that makes it easier to see what data has been received along with the keysend.

image

Create payment send failure event

Description

When payment failures happen, there should be an event that is triggered. this will be helpful for users to see as webhooks.

wallet_send_failure

ln_node_outbound_spontaneous_payment_failure
ln_node_outbound_invoice_payment_failure

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.