diff --git a/cmd/celestia/internal/rpc/blob.go b/nodebuilder/blob/cmds/blob.go similarity index 97% rename from cmd/celestia/internal/rpc/blob.go rename to nodebuilder/blob/cmds/blob.go index 236cc75b67..2c98113150 100644 --- a/cmd/celestia/internal/rpc/blob.go +++ b/nodebuilder/blob/cmds/blob.go @@ -2,6 +2,7 @@ package rpc import ( "encoding/base64" + "encoding/hex" "fmt" "reflect" "strconv" @@ -112,7 +113,9 @@ var getAllCmd = &cobra.Command{ } blobs, err := internal.RPCClient.Blob.GetAll(cmd.Context(), height, []share.Namespace{namespace}) - + fmt.Println(hex.EncodeToString(blobs[0].Namespace().ID())) + fmt.Println(blobs[0].Namespace().ID()) + fmt.Println(blobs[0].Namespace()) formatter := formatData if base64Flag || err != nil { formatter = nil diff --git a/cmd/celestia/internal/rpc/das.go b/nodebuilder/das/cmds/das.go similarity index 100% rename from cmd/celestia/internal/rpc/das.go rename to nodebuilder/das/cmds/das.go diff --git a/cmd/celestia/internal/rpc/header.go b/nodebuilder/header/cmds/header.go similarity index 100% rename from cmd/celestia/internal/rpc/header.go rename to nodebuilder/header/cmds/header.go diff --git a/cmd/celestia/internal/admin/admin.go b/nodebuilder/node/cmds/admin.go similarity index 100% rename from cmd/celestia/internal/admin/admin.go rename to nodebuilder/node/cmds/admin.go diff --git a/cmd/celestia/internal/rpc/p2p.go b/nodebuilder/p2p/cmds/p2p.go similarity index 100% rename from cmd/celestia/internal/rpc/p2p.go rename to nodebuilder/p2p/cmds/p2p.go diff --git a/cmd/celestia/internal/rpc/share.go b/nodebuilder/share/cmds/share.go similarity index 100% rename from cmd/celestia/internal/rpc/share.go rename to nodebuilder/share/cmds/share.go diff --git a/cmd/celestia/internal/rpc/state.go b/nodebuilder/state/cmds/state.go similarity index 99% rename from cmd/celestia/internal/rpc/state.go rename to nodebuilder/state/cmds/state.go index 24ed96a24c..eff2f487c3 100644 --- a/cmd/celestia/internal/rpc/state.go +++ b/nodebuilder/state/cmds/state.go @@ -1,6 +1,7 @@ package rpc import ( + "encoding/hex" "fmt" "strconv" @@ -121,13 +122,15 @@ var submitTxCmd = &cobra.Command{ Short: "Submits the given transaction/message to the Celestia network and blocks until the tx is included in a block.", Args: cobra.ExactArgs(1), RunE: func(cmd *cobra.Command, args []string) error { - rawTx, err := internal.DecodeToBytes(args[0]) + decoded, err := hex.DecodeString(args[0]) if err != nil { return fmt.Errorf("failed to decode tx: %v", err) } + + fmt.Println(args[0]) txResponse, err := internal.RPCClient.State.SubmitTx( cmd.Context(), - rawTx, + decoded, ) return internal.PrintOutput(txResponse, err, nil) },