-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
YAML specification for ledger_entry request (#7)
- Loading branch information
Showing
10 changed files
with
478 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
components: | ||
schemas: | ||
LedgerEntryRequest: | ||
$id: LedgerEntryRequest | ||
type: object | ||
description: > | ||
The ledger_entry method returns a single ledger entry from the XRP Ledger in its raw format. | ||
All information retrieved is relative to a particular version of the ledger. | ||
Returns a LedgerEntryResponse. | ||
allOf: | ||
- $ref: '../../shared/requests/ledger_entry.yaml#/components/schemas/LedgerEntryRequest' | ||
- type: object | ||
properties: | ||
command: | ||
$ref: '../../shared/base.yaml#/components/schemas/CommandTypes' | ||
id: | ||
description: 'A unique identifier for the request.' | ||
required: | ||
- command | ||
- id | ||
example: | ||
id: 3 | ||
command: ledger_entry | ||
index: '13F1A95D7AAB7108D5CE7EEAF504B2894B8C674E6D68499076441C4837282BF8' | ||
ledger_index: 'validated' | ||
|
||
LedgerEntryResponse: | ||
$id: LedgerEntryResponse | ||
type: object | ||
oneOf: | ||
- $ref: '#/components/schemas/LedgerEntrySuccessResponse' | ||
- $ref: '#/components/schemas/LedgerEntryErrorResponse' | ||
properties: | ||
id: | ||
description: 'A unique identifier for the request.' | ||
type: | ||
type: string | ||
description: The value response indicates a direct response to an API request. Asynchronous notifications use a different value such as `ledgerClosed` or `transaction`. | ||
enum: | ||
- response | ||
required: | ||
- id | ||
- type | ||
example: | ||
id: 3 | ||
status: success | ||
type: response | ||
result: | ||
index: '13F1A95D7AAB7108D5CE7EEAF504B2894B8C674E6D68499076441C4837282BF8' | ||
ledger_index: 54321 | ||
node: | ||
Account: 'rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn' | ||
Balance: '148446663' | ||
Flags: 8388608 | ||
LedgerEntryType: 'AccountRoot' | ||
OwnerCount: 3 | ||
PreviousTxnID: '13F1A95D7AAB7108D5CE7EEAF504B2894B8C674E6D68499076441C4837282BF8' | ||
PreviousTxnLgrSeq: 54320 | ||
Sequence: 336 | ||
|
||
LedgerEntryErrorResponse: | ||
$id: LedgerEntryErrorResponse | ||
oneOf: | ||
- $ref: '../../shared/base.yaml#/components/schemas/WebsocketErrorFields' | ||
- $ref: '../../shared/requests/ledger_entry.yaml#/components/schemas/LedgerEntryErrorResponse' | ||
properties: | ||
status: | ||
type: string | ||
enum: | ||
- error | ||
|
||
LedgerEntrySuccessResponse: | ||
$id: LedgerEntrySuccessResponse | ||
properties: | ||
result: | ||
type: object | ||
allOf: | ||
- $ref: '../../shared/requests/ledger_entry.yaml#/components/schemas/LedgerEntrySuccessResponse' | ||
status: | ||
type: string | ||
enum: | ||
- success | ||
required: | ||
- status |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
components: | ||
schemas: | ||
LedgerEntryRequest: | ||
type: object | ||
description: > | ||
The ledger_entry method returns a single ledger entry from the XRP Ledger in its raw format. | ||
All information retrieved is relative to a particular version of the ledger. | ||
Returns a LedgerEntryResponse. | ||
properties: | ||
method: | ||
type: string | ||
enum: | ||
- ledger_entry | ||
params: | ||
type: array | ||
items: | ||
$ref: '../../shared/requests/ledger_entry.yaml#/components/schemas/LedgerEntryRequest' | ||
required: | ||
- method | ||
example: | ||
method: 'ledger_entry' | ||
params: | ||
- ledger_index: 'validated' | ||
binary: false | ||
index: '13F1A95D7AAB7108D5CE7EEAF504B2894B8C674E6D68499076441C4837282BF8' | ||
|
||
LedgerEntryResponse: | ||
type: object | ||
properties: | ||
result: | ||
type: object | ||
discriminator: | ||
propertyName: status | ||
mapping: | ||
success: '../../shared/requests/ledger_entry.yaml#/components/schemas/LedgerEntrySuccessResponse' | ||
error: '../../shared/requests/ledger_entry.yaml#/components/schemas/LedgerEntryErrorResponse' | ||
oneOf: | ||
- $ref: '../../shared/requests/ledger_entry.yaml#/components/schemas/LedgerEntrySuccessResponse' | ||
- $ref: '../../shared/requests/ledger_entry.yaml#/components/schemas/LedgerEntryErrorResponse' | ||
required: | ||
- result | ||
example: | ||
result: | ||
index: '13F1A95D7AAB7108D5CE7EEAF504B2894B8C674E6D68499076441C4837282BF8' | ||
ledger_index: 54321 | ||
node: | ||
Account: 'rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn' | ||
Balance: '148446663' | ||
Flags: 8388608 | ||
LedgerEntryType: 'AccountRoot' | ||
OwnerCount: 3 | ||
PreviousTxnID: '13F1A95D7AAB7108D5CE7EEAF504B2894B8C674E6D68499076441C4837282BF8' | ||
PreviousTxnLgrSeq: 54320 | ||
Sequence: 336 | ||
status: 'success' |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.