# Personal

## personal.loadAccount

Load an existing or imported account as the console default account. The loaded account will be used to sign transactions. If the passphrase is not provided as a argument, an interactive session is started to collect your passphrase in a way that does not reveal it as you type.&#x20;

**Parameters**

| Argument   | Type   | Required | Description                                                                          |
| ---------- | ------ | -------- | ------------------------------------------------------------------------------------ |
| address    | String | True     | The address of the account.                                                          |
| passphrase | String | False    | <p>The passphrase of the account. </p><p>(not recommended, use interactive mode)</p> |

#### Console Example

```javascript
> personal.loadAccount("e2MhrMh7xvpByj3G3pKdHPfwFfNS7yRaRx", "my passphrase")
```

## personal.loadedAccount

Get the loaded account.&#x20;

**Parameters:** None

#### Console Example

```javascript
> personal.loadedAccount()
```

#### Returns:

`String` - The address of the loaded account.

#### Output:

```javascript
"e2MhrMh7xvpByj3G3pKdHPfwFfNS7yRaRx"
```

## personal.createAccount

Create an account. If the passphrase is not provided as a argument, an interactive session is started to collect your passphrase in a way that does not reveal it as you type.

**Parameters**

| Argument   | Type   | Required | Description                                                                          |
| ---------- | ------ | -------- | ------------------------------------------------------------------------------------ |
| passphrase | String | False    | <p>The passphrase of the account. </p><p>(not recommended, use interactive mode)</p> |

#### Console Example

```javascript
> personal.createAccount("my passphrase")
```

#### Returns:

`String` - The address of the new account.

#### Output:

```javascript
"e2MhrMh7xvpByj3G3pKdHPfwFfNS7yRaRx"
```

## personal.importAccount

Import a private key. Creates an account from a private key.

**Parameters**

| Argument   | Type   | Required | Description                                                                          |
| ---------- | ------ | -------- | ------------------------------------------------------------------------------------ |
| privateKey | String | True     | A private key.                                                                       |
| passphrase | String | False    | <p>The passphrase of the account. </p><p>(not recommended, use interactive mode)</p> |

#### Console Example

```javascript
> personal.importAccount("wL3gTWrJ2iZYcRNfodBL92...c6NXaD4n5LfNLPZooW", "my passphrase")
```

#### Returns:

`String` - The address of the newly imported account.

#### Output:

```javascript
"e2MhrMh7xvpByj3G3pKdHPfwFfNS7yRaRx"
```

## personal\_listAccounts

List all accounts that exist on the node. It the console is attached to a remote node, it will return the addresses of accounts on the node and not those on the attaching node. Accounts are stored in `DATA_DIR/accounts`.  &#x20;

**Parameters:** None

**Curl Example:**

```bash
curl -X POST --data '{"jsonrpc":"2.0","method":"personal_listAccounts", "id":21}'
```

#### Console Example

```javascript
> personal.listAccounts()
```

#### Returns:

`Array<String>` - A list of addresses.

#### Output:

```javascript
{
  "id": 21,
  "jsonrpc": "2.0",
  "result": [
    "eKkFDxaWMMUS2XQauugzAWGXBimnkQZfXt",
    "e9JQY3HYjF74Pdp2rnHf1pamJJAtkWKjF9"
  ]
}
```

## personal.listLocalAccounts <a href="#personal_listaccount" id="personal_listaccount"></a>

List all accounts that exist locally on the node. It the console is attached to a remote node, it will return the addresses of accounts on the attaching node. Accounts are stored in `DATA_DIR/accounts`.

**Parameters:** None

#### Console Example <a href="#console-example-4" id="console-example-4"></a>

```javascript
> personal.listLocalAccounts()
```

#### Returns: <a href="#returns-3" id="returns-3"></a>

`Array<String>` - A list of addresses.

#### Output:

```javascript
{
  "id": 21,
  "jsonrpc": "2.0",
  "result": [
    "eKkFDxaWMMUS2XQauugzAWGXBimnkQZfXt",
    "e9JQY3HYjF74Pdp2rnHf1pamJJAtkWKjF9"
  ]
}
```

​
