Documentation ¶
Index ¶
- Variables
- type AddNeighbors
- type AddNeighborsHornet
- type AddNeighborsResponse
- type AddressWithBalance
- type ApproverStruct
- type AttachToTangle
- type AttachToTangleReturn
- type BradcastTransactionsReturn
- type BroadcastTransactions
- type BundleWithValue
- type CheckConsistencyReturn
- type CreateSnapshotFile
- type CreateSnapshotFileReturn
- type DebugRequest
- type EntryPoint
- type ErrorReturn
- type FindTransactions
- type FindTransactionsReturn
- type GetBalances
- type GetBalancesReturn
- type GetFundsOnSpentAddressesReturn
- type GetInclusionStates
- type GetInclusionStatesReturn
- type GetLedgerDiff
- type GetLedgerDiffExt
- type GetLedgerDiffExtReturn
- type GetLedgerDiffReturn
- type GetLedgerState
- type GetLedgerStateReturn
- type GetNeighbors
- type GetNeighborsReturn
- type GetNodeAPIConfiguration
- type GetNodeAPIConfigurationReturn
- type GetNodeInfo
- type GetNodeInfoReturn
- type GetRequests
- type GetRequestsReturn
- type GetTipInfo
- type GetTipInfoReturn
- type GetTransactionsToApprove
- type GetTransactionsToApproveReturn
- type GetTrytes
- type GetTrytesReturn
- type Neighbor
- type PruneDatabase
- type PruneDatabaseReturn
- type RemoveNeighbors
- type RemoveNeighborsReturn
- type ResultReturn
- type SearchConfirmedApprover
- type SearchConfirmedApproverReturn
- type SearchEntryPoint
- type SearchEntryPointReturn
- type StoreTransactions
- type TransactionWithApprovers
- type TriggerSolidifier
- type TxHashWithValue
- type TxWithValue
- type WereAddressesSpentFrom
- type WereAddressesSpentFromReturn
Constants ¶
This section is empty.
Variables ¶
var ( // ErrNodeNotSync is returned when the node was not synced. ErrNodeNotSync = errors.New("node not synced") // ErrInternalError is returned when there was an internal node error. ErrInternalError = errors.New("internal error") )
var (
PLUGIN = node.NewPlugin("WebAPI", node.Enabled, configure, run)
)
PLUGIN WebAPI
Functions ¶
This section is empty.
Types ¶
type AddNeighbors ¶
type AddNeighbors struct { Command string `mapstructure:"command"` Uris []string `mapstructure:"uris"` }
AddNeighbors legacy struct
type AddNeighborsHornet ¶ added in v0.2.8
type AddNeighborsHornet struct { Command string `mapstructure:"command"` Neighbors []Neighbor `mapstructure:"neighbors"` }
AddNeighborsHornet struct
type AddNeighborsResponse ¶
type AddNeighborsResponse struct { AddedNeighbors int `json:"addedNeighbors"` Duration int `json:"duration"` }
AddNeighborsResponse struct
type AddressWithBalance ¶ added in v0.4.0
type ApproverStruct ¶ added in v0.4.0
type ApproverStruct struct { TxHash trinary.Hash `mapstructure:"txHash"` ReferencedByTrunk bool `mapstructure:"referencedByTrunk"` }
ApproverStruct struct
type AttachToTangle ¶
type AttachToTangle struct { Command string `mapstructure:"command"` TrunkTransaction trinary.Hash `mapstructure:"trunkTransaction"` BranchTransaction trinary.Hash `mapstructure:"branchTransaction"` MinWeightMagnitude int `mapstructure:"minWeightMagnitude,omitempty"` Trytes []trinary.Trytes `mapstructure:"trytes"` }
AttachToTangle struct
type AttachToTangleReturn ¶
type AttachToTangleReturn struct { Trytes []trinary.Trytes `json:"trytes"` Duration int `json:"duration"` }
AttachToTangleReturn struct
type BradcastTransactionsReturn ¶
type BradcastTransactionsReturn struct {
Duration int `json:"duration"`
}
BradcastTransactionsReturn struct
type BroadcastTransactions ¶
type BroadcastTransactions struct { Command string `mapstructure:"command"` Trytes []trinary.Trytes `mapstructure:"trytes"` }
BroadcastTransactions struct
type BundleWithValue ¶ added in v0.2.11
type BundleWithValue struct { BundleHash trinary.Hash `mapstructure:"bundleHash"` TailTxHash trinary.Hash `mapstructure:"tailTxHash"` LastIndex uint64 `mapstructure:"lastIndex"` Txs []*TxWithValue `mapstructure:"txs"` }
BundleWithValue struct
type CheckConsistencyReturn ¶
CheckConsistencyReturn struct
type CreateSnapshotFile ¶ added in v0.4.0
type CreateSnapshotFile struct { Command string `mapstructure:"command"` TargetIndex milestone.Index `mapstructure:"targetIndex"` }
CreateSnapshotFile struct
type CreateSnapshotFileReturn ¶ added in v0.4.0
type CreateSnapshotFileReturn struct {
Duration int `json:"duration"`
}
CreateSnapshotFileReturn struct
type DebugRequest ¶ added in v0.4.0
type EntryPoint ¶ added in v0.4.0
type EntryPoint struct { TxHash trinary.Hash `json:"txHash"` ConfirmedByMilestoneIndex milestone.Index `json:"confirmedByMilestoneIndex"` }
EntryPoint struct
type FindTransactions ¶
type FindTransactions struct { Command string `mapstructure:"command"` Bundles []trinary.Hash `mapstructure:"bundles"` Addresses []trinary.Hash `mapstructure:"addresses"` Tags []trinary.Hash `mapstructure:"tags"` Approvees []trinary.Hash `mapstructure:"approvees"` MaxResults int `mapstructure:"maxresults"` ValueOnly bool `json:"valueOnly"` }
FindTransactions struct
type FindTransactionsReturn ¶
type FindTransactionsReturn struct { Hashes []trinary.Hash `json:"hashes"` Duration int `json:"duration"` }
FindTransactionsReturn struct
type GetBalances ¶
type GetBalances struct { Command string `mapstructure:"command"` Addresses []trinary.Hash `mapstructure:"addresses"` }
GetBalances struct
type GetBalancesReturn ¶
type GetBalancesReturn struct { Balances []trinary.Hash `json:"balances"` References []trinary.Hash `json:"references"` MilestoneIndex milestone.Index `json:"milestoneIndex"` Duration int `json:"duration"` }
GetBalancesReturn struct
type GetFundsOnSpentAddressesReturn ¶ added in v0.4.0
type GetFundsOnSpentAddressesReturn struct { Command string `mapstructure:"command"` Addresses []*AddressWithBalance `mapstructure:"addresses"` }
GetFundsOnSpentAddressesReturn struct
type GetInclusionStates ¶
type GetInclusionStates struct { Command string `mapstructure:"command"` Transactions []trinary.Hash `mapstructure:"transactions"` }
GetInclusionStates struct
type GetInclusionStatesReturn ¶
type GetInclusionStatesReturn struct { States []bool `json:"states"` Duration int `json:"duration"` }
GetInclusionStatesReturn struct
type GetLedgerDiff ¶
type GetLedgerDiff struct { Command string `mapstructure:"command"` MilestoneIndex milestone.Index `mapstructure:"milestoneIndex"` }
GetLedgerDiff struct
type GetLedgerDiffExt ¶ added in v0.2.11
type GetLedgerDiffExt struct { Command string `mapstructure:"command"` MilestoneIndex milestone.Index `mapstructure:"milestoneIndex"` }
GetLedgerDiffExt struct
type GetLedgerDiffExtReturn ¶ added in v0.2.11
type GetLedgerDiffExtReturn 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"` }
GetLedgerDiffExtReturn struct
type GetLedgerDiffReturn ¶
type GetLedgerDiffReturn struct { Diff map[trinary.Hash]int64 `json:"diff"` MilestoneIndex milestone.Index `json:"milestoneIndex"` Duration int `json:"duration"` }
GetLedgerDiffReturn struct
type GetLedgerState ¶ added in v0.4.0
type GetLedgerState struct { Command string `mapstructure:"command"` TargetIndex milestone.Index `mapstructure:"targetIndex,omitempty"` }
GetLedgerState struct
type GetLedgerStateReturn ¶ added in v0.4.0
type GetLedgerStateReturn struct { Balances map[trinary.Hash]uint64 `json:"balances"` MilestoneIndex milestone.Index `json:"milestoneIndex"` Duration int `json:"duration"` }
GetLedgerStateReturn struct
type GetNeighbors ¶
type GetNeighbors struct {
Command string `mapstructure:"command"`
}
GetNeighbors struct
type GetNeighborsReturn ¶
type GetNeighborsReturn struct { Neighbors []*peer.Info `json:"neighbors"` Duration int `json:"duration"` }
GetNeighborsReturn struct
type GetNodeAPIConfiguration ¶
type GetNodeAPIConfiguration struct {
Command string `mapstructure:"command"`
}
GetNodeAPIConfiguration struct
type GetNodeAPIConfigurationReturn ¶
type GetNodeAPIConfigurationReturn struct { MaxFindTransactions int `json:"maxFindTransactions"` MaxRequestsList int `json:"maxRequestsList"` MaxGetTrytes int `json:"maxGetTrytes"` MaxBodyLength int `json:"maxBodyLength"` MilestoneStartIndex milestone.Index `json:"milestoneStartIndex"` Duration int `json:"duration"` }
GetNodeAPIConfigurationReturn struct
type GetNodeInfo ¶
type GetNodeInfo struct {
Command string `mapstructure:"command"`
}
GetNodeInfo struct
type GetNodeInfoReturn ¶
type GetNodeInfoReturn struct { AppName string `json:"appName"` AppVersion string `json:"appVersion"` NodeAlias string `json:"nodeAlias,omitempty"` 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"` }
GetNodeInfoReturn struct
type GetRequests ¶ added in v0.3.0
type GetRequests struct {
Command string `mapstructure:"command"`
}
GetRequests struct
type GetRequestsReturn ¶ added in v0.3.0
type GetRequestsReturn struct {
Requests []*DebugRequest `json:"requests"`
}
GetRequestsReturn struct
type GetTipInfo ¶ added in v0.5.0
type GetTipInfo struct { Command string `mapstructure:"command"` TailTransaction trinary.Hash `mapstructure:"tailTransaction"` }
GetTipInfo struct
type GetTipInfoReturn ¶ added in v0.5.0
type GetTipInfoReturn struct { Confirmed bool `json:"confirmed"` Conflicting bool `json:"conflicting"` ShouldPromote bool `json:"shouldPromote"` ShouldReattach bool `json:"shouldReattach"` Duration int `json:"duration"` }
GetTipInfoReturn struct
type GetTransactionsToApprove ¶
type GetTransactionsToApprove struct { Command string `mapstructure:"command"` Depth uint `mapstructure:"depth"` Reference trinary.Hash `mapstructure:"reference"` }
GetTransactionsToApprove struct
type GetTransactionsToApproveReturn ¶
type GetTransactionsToApproveReturn struct { TrunkTransaction trinary.Hash `json:"trunkTransaction"` BranchTransaction trinary.Hash `json:"branchTransaction"` Duration int `json:"duration"` }
GetTransactionsToApproveReturn struct
type GetTrytes ¶
type GetTrytes struct { Command string `mapstructure:"command"` Hashes []trinary.Hash `mapstructure:"hashes"` }
GetTrytes struct
type GetTrytesReturn ¶
type GetTrytesReturn struct { Trytes []trinary.Trytes `json:"trytes"` Duration int `json:"duration"` }
GetTrytesReturn struct
type Neighbor ¶
type Neighbor struct { Identity string `mapstructure:"identity"` Alias string `mapstructure:"alias"` PreferIPv6 bool `mapstructure:"prefer_ipv6"` }
Neighbor struct
type PruneDatabase ¶ added in v0.4.0
type PruneDatabase struct { Command string `mapstructure:"command"` TargetIndex milestone.Index `mapstructure:"targetIndex"` Depth milestone.Index `mapstructure:"depth"` }
PruneDatabase struct
type PruneDatabaseReturn ¶ added in v0.4.0
type PruneDatabaseReturn struct {
Duration int `json:"duration"`
}
PruneDatabaseReturn struct
type RemoveNeighbors ¶
type RemoveNeighbors struct { Command string `mapstructure:"removeNeighbors"` Uris []string `mapstructure:"uris"` }
RemoveNeighbors struct
type RemoveNeighborsReturn ¶
type RemoveNeighborsReturn struct { RemovedNeighbors uint `json:"removedNeighbors"` Duration int `json:"duration"` }
RemoveNeighborsReturn struct
type ResultReturn ¶ added in v0.5.1
type ResultReturn struct {
Message string `json:"message"`
}
ResultReturn struct
type SearchConfirmedApprover ¶ added in v0.4.0
type SearchConfirmedApprover struct { Command string `mapstructure:"command"` TxHash trinary.Hash `mapstructure:"txHash"` SearchMilestone bool `mapstructure:"searchMilestone"` }
SearchConfirmedApprover struct
type SearchConfirmedApproverReturn ¶ added in v0.4.0
type SearchConfirmedApproverReturn struct { ConfirmedTxHash trinary.Hash `json:"confirmedTxHash"` ConfirmedByMilestoneIndex milestone.Index `json:"confirmedByMilestoneIndex"` TanglePath []*ApproverStruct `json:"tanglePath"` TanglePathLength int `json:"tanglePathLength"` }
SearchConfirmedApproverReturn struct
type SearchEntryPoint ¶ added in v0.4.0
type SearchEntryPoint struct { Command string `mapstructure:"command"` TxHash trinary.Hash `mapstructure:"txHash"` }
SearchEntryPoint struct
type SearchEntryPointReturn ¶ added in v0.4.0
type SearchEntryPointReturn struct { TanglePath []*TransactionWithApprovers `json:"tanglePath"` EntryPoints []*EntryPoint `json:"entryPoints"` TanglePathLength int `json:"tanglePathLength"` }
SearchEntryPointReturn struct
type StoreTransactions ¶
type StoreTransactions struct { Command string `mapstructure:"command"` Trytes []trinary.Trytes `mapstructure:"trytes"` }
StoreTransactions struct
type TransactionWithApprovers ¶ added in v0.4.0
type TriggerSolidifier ¶ added in v0.4.0
type TriggerSolidifier struct {
Command string `mapstructure:"command"`
}
SearchConfirmedApprover struct
type TxHashWithValue ¶ added in v0.2.11
type TxHashWithValue struct { TxHash trinary.Hash `mapstructure:"txHash"` TailTxHash trinary.Hash `mapstructure:"tailTxHash"` BundleHash trinary.Hash `mapstructure:"bundleHash"` Address trinary.Hash `mapstructure:"address"` Value int64 `mapstructure:"value"` }
TxHashWithValue struct
type TxWithValue ¶ added in v0.2.11
type TxWithValue struct { TxHash trinary.Hash `mapstructure:"txHash"` Address trinary.Hash `mapstructure:"address"` Index uint64 `mapstructure:"index"` Value int64 `mapstructure:"value"` }
TxWithValue struct
type WereAddressesSpentFrom ¶
type WereAddressesSpentFrom struct { Command string `mapstructure:"wereAddressesSpentFrom"` Addresses []trinary.Hash `mapstructure:"addresses"` }
WereAddressesSpentFrom struct
type WereAddressesSpentFromReturn ¶
type WereAddressesSpentFromReturn struct { States []bool `json:"states"` Duration int `json:"duration"` }
WereAddressesSpentFromReturn struct