-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add docs for setScanning and setAccountHead
- Loading branch information
Showing
2 changed files
with
68 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
--- | ||
title: wallet/setAccountHead | ||
description: RPC Wallet | Iron Fish Documentation | ||
--- | ||
|
||
Update an account's head from `start` to `end. You must provide hashes of all transactions in which the account is either a sender or a recipient, or else the account's balances will be incorrect. You also must disable scanning with [`wallet/setScanning`](/developers/documentation/rpc/wallet/set_scanning) before calling this RPC. | ||
|
||
This is useful to quickly catch up an account if you already know transactions belonging to that account. | ||
|
||
Block hashes and transaction hashes are hex strings. | ||
|
||
#### Request | ||
|
||
```ts | ||
{ | ||
/** | ||
* Name of the account to update. | ||
*/ | ||
account: string | ||
/** | ||
* Starting block hash (inclusive). Used to verify that you haven't accidentally skipped | ||
* decrypting transactions in blocks between the account head and this block hash. | ||
* This block must connect to the account head with no gaps. | ||
*/ | ||
start: string | ||
/** | ||
* Last block hash (inclusive). Account head will be set to this | ||
* when the request finishes successfully. | ||
*/ | ||
end: string | ||
/** | ||
* Blocks between start and end (inclusive) that contain transactions in which the | ||
* account is either a sender or a recipient. | ||
*/ | ||
blocks: { hash: string; transactions: { hash: string }[] }[] | ||
} | ||
``` | ||
|
||
#### Response | ||
|
||
```ts | ||
undefined; | ||
``` | ||
|
||
###### [View on Github](https://github.com/iron-fish/ironfish/blob/master/ironfish/src/rpc/routes/wallet/setAccountHead.ts) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
--- | ||
title: wallet/setScanning | ||
description: RPC Wallet | Iron Fish Documentation | ||
--- | ||
|
||
Enable or disable scanning for an account. Scanning is enabled by default. When scanning is enabled, the wallet with scan the blockchain for transactions for this account. | ||
|
||
#### Request | ||
|
||
```ts | ||
{ | ||
account: string; | ||
enabled: boolean; | ||
} | ||
``` | ||
|
||
#### Response | ||
|
||
```ts | ||
undefined; | ||
``` | ||
|
||
###### [View on Github](https://github.com/iron-fish/ironfish/blob/master/ironfish/src/rpc/routes/wallet/setScanning.ts) |