-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathaccount_channels_open_api.yaml
64 lines (62 loc) · 2.9 KB
/
account_channels_open_api.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
components:
schemas:
AccountChannelsRequest:
type: object
description: >
The account_channels method returns information about an account's Payment Channels.
This includes only channels where the specified account is the channel's source, not the destination.
(A channel's source and owner are the same.) All information retrieved is relative to a particular version of the ledger.
Returns an AccountChannelsResponse.
properties:
method:
type: string
enum: # This is the most supported way to define a specific string as the only valid input. `const` is a new keyword which is supported in OpenAPI, but not in all corresponding codegen tools. https://github.com/OAI/OpenAPI-Specification/issues/1313
- account_channels
params:
type: array
items:
$ref: '../../shared/requests/account_channels.yaml#/components/schemas/AccountChannelsRequest'
required:
- method
example:
method: 'account_channels'
params:
- account: 'rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn'
destination_account: 'ra5nK24KXen9AHvsdFTKHSANinZseWnPcX'
ledger_index": 'validated'
AccountChannelsResponse:
type: object
properties:
result:
type: object
discriminator:
propertyName: status
mapping:
success: '../../shared/requests/account_channels.yaml#/components/schemas/AccountChannelsSuccessResponse'
error: '../../shared/requests/account_channels.yaml#/components/schemas/AccountChannelsErrorResponse'
oneOf:
- $ref: '../../shared/requests/account_channels.yaml#/components/schemas/AccountChannelsSuccessResponse'
- $ref: '../../shared/requests/account_channels.yaml#/components/schemas/AccountChannelsErrorResponse'
required:
- result
example:
result:
account: rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn
channels:
- account: rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn
amount: '1000'
balance: '0'
channel_id: C7F634794B79DB40E87179A9D1BF05D05797AE7E92DF8E93FD6656E8C4BE3AE7
destination_account: ra5nK24KXen9AHvsdFTKHSANinZseWnPcX
public_key: aBR7mdD75Ycs8DRhMgQ4EMUEmBArF8SEh1hfjrT2V9DQTLNbJVqw
public_key_hex: 03CFD18E689434F032A4E84C63E2A3A6472D684EAF4FD52CA67742F3E24BAE81B2
settle_delay: 60
ledger_hash: 27F530E5C93ED5C13994812787C1ED073C822BAEC7597964608F2C049C2ACD2D
ledger_index: 71766343
status: success
validated: true
AccountChannelsSuccessResponse:
type: object
allOf:
- $ref: '../../shared/base.yaml#/components/schemas/BaseSuccessResponse'
- $ref: '../../shared/requests/account_channels.yaml#/components/schemas/AccountChannelsSuccessResponse'