Documentation ¶
Index ¶
- type RequestCreate
- type RequestDelete
- type RequestRecover
- type RequestSign
- type RequestUpdate
- type ResponseCreate
- type ResponseRecover
- type ServiceKeys
- func (s *ServiceKeys) Create(w http.ResponseWriter, r *http.Request)
- func (s *ServiceKeys) Delete(w http.ResponseWriter, r *http.Request)
- func (s *ServiceKeys) Get(w http.ResponseWriter, r *http.Request)
- func (s *ServiceKeys) List(w http.ResponseWriter, r *http.Request)
- func (s *ServiceKeys) Recover(w http.ResponseWriter, r *http.Request)
- func (s *ServiceKeys) RegisterCRUD(r *mux.Router) error
- func (s *ServiceKeys) RegisterSignTx(r *mux.Router) error
- func (s *ServiceKeys) SignTx(w http.ResponseWriter, r *http.Request)
- func (s *ServiceKeys) Update(w http.ResponseWriter, r *http.Request)
- type ServiceTxs
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RequestCreate ¶ added in v0.8.0
type RequestDelete ¶ added in v0.8.0
type RequestRecover ¶ added in v0.8.0
type RequestRecover struct { Name string `json:"name,omitempty" validate:"required,min=3,printascii"` Passphrase string `json:"password,omitempty" validate:"required,min=10"` Seed string `json:"seed_phrase,omitempty" validate:"required,min=23"` // Algo is the requested algorithm to create the key Algo string `json:"algo,omitempty"` }
type RequestSign ¶ added in v0.8.0
type RequestUpdate ¶ added in v0.8.0
type ResponseCreate ¶ added in v0.8.0
type ResponseRecover ¶ added in v0.8.0
type ServiceKeys ¶ added in v0.8.0
type ServiceKeys struct {
// contains filtered or unexported fields
}
ServiceKeys exposes a REST API service for managing keys and signing transactions
func NewServiceKeys ¶ added in v0.8.0
func NewServiceKeys(manager keys.Manager) *ServiceKeys
New returns a new instance of the keys service
func (*ServiceKeys) Create ¶ added in v0.8.0
func (s *ServiceKeys) Create(w http.ResponseWriter, r *http.Request)
func (*ServiceKeys) Delete ¶ added in v0.8.0
func (s *ServiceKeys) Delete(w http.ResponseWriter, r *http.Request)
func (*ServiceKeys) Get ¶ added in v0.8.0
func (s *ServiceKeys) Get(w http.ResponseWriter, r *http.Request)
func (*ServiceKeys) List ¶ added in v0.8.0
func (s *ServiceKeys) List(w http.ResponseWriter, r *http.Request)
func (*ServiceKeys) Recover ¶ added in v0.8.0
func (s *ServiceKeys) Recover(w http.ResponseWriter, r *http.Request)
func (*ServiceKeys) RegisterCRUD ¶ added in v0.8.0
func (s *ServiceKeys) RegisterCRUD(r *mux.Router) error
RegisterCRUD is a convenience method to register all CRUD for keys to allow access by methods and routes: POST: /keys POST: /keys/recover GET: /keys GET: /keys/{name} POST, PUT: /keys/{name} DELETE: /keys/{name}
func (*ServiceKeys) RegisterSignTx ¶ added in v0.8.0
func (s *ServiceKeys) RegisterSignTx(r *mux.Router) error
RegisterSignTx is a mux.Router handler that exposes POST method access to sign a transaction.
func (*ServiceKeys) SignTx ¶ added in v0.8.0
func (s *ServiceKeys) SignTx(w http.ResponseWriter, r *http.Request)
func (*ServiceKeys) Update ¶ added in v0.8.0
func (s *ServiceKeys) Update(w http.ResponseWriter, r *http.Request)
type ServiceTxs ¶ added in v0.8.0
type ServiceTxs struct {
// contains filtered or unexported fields
}
ServiceTxs exposes a REST API service for sendings txs. It wraps a Tendermint RPC client.
func NewServiceTxs ¶ added in v0.8.0
func NewServiceTxs(c rpcclient.Client) *ServiceTxs
func (*ServiceTxs) PostTx ¶ added in v0.8.0
func (s *ServiceTxs) PostTx(w http.ResponseWriter, r *http.Request)
func (*ServiceTxs) RegisterPostTx ¶ added in v0.8.0
func (s *ServiceTxs) RegisterPostTx(r *mux.Router) error
RegisterPostTx is a mux.Router handler that exposes POST method access to post a transaction to the blockchain.