Difference between revisions of "Withdrawal status"
Jump to navigation
Jump to search
m |
(→Schema: fix validation errors) |
||
Line 12: | Line 12: | ||
"type": "object", | "type": "object", | ||
"properties": { | "properties": { | ||
− | "roundID" { | + | "roundID": { |
"type": "number", | "type": "number", | ||
"description": "A positive integer representing the consensus round for which the withdrawal is associated", | "description": "A positive integer representing the consensus round for which the withdrawal is associated", | ||
Line 18: | Line 18: | ||
"exclusiveMinimum": false | "exclusiveMinimum": false | ||
}, | }, | ||
− | "nextinputstart" { | + | "nextinputstart": { |
"description": "The inputstart value to be used in the next consensus round as an address identifier", | "description": "The inputstart value to be used in the next consensus round as an address identifier", | ||
− | "$ref": " | + | "$ref": "https://raw.githubusercontent.com/Open-Transactions/rfc/master/json/schema/addressid-01.json" |
}, | }, | ||
− | "nextchangestart" { | + | "nextchangestart": { |
"description": "The changestart value to be used in the next consensus round as an address identifier", | "description": "The changestart value to be used in the next consensus round as an address identifier", | ||
− | "$ref": " | + | "$ref": "https://raw.githubusercontent.com/Open-Transactions/rfc/master/json/schema/addressid-01.json" |
}, | }, | ||
− | "fees" { | + | "fees": { |
"type": "number", | "type": "number", | ||
"description": "Total transaction fees incurred by the transactions in this round", | "description": "Total transaction fees incurred by the transactions in this round", | ||
Line 32: | Line 32: | ||
"exclusiveMinimum": false | "exclusiveMinimum": false | ||
}, | }, | ||
− | "outputs" { | + | "outputs": { |
"type": "array", | "type": "array", | ||
"items": { | "items": { | ||
"type": "object", | "type": "object", | ||
"properties": { | "properties": { | ||
− | "outBailmentID" { | + | "outBailmentID": { |
"type": "string", | "type": "string", | ||
"description": "the identifier of the originating nym's outBailment message" | "description": "the identifier of the originating nym's outBailment message" | ||
}, | }, | ||
− | "status" { | + | "status": { |
"type": "string", | "type": "string", | ||
"description": "Status code for the outBailment" | "description": "Status code for the outBailment" | ||
}, | }, | ||
− | "transactions" { | + | "transactions": { |
"type": "array", | "type": "array", | ||
"items": { | "items": { | ||
"type": "object", | "type": "object", | ||
"properties": { | "properties": { | ||
− | "ntxid" { | + | "ntxid": { |
"type": "string", | "type": "string", | ||
"description": "Normalized transaction id associated with the withdrawal" | "description": "Normalized transaction id associated with the withdrawal" | ||
− | } | + | }, |
− | "index" { | + | "index": { |
"type": "number", | "type": "number", | ||
"description": "Output index in transaction which satisfies this outBailmentID", | "description": "Output index in transaction which satisfies this outBailmentID", | ||
"minimum": 0, | "minimum": 0, | ||
"exclusiveMinimum": false | "exclusiveMinimum": false | ||
− | } | + | }, |
− | "amount" { | + | "amount": { |
"type": "number", | "type": "number", | ||
"description": "Monetary value of the output denoted by (ntxid,index), in fundamental units", | "description": "Monetary value of the output denoted by (ntxid,index), in fundamental units", | ||
Line 67: | Line 67: | ||
} | } | ||
} | } | ||
− | } | + | }, |
"minItems": 0, | "minItems": 0, | ||
"uniqueItems": true | "uniqueItems": true | ||
Line 73: | Line 73: | ||
"required": [ "outBailmentID","status" ] | "required": [ "outBailmentID","status" ] | ||
} | } | ||
− | } | + | }, |
"minItems": 1, | "minItems": 1, | ||
"uniqueItems": true | "uniqueItems": true | ||
Line 79: | Line 79: | ||
"required": [ "nextinputstart","nextchangestart","fees","outputs"] | "required": [ "nextinputstart","nextchangestart","fees","outputs"] | ||
} | } | ||
− | } | + | }} |
</pre></code> | </pre></code> | ||
Revision as of 08:45, 15 September 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": {
"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.