mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2024-11-19 18:00:17 +01:00
WIP: lightning
This commit is contained in:
parent
9f218d5c3f
commit
d1f7b4912b
12
LightningCustodianWallet.test.js
Normal file
12
LightningCustodianWallet.test.js
Normal file
@ -0,0 +1,12 @@
|
||||
/* global it */
|
||||
import { LightningCustodianWallet } from './class';
|
||||
let assert = require('assert');
|
||||
|
||||
it('can generate auth secret', () => {
|
||||
let l1 = new LightningCustodianWallet();
|
||||
let l2 = new LightningCustodianWallet();
|
||||
l1.generate();
|
||||
l2.generate();
|
||||
|
||||
assert.ok(l1.getSecret() !== l2.getSecret(), 'generated credentials should be the same');
|
||||
});
|
@ -8,3 +8,4 @@ export * from './hd-segwit-p2sh-wallet';
|
||||
export * from './hd-legacy-breadwallet-wallet';
|
||||
export * from './hd-legacy-p2pkh-wallet';
|
||||
export * from './watch-only-wallet';
|
||||
export * from './lightning-custodian-wallet';
|
||||
|
43
class/lightning-custodian-wallet.js
Normal file
43
class/lightning-custodian-wallet.js
Normal file
@ -0,0 +1,43 @@
|
||||
import { LegacyWallet } from './legacy-wallet';
|
||||
import Frisbee from 'frisbee';
|
||||
|
||||
export class LightningCustodianWallet extends LegacyWallet {
|
||||
constructor() {
|
||||
super();
|
||||
this.type = 'lightningCustodianWallet';
|
||||
this.pendingTransactions = [];
|
||||
this.token = false;
|
||||
this.tokenRefreshedOn = 0;
|
||||
this._api = new Frisbee({
|
||||
baseURI: 'https://api.blockcypher.com/v1/btc/main/addrs/',
|
||||
});
|
||||
}
|
||||
|
||||
async createAccount() {}
|
||||
|
||||
async authorize() {}
|
||||
|
||||
async getToken() {}
|
||||
|
||||
async getBtcAddress() {}
|
||||
|
||||
async newBtcAddress() {}
|
||||
|
||||
async getPendngBalance() {}
|
||||
|
||||
async decodeInvoice() {}
|
||||
|
||||
async checkRoute() {}
|
||||
|
||||
async payInvoice() {}
|
||||
|
||||
async sendCoins() {}
|
||||
|
||||
async getTransactions() {}
|
||||
|
||||
async getTransaction() {}
|
||||
|
||||
async getBalance() {}
|
||||
|
||||
async getInfo() {}
|
||||
}
|
Loading…
Reference in New Issue
Block a user