ledger

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClosedRequest

type ClosedRequest struct {
	common.BaseRequest
}

The ledger_closed method returns the unique identifiers of the most recently closed ledger.

func (*ClosedRequest) APIVersion added in v0.1.3

func (*ClosedRequest) APIVersion() int

func (*ClosedRequest) Method

func (*ClosedRequest) Method() string

func (*ClosedRequest) Validate

func (*ClosedRequest) Validate() error

TODO: Implement V2

type ClosedResponse

type ClosedResponse struct {
	LedgerHash  string             `json:"ledger_hash"`
	LedgerIndex common.LedgerIndex `json:"ledger_index"`
}

The expected response from the ledger_closed method.

type CurrentRequest

type CurrentRequest struct {
	common.BaseRequest
}

The ledger_current method returns the unique identifiers of the current in-progress ledger.

func (*CurrentRequest) APIVersion added in v0.1.3

func (*CurrentRequest) APIVersion() int

func (*CurrentRequest) Method

func (*CurrentRequest) Method() string

func (*CurrentRequest) Validate

func (*CurrentRequest) Validate() error

TODO: Implement V2

type CurrentResponse

type CurrentResponse struct {
	LedgerCurrentIndex common.LedgerIndex `json:"ledger_current_index"`
}

The expected response from the ledger_current method.

type DataRequest

type DataRequest struct {
	common.BaseRequest
	LedgerHash  common.LedgerHash      `json:"ledger_hash,omitempty"`
	LedgerIndex common.LedgerSpecifier `json:"ledger_index,omitempty"`
	Binary      bool                   `json:"binary,omitempty"`
	Limit       int                    `json:"limit,omitempty"`
	Marker      any                    `json:"marker,omitempty"`
	Type        ledger.EntryType       `json:"type,omitempty"`
}

The ledger_data method retrieves contents of the specified ledger. You can iterate through several calls to retrieve the entire contents of a single ledger version.

func (*DataRequest) APIVersion added in v0.1.3

func (*DataRequest) APIVersion() int

func (*DataRequest) Method

func (*DataRequest) Method() string

func (*DataRequest) Validate

func (*DataRequest) Validate() error

TODO: Implement V2

type DataResponse

type DataResponse struct {
	LedgerIndex string              `json:"ledger_index"`
	LedgerHash  common.LedgerHash   `json:"ledger_hash"`
	State       []ledgertypes.State `json:"state"`
	Marker      any                 `json:"marker"`
}

The expected response from the ledger_data method.

type Request

type Request struct {
	common.BaseRequest
	LedgerHash   common.LedgerHash      `json:"ledger_hash,omitempty"`
	LedgerIndex  common.LedgerSpecifier `json:"ledger_index,omitempty"`
	Full         bool                   `json:"full,omitempty"`
	Accounts     bool                   `json:"accounts,omitempty"`
	Expand       bool                   `json:"expand,omitempty"`
	Transactions bool                   `json:"transactions,omitempty"`
	OwnerFunds   bool                   `json:"owner_funds,omitempty"`
	Binary       bool                   `json:"binary,omitempty"`
	Queue        bool                   `json:"queue,omitempty"`
	Type         ledger.EntryType       `json:"type,omitempty"`
}

Retrieve information about the public ledger.

func (*Request) APIVersion added in v0.1.3

func (*Request) APIVersion() int

func (*Request) Method

func (*Request) Method() string

func (*Request) Validate

func (*Request) Validate() error

TODO: Implement V2

type Response

type Response struct {
	Ledger      ledgertypes.BaseLedger  `json:"ledger"`
	LedgerHash  string                  `json:"ledger_hash"`
	LedgerIndex common.LedgerIndex      `json:"ledger_index"`
	Validated   bool                    `json:"validated,omitempty"`
	QueueData   []ledgertypes.QueueData `json:"queue_data,omitempty"`
}

The expected response from the ledger method.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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