pub fn create_sponsored_account_with_delegation<T: Config>(
delegator_key: T::AccountId,
proof: MultiSignature,
add_provider_payload: AddProvider
)
Expand description
Origin
MSA creates an MSA on behalf of delegator_key
, creates a Delegation with the delegator_key
’s MSA as the Delegator and origin
as Provider
. Deposits events MsaCreated
and DelegationGranted
.
Remarks
- Origin MUST be the provider
- Signatures should be over the
AddProvider
struct
Events
Errors
Error::UnauthorizedProvider
- payload’s MSA does not match given provider MSA.Error::InvalidSignature
-proof
verification fails;delegator_key
must have signedadd_provider_payload
Error::NoKeyExists
- there is no MSA fororigin
.Error::KeyAlreadyRegistered
- there is already an MSA fordelegator_key
.Error::ProviderNotRegistered
- the a non-provider MSA is used as the providerError::ProofNotYetValid
-add_provider_payload
expiration is too far in the futureError::ProofHasExpired
-add_provider_payload
expiration is in the pastError::SignatureAlreadySubmitted
- signature has already been used
Warning: Doc-Only
This function is an automatically generated, and is doc-only, uncallable
stub. See the real version in
Pallet::create_sponsored_account_with_delegation
.