-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathpayment.yaml
86 lines (83 loc) · 4.68 KB
/
payment.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
components:
schemas:
PaymentTransactionBase:
$id: PaymentTransactionBase
description: >
A Payment transaction represents a transfer of value from one account to another. (Depending on the path taken, this can involve additional exchanges of value, which occur atomically.) This transaction type can be used for several types of payments.
Payments are also the only way to create accounts.
type: object
allOf:
- $ref: '../base.yaml#/components/schemas/BaseTransaction'
properties:
TransactionType:
type: string
enum: [Payment]
DeliverMin:
$ref: '../base.yaml#/components/schemas/CurrencyAmount'
description: '(Optional) Minimum amount of destination currency this transaction should deliver. Only valid if this is a partial payment. For non-XRP amounts, the nested field names are lower-case.'
Destination:
type: string
description: 'The unique address of the account receiving the payment.'
DestinationTag:
type: integer
description: '(Optional) Arbitrary tag that identifies the reason for the payment to the destination, or a hosted recipient to pay.'
InvoiceID:
type: string
description: '(Optional) Arbitrary 256-bit hash representing a specific reason or identifier for this payment.'
Paths:
type: array
items:
type: array
items:
$ref: '#/components/schemas/PathStep'
description: '(Optional, auto-fillable) Array of payment paths to be used for this transaction. Must be omitted for XRP-to-XRP transactions.'
SendMax:
$ref: '../base.yaml#/components/schemas/CurrencyAmount'
description: '(Optional) Highest amount of source currency this transaction is allowed to cost, including transfer fees, exchange rates, and slippage. Does not include the XRP destroyed as a cost for submitting the transaction. For non-XRP amounts, the nested field names MUST be lower-case. Must be supplied for cross-currency/cross-issue payments. Must be omitted for XRP-to-XRP payments.'
required:
- TransactionType
- Destination
PaymentTransactionV1:
$id: PaymentTransactionV1
type: object
allOf:
- $ref: '#/components/schemas/PaymentTransactionBase'
properties:
Amount:
$ref: '../base.yaml#/components/schemas/CurrencyAmount'
description: 'Only available in API v1. The maximum amount of currency to deliver. For non-XRP amounts, the nested field names MUST be lower-case. If the tfPartialPayment flag is set, deliver up to this amount instead.'
required:
- Amount
PaymentTransactionV2:
$id: PaymentTransactionV2
type: object
allOf:
- $ref: '#/components/schemas/PaymentTransactionBase'
properties:
DeliverMax:
$ref: '../base.yaml#/components/schemas/CurrencyAmount'
description: 'Only available in API v2. The maximum amount of currency to deliver. For non-XRP amounts, the nested field names MUST be lower-case. If the tfPartialPayment flag is set, deliver up to this amount instead. New in: rippled 2.0.0'
required:
- DeliverMax
PathStep:
$id: PathStep
description: A PathStep represents an individual step along a Path.
type: object
properties:
account:
type: string
format: address
description: '(Optional) If present, this path step represents rippling through the specified address. MUST NOT be provided if this step specifies the currency or issuer fields.'
currency:
type: string
description: '(Optional) If present, this path step represents changing currencies through an order book. The currency specified indicates the new currency. MUST NOT be provided if this step specifies the account field.'
issuer:
type: string
format: address
description: '(Optional) If present, this path step represents changing currencies and this address defines the issuer of the new currency. If omitted in a step with a non-XRP currency, a previous step of the path defines the issuer. If present when currency is omitted, indicates a path step that uses an order book between same-named currencies with different issuers. MUST be omitted if the currency is XRP. MUST NOT be provided if this step specifies the account field.'
type:
type: integer
description: 'DEPRECATED (Optional) An indicator of which other fields are present.'
type_hex:
type: string
description: 'DEPRECATED: (Optional) A hexadecimal representation of the type field.'