poi

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2023 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	APIRoute = "/api/poi/v1"

	// ParameterBlockID is used to identify a block by its ID.
	ParameterBlockID = "blockID"

	RouteCreateProof   = "/create/:" + ParameterBlockID
	RouteValidateProof = "/validate"
)

Variables

View Source
var (
	Component *app.Component
)
View Source
var ParamsRestAPI = &ParametersRestAPI{}

Functions

func FetchMilestoneCone

func FetchMilestoneCone(ctx context.Context, index uint32) (iotago.BlockIDs, error)

Types

type ParametersRestAPI

type ParametersRestAPI struct {
	// BindAddress defines the bind address on which the POI HTTP server listens.
	BindAddress string `default:"localhost:9687" usage:"the bind address on which the POI HTTP server listens"`

	// AdvertiseAddress defines the address of the POI HTTP server which is advertised to the INX Server (optional).
	AdvertiseAddress string `default:"" usage:"the address of the POI HTTP server which is advertised to the INX Server (optional)"`

	// DebugRequestLoggerEnabled defines whether the debug logging for requests should be enabled
	DebugRequestLoggerEnabled bool `default:"false" usage:"whether the debug logging for requests should be enabled"`
}

ParametersRestAPI contains the definition of the parameters used by the POI HTTP server.

type ProofRequestAndResponse

type ProofRequestAndResponse struct {
	Milestone *iotago.Milestone   `json:"milestone"`
	Block     *iotago.Block       `json:"block"`
	Proof     *merklehasher.Proof `json:"proof"`
}

type ValidateProofResponse

type ValidateProofResponse struct {
	Valid bool `json:"valid"`
}

Jump to

Keyboard shortcuts

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