Files
ark/noah/receive.go
Pietralberto Mazza d150c4bbac Add support for collaborative redemption of vtxos & Changes to ark wallet (#72)
* Add internal support for collaborative exit

* Update protos and interface layer

* Fixes after proto updates

* Fix printing json & Do not print ark pubkey in config

* Add collaborative redeem command

* Polish

* Add address validation

* Fix building tree without right branch

* Fixes and validation checks

* Fixes

* Fix counting complete queued payments

* Add relays

* Add and compute onchain balance concurrently

* Tiny refactor

* Merge `config connect` into `init` cmd
2023-12-29 17:09:50 +01:00

30 lines
592 B
Go

package main
import (
"github.com/urfave/cli/v2"
)
var receiveCommand = cli.Command{
Name: "receive",
Usage: "Print the Ark address associated with your wallet and the connected Ark",
Action: receiveAction,
}
func receiveAction(ctx *cli.Context) error {
offchainAddr, onchainAddr, err := getAddress()
if err != nil {
return err
}
state, err := getState()
if err != nil {
return err
}
relays := []string{state["ark_url"]}
return printJSON(map[string]interface{}{
"offchain_address": offchainAddr,
"onchain_address": onchainAddr,
"relays": relays,
})
}