Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add connext vector support #1938

Merged
1 commit merged into from
Dec 7, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions docs/api.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 0 additions & 12 deletions lib/Xud.ts
Original file line number Diff line number Diff line change
Expand Up @@ -245,19 +245,7 @@ class Xud extends EventEmitter {
// minimum channelBalance threshold
minChannelAmount: 100000000,
},
{
currency: 'USDT',
channelAmount: 100000000000,
minChannelAmount: 100000000,
},
{
currency: 'DAI',
channelAmount: 150000000000,
minChannelAmount: 100000000,
},
],
// we check the channel and on-chain balance every 10 seconds
// and refund from faucet if below the walletAmount
retryInterval: 10000,
}).subscribe({
next: (currency) => {
Expand Down
2 changes: 1 addition & 1 deletion lib/cli/commands/closechannel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export const builder = (argv: Argv) => argv
.example('$0 closechannel BTC CheeseMonkey', 'close BTC channels by alias')
.example('$0 closechannel BTC CheeseMonkey --force', 'force close BTC channels by alias')
.example('$0 closechannel BTC CheeseMonkey --fee 25', 'close BTC channels by alias with 25 sat/byte fee')
.example('$0 closechannel ETH --amount 0.1', 'remove 0.1 ETH from a Connext channel');
.example('$0 closechannel ETH --amount 0.1 --destination 0x7d3447e35c73903C971761AF3DBa76cDB1Cd07e2', 'remove 0.1 ETH from a Connext channel');

export const handler = async (argv: Arguments<any>) => {
const request = new CloseChannelRequest();
Expand Down
28 changes: 28 additions & 0 deletions lib/cli/commands/deposit.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import { Arguments, Argv } from 'yargs';
import { DepositRequest, DepositResponse } from '../../proto/xudrpc_pb';
import { callback, loadXudClient } from '../command';

export const command = 'deposit <currency>';

export const describe = 'gets an address to deposit funds to a channel';

export const builder = (argv: Argv) => argv
.positional('currency', {
description: 'the ticker symbol of the currency to deposit.',
type: 'string',
})
.example('$0 deposit ETH', 'get a ETH deposit address');

const openChannelText = (depositAddressResponse: DepositResponse.AsObject) => {
console.log(`
You will receive your deposit in the connext channel.

Your deposit address is: ${depositAddressResponse.address}
`);
};

export const handler = async (argv: Arguments<any>) => {
const request = new DepositRequest();
request.setCurrency(argv.currency.toUpperCase());
(await loadXudClient(argv)).deposit(request, callback(argv, openChannelText));
};
Loading