mirror of
https://github.com/XRPLF/xrpl-dev-portal.git
synced 2025-11-20 03:35:51 +00:00
Serialization: fix typos, make tx internal types consistent w/ serialization docs
This commit is contained in:
@@ -21,7 +21,7 @@ The result is a single binary blob that can be signed using well-known signature
|
||||
|
||||
## Internal Format
|
||||
|
||||
Each field has an "internal" binary format used in the `rippled` source code to represent that field when signing (and in most other cases). The internal formats for all fields are defined in the source code of [`SField.cpp`](https://github.com/ripple/rippled/blob/master/src/ripple/protocol/impl/SField.cpp). (This file also includes fields other than transaction fields. The [Transaction Format Reference](transaction-formats.html) also lists the internal formats for all transaction fields. <!--{# TODO: Clean up the "Internal Format" type listing and come up with an explicit definition of every type. #}-->
|
||||
Each field has an "internal" binary format used in the `rippled` source code to represent that field when signing (and in most other cases). The internal formats for all fields are defined in the source code of [`SField.cpp`](https://github.com/ripple/rippled/blob/master/src/ripple/protocol/impl/SField.cpp). (This file also includes fields other than transaction fields.) The [Transaction Format Reference](transaction-formats.html) also lists the internal formats for all transaction fields.
|
||||
|
||||
For example, the `Flags` [common transaction field](transaction-common-fields.html) becomes a UInt32 (32-bit unsigned integer).
|
||||
|
||||
@@ -102,13 +102,18 @@ Some types of fields are Variable-Length encoding, which means they are not alwa
|
||||
Variable-length fields are encoded with one to three bytes indicating the length of the field immediately after the type prefix and before the contents.
|
||||
|
||||
- If the field contains 0 to 192 bytes of data, the first byte defines the length of the VariableLength data, then that many bytes of data follow immediately after the length byte.
|
||||
|
||||
- If the field contains 193 to 12480 bytes of data, the first two bytes indicate the length of the field with the following formula:
|
||||
|
||||
193 + ((byte1 - 193) * 256) + byte2
|
||||
|
||||
- If the field contains 12481 to 918744 bytes of data, the first three bytes indicate the length of the field with the following formula:
|
||||
12481 + ((byte1 - 241) * 65536) + (byte2 * 256) + byte3;
|
||||
|
||||
12481 + ((byte1 - 241) * 65536) + (byte2 * 256) + byte3
|
||||
|
||||
- A variable-length field cannot contain more than 918744 bytes of data.
|
||||
|
||||
When decoding, you can tell from the value of the first length byte whether there are 0, 1, or 2 more length bytes:
|
||||
When decoding, you can tell from the value of the first length byte whether there are 0, 1, or 2 additional length bytes:
|
||||
|
||||
- If the first length byte has a value of 192 or less, then that's the only length byte and it contains the exact length of the field contents in bytes.
|
||||
- If the first length byte has a value of 193 to 240, then there are two length bytes.
|
||||
@@ -122,7 +127,7 @@ Transaction instructions may contain fields of any of the following types:
|
||||
| Type Name | Type Code | Variable-Length? | Description |
|
||||
|:--------------|:----------|:-----------------|:------------------------------|
|
||||
| [AccountID][] | 8 | Yes | The unique identifier for an [account](accounts.html). This field is variable-length encoded, but always exactly 20 bytes. |
|
||||
| [Amount][] | 6 | No | An amount of XRP or issued currency. The length of the field is 64 bits for XRP or |
|
||||
| [Amount][] | 6 | No | An amount of XRP or issued currency. The length of the field is 64 bits for XRP or 384 bits (64+160+160) for issued currencies. |
|
||||
| [Blob][] | 7 | Yes | Arbitrary binary data. One important such field is `TxnSignature`, the signature that authorizes a transaction. |
|
||||
| [Hash128][] | 4 | No | A 128-bit arbitrary binary value. The only such field is `EmailHash`, which is intended to store the MD-5 hash of an account owner's email for purposes of fetching a [Gravatar](https://www.gravatar.com/). |
|
||||
| [Hash160][] | 17 | No | A 160-bit arbitrary binary value. This may define a currency code or issuer. |
|
||||
@@ -219,12 +224,12 @@ The following example shows the serialization format for an object (a single `Me
|
||||
|
||||
The `Paths` field of a cross-currency [Payment transaction][] is a "PathSet", represented in JSON as an array of arrays. For more information on what paths are used for, see [Paths](paths.html).
|
||||
|
||||
A PathSet is serialized as **one or more** individual paths in sequence. Each complete path is followed by a byte that indicates what comes next:
|
||||
A PathSet is serialized as **1 to 6** individual paths in sequence[[Source]](https://github.com/ripple/rippled/blob/4cff94f7a4a05302bdf1a248515379da99c5bcd4/src/ripple/app/tx/impl/Payment.h#L35-L36 "Source"). Each complete path is followed by a byte that indicates what comes next:
|
||||
|
||||
- `0xff` indicates another path follows
|
||||
- `0x00` indicates the end of the PathSet
|
||||
|
||||
Each path consists of **one or more** path steps in order. Each step starts with a **type** byte, followed by one or more fields describing the path step. The type indicates which fields are present in that path step through bitwise flags. (For example, the value `0x30` indicates changing both currency and issuer.) If more than one field is present, the fields are always placed in a specific order.
|
||||
Each path consists of **1 to 8** path steps in order[[Source]](https://github.com/ripple/rippled/blob/4cff94f7a4a05302bdf1a248515379da99c5bcd4/src/ripple/app/tx/impl/Payment.h#L38-L39 "Source"). Each step starts with a **type** byte, followed by one or more fields describing the path step. The type indicates which fields are present in that path step through bitwise flags. (For example, the value `0x30` indicates changing both currency and issuer.) If more than one field is present, the fields are always placed in a specific order.
|
||||
|
||||
The following table describes the possible fields and the bitwise flags to set in the type byte to indicate them:
|
||||
|
||||
|
||||
@@ -14,8 +14,8 @@ Every transaction has the same set of common fields, plus additional fields base
|
||||
| [Memos][] | Array of Objects | Array | _(Optional)_ Additional arbitrary information used to identify this transaction. |
|
||||
| [Signers][] | Array | Array | _(Optional)_ Array of objects that represent a [multi-signature](multi-signing.html) which authorizes this transaction. |
|
||||
| SourceTag | Unsigned Integer | UInt32 | _(Optional)_ Arbitrary integer used to identify the reason for this payment, or a sender on whose behalf this transaction is made. Conventionally, a refund should specify the initial payment's `SourceTag` as the refund payment's `DestinationTag`. |
|
||||
| SigningPubKey | String | VariableLength | _(Automatically added when signing)_ Hex representation of the public key that corresponds to the private key used to sign this transaction. If an empty string, indicates a multi-signature is present in the `Signers` field instead. |
|
||||
| TxnSignature | String | VariableLength | _(Automatically added when signing)_ The signature that verifies this transaction as originating from the account it says it is from. |
|
||||
| SigningPubKey | String | Blob | _(Automatically added when signing)_ Hex representation of the public key that corresponds to the private key used to sign this transaction. If an empty string, indicates a multi-signature is present in the `Signers` field instead. |
|
||||
| TxnSignature | String | Blob | _(Automatically added when signing)_ The signature that verifies this transaction as originating from the account it says it is from. |
|
||||
|
||||
[auto-fillable]: #auto-fillable-fields
|
||||
[AccountTxnID]: #accounttxnid
|
||||
@@ -89,9 +89,9 @@ The `Memos` field includes arbitrary messaging data with the transaction. It is
|
||||
|
||||
| Field | Type | [Internal Type][] | Description |
|
||||
|:-----------|:-------|:------------------|:-----------------------------------|
|
||||
| MemoData | String | VariableLength | Arbitrary hex value, conventionally containing the content of the memo. |
|
||||
| MemoFormat | String | VariableLength | Hex value representing characters allowed in URLs. Conventionally containing information on how the memo is encoded, for example as a [MIME type](http://www.iana.org/assignments/media-types/media-types.xhtml). |
|
||||
| MemoType | String | VariableLength | Hex value representing characters allowed in URLs. Conventionally, a unique relation (according to [RFC 5988](http://tools.ietf.org/html/rfc5988#section-4)) that defines the format of this memo. |
|
||||
| MemoData | String | Blob | Arbitrary hex value, conventionally containing the content of the memo. |
|
||||
| MemoFormat | String | Blob | Hex value representing characters allowed in URLs. Conventionally containing information on how the memo is encoded, for example as a [MIME type](http://www.iana.org/assignments/media-types/media-types.xhtml). |
|
||||
| MemoType | String | Blob | Hex value representing characters allowed in URLs. Conventionally, a unique relation (according to [RFC 5988](http://tools.ietf.org/html/rfc5988#section-4)) that defines the format of this memo. |
|
||||
|
||||
The MemoType and MemoFormat fields should only consist of the following characters: `ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~:/?#[]@!$&'()*+,;=%`
|
||||
|
||||
@@ -125,7 +125,7 @@ The `Signers` field contains a [multi-signature](multi-signing.html), which has
|
||||
|:--------------|:-------|:------------------|:--------------------------------|
|
||||
| Account | String | AccountID | The address associated with this signature, as it appears in the SignerList. |
|
||||
| TxnSignature | String | Blob | A signature for this transaction, verifiable using the `SigningPubKey`. |
|
||||
| SigningPubKey | String | PubKey | The public key used to create this signature. |
|
||||
| SigningPubKey | String | Blob | The public key used to create this signature. |
|
||||
|
||||
The `SigningPubKey` must be a key that is associated with the `Account` address. If the referenced `Account` is a funded account in the ledger, then the SigningPubKey can be that account's current Regular Key if one is set. It could also be that account's Master Key, unless the [lsfDisableMaster](accountroot.html#accountroot-flags) flag is enabled. If the referenced `Account` address is not a funded account in the ledger, then the `SigningPubKey` must be the master key associated with that address.
|
||||
|
||||
|
||||
@@ -22,17 +22,23 @@ An AccountSet transaction modifies the properties of an [account in the XRP Ledg
|
||||
<!--{# fix md highlighting_ #}-->
|
||||
|
||||
|
||||
| Field | JSON Type | [Internal Type][] | Description |
|
||||
|:-------------------------------|:-----------------|:------------------|:-----|
|
||||
| [ClearFlag](#accountset-flags) | Unsigned Integer | UInt32 | _(Optional)_ Unique identifier of a flag to disable for this account. |
|
||||
| [Domain](#domain) | String | VariableLength | _(Optional)_ The domain that owns this account, as a string of hex representing the ASCII for the domain in lowercase. |
|
||||
| EmailHash | String | Hash128 | _(Optional)_ Hash of an email address to be used for generating an avatar image. Conventionally, clients use [Gravatar](http://en.gravatar.com/site/implement/hash/) to display this image. |
|
||||
| MessageKey | String | PubKey | _(Optional)_ Public key for sending encrypted messages to this account. |
|
||||
| [SetFlag](#accountset-flags) | Unsigned Integer | UInt32 | _(Optional)_ Integer flag to enable for this account. |
|
||||
| [TransferRate](accountset.html#transferrate) | Unsigned Integer | UInt32 | _(Optional)_ The fee to charge when users transfer this account's issued currencies, represented as billionths of a unit. Cannot be more than `2000000000` or less than `1000000000`, except for the special case `0` meaning no fee. |
|
||||
| [TickSize](ticksize.html) | Unsigned Integer | UInt8 | _(Optional)_ Tick size to use for offers involving a currency issued by this address. The exchange rates of those offers is rounded to this many significant digits. Valid values are `3` to `15` inclusive, or `0` to disable. _(Requires the [TickSize amendment](known-amendments.html#ticksize).)_ |
|
||||
| WalletLocator | String | Hash256 | _(Optional)_ Not used. |
|
||||
| WalletSize | Unsigned Integer | UInt32 | _(Optional)_ Not used. |
|
||||
| Field | JSON Type | [Internal Type][] | Description |
|
||||
|:-----------------|:-----------------|:------------------|:-------------------|
|
||||
| [ClearFlag][] | Number | UInt32 | _(Optional)_ Unique identifier of a flag to disable for this account. |
|
||||
| [Domain][] | String | Blob | _(Optional)_ The domain that owns this account, as a string of hex representing the ASCII for the domain in lowercase. |
|
||||
| EmailHash | String | Hash128 | _(Optional)_ Hash of an email address to be used for generating an avatar image. Conventionally, clients use [Gravatar](http://en.gravatar.com/site/implement/hash/) to display this image. |
|
||||
| MessageKey | String | Blob | _(Optional)_ Public key for sending encrypted messages to this account. |
|
||||
| [SetFlag][] | Number | UInt32 | _(Optional)_ Integer flag to enable for this account. |
|
||||
| [TransferRate][] | Unsigned Integer | UInt32 | _(Optional)_ The fee to charge when users transfer this account's issued currencies, represented as billionths of a unit. Cannot be more than `2000000000` or less than `1000000000`, except for the special case `0` meaning no fee. |
|
||||
| [TickSize][] | Unsigned Integer | UInt8 | _(Optional)_ Tick size to use for offers involving a currency issued by this address. The exchange rates of those offers is rounded to this many significant digits. Valid values are `3` to `15` inclusive, or `0` to disable. _(Requires the [TickSize amendment](known-amendments.html#ticksize).)_ |
|
||||
| WalletLocator | String | Hash256 | _(Optional)_ Not used. |
|
||||
| WalletSize | Number | UInt32 | _(Optional)_ Not used. |
|
||||
|
||||
[ClearFlag]: #accountset-flags
|
||||
[Domain]: #domain
|
||||
[SetFlag]: #accountset-flags
|
||||
[TickSize]: ticksize.html
|
||||
[TransferRate]: accountset.html#transferrate
|
||||
|
||||
If none of these options are provided, then the AccountSet transaction has no effect (beyond destroying the transaction cost). See [Cancel or Skip a Transaction](cancel-or-skip-a-transaction.html) for more details.
|
||||
|
||||
|
||||
@@ -22,11 +22,11 @@ Since the funds for a check are not guaranteed, redeeming a Check can fail becau
|
||||
{% include '_snippets/tx-fields-intro.md' %}
|
||||
<!--{# fix md highlighting_ #}-->
|
||||
|
||||
| Field | JSON Type | [Internal Type][] | Description |
|
||||
|:------------|:----------|:------------------|:-------------------------------|
|
||||
| `CheckID` | String | Hash256 | The ID of the [Check ledger object](check.html) to cash, as a 64-character hexadecimal string. |
|
||||
| `Amount` | [Currency Amount][] | Amount | _(Optional)_ Redeem the Check for exactly this amount, if possible. The currency must match that of the `SendMax` of the corresponding CheckCreate transaction. You must provide either this field or `DeliverMin`. |
|
||||
| `DeliverMin` | [Currency Amount][] | Amount | _(Optional)_ Redeem the Check for at least this amount and for as much as possible. The currency must match that of the `SendMax` of the corresponding CheckCreate transaction. You must provide either this field or `Amount`. |
|
||||
| Field | JSON Type | [Internal Type][] | Description |
|
||||
|:-------------|:--------------------|:------------------|:--------------------|
|
||||
| `CheckID` | String | Hash256 | The ID of the [Check ledger object](check.html) to cash, as a 64-character hexadecimal string. |
|
||||
| `Amount` | [Currency Amount][] | Amount | _(Optional)_ Redeem the Check for exactly this amount, if possible. The currency must match that of the `SendMax` of the corresponding CheckCreate transaction. You must provide either this field or `DeliverMin`. |
|
||||
| `DeliverMin` | [Currency Amount][] | Amount | _(Optional)_ Redeem the Check for at least this amount and for as much as possible. The currency must match that of the `SendMax` of the corresponding CheckCreate transaction. You must provide either this field or `Amount`. |
|
||||
|
||||
The transaction ***must*** include either `Amount` or `DeliverMin`, but not both.
|
||||
|
||||
|
||||
@@ -27,8 +27,8 @@ Create a Check object in the ledger, which is a deferred payment that can be cas
|
||||
|:-----------------|:--------------------|:------------------|:----------------|
|
||||
| `Destination` | String | Account | The unique address of the [account](accounts.html) that can cash the Check. |
|
||||
| `SendMax` | [Currency Amount][] | Amount | Maximum amount of source currency the Check is allowed to debit the sender, including [transfer fees](transfer-fees.html) on non-XRP currencies. The Check can only credit the destination with the same currency (from the same issuer, for non-XRP currencies). For non-XRP amounts, the nested field names MUST be lower-case. |
|
||||
| `DestinationTag` | Unsigned Integer | UInt32 | _(Optional)_ Arbitrary tag that identifies the reason for the Check, or a hosted recipient to pay. |
|
||||
| `Expiration` | Unsigned Integer | UInt32 | _(Optional)_ Time after which the Check is no longer valid, in [seconds since the Ripple Epoch][]. |
|
||||
| `DestinationTag` | Number | UInt32 | _(Optional)_ Arbitrary tag that identifies the reason for the Check, or a hosted recipient to pay. |
|
||||
| `Expiration` | Number | UInt32 | _(Optional)_ Time after which the Check is no longer valid, in [seconds since the Ripple Epoch][]. |
|
||||
| `InvoiceID` | String | Hash256 | _(Optional)_ Arbitrary 256-bit hash representing a specific reason or identifier for this Check. |
|
||||
|
||||
## Error Cases
|
||||
|
||||
@@ -21,10 +21,10 @@ Return escrowed XRP to the sender.
|
||||
<!--{# fix md highlighting_ #}-->
|
||||
|
||||
|
||||
| Field | JSON Type | [Internal Type][] | Description |
|
||||
|:----------------|:-----------------|:------------------|:--------------------------|
|
||||
| `Owner` | String | AccountID | Address of the source account that funded the escrow payment.
|
||||
| `OfferSequence` | Unsigned Integer | UInt32 | Transaction sequence of [EscrowCreate transaction][] that created the escrow to cancel.
|
||||
| Field | JSON Type | [Internal Type][] | Description |
|
||||
|:----------------|:----------|:------------------|:---------------------------|
|
||||
| `Owner` | String | AccountID | Address of the source account that funded the escrow payment. |
|
||||
| `OfferSequence` | Number | UInt32 | Transaction sequence of [EscrowCreate transaction][] that created the escrow to cancel. |
|
||||
|
||||
Any account may submit an EscrowCancel transaction.
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ Sequester XRP until the escrow process either finishes or is canceled.
|
||||
| `Destination` | String | AccountID | Address to receive escrowed XRP. |
|
||||
| `CancelAfter` | Number | UInt32 | _(Optional)_ The time, in [seconds since the Ripple Epoch][], when this escrow expires. This value is immutable; the funds can only be returned the sender after this time. |
|
||||
| `FinishAfter` | Number | UInt32 | _(Optional)_ The time, in [seconds since the Ripple Epoch][], when the escrowed XRP can be released to the recipient. This value is immutable; the funds cannot move until this time is reached. |
|
||||
| `Condition` | String | VariableLength | _(Optional)_ Hex value representing a [PREIMAGE-SHA-256 crypto-condition](https://tools.ietf.org/html/draft-thomas-crypto-conditions-02#section-8.1). The funds can only be delivered to the recipient if this condition is fulfilled. |
|
||||
| `Condition` | String | Blob | _(Optional)_ Hex value representing a [PREIMAGE-SHA-256 crypto-condition](https://tools.ietf.org/html/draft-thomas-crypto-conditions-02#section-8.1). The funds can only be delivered to the recipient if this condition is fulfilled. |
|
||||
| `DestinationTag` | Number | UInt32 | _(Optional)_ Arbitrary tag to further specify the destination for this escrowed payment, such as a hosted recipient at the destination address. |
|
||||
|
||||
Either `CancelAfter` or `FinishAfter` must be specified. If both are included, the `FinishAfter` time must be before the `CancelAfter` time.
|
||||
|
||||
@@ -23,12 +23,12 @@ Deliver XRP from a held payment to the recipient.
|
||||
<!--{# fix md highlighting_ #}-->
|
||||
|
||||
|
||||
| Field | JSON Type | [Internal Type][] | Description |
|
||||
|:----------------|:-----------------|:------------------|:--------------------------|
|
||||
| `Owner` | String | AccountID | Address of the source account that funded the held payment.
|
||||
| `OfferSequence` | Unsigned Integer | UInt32 | Transaction sequence of [EscrowCreate transaction][] that created the held payment to finish.
|
||||
| `Condition` | String | VariableLength | _(Optional)_ Hex value matching the previously-supplied [PREIMAGE-SHA-256 crypto-condition](https://tools.ietf.org/html/draft-thomas-crypto-conditions-02#section-8.1) of the held payment. |
|
||||
| `Fulfillment` | String | VariableLength | _(Optional)_ Hex value of the [PREIMAGE-SHA-256 crypto-condition fulfillment](https://tools.ietf.org/html/draft-thomas-crypto-conditions-02#section-8.1.4) matching the held payment's `Condition`. |
|
||||
| Field | JSON Type | [Internal Type][] | Description |
|
||||
|:----------------|:-----------------|:------------------|:--------------------|
|
||||
| `Owner` | String | AccountID | Address of the source account that funded the held payment. |
|
||||
| `OfferSequence` | Unsigned Integer | UInt32 | Transaction sequence of [EscrowCreate transaction][] that created the held payment to finish. |
|
||||
| `Condition` | String | Blob | _(Optional)_ Hex value matching the previously-supplied [PREIMAGE-SHA-256 crypto-condition](https://tools.ietf.org/html/draft-thomas-crypto-conditions-02#section-8.1) of the held payment. |
|
||||
| `Fulfillment` | String | Blob | _(Optional)_ Hex value of the [PREIMAGE-SHA-256 crypto-condition fulfillment](https://tools.ietf.org/html/draft-thomas-crypto-conditions-02#section-8.1.4) matching the held payment's `Condition`. |
|
||||
|
||||
Any account may submit an EscrowFinish transaction.
|
||||
|
||||
|
||||
@@ -22,9 +22,9 @@ An OfferCancel transaction removes an Offer object from the XRP Ledger.
|
||||
<!--{# fix md highlighting_ #}-->
|
||||
|
||||
|
||||
| Field | JSON Type | [Internal Type][] | Description |
|
||||
|:--------------|:-----------------|:------------------|:----------------------|
|
||||
| OfferSequence | Unsigned Integer | UInt32 | The sequence number of a previous OfferCreate transaction. If specified, cancel any offer object in the ledger that was created by that transaction. It is not considered an error if the offer specified does not exist. |
|
||||
| Field | JSON Type | [Internal Type][] | Description |
|
||||
|:--------------|:----------|:------------------|:-----------------------------|
|
||||
| OfferSequence | Number | UInt32 | The sequence number of a previous OfferCreate transaction. If specified, cancel any offer object in the ledger that was created by that transaction. It is not considered an error if the offer specified does not exist. |
|
||||
|
||||
*Tip:* To remove an old offer and replace it with a new one, you can use an [OfferCreate transaction][] with an `OfferSequence` parameter, instead of using OfferCancel and another OfferCreate.
|
||||
|
||||
|
||||
@@ -29,12 +29,14 @@ For more information about how Offers work, see [Offers](offers.html).
|
||||
<!--{# fix md highlighting_ #}-->
|
||||
|
||||
|
||||
| Field | JSON Type | [Internal Type][] | Description |
|
||||
|:--------------------------|:--------------------|:------------------|:-------|
|
||||
| [Expiration](offers.html#offer-expiration) | Unsigned Integer | UInt32 | _(Optional)_ Time after which the offer is no longer active, in [seconds since the Ripple Epoch][]. |
|
||||
| OfferSequence | Unsigned Integer | UInt32 | _(Optional)_ An offer to delete first, specified in the same way as [OfferCancel][]. |
|
||||
| TakerGets | [Currency Amount][] | Amount | The amount and type of currency being provided by the offer creator. |
|
||||
| TakerPays | [Currency Amount][] | Amount | The amount and type of currency being requested by the offer creator. |
|
||||
| Field | JSON Type | [Internal Type][] | Description |
|
||||
|:---------------|:--------------------|:------------------|:------------------|
|
||||
| [Expiration][] | Number | UInt32 | _(Optional)_ Time after which the offer is no longer active, in [seconds since the Ripple Epoch][]. |
|
||||
| OfferSequence | Number | UInt32 | _(Optional)_ An offer to delete first, specified in the same way as [OfferCancel][]. |
|
||||
| TakerGets | [Currency Amount][] | Amount | The amount and type of currency being provided by the offer creator. |
|
||||
| TakerPays | [Currency Amount][] | Amount | The amount and type of currency being requested by the offer creator. |
|
||||
|
||||
[Expiration]: offers.html#offer-expiration
|
||||
|
||||
## OfferCreate Flags
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ Payments are also the only way to [create accounts](#creating-accounts).
|
||||
|:---------------|:---------------------|:------------------|:-----------------|
|
||||
| Amount | [Currency Amount][] | Amount | The amount of currency to deliver. For non-XRP amounts, the nested field names MUST be lower-case. If the [**tfPartialPayment** flag](#payment-flags) is set, deliver _up to_ this amount instead. |
|
||||
| Destination | String | Account | The unique address of the account receiving the payment. |
|
||||
| DestinationTag | Unsigned Integer | UInt32 | _(Optional)_ Arbitrary tag that identifies the reason for the payment to the destination, or a hosted recipient to pay. |
|
||||
| DestinationTag | Number | UInt32 | _(Optional)_ Arbitrary tag that identifies the reason for the payment to the destination, or a hosted recipient to pay. |
|
||||
| InvoiceID | String | Hash256 | _(Optional)_ Arbitrary 256-bit hash representing a specific reason or identifier for this payment. |
|
||||
| Paths | Array of path arrays | PathSet | (Optional, auto-fillable) Array of [payment paths](paths.html) to be used for this transaction. Must be omitted for XRP-to-XRP transactions. |
|
||||
| SendMax | [Currency Amount][] | Amount | _(Optional)_ Highest amount of source currency this transaction is allowed to cost, including [transfer fees](transfer-fees.html), exchange rates, and [slippage](http://en.wikipedia.org/wiki/Slippage_%28finance%29). Does not include the [XRP destroyed as a cost for submitting the transaction](transaction-cost.html). 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. |
|
||||
|
||||
@@ -44,8 +44,8 @@ The **destination address** of a channel can:
|
||||
| `Channel` | String | Hash256 | The unique ID of the channel, as a 64-character hexadecimal string. |
|
||||
| `Balance` | String | Amount | _(Optional)_ Total amount of [XRP, in drops][Currency Amount], delivered by this channel after processing this claim. Required to deliver XRP. Must be more than the total amount delivered by the channel so far, but not greater than the `Amount` of the signed claim. Must be provided except when closing the channel. |
|
||||
| `Amount` | String | Amount | _(Optional)_ The amount of [XRP, in drops][Currency Amount], authorized by the `Signature`. This must match the amount in the signed message. This is the cumulative amount of XRP that can be dispensed by the channel, including XRP previously redeemed. |
|
||||
| `Signature` | String | VariableLength | _(Optional)_ The signature of this claim, as hexadecimal. The signed message contains the channel ID and the amount of the claim. Required unless the sender of the transaction is the source address of the channel. |
|
||||
| `PublicKey` | String | PubKey | _(Optional)_ The public key used for the signature, as hexadecimal. This must match the `PublicKey` stored in the ledger for the channel. Required unless the sender of the transaction is the source address of the channel and the `Signature` field is omitted. (The transaction includes the PubKey so that `rippled` can check the validity of the signature before trying to apply the transaction to the ledger.) |
|
||||
| `Signature` | String | Blob | _(Optional)_ The signature of this claim, as hexadecimal. The signed message contains the channel ID and the amount of the claim. Required unless the sender of the transaction is the source address of the channel. |
|
||||
| `PublicKey` | String | Blob | _(Optional)_ The public key used for the signature, as hexadecimal. This must match the `PublicKey` stored in the ledger for the channel. Required unless the sender of the transaction is the source address of the channel and the `Signature` field is omitted. (The transaction includes the PubKey so that `rippled` can check the validity of the signature before trying to apply the transaction to the ledger.) |
|
||||
|
||||
|
||||
## PaymentChannelClaim Flags
|
||||
|
||||
@@ -30,7 +30,7 @@ Create a unidirectional channel and fund it with XRP. The address sending this t
|
||||
| `Amount` | String | Amount | Amount of [XRP, in drops][Currency Amount], to deduct from the sender's balance and set aside in this channel. While the channel is open, the XRP can only go to the `Destination` address. When the channel closes, any unclaimed XRP is returned to the source address's balance. |
|
||||
| `Destination` | String | AccountID | Address to receive XRP claims against this channel. This is also known as the "destination address" for the channel. Cannot be the same as the sender (`Account`). |
|
||||
| `SettleDelay` | Number | UInt32 | Amount of time the source address must wait before closing the channel if it has unclaimed XRP. |
|
||||
| `PublicKey` | String | PubKey | The public key of the key pair the source will use to sign claims against this channel, in hexadecimal. This can be any secp256k1 or Ed25519 public key. <!-- STYLE_OVERRIDE: will --> |
|
||||
| `PublicKey` | String | Blob | The public key of the key pair the source will use to sign claims against this channel, in hexadecimal. This can be any secp256k1 or Ed25519 public key. <!-- STYLE_OVERRIDE: will --> |
|
||||
| `CancelAfter` | Number | UInt32 | _(Optional)_ The time, in [seconds since the Ripple Epoch][], when this channel expires. Any transaction that would modify the channel after this time closes the channel without otherwise affecting it. This value is immutable; the channel can be closed earlier than this time but cannot remain open after this time. |
|
||||
| `DestinationTag` | Number | UInt32 | _(Optional)_ Arbitrary tag to further specify the destination for this payment channel, such as a hosted recipient at the destination address. |
|
||||
|
||||
|
||||
@@ -25,14 +25,14 @@ Create or modify a trust line linking two accounts.
|
||||
{% include '_snippets/tx-fields-intro.md' %}
|
||||
<!--{# fix md highlighting_ #}-->
|
||||
|
||||
| Field | JSON Type | [Internal Type][] | Description |
|
||||
|:-------------------------|:-----------------|:------------------|:-----------|
|
||||
| `LimitAmount` | Object | Amount | Object defining the trust line to create or modify, in the format of a [Currency Amount][]. |
|
||||
| `LimitAmount`.`currency` | String | (Amount.currency) | The currency to this trust line applies to, as a three-letter [ISO 4217 Currency Code](http://www.xe.com/iso4217.php) or a 160-bit hex value according to [currency format](currency-formats.html). "XRP" is invalid. |
|
||||
| `LimitAmount`.`value` | String | (Amount.value) | Quoted decimal representation of the limit to set on this trust line. |
|
||||
| `LimitAmount`.`issuer` | String | (Amount.issuer) | The address of the account to extend trust to. |
|
||||
| `QualityIn` | Unsigned Integer | UInt32 | _(Optional)_ Value incoming balances on this trust line at the ratio of this number per 1,000,000,000 units. A value of `0` is shorthand for treating balances at face value. |
|
||||
| `QualityOut` | Unsigned Integer | UInt32 | _(Optional)_ Value outgoing balances on this trust line at the ratio of this number per 1,000,000,000 units. A value of `0` is shorthand for treating balances at face value. |
|
||||
| Field | JSON Type | [Internal Type][] | Description |
|
||||
|:-------------------------|:----------|:------------------|:------------------|
|
||||
| `LimitAmount` | Object | Amount | Object defining the trust line to create or modify, in the format of a [Currency Amount][]. |
|
||||
| `LimitAmount`.`currency` | String | (Amount.currency) | The currency to this trust line applies to, as a three-letter [ISO 4217 Currency Code](http://www.xe.com/iso4217.php) or a 160-bit hex value according to [currency format](currency-formats.html). "XRP" is invalid. |
|
||||
| `LimitAmount`.`value` | String | (Amount.value) | Quoted decimal representation of the limit to set on this trust line. |
|
||||
| `LimitAmount`.`issuer` | String | (Amount.issuer) | The address of the account to extend trust to. |
|
||||
| `QualityIn` | Number | UInt32 | _(Optional)_ Value incoming balances on this trust line at the ratio of this number per 1,000,000,000 units. A value of `0` is shorthand for treating balances at face value. |
|
||||
| `QualityOut` | Number | UInt32 | _(Optional)_ Value outgoing balances on this trust line at the ratio of this number per 1,000,000,000 units. A value of `0` is shorthand for treating balances at face value. |
|
||||
|
||||
|
||||
## TrustSet Flags
|
||||
|
||||
Reference in New Issue
Block a user