request

package
v0.37.20-verify-evm-of... Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2024 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const EmptyHeight uint64 = math.MaxUint64 - 3
View Source
const ExpandsTransactions = "transactions"
View Source
const FinalHeight uint64 = math.MaxUint64 - 2
View Source
const MaxBlockRequestHeightRange = 50
View Source
const MaxEventRequestHeightRange = 250
View Source
const MaxIDsLength = 50
View Source
const SealedHeight uint64 = math.MaxUint64 - 1

Special height values

Variables

This section is empty.

Functions

func ParseAddress

func ParseAddress(raw string, chain flow.Chain) (flow.Address, error)

Types

type Arguments

type Arguments [][]byte

func (Arguments) Flow

func (a Arguments) Flow() [][]byte

func (*Arguments) Parse

func (a *Arguments) Parse(raw []string) error

type CreateTransaction

type CreateTransaction struct {
	Transaction flow.TransactionBody
}

func CreateTransactionRequest

func CreateTransactionRequest(r *common.Request) (CreateTransaction, error)

func (*CreateTransaction) Build

func (c *CreateTransaction) Build(r *common.Request) error

func (*CreateTransaction) Parse

func (c *CreateTransaction) Parse(rawTransaction io.Reader, chain flow.Chain) error

type EventType

type EventType string

func (EventType) Flow

func (e EventType) Flow() string

func (*EventType) Parse

func (e *EventType) Parse(raw string) error

type EventTypes

type EventTypes []EventType

func (EventTypes) Flow

func (e EventTypes) Flow() []string

func (*EventTypes) Parse

func (e *EventTypes) Parse(raw []string) error

type GetAccount

type GetAccount struct {
	Address flow.Address
	Height  uint64
}

func GetAccountRequest

func GetAccountRequest(r *common.Request) (GetAccount, error)

GetAccountRequest extracts necessary variables and query parameters from the provided request, builds a GetAccount instance, and validates it.

No errors are expected during normal operation.

func (*GetAccount) Build

func (g *GetAccount) Build(r *common.Request) error

func (*GetAccount) Parse

func (g *GetAccount) Parse(rawAddress string, rawHeight string, chain flow.Chain) error

type GetAccountBalance

type GetAccountBalance struct {
	Address flow.Address
	Height  uint64
}

func GetAccountBalanceRequest

func GetAccountBalanceRequest(r *common.Request) (GetAccountBalance, error)

GetAccountBalanceRequest extracts necessary variables and query parameters from the provided request, builds a GetAccountBalance instance, and validates it.

No errors are expected during normal operation.

func (*GetAccountBalance) Build

func (g *GetAccountBalance) Build(r *common.Request) error

func (*GetAccountBalance) Parse

func (g *GetAccountBalance) Parse(
	rawAddress string,
	rawHeight string,
	chain flow.Chain,
) error

type GetAccountKey

type GetAccountKey struct {
	Address flow.Address
	Index   uint32
	Height  uint64
}

func GetAccountKeyRequest

func GetAccountKeyRequest(r *common.Request) (GetAccountKey, error)

GetAccountKeyRequest extracts necessary variables and query parameters from the provided request, builds a GetAccountKey instance, and validates it.

No errors are expected during normal operation.

func (*GetAccountKey) Build

func (g *GetAccountKey) Build(r *common.Request) error

func (*GetAccountKey) Parse

func (g *GetAccountKey) Parse(
	rawAddress string,
	rawIndex string,
	rawHeight string,
	chain flow.Chain,
) error

type GetAccountKeys

type GetAccountKeys struct {
	Address flow.Address
	Height  uint64
}

func GetAccountKeysRequest

func GetAccountKeysRequest(r *common.Request) (GetAccountKeys, error)

GetAccountKeysRequest extracts necessary variables and query parameters from the provided request, builds a GetAccountKeys instance, and validates it.

No errors are expected during normal operation.

func (*GetAccountKeys) Build

func (g *GetAccountKeys) Build(r *common.Request) error

func (*GetAccountKeys) Parse

func (g *GetAccountKeys) Parse(
	rawAddress string,
	rawHeight string,
	chain flow.Chain,
) error

type GetBlock

type GetBlock struct {
	Heights      []uint64
	StartHeight  uint64
	EndHeight    uint64
	FinalHeight  bool
	SealedHeight bool
}

func GetBlockRequest

func GetBlockRequest(r *common.Request) (GetBlock, error)

GetBlockRequest extracts necessary query parameters from the provided request, builds a GetBlock instance, and validates it.

No errors are expected during normal operation.

func (*GetBlock) Build

func (g *GetBlock) Build(r *common.Request) error

func (*GetBlock) HasHeights

func (g *GetBlock) HasHeights() bool

func (*GetBlock) Parse

func (g *GetBlock) Parse(rawHeights []string, rawStart string, rawEnd string) error

type GetBlockByIDs

type GetBlockByIDs struct {
	IDs []flow.Identifier
}

func GetBlockByIDsRequest

func GetBlockByIDsRequest(r *common.Request) (GetBlockByIDs, error)

GetBlockByIDsRequest extracts necessary variables from the provided request, builds a GetBlockByIDs instance, and validates it.

No errors are expected during normal operation.

func (*GetBlockByIDs) Build

func (g *GetBlockByIDs) Build(r *common.Request) error

func (*GetBlockByIDs) Parse

func (g *GetBlockByIDs) Parse(rawIds []string) error

type GetBlockPayload

type GetBlockPayload struct {
	GetByIDRequest
}

func GetBlockPayloadRequest

func GetBlockPayloadRequest(r *common.Request) (GetBlockPayload, error)

GetBlockPayloadRequest extracts necessary variables from the provided request, builds a GetBlockPayload instance, and validates it.

No errors are expected during normal operation.

type GetByIDRequest

type GetByIDRequest struct {
	ID flow.Identifier
}

func (*GetByIDRequest) Build

func (g *GetByIDRequest) Build(r *common.Request) error

func (*GetByIDRequest) Parse

func (g *GetByIDRequest) Parse(rawID string) error

type GetCollection

type GetCollection struct {
	GetByIDRequest
	ExpandsTransactions bool
}

func GetCollectionRequest

func GetCollectionRequest(r *common.Request) (GetCollection, error)

GetCollectionRequest extracts necessary variables from the provided request, builds a GetCollection instance, and validates it.

No errors are expected during normal operation.

func (*GetCollection) Build

func (g *GetCollection) Build(r *common.Request) error

type GetEvents

type GetEvents struct {
	StartHeight uint64
	EndHeight   uint64
	Type        string
	BlockIDs    []flow.Identifier
}

func GetEventsRequest

func GetEventsRequest(r *common.Request) (GetEvents, error)

GetEventsRequest extracts necessary variables from the provided request, builds a GetEvents instance, and validates it.

No errors are expected during normal operation.

func (*GetEvents) Build

func (g *GetEvents) Build(r *common.Request) error

func (*GetEvents) Parse

func (g *GetEvents) Parse(rawType string, rawStart string, rawEnd string, rawBlockIDs []string) error

type GetExecutionResult

type GetExecutionResult struct {
	GetByIDRequest
}

func GetExecutionResultRequest

func GetExecutionResultRequest(r *common.Request) (GetExecutionResult, error)

GetExecutionResultRequest extracts necessary variables from the provided request, builds a GetExecutionResult instance, and validates it.

No errors are expected during normal operation.

type GetExecutionResultByBlockIDs

type GetExecutionResultByBlockIDs struct {
	BlockIDs []flow.Identifier
}

func GetExecutionResultByBlockIDsRequest

func GetExecutionResultByBlockIDsRequest(r *common.Request) (GetExecutionResultByBlockIDs, error)

GetExecutionResultByBlockIDsRequest extracts necessary variables from the provided request, builds a GetExecutionResultByBlockIDs instance, and validates it.

No errors are expected during normal operation.

func (*GetExecutionResultByBlockIDs) Build

func (*GetExecutionResultByBlockIDs) Parse

func (g *GetExecutionResultByBlockIDs) Parse(rawIDs []string) error

type GetScript

type GetScript struct {
	BlockID     flow.Identifier
	BlockHeight uint64
	Script      Script
}

func GetScriptRequest

func GetScriptRequest(r *common.Request) (GetScript, error)

GetScriptRequest extracts necessary variables from the provided request, builds a GetScript instance, and validates it.

No errors are expected during normal operation.

func (*GetScript) Build

func (g *GetScript) Build(r *common.Request) error

func (*GetScript) Parse

func (g *GetScript) Parse(rawHeight string, rawID string, rawScript io.Reader) error

type GetTransaction

type GetTransaction struct {
	GetByIDRequest
	TransactionOptionals
	ExpandsResult bool
}

func GetTransactionRequest

func GetTransactionRequest(r *common.Request) (GetTransaction, error)

GetTransactionRequest extracts necessary variables from the provided request, builds a GetTransaction instance, and validates it.

No errors are expected during normal operation.

func (*GetTransaction) Build

func (g *GetTransaction) Build(r *common.Request) error

type GetTransactionResult

type GetTransactionResult struct {
	GetByIDRequest
	TransactionOptionals
}

func GetTransactionResultRequest

func GetTransactionResultRequest(r *common.Request) (GetTransactionResult, error)

GetTransactionResultRequest extracts necessary variables from the provided request, builds a GetTransactionResult instance, and validates it.

No errors are expected during normal operation.

func (*GetTransactionResult) Build

type Height

type Height uint64

func (Height) Flow

func (h Height) Flow() uint64

func (*Height) Parse

func (h *Height) Parse(raw string) error

type Heights

type Heights []Height

func (Heights) Flow

func (h Heights) Flow() []uint64

func (*Heights) Parse

func (h *Heights) Parse(raw []string) error

type ID

type ID flow.Identifier

func (ID) Flow

func (i ID) Flow() flow.Identifier

func (*ID) Parse

func (i *ID) Parse(raw string) error

type IDs

type IDs []ID

func (IDs) Flow

func (i IDs) Flow() []flow.Identifier

func (*IDs) Parse

func (i *IDs) Parse(raw []string) error

type ProposalKey

type ProposalKey flow.ProposalKey

func (ProposalKey) Flow

func (p ProposalKey) Flow() flow.ProposalKey

func (*ProposalKey) Parse

func (p *ProposalKey) Parse(raw models.ProposalKey, chain flow.Chain) error

type Script

type Script struct {
	Args   Arguments
	Source []byte
}

func (*Script) Parse

func (s *Script) Parse(raw io.Reader) error

type Signature

type Signature []byte

func (Signature) Flow

func (s Signature) Flow() []byte

func (*Signature) Parse

func (s *Signature) Parse(raw string) error

type Transaction

type Transaction flow.TransactionBody

func (Transaction) Flow

func (t Transaction) Flow() flow.TransactionBody

func (*Transaction) Parse

func (t *Transaction) Parse(raw io.Reader, chain flow.Chain) error

type TransactionOptionals

type TransactionOptionals struct {
	BlockID      flow.Identifier
	CollectionID flow.Identifier
}

func (*TransactionOptionals) Parse

type TransactionSignature

type TransactionSignature flow.TransactionSignature

func (TransactionSignature) Flow

func (*TransactionSignature) Parse

func (s *TransactionSignature) Parse(
	rawAddress string,
	rawKeyIndex string,
	rawSignature string,
	chain flow.Chain,
) error

type TransactionSignatures

type TransactionSignatures []TransactionSignature

func (TransactionSignatures) Flow

func (*TransactionSignatures) Parse

func (t *TransactionSignatures) Parse(rawSigs []models.TransactionSignature, chain flow.Chain) error

Jump to

Keyboard shortcuts

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