pub trait AccountContract: Send + Sync {
// Required methods
fn contract_artifact<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<ContractArtifact, Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn initialization_function_and_args<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Option<InitializationSpec>, Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn account(&self, address: CompleteAddress) -> Box<dyn Account>;
fn auth_witness_provider(
&self,
address: CompleteAddress,
) -> Box<dyn AuthorizationProvider>;
}Expand description
Defines an account contract type (e.g., Schnorr, ECDSA).
Implementations provide the contract artifact, initialization parameters,
and the ability to produce Account and AuthorizationProvider
instances for a given address.
Required Methods§
Sourcefn contract_artifact<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<ContractArtifact, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn contract_artifact<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<ContractArtifact, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get the contract artifact for this account type.
Sourcefn initialization_function_and_args<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Option<InitializationSpec>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn initialization_function_and_args<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Option<InitializationSpec>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get the initialization function name and arguments, if any.
Sourcefn account(&self, address: CompleteAddress) -> Box<dyn Account>
fn account(&self, address: CompleteAddress) -> Box<dyn Account>
Create an Account instance for the given address.
Sourcefn auth_witness_provider(
&self,
address: CompleteAddress,
) -> Box<dyn AuthorizationProvider>
fn auth_witness_provider( &self, address: CompleteAddress, ) -> Box<dyn AuthorizationProvider>
Create an AuthorizationProvider for the given address.