ceremonyclient/client/cmd/mutualTransfer.go

40 lines
833 B
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package cmd
import (
"fmt"
"os"
"time"
"github.com/spf13/cobra"
)
var mutualTransferCmd = &cobra.Command{
Use: "mutual-transfer",
Short: "Initiates a mutual transfer",
Long: `Initiates a mutual transfer:
mutual-transfer <Rendezvous> (<Amount>|<OfCoin>)
Rendezvous - the rendezvous point to connect to the recipient
Amount the amount to send, splitting/merging and sending as needed
OfCoin the address of the coin to send in whole
Either Amount or OfCoin must be specified
`,
Run: func(cmd *cobra.Command, args []string) {
if len(args) != 2 {
fmt.Println("invalid command")
os.Exit(1)
}
fmt.Printf("Confirming rendezvous... ")
time.Sleep(500 * time.Millisecond)
fmt.Println("OK")
fmt.Println("50 QUIL (Coin [private])")
},
}
func init() {
tokenCmd.AddCommand(mutualTransferCmd)
}