Documentation
¶
Overview ¶
Package api provides the RPC API for the DEX VM proxy. The proxy holds NO canonical DEX state, so this service is a THIN PASS-THROUGH: order reads and writes are forwarded to the d-chain over ZAP via the relay client. There are NO local orderbook / pool / position / perpetuals / MEV / ADL endpoints — those concerns live ONLY on the d-chain.
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type PingReply ¶
type PingReply struct {
Success bool `json:"success"`
}
PingReply is the reply for the Ping API.
type RelayArgs ¶ added in v1.3.8
type RelayArgs struct {
Method string `json:"method"`
Payload string `json:"payload"` // hex-encoded ZAP frame
}
RelayArgs forwards an opaque, hex-encoded clob_* frame to the d-chain. The proxy does not interpret the payload — the d-chain matcher is the single source of truth. Method MUST be one of the frozen clob_* names.
type RelayReply ¶ added in v1.3.8
type RelayReply struct {
Response string `json:"response"`
}
RelayReply returns the d-chain's raw response (hex-encoded).
type Relayer ¶ added in v1.3.8
type Relayer interface {
Configured() bool
Relay(ctx context.Context, method string, payload []byte) ([]byte, error)
}
Relayer is the relay surface the proxy VM exposes to the API: forward an opaque clob_* frame to the d-chain and return the raw response. It is the ONLY DEX capability the proxy has — pure transport to the matcher.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service provides the RPC API for the DEX VM proxy.
func (*Service) Relay ¶ added in v1.3.8
Relay forwards a clob_* frame to the d-chain and returns its response. This is the proxy's entire DEX API: it neither matches nor reads a local book.
func (*Service) Status ¶
func (s *Service) Status(_ *http.Request, _ *StatusArgs, reply *StatusReply) error
Status returns the proxy status.
type StatusReply ¶
type StatusReply struct {
Bootstrapped bool `json:"bootstrapped"`
RelayConfigured bool `json:"relayConfigured"`
Version string `json:"version"`
}
StatusReply is the reply for the Status API.