Skip to content

Commit

Permalink
Remove multi-Account functionality from the spec.
Browse files Browse the repository at this point in the history
See #292.
  • Loading branch information
kayabaNerve committed Mar 13, 2021
1 parent c651fc9 commit cb4c9db
Showing 1 changed file with 16 additions and 37 deletions.
53 changes: 16 additions & 37 deletions docs/RPC/Personal.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ The result is a bool of true.
`setParentPublicKey` deletes the existing Wallet on the node, in an irreversible manner, losing all access to the current Merit Holder and all funds. It sets the Wallet to track the specified Parent Public Key, presumably one returned from `getParentPublicKey`. This will disable any operations requiring access to the private key, as well as all Merit Holder related operations. That said, this will preserve the functionality of address generation, `getTransactionTemplate`, and more, enabling Watch Wallet functionality.

Arguments:
- `account` (int; optional): Account this Public Key maps to. Defaults to 0.
- `key` (string): Parent Public Key.
- `key` (string): Parent Public Key.

The result is a bool of true.

Expand All @@ -34,23 +33,14 @@ The result is a bool of true.

### `getParentPublicKey`

`getParentPublicKey` replies with the Parent Public Key for the specified account of the node's HD Wallet. If the account isn't known to the node, this method will create it.

Arguments:
- `account` (int; optional): Defaults to 0.
- `password` (string; optional): Only optional if the account was already created; defaults to "".

The result is a string of the specified Parent Public Key.
`getParentPublicKey` replies with the Parent Public Key of the node's HD Wallet, once account derivation is applied as according to BIP 44. The result is a string of the Parent Public Key.

### `getAddress`

`getAddress` replies with a newly generated address. If the account used isn't known to the node, this method will create it.
`getAddress` replies with a newly generated address.

Arguments:
- `account` (int; optional): Defaults to 0.
- `change` (bool; optional): Defaults to false.
- `index` (int; optional): Defaults to the first unused index. If an index above the hardened threshold is specified, hardened derivation is used. If the next unused index is used, and it's above the hardened threshold, this will error.
- `password` (string; optional): Only optional if the account was already created and a non-hardened index is specified; defaults to "".
- `index` (int; optional): Defaults to the first unused index.

The result is a string of the generated address.

Expand All @@ -59,7 +49,6 @@ The result is a string of the generated address.
`send` creates and publishes a Send using the Wallet on the node.

Arguments:
- `account` (int; optional): The account to send from. Defaults to 0.
- `outputs` (array of objects)
- `address` (string)
- `amount` (string)
Expand All @@ -72,7 +61,6 @@ The result is a string of the hash.
`data` creates and publishes a Data using the Wallet on the node.

Arguments:
- `account` (int; optional): The account to send from. Defaults to 0.
- `hex` (bool; optional): Defaults to false. When true, data is treated as bytes, instead of as text.
- `data` (string): Must be at least 1 byte and at most 256 bytes.
- `password` (string; optional): Defaults to "".
Expand All @@ -81,10 +69,7 @@ The result is a string of the hash.

### `getUTXOs`

`getUTXOs` replies with every UTXO known to the specified account. If you only want the UTXOs for a specific address, use `transactions_getUTXOs`.

Arguments:
- `account` (int; optional): Defaults to 0.
`getUTXOs` replies with every UTXO known to the node's Wallet. If you only want the UTXOs for a specific address, use `transactions_getUTXOs`.

The result is an array of objects, each as follows:
- `address` (string)
Expand All @@ -96,26 +81,20 @@ The result is an array of objects, each as follows:
`getTransactionTemplate` replies with a signable transaction template usable by a program with the relevant private keys.

Arguments:
- `amount` (string): Amount to send.
- `destination` (string): Address to send to.
- `account` (int; optional): Account to send from.
- `from` (array of strings; optional): Addresses to use the UTXOs of.
- `change` (string; optional): Address to use as change.

This method will error if both `account` and `from` arguments are provided.
- `outputs` (array of objects, each as follows)
- `destination` (string): Address to send to.
- `amount` (string): Amount to send.
- `from` (array of strings; optional): Addresses to use the UTXOs of.
- `change` (string; optional): Address to use as change.

The result is an object, as follows:
- `type`: Type of the Transaction.

- `type` (string): Type of the Transaction.
- `inputs` (array of objects, each as follows)
- `hash` (string)
- `nonce` (int)
- `account` (int)
- `change` (bool)
- `index` (int)

- `hash` (string)
- `nonce` (int)
- `change` (bool)
- `index` (int): Address index.
- `outputs` (array of objects, each as follows)
- `key` (string)
- `amount` (string)

- `publicKey` (string): The public key this transaction will be checked against. Used to verify the correct private key is being used.
- `publicKey` (string): The public key this transaction will be checked against. Used to verify the correct private key is being used.

0 comments on commit cb4c9db

Please sign in to comment.