cic-custodial/internal/api/types.go
Mohammed Sohail 2ca0d23c3c
feat: add transfer handler and input validation
* validate incoming api requests
* fix transfer ABI encoder
2022-11-30 15:18:01 +00:00

21 lines
431 B
Go

package api
const (
INTERNAL_ERROR = "ERR_INTERNAL"
KEYPAIR_ERROR = "ERR_GEN_KEYPAIR"
JSON_MARSHAL_ERROR = "ERR_PAYLOAD_SERIALIZATION"
TASK_CHAIN_ERROR = "ERR_START_TASK_CHAIN"
VALIDATION_ERROR = "ERR_VALIDATE"
BIND_ERROR = "ERR_BIND"
)
type okResp struct {
Ok bool `json:"ok"`
Data interface{} `json:"data"`
}
type errResp struct {
Ok bool `json:"ok"`
Error string `json:"error"`
}