substrate_stellar_sdk/xdr/impls/operations/
claim_claimable_balance.rs1use crate::{
2 types::{ClaimClaimableBalanceOp, OperationBody},
3 IntoClaimbleBalanceId, Operation, StellarSdkError,
4};
5
6impl Operation {
7 pub fn new_claim_claimable_balance<T: IntoClaimbleBalanceId>(balance_id: T) -> Result<Operation, StellarSdkError> {
8 let balance_id = balance_id.into_claimable_balance_id()?;
9
10 Ok(Operation {
11 source_account: None,
12 body: OperationBody::ClaimClaimableBalance(ClaimClaimableBalanceOp { balance_id }),
13 })
14 }
15}