Struct polymesh_api::polymesh::api::external_agents::CallApi
source · [−]pub struct CallApi<'api> { /* private fields */ }Implementations
sourceimpl<'api> CallApi<'api>
impl<'api> CallApi<'api>
sourcepub fn create_group(
&self,
ticker: Ticker,
perms: SubsetRestriction<PalletPermissions>
) -> Result<WrappedCall<'api>>
pub fn create_group(
&self,
ticker: Ticker,
perms: SubsetRestriction<PalletPermissions>
) -> Result<WrappedCall<'api>>
Creates a custom agent group (AG) for the given ticker.
The AG will have the permissions as given by perms.
This new AG is then assigned id = AGIdSequence::get() + 1 as its AGId,
which you can use as AgentGroup::Custom(id) when adding agents for ticker.
Arguments
tickerto add the custom group for.permsthat the new AG will have.
Errors
UnauthorizedAgentiforiginwas not authorized as an agent to call this.TooLongifpermshad some string or list length that was too long.CounterOverflowifAGIdSequence::get() + 1would exceedu32::MAX.
Permissions
- Asset
- Agent
sourcepub fn set_group_permissions(
&self,
ticker: Ticker,
id: AGId,
perms: SubsetRestriction<PalletPermissions>
) -> Result<WrappedCall<'api>>
pub fn set_group_permissions(
&self,
ticker: Ticker,
id: AGId,
perms: SubsetRestriction<PalletPermissions>
) -> Result<WrappedCall<'api>>
Updates the permissions of the custom AG identified by id, for the given ticker.
Arguments
tickerthe custom AG belongs to.idfor the custom AG withinticker.permsto update the custom AG to.
Errors
UnauthorizedAgentiforiginwas not authorized as an agent to call this.TooLongifpermshad some string or list length that was too long.NoSuchAGifiddoes not identify a custom AG.
Permissions
- Asset
- Agent
sourcepub fn remove_agent(
&self,
ticker: Ticker,
agent: IdentityId
) -> Result<WrappedCall<'api>>
pub fn remove_agent(
&self,
ticker: Ticker,
agent: IdentityId
) -> Result<WrappedCall<'api>>
Remove the given agent from ticker.
Arguments
tickerthat has theagentto remove.agentoftickerto remove.
Errors
UnauthorizedAgentiforiginwas not authorized as an agent to call this.NotAnAgentifagentis not an agent ofticker.RemovingLastFullAgentifagentis the last full one.
Permissions
- Asset
- Agent
sourcepub fn abdicate(&self, ticker: Ticker) -> Result<WrappedCall<'api>>
pub fn abdicate(&self, ticker: Ticker) -> Result<WrappedCall<'api>>
Abdicate agentship for ticker.
Arguments
tickerof which the caller is an agent.
Errors
NotAnAgentif the caller is not an agent ofticker.RemovingLastFullAgentif the caller is the last full agent.
Permissions
- Asset
sourcepub fn change_group(
&self,
ticker: Ticker,
agent: IdentityId,
group: AgentGroup
) -> Result<WrappedCall<'api>>
pub fn change_group(
&self,
ticker: Ticker,
agent: IdentityId,
group: AgentGroup
) -> Result<WrappedCall<'api>>
Change the agent group that agent belongs to in ticker.
Arguments
tickerthat has theagent.agentoftickerto change the group for.groupthatagentwill belong to inticker.
Errors
UnauthorizedAgentiforiginwas not authorized as an agent to call this.NoSuchAGifiddoes not identify a custom AG.NotAnAgentifagentis not an agent ofticker.RemovingLastFullAgentifagentwas aFullone and is being demoted.
Permissions
- Asset
- Agent
sourcepub fn accept_become_agent(&self, auth_id: u64) -> Result<WrappedCall<'api>>
pub fn accept_become_agent(&self, auth_id: u64) -> Result<WrappedCall<'api>>
Accept an authorization by an agent “Alice” who issued auth_id
to also become an agent of the ticker Alice specified.
Arguments
auth_ididentifying the authorization to accept.
Errors
AuthorizationError::Invalidifauth_iddoes not exist for the given caller.AuthorizationError::Expiredifauth_idis for an auth that has expired.AuthorizationError::BadTypeifauth_idwas not for aBecomeAgentauth type.UnauthorizedAgentif “Alice” is not permissioned to provide the auth.NoSuchAGif the group referred to a custom that does not exist.AlreadyAnAgentif the caller is already an agent of the ticker.
Permissions
- Agent
sourcepub fn create_group_and_add_auth(
&self,
ticker: Ticker,
perms: SubsetRestriction<PalletPermissions>,
target: IdentityId,
expiry: Option<u64>
) -> Result<WrappedCall<'api>>
pub fn create_group_and_add_auth(
&self,
ticker: Ticker,
perms: SubsetRestriction<PalletPermissions>,
target: IdentityId,
expiry: Option<u64>
) -> Result<WrappedCall<'api>>
sourcepub fn create_and_change_custom_group(
&self,
ticker: Ticker,
perms: SubsetRestriction<PalletPermissions>,
agent: IdentityId
) -> Result<WrappedCall<'api>>
pub fn create_and_change_custom_group(
&self,
ticker: Ticker,
perms: SubsetRestriction<PalletPermissions>,
agent: IdentityId
) -> Result<WrappedCall<'api>>
Utility extrinsic to batch create_group and change_group for custom groups only.
Permissions
- Asset
- Agent
Trait Implementations
Auto Trait Implementations
impl<'api> !RefUnwindSafe for CallApi<'api>
impl<'api> Send for CallApi<'api>
impl<'api> Sync for CallApi<'api>
impl<'api> Unpin for CallApi<'api>
impl<'api> !UnwindSafe for CallApi<'api>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> CheckedConversion for T
impl<T> CheckedConversion for T
fn checked_from<T>(t: T) -> Option<Self> where
Self: TryFrom<T>,
fn checked_from<T>(t: T) -> Option<Self> where
Self: TryFrom<T>,
Convert from a value of T into an equivalent instance of Option<Self>. Read more
fn checked_into<T>(self) -> Option<T> where
Self: TryInto<T>,
fn checked_into<T>(self) -> Option<T> where
Self: TryInto<T>,
Consume self to return Some equivalent value of Option<T>. Read more
impl<T> Downcast for T where
T: Any,
impl<T> Downcast for T where
T: Any,
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>ⓘNotable traits for Box<R, Global>impl<R> Read for Box<R, Global> where
R: Read + ?Sized, impl<W> Write for Box<W, Global> where
W: Write + ?Sized, impl<F, A> Future for Box<F, A> where
F: Future + Unpin + ?Sized,
A: Allocator + 'static, type Output = <F as Future>::Output;impl<I, A> Iterator for Box<I, A> where
I: Iterator + ?Sized,
A: Allocator, type Item = <I as Iterator>::Item;
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>ⓘNotable traits for Box<R, Global>impl<R> Read for Box<R, Global> where
R: Read + ?Sized, impl<W> Write for Box<W, Global> where
W: Write + ?Sized, impl<F, A> Future for Box<F, A> where
F: Future + Unpin + ?Sized,
A: Allocator + 'static, type Output = <F as Future>::Output;impl<I, A> Iterator for Box<I, A> where
I: Iterator + ?Sized,
A: Allocator, type Item = <I as Iterator>::Item;
R: Read + ?Sized, impl<W> Write for Box<W, Global> where
W: Write + ?Sized, impl<F, A> Future for Box<F, A> where
F: Future + Unpin + ?Sized,
A: Allocator + 'static, type Output = <F as Future>::Output;impl<I, A> Iterator for Box<I, A> where
I: Iterator + ?Sized,
A: Allocator, type Item = <I as Iterator>::Item;
Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait. Read more
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait. Read more
fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s. Read more
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> SaturatedConversion for T
impl<T> SaturatedConversion for T
sourcefn saturated_from<T>(t: T) -> Self where
Self: UniqueSaturatedFrom<T>,
fn saturated_from<T>(t: T) -> Self where
Self: UniqueSaturatedFrom<T>,
Convert from a value of T into an equivalent instance of Self. Read more
sourcefn saturated_into<T>(self) -> T where
Self: UniqueSaturatedInto<T>,
fn saturated_into<T>(self) -> T where
Self: UniqueSaturatedInto<T>,
Consume self to return an equivalent value of T. Read more
impl<S, T> UncheckedInto<T> for S where
T: UncheckedFrom<S>,
impl<S, T> UncheckedInto<T> for S where
T: UncheckedFrom<S>,
fn unchecked_into(self) -> T
fn unchecked_into(self) -> T
The counterpart to unchecked_from.
sourceimpl<T, S> UniqueSaturatedInto<T> for S where
T: Bounded,
S: TryInto<T>,
impl<T, S> UniqueSaturatedInto<T> for S where
T: Bounded,
S: TryInto<T>,
sourcefn unique_saturated_into(self) -> T
fn unique_saturated_into(self) -> T
Consume self to return an equivalent value of T.
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more