pub fn new_account(
    coin: u8,
    name: &str,
    key: Option<String>,
    index: Option<u32>
) -> Result<u32>
Expand description

Create a new account

Arguments

  • coin: 0 for zcash, 1 for ycash
  • name: account name
  • key: Some(key) where key is either a passphrase, a secret key or a viewing key for an existing account, or None for a new randomly generated account
  • index: Some(x) for account at index x or None for main account (same as x = 0)

Returns

account id