Struct CreateAccountOptions
pub struct CreateAccountOptions
{ /* private fields */ }
Implementations
impl CreateAccountOptions
pub fn new() -> Self
Creates a new CreateAccountOptions with default values, i.e. the same as if using the create_light_account
method instead of create_light_account_opts. Use the with_secret and with_partial_address methods to set
the desired configuration values.
pub fn with_secret(&mut self, secret: Field) -> Self
Sets the secret used for key derivation. The secret affects the account's public keys and therefore its address: accounts created with different secrets will have different keys and addresses.
pub fn with_partial_address(&mut self, partial_address: Field) -> Self
Sets the partial address used for address derivation. The partial address affects the resulting account address but not its keys: accounts created with the same secret but different partial addresses share master keys while having different addresses.
Configuration values for
TestEnvironment::create_light_account_opts. Meant to be used by callingnewand then chaining methods setting each value, e.g.:The account address is derived from both the public keys (which come from the secret) and the partial address. Setting the same secret with different partial addresses produces accounts that share master keys but have distinct addresses.