Difference between revisions of "Getdepositscript"
								
								Jump to navigation
				Jump to search
				
				
		
					
								
							
		| m (→Description) | m | ||
| (3 intermediate revisions by the same user not shown) | |||
| Line 9: | Line 9: | ||
| When a wallet receives a valid <code>getdepositscript</code> call, it should update its [[lookahead window]] for the relevant [[branch]], ensuring it is watching all addresses in the branch between index 0 and the supplied address identifier. | When a wallet receives a valid <code>getdepositscript</code> call, it should update its [[lookahead window]] for the relevant [[branch]], ensuring it is watching all addresses in the branch between index 0 and the supplied address identifier. | ||
| − | ===Arguments== | + | ==Status== | 
| + | |||
| + | ;Version 1 Release candidate | ||
| + | :This version of the specification contains is believed to be complete, but is still subject to revision before version 1 | ||
| + | |||
| + | ==Arguments== | ||
| + | |||
| + | ; version | ||
| + | : Currently required to be 1. May be incremented for future expansions to the voting pool specification. | ||
| ;[[Wallet_(blockchain)#Address_Identification|address identifier]] | ;[[Wallet_(blockchain)#Address_Identification|address identifier]] | ||
| : the address for which the returned script should correspond | : the address for which the returned script should correspond | ||
| − | + | ==Return values== | |
| − | + | ===Data=== | |
| ;deposit script | ;deposit script | ||
| :A string containing an output script suitable for being included in the <code>PaymentDetails</code> field of a [[Payment_Protocol_(voting_pools)|PaymentRequest]]. | :A string containing an output script suitable for being included in the <code>PaymentDetails</code> field of a [[Payment_Protocol_(voting_pools)|PaymentRequest]]. | ||
| − | + | ===Errors=== | |
| − | ;invalid pool | + | ; incorrect version | 
| − | :The given pool is not defined in the wallet. | + | : The version specified in this call must match the version used of the relevant series | 
| − | ;invalid series | + | ; invalid pool | 
| − | :The given series is not defined in the wallet. | + | : The given pool is not defined in the wallet. | 
| − | ;invalid branch | + | ; invalid series | 
| − | :The given branch is not defined in the wallet. | + | : The given series is not defined in the wallet. | 
| − | ;invalid index | + | ; invalid branch | 
| − | :The index supplied is not a positive integer between 0 an 2<sup>31</sup>. | + | : The given branch is not defined in the wallet. | 
| − | ;series not active | + | ; invalid index | 
| − | :The [[charter output]] for the pool is not located at the 0<sup>th</sup> [[change address]] for the given series, or the next series. | + | : The index supplied is not a positive integer between 0 an 2<sup>31</sup>. | 
| + | ; series not active | ||
| + | : The [[charter output]] for the pool is not located at the 0<sup>th</sup> [[change address]] for the given series, or the next series. | ||
| + | |||
| + | |||
| + | [[Category:Voting Pool Wallet API]] | ||
Latest revision as of 13:38, 23 September 2014
Description
This call requests a deposit script suitable for a BIP70 PaymentRequest based on a specific address.
Deposit scripts may only be requested from active series, as indicated by the location of the charter output.
All auditors in a voting pool will request the deposit script for every bailment message they see, and compare the script to the corresponding initiatedBailment message.
When a wallet receives a valid getdepositscript call, it should update its lookahead window for the relevant branch, ensuring it is watching all addresses in the branch between index 0 and the supplied address identifier.
Status
- Version 1 Release candidate
- This version of the specification contains is believed to be complete, but is still subject to revision before version 1
Arguments
- version
- Currently required to be 1. May be incremented for future expansions to the voting pool specification.
- address identifier
- the address for which the returned script should correspond
Return values
Data
- deposit script
- A string containing an output script suitable for being included in the PaymentDetailsfield of a PaymentRequest.
Errors
- incorrect version
- The version specified in this call must match the version used of the relevant series
- invalid pool
- The given pool is not defined in the wallet.
- invalid series
- The given series is not defined in the wallet.
- invalid branch
- The given branch is not defined in the wallet.
- invalid index
- The index supplied is not a positive integer between 0 an 231.
- series not active
- The charter output for the pool is not located at the 0th change address for the given series, or the next series.
