Commit 510c83eb authored by lihailei's avatar lihailei

add contract module.

parent 6cb3e653
......@@ -6,6 +6,11 @@ import (
log "github.com/inconshreveable/log15"
jsonrpc "gitlab.33.cn/chain33/chain33/rpc"
"os"
crypto "gitlab.33.cn/chain33/chain33/common/crypto"
"gitlab.33.cn/chain33/chain33/types"
common "gitlab.33.cn/chain33/chain33/common"
"gitlab.33.cn/chain33/chain33/account"
)
var (
......@@ -102,3 +107,45 @@ func (c *RpcCtx) ReplyInterface() (interface{}, error) {
}
return result, nil
}
func (c *RpcCtx) RunWithoutMarshal()(string,error) {
var res string
rpc, err := jsonrpc.NewJSONClient(c.Addr)
if err != nil {
fmt.Fprintln(os.Stderr, err)
return "",err
}
err = rpc.Call(c.Method, c.Params, &res)
if err != nil {
fmt.Fprintln(os.Stderr, err)
return "",err
}
return res,nil
}
func Getprivkey(key string) crypto.PrivKey {
cr, err := crypto.New(types.GetSignatureTypeName(types.SECP256K1))
if err != nil {
panic(err)
}
bkey, err := common.FromHex(key)
if err != nil {
panic(err)
}
priv, err := cr.PrivKeyFromBytes(bkey)
if err != nil {
panic(err)
}
return priv
}
func Genaddress() (string, crypto.PrivKey) {
cr, err := crypto.New(types.GetSignatureTypeName(types.SECP256K1))
if err != nil {
panic(err)
}
privto, err := cr.GenKey()
if err != nil {
panic(err)
}
addrto := account.PubKeyToAddress(privto.PubKey().Bytes())
return addrto.String(), privto
}
\ No newline at end of file
package common
const (
Code_10000 = "10000"
Code_10001 = "10001"
Code_10002 = "10002"
Code_10000 = "10000" //正常响应
Code_10001 = "10001" //请求参数错误响应
Code_10002 = "10002" //接口错误
//code_10003="10003"
)
const (
......
......@@ -4,6 +4,6 @@ runmode = dev
autorender = false
copyrequestbody = true
EnableDocs = true
jrpcAddr="http://localhost:8801"
jrpcAddr="http://139.219.190.149:8801"
LocalFilePath="D:/Repository/src/gitlab.33.cn/lihailei/chain33_sdk/src/upload/pkg/chain33.tgz"
EtcdURL="http://localhost:2379"
package controllers
import (
"github.com/astaxie/beego"
"gitlab.33.cn/chain33/chain33/account"
. "gitlab.33.cn/chain33/chain33/common"
jsonrpc "gitlab.33.cn/chain33/chain33/rpc"
"gitlab.33.cn/chain33/chain33/types"
. "gitlab.33.cn/lihailei/chain33_sdk/src/common"
blacklist "gitlab.33.cn/lihailei/chain33_sdk/src/models/contract/blacklist/types"
r "math/rand"
"net/http"
"encoding/json"
"fmt"
)
// ContractController operations for Peer
type ContractController struct {
beego.Controller
}
// URLMapping ...
func (c *ContractController) URLMapping() {
c.Mapping("invoke", c.Invoke)
}
//@Title Invoke
//@Description Invoke contract func.
//@Success 200 执行成功
//@Failure 403 Forbidden禁止执行
//@router /invoke [post,get]
func (c *ContractController) Invoke() {
execerName := c.Ctx.Request.Header.Get("execerName")
funcName := c.Ctx.Request.Header.Get("funcName")
fmt.Println(funcName)
if c.Ctx.Request.Method==http.MethodGet{
switch execerName {
//TODO:具体调用合约方法的业务逻辑在这里面实现
case "user.blacklist":
switch funcName {
case blacklist.FuncName_QueryOrgById:
var req types.Query
req.Execer=[]byte(c.Ctx.Request.Header.Get("execerName"))
req.FuncName=c.Ctx.Request.Header.Get("funcName")
qb := &blacklist.QueryOrgParam{}
qb.OrgId =c.Ctx.Request.Header.Get("orgId")
query := &blacklist.Query{&blacklist.Query_QueryOrg{qb}, ""}
b,_:=json.Marshal(query)
req.Payload=b
data,err:=queryChain(req)
if err != nil {
c.Data["json"] = err.Error()
c.ServeJSON()
} else {
c.Ctx.ResponseWriter.Write(data)
}
case "normPut":
execer := c.GetString("execerName")
privKey := c.GetString("privateKey")
body := c.Ctx.Input.RequestBody
if execer == "" || privKey == "" || len(body) == 0 {
c.Ctx.ResponseWriter.WriteHeader(400)
return
}
res, err := sendTx(execer, privKey, body)
if err != nil {
c.Data["json"] = err.Error()
c.ServeJSON()
} else {
c.Data["json"] = res
c.ServeJSON()
}
default:
//TODO:
}
case "":
default:
}
}else if c.Ctx.Request.Method==http.MethodPost{
fmt.Println("11111111111111")
fmt.Println("name======",execerName)
switch execerName {
//TODO:具体调用合约方法的业务逻辑在这里面实现
case "user.blacklist":
switch funcName {
case blacklist.FuncName_CreateOrg:
fmt.Println("222222222222222222")
org := &blacklist.Org{}
org.OrgId = c.Ctx.Request.Header.Get("orgId")
org.OrgName = c.Ctx.Request.Header.Get("orgName")
action := &blacklist.BlackAction{Value: &blacklist.BlackAction_Or{org}, FuncName: blacklist.FuncName_CreateOrg}
//nput := &types.NormAction_Nput{&types.NormPut{Key: key,Value: []byte(value)}}
//action := &types.NormAction{Value: nput, Ty: types.NormActionPut}
privKey := c.Ctx.Request.Header.Get("privateKey")
fmt.Println(privKey)
res, err := sendTx(execerName, privKey, types.Encode(action))
fmt.Println("333333333333333333333333")
fmt.Println(res)
if err != nil {
c.Data["json"] = err.Error()
c.ServeJSON()
} else {
c.Data["json"] = res
c.ServeJSON()
}
return
case "normPut":
//TODO:
execer := c.GetString("execerName")
privKey := c.GetString("privateKey")
body := c.Ctx.Input.RequestBody
if execer == "" || privKey == "" || len(body) == 0 {
c.Ctx.ResponseWriter.WriteHeader(400)
return
}
res, err := sendTx(execer, privKey, body)
if err != nil {
c.Data["json"] = err.Error()
c.ServeJSON()
} else {
c.Data["json"] = res
c.ServeJSON()
}
default:
//TODO:
}
case "":
default:
}
}
}
func sendTx(execer string, privKey string, body []byte) (string, error) {
tx := &types.Transaction{Execer: []byte(execer), Payload: body, Fee: 1e6}
tx.Nonce = r.Int63()
address,priv:=Genaddress()
fmt.Println("address:",address)
//tx.Sign(types.SECP256K1, Getprivkey(privKey))
tx.Sign(types.SECP256K1, priv)
tx.To = account.ExecAddress(execer).String()
data := ToHex(types.Encode(tx))
params := jsonrpc.RawParm{
Data: data,
}
ctx := NewRpcCtx(GetJrpcURL(), "Chain33.SendTransaction", params, nil)
res, err := ctx.RunWithoutMarshal()
fmt.Println("===========",res)
return res, err
}
func queryChain(req types.Query) ([]byte, error) {
var res interface{}
//req.Execer = []byte("norm")
//req.FuncName = "NormGet"
//req.Payload = []byte(key)
ctx := NewRpcCtx(GetJrpcURL(), "Chain33.Query", req, &res)
data, err := ctx.ReplyData()
return data, err
}
......@@ -4,8 +4,11 @@ import (
"github.com/astaxie/beego"
jsonrpc "gitlab.33.cn/chain33/chain33/rpc"
"gitlab.33.cn/chain33/chain33/types"
"gitlab.33.cn/chain33/chain33/account"
. "gitlab.33.cn/lihailei/chain33_sdk/src/common"
. "gitlab.33.cn/lihailei/chain33_sdk/src/models"
. "gitlab.33.cn/chain33/chain33/common"
r "math/rand"
)
// TxController operations for Tx
......@@ -17,6 +20,7 @@ type TxController struct {
func (c *TxController) URLMapping() {
c.Mapping("queryTxByHash", c.QueryTxByHash)
c.Mapping("queryTxByAddr", c.QueryTxByAddr)
c.Mapping("sendTx", c.SendTx)
}
//queryTxByHash...
......@@ -109,3 +113,39 @@ func queryByHash(rpcAddr, txHash string) ([]byte, error) {
ctx.SetResultCb(ParseQueryTxRes)
return ctx.ReplyData()
}
//SendTX
//@Title SendTX
//@Description SendTX
//@Param execerName query string true "执行器名称"
//@Param privateKey query string true "私钥"
//@Success 200 执行成功返回交易信息
//@Failure 403 Forbidden禁止执行
//@Failure 400 传入参数有误
// @router /sendTX [post]
func(c *TxController) SendTx(){
execer := c.GetString("execerName")
privKey := c.GetString("privateKey")
body :=c.Ctx.Input.RequestBody
if execer ==""||privKey==""||len(body)==0{
c.Ctx.ResponseWriter.WriteHeader(400)
return
}
tx := &types.Transaction{Execer: []byte(execer), Payload: body, Fee: 1e6}
tx.Nonce = r.Int63()
tx.Sign(types.SECP256K1, Getprivkey(privKey))
tx.To = account.ExecAddress(execer).String()
data := ToHex(types.Encode(tx))
params := jsonrpc.RawParm{
Data: data,
}
ctx := NewRpcCtx(GetJrpcURL(), "Chain33.SendTransaction", params, nil)
res,err:=ctx.RunWithoutMarshal()
if err != nil {
c.Data["json"] = err.Error()
c.ServeJSON()
} else {
c.Data["json"] = res
c.ServeJSON()
}
}
\ No newline at end of file
{"D:\\Repository\\src\\gitlab.33.cn\\lihailei\\chain33_sdk\\src\\controllers":1526631102104077000}
\ No newline at end of file
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: blacklist.proto
/*
Package types is a generated protocol buffer package.
It is generated from these files:
blacklist.proto
It has these top-level messages:
BlackAction
Record
Transaction
Org
Agency
Query
QueryOrgParam
QueryTransactionParam
QueryRecordParam
DeleteRecordParam
QueryKeyParam
User
*/
package types
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
type BlackAction struct {
// Types that are valid to be assigned to Value:
// *BlackAction_Rc
// *BlackAction_Or
// *BlackAction_Tr
// *BlackAction_Ac
// *BlackAction_User
Value isBlackAction_Value `protobuf_oneof:"value"`
FuncName string `protobuf:"bytes,2,opt,name=funcName" json:"funcName,omitempty"`
}
func (m *BlackAction) Reset() { *m = BlackAction{} }
func (m *BlackAction) String() string { return proto.CompactTextString(m) }
func (*BlackAction) ProtoMessage() {}
func (*BlackAction) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
type isBlackAction_Value interface {
isBlackAction_Value()
}
type BlackAction_Rc struct {
Rc *Record `protobuf:"bytes,1,opt,name=rc,oneof"`
}
type BlackAction_Or struct {
Or *Org `protobuf:"bytes,3,opt,name=or,oneof"`
}
type BlackAction_Tr struct {
Tr *Transaction `protobuf:"bytes,4,opt,name=tr,oneof"`
}
type BlackAction_Ac struct {
Ac *Agency `protobuf:"bytes,5,opt,name=ac,oneof"`
}
type BlackAction_User struct {
User *User `protobuf:"bytes,6,opt,name=user,oneof"`
}
func (*BlackAction_Rc) isBlackAction_Value() {}
func (*BlackAction_Or) isBlackAction_Value() {}
func (*BlackAction_Tr) isBlackAction_Value() {}
func (*BlackAction_Ac) isBlackAction_Value() {}
func (*BlackAction_User) isBlackAction_Value() {}
func (m *BlackAction) GetValue() isBlackAction_Value {
if m != nil {
return m.Value
}
return nil
}
func (m *BlackAction) GetRc() *Record {
if x, ok := m.GetValue().(*BlackAction_Rc); ok {
return x.Rc
}
return nil
}
func (m *BlackAction) GetOr() *Org {
if x, ok := m.GetValue().(*BlackAction_Or); ok {
return x.Or
}
return nil
}
func (m *BlackAction) GetTr() *Transaction {
if x, ok := m.GetValue().(*BlackAction_Tr); ok {
return x.Tr
}
return nil
}
func (m *BlackAction) GetAc() *Agency {
if x, ok := m.GetValue().(*BlackAction_Ac); ok {
return x.Ac
}
return nil
}
func (m *BlackAction) GetUser() *User {
if x, ok := m.GetValue().(*BlackAction_User); ok {
return x.User
}
return nil
}
func (m *BlackAction) GetFuncName() string {
if m != nil {
return m.FuncName
}
return ""
}
// XXX_OneofFuncs is for the internal use of the proto package.
func (*BlackAction) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
return _BlackAction_OneofMarshaler, _BlackAction_OneofUnmarshaler, _BlackAction_OneofSizer, []interface{}{
(*BlackAction_Rc)(nil),
(*BlackAction_Or)(nil),
(*BlackAction_Tr)(nil),
(*BlackAction_Ac)(nil),
(*BlackAction_User)(nil),
}
}
func _BlackAction_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
m := msg.(*BlackAction)
// value
switch x := m.Value.(type) {
case *BlackAction_Rc:
b.EncodeVarint(1<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.Rc); err != nil {
return err
}
case *BlackAction_Or:
b.EncodeVarint(3<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.Or); err != nil {
return err
}
case *BlackAction_Tr:
b.EncodeVarint(4<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.Tr); err != nil {
return err
}
case *BlackAction_Ac:
b.EncodeVarint(5<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.Ac); err != nil {
return err
}
case *BlackAction_User:
b.EncodeVarint(6<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.User); err != nil {
return err
}
case nil:
default:
return fmt.Errorf("BlackAction.Value has unexpected type %T", x)
}
return nil
}
func _BlackAction_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
m := msg.(*BlackAction)
switch tag {
case 1: // value.rc
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(Record)
err := b.DecodeMessage(msg)
m.Value = &BlackAction_Rc{msg}
return true, err
case 3: // value.or
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(Org)
err := b.DecodeMessage(msg)
m.Value = &BlackAction_Or{msg}
return true, err
case 4: // value.tr
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(Transaction)
err := b.DecodeMessage(msg)
m.Value = &BlackAction_Tr{msg}
return true, err
case 5: // value.ac
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(Agency)
err := b.DecodeMessage(msg)
m.Value = &BlackAction_Ac{msg}
return true, err
case 6: // value.user
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(User)
err := b.DecodeMessage(msg)
m.Value = &BlackAction_User{msg}
return true, err
default:
return false, nil
}
}
func _BlackAction_OneofSizer(msg proto.Message) (n int) {
m := msg.(*BlackAction)
// value
switch x := m.Value.(type) {
case *BlackAction_Rc:
s := proto.Size(x.Rc)
n += proto.SizeVarint(1<<3 | proto.WireBytes)
n += proto.SizeVarint(uint64(s))
n += s
case *BlackAction_Or:
s := proto.Size(x.Or)
n += proto.SizeVarint(3<<3 | proto.WireBytes)
n += proto.SizeVarint(uint64(s))
n += s
case *BlackAction_Tr:
s := proto.Size(x.Tr)
n += proto.SizeVarint(4<<3 | proto.WireBytes)
n += proto.SizeVarint(uint64(s))
n += s
case *BlackAction_Ac:
s := proto.Size(x.Ac)
n += proto.SizeVarint(5<<3 | proto.WireBytes)
n += proto.SizeVarint(uint64(s))
n += s
case *BlackAction_User:
s := proto.Size(x.User)
n += proto.SizeVarint(6<<3 | proto.WireBytes)
n += proto.SizeVarint(uint64(s))
n += s
case nil:
default:
panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
}
return n
}
type Record struct {
RecordId string `protobuf:"bytes,1,opt,name=recordId" json:"recordId,omitempty"`
DocType string `protobuf:"bytes,2,opt,name=docType" json:"docType,omitempty"`
ClientId string `protobuf:"bytes,3,opt,name=clientId" json:"clientId,omitempty"`
ClientName string `protobuf:"bytes,4,opt,name=clientName" json:"clientName,omitempty"`
NegativeType string `protobuf:"bytes,5,opt,name=negativeType" json:"negativeType,omitempty"`
NegativeSeverity string `protobuf:"bytes,6,opt,name=negativeSeverity" json:"negativeSeverity,omitempty"`
NegativeInfo string `protobuf:"bytes,7,opt,name=negativeInfo" json:"negativeInfo,omitempty"`
OrgAddr string `protobuf:"bytes,8,opt,name=orgAddr" json:"orgAddr,omitempty"`
Searchable bool `protobuf:"varint,9,opt,name=searchable" json:"searchable,omitempty"`
CreateTime string `protobuf:"bytes,10,opt,name=createTime" json:"createTime,omitempty"`
UpdateTime string `protobuf:"bytes,11,opt,name=updateTime" json:"updateTime,omitempty"`
OrgId string `protobuf:"bytes,12,opt,name=orgId" json:"orgId,omitempty"`
}
func (m *Record) Reset() { *m = Record{} }
func (m *Record) String() string { return proto.CompactTextString(m) }
func (*Record) ProtoMessage() {}
func (*Record) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
func (m *Record) GetRecordId() string {
if m != nil {
return m.RecordId
}
return ""
}
func (m *Record) GetDocType() string {
if m != nil {
return m.DocType
}
return ""
}
func (m *Record) GetClientId() string {
if m != nil {
return m.ClientId
}
return ""
}
func (m *Record) GetClientName() string {
if m != nil {
return m.ClientName
}
return ""
}
func (m *Record) GetNegativeType() string {
if m != nil {
return m.NegativeType
}
return ""
}
func (m *Record) GetNegativeSeverity() string {
if m != nil {
return m.NegativeSeverity
}
return ""
}
func (m *Record) GetNegativeInfo() string {
if m != nil {
return m.NegativeInfo
}
return ""
}
func (m *Record) GetOrgAddr() string {
if m != nil {
return m.OrgAddr
}
return ""
}
func (m *Record) GetSearchable() bool {
if m != nil {
return m.Searchable
}
return false
}
func (m *Record) GetCreateTime() string {
if m != nil {
return m.CreateTime
}
return ""
}
func (m *Record) GetUpdateTime() string {
if m != nil {
return m.UpdateTime
}
return ""
}
func (m *Record) GetOrgId() string {
if m != nil {
return m.OrgId
}
return ""
}
type Transaction struct {
DocType string `protobuf:"bytes,1,opt,name=docType" json:"docType,omitempty"`
TxId string `protobuf:"bytes,2,opt,name=txId" json:"txId,omitempty"`
From string `protobuf:"bytes,3,opt,name=from" json:"from,omitempty"`
To string `protobuf:"bytes,4,opt,name=to" json:"to,omitempty"`
Credit int64 `protobuf:"varint,5,opt,name=credit" json:"credit,omitempty"`
CreateTime string `protobuf:"bytes,6,opt,name=createTime" json:"createTime,omitempty"`
UpdateTime string `protobuf:"bytes,7,opt,name=updateTime" json:"updateTime,omitempty"`
}
func (m *Transaction) Reset() { *m = Transaction{} }
func (m *Transaction) String() string { return proto.CompactTextString(m) }
func (*Transaction) ProtoMessage() {}
func (*Transaction) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }
func (m *Transaction) GetDocType() string {
if m != nil {
return m.DocType
}
return ""
}
func (m *Transaction) GetTxId() string {
if m != nil {
return m.TxId
}
return ""
}
func (m *Transaction) GetFrom() string {
if m != nil {
return m.From
}
return ""
}
func (m *Transaction) GetTo() string {
if m != nil {
return m.To
}
return ""
}
func (m *Transaction) GetCredit() int64 {
if m != nil {
return m.Credit
}
return 0
}
func (m *Transaction) GetCreateTime() string {
if m != nil {
return m.CreateTime
}
return ""
}
func (m *Transaction) GetUpdateTime() string {
if m != nil {
return m.UpdateTime
}
return ""
}
type Org struct {
DocType string `protobuf:"bytes,1,opt,name=docType" json:"docType,omitempty"`
OrgId string `protobuf:"bytes,2,opt,name=orgId" json:"orgId,omitempty"`
OrgName string `protobuf:"bytes,3,opt,name=orgName" json:"orgName,omitempty"`
OrgAddr string `protobuf:"bytes,4,opt,name=orgAddr" json:"orgAddr,omitempty"`
OrgCredit int64 `protobuf:"varint,5,opt,name=orgCredit" json:"orgCredit,omitempty"`
CreateTime string `protobuf:"bytes,6,opt,name=createTime" json:"createTime,omitempty"`
UpdateTime string `protobuf:"bytes,7,opt,name=updateTime" json:"updateTime,omitempty"`
}
func (m *Org) Reset() { *m = Org{} }
func (m *Org) String() string { return proto.CompactTextString(m) }
func (*Org) ProtoMessage() {}
func (*Org) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} }
func (m *Org) GetDocType() string {
if m != nil {
return m.DocType
}
return ""
}
func (m *Org) GetOrgId() string {
if m != nil {
return m.OrgId
}
return ""
}
func (m *Org) GetOrgName() string {
if m != nil {
return m.OrgName
}
return ""
}
func (m *Org) GetOrgAddr() string {
if m != nil {
return m.OrgAddr
}
return ""
}
func (m *Org) GetOrgCredit() int64 {
if m != nil {
return m.OrgCredit
}
return 0
}
func (m *Org) GetCreateTime() string {
if m != nil {
return m.CreateTime
}
return ""
}
func (m *Org) GetUpdateTime() string {
if m != nil {
return m.UpdateTime
}
return ""
}
type Agency struct {
Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
Addr string `protobuf:"bytes,2,opt,name=addr" json:"addr,omitempty"`
Credit int64 `protobuf:"varint,3,opt,name=credit" json:"credit,omitempty"`
IssueCredit int64 `protobuf:"varint,4,opt,name=issueCredit" json:"issueCredit,omitempty"`
CreateTime string `protobuf:"bytes,5,opt,name=createTime" json:"createTime,omitempty"`
UpdateTime string `protobuf:"bytes,6,opt,name=updateTime" json:"updateTime,omitempty"`
}
func (m *Agency) Reset() { *m = Agency{} }
func (m *Agency) String() string { return proto.CompactTextString(m) }
func (*Agency) ProtoMessage() {}
func (*Agency) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} }
func (m *Agency) GetName() string {
if m != nil {
return m.Name
}
return ""
}
func (m *Agency) GetAddr() string {
if m != nil {
return m.Addr
}
return ""
}
func (m *Agency) GetCredit() int64 {
if m != nil {
return m.Credit
}
return 0
}
func (m *Agency) GetIssueCredit() int64 {
if m != nil {
return m.IssueCredit
}
return 0
}
func (m *Agency) GetCreateTime() string {
if m != nil {
return m.CreateTime
}
return ""
}
func (m *Agency) GetUpdateTime() string {
if m != nil {
return m.UpdateTime
}
return ""
}
type Query struct {
// Types that are valid to be assigned to Value:
// *Query_QueryOrg
// *Query_QueryTransaction
// *Query_QueryRecord
// *Query_DelRecord
// *Query_LoginCheck
// *Query_QueryKey
Value isQuery_Value `protobuf_oneof:"value"`
PrivateKey string `protobuf:"bytes,5,opt,name=PrivateKey" json:"PrivateKey,omitempty"`
}
func (m *Query) Reset() { *m = Query{} }
func (m *Query) String() string { return proto.CompactTextString(m) }
func (*Query) ProtoMessage() {}
func (*Query) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} }
type isQuery_Value interface {
isQuery_Value()
}
type Query_QueryOrg struct {
QueryOrg *QueryOrgParam `protobuf:"bytes,1,opt,name=queryOrg,oneof"`
}
type Query_QueryTransaction struct {
QueryTransaction *QueryTransactionParam `protobuf:"bytes,2,opt,name=queryTransaction,oneof"`
}
type Query_QueryRecord struct {
QueryRecord *QueryRecordParam `protobuf:"bytes,3,opt,name=queryRecord,oneof"`
}
type Query_DelRecord struct {
DelRecord *DeleteRecordParam `protobuf:"bytes,4,opt,name=delRecord,oneof"`
}
type Query_LoginCheck struct {
LoginCheck *User `protobuf:"bytes,6,opt,name=loginCheck,oneof"`
}
type Query_QueryKey struct {
QueryKey *QueryKeyParam `protobuf:"bytes,7,opt,name=queryKey,oneof"`
}
func (*Query_QueryOrg) isQuery_Value() {}
func (*Query_QueryTransaction) isQuery_Value() {}
func (*Query_QueryRecord) isQuery_Value() {}
func (*Query_DelRecord) isQuery_Value() {}
func (*Query_LoginCheck) isQuery_Value() {}
func (*Query_QueryKey) isQuery_Value() {}
func (m *Query) GetValue() isQuery_Value {
if m != nil {
return m.Value
}
return nil
}
func (m *Query) GetQueryOrg() *QueryOrgParam {
if x, ok := m.GetValue().(*Query_QueryOrg); ok {
return x.QueryOrg
}
return nil
}
func (m *Query) GetQueryTransaction() *QueryTransactionParam {
if x, ok := m.GetValue().(*Query_QueryTransaction); ok {
return x.QueryTransaction
}
return nil
}
func (m *Query) GetQueryRecord() *QueryRecordParam {
if x, ok := m.GetValue().(*Query_QueryRecord); ok {
return x.QueryRecord
}
return nil
}
func (m *Query) GetDelRecord() *DeleteRecordParam {
if x, ok := m.GetValue().(*Query_DelRecord); ok {
return x.DelRecord
}
return nil
}
func (m *Query) GetLoginCheck() *User {
if x, ok := m.GetValue().(*Query_LoginCheck); ok {
return x.LoginCheck
}
return nil
}
func (m *Query) GetQueryKey() *QueryKeyParam {
if x, ok := m.GetValue().(*Query_QueryKey); ok {
return x.QueryKey
}
return nil
}
func (m *Query) GetPrivateKey() string {
if m != nil {
return m.PrivateKey
}
return ""
}
// XXX_OneofFuncs is for the internal use of the proto package.
func (*Query) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
return _Query_OneofMarshaler, _Query_OneofUnmarshaler, _Query_OneofSizer, []interface{}{
(*Query_QueryOrg)(nil),
(*Query_QueryTransaction)(nil),
(*Query_QueryRecord)(nil),
(*Query_DelRecord)(nil),
(*Query_LoginCheck)(nil),
(*Query_QueryKey)(nil),
}
}
func _Query_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
m := msg.(*Query)
// value
switch x := m.Value.(type) {
case *Query_QueryOrg:
b.EncodeVarint(1<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.QueryOrg); err != nil {
return err
}
case *Query_QueryTransaction:
b.EncodeVarint(2<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.QueryTransaction); err != nil {
return err
}
case *Query_QueryRecord:
b.EncodeVarint(3<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.QueryRecord); err != nil {
return err
}
case *Query_DelRecord:
b.EncodeVarint(4<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.DelRecord); err != nil {
return err
}
case *Query_LoginCheck:
b.EncodeVarint(6<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.LoginCheck); err != nil {
return err
}
case *Query_QueryKey:
b.EncodeVarint(7<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.QueryKey); err != nil {
return err
}
case nil:
default:
return fmt.Errorf("Query.Value has unexpected type %T", x)
}
return nil
}
func _Query_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
m := msg.(*Query)
switch tag {
case 1: // value.queryOrg
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(QueryOrgParam)
err := b.DecodeMessage(msg)
m.Value = &Query_QueryOrg{msg}
return true, err
case 2: // value.queryTransaction
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(QueryTransactionParam)
err := b.DecodeMessage(msg)
m.Value = &Query_QueryTransaction{msg}
return true, err
case 3: // value.queryRecord
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(QueryRecordParam)
err := b.DecodeMessage(msg)
m.Value = &Query_QueryRecord{msg}
return true, err
case 4: // value.delRecord
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(DeleteRecordParam)
err := b.DecodeMessage(msg)
m.Value = &Query_DelRecord{msg}
return true, err
case 6: // value.loginCheck
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(User)
err := b.DecodeMessage(msg)
m.Value = &Query_LoginCheck{msg}
return true, err
case 7: // value.queryKey
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(QueryKeyParam)
err := b.DecodeMessage(msg)
m.Value = &Query_QueryKey{msg}
return true, err
default:
return false, nil
}
}
func _Query_OneofSizer(msg proto.Message) (n int) {
m := msg.(*Query)
// value
switch x := m.Value.(type) {
case *Query_QueryOrg:
s := proto.Size(x.QueryOrg)
n += proto.SizeVarint(1<<3 | proto.WireBytes)
n += proto.SizeVarint(uint64(s))
n += s
case *Query_QueryTransaction:
s := proto.Size(x.QueryTransaction)
n += proto.SizeVarint(2<<3 | proto.WireBytes)
n += proto.SizeVarint(uint64(s))
n += s
case *Query_QueryRecord:
s := proto.Size(x.QueryRecord)
n += proto.SizeVarint(3<<3 | proto.WireBytes)
n += proto.SizeVarint(uint64(s))
n += s
case *Query_DelRecord:
s := proto.Size(x.DelRecord)
n += proto.SizeVarint(4<<3 | proto.WireBytes)
n += proto.SizeVarint(uint64(s))
n += s
case *Query_LoginCheck:
s := proto.Size(x.LoginCheck)
n += proto.SizeVarint(6<<3 | proto.WireBytes)
n += proto.SizeVarint(uint64(s))
n += s
case *Query_QueryKey:
s := proto.Size(x.QueryKey)
n += proto.SizeVarint(7<<3 | proto.WireBytes)
n += proto.SizeVarint(uint64(s))
n += s
case nil:
default:
panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
}
return n
}
type QueryOrgParam struct {
OrgId string `protobuf:"bytes,1,opt,name=orgId" json:"orgId,omitempty"`
}
func (m *QueryOrgParam) Reset() { *m = QueryOrgParam{} }
func (m *QueryOrgParam) String() string { return proto.CompactTextString(m) }
func (*QueryOrgParam) ProtoMessage() {}
func (*QueryOrgParam) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{6} }
func (m *QueryOrgParam) GetOrgId() string {
if m != nil {
return m.OrgId
}
return ""
}
type QueryTransactionParam struct {
ByTxId string `protobuf:"bytes,1,opt,name=byTxId" json:"byTxId,omitempty"`
ByToAddr string `protobuf:"bytes,2,opt,name=byToAddr" json:"byToAddr,omitempty"`
ByFromAddr string `protobuf:"bytes,3,opt,name=byFromAddr" json:"byFromAddr,omitempty"`
}
func (m *QueryTransactionParam) Reset() { *m = QueryTransactionParam{} }
func (m *QueryTransactionParam) String() string { return proto.CompactTextString(m) }
func (*QueryTransactionParam) ProtoMessage() {}
func (*QueryTransactionParam) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{7} }
func (m *QueryTransactionParam) GetByTxId() string {
if m != nil {
return m.ByTxId
}
return ""
}
func (m *QueryTransactionParam) GetByToAddr() string {
if m != nil {
return m.ByToAddr
}
return ""
}
func (m *QueryTransactionParam) GetByFromAddr() string {
if m != nil {
return m.ByFromAddr
}
return ""
}
type QueryRecordParam struct {
ByRecordId string `protobuf:"bytes,1,opt,name=byRecordId" json:"byRecordId,omitempty"`
ByClientName string `protobuf:"bytes,2,opt,name=byClientName" json:"byClientName,omitempty"`
}
func (m *QueryRecordParam) Reset() { *m = QueryRecordParam{} }
func (m *QueryRecordParam) String() string { return proto.CompactTextString(m) }
func (*QueryRecordParam) ProtoMessage() {}
func (*QueryRecordParam) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{8} }
func (m *QueryRecordParam) GetByRecordId() string {
if m != nil {
return m.ByRecordId
}
return ""
}
func (m *QueryRecordParam) GetByClientName() string {
if m != nil {
return m.ByClientName
}
return ""
}
type DeleteRecordParam struct {
OrgId string `protobuf:"bytes,1,opt,name=orgId" json:"orgId,omitempty"`
RecordId string `protobuf:"bytes,2,opt,name=recordId" json:"recordId,omitempty"`
}
func (m *DeleteRecordParam) Reset() { *m = DeleteRecordParam{} }
func (m *DeleteRecordParam) String() string { return proto.CompactTextString(m) }
func (*DeleteRecordParam) ProtoMessage() {}
func (*DeleteRecordParam) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{9} }
func (m *DeleteRecordParam) GetOrgId() string {
if m != nil {
return m.OrgId
}
return ""
}
func (m *DeleteRecordParam) GetRecordId() string {
if m != nil {
return m.RecordId
}
return ""
}
type QueryKeyParam struct {
Key string `protobuf:"bytes,1,opt,name=Key" json:"Key,omitempty"`
}
func (m *QueryKeyParam) Reset() { *m = QueryKeyParam{} }
func (m *QueryKeyParam) String() string { return proto.CompactTextString(m) }
func (*QueryKeyParam) ProtoMessage() {}
func (*QueryKeyParam) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{10} }
func (m *QueryKeyParam) GetKey() string {
if m != nil {
return m.Key
}
return ""
}
type User struct {
UserName string `protobuf:"bytes,1,opt,name=userName" json:"userName,omitempty"`
UserId string `protobuf:"bytes,2,opt,name=userId" json:"userId,omitempty"`
OrgId string `protobuf:"bytes,3,opt,name=orgId" json:"orgId,omitempty"`
PassWord string `protobuf:"bytes,4,opt,name=passWord" json:"passWord,omitempty"`
CreateTime string `protobuf:"bytes,5,opt,name=createTime" json:"createTime,omitempty"`
UpdateTime string `protobuf:"bytes,6,opt,name=updateTime" json:"updateTime,omitempty"`
}
func (m *User) Reset() { *m = User{} }
func (m *User) String() string { return proto.CompactTextString(m) }
func (*User) ProtoMessage() {}
func (*User) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{11} }
func (m *User) GetUserName() string {
if m != nil {
return m.UserName
}
return ""
}
func (m *User) GetUserId() string {
if m != nil {
return m.UserId
}
return ""
}
func (m *User) GetOrgId() string {
if m != nil {
return m.OrgId
}
return ""
}
func (m *User) GetPassWord() string {
if m != nil {
return m.PassWord
}
return ""
}
func (m *User) GetCreateTime() string {
if m != nil {
return m.CreateTime
}
return ""
}
func (m *User) GetUpdateTime() string {
if m != nil {
return m.UpdateTime
}
return ""
}
func init() {
proto.RegisterType((*BlackAction)(nil), "types.BlackAction")
proto.RegisterType((*Record)(nil), "types.Record")
proto.RegisterType((*Transaction)(nil), "types.Transaction")
proto.RegisterType((*Org)(nil), "types.Org")
proto.RegisterType((*Agency)(nil), "types.Agency")
proto.RegisterType((*Query)(nil), "types.Query")
proto.RegisterType((*QueryOrgParam)(nil), "types.QueryOrgParam")
proto.RegisterType((*QueryTransactionParam)(nil), "types.QueryTransactionParam")
proto.RegisterType((*QueryRecordParam)(nil), "types.QueryRecordParam")
proto.RegisterType((*DeleteRecordParam)(nil), "types.DeleteRecordParam")
proto.RegisterType((*QueryKeyParam)(nil), "types.QueryKeyParam")
proto.RegisterType((*User)(nil), "types.User")
}
func init() { proto.RegisterFile("blacklist.proto", fileDescriptor0) }
var fileDescriptor0 = []byte{
// 811 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x56, 0xdd, 0x6e, 0xd3, 0x4a,
0x10, 0xae, 0xed, 0xfc, 0x79, 0xdc, 0x9e, 0x93, 0xb3, 0xea, 0x39, 0xc7, 0x42, 0x15, 0xa4, 0x16,
0x48, 0x15, 0x12, 0xbd, 0x28, 0x37, 0x48, 0x5c, 0xa5, 0x05, 0xd4, 0x50, 0xa9, 0x3f, 0x26, 0x85,
0xeb, 0xb5, 0xbd, 0x75, 0xad, 0x3a, 0xde, 0xb0, 0xde, 0x44, 0xf5, 0x2b, 0xf0, 0x28, 0x88, 0x7b,
0x1e, 0x81, 0x87, 0xe0, 0x5d, 0x10, 0xda, 0xf5, 0xda, 0x5e, 0x27, 0x15, 0xbd, 0xe8, 0xdd, 0xcc,
0x37, 0xb3, 0x93, 0xf9, 0xbe, 0xd9, 0x1d, 0x07, 0xfe, 0x0e, 0x52, 0x1c, 0xde, 0xa4, 0x49, 0xce,
0xf7, 0xe7, 0x8c, 0x72, 0x8a, 0xba, 0xbc, 0x98, 0x93, 0xdc, 0xfb, 0x69, 0x80, 0x73, 0x28, 0x42,
0xe3, 0x90, 0x27, 0x34, 0x43, 0x4f, 0xc0, 0x64, 0xa1, 0x6b, 0x8c, 0x8c, 0x3d, 0xe7, 0x60, 0x6b,
0x5f, 0xe6, 0xec, 0xfb, 0x24, 0xa4, 0x2c, 0x3a, 0xde, 0xf0, 0x4d, 0x16, 0xa2, 0x1d, 0x30, 0x29,
0x73, 0x2d, 0x99, 0x00, 0x2a, 0xe1, 0x8c, 0xc5, 0x22, 0x4a, 0x19, 0x7a, 0x0a, 0x26, 0x67, 0x6e,
0x47, 0x46, 0x91, 0x8a, 0x4e, 0x19, 0xce, 0x72, 0x2c, 0xcb, 0x8b, 0x2c, 0xce, 0xc4, 0x8f, 0xe0,
0xd0, 0xed, 0xb6, 0x7e, 0x64, 0x1c, 0x93, 0x2c, 0x2c, 0x44, 0x02, 0x0e, 0xd1, 0x2e, 0x74, 0x16,
0x39, 0x61, 0x6e, 0x4f, 0xa6, 0x38, 0x2a, 0xe5, 0x32, 0x27, 0xec, 0x78, 0xc3, 0x97, 0x21, 0xf4,
0x08, 0x06, 0x57, 0x8b, 0x2c, 0x3c, 0xc5, 0x33, 0xe2, 0x9a, 0x23, 0x63, 0xcf, 0xf6, 0x6b, 0xff,
0xb0, 0x0f, 0xdd, 0x25, 0x4e, 0x17, 0xc4, 0xfb, 0x65, 0x42, 0xaf, 0xec, 0x5e, 0xe4, 0x33, 0x69,
0x4d, 0x22, 0x49, 0xcf, 0xf6, 0x6b, 0x1f, 0xb9, 0xd0, 0x8f, 0x68, 0x38, 0x2d, 0xe6, 0x55, 0xa9,
0xca, 0x15, 0xa7, 0xc2, 0x34, 0x21, 0x19, 0x9f, 0x44, 0x92, 0xb3, 0xed, 0xd7, 0x3e, 0x7a, 0x0c,
0x50, 0xda, 0xb2, 0x87, 0x8e, 0x8c, 0x6a, 0x08, 0xf2, 0x60, 0x33, 0x23, 0x31, 0xe6, 0xc9, 0x92,
0xc8, 0xd2, 0x5d, 0x99, 0xd1, 0xc2, 0xd0, 0x73, 0x18, 0x56, 0xfe, 0x07, 0xb2, 0x24, 0x2c, 0xe1,
0x85, 0x24, 0x6d, 0xfb, 0x6b, 0xb8, 0x5e, 0x6f, 0x92, 0x5d, 0x51, 0xb7, 0xdf, 0xae, 0x27, 0x30,
0xc1, 0x84, 0xb2, 0x78, 0x1c, 0x45, 0xcc, 0x1d, 0x94, 0x4c, 0x94, 0x2b, 0xba, 0xcd, 0x09, 0x66,
0xe1, 0x35, 0x0e, 0x52, 0xe2, 0xda, 0x23, 0x63, 0x6f, 0xe0, 0x6b, 0x88, 0x64, 0xc3, 0x08, 0xe6,
0x64, 0x9a, 0xcc, 0x88, 0x0b, 0x8a, 0x4d, 0x8d, 0x88, 0xf8, 0x62, 0x1e, 0x55, 0x71, 0xa7, 0x8c,
0x37, 0x08, 0xda, 0x86, 0x2e, 0x65, 0xf1, 0x24, 0x72, 0x37, 0x65, 0xa8, 0x74, 0xbc, 0xef, 0x06,
0x38, 0xda, 0xfc, 0x75, 0xa5, 0x8d, 0xb6, 0xd2, 0x08, 0x3a, 0xfc, 0x76, 0x12, 0xa9, 0x01, 0x48,
0x5b, 0x60, 0x57, 0x8c, 0xce, 0x94, 0xf2, 0xd2, 0x46, 0x7f, 0x81, 0xc9, 0xa9, 0x52, 0xdb, 0xe4,
0x14, 0xfd, 0x07, 0xbd, 0x90, 0x91, 0x28, 0xe1, 0x52, 0x5f, 0xcb, 0x57, 0xde, 0x0a, 0x9f, 0xde,
0x3d, 0x7c, 0xfa, 0xab, 0x7c, 0xbc, 0x1f, 0x06, 0x58, 0x67, 0x2c, 0xfe, 0x43, 0xc7, 0x35, 0x63,
0x53, 0x63, 0xac, 0x26, 0x20, 0xaf, 0x84, 0x55, 0x4f, 0x40, 0xde, 0x07, 0x6d, 0x36, 0x9d, 0xf6,
0x6c, 0x76, 0xc0, 0xa6, 0x2c, 0x3e, 0xd2, 0x69, 0x34, 0xc0, 0x83, 0x99, 0x7c, 0x35, 0xa0, 0x57,
0xbe, 0x2e, 0x21, 0x68, 0x26, 0x3a, 0x2b, 0x99, 0x48, 0x5b, 0x60, 0x58, 0xf4, 0xa4, 0x84, 0x17,
0xb6, 0x26, 0xaa, 0xd5, 0x12, 0x75, 0x04, 0x4e, 0x92, 0xe7, 0x0b, 0xa2, 0x5a, 0xed, 0xc8, 0xa0,
0x0e, 0xad, 0x34, 0xdb, 0xbd, 0xa7, 0xd9, 0xde, 0x5a, 0xb3, 0x5f, 0x2c, 0xe8, 0x5e, 0x2c, 0x08,
0x2b, 0xd0, 0x01, 0x0c, 0x3e, 0x0b, 0xe3, 0x8c, 0xc5, 0x6a, 0x1f, 0x6d, 0xab, 0x3d, 0x70, 0xa1,
0xe0, 0x73, 0xcc, 0xf0, 0xec, 0x78, 0xc3, 0xaf, 0xf3, 0xd0, 0x7b, 0x18, 0x4a, 0x5b, 0xbb, 0x72,
0x92, 0x97, 0x73, 0xb0, 0xa3, 0x9f, 0xd5, 0xc2, 0x55, 0x8d, 0xb5, 0x73, 0xe8, 0x35, 0x38, 0x12,
0x2b, 0xf7, 0x87, 0xda, 0x78, 0xff, 0xeb, 0x65, 0xca, 0x48, 0x55, 0x41, 0xcf, 0x46, 0xaf, 0xc0,
0x8e, 0x48, 0xaa, 0x8e, 0x96, 0xeb, 0xd0, 0x55, 0x47, 0xdf, 0x90, 0x94, 0x70, 0xd2, 0x3e, 0xdb,
0x24, 0xa3, 0x17, 0x00, 0x29, 0x8d, 0x93, 0xec, 0xe8, 0x9a, 0x84, 0x37, 0x77, 0x2f, 0x40, 0x2d,
0xa1, 0x56, 0xe9, 0x84, 0x14, 0x72, 0xf4, 0x2b, 0x2a, 0x9d, 0x90, 0xa2, 0xad, 0xd2, 0x09, 0x29,
0xc4, 0x0c, 0xce, 0x59, 0xb2, 0xc4, 0x9c, 0x88, 0x53, 0x6a, 0x46, 0x0d, 0xd2, 0xac, 0xcf, 0x67,
0xb0, 0xd5, 0xd2, 0xba, 0xb9, 0xf2, 0x86, 0xfe, 0xc8, 0x6f, 0xe0, 0xdf, 0x3b, 0x65, 0x15, 0xd7,
0x28, 0x28, 0xa6, 0xb7, 0x75, 0xbe, 0xf2, 0xc4, 0x56, 0x0d, 0x8a, 0x29, 0x1d, 0x37, 0xd7, 0xae,
0xf6, 0x45, 0x73, 0x41, 0xf1, 0x8e, 0xd1, 0x99, 0x8c, 0x96, 0x4f, 0x48, 0x43, 0xbc, 0x8f, 0x30,
0x5c, 0x15, 0xbf, 0x3c, 0xe3, 0xb7, 0xb7, 0xbb, 0x86, 0x88, 0xcd, 0x19, 0x14, 0x47, 0xcd, 0xae,
0x2e, 0x7f, 0xb3, 0x85, 0x79, 0x6f, 0xe1, 0x9f, 0xb5, 0xc9, 0xdc, 0xcd, 0xb7, 0xf5, 0x29, 0x31,
0xdb, 0x9f, 0x12, 0x6f, 0x57, 0x49, 0x56, 0x09, 0x8f, 0x86, 0x60, 0x09, 0x95, 0xcb, 0x02, 0xc2,
0xf4, 0xbe, 0x19, 0xd0, 0xb9, 0x54, 0x9f, 0x30, 0xf1, 0x29, 0x3b, 0x6d, 0x5e, 0x64, 0xed, 0x0b,
0xe9, 0x84, 0x5d, 0xff, 0x82, 0xf2, 0x9a, 0x8e, 0xac, 0x95, 0x8e, 0xe6, 0x38, 0xcf, 0x3f, 0x55,
0xb7, 0xcd, 0xf6, 0x6b, 0xff, 0xa1, 0x2f, 0x32, 0xe8, 0xc9, 0xff, 0x0b, 0x2f, 0x7f, 0x07, 0x00,
0x00, 0xff, 0xff, 0xae, 0xb6, 0x66, 0x26, 0x42, 0x08, 0x00, 0x00,
}
syntax = "proto3";
package types;
message BlackAction {
oneof value {
Record rc = 1;
Org or = 3;
Transaction tr =4;
Agency ac= 5;
User user=6;
}
string funcName = 2;
}
message Record {
string recordId = 1;
string docType = 2;
string clientId = 3;
string clientName = 4;
string negativeType = 5;
string negativeSeverity = 6;
string negativeInfo = 7;
string orgAddr = 8;
bool searchable = 9;
string createTime = 10;
string updateTime = 11;
string orgId = 12;
}
message Transaction {
string docType = 1;
string txId = 2;
string from = 3;
string to = 4;
int64 credit = 5;
string createTime = 6;
string updateTime = 7;
}
message Org {
string docType = 1;
string orgId = 2;
string orgName = 3;
string orgAddr = 4;
int64 orgCredit =5;
string createTime = 6;
string updateTime = 7;
}
message Agency {
string name = 1;
string addr = 2;
int64 credit = 3;
int64 issueCredit = 4;
string createTime = 5;
string updateTime = 6;
}
message Query {
oneof value {
QueryOrgParam queryOrg = 1;
QueryTransactionParam queryTransaction = 2;
QueryRecordParam queryRecord =3;
DeleteRecordParam delRecord= 4;
User loginCheck=6;
QueryKeyParam queryKey=7;
}
string PrivateKey = 5;
}
message QueryOrgParam {
string orgId =1;
}
message QueryTransactionParam {
string byTxId =1;
string byToAddr = 2;
string byFromAddr = 3;
}
message QueryRecordParam {
string byRecordId = 1;
string byClientName = 2;
}
message DeleteRecordParam {
string orgId = 1;
string recordId = 2;
}
message QueryKeyParam {
string Key = 1;
}
message User{
string userName = 1;
string userId = 2;
string orgId = 3;
string passWord = 4;
string createTime = 5;
string updateTime = 6;
}
\ No newline at end of file
package types
import (
"errors"
)
const Fee = 1e6
const SecretLen = 32
const DefaultAmount = 1e11
var (
ErrNotFound = errors.New("ErrNotFound")
CreditInsufficient = errors.New("Insufficient integration, please recharge.")
ErrQueryNotSupport = errors.New("ErrQueryNotSupport")
)
const ConnIp = "localhost"
const AddCredit = 10
//httpListen 返回的错误提示
const (
ErrorParm = "The request parameter is wrong, please check again."
ErrorMethod = "The request method is wrong, please check again."
)
const (
SUCESS = "SUCESS"
FAIL = "FAIL"
)
//创世地址可以无限向其他orgAddr放送积分
const GenesisAddr = "0x0000000000000000000000000000"
//方法名定义
const (
FuncName_SubmitRecord = "submitRecord"
FuncName_QueryRecordById = "queryRecordById"
FuncName_CreateOrg = "createOrg"
FuncName_QueryOrgById = "queryOrgById"
//FuncName_QueryRecordByName = "queryRecordByName"
FuncName_QueryTxById = "queryTxByTxId"
//FuncName_QueryTxByFromAddr = "queryTxByFromAddr"
//FuncName_QueryTxByToAddr = "queryTxByToAddr"
FuncName_DeleteRecord = "deleteRecord"
FuncName_Transfer = "transfer"
FuncName_RegisterUser = "registerUser"
FuncName_LoginCheck = "loginCheck"
FuncName_ModifyUserPwd = "modifyUserPwd"
FuncName_ResetUserPwd = "resetUserPwd"
FuncName_CheckKeyIsExsit = "checkKeyIsExsit"
)
const (
SubmitRecordDoc = "这是通过提交record来获取积分!"
)
package routers
import (
"github.com/astaxie/beego"
"github.com/astaxie/beego/context/param"
)
func init() {
beego.GlobalControllerRouter["gitlab.33.cn/lihailei/chain33_sdk/src/controllers:AccountController"] = append(beego.GlobalControllerRouter["gitlab.33.cn/lihailei/chain33_sdk/src/controllers:AccountController"],
beego.ControllerComments{
Method: "CreateAccount",
Router: `/createAccount`,
AllowHTTPMethods: []string{"post"},
MethodParams: param.Make(),
Params: nil})
beego.GlobalControllerRouter["gitlab.33.cn/lihailei/chain33_sdk/src/controllers:AccountController"] = append(beego.GlobalControllerRouter["gitlab.33.cn/lihailei/chain33_sdk/src/controllers:AccountController"],
beego.ControllerComments{
Method: "GetAccounts",
Router: `/getAccounts`,
AllowHTTPMethods: []string{"get"},
MethodParams: param.Make(),
Params: nil})
beego.GlobalControllerRouter["gitlab.33.cn/lihailei/chain33_sdk/src/controllers:AccountController"] = append(beego.GlobalControllerRouter["gitlab.33.cn/lihailei/chain33_sdk/src/controllers:AccountController"],
beego.ControllerComments{
Method: "GetBalance",
Router: `/getBalance`,
AllowHTTPMethods: []string{"get"},
MethodParams: param.Make(),
Params: nil})
beego.GlobalControllerRouter["gitlab.33.cn/lihailei/chain33_sdk/src/controllers:AccountController"] = append(beego.GlobalControllerRouter["gitlab.33.cn/lihailei/chain33_sdk/src/controllers:AccountController"],
beego.ControllerComments{
Method: "ImportKey",
Router: `/importKey`,
AllowHTTPMethods: []string{"put"},
MethodParams: param.Make(),
Params: nil})
beego.GlobalControllerRouter["gitlab.33.cn/lihailei/chain33_sdk/src/controllers:AccountController"] = append(beego.GlobalControllerRouter["gitlab.33.cn/lihailei/chain33_sdk/src/controllers:AccountController"],
beego.ControllerComments{
Method: "SetLabel",
Router: `/setLabel`,
AllowHTTPMethods: []string{"put"},
MethodParams: param.Make(),
Params: nil})
beego.GlobalControllerRouter["gitlab.33.cn/lihailei/chain33_sdk/src/controllers:AccountController"] = append(beego.GlobalControllerRouter["gitlab.33.cn/lihailei/chain33_sdk/src/controllers:AccountController"],
beego.ControllerComments{
Method: "Transfer",
Router: `/transfer`,
AllowHTTPMethods: []string{"post"},
MethodParams: param.Make(),
Params: nil})
beego.GlobalControllerRouter["gitlab.33.cn/lihailei/chain33_sdk/src/controllers:BlockController"] = append(beego.GlobalControllerRouter["gitlab.33.cn/lihailei/chain33_sdk/src/controllers:BlockController"],
beego.ControllerComments{
Method: "GetBlockHashByHeight",
Router: `/getBlockHashByHeight`,
AllowHTTPMethods: []string{"get"},
MethodParams: param.Make(),
Params: nil})
beego.GlobalControllerRouter["gitlab.33.cn/lihailei/chain33_sdk/src/controllers:BlockController"] = append(beego.GlobalControllerRouter["gitlab.33.cn/lihailei/chain33_sdk/src/controllers:BlockController"],
beego.ControllerComments{
Method: "GetBlockHeaders",
Router: `/getBlockHeaders`,
AllowHTTPMethods: []string{"get"},
MethodParams: param.Make(),
Params: nil})
beego.GlobalControllerRouter["gitlab.33.cn/lihailei/chain33_sdk/src/controllers:BlockController"] = append(beego.GlobalControllerRouter["gitlab.33.cn/lihailei/chain33_sdk/src/controllers:BlockController"],
beego.ControllerComments{
Method: "GetBlockList",
Router: `/getBlockList`,
AllowHTTPMethods: []string{"get"},
MethodParams: param.Make(),
Params: nil})
beego.GlobalControllerRouter["gitlab.33.cn/lihailei/chain33_sdk/src/controllers:BlockController"] = append(beego.GlobalControllerRouter["gitlab.33.cn/lihailei/chain33_sdk/src/controllers:BlockController"],
beego.ControllerComments{
Method: "GetBlockViewByHash",
Router: `/getBlockViewByHash`,
AllowHTTPMethods: []string{"get"},
MethodParams: param.Make(),
Params: nil})
beego.GlobalControllerRouter["gitlab.33.cn/lihailei/chain33_sdk/src/controllers:BlockController"] = append(beego.GlobalControllerRouter["gitlab.33.cn/lihailei/chain33_sdk/src/controllers:BlockController"],
beego.ControllerComments{
Method: "GetLastHeader",
Router: `/getLastHeader`,
AllowHTTPMethods: []string{"get"},
MethodParams: param.Make(),
Params: nil})
beego.GlobalControllerRouter["gitlab.33.cn/lihailei/chain33_sdk/src/controllers:ContractController"] = append(beego.GlobalControllerRouter["gitlab.33.cn/lihailei/chain33_sdk/src/controllers:ContractController"],
beego.ControllerComments{
Method: "Invoke",
Router: `/invoke`,
AllowHTTPMethods: []string{"post","get"},
MethodParams: param.Make(),
Params: nil})
beego.GlobalControllerRouter["gitlab.33.cn/lihailei/chain33_sdk/src/controllers:PeerController"] = append(beego.GlobalControllerRouter["gitlab.33.cn/lihailei/chain33_sdk/src/controllers:PeerController"],
beego.ControllerComments{
Method: "GetPeers",
Router: `/getPeers`,
AllowHTTPMethods: []string{"get"},
MethodParams: param.Make(),
Params: nil})
beego.GlobalControllerRouter["gitlab.33.cn/lihailei/chain33_sdk/src/controllers:ServerController"] = append(beego.GlobalControllerRouter["gitlab.33.cn/lihailei/chain33_sdk/src/controllers:ServerController"],
beego.ControllerComments{
Method: "ClearChain",
Router: `/clearChain`,
AllowHTTPMethods: []string{"post"},
MethodParams: param.Make(),
Params: nil})
beego.GlobalControllerRouter["gitlab.33.cn/lihailei/chain33_sdk/src/controllers:ServerController"] = append(beego.GlobalControllerRouter["gitlab.33.cn/lihailei/chain33_sdk/src/controllers:ServerController"],
beego.ControllerComments{
Method: "DeployChain",
Router: `/deployChain`,
AllowHTTPMethods: []string{"post"},
MethodParams: param.Make(),
Params: nil})
beego.GlobalControllerRouter["gitlab.33.cn/lihailei/chain33_sdk/src/controllers:ServerController"] = append(beego.GlobalControllerRouter["gitlab.33.cn/lihailei/chain33_sdk/src/controllers:ServerController"],
beego.ControllerComments{
Method: "StopChain",
Router: `/stopChain`,
AllowHTTPMethods: []string{"post"},
MethodParams: param.Make(),
Params: nil})
beego.GlobalControllerRouter["gitlab.33.cn/lihailei/chain33_sdk/src/controllers:TaskController"] = append(beego.GlobalControllerRouter["gitlab.33.cn/lihailei/chain33_sdk/src/controllers:TaskController"],
beego.ControllerComments{
Method: "GetTaskStatus",
Router: `/getTaskStatus`,
AllowHTTPMethods: []string{"get"},
MethodParams: param.Make(),
Params: nil})
beego.GlobalControllerRouter["gitlab.33.cn/lihailei/chain33_sdk/src/controllers:TxController"] = append(beego.GlobalControllerRouter["gitlab.33.cn/lihailei/chain33_sdk/src/controllers:TxController"],
beego.ControllerComments{
Method: "QueryTxByAddr",
Router: `/queryTxByAddr`,
AllowHTTPMethods: []string{"get"},
MethodParams: param.Make(),
Params: nil})
beego.GlobalControllerRouter["gitlab.33.cn/lihailei/chain33_sdk/src/controllers:TxController"] = append(beego.GlobalControllerRouter["gitlab.33.cn/lihailei/chain33_sdk/src/controllers:TxController"],
beego.ControllerComments{
Method: "QueryTxByHash",
Router: `/queryTxByHash`,
AllowHTTPMethods: []string{"get"},
MethodParams: param.Make(),
Params: nil})
beego.GlobalControllerRouter["gitlab.33.cn/lihailei/chain33_sdk/src/controllers:TxController"] = append(beego.GlobalControllerRouter["gitlab.33.cn/lihailei/chain33_sdk/src/controllers:TxController"],
beego.ControllerComments{
Method: "SendTx",
Router: `/sendTX`,
AllowHTTPMethods: []string{"post"},
MethodParams: param.Make(),
Params: nil})
beego.GlobalControllerRouter["gitlab.33.cn/lihailei/chain33_sdk/src/controllers:WalletController"] = append(beego.GlobalControllerRouter["gitlab.33.cn/lihailei/chain33_sdk/src/controllers:WalletController"],
beego.ControllerComments{
Method: "Lock",
Router: `/lock`,
AllowHTTPMethods: []string{"post"},
MethodParams: param.Make(),
Params: nil})
beego.GlobalControllerRouter["gitlab.33.cn/lihailei/chain33_sdk/src/controllers:WalletController"] = append(beego.GlobalControllerRouter["gitlab.33.cn/lihailei/chain33_sdk/src/controllers:WalletController"],
beego.ControllerComments{
Method: "MergeBalance",
Router: `/mergeBalance`,
AllowHTTPMethods: []string{"post"},
MethodParams: param.Make(),
Params: nil})
beego.GlobalControllerRouter["gitlab.33.cn/lihailei/chain33_sdk/src/controllers:WalletController"] = append(beego.GlobalControllerRouter["gitlab.33.cn/lihailei/chain33_sdk/src/controllers:WalletController"],
beego.ControllerComments{
Method: "ModifyPwd",
Router: `/modifyPwd`,
AllowHTTPMethods: []string{"put"},
MethodParams: param.Make(),
Params: nil})
beego.GlobalControllerRouter["gitlab.33.cn/lihailei/chain33_sdk/src/controllers:WalletController"] = append(beego.GlobalControllerRouter["gitlab.33.cn/lihailei/chain33_sdk/src/controllers:WalletController"],
beego.ControllerComments{
Method: "UnLock",
Router: `/unLock`,
AllowHTTPMethods: []string{"post"},
MethodParams: param.Make(),
Params: nil})
beego.GlobalControllerRouter["gitlab.33.cn/lihailei/chain33_sdk/src/controllers:WalletController"] = append(beego.GlobalControllerRouter["gitlab.33.cn/lihailei/chain33_sdk/src/controllers:WalletController"],
beego.ControllerComments{
Method: "WalletListTxs",
Router: `/walletListTxs`,
AllowHTTPMethods: []string{"get"},
MethodParams: param.Make(),
Params: nil})
beego.GlobalControllerRouter["gitlab.33.cn/lihailei/chain33_sdk/src/controllers:WalletController"] = append(beego.GlobalControllerRouter["gitlab.33.cn/lihailei/chain33_sdk/src/controllers:WalletController"],
beego.ControllerComments{
Method: "WalletStatus",
Router: `/walletStatus`,
AllowHTTPMethods: []string{"get"},
MethodParams: param.Make(),
Params: nil})
}
......@@ -50,6 +50,11 @@ func init() {
&controllers.TaskController{},
),
),
beego.NSNamespace("/contract",
beego.NSInclude(
&controllers.ContractController{},
),
),
)
//ns.Filter("before", func(ctx *context.Context) {
// //_, ok := ctx.Input.Session("uid").(int)
......
File added
File added
<!-- HTML for static distribution bundle build -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Swagger UI</title>
<link href="https://fonts.googleapis.com/css?family=Open+Sans:400,700|Source+Code+Pro:300,600|Titillium+Web:400,600,700" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="./swagger-ui.css" >
<link rel="icon" type="image/png" href="./favicon-32x32.png" sizes="32x32" />
<link rel="icon" type="image/png" href="./favicon-16x16.png" sizes="16x16" />
<style>
html
{
box-sizing: border-box;
overflow: -moz-scrollbars-vertical;
overflow-y: scroll;
}
*,
*:before,
*:after
{
box-sizing: inherit;
}
body {
margin:0;
background: #fafafa;
}
</style>
</head>
<body>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" style="position:absolute;width:0;height:0">
<defs>
<symbol viewBox="0 0 20 20" id="unlocked">
<path d="M15.8 8H14V5.6C14 2.703 12.665 1 10 1 7.334 1 6 2.703 6 5.6V6h2v-.801C8 3.754 8.797 3 10 3c1.203 0 2 .754 2 2.199V8H4c-.553 0-1 .646-1 1.199V17c0 .549.428 1.139.951 1.307l1.197.387C5.672 18.861 6.55 19 7.1 19h5.8c.549 0 1.428-.139 1.951-.307l1.196-.387c.524-.167.953-.757.953-1.306V9.199C17 8.646 16.352 8 15.8 8z"></path>
</symbol>
<symbol viewBox="0 0 20 20" id="locked">
<path d="M15.8 8H14V5.6C14 2.703 12.665 1 10 1 7.334 1 6 2.703 6 5.6V8H4c-.553 0-1 .646-1 1.199V17c0 .549.428 1.139.951 1.307l1.197.387C5.672 18.861 6.55 19 7.1 19h5.8c.549 0 1.428-.139 1.951-.307l1.196-.387c.524-.167.953-.757.953-1.306V9.199C17 8.646 16.352 8 15.8 8zM12 8H8V5.199C8 3.754 8.797 3 10 3c1.203 0 2 .754 2 2.199V8z"/>
</symbol>
<symbol viewBox="0 0 20 20" id="close">
<path d="M14.348 14.849c-.469.469-1.229.469-1.697 0L10 11.819l-2.651 3.029c-.469.469-1.229.469-1.697 0-.469-.469-.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-.469-.469-.469-1.228 0-1.697.469-.469 1.228-.469 1.697 0L10 8.183l2.651-3.031c.469-.469 1.228-.469 1.697 0 .469.469.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c.469.469.469 1.229 0 1.698z"/>
</symbol>
<symbol viewBox="0 0 20 20" id="large-arrow">
<path d="M13.25 10L6.109 2.58c-.268-.27-.268-.707 0-.979.268-.27.701-.27.969 0l7.83 7.908c.268.271.268.709 0 .979l-7.83 7.908c-.268.271-.701.27-.969 0-.268-.269-.268-.707 0-.979L13.25 10z"/>
</symbol>
<symbol viewBox="0 0 20 20" id="large-arrow-down">
<path d="M17.418 6.109c.272-.268.709-.268.979 0s.271.701 0 .969l-7.908 7.83c-.27.268-.707.268-.979 0l-7.908-7.83c-.27-.268-.27-.701 0-.969.271-.268.709-.268.979 0L10 13.25l7.418-7.141z"/>
</symbol>
<symbol viewBox="0 0 24 24" id="jump-to">
<path d="M19 7v4H5.83l3.58-3.59L8 6l-6 6 6 6 1.41-1.41L5.83 13H21V7z"/>
</symbol>
<symbol viewBox="0 0 24 24" id="expand">
<path d="M10 18h4v-2h-4v2zM3 6v2h18V6H3zm3 7h12v-2H6v2z"/>
</symbol>
</defs>
</svg>
<div id="swagger-ui"></div>
<script src="./swagger-ui-bundle.js"> </script>
<script src="./swagger-ui-standalone-preset.js"> </script>
<script>
window.onload = function() {
// Build a system
const ui = SwaggerUIBundle({
url: "swagger.json",
dom_id: '#swagger-ui',
presets: [
SwaggerUIBundle.presets.apis,
SwaggerUIStandalonePreset
],
plugins: [
SwaggerUIBundle.plugins.DownloadUrl
],
layout: "StandaloneLayout"
})
window.ui = ui
}
</script>
</body>
</html>
<!doctype html>
<html lang="en-US">
<body onload="run()">
</body>
</html>
<script>
'use strict';
function run () {
var oauth2 = window.opener.swaggerUIRedirectOauth2;
var sentState = oauth2.state;
var isValid, qp, arr;
qp = (window.location.hash || location.search).substring(1);
arr = qp.split("&")
arr.forEach(function (v,i,_arr) { _arr[i] = '"' + v.replace('=', '":"') + '"';})
qp = qp ? JSON.parse('{' + arr.join() + '}',
function (key, value) {
return key === "" ? value : decodeURIComponent(value)
}
) : {}
isValid = qp.state === sentState
if (oauth2.auth.schema.get("flow") === "accessCode" && !oauth2.auth.code) {
if (!isValid) {
oauth2.errCb({
authId: oauth2.auth.name,
source: "auth",
level: "warning",
message: "Authorization may be unsafe, passed state was changed in server Passed state wasn't returned from auth server"
});
}
if (qp.code) {
delete oauth2.state;
oauth2.auth.code = qp.code;
oauth2.callback(oauth2.auth);
} else {
oauth2.errCb({
authId: oauth2.auth.name,
source: "auth",
level: "error",
message: "Authorization failed: no accessCode received from the server"
});
}
} else {
oauth2.callback({auth: oauth2.auth, token: qp, isValid: isValid});
}
window.close();
}
</script>
This source diff could not be displayed because it is too large. You can view the blob instead.
{"version":3,"file":"swagger-ui-bundle.js","sources":["webpack:///swagger-ui-bundle.js"],"mappings":"AAAA;AAu/FA;AA6+FA;;;;;;;;;;;;;;;;;;;;;;;;;;AAyTA;;;;;;AAoIA;AAi7FA;AAmtCA;AAi0IA;AA0oJA;AAgwFA;AAyrGA;AA0lFA;AA4nFA;AA+9CA;AA+gDA;AAwrCA;AA60EA;;;;;AA6oCA;AAsyJA;;;;;;;;;;;;;;AA64EA;AA4mIA;AAquJA;AA2qHA;AA2mGA;AAiiEA;AAq4DA;AAg3DA;AAoPA;;;;;;AAk7FA;AA07FA;;;;;AAi8CA;AAgsFA;AAs2CA;AAglCA;AAu9CA;AAy8EA;AAsiCA;AA+yFA;;;;;;;;;AAgkDA;AA2zIA;AAu7FA;AAmrFA;AAu0EA","sourceRoot":""}
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
{"version":3,"file":"swagger-ui-standalone-preset.js","sources":["webpack:///swagger-ui-standalone-preset.js"],"mappings":"AAAA;;;;;AA8QA;AAmvGA;AAuxFA;;;;;;AAocA;AAkvFA;AAu+CA;AAo+CA;AAgrCA;AAuyEA","sourceRoot":""}
\ No newline at end of file
@charset "UTF-8";.swagger-ui html{box-sizing:border-box}.swagger-ui *,.swagger-ui :after,.swagger-ui :before{box-sizing:inherit}.swagger-ui body{margin:0;background:#fafafa}.swagger-ui .wrapper{width:100%;max-width:1460px;margin:0 auto;padding:0 20px}.swagger-ui .opblock-tag-section{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.swagger-ui .opblock-tag{display:-webkit-box;display:-ms-flexbox;display:flex;padding:10px 20px 10px 10px;cursor:pointer;transition:all .2s;border-bottom:1px solid rgba(59,65,81,.3);-webkit-box-align:center;-ms-flex-align:center;align-items:center}.swagger-ui .opblock-tag:hover{background:rgba(0,0,0,.02)}.swagger-ui .opblock-tag{font-size:24px;margin:0 0 5px;font-family:Titillium Web,sans-serif;color:#3b4151}.swagger-ui .opblock-tag.no-desc span{-webkit-box-flex:1;-ms-flex:1;flex:1}.swagger-ui .opblock-tag svg{transition:all .4s}.swagger-ui .opblock-tag small{font-size:14px;font-weight:400;padding:0 10px;-webkit-box-flex:1;-ms-flex:1;flex:1;font-family:Open Sans,sans-serif;color:#3b4151}.swagger-ui .parаmeter__type{font-size:12px;padding:5px 0;font-family:Source Code Pro,monospace;font-weight:600;color:#3b4151}.swagger-ui .view-line-link{position:relative;top:3px;width:20px;margin:0 5px;cursor:pointer;transition:all .5s}.swagger-ui .opblock{margin:0 0 15px;border:1px solid #000;border-radius:4px;box-shadow:0 0 3px rgba(0,0,0,.19)}.swagger-ui .opblock.is-open .opblock-summary{border-bottom:1px solid #000}.swagger-ui .opblock .opblock-section-header{padding:8px 20px;background:hsla(0,0%,100%,.8);box-shadow:0 1px 2px rgba(0,0,0,.1)}.swagger-ui .opblock .opblock-section-header,.swagger-ui .opblock .opblock-section-header label{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.swagger-ui .opblock .opblock-section-header label{font-size:12px;font-weight:700;margin:0;font-family:Titillium Web,sans-serif;color:#3b4151}.swagger-ui .opblock .opblock-section-header label span{padding:0 10px 0 0}.swagger-ui .opblock .opblock-section-header h4{font-size:14px;margin:0;-webkit-box-flex:1;-ms-flex:1;flex:1;font-family:Titillium Web,sans-serif;color:#3b4151}.swagger-ui .opblock .opblock-summary-method{font-size:14px;font-weight:700;min-width:80px;padding:6px 15px;text-align:center;border-radius:3px;background:#000;text-shadow:0 1px 0 rgba(0,0,0,.1);font-family:Titillium Web,sans-serif;color:#fff}.swagger-ui .opblock .opblock-summary-path,.swagger-ui .opblock .opblock-summary-path__deprecated{font-size:16px;display:-webkit-box;display:-ms-flexbox;display:flex;padding:0 10px;font-family:Source Code Pro,monospace;font-weight:600;color:#3b4151;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.swagger-ui .opblock .opblock-summary-path .view-line-link,.swagger-ui .opblock .opblock-summary-path__deprecated .view-line-link{position:relative;top:2px;width:0;margin:0;cursor:pointer;transition:all .5s}.swagger-ui .opblock .opblock-summary-path:hover .view-line-link,.swagger-ui .opblock .opblock-summary-path__deprecated:hover .view-line-link{width:18px;margin:0 5px}.swagger-ui .opblock .opblock-summary-path__deprecated{text-decoration:line-through}.swagger-ui .opblock .opblock-summary-description{font-size:13px;-webkit-box-flex:1;-ms-flex:1;flex:1;font-family:Open Sans,sans-serif;color:#3b4151}.swagger-ui .opblock .opblock-summary{display:-webkit-box;display:-ms-flexbox;display:flex;padding:5px;cursor:pointer;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.swagger-ui .opblock.opblock-post{border-color:#49cc90;background:rgba(73,204,144,.1)}.swagger-ui .opblock.opblock-post .opblock-summary-method{background:#49cc90}.swagger-ui .opblock.opblock-post .opblock-summary{border-color:#49cc90}.swagger-ui .opblock.opblock-put{border-color:#fca130;background:rgba(252,161,48,.1)}.swagger-ui .opblock.opblock-put .opblock-summary-method{background:#fca130}.swagger-ui .opblock.opblock-put .opblock-summary{border-color:#fca130}.swagger-ui .opblock.opblock-delete{border-color:#f93e3e;background:rgba(249,62,62,.1)}.swagger-ui .opblock.opblock-delete .opblock-summary-method{background:#f93e3e}.swagger-ui .opblock.opblock-delete .opblock-summary{border-color:#f93e3e}.swagger-ui .opblock.opblock-get{border-color:#61affe;background:rgba(97,175,254,.1)}.swagger-ui .opblock.opblock-get .opblock-summary-method{background:#61affe}.swagger-ui .opblock.opblock-get .opblock-summary{border-color:#61affe}.swagger-ui .opblock.opblock-patch{border-color:#50e3c2;background:rgba(80,227,194,.1)}.swagger-ui .opblock.opblock-patch .opblock-summary-method{background:#50e3c2}.swagger-ui .opblock.opblock-patch .opblock-summary{border-color:#50e3c2}.swagger-ui .opblock.opblock-head{border-color:#9012fe;background:rgba(144,18,254,.1)}.swagger-ui .opblock.opblock-head .opblock-summary-method{background:#9012fe}.swagger-ui .opblock.opblock-head .opblock-summary{border-color:#9012fe}.swagger-ui .opblock.opblock-options{border-color:#0d5aa7;background:rgba(13,90,167,.1)}.swagger-ui .opblock.opblock-options .opblock-summary-method{background:#0d5aa7}.swagger-ui .opblock.opblock-options .opblock-summary{border-color:#0d5aa7}.swagger-ui .opblock.opblock-deprecated{opacity:.6;border-color:#ebebeb;background:hsla(0,0%,92%,.1)}.swagger-ui .opblock.opblock-deprecated .opblock-summary-method{background:#ebebeb}.swagger-ui .opblock.opblock-deprecated .opblock-summary{border-color:#ebebeb}.swagger-ui .opblock .opblock-schemes{padding:8px 20px}.swagger-ui .opblock .opblock-schemes .schemes-title{padding:0 10px 0 0}.swagger-ui .tab{display:-webkit-box;display:-ms-flexbox;display:flex;margin:20px 0 10px;padding:0;list-style:none}.swagger-ui .tab li{font-size:12px;min-width:100px;min-width:90px;padding:0;cursor:pointer;font-family:Titillium Web,sans-serif;color:#3b4151}.swagger-ui .tab li:first-of-type{position:relative;padding-left:0}.swagger-ui .tab li:first-of-type:after{position:absolute;top:0;right:6px;width:1px;height:100%;content:"";background:rgba(0,0,0,.2)}.swagger-ui .tab li.active{font-weight:700}.swagger-ui .opblock-description-wrapper,.swagger-ui .opblock-title_normal{padding:15px 20px}.swagger-ui .opblock-description-wrapper,.swagger-ui .opblock-description-wrapper h4,.swagger-ui .opblock-title_normal,.swagger-ui .opblock-title_normal h4{font-size:12px;margin:0 0 5px;font-family:Open Sans,sans-serif;color:#3b4151}.swagger-ui .opblock-description-wrapper p,.swagger-ui .opblock-title_normal p{font-size:14px;margin:0;font-family:Open Sans,sans-serif;color:#3b4151}.swagger-ui .execute-wrapper{padding:20px;text-align:right}.swagger-ui .execute-wrapper .btn{width:100%;padding:8px 40px}.swagger-ui .body-param-options{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.swagger-ui .body-param-options .body-param-edit{padding:10px 0}.swagger-ui .body-param-options label{padding:8px 0}.swagger-ui .body-param-options label select{margin:3px 0 0}.swagger-ui .responses-inner{padding:20px}.swagger-ui .responses-inner h4,.swagger-ui .responses-inner h5{font-size:12px;margin:10px 0 5px;font-family:Open Sans,sans-serif;color:#3b4151}.swagger-ui .response-col_status{font-size:14px;font-family:Open Sans,sans-serif;color:#3b4151}.swagger-ui .response-col_status .response-undocumented{font-size:11px;font-family:Source Code Pro,monospace;font-weight:600;color:#999}.swagger-ui .response-col_description__inner span{font-size:12px;font-style:italic;display:block;margin:10px 0;padding:10px;border-radius:4px;background:#41444e;font-family:Source Code Pro,monospace;font-weight:600;color:#fff}.swagger-ui .response-col_description__inner span p{margin:0}.swagger-ui .opblock-body pre{font-size:12px;margin:0;padding:10px;word-wrap:break-word;word-break:break-all;word-break:break-word;-webkit-hyphens:auto;-ms-hyphens:auto;hyphens:auto;white-space:pre-wrap;border-radius:4px;background:#41444e;overflow-wrap:break-word;font-family:Source Code Pro,monospace;font-weight:600;color:#fff}.swagger-ui .opblock-body pre span{color:#fff!important}.swagger-ui .opblock-body pre .headerline{display:block}.swagger-ui .scheme-container{margin:0 0 20px;padding:30px 0;background:#fff;box-shadow:0 1px 2px 0 rgba(0,0,0,.15)}.swagger-ui .scheme-container .schemes{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.swagger-ui .scheme-container .schemes>label{font-size:12px;font-weight:700;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;margin:-20px 15px 0 0;font-family:Titillium Web,sans-serif;color:#3b4151}.swagger-ui .scheme-container .schemes>label select{min-width:130px;text-transform:uppercase}.swagger-ui .loading-container{padding:40px 0 60px}.swagger-ui .loading-container .loading{position:relative}.swagger-ui .loading-container .loading:after{font-size:10px;font-weight:700;position:absolute;top:50%;left:50%;content:"loading";-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);text-transform:uppercase;font-family:Titillium Web,sans-serif;color:#3b4151}.swagger-ui .loading-container .loading:before{position:absolute;top:50%;left:50%;display:block;width:60px;height:60px;margin:-30px;content:"";-webkit-animation:rotation 1s infinite linear,opacity .5s;animation:rotation 1s infinite linear,opacity .5s;opacity:1;border:2px solid rgba(85,85,85,.1);border-top-color:rgba(0,0,0,.6);border-radius:100%;-webkit-backface-visibility:hidden;backface-visibility:hidden}@-webkit-keyframes rotation{to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes rotation{to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@-webkit-keyframes blinker{50%{opacity:0}}@keyframes blinker{50%{opacity:0}}.swagger-ui .btn{font-size:14px;font-weight:700;padding:5px 23px;transition:all .3s;border:2px solid #888;border-radius:4px;background:transparent;box-shadow:0 1px 2px rgba(0,0,0,.1);font-family:Titillium Web,sans-serif;color:#3b4151}.swagger-ui .btn[disabled]{cursor:not-allowed;opacity:.3}.swagger-ui .btn:hover{box-shadow:0 0 5px rgba(0,0,0,.3)}.swagger-ui .btn.cancel{border-color:#ff6060;font-family:Titillium Web,sans-serif;color:#ff6060}.swagger-ui .btn.authorize{line-height:1;display:inline;color:#49cc90;border-color:#49cc90}.swagger-ui .btn.authorize span{float:left;padding:4px 20px 0 0}.swagger-ui .btn.authorize svg{fill:#49cc90}.swagger-ui .btn.execute{-webkit-animation:pulse 2s infinite;animation:pulse 2s infinite;color:#fff;border-color:#4990e2}@-webkit-keyframes pulse{0%{color:#fff;background:#4990e2;box-shadow:0 0 0 0 rgba(73,144,226,.8)}70%{box-shadow:0 0 0 5px rgba(73,144,226,0)}to{color:#fff;background:#4990e2;box-shadow:0 0 0 0 rgba(73,144,226,0)}}@keyframes pulse{0%{color:#fff;background:#4990e2;box-shadow:0 0 0 0 rgba(73,144,226,.8)}70%{box-shadow:0 0 0 5px rgba(73,144,226,0)}to{color:#fff;background:#4990e2;box-shadow:0 0 0 0 rgba(73,144,226,0)}}.swagger-ui .btn-group{display:-webkit-box;display:-ms-flexbox;display:flex;padding:30px}.swagger-ui .btn-group .btn{-webkit-box-flex:1;-ms-flex:1;flex:1}.swagger-ui .btn-group .btn:first-child{border-radius:4px 0 0 4px}.swagger-ui .btn-group .btn:last-child{border-radius:0 4px 4px 0}.swagger-ui .authorization__btn{padding:0 10px;border:none;background:none}.swagger-ui .authorization__btn.locked{opacity:1}.swagger-ui .authorization__btn.unlocked{opacity:.4}.swagger-ui .expand-methods,.swagger-ui .expand-operation{border:none;background:none}.swagger-ui .expand-methods svg,.swagger-ui .expand-operation svg{width:20px;height:20px}.swagger-ui .expand-methods{padding:0 10px}.swagger-ui .expand-methods:hover svg{fill:#444}.swagger-ui .expand-methods svg{transition:all .3s;fill:#777}.swagger-ui button{cursor:pointer;outline:none}.swagger-ui select{font-size:14px;font-weight:700;padding:5px 40px 5px 10px;border:2px solid #41444e;border-radius:4px;background:#f7f7f7 url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAyMCI+ICAgIDxwYXRoIGQ9Ik0xMy40MTggNy44NTljLjI3MS0uMjY4LjcwOS0uMjY4Ljk3OCAwIC4yNy4yNjguMjcyLjcwMSAwIC45NjlsLTMuOTA4IDMuODNjLS4yNy4yNjgtLjcwNy4yNjgtLjk3OSAwbC0zLjkwOC0zLjgzYy0uMjctLjI2Ny0uMjctLjcwMSAwLS45NjkuMjcxLS4yNjguNzA5LS4yNjguOTc4IDBMMTAgMTFsMy40MTgtMy4xNDF6Ii8+PC9zdmc+) right 10px center no-repeat;background-size:20px;box-shadow:0 1px 2px 0 rgba(0,0,0,.25);font-family:Titillium Web,sans-serif;color:#3b4151;-webkit-appearance:none;-moz-appearance:none;appearance:none}.swagger-ui select[multiple]{margin:5px 0;padding:5px;background:#f7f7f7}.swagger-ui .opblock-body select{min-width:230px}.swagger-ui label{font-size:12px;font-weight:700;margin:0 0 5px;font-family:Titillium Web,sans-serif;color:#3b4151}.swagger-ui input[type=email],.swagger-ui input[type=password],.swagger-ui input[type=search],.swagger-ui input[type=text]{min-width:100px;margin:5px 0;padding:8px 10px;border:1px solid #d9d9d9;border-radius:4px;background:#fff}.swagger-ui input[type=email].invalid,.swagger-ui input[type=password].invalid,.swagger-ui input[type=search].invalid,.swagger-ui input[type=text].invalid{-webkit-animation:shake .4s 1;animation:shake .4s 1;border-color:#f93e3e;background:#feebeb}@-webkit-keyframes shake{10%,90%{-webkit-transform:translate3d(-1px,0,0);transform:translate3d(-1px,0,0)}20%,80%{-webkit-transform:translate3d(2px,0,0);transform:translate3d(2px,0,0)}30%,50%,70%{-webkit-transform:translate3d(-4px,0,0);transform:translate3d(-4px,0,0)}40%,60%{-webkit-transform:translate3d(4px,0,0);transform:translate3d(4px,0,0)}}@keyframes shake{10%,90%{-webkit-transform:translate3d(-1px,0,0);transform:translate3d(-1px,0,0)}20%,80%{-webkit-transform:translate3d(2px,0,0);transform:translate3d(2px,0,0)}30%,50%,70%{-webkit-transform:translate3d(-4px,0,0);transform:translate3d(-4px,0,0)}40%,60%{-webkit-transform:translate3d(4px,0,0);transform:translate3d(4px,0,0)}}.swagger-ui textarea{font-size:12px;width:100%;min-height:280px;padding:10px;border:none;border-radius:4px;outline:none;background:hsla(0,0%,100%,.8);font-family:Source Code Pro,monospace;font-weight:600;color:#3b4151}.swagger-ui textarea:focus{border:2px solid #61affe}.swagger-ui textarea.curl{font-size:12px;min-height:100px;margin:0;padding:10px;resize:none;border-radius:4px;background:#41444e;font-family:Source Code Pro,monospace;font-weight:600;color:#fff}.swagger-ui .checkbox{padding:5px 0 10px;transition:opacity .5s;color:#333}.swagger-ui .checkbox label{display:-webkit-box;display:-ms-flexbox;display:flex}.swagger-ui .checkbox p{font-weight:400!important;font-style:italic;margin:0!important;font-family:Source Code Pro,monospace;font-weight:600;color:#3b4151}.swagger-ui .checkbox input[type=checkbox]{display:none}.swagger-ui .checkbox input[type=checkbox]+label>.item{position:relative;top:3px;display:inline-block;width:16px;height:16px;margin:0 8px 0 0;padding:5px;cursor:pointer;border-radius:1px;background:#e8e8e8;box-shadow:0 0 0 2px #e8e8e8;-webkit-box-flex:0;-ms-flex:none;flex:none}.swagger-ui .checkbox input[type=checkbox]+label>.item:active{-webkit-transform:scale(.9);transform:scale(.9)}.swagger-ui .checkbox input[type=checkbox]:checked+label>.item{background:#e8e8e8 url("data:image/svg+xml;charset=utf-8,%3Csvg width='10' height='8' viewBox='3 7 10 8' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='%2341474E' fill-rule='evenodd' d='M6.333 15L3 11.667l1.333-1.334 2 2L11.667 7 13 8.333z'/%3E%3C/svg%3E") 50% no-repeat}.swagger-ui .dialog-ux{position:fixed;z-index:9999;top:0;right:0;bottom:0;left:0}.swagger-ui .dialog-ux .backdrop-ux{position:fixed;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.8)}.swagger-ui .dialog-ux .modal-ux{position:absolute;z-index:9999;top:50%;left:50%;width:100%;min-width:300px;max-width:650px;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);border:1px solid #ebebeb;border-radius:4px;background:#fff;box-shadow:0 10px 30px 0 rgba(0,0,0,.2)}.swagger-ui .dialog-ux .modal-ux-content{overflow-y:auto;max-height:540px;padding:20px}.swagger-ui .dialog-ux .modal-ux-content p{font-size:12px;margin:0 0 5px;color:#41444e;font-family:Open Sans,sans-serif;color:#3b4151}.swagger-ui .dialog-ux .modal-ux-content h4{font-size:18px;font-weight:600;margin:15px 0 0;font-family:Titillium Web,sans-serif;color:#3b4151}.swagger-ui .dialog-ux .modal-ux-header{display:-webkit-box;display:-ms-flexbox;display:flex;padding:12px 0;border-bottom:1px solid #ebebeb;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.swagger-ui .dialog-ux .modal-ux-header .close-modal{padding:0 10px;border:none;background:none;-webkit-appearance:none;-moz-appearance:none;appearance:none}.swagger-ui .dialog-ux .modal-ux-header h3{font-size:20px;font-weight:600;margin:0;padding:0 20px;-webkit-box-flex:1;-ms-flex:1;flex:1;font-family:Titillium Web,sans-serif;color:#3b4151}.swagger-ui .model{font-size:12px;font-weight:300;font-family:Source Code Pro,monospace;font-weight:600;color:#3b4151}.swagger-ui .model-toggle{font-size:10px;position:relative;top:6px;display:inline-block;margin:auto .3em;cursor:pointer;transition:-webkit-transform .15s ease-in;transition:transform .15s ease-in;transition:transform .15s ease-in,-webkit-transform .15s ease-in;-webkit-transform:rotate(90deg);transform:rotate(90deg);-webkit-transform-origin:50% 50%;transform-origin:50% 50%}.swagger-ui .model-toggle.collapsed{-webkit-transform:rotate(0deg);transform:rotate(0deg)}.swagger-ui .model-toggle:after{display:block;width:20px;height:20px;content:"";background:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath d='M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z'/%3E%3C/svg%3E") 50% no-repeat;background-size:100%}.swagger-ui .model-jump-to-path{position:relative;cursor:pointer}.swagger-ui .model-jump-to-path .view-line-link{position:absolute;top:-.4em;cursor:pointer}.swagger-ui .model-title{position:relative}.swagger-ui .model-title:hover .model-hint{visibility:visible}.swagger-ui .model-hint{position:absolute;top:-1.8em;visibility:hidden;padding:.1em .5em;white-space:nowrap;color:#ebebeb;border-radius:4px;background:rgba(0,0,0,.7)}.swagger-ui section.models{margin:30px 0;border:1px solid rgba(59,65,81,.3);border-radius:4px}.swagger-ui section.models.is-open{padding:0 0 20px}.swagger-ui section.models.is-open h4{margin:0 0 5px;border-bottom:1px solid rgba(59,65,81,.3)}.swagger-ui section.models.is-open h4 svg{-webkit-transform:rotate(90deg);transform:rotate(90deg)}.swagger-ui section.models h4{font-size:16px;display:-webkit-box;display:-ms-flexbox;display:flex;margin:0;padding:10px 20px 10px 10px;cursor:pointer;transition:all .2s;font-family:Titillium Web,sans-serif;color:#777;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.swagger-ui section.models h4 svg{transition:all .4s}.swagger-ui section.models h4 span{-webkit-box-flex:1;-ms-flex:1;flex:1}.swagger-ui section.models h4:hover{background:rgba(0,0,0,.02)}.swagger-ui section.models h5{font-size:16px;margin:0 0 10px;font-family:Titillium Web,sans-serif;color:#777}.swagger-ui section.models .model-jump-to-path{position:relative;top:5px}.swagger-ui section.models .model-container{margin:0 20px 15px;transition:all .5s;border-radius:4px;background:rgba(0,0,0,.05)}.swagger-ui section.models .model-container:hover{background:rgba(0,0,0,.07)}.swagger-ui section.models .model-container:first-of-type{margin:20px}.swagger-ui section.models .model-container:last-of-type{margin:0 20px}.swagger-ui section.models .model-box{background:none}.swagger-ui .model-box{padding:10px;border-radius:4px;background:rgba(0,0,0,.1)}.swagger-ui .model-box .model-jump-to-path{position:relative;top:4px}.swagger-ui .model-title{font-size:16px;font-family:Titillium Web,sans-serif;color:#555}.swagger-ui span>span.model,.swagger-ui span>span.model .brace-close{padding:0 0 0 10px}.swagger-ui .prop-type{color:#55a}.swagger-ui .prop-enum{display:block}.swagger-ui .prop-format{color:#999}.swagger-ui table{width:100%;padding:0 10px;border-collapse:collapse}.swagger-ui table.model tbody tr td{padding:0;vertical-align:top}.swagger-ui table.model tbody tr td:first-of-type{width:100px;padding:0}.swagger-ui table.headers td{font-size:12px;font-weight:300;vertical-align:middle;font-family:Source Code Pro,monospace;font-weight:600;color:#3b4151}.swagger-ui table tbody tr td{padding:10px 0 0;vertical-align:top}.swagger-ui table tbody tr td:first-of-type{width:20%;padding:10px 0}.swagger-ui table thead tr td,.swagger-ui table thead tr th{font-size:12px;font-weight:700;padding:12px 0;text-align:left;border-bottom:1px solid rgba(59,65,81,.2);font-family:Open Sans,sans-serif;color:#3b4151}.swagger-ui .parameters-col_description p{font-size:14px;margin:0;font-family:Open Sans,sans-serif;color:#3b4151}.swagger-ui .parameters-col_description input[type=text]{width:100%;max-width:340px}.swagger-ui .parameter__name{font-size:16px;font-weight:400;font-family:Titillium Web,sans-serif;color:#3b4151}.swagger-ui .parameter__name.required{font-weight:700}.swagger-ui .parameter__name.required:after{font-size:10px;position:relative;top:-6px;padding:5px;content:"required";color:rgba(255,0,0,.6)}.swagger-ui .parameter__in{font-size:12px;font-style:italic;font-family:Source Code Pro,monospace;font-weight:600;color:#888}.swagger-ui .table-container{padding:20px}.swagger-ui .topbar{padding:8px 30px;background-color:#89bf04}.swagger-ui .topbar .topbar-wrapper{-ms-flex-align:center}.swagger-ui .topbar .topbar-wrapper,.swagger-ui .topbar a{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;align-items:center}.swagger-ui .topbar a{font-size:1.5em;font-weight:700;max-width:300px;text-decoration:none;-webkit-box-flex:1;-ms-flex:1;flex:1;-ms-flex-align:center;font-family:Titillium Web,sans-serif;color:#fff}.swagger-ui .topbar a span{margin:0;padding:0 10px}.swagger-ui .topbar .download-url-wrapper{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-flex:3;-ms-flex:3;flex:3}.swagger-ui .topbar .download-url-wrapper input[type=text]{width:100%;min-width:350px;margin:0;border:2px solid #547f00;border-radius:4px 0 0 4px;outline:none}.swagger-ui .topbar .download-url-wrapper .download-url-button{font-size:16px;font-weight:700;padding:4px 40px;border:none;border-radius:0 4px 4px 0;background:#547f00;font-family:Titillium Web,sans-serif;color:#fff}.swagger-ui .info{margin:50px 0}.swagger-ui .info hgroup.main{margin:0 0 20px}.swagger-ui .info hgroup.main a{font-size:12px}.swagger-ui .info li,.swagger-ui .info p,.swagger-ui .info table{font-size:14px;font-family:Open Sans,sans-serif;color:#3b4151}.swagger-ui .info h1,.swagger-ui .info h2,.swagger-ui .info h3,.swagger-ui .info h4,.swagger-ui .info h5{font-family:Open Sans,sans-serif;color:#3b4151}.swagger-ui .info code{padding:3px 5px;border-radius:4px;background:rgba(0,0,0,.05);font-family:Source Code Pro,monospace;font-weight:600;color:#9012fe}.swagger-ui .info a{font-size:14px;transition:all .4s;font-family:Open Sans,sans-serif;color:#4990e2}.swagger-ui .info a:hover{color:#1f69c0}.swagger-ui .info>div{margin:0 0 5px}.swagger-ui .info .base-url{font-size:12px;font-weight:300!important;margin:0;font-family:Source Code Pro,monospace;font-weight:600;color:#3b4151}.swagger-ui .info .title{font-size:36px;margin:0;font-family:Open Sans,sans-serif;color:#3b4151}.swagger-ui .info .title small{font-size:10px;position:relative;top:-5px;display:inline-block;margin:0 0 0 5px;padding:2px 4px;vertical-align:super;border-radius:57px;background:#7d8492}.swagger-ui .info .title small pre{margin:0;font-family:Titillium Web,sans-serif;color:#fff}.swagger-ui .auth-btn-wrapper{display:-webkit-box;display:-ms-flexbox;display:flex;padding:10px 0;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.swagger-ui .auth-wrapper{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-flex:1;-ms-flex:1;flex:1;-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end}.swagger-ui .auth-wrapper .authorize{padding-right:20px}.swagger-ui .auth-container{margin:0 0 10px;padding:10px 20px;border-bottom:1px solid #ebebeb}.swagger-ui .auth-container:last-of-type{margin:0;padding:10px 20px;border:0}.swagger-ui .auth-container h4{margin:5px 0 15px!important}.swagger-ui .auth-container .wrapper{margin:0;padding:0}.swagger-ui .auth-container input[type=password],.swagger-ui .auth-container input[type=text]{min-width:230px}.swagger-ui .auth-container .errors{font-size:12px;padding:10px;border-radius:4px;font-family:Source Code Pro,monospace;font-weight:600;color:#3b4151}.swagger-ui .scopes h2{font-size:14px;font-family:Titillium Web,sans-serif;color:#3b4151}.swagger-ui .scope-def{padding:0 0 20px}.swagger-ui .errors-wrapper{margin:20px;padding:10px 20px;-webkit-animation:scaleUp .5s;animation:scaleUp .5s;border:2px solid #f93e3e;border-radius:4px;background:rgba(249,62,62,.1)}.swagger-ui .errors-wrapper .error-wrapper{margin:0 0 10px}.swagger-ui .errors-wrapper .errors h4{font-size:14px;margin:0;font-family:Source Code Pro,monospace;font-weight:600;color:#3b4151}.swagger-ui .errors-wrapper .errors small{color:#666}.swagger-ui .errors-wrapper hgroup{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.swagger-ui .errors-wrapper hgroup h4{font-size:20px;margin:0;-webkit-box-flex:1;-ms-flex:1;flex:1;font-family:Titillium Web,sans-serif;color:#3b4151}@-webkit-keyframes scaleUp{0%{-webkit-transform:scale(.8);transform:scale(.8);opacity:0}to{-webkit-transform:scale(1);transform:scale(1);opacity:1}}@keyframes scaleUp{0%{-webkit-transform:scale(.8);transform:scale(.8);opacity:0}to{-webkit-transform:scale(1);transform:scale(1);opacity:1}}.swagger-ui .Resizer.vertical.disabled{display:none}
/*# sourceMappingURL=swagger-ui.css.map*/
\ No newline at end of file
{"version":3,"file":"swagger-ui.css","sources":[],"mappings":"","sourceRoot":""}
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
{"version":3,"file":"swagger-ui.js","sources":["webpack:///swagger-ui.js"],"mappings":"AAAA;;;;;;AA0yCA;AAoyHA;AAmyHA;AAykGA;AA+9BA;AA6iCA;AAojCA;AAu5BA","sourceRoot":""}
\ No newline at end of file
{
"swagger": "2.0",
"info": {
"title": "beego Test API",
"description": "beego has a very cool tools to autogenerate documents for your API",
"version": "1.0.0",
"termsOfService": "http://beego.me/",
"contact": {
"email": "astaxie@gmail.com"
},
"license": {
"name": "Apache 2.0",
"url": "http://www.apache.org/licenses/LICENSE-2.0.html"
}
},
"basePath": "/v1",
"paths": {
"/account/createAccount": {
"post": {
"tags": [
"account"
],
"description": "create Account",
"operationId": "AccountController.CreateAccount",
"parameters": [
{
"in": "header",
"name": "label",
"description": "账号标签",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "执行成功,返回账户信息"
},
"403": {
"description": "Forbidden禁止执行"
}
}
}
},
"/account/getAccounts": {
"get": {
"tags": [
"account"
],
"description": "get Accounts",
"operationId": "AccountController.GetAccounts",
"responses": {
"200": {
"description": "执行成功,返回账户信息"
},
"403": {
"description": "Forbidden禁止执行"
}
}
}
},
"/account/getBalance": {
"get": {
"tags": [
"account"
],
"description": "get balance by a account addr.",
"operationId": "AccountController.GetBalance",
"parameters": [
{
"in": "query",
"name": "addr",
"description": "账户地址",
"required": true,
"type": "string"
},
{
"in": "query",
"name": "execer",
"description": "执行器名字",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "执行成功,返回余额信息"
},
"403": {
"description": "Forbidden禁止执行"
}
}
}
},
"/account/importKey": {
"put": {
"tags": [
"account"
],
"description": "set label for account",
"operationId": "AccountController.importKey",
"parameters": [
{
"in": "header",
"name": "privateKey",
"description": "私钥",
"required": true,
"type": "string"
},
{
"in": "header",
"name": "label",
"description": "标签名",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "执行成功,返回账户信息"
},
"403": {
"description": "Forbidden禁止执行"
}
}
}
},
"/account/setLabel": {
"put": {
"tags": [
"account"
],
"description": "set label for account",
"operationId": "AccountController.SetLabel",
"parameters": [
{
"in": "header",
"name": "addr",
"description": "账户地址",
"required": true,
"type": "string"
},
{
"in": "header",
"name": "label",
"description": "标签名",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "执行成功,返回账户信息"
},
"403": {
"description": "Forbidden禁止执行"
}
}
}
},
"/account/transfer": {
"post": {
"tags": [
"account"
],
"description": "transfer",
"operationId": "AccountController.Transfer",
"parameters": [
{
"in": "formData",
"name": "fromAddr",
"description": "转出地址",
"required": true,
"type": "string"
},
{
"in": "formData",
"name": "toAddr",
"description": "转入地址",
"required": true,
"type": "string"
},
{
"in": "formData",
"name": "amount",
"description": "转账额度",
"required": true,
"type": "number",
"format": "double"
},
{
"in": "formData",
"name": "note",
"description": "转账备注",
"required": true,
"type": "string"
},
{
"in": "formData",
"name": "tokenSymbol",
"description": "代币符号",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "执行成功,返回交易的hash"
},
"403": {
"description": "Forbidden禁止执行"
}
}
}
},
"/block/getBlockHashByHeight": {
"get": {
"tags": [
"block"
],
"description": "getBlockHashByHeight",
"operationId": "BlockController.getBlockHashByHeight",
"parameters": [
{
"in": "query",
"name": "height",
"description": "查询的区块高度",
"required": true,
"type": "integer",
"format": "int64"
}
],
"responses": {
"200": {
"description": "执行成功返回blockhash"
},
"400": {
"description": "传入参数有误"
},
"403": {
"description": "Forbidden禁止执行"
}
}
}
},
"/block/getBlockHeaders": {
"get": {
"tags": [
"block"
],
"description": "getblockHeaders",
"operationId": "BlockController.getblockHeaders",
"parameters": [
{
"in": "query",
"name": "startHeight",
"description": "查询的开始区块高度",
"required": true,
"type": "integer",
"format": "int64"
},
{
"in": "query",
"name": "endHeight",
"description": "查询的结束区块高度",
"required": true,
"type": "integer",
"format": "int64"
},
{
"in": "query",
"name": "detail",
"description": "是否查询详细信息",
"required": true,
"type": "boolean"
}
],
"responses": {
"200": {
"description": "执行成功,返回blockHeader"
},
"400": {
"description": "传入参数有误"
},
"403": {
"description": "Forbidden禁止执行"
}
}
}
},
"/block/getBlockList": {
"get": {
"tags": [
"block"
],
"description": "getblockList",
"operationId": "BlockController.getblockList",
"parameters": [
{
"in": "query",
"name": "startHeight",
"description": "查询的开始区块高度",
"required": true,
"type": "integer",
"format": "int64"
},
{
"in": "query",
"name": "endHeight",
"description": "查询的结束区块高度",
"required": true,
"type": "integer",
"format": "int64"
},
{
"in": "query",
"name": "detail",
"description": "是否查询详细信息",
"required": true,
"type": "boolean"
}
],
"responses": {
"200": {
"description": "执行成功,返回blockList"
},
"400": {
"description": "传入参数有误"
},
"403": {
"description": "Forbidden禁止执行"
}
}
}
},
"/block/getBlockViewByHash": {
"get": {
"tags": [
"block"
],
"description": "getblockViewByHash",
"operationId": "BlockController.getblockViewByHash",
"parameters": [
{
"in": "query",
"name": "blockHash",
"description": "blockHash",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "执行成功返回blockView"
},
"400": {
"description": "传入参数有误"
},
"403": {
"description": "Forbidden禁止执行"
}
}
}
},
"/block/getLastHeader": {
"get": {
"tags": [
"block"
],
"description": "getLastHeader",
"operationId": "BlockController.getLastHeader",
"responses": {
"200": {
"description": "执行成功,返回block信息"
},
"400": {
"description": "传入参数有误"
},
"403": {
"description": "Forbidden禁止执行"
}
}
}
},
"/contract/invoke": {
"get": {
"tags": [
"contract"
],
"description": "Invoke contract func.",
"operationId": "ContractController.Invoke",
"responses": {
"200": {
"description": "执行成功"
},
"403": {
"description": "Forbidden禁止执行"
}
}
},
"post": {
"tags": [
"contract"
],
"description": "Invoke contract func.",
"operationId": "ContractController.Invoke",
"responses": {
"200": {
"description": "执行成功"
},
"403": {
"description": "Forbidden禁止执行"
}
}
}
},
"/peer/getPeers": {
"get": {
"tags": [
"peer"
],
"description": "get Peers",
"operationId": "PeerController.GetPeers",
"responses": {
"200": {
"description": "执行成功,返回节点信息"
},
"403": {
"description": "Forbidden禁止执行"
}
}
}
},
"/server/clearChain": {
"post": {
"tags": [
"server"
],
"description": "ClearChain",
"operationId": "ServerController.deployChain and start chain33",
"parameters": [
{
"in": "body",
"name": "userName",
"description": "用户名",
"required": true,
"type": "string"
},
{
"in": "body",
"name": "passWord",
"description": "密码",
"required": true,
"type": "string"
},
{
"in": "body",
"name": "hostIp",
"description": "ssh ip",
"required": true,
"type": "string"
},
{
"in": "body",
"name": "port",
"description": "ssh port",
"required": true,
"type": "integer",
"format": "int64"
},
{
"in": "body",
"name": "remoteDir",
"description": "部署路径",
"required": true,
"type": "string"
}
],
"responses": {
"201": {
"description": "执行成功"
},
"400": {
"description": "传入参数有误"
},
"403": {
"description": "Forbidden禁止执行"
}
}
}
},
"/server/deployChain": {
"post": {
"tags": [
"server"
],
"description": "DeployChain",
"operationId": "ServerController.deployChain and start chain33",
"parameters": [
{
"in": "body",
"name": "userName",
"description": "用户名",
"required": true,
"type": "string"
},
{
"in": "body",
"name": "passWord",
"description": "密码",
"required": true,
"type": "string"
},
{
"in": "body",
"name": "hostIp",
"description": "ssh ip",
"required": true,
"type": "string"
},
{
"in": "body",
"name": "port",
"description": "ssh port",
"required": true,
"type": "integer",
"format": "int64"
},
{
"in": "body",
"name": "remoteDir",
"description": "部署路径",
"required": true,
"type": "string"
},
{
"in": "body",
"name": "seedURL",
"description": "seedURL",
"required": true,
"type": "string"
},
{
"in": "body",
"name": "peerURL",
"description": "raft内部通信URL",
"required": true,
"type": "string"
}
],
"responses": {
"201": {
"description": "执行成功"
},
"400": {
"description": "传入参数有误"
},
"403": {
"description": "Forbidden禁止执行"
}
}
}
},
"/server/stopChain": {
"post": {
"tags": [
"server"
],
"description": "DeployChain",
"operationId": "ServerController.deployChain and start chain33",
"parameters": [
{
"in": "body",
"name": "userName",
"description": "用户名",
"required": true,
"type": "string"
},
{
"in": "body",
"name": "passWord",
"description": "密码",
"required": true,
"type": "string"
},
{
"in": "body",
"name": "hostIp",
"description": "ssh ip",
"required": true,
"type": "string"
},
{
"in": "body",
"name": "port",
"description": "ssh port",
"required": true,
"type": "integer",
"format": "int64"
},
{
"in": "body",
"name": "remoteDir",
"description": "部署路径",
"required": true,
"type": "string"
}
],
"responses": {
"201": {
"description": "执行成功"
},
"400": {
"description": "传入参数有误"
},
"403": {
"description": "Forbidden禁止执行"
}
}
}
},
"/task/getTaskStatus": {
"get": {
"tags": [
"task"
],
"description": "get Task",
"operationId": "TaskController.GetTask",
"parameters": [
{
"in": "query",
"name": "taskId",
"description": "taskId",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "执行成功,返回任务状态"
},
"403": {
"description": "Forbidden禁止执行"
}
}
}
},
"/tx/queryTxByAddr": {
"get": {
"tags": [
"tx"
],
"description": "queryTxByAddr",
"operationId": "TxController.queryTxByAddr",
"parameters": [
{
"in": "query",
"name": "Addr",
"description": "addr",
"required": true,
"type": "string"
},
{
"in": "query",
"name": "Flag",
"description": "flag",
"required": true,
"type": "integer",
"format": "int64"
},
{
"in": "query",
"name": "Count",
"description": "count",
"required": true,
"type": "integer",
"format": "int64"
},
{
"in": "query",
"name": "Direction",
"description": "direction",
"required": true,
"type": "integer",
"format": "int64"
},
{
"in": "query",
"name": "Height",
"description": "height",
"required": true,
"type": "integer",
"format": "int64"
},
{
"in": "query",
"name": "Index",
"description": "index",
"required": true,
"type": "integer",
"format": "int64"
}
],
"responses": {
"200": {
"description": "执行成功返回交易信息"
},
"400": {
"description": "传入参数有误"
},
"403": {
"description": "Forbidden禁止执行"
}
}
}
},
"/tx/queryTxByHash": {
"get": {
"tags": [
"tx"
],
"description": "queryTxByHash",
"operationId": "TxController.queryTxByHash",
"parameters": [
{
"in": "query",
"name": "txHash",
"description": "单笔交易的hash",
"required": true,
"type": "string"
},
{
"in": "query",
"name": "isRawHex",
"description": "isRawHex",
"required": true,
"type": "boolean"
}
],
"responses": {
"200": {
"description": "执行成功,返回交易信息"
},
"400": {
"description": "传入参数有误"
},
"403": {
"description": "Forbidden禁止执行"
}
}
}
},
"/tx/sendTX": {
"post": {
"tags": [
"tx"
],
"description": "SendTX",
"operationId": "TxController.SendTX",
"parameters": [
{
"in": "query",
"name": "execerName",
"description": "执行器名称",
"required": true,
"type": "string"
},
{
"in": "query",
"name": "privateKey",
"description": "私钥",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "执行成功返回交易信息"
},
"400": {
"description": "传入参数有误"
},
"403": {
"description": "Forbidden禁止执行"
}
}
}
},
"/wallet/lock": {
"post": {
"tags": [
"wallet"
],
"description": "lock wallet",
"operationId": "WalletController.Lock",
"responses": {
"200": {
"description": "执行成功,返回是否执行成功"
},
"403": {
"description": "Forbidden禁止执行"
}
}
}
},
"/wallet/mergeBalance": {
"post": {
"tags": [
"wallet"
],
"description": "create Account",
"operationId": "WalletController.MergeBalance",
"parameters": [
{
"in": "header",
"name": "toAddr",
"description": "目的地址",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "执行成功,返回txHash数组"
},
"403": {
"description": "Forbidden禁止执行"
}
}
}
},
"/wallet/modifyPwd": {
"put": {
"tags": [
"wallet"
],
"description": "modify account paasworld",
"operationId": "WalletController.ModifyPwd",
"parameters": [
{
"in": "header",
"name": "oldPwd",
"description": "旧密码",
"required": true,
"type": "string"
},
{
"in": "header",
"name": "newPwd",
"description": "新密码",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "执行成功,返回是否修改成功"
},
"403": {
"description": "Forbidden禁止执行"
}
}
}
},
"/wallet/unLock": {
"post": {
"tags": [
"wallet"
],
"description": "UnLock wallet",
"operationId": "WalletController.UnLock",
"parameters": [
{
"in": "header",
"name": "pwd",
"description": "钱包密码",
"required": true,
"type": "string"
},
{
"in": "header",
"name": "timeOut",
"description": "设置锁定时间",
"required": true,
"type": "integer",
"format": "int64"
},
{
"in": "header",
"name": "scope",
"description": "目前只支持wallet or ticket",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "执行成功,返回是否执行成功"
},
"403": {
"description": "Forbidden禁止执行"
}
}
}
},
"/wallet/walletListTxs": {
"get": {
"tags": [
"wallet"
],
"description": "根据TxHash 查看具体的交易信息",
"operationId": "WalletController.WalletListTxs",
"parameters": [
{
"in": "query",
"name": "txHash",
"description": "所有tx 交易的txHash",
"required": true,
"type": "string"
},
{
"in": "query",
"name": "count",
"description": "查询数量",
"required": true,
"type": "integer",
"format": "int32"
},
{
"in": "query",
"name": "dir",
"description": "0或1表示向前,向后查询",
"required": true,
"type": "integer",
"format": "int32"
}
],
"responses": {
"200": {
"description": "执行成功,返回详细的交易列表"
},
"403": {
"description": "Forbidden禁止执行"
}
}
}
},
"/wallet/walletStatus": {
"get": {
"tags": [
"wallet"
],
"description": "get wallet status",
"operationId": "WalletController.WalletStatus",
"responses": {
"200": {
"description": "执行成功,返回钱包状态"
},
"403": {
"description": "Forbidden禁止执行"
}
}
}
}
},
"tags": [
{
"name": "account",
"description": "AccountController operations for account\n"
},
{
"name": "wallet",
"description": "WalletController operations for Wallet\n"
},
{
"name": "peer",
"description": "PeerController operations for Peer\n"
},
{
"name": "block",
"description": "BlockController operations for Block\n"
},
{
"name": "tx",
"description": "TxController operations for Tx\n"
},
{
"name": "server",
"description": " ServerController operations for Server\n"
},
{
"name": "task",
"description": "TaskController operations for Peer\n"
},
{
"name": "contract",
"description": "ContractController operations for Peer\n"
}
]
}
\ No newline at end of file
swagger: "2.0"
info:
title: beego Test API
description: beego has a very cool tools to autogenerate documents for your API
version: 1.0.0
termsOfService: http://beego.me/
contact:
email: astaxie@gmail.com
license:
name: Apache 2.0
url: http://www.apache.org/licenses/LICENSE-2.0.html
basePath: /v1
paths:
/account/createAccount:
post:
tags:
- account
description: create Account
operationId: AccountController.CreateAccount
parameters:
- in: header
name: label
description: 账号标签
required: true
type: string
responses:
"200":
description: 执行成功,返回账户信息
"403":
description: Forbidden禁止执行
/account/getAccounts:
get:
tags:
- account
description: get Accounts
operationId: AccountController.GetAccounts
responses:
"200":
description: 执行成功,返回账户信息
"403":
description: Forbidden禁止执行
/account/getBalance:
get:
tags:
- account
description: get balance by a account addr.
operationId: AccountController.GetBalance
parameters:
- in: query
name: addr
description: 账户地址
required: true
type: string
- in: query
name: execer
description: 执行器名字
required: true
type: string
responses:
"200":
description: 执行成功,返回余额信息
"403":
description: Forbidden禁止执行
/account/importKey:
put:
tags:
- account
description: set label for account
operationId: AccountController.importKey
parameters:
- in: header
name: privateKey
description: 私钥
required: true
type: string
- in: header
name: label
description: 标签名
required: true
type: string
responses:
"200":
description: 执行成功,返回账户信息
"403":
description: Forbidden禁止执行
/account/setLabel:
put:
tags:
- account
description: set label for account
operationId: AccountController.SetLabel
parameters:
- in: header
name: addr
description: 账户地址
required: true
type: string
- in: header
name: label
description: 标签名
required: true
type: string
responses:
"200":
description: 执行成功,返回账户信息
"403":
description: Forbidden禁止执行
/account/transfer:
post:
tags:
- account
description: transfer
operationId: AccountController.Transfer
parameters:
- in: formData
name: fromAddr
description: 转出地址
required: true
type: string
- in: formData
name: toAddr
description: 转入地址
required: true
type: string
- in: formData
name: amount
description: 转账额度
required: true
type: number
format: double
- in: formData
name: note
description: 转账备注
required: true
type: string
- in: formData
name: tokenSymbol
description: 代币符号
required: true
type: string
responses:
"200":
description: 执行成功,返回交易的hash
"403":
description: Forbidden禁止执行
/block/getBlockHashByHeight:
get:
tags:
- block
description: getBlockHashByHeight
operationId: BlockController.getBlockHashByHeight
parameters:
- in: query
name: height
description: 查询的区块高度
required: true
type: integer
format: int64
responses:
"200":
description: 执行成功返回blockhash
"400":
description: 传入参数有误
"403":
description: Forbidden禁止执行
/block/getBlockHeaders:
get:
tags:
- block
description: getblockHeaders
operationId: BlockController.getblockHeaders
parameters:
- in: query
name: startHeight
description: 查询的开始区块高度
required: true
type: integer
format: int64
- in: query
name: endHeight
description: 查询的结束区块高度
required: true
type: integer
format: int64
- in: query
name: detail
description: 是否查询详细信息
required: true
type: boolean
responses:
"200":
description: 执行成功,返回blockHeader
"400":
description: 传入参数有误
"403":
description: Forbidden禁止执行
/block/getBlockList:
get:
tags:
- block
description: getblockList
operationId: BlockController.getblockList
parameters:
- in: query
name: startHeight
description: 查询的开始区块高度
required: true
type: integer
format: int64
- in: query
name: endHeight
description: 查询的结束区块高度
required: true
type: integer
format: int64
- in: query
name: detail
description: 是否查询详细信息
required: true
type: boolean
responses:
"200":
description: 执行成功,返回blockList
"400":
description: 传入参数有误
"403":
description: Forbidden禁止执行
/block/getBlockViewByHash:
get:
tags:
- block
description: getblockViewByHash
operationId: BlockController.getblockViewByHash
parameters:
- in: query
name: blockHash
description: blockHash
required: true
type: string
responses:
"200":
description: 执行成功返回blockView
"400":
description: 传入参数有误
"403":
description: Forbidden禁止执行
/block/getLastHeader:
get:
tags:
- block
description: getLastHeader
operationId: BlockController.getLastHeader
responses:
"200":
description: 执行成功,返回block信息
"400":
description: 传入参数有误
"403":
description: Forbidden禁止执行
/contract/invoke:
get:
tags:
- contract
description: Invoke contract func.
operationId: ContractController.Invoke
responses:
"200":
description: 执行成功
"403":
description: Forbidden禁止执行
post:
tags:
- contract
description: Invoke contract func.
operationId: ContractController.Invoke
responses:
"200":
description: 执行成功
"403":
description: Forbidden禁止执行
/peer/getPeers:
get:
tags:
- peer
description: get Peers
operationId: PeerController.GetPeers
responses:
"200":
description: 执行成功,返回节点信息
"403":
description: Forbidden禁止执行
/server/clearChain:
post:
tags:
- server
description: ClearChain
operationId: ServerController.deployChain and start chain33
parameters:
- in: body
name: userName
description: 用户名
required: true
type: string
- in: body
name: passWord
description: 密码
required: true
type: string
- in: body
name: hostIp
description: ssh ip
required: true
type: string
- in: body
name: port
description: ssh port
required: true
type: integer
format: int64
- in: body
name: remoteDir
description: 部署路径
required: true
type: string
responses:
"201":
description: 执行成功
"400":
description: 传入参数有误
"403":
description: Forbidden禁止执行
/server/deployChain:
post:
tags:
- server
description: DeployChain
operationId: ServerController.deployChain and start chain33
parameters:
- in: body
name: userName
description: 用户名
required: true
type: string
- in: body
name: passWord
description: 密码
required: true
type: string
- in: body
name: hostIp
description: ssh ip
required: true
type: string
- in: body
name: port
description: ssh port
required: true
type: integer
format: int64
- in: body
name: remoteDir
description: 部署路径
required: true
type: string
- in: body
name: seedURL
description: seedURL
required: true
type: string
- in: body
name: peerURL
description: raft内部通信URL
required: true
type: string
responses:
"201":
description: 执行成功
"400":
description: 传入参数有误
"403":
description: Forbidden禁止执行
/server/stopChain:
post:
tags:
- server
description: DeployChain
operationId: ServerController.deployChain and start chain33
parameters:
- in: body
name: userName
description: 用户名
required: true
type: string
- in: body
name: passWord
description: 密码
required: true
type: string
- in: body
name: hostIp
description: ssh ip
required: true
type: string
- in: body
name: port
description: ssh port
required: true
type: integer
format: int64
- in: body
name: remoteDir
description: 部署路径
required: true
type: string
responses:
"201":
description: 执行成功
"400":
description: 传入参数有误
"403":
description: Forbidden禁止执行
/task/getTaskStatus:
get:
tags:
- task
description: get Task
operationId: TaskController.GetTask
parameters:
- in: query
name: taskId
description: taskId
required: true
type: string
responses:
"200":
description: 执行成功,返回任务状态
"403":
description: Forbidden禁止执行
/tx/queryTxByAddr:
get:
tags:
- tx
description: queryTxByAddr
operationId: TxController.queryTxByAddr
parameters:
- in: query
name: Addr
description: addr
required: true
type: string
- in: query
name: Flag
description: flag
required: true
type: integer
format: int64
- in: query
name: Count
description: count
required: true
type: integer
format: int64
- in: query
name: Direction
description: direction
required: true
type: integer
format: int64
- in: query
name: Height
description: height
required: true
type: integer
format: int64
- in: query
name: Index
description: index
required: true
type: integer
format: int64
responses:
"200":
description: 执行成功返回交易信息
"400":
description: 传入参数有误
"403":
description: Forbidden禁止执行
/tx/queryTxByHash:
get:
tags:
- tx
description: queryTxByHash
operationId: TxController.queryTxByHash
parameters:
- in: query
name: txHash
description: 单笔交易的hash
required: true
type: string
- in: query
name: isRawHex
description: isRawHex
required: true
type: boolean
responses:
"200":
description: 执行成功,返回交易信息
"400":
description: 传入参数有误
"403":
description: Forbidden禁止执行
/tx/sendTX:
post:
tags:
- tx
description: SendTX
operationId: TxController.SendTX
parameters:
- in: query
name: execerName
description: 执行器名称
required: true
type: string
- in: query
name: privateKey
description: 私钥
required: true
type: string
responses:
"200":
description: 执行成功返回交易信息
"400":
description: 传入参数有误
"403":
description: Forbidden禁止执行
/wallet/lock:
post:
tags:
- wallet
description: lock wallet
operationId: WalletController.Lock
responses:
"200":
description: 执行成功,返回是否执行成功
"403":
description: Forbidden禁止执行
/wallet/mergeBalance:
post:
tags:
- wallet
description: create Account
operationId: WalletController.MergeBalance
parameters:
- in: header
name: toAddr
description: 目的地址
required: true
type: string
responses:
"200":
description: 执行成功,返回txHash数组
"403":
description: Forbidden禁止执行
/wallet/modifyPwd:
put:
tags:
- wallet
description: modify account paasworld
operationId: WalletController.ModifyPwd
parameters:
- in: header
name: oldPwd
description: 旧密码
required: true
type: string
- in: header
name: newPwd
description: 新密码
required: true
type: string
responses:
"200":
description: 执行成功,返回是否修改成功
"403":
description: Forbidden禁止执行
/wallet/unLock:
post:
tags:
- wallet
description: UnLock wallet
operationId: WalletController.UnLock
parameters:
- in: header
name: pwd
description: 钱包密码
required: true
type: string
- in: header
name: timeOut
description: 设置锁定时间
required: true
type: integer
format: int64
- in: header
name: scope
description: 目前只支持wallet or ticket
required: true
type: string
responses:
"200":
description: 执行成功,返回是否执行成功
"403":
description: Forbidden禁止执行
/wallet/walletListTxs:
get:
tags:
- wallet
description: 根据TxHash 查看具体的交易信息
operationId: WalletController.WalletListTxs
parameters:
- in: query
name: txHash
description: 所有tx 交易的txHash
required: true
type: string
- in: query
name: count
description: 查询数量
required: true
type: integer
format: int32
- in: query
name: dir
description: 0或1表示向前,向后查询
required: true
type: integer
format: int32
responses:
"200":
description: 执行成功,返回详细的交易列表
"403":
description: Forbidden禁止执行
/wallet/walletStatus:
get:
tags:
- wallet
description: get wallet status
operationId: WalletController.WalletStatus
responses:
"200":
description: 执行成功,返回钱包状态
"403":
description: Forbidden禁止执行
tags:
- name: account
description: |
AccountController operations for account
- name: wallet
description: |
WalletController operations for Wallet
- name: peer
description: |
PeerController operations for Peer
- name: block
description: |
BlockController operations for Block
- name: tx
description: |
TxController operations for Tx
- name: server
description: |2
ServerController operations for Server
- name: task
description: |
TaskController operations for Peer
- name: contract
description: |
ContractController operations for Peer
# Treat all files in this repo as binary, with no git magic updating
# line endings. Windows users contributing to Go will need to use a
# modern version of git and editors capable of LF line endings.
#
# We'll prevent accidental CRLF line endings from entering the repo
# via the git-review gofmt checks.
#
# See golang.org/issue/9281
* -text
# Add no patterns to .hgignore except for files generated by the build.
last-change
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment