# Modules: personal

## personal\_deriveAccount

DeriveAccount requests an HD wallet to derive a new account, optionally pinning\
it for later reuse.

**Params (3)**

Parameters must be given *by position*.

**1:**\
url `string`

* Required: ✓ Yes

**2:**\
path `string`

* Required: ✓ Yes

**3:**\
pin `*bool`

* Required: ✓ Yes

**Result**

`accounts.Account`

* Required: ✓ Yes

\=== "Schema"

````
``` Schema

- additionalProperties: `false`
- properties: 
	- address: 
		- pattern: `^0x[a-fA-F\d]{64}$`
		- title: `keccak`
		- type: `string`

	- url: 
		- additionalProperties: `false`
		- properties: 
			- Path: 
				- type: `string`

			- Scheme: 
				- type: `string`


		- type: `object`


- type: object


```
````

\=== "Raw"

````
``` Raw
{
    "additionalProperties": false,
    "properties": {
        "address": {
            "pattern": "^0x[a-fA-F\\d]{64}$",
            "title": "keccak",
            "type": "string"
        },
        "url": {
            "additionalProperties": false,
            "properties": {
                "Path": {
                    "type": "string"
                },
                "Scheme": {
                    "type": "string"
                }
            },
            "type": "object"
        }
    },
    "type": [
        "object"
    ]
}
```
````

**Client Method Invocation Examples**

\=== "Shell HTTP"

````
``` shell
curl -X POST -H "Content-Type: application/json" http://localhost:8545 --data '{"jsonrpc": "2.0", "id": 42, "method": "personal_deriveAccount", "params": [<url>, <path>, <pin>]}'
```
````

\=== "Shell WebSocket"

````
``` shell
wscat -c ws://localhost:8546 -x '{"jsonrpc": "2.0", "id": 1, "method": "personal_deriveAccount", "params": [<url>, <path>, <pin>]}'
```
````

\=== "Javascript Console"

````
``` js
personal.deriveAccount(url,path,pin);
```
````

***

#### personal\_importRawKey

ImportRawKey stores the given hex encoded ECDSA key into the key directory,\
encrypting it with the passphrase.

**Params (2)**

Parameters must be given *by position*.

**1:**\
privkey `string`

* Required: ✓ Yes

**2:**\
password `string`

* Required: ✓ Yes

**Result**

`common.Address`

* Required: ✓ Yes

\=== "Schema"

````
``` Schema

- description: `Hex representation of a Keccak 256 hash POINTER`
- pattern: `^0x[a-fA-F\d]{64}$`
- title: `keccak`
- type: string


```
````

\=== "Raw"

````
``` Raw
{
    "description": "Hex representation of a Keccak 256 hash POINTER",
    "pattern": "^0x[a-fA-F\\d]{64}$",
    "title": "keccak",
    "type": [
        "string"
    ]
}
```
````

**Client Method Invocation Examples**

\=== "Shell HTTP"

````
``` shell
curl -X POST -H "Content-Type: application/json" http://localhost:8545 --data '{"jsonrpc": "2.0", "id": 42, "method": "personal_importRawKey", "params": [<privkey>, <password>]}'
```
````

\=== "Shell WebSocket"

````
``` shell
wscat -c ws://localhost:8546 -x '{"jsonrpc": "2.0", "id": 1, "method": "personal_importRawKey", "params": [<privkey>, <password>]}'
```
````

\=== "Javascript Console"

````
``` js
personal.importRawKey(privkey,password);
```
````

***

#### personal\_listAccounts

ListAccounts will return a list of addresses for accounts this node manages.

**Params (0)**

*None*

**Result**

commonAddress `[]common.Address`

* Required: ✓ Yes

\=== "Schema"

````
``` Schema

- items: 

		- description: `Hex representation of a Keccak 256 hash POINTER`
		- pattern: `^0x[a-fA-F\d]{64}$`
		- title: `keccak`
		- type: string


- type: array


```
````

\=== "Raw"

````
``` Raw
{
    "items": [
        {
            "description": "Hex representation of a Keccak 256 hash POINTER",
            "pattern": "^0x[a-fA-F\\d]{64}$",
            "title": "keccak",
            "type": [
                "string"
            ]
        }
    ],
    "type": [
        "array"
    ]
}
```
````

**Client Method Invocation Examples**

\=== "Shell HTTP"

````
``` shell
curl -X POST -H "Content-Type: application/json" http://localhost:8545 --data '{"jsonrpc": "2.0", "id": 42, "method": "personal_listAccounts", "params": []}'
```
````

\=== "Shell WebSocket"

````
``` shell
wscat -c ws://localhost:8546 -x '{"jsonrpc": "2.0", "id": 1, "method": "personal_listAccounts", "params": []}'
```
````

\=== "Javascript Console"

````
``` js
personal.listAccounts();
```
````

***

#### personal\_listWallets

ListWallets will return a list of wallets this node manages.

**Params (0)**

*None*

**Result**

rawWallet `[]rawWallet`

* Required: ✓ Yes

\=== "Schema"

````
``` Schema

- items: 

		- additionalProperties: `false`
		- properties: 
			- accounts: 
				- items: 
					- additionalProperties: `false`
					- properties: 
						- address: 
							- pattern: `^0x[a-fA-F\d]{64}$`
							- title: `keccak`
							- type: `string`

						- url: 
							- additionalProperties: `false`
							- properties: 
								- Path: 
									- type: `string`

								- Scheme: 
									- type: `string`


							- type: `object`


					- type: `object`

				- type: `array`

			- failure: 
				- type: `string`

			- status: 
				- type: `string`

			- url: 
				- type: `string`


		- type: object


- type: array


```
````

\=== "Raw"

````
``` Raw
{
    "items": [
        {
            "additionalProperties": false,
            "properties": {
                "accounts": {
                    "items": {
                        "additionalProperties": false,
                        "properties": {
                            "address": {
                                "pattern": "^0x[a-fA-F\\d]{64}$",
                                "title": "keccak",
                                "type": "string"
                            },
                            "url": {
                                "additionalProperties": false,
                                "properties": {
                                    "Path": {
                                        "type": "string"
                                    },
                                    "Scheme": {
                                        "type": "string"
                                    }
                                },
                                "type": "object"
                            }
                        },
                        "type": "object"
                    },
                    "type": "array"
                },
                "failure": {
                    "type": "string"
                },
                "status": {
                    "type": "string"
                },
                "url": {
                    "type": "string"
                }
            },
            "type": [
                "object"
            ]
        }
    ],
    "type": [
        "array"
    ]
}
```
````

**Client Method Invocation Examples**

\=== "Shell HTTP"

````
``` shell
curl -X POST -H "Content-Type: application/json" http://localhost:8545 --data '{"jsonrpc": "2.0", "id": 42, "method": "personal_listWallets", "params": []}'
```
````

\=== "Shell WebSocket"

````
``` shell
wscat -c ws://localhost:8546 -x '{"jsonrpc": "2.0", "id": 1, "method": "personal_listWallets", "params": []}'
```
````

\=== "Javascript Console"

````
``` js
personal.listWallets();
```
````

***

#### personal\_lockAccount

LockAccount will lock the account associated with the given address when it's unlocked.

**Params (1)**

Parameters must be given *by position*.

**1:**\
addr `common.Address`

* Required: ✓ Yes

\=== "Schema"

````
``` Schema

- description: `Hex representation of a Keccak 256 hash POINTER`
- pattern: `^0x[a-fA-F\d]{64}$`
- title: `keccak`
- type: string


```
````

\=== "Raw"

````
``` Raw
{
    "description": "Hex representation of a Keccak 256 hash POINTER",
    "pattern": "^0x[a-fA-F\\d]{64}$",
    "title": "keccak",
    "type": [
        "string"
    ]
}
```
````

**Result**

`bool`

* Required: ✓ Yes

**Client Method Invocation Examples**

\=== "Shell HTTP"

````
``` shell
curl -X POST -H "Content-Type: application/json" http://localhost:8545 --data '{"jsonrpc": "2.0", "id": 42, "method": "personal_lockAccount", "params": [<addr>]}'
```
````

\=== "Shell WebSocket"

````
``` shell
wscat -c ws://localhost:8546 -x '{"jsonrpc": "2.0", "id": 1, "method": "personal_lockAccount", "params": [<addr>]}'
```
````

\=== "Javascript Console"

````
``` js
personal.lockAccount(addr);
```
````

***

#### personal\_openWallet

OpenWallet initiates a hardware wallet opening procedure, establishing a USB\
connection and attempting to authenticate via the provided passphrase. Note,\
the method may return an extra challenge requiring a second open (e.g. the\
Trezor PIN matrix challenge).

**Params (2)**

Parameters must be given *by position*.

**1:**\
url `string`

* Required: ✓ Yes

**2:**\
passphrase `*string`

* Required: ✓ Yes

**Result**

*None*

**Client Method Invocation Examples**

\=== "Shell HTTP"

````
``` shell
curl -X POST -H "Content-Type: application/json" http://localhost:8545 --data '{"jsonrpc": "2.0", "id": 42, "method": "personal_openWallet", "params": [<url>, <passphrase>]}'
```
````

\=== "Shell WebSocket"

````
``` shell
wscat -c ws://localhost:8546 -x '{"jsonrpc": "2.0", "id": 1, "method": "personal_openWallet", "params": [<url>, <passphrase>]}'
```
````

\=== "Javascript Console"

````
``` js
personal.openWallet(url,passphrase);
```
````

***

#### personal\_sign

Sign calculates an Ethereum ECDSA signature for:\
keccak256("\x19Ethereum Signed Message:\n" + len(message) + message))

Note, the produced signature conforms to the secp256k1 curve R, S and V values,\
where the V value will be 27 or 28 for legacy reasons.

The key used to calculate the signature is decrypted with the given password.

<https://github.com/ethereum/go-ethereum/wiki/Management-APIs#personal\\_sign>

**Params (3)**

Parameters must be given *by position*.

**1:**\
data `hexutil.Bytes`

* Required: ✓ Yes

\=== "Schema"

````
``` Schema

- description: `Hex representation of some bytes`
- pattern: `^0x([a-fA-F\d])+$`
- title: `dataWord`
- type: string


```
````

\=== "Raw"

````
``` Raw
{
    "description": "Hex representation of some bytes",
    "pattern": "^0x([a-fA-F\\d])+$",
    "title": "dataWord",
    "type": [
        "string"
    ]
}
```
````

**2:**\
addr `common.Address`

* Required: ✓ Yes

\=== "Schema"

````
``` Schema

- description: `Hex representation of a Keccak 256 hash POINTER`
- pattern: `^0x[a-fA-F\d]{64}$`
- title: `keccak`
- type: string


```
````

\=== "Raw"

````
``` Raw
{
    "description": "Hex representation of a Keccak 256 hash POINTER",
    "pattern": "^0x[a-fA-F\\d]{64}$",
    "title": "keccak",
    "type": [
        "string"
    ]
}
```
````

**3:**\
passwd `string`

* Required: ✓ Yes

**Result**

`hexutil.Bytes`

* Required: ✓ Yes

\=== "Schema"

````
``` Schema

- description: `Hex representation of some bytes`
- pattern: `^0x([a-fA-F\d])+$`
- title: `dataWord`
- type: string


```
````

\=== "Raw"

````
``` Raw
{
    "description": "Hex representation of some bytes",
    "pattern": "^0x([a-fA-F\\d])+$",
    "title": "dataWord",
    "type": [
        "string"
    ]
}
```
````

**Client Method Invocation Examples**

\=== "Shell HTTP"

````
``` shell
curl -X POST -H "Content-Type: application/json" http://localhost:8545 --data '{"jsonrpc": "2.0", "id": 42, "method": "personal_sign", "params": [<data>, <addr>, <passwd>]}'
```
````

\=== "Shell WebSocket"

````
``` shell
wscat -c ws://localhost:8546 -x '{"jsonrpc": "2.0", "id": 1, "method": "personal_sign", "params": [<data>, <addr>, <passwd>]}'
```
````

\=== "Javascript Console"

````
``` js
personal.sign(data,addr,passwd);
```
````

***

#### personal\_unlockAccount

UnlockAccount will unlock the account associated with the given address with\
the given password for duration seconds. If duration is nil it will use a\
default of 300 seconds. It returns an indication if the account was unlocked.

**Params (3)**

Parameters must be given *by position*.

**1:**\
addr `common.Address`

* Required: ✓ Yes

\=== "Schema"

````
``` Schema

- description: `Hex representation of a Keccak 256 hash POINTER`
- pattern: `^0x[a-fA-F\d]{64}$`
- title: `keccak`
- type: string


```
````

\=== "Raw"

````
``` Raw
{
    "description": "Hex representation of a Keccak 256 hash POINTER",
    "pattern": "^0x[a-fA-F\\d]{64}$",
    "title": "keccak",
    "type": [
        "string"
    ]
}
```
````

**2:**\
password `string`

* Required: ✓ Yes

**3:**\
duration `*uint64`

* Required: ✓ Yes

\=== "Schema"

````
``` Schema

- description: `Hex representation of the integer`
- pattern: `^0x[a-fA-F0-9]+$`
- title: `integer`
- type: string


```
````

\=== "Raw"

````
``` Raw
{
    "description": "Hex representation of the integer",
    "pattern": "^0x[a-fA-F0-9]+$",
    "title": "integer",
    "type": [
        "string"
    ]
}
```
````

**Result**

`bool`

* Required: ✓ Yes

**Client Method Invocation Examples**

\=== "Shell HTTP"

````
``` shell
curl -X POST -H "Content-Type: application/json" http://localhost:8545 --data '{"jsonrpc": "2.0", "id": 42, "method": "personal_unlockAccount", "params": [<addr>, <password>, <duration>]}'
```
````

\=== "Shell WebSocket"

````
``` shell
wscat -c ws://localhost:8546 -x '{"jsonrpc": "2.0", "id": 1, "method": "personal_unlockAccount", "params": [<addr>, <password>, <duration>]}'
```
````

\=== "Javascript Console"

````
``` js
personal.unlockAccount(addr,password,duration);
```
````
