Versions in this module Expand all Collapse all v0 v0.5.10 Aug 9, 2023 v0.5.9 Aug 4, 2023 Changes in this version + const APIRouteRest + const MIMEApplicationVendorIOTASerializerV1 + const MIMETextCSV + const ParameterAddress + const ParameterMilestoneIndex + const ParameterTransactionHash + const ProtocolHTTP + const ProtocolHTTPS + const ProtocolWS + const ProtocolWSS + const QueryParameterAddress + const QueryParameterApprovee + const QueryParameterBundle + const QueryParameterMaxResults + const QueryParameterTag + const RouteAddressBalance + const RouteAddressWasSpent + const RouteInfo + const RouteLedgerDiffByIndex + const RouteLedgerDiffExtendedByIndex + const RouteLedgerState + const RouteLedgerStateByIndex + const RouteLedgerStateNonMigrated + const RouteLedgerStateNonMigratedByIndex + const RouteMilestoneByIndex + const RouteRPCEndpoint + const RouteTransaction + const RouteTransactionMetadata + const RouteTransactionTrytes + const RouteTransactions + var ErrInvalidKeyLength = errors.New("invalid key length") + var ErrInvalidParameter = echo.NewHTTPError(http.StatusBadRequest, "invalid parameter") + var ErrNoPrivKeyFound = errors.New("no private key found") + var ErrNotAcceptable = echo.NewHTTPError(http.StatusNotAcceptable) + var ErrPrivKeyInvalid = errors.New("invalid private key") + var PLUGIN = node.NewPlugin("WebAPI", node.Enabled, configure, run) + func GetAcceptHeaderContentType(c echo.Context, supportedContentTypes ...string) (string, error) + func GetRequestContentType(c echo.Context, supportedContentTypes ...string) (string, error) + func GetURL(protocol string, host string, port uint16, path ...string) string + func JSONResponse(c echo.Context, statusCode int, result interface{}) error + func LoadOrCreateIdentityPrivateKey(privKeyFilePath string, identityPrivKey string) (libp2pcrypto.PrivKey, bool, error) + func NewEcho(logger *logger.Logger, onHTTPError func(err error, c echo.Context), ...) *echo.Echo + func ParseBoolQueryParam(c echo.Context, paramName string) (bool, error) + func ParseMilestoneIndexParam(c echo.Context, paramName string) (uint64, error) + func ParseUint32QueryParam(c echo.Context, paramName string, maxValue ...uint32) (uint32, error) + func ParseUnixTimestampQueryParam(c echo.Context, paramName string) (time.Time, error) + type AddNeighbors struct + Uris []string + type AddNeighborsHornet struct + Neighbors []Neighbor + type AddNeighborsResponse struct + AddedNeighbors int + Duration int + type AddressWithBalance struct + Address trinary.Hash + Balance string + type ApproverStruct struct + ReferencedByTrunk bool + TxHash trinary.Hash + type AttachToTangle struct + BranchTransaction trinary.Hash + MinWeightMagnitude int + TrunkTransaction trinary.Hash + Trytes []trinary.Trytes + type AttachToTangleResponse struct + Duration int + Trytes []trinary.Trytes + type BroadcastTransactions struct + Trytes []trinary.Trytes + type BroadcastTransactionsResponse struct + Duration int + type BundleWithValue struct + BundleHash trinary.Hash + LastIndex uint64 + TailTxHash trinary.Hash + Txs []*TxWithValue + func (b *BundleWithValue) Item() Container + type CheckConsistencyResponse struct + Duration int + State bool + type Container interface + Item func() Container + type CreateSnapshotFile struct + TargetIndex milestone.Index + type CreateSnapshotFileResponse struct + Duration int + type DebugRequest struct + EnqueueTimestamp int64 + Hash trinary.Hash + MilestoneIndex milestone.Index + TxExists bool + Type string + type EntryPoint struct + ConfirmedByMilestoneIndex milestone.Index + TxHash trinary.Hash + type ErrorReturn struct + Error string + type FindTransactions struct + Addresses []trinary.Hash + Approvees []trinary.Hash + Bundles []trinary.Hash + MaxResults int + Tags []trinary.Hash + ValueOnly bool + type FindTransactionsResponse struct + Duration int + Hashes []trinary.Hash + type GetBalances struct + Addresses []trinary.Hash + type GetBalancesResponse struct + Balances []string + Duration int + MilestoneIndex milestone.Index + References []trinary.Hash + type GetFundsOnSpentAddressesResponse struct + Addresses []*AddressWithBalance + type GetInclusionStates struct + Transactions []trinary.Hash + type GetInclusionStatesResponse struct + Duration int + States []bool + type GetLedgerDiff struct + MilestoneIndex milestone.Index + type GetLedgerDiffExt struct + MilestoneIndex milestone.Index + type GetLedgerDiffExtResponse struct + ConfirmedBundlesWithValue []*BundleWithValue + ConfirmedTxWithValue []*TxHashWithValue + Diff map[trinary.Hash]string + Duration int + MilestoneIndex milestone.Index + type GetLedgerDiffResponse struct + Diff map[trinary.Hash]string + Duration int + MilestoneIndex milestone.Index + type GetLedgerState struct + TargetIndex milestone.Index + type GetLedgerStateResponse struct + Balances map[trinary.Hash]string + Duration int + MilestoneIndex milestone.Index + type GetMigration struct + MilestoneIndex milestone.Index + type GetNeighborsResponse struct + Duration int + Neighbors []*peer.Info + type GetNodeAPIConfigurationResponse struct + Duration int + MaxBodyLength int + MaxFindTransactions int + MaxGetTrytes int + MaxRequestsList int + MilestoneStartIndex milestone.Index + type GetNodeInfoResponse struct + AppName string + AppVersion string + CoordinatorAddress trinary.Hash + Duration int + Features []string + Health bool + IsSynced bool + LastSnapshottedMilestoneIndex milestone.Index + LatestMilestone trinary.Hash + LatestMilestoneIndex milestone.Index + LatestSolidSubtangleMilestone trinary.Hash + LatestSolidSubtangleMilestoneIndex milestone.Index + MilestoneStartIndex milestone.Index + Neighbors uint + NodeAlias string + Time int64 + Tips uint32 + TransactionsToRequest int + type GetRequestsResponse struct + Requests []*DebugRequest + type GetTipInfo struct + TailTransaction trinary.Hash + type GetTipInfoResponse struct + Confirmed bool + Conflicting bool + Duration int + ShouldPromote bool + ShouldReattach bool + type GetTransactionsToApprove struct + Depth uint + Reference trinary.Hash + type GetTransactionsToApproveResponse struct + BranchTransaction trinary.Hash + Duration int + TrunkTransaction trinary.Hash + type GetTrytes struct + Hashes []trinary.Hash + type GetTrytesResponse struct + Duration int + Trytes []trinary.Trytes + type GetWhiteFlagConfirmationResponse struct + IncludedBundles [][]trinary.Trytes + MilestoneBundle []trinary.Trytes + type HTTPErrorResponse struct + Code string + Message string + type HTTPErrorResponseEnvelope struct + Error HTTPErrorResponse + type Neighbor struct + Alias string + Identity string + PreferIPv6 bool + type PruneDatabase struct + Depth milestone.Index + TargetIndex milestone.Index + type PruneDatabaseResponse struct + Duration int + type RemoveNeighbors struct + Uris []string + type RemoveNeighborsResponse struct + Duration int + RemovedNeighbors uint + type Request struct + Command string + type SearchConfirmedApprover struct + SearchMilestone bool + TxHash trinary.Hash + type SearchConfirmedApproverResponse struct + ConfirmedByMilestoneIndex milestone.Index + ConfirmedTxHash trinary.Hash + TanglePath []*ApproverStruct + TanglePathLength int + type SearchEntryPoint struct + TxHash trinary.Hash + type SearchEntryPointResponse struct + EntryPoints []*EntryPoint + TanglePath []*TransactionWithApprovers + TanglePathLength int + type StoreTransactions struct + Trytes []trinary.Trytes + type TransactionWithApprovers struct + BranchTransaction trinary.Hash + TrunkTransaction trinary.Hash + TxHash trinary.Hash + type TxHashWithValue struct + Address trinary.Hash + BundleHash trinary.Hash + TailTxHash trinary.Hash + TxHash trinary.Hash + Value string + func (tx *TxHashWithValue) Item() Container + type TxWithValue struct + Address trinary.Hash + Index uint64 + TxHash trinary.Hash + Value string + func (tx *TxWithValue) Item() Container + type WebAPIServer struct + func NewWebAPIServer(e *echo.Echo, log *logger.Logger, rpcEndpointsPublic []string, maxResults int) *WebAPIServer + func (s *WebAPIServer) HasRPCEndpoint(endpoint string) bool + func (s *WebAPIServer) SetFeatures(features []string) + type WereAddressesSpentFrom struct + Addresses []trinary.Hash + type WereAddressesSpentFromResponse struct + Duration int + States []bool