Files
ark/client/receive.go
Pietralberto Mazza 6d0d03e316 Cleanup (#121)
* Cleanup common

* Cleanup client

* Cleanup server

* Renamings

* Tidy up proto

* Update ocean protos

* Fixes

* Fixes
2024-02-28 18:05:03 +01:00

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,
})
}