Documentation ¶
Index ¶
- Constants
- Variables
- type API
- func (api *API) EcRecover(data hexutil.Bytes, sig hexutil.Bytes) (types.Address, error)
- func (api *API) ProcessAPIRequest(request APIRequest) (*APIResponse, error)
- func (api *API) ProcessRequest(requestType string, payload json.RawMessage) (interface{}, error)
- func (api *API) ProcessWeb3ReadOnlyRequest(request Web3SendAsyncReadOnlyRequest) (*Web3SendAsyncReadOnlyResponse, error)
- type APIRequest
- type APIResponse
- type ETHPayload
- type JSONRPCResponse
- type ProviderResponse
- type Service
- type Web3SendAsyncReadOnlyError
- type Web3SendAsyncReadOnlyRequest
- type Web3SendAsyncReadOnlyResponse
Constants ¶
View Source
const PermissionContactCode = "contact-code"
View Source
const PermissionUnknown = "unknown"
View Source
const PermissionWeb3 = "web3"
View Source
const RequestAPI = "api-request"
View Source
const ResponseAPI = "api-response"
View Source
const Web3ResponseError = "web3-response-error"
View Source
const Web3SendAsyncCallback = "web3-send-async-callback"
View Source
const Web3SendAsyncReadOnly = "web3-send-async-read-only"
Variables ¶
View Source
var ErrorInvalidAPIRequest = errors.New("invalid API request")
View Source
var ErrorUnknownPermission = errors.New("unknown permission")
Functions ¶
This section is empty.
Types ¶
type API ¶
type API struct {
// contains filtered or unexported fields
}
API is class with methods available over RPC.
func (*API) ProcessAPIRequest ¶
func (api *API) ProcessAPIRequest(request APIRequest) (*APIResponse, error)
func (*API) ProcessRequest ¶
func (api *API) ProcessRequest(requestType string, payload json.RawMessage) (interface{}, error)
func (*API) ProcessWeb3ReadOnlyRequest ¶
func (api *API) ProcessWeb3ReadOnlyRequest(request Web3SendAsyncReadOnlyRequest) (*Web3SendAsyncReadOnlyResponse, error)
type APIRequest ¶
type APIResponse ¶
type APIResponse struct { ProviderResponse MessageID interface{} `json:"messageId,omitempty"` Permission string `json:"permission"` Data interface{} `json:"data,omitempty"` IsAllowed bool `json:"isAllowed"` }
type ETHPayload ¶
type JSONRPCResponse ¶
type JSONRPCResponse struct { ID interface{} `json:"id,omitempty"` JSONRPC string `json:"jsonrpc"` Result interface{} `json:"result"` }
type ProviderResponse ¶
type ProviderResponse struct {
ResponseType string `json:"type"`
}
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func NewService(appDB *sql.DB, accountsDB *accounts.Database, rpcClient *rpc.Client, config *params.NodeConfig, accountsManager *account.GethManager, rpcFiltersSrvc *rpcfilters.Service, transactor *transactions.Transactor) *Service
type Web3SendAsyncReadOnlyRequest ¶
type Web3SendAsyncReadOnlyRequest struct { Title string `json:"title,omitempty"` MessageID interface{} `json:"messageId"` Payload ETHPayload `json:"payload"` Hostname string `json:"hostname"` Address string `json:"address,omitempty"` }
type Web3SendAsyncReadOnlyResponse ¶
type Web3SendAsyncReadOnlyResponse struct { ProviderResponse MessageID interface{} `json:"messageId"` Error interface{} `json:"error,omitempty"` Result interface{} `json:"result,omitempty"` }
Click to show internal directories.
Click to hide internal directories.