rpc

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2024 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewServer

func NewServer(engine machine.Engine, store *store.BadgerStore, conf *config.Configuration, port int) *http.Server

Types

type Call

type Call struct {
	Id     string `json:"id"`
	Method string `json:"method"`
	Params []any  `json:"params"`
}

type Input added in v0.4.3

type Input struct {
	Hash    string              `json:"hash"`
	Index   int                 `json:"index"`
	Genesis string              `json:"genesis"`
	Deposit *common.DepositData `json:"deposit"`
	Mint    *common.MintData    `json:"mint"`
}

type MixinNetwork added in v0.4.3

type MixinNetwork struct {
	// contains filtered or unexported fields
}

func NewMixinNetwork added in v0.4.3

func NewMixinNetwork(node string) *MixinNetwork

func (*MixinNetwork) GetSnapshot added in v0.4.3

func (m *MixinNetwork) GetSnapshot(hash string) (*SnapshotWithTransaction, error)

type Output added in v0.4.3

type Output struct {
	Type   uint8          `json:"type"`
	Amount number.Decimal `json:"amount"`
	Keys   []*crypto.Key  `json:"keys"`
	Script common.Script  `json:"script"`
	Mask   crypto.Key     `json:"mask"`
}

type RPC

type RPC struct {
	// contains filtered or unexported fields
}

func (*RPC) ServeHTTP

func (impl *RPC) ServeHTTP(w http.ResponseWriter, r *http.Request)

type Render

type Render struct {
	// contains filtered or unexported fields
}

func (*Render) RenderData

func (r *Render) RenderData(data any)

func (*Render) RenderError

func (r *Render) RenderError(err error)

type SnapshotWithTransaction added in v0.4.3

type SnapshotWithTransaction struct {
	Hash        string      `json:"hash"`
	Timestamp   uint64      `json:"timestamp"`
	Topology    uint64      `json:"topology"`
	Transaction Transaction `json:"transaction"`
}

type Transaction added in v0.4.3

type Transaction struct {
	Version  uint8     `json:"version"`
	Asset    string    `json:"asset"`
	Inputs   []*Input  `json:"inputs"`
	Outputs  []*Output `json:"outputs"`
	Extra    string    `json:"extra"`
	Hash     string    `json:"hash"`
	Raw      string    `json:"hex"`
	Snapshot string    `json:"snapshot"`
}

Jump to

Keyboard shortcuts

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