Difference between revisions of "Withdrawal status"
								
								Jump to navigation
				Jump to search
				
				
							
								
							
		 (Initial page creation)  | 
				m (→Status Codes:  department of redundancy department)  | 
				||
| (7 intermediate revisions by the same user not shown) | |||
| Line 5: | Line 5: | ||
==Schema==  | ==Schema==  | ||
| − | <  | + | <include src="https://raw.githubusercontent.com/Open-Transactions/rfc/draft/json/schema/withdrawalstatus-01.json" />  | 
| − | + | ||
| − | + | ==Example==  | |
| − | + | ||
| − | + | <include src="https://raw.githubusercontent.com/Open-Transactions/rfc/draft/json/data/withdrawalstatus-01.json" />  | |
| − | + | ||
| − | + | ==Status Codes==  | |
| − | + | ||
| − | + | The status codes for an <code>outputs</code> object are as follows:  | |
| − | + | ||
| − | + | ; success  | |
| − | + | : The amount requested by the originating nym's outBailment message was completely satisfied using a single transaction  | |
| − | + | ; split  | |
| − | + | : The amount requested by the originating nym's outBailment message was completely satisfied using two or more transaction  | |
| − | + | ; partial-<n>  | |
| − | + | : The amount requested by the originating nym's outBailment message could not be completely satisfied due to a lack of hot inputs. Series up to <n> must be thawed to completely fulfil this outBailment. The transactions array for this entry may contain zero or more transactions.  | |
| − | + | ; invalid  | |
| − | + | : The output address supplied by the outBailment is not valid.  | |
| − | + | ||
| − | + | ||
| − | + | [[Category:Voting Pool Technical Specifications]]  | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
Latest revision as of 14:46, 21 October 2014
The startwithdrawal API call returns a list of accounting and status information corresponding to the transactions which it has created.
The list is formated as a JSON object.
Schema
{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "title": "Withdrawal status list",
    "description": "Accounting and status information corresponding to a voting pool outBailment consensus round",
    "type": "object",
    "properties": {
        "roundID": {
            "type": "number",
            "description": "A positive integer representing the consensus round for which the withdrawal is associated",
            "minimum": 0,
            "exclusiveMinimum": false
        },
        "nextinputstart": {
            "description": "The inputstart value to be used in the next consensus round as an address identifier",
            "$ref": "https://raw.githubusercontent.com/Open-Transactions/rfc/master/json/schema/addressid-01.json"
        },
        "nextchangestart": {
            "description": "The changestart value to be used in the next consensus round as an address identifier",
            "$ref": "https://raw.githubusercontent.com/Open-Transactions/rfc/master/json/schema/addressid-01.json"
        },
        "fees": {
            "type": "number",
            "description": "Total transaction fees incurred by the transactions in this round",
            "minimum": 0,
            "exclusiveMinimum": false
        },
        "outputs": {
            "type": "array",
            "items": {
                "type": "object",
                "properties": {
                    "outBailmentID": {
                        "$ref": "https://raw.githubusercontent.com/Open-Transactions/rfc/draft/json/schema/outbailmentid-01.json",
                        "description": "the identifier of the originating nym's outBailment message"
                    },
                    "status": {
                        "type": "string",
                        "description": "Status code for the outBailment"
                    },
                    "outpoints": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "ntxid": {
                                    "type": "string",
                                    "description": "Normalized transaction id associated with the withdrawal"
                                },
                                "index": {
                                    "type": "number",
                                    "description": "Output index in transaction which satisfies this outBailmentID",
                                    "minimum": 0,
                                    "exclusiveMinimum": false
                                },
                                "amount": {
                                    "type": "number",
                                    "description": "Monetary value of the output denoted by (ntxid,index), in fundamental units",
                                    "minimum": 0,
                                    "exclusiveMinimum": true
                                }
                            },
                            "required": [ "ntxid","index","amount" ]
                        },
                        "minItems": 0,
                        "uniqueItems": true
                    }
                },
                "required": [ "outBailmentID","status" ]
            },
            "minItems": 1,
            "uniqueItems": true
        }
    },
    "required": [ "roundID","nextinputstart","nextchangestart","fees","outputs"]
}
Example
{
    "roundID": 42,
    "nextinputstart": { "series": { "pool": "IFOC:a1075db55d416d3ca199f55b6084e2115b9345e16c5cf302fc80e9d5fbf5d48d:0:57043", "series": 42 }, "branch": 0, "index": 21 },
    "nextchangestart": { "series": { "pool": "IFOC:a1075db55d416d3ca199f55b6084e2115b9345e16c5cf302fc80e9d5fbf5d48d:0:57043", "series": 64 }, "branch": 2, "index": 7 },
    "fees": 100000,
    "outputs": [
        {
           "outBailmentID": { "pool": "IFOC:a1075db55d416d3ca199f55b6084e2115b9345e16c5cf302fc80e9d5fbf5d48d:0:57043", "server": "r1fUoHwJOWCuK3WBAAySjmKYqsG6G2TYIxdqY6YNuuG", "transaction": 42 },
           "status": "success",
           "outpoints": [
                {
                    "ntxid": "f180b316e1d6316ad03c2ac089586cb9e9b16210238ceca5a24f66370b1a07fc",
                    "index": 0,
                    "amount": 22707611
                }
            ]
        }
    ]
}
Status Codes
The status codes for an outputs object are as follows:
- success
 - The amount requested by the originating nym's outBailment message was completely satisfied using a single transaction
 - split
 - The amount requested by the originating nym's outBailment message was completely satisfied using two or more transaction
 - partial-<n>
 - The amount requested by the originating nym's outBailment message could not be completely satisfied due to a lack of hot inputs. Series up to <n> must be thawed to completely fulfil this outBailment. The transactions array for this entry may contain zero or more transactions.
 - invalid
 - The output address supplied by the outBailment is not valid.