Documentation ¶
Index ¶
- Constants
- func ConnetPeerbyAddress(w http.ResponseWriter, r *http.Request)
- func DisConnectPeerbyAddress(w http.ResponseWriter, r *http.Request)
- func GetAccount(w http.ResponseWriter, r *http.Request)
- func GetAccountBrief(w http.ResponseWriter, r *http.Request)
- func GetBlock(w http.ResponseWriter, r *http.Request)
- func GetBlockHeader() (*api.GetInfoResponse_Result, error)
- func GetContract(contractName string) (*role.Contract, error)
- func GetContractAbi(w http.ResponseWriter, r *http.Request)
- func GetContractCode(w http.ResponseWriter, r *http.Request)
- func GetGenerateBlockTime(w http.ResponseWriter, r *http.Request)
- func GetInfo(w http.ResponseWriter, r *http.Request)
- func GetKeyValue(w http.ResponseWriter, r *http.Request)
- func GetPeerStatebyAddress(w http.ResponseWriter, r *http.Request)
- func GetTransaction(w http.ResponseWriter, r *http.Request)
- func GetTransactionStatus(w http.ResponseWriter, r *http.Request)
- func GetTransferCredit(w http.ResponseWriter, r *http.Request)
- func GetTrxHashForSign(sender, contract, method string, param []byte, h *api.GetInfoResponse) ([]byte, *types.Transaction, error)
- func JsonToBin(w http.ResponseWriter, r *http.Request)
- func NewRouter() *mux.Router
- func ParseTransactionParam(r role.RoleInterface, Param []byte, Contract string, Method string) (interface{}, error)
- func PushTrx(intTrx *types.Transaction) (comtool.ResponseStruct, error)
- func PushTrxReq(signature string, trx *types.BasicTransaction) (*message.PushTrxReq, error)
- func ReviewProposal(w http.ResponseWriter, r *http.Request)
- func SendTransaction(w http.ResponseWriter, r *http.Request)
- func SetChainActorPid(tpid *actor.PID)
- func SetRoleIntf(tpid role.RoleInterface, env *actionenv.ActorEnv)
- func SetTrxPreHandleActorPid(tpid *actor.PID)
- type ApiService
- type BlockTransaction
- type ListWalletResponse_Result
- type NewAccount
- type ResponseStruct
- type ResponseStructs
- type Route
- type Routes
- type Transaction
- type TransactionStatus
Constants ¶
View Source
const ( //block GET_BLK_INFO = "/v1/block/height" GET_BLK_DETAIL = "/v1/block/detail" // Transaction SEND_TRANSACTION = "/v1/transaction/send" GET_TRANSACTION = "/v1/transaction/get" GET_TRANSACTION_STATUS = "/v1/transaction/status" GET_HASH_FOR_SIGN = "/v1/transaction/getHashForSign" GET_HASH_FOR_SIGN2 = "/v1/transaction/getHashForSign2" //Account GET_ACCOUNT_BRIEF = "/v1/account/brief" GET_ACCOUNT = "/v1/account/info" GET_TRANSFER_CREDIT = "/v1/balance/GetTransferCredit" //Contract GET_CONTRACT_ABI = "/v1/contract/abi" GET_CONTRACT_CODE = "/v1/contract/code" // Common query QUERY_DB_VALUE = "/v1/common/queryDB" JSON_TO_BIN = "/v1/common/jsontobin" //node GET_GEN_BLK_TIME = "/v1/node/generateblocktime" GET_CONN_COUNT = "/v1/node/connectioncount" //delegate GET_ALL_DELEFATE = "/v1/delegate/getall" //global GET_GLOBAL_STAKED = "/v1/global/stakedbalance" GET_FORECAST_RESOURCE_BALANCE = "/v1/resource/forecastresource" //p2p GET_ALL_PEERINFO = "/v1/p2p/getpeers" CONNECT_PEER_BY_ADDRESS = "/v1/p2p/connectpeer" DISCONNECT_PEER_BY_ADDRESS = "/v1/p2p/disconnectpeer" GET_PEER_STATE_BY_ADDRESS = "/v1/p2p/getpeerstate" //MutlSign Proposal_Review = "/v1/proposal/review" )
Variables ¶
This section is empty.
Functions ¶
func ConnetPeerbyAddress ¶
func ConnetPeerbyAddress(w http.ResponseWriter, r *http.Request)
GetPeers get all peers
func DisConnectPeerbyAddress ¶
func DisConnectPeerbyAddress(w http.ResponseWriter, r *http.Request)
GetPeers get all peers
func GetAccount ¶
func GetAccount(w http.ResponseWriter, r *http.Request)
GetAccount query account info
func GetAccountBrief ¶
func GetAccountBrief(w http.ResponseWriter, r *http.Request)
GetAccountBrief query account public key
func GetBlockHeader ¶
func GetBlockHeader() (*api.GetInfoResponse_Result, error)
func GetContractAbi ¶
func GetContractAbi(w http.ResponseWriter, r *http.Request)
func GetContractCode ¶
func GetContractCode(w http.ResponseWriter, r *http.Request)
func GetKeyValue ¶
func GetKeyValue(w http.ResponseWriter, r *http.Request)
func GetPeerStatebyAddress ¶
func GetPeerStatebyAddress(w http.ResponseWriter, r *http.Request)
GetPeers get all peers
func GetTransaction ¶
func GetTransaction(w http.ResponseWriter, r *http.Request)
GetTransaction get transaction by Trx hash
func GetTransactionStatus ¶
func GetTransactionStatus(w http.ResponseWriter, r *http.Request)
func GetTransferCredit ¶
func GetTransferCredit(w http.ResponseWriter, r *http.Request)
func GetTrxHashForSign ¶
func GetTrxHashForSign(sender, contract, method string, param []byte, h *api.GetInfoResponse) ([]byte, *types.Transaction, error)
func ParseTransactionParam ¶
func PushTrx ¶
func PushTrx(intTrx *types.Transaction) (comtool.ResponseStruct, error)
func PushTrxReq ¶
func PushTrxReq(signature string, trx *types.BasicTransaction) (*message.PushTrxReq, error)
func ReviewProposal ¶
func ReviewProposal(w http.ResponseWriter, r *http.Request)
func SendTransaction ¶
func SendTransaction(w http.ResponseWriter, r *http.Request)
SendTransaction send transaction
func SetRoleIntf ¶
func SetRoleIntf(tpid role.RoleInterface, env *actionenv.ActorEnv)
SetChainActorPid set chain actor pid
func SetTrxPreHandleActorPid ¶
SetTrxActorPid set trx actor pid
Types ¶
type ApiService ¶
type ApiService struct {
// contains filtered or unexported fields
}
ApiService is actor service
type BlockTransaction ¶
type BlockTransaction struct { Transaction *Transaction ResourceReceipt *types.ResourceReceipt TrxHash string }
type NewAccount ¶
type ResponseStruct ¶
type ResponseStructs ¶
type ResponseStructs []ResponseStruct
type Route ¶
type Route struct { Name string Method string Pattern string HandlerFunc http.HandlerFunc }
type Transaction ¶
type Transaction struct { Version uint32 `json:"version"` CursorNum uint64 `json:"cursor_num"` CursorLabel uint32 `json:"cursor_label"` Lifetime uint64 `json:"lifetime"` Sender string `json:"sender"` Contract string `json:"contract"` Method string `json:"method"` Param interface{} `json:"param"` SigAlg uint32 `json:"sig_alg"` Signature string `json:"signature"` }
type TransactionStatus ¶
type TransactionStatus struct {
Status string `json:"status"`
}
Click to show internal directories.
Click to hide internal directories.