multiversx_sdk::gateway

Trait GatewayRequest

Source
pub trait GatewayRequest {
    type Payload: Serialize + ?Sized;
    type DecodedJson: DeserializeOwned;
    type Result;

    // Required methods
    fn request_type(&self) -> GatewayRequestType;
    fn get_endpoint(&self) -> String;
    fn process_json(&self, decoded: Self::DecodedJson) -> Result<Self::Result>;

    // Provided method
    fn get_payload(&self) -> Option<&Self::Payload> { ... }
}
Expand description

Models requests to the gateway.

Required Associated Types§

Required Methods§

Provided Methods§

Source

fn get_payload(&self) -> Option<&Self::Payload>

Implementors§

Source§

impl GatewayRequest for ChainSimulatorGenerateBlocksRequest

Source§

type Payload = ()

Source§

type DecodedJson = GenerateBlocksResponse

Source§

type Result = String

Source§

impl GatewayRequest for ChainSimulatorSendFundsRequest

Source§

type Payload = HashMap<&'static str, String>

Source§

type DecodedJson = GenerateBlocksResponse

Source§

type Result = String

Source§

impl GatewayRequest for ChainSimulatorSetStateRequest

Source§

impl GatewayRequest for GetAccountEsdtRolesRequest<'_>

Source§

impl GatewayRequest for GetAccountEsdtTokensRequest<'_>

Source§

impl GatewayRequest for GetAccountRequest<'_>

Source§

impl GatewayRequest for GetAccountStorageRequest<'_>

Source§

impl GatewayRequest for GetHyperBlockRequest

Source§

impl GatewayRequest for GetTxCost<'_>

Source§

impl GatewayRequest for GetTxInfo<'_>

Source§

impl GatewayRequest for GetTxProcessStatus<'_>

Source§

impl GatewayRequest for GetTxStatus<'_>

Source§

impl GatewayRequest for NetworkConfigRequest

Source§

impl GatewayRequest for NetworkEconimicsRequest

Source§

impl GatewayRequest for NetworkStatusRequest

Source§

impl GatewayRequest for SendMultiTxRequest<'_>

Source§

impl GatewayRequest for SendTxRequest<'_>

Source§

impl GatewayRequest for VMQueryRequest<'_>