CatapultServer  v0.5.0.1 (Elephant)
catapult::api Namespace Reference

Classes

struct  BlockHashesRequest
 A block hashes request. More...
 
struct  BlocksFromOptions
 Options for a blocks-from request. More...
 
class  catapult_api_error
 Exception class that is thrown when a catapult api operation produces an error. More...
 
class  ChainApi
 An api for retrieving chain information from a node. More...
 
struct  ChainInfo
 Information about a chain. More...
 
struct  ChainInfoResponse
 A chain info response. More...
 
struct  HeightPacket
 A packet containing header information and a height. More...
 
struct  NetworkTimePacket
 A network time response. More...
 
struct  PullBlocksRequest
 A pull blocks request. More...
 
struct  RegistryDependentTraits
 
class  RemoteApi
 An api for retrieving information from a remote node. More...
 
class  RemoteChainApi
 An api for retrieving chain information from a remote node. More...
 
class  RemoteNodeApi
 An api for retrieving node information from a remote node. More...
 
class  RemotePtApi
 An api for retrieving partial transaction information from a remote node. More...
 
class  RemoteRequestDispatcher
 Dispatches requests to a remote node. More...
 
class  RemoteTimeSyncApi
 An api for retrieving communication timestamps from a remote node. More...
 
class  RemoteTransactionApi
 An api for retrieving transaction information from a remote node. More...
 

Typedefs

using PullBlockRequest = HeightPacket< ionet::PacketType::Pull_Block >
 A pull block request. More...
 

Functions

std::unique_ptr< RemoteNodeApiCreateRemoteNodeApi (ionet::PacketIo &io)
 Creates a node api for interacting with a remote node with the specified io. More...
 
CosignedTransactionInfos ExtractCosignedTransactionInfosFromPacket (const ionet::Packet &packet, const TransactionPredicate &isValid)
 
std::vector< model::CosignedTransactionInfoExtractCosignedTransactionInfosFromPacket (const ionet::Packet &packet, const predicate< const model::Transaction & > &isValid)
 
std::unique_ptr< RemotePtApiCreateRemotePtApi (ionet::PacketIo &io, const Key &remotePublicKey, const model::TransactionRegistry &registry)
 
std::unique_ptr< RemoteTimeSyncApiCreateRemoteTimeSyncApi (ionet::PacketIo &io)
 Creates a time sync api for interacting with a remote node with the specified io. More...
 
std::unique_ptr< ChainApiCreateLocalChainApi (const io::BlockStorageCache &storage, const model::ChainScoreSupplier &chainScoreSupplier)
 Creates a chain api around the specified storage and chain score supplier (chainScoreSupplier). More...
 
std::unique_ptr< ChainApiCreateRemoteChainApiWithoutRegistry (ionet::PacketIo &io)
 Creates a chain api for interacting with a remote node with the specified io. More...
 
std::unique_ptr< RemoteChainApiCreateRemoteChainApi (ionet::PacketIo &io, const Key &remotePublicKey, const model::TransactionRegistry &registry)
 
std::unique_ptr< RemoteTransactionApiCreateRemoteTransactionApi (ionet::PacketIo &io, const Key &remotePublicKey, const model::TransactionRegistry &registry)
 

Typedef Documentation

◆ PullBlockRequest

using catapult::api::PullBlockRequest = typedef HeightPacket<ionet::PacketType::Pull_Block>

A pull block request.

Function Documentation

◆ CreateLocalChainApi()

std::unique_ptr< ChainApi > catapult::api::CreateLocalChainApi ( const io::BlockStorageCache storage,
const model::ChainScoreSupplier chainScoreSupplier 
)

Creates a chain api around the specified storage and chain score supplier (chainScoreSupplier).

◆ CreateRemoteChainApi()

std::unique_ptr< RemoteChainApi > catapult::api::CreateRemoteChainApi ( ionet::PacketIo io,
const Key remotePublicKey,
const model::TransactionRegistry registry 
)

Creates a chain api for interacting with a remote node with the specified io with public key (remotePublicKey) and transaction registry composed of supported transactions.

◆ CreateRemoteChainApiWithoutRegistry()

std::unique_ptr< ChainApi > catapult::api::CreateRemoteChainApiWithoutRegistry ( ionet::PacketIo io)

Creates a chain api for interacting with a remote node with the specified io.

◆ CreateRemoteNodeApi()

std::unique_ptr< RemoteNodeApi > catapult::api::CreateRemoteNodeApi ( ionet::PacketIo io)

Creates a node api for interacting with a remote node with the specified io.

Here is the caller graph for this function:

◆ CreateRemotePtApi()

std::unique_ptr< RemotePtApi > catapult::api::CreateRemotePtApi ( ionet::PacketIo io,
const Key remotePublicKey,
const model::TransactionRegistry registry 
)

Creates a partial transaction api for interacting with a remote node with the specified io with public key (remotePublicKey) and transaction registry composed of supported transactions.

◆ CreateRemoteTimeSyncApi()

std::unique_ptr< RemoteTimeSyncApi > catapult::api::CreateRemoteTimeSyncApi ( ionet::PacketIo io)

Creates a time sync api for interacting with a remote node with the specified io.

Here is the caller graph for this function:

◆ CreateRemoteTransactionApi()

std::unique_ptr< RemoteTransactionApi > catapult::api::CreateRemoteTransactionApi ( ionet::PacketIo io,
const Key remotePublicKey,
const model::TransactionRegistry registry 
)

Creates a transaction api for interacting with a remote node with the specified io with public key (remotePublicKey) and transaction registry composed of supported transactions.

◆ ExtractCosignedTransactionInfosFromPacket() [1/2]

std::vector<model::CosignedTransactionInfo> catapult::api::ExtractCosignedTransactionInfosFromPacket ( const ionet::Packet packet,
const predicate< const model::Transaction & > &  isValid 
)

Extracts cosigned transaction infos from packet with a validity check (isValid).

Note
If the packet is invalid and/or contains partial infos, the returned vector will be empty.

◆ ExtractCosignedTransactionInfosFromPacket() [2/2]

CosignedTransactionInfos catapult::api::ExtractCosignedTransactionInfosFromPacket ( const ionet::Packet packet,
const TransactionPredicate &  isValid 
)