lit_node_core/models/
payment_delegation_resource.rs1use super::{LitAbility, LitResourceAbility, ResourceType};
2
3#[derive(Clone, Debug, Default)]
4pub struct PaymentDelegationResource {
5 token_id: String,
6}
7
8impl PaymentDelegationResource {
9 pub fn new(token_id: String) -> PaymentDelegationResource {
10 PaymentDelegationResource { token_id }
11 }
12
13 pub fn get_resource_id(&self) -> &String {
14 &self.token_id
15 }
16
17 pub fn signing_ability(&self) -> LitResourceAbility {
18 LitResourceAbility {
19 resource: ResourceType::PaymentDelegation(self.clone()),
20 ability: LitAbility::PaymentDelegationAuth,
21 }
22 }
23}