ledger-entry-types
Overview
The ledger-entry-types package contains types and functions to handle ledger objects. They are used by other packages, like transaction to type the transaction's fields.
AccountRootAmendmentsAMMBridgeCheckCredentialDelegateDepositPreauthDidDirectoryNodeEscrowFeeSettingsHashesLoanLoanBrokerMPTokenMPTokenIssuanceNegativeUNLNFTokenOfferNFTokenPageOfferOraclePayChannelPermissionedDomainRippleStateSignerListTicketVaultXChainOwnedClaimIDXChainOwnedCreateAccountClaimID
MPT and Oracle values
MPT ledger amount fields use quoted base-10 strings. This includes MPToken.MPTAmount, MPToken.LockedAmount, and the MaximumAmount, OutstandingAmount, and LockedAmount fields on MPTokenIssuance. OwnerNode fields are hexadecimal strings.
MPTokenIssuance.ImmutableFlags contains permanent restrictions and uses the LsifMPT* constants.
if issuance.ImmutableFlags&ledger.LsifMPTMetadata != 0 {
// Metadata can no longer change.
}
PriceData.AssetPrice is a pointer so absent and explicit zero prices stay distinct. Oracle prices accept the XLS-47 Scale range from 0 through 20. Flatten omits Scale when AssetPrice is absent, and Validate rejects a nonzero Scale without a price.
Usage
To import the package, you can use the following code:
import "github.com/Peersyst/xrpl-go/xrpl/ledger-entry-types"