Files
xahau.js/packages/ripple-binary-codec/src/enums
Omar Khan 9d94f4a8ab rename XLS-20 fields (#1966)
* rename TokenTaxon -> NFTokenTaxon

* rename MintedTokens -> MintedNFTokens

* rename BurnedTokens -> BurnedNFTokens

* update binary for NFTokenID rename

* rename TokenID -> NFTokenID

* rename TokenOffers -> NFTokenOffers

* rename BrokerFee -> NFTokenBrokerFee

* rename Minter -> NFTokenMinter

* rename NonFungibleToken -> NFToken

* rename NonFungibleTokens -> NFTokens

* rename BuyOffer -> NFTokenBuyOffer

* rename SellOffer -> NFTokenSellOffer

* rename OfferNode -> NFTokenOfferNode

* fix binary for serialize tests

* Add missing MintedNFTokens def + fix tests

* nftokenid -> nft_id

* asfAuthorizedMinter -> asfAuthorizedNFTokenMinter

* Update tec/tem error codes

* Add new definitions

* Update HISTORY.md

* Change to 1.4.0 for binary-codec

* Docgen

* Update HISTORY.md

Co-authored-by: Jackson Mills <jmills@ripple.com>
2022-04-19 10:02:18 -07:00
..
2022-04-19 10:02:18 -07:00
2021-12-17 18:26:47 -05:00
2020-09-08 17:17:14 -05:00
2021-11-12 02:41:28 -05:00

Definitions

Types

These are the types associated with a given Serialization Field. Each type has an arbitrary type_code, with lower codes sorting first.

Ledger Entry Types

Each ledger's state tree contain ledger objects, which represent all settings, balances, and relationships in the shared ledger.

Fields

These are Serialization Fields (sf) defined in rippled's SField.cpp. Fields with undefined values are omitted before encoding.

Key

The key is the string defined in the rippled source code, such as "LedgerEntry", "Transaction", etc.

nth

nth is the sort code, meaning "nth of type." It is is combined with the type code in order to construct the Field ID of this field. The Field ID is only used for sorting the fields. Since there are multiple fields with the same data type, the nth is used to deterministically order each field among other fields of the same data type.

Each field has a Field ID, which is used to sort fields that have the same type as one another with lower codes sorting first.

For example, the Account field has sort code (nth) 1, so it comes before the Destination field which has sort code 3.

Sort code numbers are reused for fields of different types, but different fields of the same type never have the same sort code. When you combine the type code with the sort code, you get the field's unique Field ID.

The unique Field ID is prefixed before the field in the final serialized blob. The size of the Field ID is one to three bytes depending on the type code and the field codes it combines.

isVLEncoded

If true, the field is Variable Length encoded and length-prefixed. The variable-length encoded fields are STI_VL/Blob, STI_ACCOUNT/AccountID, and STI_VECTOR256/Vector256.

isSerialized

Fields are serialized if they are not one of these or if they are not an SField.

isSigningField

True unless the field is specified with SField::notSigning.

Transaction Results

See:

TODO: Write a script to read rippled's source file and generate the necessary mapping.

Transaction Types

See https://github.com/ripple/rippled/blob/develop/src/ripple/protocol/TxFormats.h