status-go/protocol/requests/send_transaction.go
frank 735a422230
chore_: create v2 endpoints for status.go to solve EndpointsUnsupported in endpoints.go (#5943)
* chore_: create v2 endpoints for status.go to use status-backend server

* feat_: support using http for media server (#6060)
2024-11-19 09:31:29 +00:00

20 lines
527 B
Go

package requests
import (
"gopkg.in/go-playground/validator.v9"
"github.com/status-im/status-go/transactions"
)
// SendTransaction represents a request to send a transaction.
type SendTransaction struct {
TxArgs transactions.SendTxArgs `json:"txArgs"`
Password string `json:"password" validate:"required"`
}
// Validate checks the fields of SendTransaction to ensure they meet the requirements.
func (st *SendTransaction) Validate() error {
validate := validator.New()
return validate.Struct(st)
}