pub struct ConfidentialAssetsCallApi<'api> { /* private fields */ }Implementations§
Source§impl<'api> ConfidentialAssetsCallApi<'api>
impl<'api> ConfidentialAssetsCallApi<'api>
Sourcepub fn register_accounts(
&self,
proof: AccountRegistrationProof,
) -> Result<WrappedCall>
pub fn register_accounts( &self, proof: AccountRegistrationProof, ) -> Result<WrappedCall>
Sourcepub fn register_encryption_keys(
&self,
proof: EncryptionKeyRegistrationProof,
) -> Result<WrappedCall>
pub fn register_encryption_keys( &self, proof: EncryptionKeyRegistrationProof, ) -> Result<WrappedCall>
Register encryption keys for auditors/mediators.
§Arguments
origin- The origin of the call.proof- The auditor/mediator encryption registration proof.
§Errors
BadOriginiforiginisn’t signed.EncryptionKeyAlreadyRegisteredif the encryption key is already registered.InvalidProofif the proof is invalid.
Sourcepub fn create_asset(
&self,
name: Name,
symbol: Symbol,
decimals: u8,
mediators: BTreeMap<AccountPublicKey, EncryptionPublicKey>,
auditors: BTreeSet<EncryptionPublicKey>,
data: Vec<u8>,
) -> Result<WrappedCall>
pub fn create_asset( &self, name: Name, symbol: Symbol, decimals: u8, mediators: BTreeMap<AccountPublicKey, EncryptionPublicKey>, auditors: BTreeSet<EncryptionPublicKey>, data: Vec<u8>, ) -> Result<WrappedCall>
Sourcepub fn register_account_assets(
&self,
proof: BatchedAccountAssetRegistrationProof,
) -> Result<WrappedCall>
pub fn register_account_assets( &self, proof: BatchedAccountAssetRegistrationProof, ) -> Result<WrappedCall>
Batch register multiple accounts and assets.
This is used to initialize the first account state commitment of the Confidential asset for the Confidential account.
§Arguments
origin- The origin of the call. They must be the owner of the Confidential account.proof- The Batched Account asset registration proof.
§Errors
BadOriginiforiginisn’t signed.AccountMissingif the Confidential account is not registered.AssetMissingif the Confidential asset is not registered.AccountAssetAlreadyRegisteredif the Confidential account has already registered the Confidential asset.NotAccountOwnerif the caller is not the owner of the Confidential account.InvalidProofif the proof is invalid.
Sourcepub fn mint_asset(&self, proof: AssetMintingProof) -> Result<WrappedCall>
pub fn mint_asset(&self, proof: AssetMintingProof) -> Result<WrappedCall>
Mint a Confidential asset.
§Arguments
origin- The origin of the call. They must be the owner of the Confidential asset and Confidential account.proof- The minting proof.
§Errors
BadOriginiforiginisn’t signed.AccountMissingif the Confidential account is not registered.AssetMissingif the Confidential asset is not registered.NotAccountOwnerif the caller is not the owner of the Confidential account.InvalidProofif the proof is invalid.NotAssetOwnerif the caller is not the owner of the Confidential asset.MaxTotalSupplyExceededif the total supply of the Confidential asset exceeds the maximum total supply.NullifierAlreadyUsedif the nullifier for the account state commitment has already been used.
Sourcepub fn create_settlement(&self, proof: SettlementProof) -> Result<WrappedCall>
pub fn create_settlement(&self, proof: SettlementProof) -> Result<WrappedCall>
Create a new settlement.
§Arguments
origin- The origin of the call.proof- The settlement proof.
§Errors
BadOriginiforiginisn’t signed.InvalidProofif the proof is invalid.SettlementMissingLegsif the settlement has no legs.SettlementTooManyLegsif the settlement has more legs than the maximum allowed.
Sourcepub fn sender_affirmation(
&self,
proof: SenderAffirmationProof,
) -> Result<WrappedCall>
pub fn sender_affirmation( &self, proof: SenderAffirmationProof, ) -> Result<WrappedCall>
Sender affirms a settlement leg.
§Arguments
origin- The origin of the call.proof- The sender affirmation proof.
§Errors
BadOriginiforiginisn’t signed.SettlementNotPendingif the settlement is not pending.SettlementNotFoundif the settlement is not found.LegNotFoundif the leg is not found in the settlement.AlreadyAffirmedif the leg has already been affirmed by the sender.
Sourcepub fn receiver_affirmation(
&self,
proof: ReceiverAffirmationProof,
) -> Result<WrappedCall>
pub fn receiver_affirmation( &self, proof: ReceiverAffirmationProof, ) -> Result<WrappedCall>
Receiver affirms a settlement leg.
§Arguments
origin- The origin of the call.proof- The receiver affirmation proof.
§Errors
BadOriginiforiginisn’t signed.SettlementNotPendingif the settlement is not pending.SettlementNotFoundif the settlement is not found.LegNotFoundif the leg is not found in the settlement.AlreadyAffirmedif the leg has already been affirmed by the receiver.
Sourcepub fn mediator_affirmation(
&self,
proof: MediatorAffirmationProof,
) -> Result<WrappedCall>
pub fn mediator_affirmation( &self, proof: MediatorAffirmationProof, ) -> Result<WrappedCall>
Mediator affirms a settlement leg.
§Arguments
origin- The origin of the call.proof- The mediator affirmation proof.
§Errors
BadOriginiforiginisn’t signed.SettlementNotPendingif the settlement is not pending.SettlementNotFoundif the settlement is not found.LegNotFoundif the leg is not found in the settlement.AlreadyAffirmedif the leg has already been affirmed by the mediator.WrongMediatorIdif the mediator ID does not match the expected mediator for the leg.
Sourcepub fn sender_update_counter(
&self,
proof: SenderCounterUpdateProof,
) -> Result<WrappedCall>
pub fn sender_update_counter( &self, proof: SenderCounterUpdateProof, ) -> Result<WrappedCall>
Sender updates their counter after a settlement has been executed.
§Arguments
origin- The origin of the call.proof- The sender update proof.
§Errors
BadOriginiforiginisn’t signed.SettlementNotExecutedif the settlement has not been executed.SettlementNotFoundif the settlement is not found.LegNotFoundif the leg is not found in the settlement.
Sourcepub fn sender_revert_affirmation(
&self,
proof: SenderRevertAffirmationProof,
) -> Result<WrappedCall>
pub fn sender_revert_affirmation( &self, proof: SenderRevertAffirmationProof, ) -> Result<WrappedCall>
Sender reverts their affirmation.
§Arguments
origin- The origin of the call.proof- The sender revert affirmation proof.
§Errors
BadOriginiforiginisn’t signed.SettlementAlreadyExecutedif the settlement has already been executed.SettlementNotFoundif the settlement is not found.LegNotFoundif the leg is not found in the settlement.
Sourcepub fn receiver_revert_affirmation(
&self,
proof: ReceiverRevertAffirmationProof,
) -> Result<WrappedCall>
pub fn receiver_revert_affirmation( &self, proof: ReceiverRevertAffirmationProof, ) -> Result<WrappedCall>
Receiver reverts their affirmation.
§Arguments
origin- The origin of the call.proof- The receiver revert affirmation proof.
§Errors
BadOriginiforiginisn’t signed.SettlementAlreadyExecutedif the settlement has already been executed.SettlementNotFoundif the settlement is not found.LegNotFoundif the leg is not found in the settlement.
Sourcepub fn receiver_claim(&self, proof: ReceiverClaimProof) -> Result<WrappedCall>
pub fn receiver_claim(&self, proof: ReceiverClaimProof) -> Result<WrappedCall>
Receiver claims their assets after a settlement has been executed.
§Arguments
origin- The origin of the call.proof- The receiver claim proof.
§Errors
BadOriginiforiginisn’t signed.SettlementNotExecutedif the settlement has not been executed.SettlementNotFoundif the settlement is not found.LegNotFoundif the leg is not found in the settlement.
Sourcepub fn batched_settlement(
&self,
proof: BatchedSettlementProof<AssetTreeConfig, AccountTreeConfig>,
) -> Result<WrappedCall>
pub fn batched_settlement( &self, proof: BatchedSettlementProof<AssetTreeConfig, AccountTreeConfig>, ) -> Result<WrappedCall>
Create a settlement with batched leg affirmations.
§Arguments
origin- The origin of the call.proof- The settlement proof with batched leg affirmations.
§Errors
BadOriginiforiginisn’t signed.InvalidProofif the proof is invalid.SettlementMissingLegsif the settlement has no legs.SettlementTooManyLegsif the settlement has more legs than the maximum allowed.
Sourcepub fn register_fee_accounts(
&self,
proof: BatchedFeeAccountRegistrationProof,
) -> Result<WrappedCall>
pub fn register_fee_accounts( &self, proof: BatchedFeeAccountRegistrationProof, ) -> Result<WrappedCall>
Batch register multiple fee accounts.
This is used to register fee accounts for Confidential private fee payments.
§Arguments
origin- The origin of the call.proof- The batched fee account registration proof.
§Errors
BadOriginiforiginisn’t signed.FeeAccountAlreadyRegisteredif the fee account or encryption key is already registered.NullifierAlreadyUsedif the nullifier for the fee account state commitment has already been used.InvalidFeeAssetIdif the fee asset ID is invalid.InvalidProofif the proof is invalid.InsufficientBalanceif the caller has insufficient balance to pay the deposit.
Sourcepub fn topup_fee_accounts(
&self,
proof: BatchedFeeAccountTopupProof,
) -> Result<WrappedCall>
pub fn topup_fee_accounts( &self, proof: BatchedFeeAccountTopupProof, ) -> Result<WrappedCall>
Toup a batch of fee accounts.
§Arguments
origin- The origin of the call.proof- The batched fee account topup proof.
§Errors
BadOriginiforiginisn’t signed.FeeAccountMissingif the fee account is not registered.InvalidFeeAssetIdif the fee asset ID is invalid.InvalidProofif the proof is invalid.InsufficientBalanceif the caller has insufficient balance to pay the deposit.
Sourcepub fn submit_batched_proofs(&self, proof: BatchedProofs) -> Result<WrappedCall>
pub fn submit_batched_proofs(&self, proof: BatchedProofs) -> Result<WrappedCall>
Sourcepub fn relayer_submit_batched_proofs(
&self,
proof: FeePaymentWithBatchedProofs,
) -> Result<WrappedCall>
pub fn relayer_submit_batched_proofs( &self, proof: FeePaymentWithBatchedProofs, ) -> Result<WrappedCall>
Relayer submit a batch of proofs paid using a private fee payment.
Users can use a Relayer service to submit their Confidential proofs for privacy (i.e., the origin is not the user). The Relayer is paid/reimbursed using a private fee payment from the user’s Confidential fee account.
Relayers can charge a commission fee on top of the transaction fee (i.e. commission fee + transaction fee = fee amount).
Relayers should verify that the fee payment proof is valid before submitting the batched Confidential proofs. They are not required to verify the batched Confidential proofs. If the user’s Confidential proofs are invalid, the user is still responsible for paying the fee to the relayer.
§Arguments
origin- The origin of the call. This is the relayer.proof- The fee payment proof and batched Confidential proofs.
§Errors
BadOriginiforiginisn’t signed.InvalidFeePaymentProofif the fee payment proof is invalid.InsufficientFeePaymentif the fee payment is insufficient to cover the relayer fee.
Sourcepub fn execute_instant_settlement(
&self,
proof: InstantSettlementProof<AssetTreeConfig, AccountTreeConfig>,
) -> Result<WrappedCall>
pub fn execute_instant_settlement( &self, proof: InstantSettlementProof<AssetTreeConfig, AccountTreeConfig>, ) -> Result<WrappedCall>
Create and execute an instant settlement.
§Arguments
origin- The origin of the call.proof- The settlement proof with batched leg affirmations.
§Errors
BadOriginiforiginisn’t signed.InvalidProofif the proof is invalid.SettlementMissingLegsif the settlement has no legs.SettlementTooManyLegsif the settlement has more legs than the maximum allowed.
Sourcepub fn instant_sender_affirmation(
&self,
proof: InstantSenderAffirmationProof,
) -> Result<WrappedCall>
pub fn instant_sender_affirmation( &self, proof: InstantSenderAffirmationProof, ) -> Result<WrappedCall>
Sender affirms a settlement leg as the last pending affirmation.
This can only be used when the sender affirmation is the last pending affirmation for the settlement.
§Arguments
origin- The origin of the call.proof- The instant sender affirmation proof.
§Errors
BadOriginiforiginisn’t signed.SettlementNotPendingif the settlement is not pending.SettlementNotFoundif the settlement is not found.LegNotFoundif the leg is not found in the settlement.AlreadyAffirmedif the leg has already been affirmed by the sender.NotLastPendingAffirmationif the sender affirmation is not the last pending affirmation for the settlement.
Sourcepub fn instant_receiver_affirmation(
&self,
proof: InstantReceiverAffirmationProof,
) -> Result<WrappedCall>
pub fn instant_receiver_affirmation( &self, proof: InstantReceiverAffirmationProof, ) -> Result<WrappedCall>
Receiver affirms a settlement leg as the last pending affirmation.
This can only be used when the receiver affirmation is the last pending affirmation for the settlement.
§Arguments
origin- The origin of the call.proof- The instant receiver affirmation proof.
§Errors
BadOriginiforiginisn’t signed.SettlementNotPendingif the settlement is not pending.SettlementNotFoundif the settlement is not found.LegNotFoundif the leg is not found in the settlement.AlreadyAffirmedif the leg has already been affirmed by the receiver.NotLastPendingAffirmationif the receiver affirmation is not the last pending affirmation for the settlement.
Trait Implementations§
Source§impl<'api> Clone for ConfidentialAssetsCallApi<'api>
impl<'api> Clone for ConfidentialAssetsCallApi<'api>
Source§fn clone(&self) -> ConfidentialAssetsCallApi<'api>
fn clone(&self) -> ConfidentialAssetsCallApi<'api>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl<'api> Freeze for ConfidentialAssetsCallApi<'api>
impl<'api> !RefUnwindSafe for ConfidentialAssetsCallApi<'api>
impl<'api> Send for ConfidentialAssetsCallApi<'api>
impl<'api> Sync for ConfidentialAssetsCallApi<'api>
impl<'api> Unpin for ConfidentialAssetsCallApi<'api>
impl<'api> UnsafeUnpin for ConfidentialAssetsCallApi<'api>
impl<'api> !UnwindSafe for ConfidentialAssetsCallApi<'api>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CheckedConversion for T
impl<T> CheckedConversion for T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<Src, Dest> IntoTuple<Dest> for Srcwhere
Dest: FromTuple<Src>,
impl<Src, Dest> IntoTuple<Dest> for Srcwhere
Dest: FromTuple<Src>,
fn into_tuple(self) -> Dest
Source§impl<T, Outer> IsWrappedBy<Outer> for T
impl<T, Outer> IsWrappedBy<Outer> for T
Source§impl<T> SaturatedConversion for T
impl<T> SaturatedConversion for T
Source§fn saturated_from<T>(t: T) -> Selfwhere
Self: UniqueSaturatedFrom<T>,
fn saturated_from<T>(t: T) -> Selfwhere
Self: UniqueSaturatedFrom<T>,
Source§fn saturated_into<T>(self) -> Twhere
Self: UniqueSaturatedInto<T>,
fn saturated_into<T>(self) -> Twhere
Self: UniqueSaturatedInto<T>,
T. Read moreSource§impl<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
impl<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
Source§fn unchecked_into(self) -> T
fn unchecked_into(self) -> T
unchecked_from.Source§impl<T, S> UniqueSaturatedInto<T> for S
impl<T, S> UniqueSaturatedInto<T> for S
Source§fn unique_saturated_into(self) -> T
fn unique_saturated_into(self) -> T
T.