-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathaccount_channels.yaml
153 lines (150 loc) · 6.8 KB
/
account_channels.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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
components:
schemas:
AccountChannelsRequest:
$id: AccountChannelsRequestPayload
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.
type: object
allOf:
- $ref: '../base.yaml#/components/schemas/BaseRequest'
- $ref: '../base.yaml#/components/schemas/LookupByLedgerRequest'
properties:
account:
type: string
description: The unique identifier of an account, typically the account's address.
destination_account:
type: string
description: The unique identifier of an account, typically the account's address. If provided, filter results to payment channels whose destination is this account.
limit:
type: number
minimum: 10
maximum: 400
description: Limit the number of transactions to retrieve. Cannot be less than 10 or more than 400. The default is 200.
marker:
# Not specifying a type is how we express the type can be "any" value
description: Value from a previous paginated response. Resume retrieving data where that response left off.
required:
- account
Channel:
$id: Channel
type: object
properties:
account:
type: string
description: The owner of the channel, as an Address.
amount:
type: string
description: The total amount of XRP, in drops allocated to this channel.
balance:
type: string
description: >
The total amount of XRP, in drops, paid out from this channel, as of the ledger version used.
(You can calculate the amount of XRP left in the channel by subtracting balance from amount.)
cancel_after:
type: integer
description: >
Time, in seconds since the Ripple Epoch, of this channel's immutable expiration,
if one was specified at channel creation. If this is before the close time of the
most recent validated ledger, the channel is expired.
channel_id:
type: string
description: >
A unique ID for this channel, as a 64-character hexadecimal string.
This is also the ID of the channel object in the ledger's state data.
destination_account:
type: string
description: The destination account of the channel, as an Address. Only this account can receive the XRP in the channel while it is open.
destination_tag:
type: integer
description: >
A 32-bit unsigned integer to use as a destination tag for payments through this channel,
if one was specified at channel creation. This indicates the payment channel's beneficiary
or other purpose at the destination account.
expiration:
type: integer
description: >
Time, in seconds since the Ripple Epoch, when this channel is set to expire.
This expiration date is mutable. If this is before the close time of the most recent
validated ledger, the channel is expired.
public_key:
type: string
description: >
The public key for the payment channel in the XRP Ledger's base58 format.
Signed claims against this channel must be redeemed with the matching key pair.
public_key_hex:
type: string
description: >
The public key for the payment channel in hexadecimal format, if one was specified at channel creation.
Signed claims against this channel must be redeemed with the matching key pair.
settle_delay:
type: integer
description: >
The number of seconds the payment channel must stay open after the owner of the channel requests to close it.
source_tag:
type: integer
description: >
A 32-bit unsigned integer to use as a source tag for payments through this payment channel,
if one was specified at channel creation. This indicates the payment channel's originator or
other purpose at the source account.
required:
- account
- amount
- balance
- channel_id
- destination_account
- settle_delay
AccountChannelsSuccessResponse:
$id: AccountChannelResponseSuccess
allOf:
- $ref: '../base.yaml#/components/schemas/BaseSuccessResponse'
- $ref: '../base.yaml#/components/schemas/LookupByLedgerRequest'
type: object
properties:
account:
type: string
description: The address of the source/owner of the payment channels. This corresponds to the account field of the request.
channels:
type: array
items:
$ref: '#/components/schemas/Channel'
description: Payment channels owned by this account.
validated:
type: boolean
description: If true, the information in this response comes from a validated ledger version. Otherwise, the information is subject to change.
limit:
type: number
description: The limit to how many channel objects were actually returned by this request.
marker:
# Not specifying a type is how we express the type can be "any" value
description: Server-defined value for pagination. Pass this to the next call to resume getting results where this call left off. Omitted when there are no additional pages after this one.
required:
- account
AccountChannelsErrorResponse:
$id: AccountChannelsResponseError
type: object
properties:
error:
type: string
oneOf:
- $ref: '../base.yaml#/components/schemas/UniversalErrorResponseCodes'
- enum:
- invalidParams
- actNotFound
- lgrNotFound
description: >
* `invalidParams` - One or more fields are specified incorrectly, or one or more required fields are missing.
* `actNotFound` - The address specified in the `account` field of the request does not correspond to an account in the ledger.
* `lgrNotFound` - The ledger specified by the `ledger_hash` or `ledger_index` does not exist, or it does exist but the server does not have it.
status:
type: string
enum:
- error
request:
$ref: '#/components/schemas/AccountChannelsRequest'
required:
- status
- error
- request