Withdrawal status
Revision as of 08:45, 15 September 2014 by Justusranvier (talk | contribs) (→Schema: fix validation errors)
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": {
"type": "string",
"description": "the identifier of the originating nym's outBailment message"
},
"status": {
"type": "string",
"description": "Status code for the outBailment"
},
"transactions": {
"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
}
}
},
"minItems": 0,
"uniqueItems": true
},
"required": [ "outBailmentID","status" ]
}
},
"minItems": 1,
"uniqueItems": true
},
"required": [ "nextinputstart","nextchangestart","fees","outputs"]
}
}}
Status Codes
The following status codes for an 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.