substrate_stellar_sdk/xdr/impls/operations/
begin_sponsoring_future_reserves.rs

1use crate::{
2    types::{BeginSponsoringFutureReservesOp, OperationBody},
3    IntoAccountId, Operation, StellarSdkError,
4};
5
6impl Operation {
7    pub fn new_begin_sponsoring_future_reserves<T: IntoAccountId>(
8        sponsored_account_id: T,
9    ) -> Result<Operation, StellarSdkError> {
10        Ok(Operation {
11            source_account: None,
12            body: OperationBody::BeginSponsoringFutureReserves(BeginSponsoringFutureReservesOp {
13                sponsored_id: sponsored_account_id.into_account_id()?,
14            }),
15        })
16    }
17}