substrate_stellar_sdk/xdr/impls/claimant.rs
1use crate::{types::ClaimantV0, ClaimPredicate, Claimant, IntoAccountId, StellarSdkError};
2
3impl Claimant {
4 pub fn new<T: IntoAccountId>(destination: T, predicate: ClaimPredicate) -> Result<Self, StellarSdkError> {
5 Ok(Claimant::ClaimantTypeV0(ClaimantV0 { destination: destination.into_account_id()?, predicate }))
6 }
7}