Documentation ¶
Index ¶
- Constants
- func CreateEchoSwagger(e *echo.Echo, version string, enabled bool) echoswagger.ApiRoot
- type BundleWithValue
- type Container
- type DatabaseServer
- type ErrorReturn
- type FindTransactions
- type FindTransactionsResponse
- type GetBalances
- type GetBalancesResponse
- type GetInclusionStates
- type GetInclusionStatesResponse
- type GetLedgerDiff
- type GetLedgerDiffExt
- type GetLedgerDiffExtResponse
- type GetLedgerDiffResponse
- type GetLedgerState
- type GetLedgerStateResponse
- type GetNodeInfoResponse
- type GetTrytes
- type GetTrytesResponse
- type Request
- type TxHashWithValue
- type TxWithValue
- type WereAddressesSpentFrom
- type WereAddressesSpentFromResponse
Constants ¶
View Source
const ( ParameterAddress = "address" ParameterTransactionHash = "txHash" ParameterMilestoneIndex = "index" QueryParameterBundle = "bundle" QueryParameterAddress = "address" QueryParameterTag = "tag" QueryParameterApprovee = "approvee" QueryParameterMaxResults = "maxResults" )
View Source
const ( // RouteRPCEndpoint is the route for sending RPC requests to the API. // POST sends an IOTA legacy API request and returns the results. RouteRPCEndpoint = "/" // RouteInfo is the route for getting the node info. // GET returns the node info. RouteInfo = "/info" // RouteMilestoneByIndex is the route for getting a milestone by its milestoneIndex. // GET will return the milestone. RouteMilestoneByIndex = "/milestones/by-index/:" + ParameterMilestoneIndex // RouteTransactions is the route for getting transactions filtered by the given parameters. // GET with query parameter returns all txHashes that fit these filter criteria. // Query parameters: "bundle", "address", "tag", "approvee", "maxResults" // Returns an empty list if no results are found. RouteTransactions = "/transactions" // former findTransactions // RouteTransaction is the route for getting a transaction. // GET will return the transaction. RouteTransaction = "/transactions/:" + ParameterTransactionHash // RouteTransactionTrytes is the route for getting the trytes of a transaction. // GET will return the transaction trytes. RouteTransactionTrytes = "/transactions/:" + ParameterTransactionHash + "/trytes" // former getTrytes // RouteTransactionMetadata is the route for getting the metadata of a transaction. // GET will return the metadata. RouteTransactionMetadata = "/transactions/:" + ParameterTransactionHash + "/metadata" // former getInclusionStates // RouteAddressBalance is the route for getting the balance of an address. // GET will return the balance. RouteAddressBalance = "/addresses/:" + ParameterAddress + "/balance" // former getBalances // RouteAddressBalance is the route to check whether an address was already spent or not. // GET will return true if the address was already spent. RouteAddressWasSpent = "/addresses/:" + ParameterAddress + "/was-spent" // former wereAddressesSpentFrom // RouteAddressDiffs is the route for getting all diffs of an address. // GET will return all diffs of the address per milestone. RouteAddressDiffs = "/addresses/:" + ParameterAddress + "/diffs" // RouteLedgerState is the route to return the current ledger state. // GET will return all addresses with their balances. RouteLedgerState = "/ledger/state" // former getLedgerState // RouteLedgerStateByIndex is the route to return the ledger state of a given ledger index. // GET will return all addresses with their balances. RouteLedgerStateByIndex = "/ledger/state/by-index/:" + ParameterMilestoneIndex // former getLedgerState // RouteLedgerDiffByIndex is the route to return the ledger diff of a given ledger index. // GET will return all addresses with their diffs. RouteLedgerDiffByIndex = "/ledger/diff/by-index/:" + ParameterMilestoneIndex // former getLedgerDiff // RouteLedgerDiffExtendedByIndex is the route to return the ledger diff of a given ledger index with extended informations. // GET will return all addresses with their diffs, the confirmed transactions and the confirmed bundles. RouteLedgerDiffExtendedByIndex = "/ledger/diff-extended/by-index/:" + ParameterMilestoneIndex // former getLedgerDiffExt )
View Source
const (
APIRoute = "/api/core/v0"
)
Variables ¶
This section is empty.
Functions ¶
func CreateEchoSwagger ¶
Types ¶
type BundleWithValue ¶
type BundleWithValue struct { BundleHash trinary.Hash `json:"bundleHash"` TailTxHash trinary.Hash `json:"tailTxHash"` LastIndex uint64 `json:"lastIndex"` Txs []*TxWithValue `json:"txs"` }
BundleWithValue struct.
func (*BundleWithValue) Item ¶
func (b *BundleWithValue) Item() Container
type DatabaseServer ¶
type DatabaseServer struct { AppInfo *app.Info Database *database.Database RestAPILimitsMaxResults int RPCEndpoints map[string]rpcEndpoint }
func NewDatabaseServer ¶
type FindTransactions ¶
type FindTransactions struct { Bundles []trinary.Hash `json:"bundles"` Addresses []trinary.Hash `json:"addresses"` Tags []trinary.Hash `json:"tags"` Approvees []trinary.Hash `json:"approvees"` MaxResults int `json:"maxresults"` ValueOnly bool `json:"valueOnly"` }
FindTransactions struct.
type FindTransactionsResponse ¶
type FindTransactionsResponse struct { Hashes []trinary.Hash `json:"hashes"` Duration int `json:"duration"` }
FindTransactionsResponse struct.
type GetBalances ¶
GetBalances struct.
type GetBalancesResponse ¶
type GetBalancesResponse struct { Balances []string `json:"balances"` References []trinary.Hash `json:"references"` MilestoneIndex milestone.Index `json:"milestoneIndex"` Duration int `json:"duration"` }
GetBalancesResponse struct.
type GetInclusionStates ¶
GetInclusionStates struct.
type GetInclusionStatesResponse ¶
type GetInclusionStatesResponse struct { States []bool `json:"states"` Duration int `json:"duration"` }
GetInclusionStatesResponse struct.
type GetLedgerDiff ¶
GetLedgerDiff struct.
type GetLedgerDiffExt ¶
GetLedgerDiffExt struct.
type GetLedgerDiffExtResponse ¶
type GetLedgerDiffExtResponse struct { ConfirmedTxWithValue []*TxHashWithValue `json:"confirmedTxWithValue"` ConfirmedBundlesWithValue []*BundleWithValue `json:"confirmedBundlesWithValue"` Diff map[trinary.Hash]int64 `json:"diff"` MilestoneIndex milestone.Index `json:"milestoneIndex"` Duration int `json:"duration"` }
GetLedgerDiffExtResponse struct.
type GetLedgerDiffResponse ¶
type GetLedgerDiffResponse struct { Diff map[trinary.Hash]int64 `json:"diff"` MilestoneIndex milestone.Index `json:"milestoneIndex"` Duration int `json:"duration"` }
GetLedgerDiffResponse struct.
type GetLedgerState ¶
GetLedgerState struct.
type GetLedgerStateResponse ¶
type GetLedgerStateResponse struct { Balances map[trinary.Hash]uint64 `json:"balances"` MilestoneIndex milestone.Index `json:"milestoneIndex"` Duration int `json:"duration"` }
GetLedgerStateResponse struct.
type GetNodeInfoResponse ¶
type GetNodeInfoResponse struct { AppName string `json:"appName"` AppVersion string `json:"appVersion"` LatestMilestone trinary.Hash `json:"latestMilestone"` LatestMilestoneIndex milestone.Index `json:"latestMilestoneIndex"` LatestSolidSubtangleMilestone trinary.Hash `json:"latestSolidSubtangleMilestone"` LatestSolidSubtangleMilestoneIndex milestone.Index `json:"latestSolidSubtangleMilestoneIndex"` IsSynced bool `json:"isSynced"` Health bool `json:"isHealthy"` MilestoneStartIndex milestone.Index `json:"milestoneStartIndex"` LastSnapshottedMilestoneIndex milestone.Index `json:"lastSnapshottedMilestoneIndex"` Neighbors uint `json:"neighbors"` Time int64 `json:"time"` Tips uint32 `json:"tips"` TransactionsToRequest int `json:"transactionsToRequest"` Features []string `json:"features"` CoordinatorAddress trinary.Hash `json:"coordinatorAddress"` Duration int `json:"duration"` }
GetNodeInfoResponse struct.
type GetTrytesResponse ¶
type GetTrytesResponse struct { Trytes []trinary.Trytes `json:"trytes"` Milestones []uint32 `json:"milestones"` Duration int `json:"duration"` }
GetTrytesResponse struct.
type TxHashWithValue ¶
type TxHashWithValue struct { TxHash trinary.Hash `json:"txHash"` TailTxHash trinary.Hash `json:"tailTxHash"` BundleHash trinary.Hash `json:"bundleHash"` Address trinary.Hash `json:"address"` Value int64 `json:"value"` }
TxHashWithValue struct.
func (*TxHashWithValue) Item ¶
func (tx *TxHashWithValue) Item() Container
type TxWithValue ¶
type TxWithValue struct { TxHash trinary.Hash `json:"txHash"` Address trinary.Hash `json:"address"` Index uint64 `json:"index"` Value int64 `json:"value"` }
TxWithValue struct.
func (*TxWithValue) Item ¶
func (tx *TxWithValue) Item() Container
type WereAddressesSpentFrom ¶
WereAddressesSpentFrom struct.
type WereAddressesSpentFromResponse ¶
type WereAddressesSpentFromResponse struct { States []bool `json:"states"` Duration int `json:"duration"` }
WereAddressesSpentFromResponse struct.
Click to show internal directories.
Click to hide internal directories.