types

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package types provides shared request/response types for the TxProxy service.

It exists so other services can depend on TxProxy without importing the service implementation package (avoids layering and import-cycle issues).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InvokeRequest

type InvokeRequest struct {
	RequestID string `json:"request_id"`
	// Intent optionally enables additional policy gates.
	//
	// Supported values:
	// - "payments": enforce GAS transfer to PaymentHub (GAS settlement)
	// - "governance": enforce Governance-only methods (bNEO governance)
	Intent          string                `json:"intent,omitempty"`
	ContractAddress string                `json:"contract_address"`
	Method          string                `json:"method"`
	Params          []chain.ContractParam `json:"params,omitempty"`
	Wait            bool                  `json:"wait,omitempty"`
}

InvokeRequest requests an allowlisted on-chain contract invocation.

type InvokeResponse

type InvokeResponse struct {
	RequestID string `json:"request_id"`
	TxHash    string `json:"tx_hash,omitempty"`
	VMState   string `json:"vm_state,omitempty"`
	Exception string `json:"exception,omitempty"`
}

InvokeResponse is returned by the TxProxy service when an invocation was accepted.

type Invoker

type Invoker interface {
	Invoke(context.Context, *InvokeRequest) (*InvokeResponse, error)
}

Invoker is the minimal client interface required by services that delegate chain writes to TxProxy.

Jump to

Keyboard shortcuts

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