elastosadenine

package
v2.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 12, 2020 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Common

type Common struct {
	Connection *grpc.ClientConn
}

func NewCommon

func NewCommon(host string, port int, production bool) *Common

func (*Common) Close

func (c *Common) Close()

func (*Common) GenerateAPIRequest

func (c *Common) GenerateAPIRequest(secretKey, did string) Response

func (*Common) GetAPIKey

func (c *Common) GetAPIKey(secretKey, did string) Response

type HealthCheck

type HealthCheck struct {
	Connection *grpc.ClientConn
}

func NewHealthCheck

func NewHealthCheck(host string, port int, production bool) *HealthCheck

func (*HealthCheck) Check

func (*HealthCheck) Close

func (hc *HealthCheck) Close()

type Hive

type Hive struct {
	Connection *grpc.ClientConn
}

func NewHive

func NewHive(host string, port int, production bool) *Hive

func (*Hive) Close

func (h *Hive) Close()

func (*Hive) UploadAndSign

func (h *Hive) UploadAndSign(apiKey, did, network, privateKey, filename string) Response

func (*Hive) VerifyAndShow

func (h *Hive) VerifyAndShow(apiKey, did, network, privateKey, msg, pub, sig, hash string) ResponseData

type JWTClaim

type JWTClaim struct {
	JwtInfo string `json:"jwt_info"`
	jwt.StandardClaims
}

type JWTInfoCommon

type JWTInfoCommon struct {
	jwt.StandardClaims
}

type JWTInfoCreateWallet

type JWTInfoCreateWallet struct {
	Network string `json:"network"`
}

type JWTInfoHiveUploadAndSign

type JWTInfoHiveUploadAndSign struct {
	Network     string `json:"network"`
	PrivateKey  string `json:"privateKey"`
	FileContent string `json:"file_content"`
}

type JWTInfoNodeRpc

type JWTInfoNodeRpc struct {
	Network string      `json:"network"`
	Chain   string      `json:"chain"`
	Method  string      `json:"method"`
	Params  interface{} `json:"params"`
}

type JWTInfoRequestELA

type JWTInfoRequestELA struct {
	Address string `json:"address"`
	Chain   string `json:"chain"`
}

type JWTInfoSidechainEthDeploy

type JWTInfoSidechainEthDeploy struct {
	Network        string `json:"network"`
	Address        string `json:"eth_account_address"`
	PrivateKey     string `json:"eth_private_key"`
	Gas            int    `json:"eth_gas"`
	ContractSource string `json:"contract_source"`
	ContractName   string `json:"contract_name"`
}

type JWTInfoSidechainEthWatch

type JWTInfoSidechainEthWatch struct {
	Network          string `json:"network"`
	ContractAddress  string `json:"contract_address"`
	ContractName     string `json:"contract_name"`
	ContractCodeHash string `json:"contract_code_hash"`
}

type JWTInfoVerifyAndShow

type JWTInfoVerifyAndShow struct {
	Network    string `json:"network"`
	Msg        string `json:"msg"`
	Pub        string `json:"pub"`
	Sig        string `json:"sig"`
	Hash       string `json:"hash"`
	PrivateKey string `json:"privateKey"`
}

type JWTInfoViewWallet

type JWTInfoViewWallet struct {
	Network string `json:"network"`
	Address string `json:"address"`
	Chain   string `json:"chain"`
}

type NodeRpc

type NodeRpc struct {
	Connection *grpc.ClientConn
}

func NewNodeRpc

func NewNodeRpc(host string, port int, production bool) *NodeRpc

func (*NodeRpc) Close

func (n *NodeRpc) Close()

func (*NodeRpc) GetArbitratorGroup

func (n *NodeRpc) GetArbitratorGroup(apiKey, did, network, height string) map[string]interface{}

Common method for mainchain only

func (*NodeRpc) GetBlockConfirm

func (n *NodeRpc) GetBlockConfirm(apiKey, did, network, height string) map[string]interface{}

Common method for mainchain only

func (*NodeRpc) GetBlockInfo

func (n *NodeRpc) GetBlockInfo(apiKey, did, network, chain, height string) map[string]interface{}

Common method for mainchain, did sidechain, token and eth sidechain

func (*NodeRpc) GetCurrentArbitratorGroup

func (n *NodeRpc) GetCurrentArbitratorGroup(apiKey, did, network string) map[string]interface{}

Common method for mainchain only

func (*NodeRpc) GetCurrentArbitratorsInfo

func (n *NodeRpc) GetCurrentArbitratorsInfo(apiKey, did, network string) map[string]interface{}

Common method for mainchain only

func (*NodeRpc) GetCurrentBalance

func (n *NodeRpc) GetCurrentBalance(apiKey, did, network, chain, address string) interface{}

Common method for mainchain, did sidechain, token and eth sidechain

func (*NodeRpc) GetCurrentBlockConfirm

func (n *NodeRpc) GetCurrentBlockConfirm(apiKey, did, network string) map[string]interface{}

Common method for mainchain only

func (*NodeRpc) GetCurrentBlockInfo

func (n *NodeRpc) GetCurrentBlockInfo(apiKey, did, network, chain string) map[string]interface{}

Common method for mainchain, did sidechain, token and eth sidechain

func (*NodeRpc) GetCurrentCrcCandidates

func (n *NodeRpc) GetCurrentCrcCandidates(apiKey, did, network string) map[string]interface{}

Common method for mainchain only

func (*NodeRpc) GetCurrentCrcCouncil

func (n *NodeRpc) GetCurrentCrcCouncil(apiKey, did, network string) map[string]interface{}

Common method for mainchain only

func (*NodeRpc) GetCurrentDposSupernodes

func (n *NodeRpc) GetCurrentDposSupernodes(apiKey, did, network string) map[string]interface{}

Common method for mainchain only

func (*NodeRpc) GetCurrentHeight

func (n *NodeRpc) GetCurrentHeight(apiKey, did, network, chain string) string

Common method for mainchain, did sidechain, token and eth sidechain

func (*NodeRpc) GetCurrentMiningInfo

func (n *NodeRpc) GetCurrentMiningInfo(apiKey, did, network string) map[string]interface{}

Common method for mainchain only

func (*NodeRpc) GetCurrentNodeState

func (n *NodeRpc) GetCurrentNodeState(apiKey, did, network, chain string) map[string]interface{}

Common method for mainchain, did sidechain and token sidechain

func (*NodeRpc) RpcMethod

func (n *NodeRpc) RpcMethod(apiKey, did, network, chain, method string, params interface{}) interface{}

type Response

type Response struct {
	Output        string
	Status        bool
	StatusMessage string
}

type ResponseData

type ResponseData struct {
	Output        []byte
	Status        bool
	StatusMessage string
}

type SidechainEth

type SidechainEth struct {
	Connection *grpc.ClientConn
}

func NewSidechainEth

func NewSidechainEth(host string, port int, production bool) *SidechainEth

func (*SidechainEth) Close

func (e *SidechainEth) Close()

func (*SidechainEth) DeployEthContract

func (e *SidechainEth) DeployEthContract(apiKey, did, network, address, privateKey string, gas int, fileName string) Response

func (*SidechainEth) WatchEthContract

func (e *SidechainEth) WatchEthContract(apiKey, did, network, contractAddress, contractName, contractCodeHash string) Response

type SolidityListener

type SolidityListener struct {
	*parser.BaseSolidityListener
	ContractName string
}

func (*SolidityListener) EnterContractDefinition

func (s *SolidityListener) EnterContractDefinition(ctx *parser.ContractDefinitionContext)

type Wallet

type Wallet struct {
	Connection *grpc.ClientConn
}

func NewWallet

func NewWallet(host string, port int, production bool) *Wallet

func (*Wallet) Close

func (w *Wallet) Close()

func (*Wallet) CreateWallet

func (w *Wallet) CreateWallet(apiKey, did, network string) Response

func (*Wallet) RequestELA

func (w *Wallet) RequestELA(apiKey, did, chain, address string) Response

Directories

Path Synopsis
stubs

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL