-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(connext): add v2 vector support
- Loading branch information
Karl Ranna
committed
Dec 3, 2020
1 parent
360cca7
commit d850f7e
Showing
37 changed files
with
1,581 additions
and
1,266 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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)); | ||
}; |
Oops, something went wrong.