obscurogateway

package
v0.25.0 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2024 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GatewayUser

type GatewayUser struct {
	Wallets    []wallet.Wallet
	HTTPClient *ethclient.Client
	WSClient   *ethclient.Client
	// contains filtered or unexported fields
}

GatewayUser TODO (@ziga) refactor GatewayUser and integrate it with OGlib. GatewayUser is a struct that includes everything a gateway user has and uses (userID, wallets, http & ws addresses and client )

func NewGatewayUser added in v0.24.0

func NewGatewayUser(wallets []wallet.Wallet, serverAddressHTTP string, serverAddressWS string) (*GatewayUser, error)

func (GatewayUser) GetUserAccountsBalances added in v0.22.0

func (u GatewayUser) GetUserAccountsBalances() ([]*big.Int, error)

func (GatewayUser) RegisterAccounts

func (u GatewayUser) RegisterAccounts() error

func (GatewayUser) RegisterAccountsPersonalSign added in v0.24.0

func (u GatewayUser) RegisterAccountsPersonalSign() error

type JSONError added in v0.24.0

type JSONError struct {
	Code    int         `json:"code"`
	Message string      `json:"message"`
	Data    interface{} `json:"data,omitempty"`
}

type JSONRPCMessage added in v0.24.0

type JSONRPCMessage struct {
	Version string          `json:"jsonrpc,omitempty"`
	ID      json.RawMessage `json:"id,omitempty"`
	Method  string          `json:"method,omitempty"`
	Params  json.RawMessage `json:"params,omitempty"`
	Error   *JSONError      `json:"error,omitempty"`
	Result  json.RawMessage `json:"result,omitempty"`
}

JSONRPCMessage value of this type can a JSON-RPC request, notification, successful response or error response. Which one it is depends on the fields.

Jump to

Keyboard shortcuts

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