Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make Operation.Status optional #63

Merged
merged 3 commits into from
Nov 5, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions api.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"openapi":"3.0.2",
"info": {
"version":"1.4.6",
"version":"1.4.7",
"title":"Rosetta",
"description":"Build Once. Integrate Your Blockchain Everywhere.",
"license": {
Expand Down Expand Up @@ -941,12 +941,11 @@
}
},
"Operation": {
"description":"Operations contain all balance-changing information within a transaction. They are always one-sided (only affect 1 AccountIdentifier) and can succeed or fail independently from a Transaction.",
"description":"Operations contain all balance-changing information within a transaction. They are always one-sided (only affect 1 AccountIdentifier) and can succeed or fail independently from a Transaction. Operations are used both to represent on-chain data (Data API) and to construct new transactions (Construction API), creating a standard interface for reading and writing to blockchains.",
"type":"object",
"required": [
"operation_identifier",
"type",
"status"
"type"
],
"properties": {
"operation_identifier": {
Expand All @@ -968,12 +967,12 @@
]
},
"type": {
"description":"The network-specific type of the operation. Ensure that any type that can be returned here is also specified in the NetworkOptionsResponse. This can be very useful to downstream consumers that parse all block data.",
"description":"Type is the network-specific type of the operation. Ensure that any type that can be returned here is also specified in the NetworkOptionsResponse. This can be very useful to downstream consumers that parse all block data.",
"type":"string",
"example":"Transfer"
},
"status": {
"description":"The network-specific status of the operation. Status is not defined on the transaction object because blockchains with smart contracts may have transactions that partially apply. Blockchains with atomic transactions (all operations succeed or all operations fail) will have the same status for each operation.",
"description":"Status is the network-specific status of the operation. Status is not defined on the transaction object because blockchains with smart contracts may have transactions that partially apply (some operations are successful and some are not). Blockchains with atomic transactions (all operations succeed or all operations fail) will have the same status for each operation. On-chain operations (operations retrieved in the `/block` and `/block/transaction` endpoints) MUST have a populated status field (anything on-chain must have succeeded or failed). However, operations provided during transaction construction (often times called \"intent\" in the documentation) MUST NOT have a populated status field (operations yet to be included on-chain have not yet succeeded or failed).",
"type":"string",
"example":"Reverted"
},
Expand Down
2 changes: 1 addition & 1 deletion api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

openapi: 3.0.2
info:
version: 1.4.6
version: 1.4.7
title: Rosetta
description: |
Build Once. Integrate Your Blockchain Everywhere.
Expand Down
19 changes: 13 additions & 6 deletions models/Operation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,14 @@ description: |
Operations contain all balance-changing information within a
transaction. They are always one-sided (only affect 1 AccountIdentifier)
and can succeed or fail independently from a Transaction.

Operations are used both to represent on-chain data (Data API) and to construct
new transactions (Construction API), creating a standard interface for reading
and writing to blockchains.
type: object
required:
- operation_identifier
- type
- status
properties:
operation_identifier:
$ref: 'OperationIdentifier.yaml'
Expand All @@ -40,18 +43,22 @@ properties:
- index: 2
type:
description: |
The network-specific type of the operation. Ensure that any type that can be returned here is also
Type is the network-specific type of the operation. Ensure that any type that can be returned here is also
specified in the NetworkOptionsResponse. This can be very useful to downstream consumers that parse all
block data.
type: string
example: "Transfer"
status:
description: |
The network-specific status of the operation. Status is not defined on the transaction object
because blockchains with smart contracts may have transactions that partially apply.
Status is the network-specific status of the operation. Status is not defined on the transaction object
because blockchains with smart contracts may have transactions that partially apply (some operations
are successful and some are not). Blockchains with atomic transactions (all operations succeed or
all operations fail) will have the same status for each operation.

Blockchains with atomic transactions (all operations succeed or all operations fail) will have
the same status for each operation.
On-chain operations (operations retrieved in the `/block` and `/block/transaction` endpoints) MUST have
a populated status field (anything on-chain must have succeeded or failed). However, operations provided
during transaction construction (often times called "intent" in the documentation) MUST NOT
have a populated status field (operations yet to be included on-chain have not yet succeeded or failed).
type: string
example: "Reverted"
account:
Expand Down