nado-sdk 0.3.4

Official Rust SDK for the Nado Protocol API
Documentation
use eyre::Result;

use crate::indexer;
use crate::indexer::NlpFundingPaymentsResponse;
use crate::serialize_utils::WrappedU32;
use crate::utils::client_error::none_error;

use crate::core::indexer::NadoIndexer;
use crate::utils::wrapped_option_utils::wrapped_option_u64;
use crate::{build_and_call, fields_to_vars, nado_builder};

nado_builder!(
    NlpFundingPaymentsBuilder,
    NadoIndexer,
    max_idx: u64,
    max_time: u64,
    limit: u32;

    build_and_call!(self, query, get_nlp_funding_payments => NlpFundingPaymentsResponse);

    pub fn build(&self) -> Result<indexer::Query> {
        fields_to_vars!(self, limit);
        Ok(indexer::Query::NlpFundingPayments {
            max_idx: wrapped_option_u64(self.max_idx),
            max_time: wrapped_option_u64(self.max_time),
            limit: WrappedU32(limit),
        })
    }
);