2024-09-25 19:45:28 -04:00
|
|
|
package cli
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"github.com/spf13/cobra"
|
|
|
|
|
|
|
|
|
|
"github.com/cosmos/cosmos-sdk/client"
|
|
|
|
|
|
2025-10-03 14:45:52 -04:00
|
|
|
"github.com/sonr-io/sonr/x/dwn/types"
|
2024-09-25 19:45:28 -04:00
|
|
|
)
|
|
|
|
|
|
2025-10-03 14:45:52 -04:00
|
|
|
// NewTxCmd returns the root transaction command for the DWN module
|
2024-09-25 19:45:28 -04:00
|
|
|
func NewTxCmd() *cobra.Command {
|
|
|
|
|
txCmd := &cobra.Command{
|
|
|
|
|
Use: types.ModuleName,
|
2025-10-03 14:45:52 -04:00
|
|
|
Short: "Transaction commands for " + types.ModuleName,
|
2024-09-25 19:45:28 -04:00
|
|
|
DisableFlagParsing: true,
|
|
|
|
|
SuggestionsMinimumDistance: 2,
|
|
|
|
|
RunE: client.ValidateCmd,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
txCmd.AddCommand(
|
2025-10-03 14:45:52 -04:00
|
|
|
GetWalletTxCommands(),
|
2024-09-25 19:45:28 -04:00
|
|
|
)
|
|
|
|
|
|
2025-10-03 14:45:52 -04:00
|
|
|
return txCmd
|
2024-09-25 19:45:28 -04:00
|
|
|
}
|