DocumentsBatchTransitionMethodsV0

Trait DocumentsBatchTransitionMethodsV0 

Source
pub trait DocumentsBatchTransitionMethodsV0: DocumentsBatchTransitionAccessorsV0 {
    // Required methods
    fn new_document_creation_transition_from_document<S: Signer<IdentityPublicKey>>(
        document: Document,
        document_type: DocumentTypeRef<'_>,
        entropy: [u8; 32],
        identity_public_key: &IdentityPublicKey,
        identity_contract_nonce: IdentityNonce,
        user_fee_increase: UserFeeIncrease,
        token_payment_info: Option<TokenPaymentInfo>,
        signer: &S,
        platform_version: &PlatformVersion,
        options: Option<StateTransitionCreationOptions>,
    ) -> Result<StateTransition, ProtocolError>;
    fn new_document_replacement_transition_from_document<S: Signer<IdentityPublicKey>>(
        document: Document,
        document_type: DocumentTypeRef<'_>,
        identity_public_key: &IdentityPublicKey,
        identity_contract_nonce: IdentityNonce,
        user_fee_increase: UserFeeIncrease,
        token_payment_info: Option<TokenPaymentInfo>,
        signer: &S,
        platform_version: &PlatformVersion,
        options: Option<StateTransitionCreationOptions>,
    ) -> Result<StateTransition, ProtocolError>;
    fn new_document_deletion_transition_from_document<S: Signer<IdentityPublicKey>>(
        document: Document,
        document_type: DocumentTypeRef<'_>,
        identity_public_key: &IdentityPublicKey,
        identity_contract_nonce: IdentityNonce,
        user_fee_increase: UserFeeIncrease,
        token_payment_info: Option<TokenPaymentInfo>,
        signer: &S,
        platform_version: &PlatformVersion,
        options: Option<StateTransitionCreationOptions>,
    ) -> Result<StateTransition, ProtocolError>;
    fn new_document_transfer_transition_from_document<S: Signer<IdentityPublicKey>>(
        document: Document,
        document_type: DocumentTypeRef<'_>,
        recipient_owner_id: Identifier,
        identity_public_key: &IdentityPublicKey,
        identity_contract_nonce: IdentityNonce,
        user_fee_increase: UserFeeIncrease,
        token_payment_info: Option<TokenPaymentInfo>,
        signer: &S,
        platform_version: &PlatformVersion,
        options: Option<StateTransitionCreationOptions>,
    ) -> Result<StateTransition, ProtocolError>;
    fn new_document_update_price_transition_from_document<S: Signer<IdentityPublicKey>>(
        document: Document,
        document_type: DocumentTypeRef<'_>,
        price: Credits,
        identity_public_key: &IdentityPublicKey,
        identity_contract_nonce: IdentityNonce,
        user_fee_increase: UserFeeIncrease,
        token_payment_info: Option<TokenPaymentInfo>,
        signer: &S,
        platform_version: &PlatformVersion,
        options: Option<StateTransitionCreationOptions>,
    ) -> Result<StateTransition, ProtocolError>;
    fn new_document_purchase_transition_from_document<S: Signer<IdentityPublicKey>>(
        document: Document,
        document_type: DocumentTypeRef<'_>,
        new_owner_id: Identifier,
        price: Credits,
        identity_public_key: &IdentityPublicKey,
        identity_contract_nonce: IdentityNonce,
        user_fee_increase: UserFeeIncrease,
        token_payment_info: Option<TokenPaymentInfo>,
        signer: &S,
        platform_version: &PlatformVersion,
        options: Option<StateTransitionCreationOptions>,
    ) -> Result<StateTransition, ProtocolError>;
    fn set_transitions(&mut self, transitions: Vec<BatchedTransition>);
    fn set_identity_contract_nonce(
        &mut self,
        identity_contract_nonce: IdentityNonce,
    );
    fn all_conflicting_index_collateral_voting_funds(
        &self,
    ) -> Result<Option<Credits>, ProtocolError>;
    fn all_document_purchases_amount(
        &self,
    ) -> Result<Option<Credits>, ProtocolError>;

    // Provided method
    fn combined_security_level_requirement(
        &self,
        get_data_contract_security_level_requirement: Option<impl Fn(Identifier, String) -> Result<SecurityLevel, ProtocolError>>,
    ) -> Result<Vec<SecurityLevel>, ProtocolError> { ... }
}

Required Methods§

Source

fn new_document_creation_transition_from_document<S: Signer<IdentityPublicKey>>( document: Document, document_type: DocumentTypeRef<'_>, entropy: [u8; 32], identity_public_key: &IdentityPublicKey, identity_contract_nonce: IdentityNonce, user_fee_increase: UserFeeIncrease, token_payment_info: Option<TokenPaymentInfo>, signer: &S, platform_version: &PlatformVersion, options: Option<StateTransitionCreationOptions>, ) -> Result<StateTransition, ProtocolError>

Source

fn new_document_replacement_transition_from_document<S: Signer<IdentityPublicKey>>( document: Document, document_type: DocumentTypeRef<'_>, identity_public_key: &IdentityPublicKey, identity_contract_nonce: IdentityNonce, user_fee_increase: UserFeeIncrease, token_payment_info: Option<TokenPaymentInfo>, signer: &S, platform_version: &PlatformVersion, options: Option<StateTransitionCreationOptions>, ) -> Result<StateTransition, ProtocolError>

Source

fn new_document_deletion_transition_from_document<S: Signer<IdentityPublicKey>>( document: Document, document_type: DocumentTypeRef<'_>, identity_public_key: &IdentityPublicKey, identity_contract_nonce: IdentityNonce, user_fee_increase: UserFeeIncrease, token_payment_info: Option<TokenPaymentInfo>, signer: &S, platform_version: &PlatformVersion, options: Option<StateTransitionCreationOptions>, ) -> Result<StateTransition, ProtocolError>

Source

fn new_document_transfer_transition_from_document<S: Signer<IdentityPublicKey>>( document: Document, document_type: DocumentTypeRef<'_>, recipient_owner_id: Identifier, identity_public_key: &IdentityPublicKey, identity_contract_nonce: IdentityNonce, user_fee_increase: UserFeeIncrease, token_payment_info: Option<TokenPaymentInfo>, signer: &S, platform_version: &PlatformVersion, options: Option<StateTransitionCreationOptions>, ) -> Result<StateTransition, ProtocolError>

Source

fn new_document_update_price_transition_from_document<S: Signer<IdentityPublicKey>>( document: Document, document_type: DocumentTypeRef<'_>, price: Credits, identity_public_key: &IdentityPublicKey, identity_contract_nonce: IdentityNonce, user_fee_increase: UserFeeIncrease, token_payment_info: Option<TokenPaymentInfo>, signer: &S, platform_version: &PlatformVersion, options: Option<StateTransitionCreationOptions>, ) -> Result<StateTransition, ProtocolError>

Source

fn new_document_purchase_transition_from_document<S: Signer<IdentityPublicKey>>( document: Document, document_type: DocumentTypeRef<'_>, new_owner_id: Identifier, price: Credits, identity_public_key: &IdentityPublicKey, identity_contract_nonce: IdentityNonce, user_fee_increase: UserFeeIncrease, token_payment_info: Option<TokenPaymentInfo>, signer: &S, platform_version: &PlatformVersion, options: Option<StateTransitionCreationOptions>, ) -> Result<StateTransition, ProtocolError>

Source

fn set_transitions(&mut self, transitions: Vec<BatchedTransition>)

Source

fn set_identity_contract_nonce( &mut self, identity_contract_nonce: IdentityNonce, )

Source

fn all_conflicting_index_collateral_voting_funds( &self, ) -> Result<Option<Credits>, ProtocolError>

Source

fn all_document_purchases_amount( &self, ) -> Result<Option<Credits>, ProtocolError>

Provided Methods§

Source

fn combined_security_level_requirement( &self, get_data_contract_security_level_requirement: Option<impl Fn(Identifier, String) -> Result<SecurityLevel, ProtocolError>>, ) -> Result<Vec<SecurityLevel>, ProtocolError>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§