Documentation
¶
Index ¶
- Constants
- func CreateHeadersMiddleware(headers map[string]string) func(next http.Handler) http.Handler
- func JsonContentTypeMiddleware(next http.Handler) http.Handler
- func Run(ctx context.Context, address string, n *NodeApi, opts *RunOptions) error
- type App
- func (a *App) Accounts() ([]account, error)
- func (a *App) AddrByAlias(alias proto.Alias) (proto.Address, error)
- func (a *App) Addresses() ([]string, error)
- func (a *App) AliasesByAddr(addr proto.WavesAddress) ([]proto.Alias, error)
- func (a *App) AssetsDetails(fullAssetsIDs []crypto.Digest, full bool) ([]AssetDetails, error)
- func (a *App) AssetsDetailsByID(fullAssetID crypto.Digest, full bool) (*AssetDetails, error)
- func (a *App) Block(id proto.BlockID) (*proto.Block, error)
- func (a *App) BlockByHeight(height proto.Height) (*proto.Block, error)
- func (a *App) BlockIDToHeight(id proto.BlockID) (proto.Height, error)
- func (a *App) BlocksFirst() (*Block, error)
- func (a *App) BlocksGenerators() (Generators, error)
- func (a *App) BlocksHeadersAt(h proto.Height) (*Block, error)
- func (a *App) BlocksHeadersByID(id proto.BlockID) (*Block, error)
- func (a *App) BlocksHeadersFromTo(from, to proto.Height) ([]*Block, error)
- func (a *App) BlocksHeadersLast() (*Block, error)
- func (a *App) BlocksLast() (*Block, error)
- func (a *App) BlocksScoreAt(at proto.Height) (Score, error)
- func (a *App) DebugSyncEnabled(enabled bool)
- func (a *App) EthereumDAppMethods(addr proto.WavesAddress) (ethabi.MethodsMap, error)
- func (a *App) LoadKeys(apiKey string, password []byte) error
- func (a *App) Miner() MinerInfo
- func (a *App) NodeProcesses() map[string]int
- func (a *App) PeersAll() (PeersKnown, error)
- func (a *App) PeersBlackListed() []RestrictedPeerInfo
- func (a *App) PeersClearBlackList() PeersClearBlackListResponse
- func (a *App) PeersConnect(ctx context.Context, apiKey string, addr string) (*PeersConnectResponse, error)
- func (a *App) PeersConnected() PeersConnectedResponse
- func (a *App) PeersKnown() (PeersKnown, error)
- func (a *App) PeersSpawned() PeersSpawnedResponse
- func (a *App) PeersSuspended() []RestrictedPeerInfo
- func (a *App) PoolTransactions() int
- func (a *App) RollbackToHeight(apiKey string, height proto.Height) error
- func (a *App) TransactionsBroadcast(ctx context.Context, b []byte) (proto.Transaction, error)
- func (a *App) WalletSeeds() []string
- type AssetDetails
- type AuthError
- type BadRequestError
- type Block
- type ErrorHandler
- type Generator
- type Generators
- type HandleErrorFunc
- type HandlerFunc
- type MinerInfo
- type Next
- type NodeApi
- func (a *NodeApi) AddrByAlias(w http.ResponseWriter, r *http.Request) error
- func (a *NodeApi) Addresses(w http.ResponseWriter, _ *http.Request) error
- func (a *NodeApi) AliasesByAddr(w http.ResponseWriter, r *http.Request) error
- func (a *NodeApi) AssetsDetailsByID(w http.ResponseWriter, r *http.Request) error
- func (a *NodeApi) AssetsDetailsByIDsGet(w http.ResponseWriter, r *http.Request) error
- func (a *NodeApi) AssetsDetailsByIDsPost(w http.ResponseWriter, r *http.Request) error
- func (a *NodeApi) BlockAt(w http.ResponseWriter, r *http.Request) error
- func (a *NodeApi) BlockHeadersID(w http.ResponseWriter, r *http.Request) error
- func (a *NodeApi) BlockHeight(w http.ResponseWriter, _ *http.Request) error
- func (a *NodeApi) BlockHeightByID(w http.ResponseWriter, r *http.Request) error
- func (a *NodeApi) BlockIDAt(w http.ResponseWriter, r *http.Request) error
- func (a *NodeApi) BlockScoreAt(w http.ResponseWriter, r *http.Request) error
- func (a *NodeApi) BlocksFirst(w http.ResponseWriter, _ *http.Request) error
- func (a *NodeApi) BlocksGenerators(w http.ResponseWriter, _ *http.Request) error
- func (a *NodeApi) BlocksHeadersAt(w http.ResponseWriter, r *http.Request) error
- func (a *NodeApi) BlocksHeadersLast(w http.ResponseWriter, _ *http.Request) error
- func (a *NodeApi) BlocksHeadersSeqFromTo(w http.ResponseWriter, r *http.Request) error
- func (a *NodeApi) BlocksLast(w http.ResponseWriter, _ *http.Request) error
- func (a *NodeApi) EthereumDAppABI(w http.ResponseWriter, r *http.Request) error
- func (a *NodeApi) GoMinerInfo(w http.ResponseWriter, _ *http.Request) error
- func (a *NodeApi) NodeStatus(w http.ResponseWriter, r *http.Request) error
- func (a *NodeApi) PeersAll(w http.ResponseWriter, _ *http.Request) error
- func (a *NodeApi) PeersBlackListed(w http.ResponseWriter, _ *http.Request) error
- func (a *NodeApi) PeersClearBlackList(w http.ResponseWriter, _ *http.Request) error
- func (a *NodeApi) PeersConnect(w http.ResponseWriter, r *http.Request) error
- func (a *NodeApi) PeersConnected(w http.ResponseWriter, _ *http.Request) error
- func (a *NodeApi) PeersKnown(w http.ResponseWriter, _ *http.Request) error
- func (a *NodeApi) PeersSpawned(w http.ResponseWriter, _ *http.Request) error
- func (a *NodeApi) PeersSuspended(w http.ResponseWriter, _ *http.Request) error
- func (a *NodeApi) TransactionInfo(w http.ResponseWriter, r *http.Request) error
- func (a *NodeApi) TransactionsBroadcast(w http.ResponseWriter, r *http.Request) error
- func (a *NodeApi) WalletAccounts(w http.ResponseWriter, _ *http.Request) error
- type Peer
- type PeerInfo
- type PeersClearBlackListResponse
- type PeersConnectRequest
- type PeersConnectResponse
- type PeersConnectedResponse
- type PeersKnown
- type PeersSpawnedResponse
- type RateLimiterOptions
- type RestrictedPeerInfo
- type RunOptions
- type Scheduler
- type SchedulerEmits
- type Score
- type ScriptDetails
Constants ¶
View Source
const ( DefaultMaxConnections = 128 DefaultRateLimiterCacheSize = 64 * 1024 // 64 KB DefaultRateLimiterRPS = 1 DefaultRateLimiterBurst = 1 )
Variables ¶
This section is empty.
Functions ¶
func CreateHeadersMiddleware ¶ added in v0.9.0
func JsonContentTypeMiddleware ¶ added in v0.9.0
Types ¶
type App ¶
type App struct {
// contains filtered or unexported fields
}
func (*App) AddrByAlias ¶ added in v0.10.5
func (*App) AliasesByAddr ¶ added in v0.10.5
func (*App) AssetsDetails ¶ added in v0.10.5
func (*App) AssetsDetailsByID ¶ added in v0.10.5
func (*App) BlockByHeight ¶ added in v0.10.4
func (*App) BlockIDToHeight ¶ added in v0.10.4
func (*App) BlocksFirst ¶
func (*App) BlocksGenerators ¶
func (a *App) BlocksGenerators() (Generators, error)
func (*App) BlocksHeadersAt ¶ added in v0.10.2
func (*App) BlocksHeadersByID ¶ added in v0.10.2
func (*App) BlocksHeadersFromTo ¶ added in v0.10.2
func (*App) BlocksHeadersLast ¶ added in v0.10.2
func (*App) BlocksLast ¶
func (*App) DebugSyncEnabled ¶ added in v0.5.0
func (*App) EthereumDAppMethods ¶ added in v0.10.0
func (a *App) EthereumDAppMethods(addr proto.WavesAddress) (ethabi.MethodsMap, error)
func (*App) NodeProcesses ¶ added in v0.5.0
func (*App) PeersAll ¶
func (a *App) PeersAll() (PeersKnown, error)
PeersAll is a list of all known not banned, not suspended and not black listed peers with a publicly available declared address
func (*App) PeersBlackListed ¶ added in v0.10.2
func (a *App) PeersBlackListed() []RestrictedPeerInfo
func (*App) PeersClearBlackList ¶ added in v0.10.2
func (a *App) PeersClearBlackList() PeersClearBlackListResponse
func (*App) PeersConnect ¶
func (*App) PeersConnected ¶
func (a *App) PeersConnected() PeersConnectedResponse
func (*App) PeersKnown ¶ added in v0.9.0
func (a *App) PeersKnown() (PeersKnown, error)
func (*App) PeersSpawned ¶
func (a *App) PeersSpawned() PeersSpawnedResponse
func (*App) PeersSuspended ¶
func (a *App) PeersSuspended() []RestrictedPeerInfo
func (*App) PoolTransactions ¶ added in v0.5.0
func (*App) RollbackToHeight ¶ added in v0.5.0
TODO Here should be internal message with rollback action
func (*App) TransactionsBroadcast ¶
func (*App) WalletSeeds ¶ added in v0.10.5
WalletSeeds returns wallet seeds in base58 encoding.
type AssetDetails ¶ added in v0.10.5
type AssetDetails struct { AssetId crypto.Digest `json:"assetId"` IssueHeight proto.Height `json:"issueHeight"` IssueTimestamp proto.Timestamp `json:"issueTimestamp,omitempty"` Issuer proto.WavesAddress `json:"issuer"` IssuerPublicKey crypto.PublicKey `json:"issuerPublicKey"` Name string `json:"name"` Description string `json:"description"` Decimals byte `json:"decimals"` Reissuable bool `json:"reissuable"` Quantity uint64 `json:"quantity"` Scripted bool `json:"scripted"` MinSponsoredAssetFee *uint64 `json:"minSponsoredAssetFee"` OriginTransactionId proto.B58Bytes `json:"originTransactionId,omitempty"` SequenceInBlock uint32 `json:"sequenceInBlock"` ScriptDetails *ScriptDetails `json:"scriptDetails,omitempty"` }
type BadRequestError ¶
type BadRequestError struct {
// contains filtered or unexported fields
}
func (*BadRequestError) Error ¶ added in v0.10.5
func (e *BadRequestError) Error() string
type ErrorHandler ¶ added in v0.9.0
type ErrorHandler struct {
// contains filtered or unexported fields
}
func NewErrorHandler ¶ added in v0.9.0
func NewErrorHandler(logger *zap.Logger) ErrorHandler
func (*ErrorHandler) Handle ¶ added in v0.9.0
func (eh *ErrorHandler) Handle(w http.ResponseWriter, r *http.Request, err error)
type Generators ¶
type Generators []Generator
type HandleErrorFunc ¶ added in v0.9.0
type HandleErrorFunc func(w http.ResponseWriter, r *http.Request, err error)
type HandlerFunc ¶ added in v0.9.0
type HandlerFunc func(w http.ResponseWriter, r *http.Request) error
func RollbackToHeight ¶ added in v0.5.0
func RollbackToHeight(app rollbackToHeight) HandlerFunc
func WalletLoadKeys ¶ added in v0.5.0
func WalletLoadKeys(app walletLoadKeys) HandlerFunc
type NodeApi ¶
type NodeApi struct {
// contains filtered or unexported fields
}
func (*NodeApi) AddrByAlias ¶ added in v0.10.5
func (*NodeApi) AliasesByAddr ¶ added in v0.10.5
func (*NodeApi) AssetsDetailsByID ¶ added in v0.10.5
func (*NodeApi) AssetsDetailsByIDsGet ¶ added in v0.10.5
func (*NodeApi) AssetsDetailsByIDsPost ¶ added in v0.10.5
func (*NodeApi) BlockHeadersID ¶ added in v0.10.2
func (*NodeApi) BlockHeight ¶
func (*NodeApi) BlockHeightByID ¶ added in v0.10.4
func (*NodeApi) BlockScoreAt ¶
func (*NodeApi) BlocksFirst ¶
func (*NodeApi) BlocksGenerators ¶
func (*NodeApi) BlocksHeadersAt ¶ added in v0.10.2
func (*NodeApi) BlocksHeadersLast ¶ added in v0.10.2
func (*NodeApi) BlocksHeadersSeqFromTo ¶ added in v0.10.2
func (*NodeApi) BlocksLast ¶
func (*NodeApi) EthereumDAppABI ¶ added in v0.10.0
func (*NodeApi) GoMinerInfo ¶ added in v0.9.0
func (*NodeApi) NodeStatus ¶ added in v0.10.5
func (*NodeApi) PeersBlackListed ¶ added in v0.10.2
func (*NodeApi) PeersClearBlackList ¶ added in v0.10.2
func (*NodeApi) PeersConnect ¶
func (*NodeApi) PeersConnected ¶
func (*NodeApi) PeersKnown ¶ added in v0.9.0
func (*NodeApi) PeersSpawned ¶
func (*NodeApi) PeersSuspended ¶
func (*NodeApi) TransactionInfo ¶ added in v0.10.1
func (*NodeApi) TransactionsBroadcast ¶
func (*NodeApi) WalletAccounts ¶ added in v0.7.0
type PeersClearBlackListResponse ¶ added in v0.10.2
type PeersClearBlackListResponse struct {
Result string `json:"result"`
}
type PeersConnectRequest ¶
type PeersConnectResponse ¶
type PeersConnectedResponse ¶
type PeersConnectedResponse struct {
Peers []PeerInfo `json:"peers"`
}
type PeersKnown ¶ added in v0.9.0
type PeersKnown struct {
Peers []Peer `json:"peers"`
}
type PeersSpawnedResponse ¶
type RateLimiterOptions ¶ added in v0.9.0
func DefaultRateLimiterOptions ¶ added in v0.10.6
func DefaultRateLimiterOptions() *RateLimiterOptions
func NewRateLimiterOptionsFromString ¶ added in v0.10.6
func NewRateLimiterOptionsFromString(s string) (*RateLimiterOptions, error)
type RestrictedPeerInfo ¶ added in v0.10.2
type RunOptions ¶ added in v0.9.0
type RunOptions struct { RateLimiterOpts *RateLimiterOptions LogHttpRequestOpts bool CollectMetrics bool UseRealIPMiddleware bool RequestIDMiddleware bool EnableHeartbeatRoute bool RouteNotFoundHandler func(w http.ResponseWriter, r *http.Request) MaxConnections int EnableMetaMaskAPI bool EnableMetaMaskAPILog bool }
func DefaultRunOptions ¶ added in v0.9.0
func DefaultRunOptions() *RunOptions
type SchedulerEmits ¶
type ScriptDetails ¶ added in v0.10.5
Source Files
¶
Click to show internal directories.
Click to hide internal directories.