-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathwebsocket_api_v2.yaml
96 lines (92 loc) · 3.7 KB
/
websocket_api_v2.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
# TODO:
# Simplify this repo to re-use specifications
# Most of the two api's are identical, they just need slightly different formats / keywords in:
# - This file in particular
# - And in the response types
# Conceptually unique things to prototype
# Requests / responses
# Subscriptions
# Submit request (As it will have transaction types as a requirement)
asyncapi: '2.6.0'
defaultContentType: application/json
id: urn:xrp-ledger:public-api-v2
tags:
- name: xrp-ledger
description: API related to XRP Ledger
info:
title: XRP Ledger Public API
contact:
name: Ripple Dev Support
url: https://ripple.com/contact
email: [email protected]
description: A WebSocket API used to query rippled.
license:
name: MIT License
url: https://opensource.org/license/mit/
version: 2.0.0
servers:
# TODO: Should this list contain non-ripple servers? All UNL ws_urls? Just public infrastructure?
mainnet:
url: wss://s1.ripple.com:51233
protocol: wss
description: Mainnet Public API server
# TODO: Should testnet / devnet / xahau / etc. be on this list?
testnet:
url: wss://s.altnet.rippletest.net:51233
protocol: wss
description: Testnet (not for production usage)
channels:
/:
# In AsyncAPI 2.x 'subscribe' is from the api's perspective - so an end user sends a request to
# a channel where the api is 'subscribed'. This is changed in 3.0.0.
description: The root channel for sending requests and receiving responses.
subscribe:
operationId: subscribeToRoot
message:
oneOf:
- name: AccountChannelsRequest
messageId: AccountChannelsRequest
contentType: application/json
payload:
$ref: './requests/account_channels_async_api.yaml#/components/schemas/AccountChannelsRequest'
- name: AccountInfoRequest
messageId: AccountInfoRequest
contentType: application/json
payload:
$ref: './requests/account_info_async_api.yaml#/components/schemas/AccountInfoRequest'
- name: AccountLinesRequest
messageId: AccountLinesRequest
contentType: application/json
payload:
$ref: './requests/account_lines_async_api.yaml#/components/schemas/AccountLinesRequest'
- name: LedgerEntryRequest
messageId: LedgerEntryRequest
contentType: application/json
payload:
$ref: './requests/ledger_entry_async_api.yaml#/components/schemas/LedgerEntryRequest'
# TODO: Add additional request types for individual requests here
publish:
operationId: publishToRoot
message:
oneOf:
- name: AccountChannelsResponse
messageId: AccountChannelsResponse
contentType: application/json
payload:
$ref: './requests/account_channels_async_api.yaml#/components/schemas/AccountChannelsResponse'
- name: AccountInfoResponse
messageId: AccountInfoResponse
contentType: application/json
payload:
$ref: './requests/account_info_async_api.yaml#/components/schemas/AccountInfoResponseV2'
- name: AccountLinesResponse
messageId: AccountLinesResponse
contentType: application/json
payload:
$ref: './requests/account_lines_async_api.yaml#/components/schemas/AccountLinesResponse'
- name: LedgerEntryResponse
messageId: LedgerEntryResponse
contentType: application/json
payload:
$ref: './requests/ledger_entry_async_api.yaml#/components/schemas/LedgerEntryResponse'
# TODO: Add additional response types for individual requests here