mirror of
https://github.com/aljazceru/ark.git
synced 2025-12-17 12:14:21 +01:00
* Cleanup common * Cleanup client * Cleanup server * Renamings * Tidy up proto * Update ocean protos * Fixes * Fixes
24 lines
438 B
Go
24 lines
438 B
Go
package main
|
|
|
|
import (
|
|
"github.com/urfave/cli/v2"
|
|
)
|
|
|
|
var receiveCommand = cli.Command{
|
|
Name: "receive",
|
|
Usage: "Shows both onchain and offchain addresses",
|
|
Action: receiveAction,
|
|
}
|
|
|
|
func receiveAction(ctx *cli.Context) error {
|
|
offchainAddr, onchainAddr, _, err := getAddress()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
return printJSON(map[string]interface{}{
|
|
"offchain_address": offchainAddr,
|
|
"onchain_address": onchainAddr,
|
|
})
|
|
}
|