pub trait ExampleWalletExt {
// Required methods
fn example_wallet_initialize(
&mut self,
method_context: MethodContext,
contract: Address,
public_key: &[u8; 32],
) -> Result<(), ContractError>;
fn example_wallet_change_public_key(
&mut self,
method_context: MethodContext,
contract: Address,
public_key: &[u8; 32],
) -> Result<(), ContractError>;
}
Expand description
Extension trait that provides helper methods for calling ExampleWallet
’s methods on Env
for convenience purposes
Required Methods§
Sourcefn example_wallet_initialize(
&mut self,
method_context: MethodContext,
contract: Address,
public_key: &[u8; 32],
) -> Result<(), ContractError>
fn example_wallet_initialize( &mut self, method_context: MethodContext, contract: Address, public_key: &[u8; 32], ) -> Result<(), ContractError>
Initialize a wallet with specified public key
Sourcefn example_wallet_change_public_key(
&mut self,
method_context: MethodContext,
contract: Address,
public_key: &[u8; 32],
) -> Result<(), ContractError>
fn example_wallet_change_public_key( &mut self, method_context: MethodContext, contract: Address, public_key: &[u8; 32], ) -> Result<(), ContractError>
Change public key to a different one