Overtorment
6 years ago
3 changed files with 56 additions and 0 deletions
@ -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'); |
|||
}); |
@ -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