Documentation ¶
Index ¶
- type ManagerHandler
- func (h *ManagerHandler) CreateAsset(rw http.ResponseWriter, req *http.Request)
- func (h *ManagerHandler) DestroyAsset(rw http.ResponseWriter, req *http.Request)
- func (h *ManagerHandler) EncodeMnemonic(rw http.ResponseWriter, req *http.Request)
- func (h *ManagerHandler) FreezeAsset(rw http.ResponseWriter, req *http.Request)
- func (h *ManagerHandler) GetAssets(rw http.ResponseWriter, req *http.Request)
- func (h *ManagerHandler) ModifyAsset(rw http.ResponseWriter, req *http.Request)
- func (h *ManagerHandler) RevokeAsset(rw http.ResponseWriter, req *http.Request)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ManagerHandler ¶
type ManagerHandler struct {
// contains filtered or unexported fields
}
ManagerHandler is the router handler for Mango
func NewManagerHandler ¶
func NewManagerHandler(log *logrus.Logger, testnetAlgod, mainnetAlgod *algod.Client, jwt *jwtauth.JWTAuth) *ManagerHandler
NewManagerHandler creates a new instance of ManagerHandler
func (*ManagerHandler) CreateAsset ¶
func (h *ManagerHandler) CreateAsset(rw http.ResponseWriter, req *http.Request)
CreateAsset takes in a JSON body of type AssetCreate and creates a new ASA on Algorand
func (*ManagerHandler) DestroyAsset ¶
func (h *ManagerHandler) DestroyAsset(rw http.ResponseWriter, req *http.Request)
DestroyAsset broadcasts a destroy asset transaction
func (*ManagerHandler) EncodeMnemonic ¶
func (h *ManagerHandler) EncodeMnemonic(rw http.ResponseWriter, req *http.Request)
EncodeMnemonic accepts JSON body of the form { "mnemonic" : "abcd" } and converts it into a JWT and send it to web
func (*ManagerHandler) FreezeAsset ¶
func (h *ManagerHandler) FreezeAsset(rw http.ResponseWriter, req *http.Request)
FreezeAsset is used to broadcast a freeze asset txn for some address
func (*ManagerHandler) GetAssets ¶
func (h *ManagerHandler) GetAssets(rw http.ResponseWriter, req *http.Request)
GetAssets accepts a JSON body of the form { "address" : "example" } and returns a list of all assets owned by the address (created on Mango)
func (*ManagerHandler) ModifyAsset ¶
func (h *ManagerHandler) ModifyAsset(rw http.ResponseWriter, req *http.Request)
ModifyAsset is used to modify the mutable addresses linked to an asset
func (*ManagerHandler) RevokeAsset ¶
func (h *ManagerHandler) RevokeAsset(rw http.ResponseWriter, req *http.Request)
RevokeAsset broadcasts a revoke (clawback) txn for some address