-
Notifications
You must be signed in to change notification settings - Fork 520
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(types): Update
FeeSettings
and add id
Adds the new fields for `XRPFees` amendment and id for the `FeeSettings` singleton ledger entry. Closes #2219
- Loading branch information
Showing
2 changed files
with
45 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,49 @@ | ||
import BaseLedgerEntry from './BaseLedgerEntry' | ||
|
||
/** | ||
* The FeeSettings object type contains the current base transaction cost and | ||
* reserve amounts as determined by fee voting. | ||
* | ||
* @category Ledger Entries | ||
*/ | ||
export default interface FeeSettings extends BaseLedgerEntry { | ||
LedgerEntryType: 'FeeSettings' | ||
/** | ||
* The transaction cost of the "reference transaction" in drops of XRP as | ||
* hexadecimal. | ||
*/ | ||
export const FEE_SETTINGS_ID = | ||
'4BC50C9B0D8515D3EAAE1E74B29A95804346C491EE1A95BF25E4AAB854A6A651' | ||
|
||
export interface FeeSettingsPreAmendmentFields { | ||
/** The transaction cost of the "reference transaction" in drops of XRP as hexadecimal. */ | ||
BaseFee: string | ||
/** The BaseFee translated into "fee units". */ | ||
ReferenceFeeUnits: number | ||
/** The base reserve for an account in the XRP Ledger, as drops of XRP. */ | ||
ReserveBase: number | ||
/** The incremental owner reserve for owning objects, as drops of XRP. */ | ||
ReserveIncrement: number | ||
} | ||
|
||
export interface FeeSettingsPostAmendmentFields { | ||
/** The transaction cost of the "reference transaction" in drops of XRP as hexadecimal. */ | ||
BaseFeeDrops: string | ||
/** The base reserve for an account in the XRP Ledger, as drops of XRP. */ | ||
ReserveBaseDrops: string | ||
/** The incremental owner reserve for owning objects, as drops of XRP. */ | ||
ReserveIncrementDrops: string | ||
} | ||
|
||
export interface FeeSettingsBase extends BaseLedgerEntry { | ||
LedgerEntryType: 'FeeSettings' | ||
/** | ||
* A bit-map of boolean flags for this object. No flags are defined for this | ||
* type. | ||
* A bit-map of boolean flags for this object. No flags are defined for this type. | ||
*/ | ||
Flags: number | ||
Flags: 0 | ||
} | ||
|
||
/** | ||
* The FeeSettings object type contains the current base transaction cost and | ||
* reserve amounts as determined by fee voting. | ||
* | ||
* The fields will be based on the status of the `XRPFees` amendment. | ||
* - Before: {@link FeeSettingsPreAmendmentFields} | ||
* - After: {@link FeeSettingsPostAmendmentFields} | ||
* | ||
* @interface | ||
* | ||
* @category Ledger Entries | ||
*/ | ||
type FeeSettings = FeeSettingsBase & | ||
(FeeSettingsPreAmendmentFields | FeeSettingsPostAmendmentFields) | ||
|
||
export default FeeSettings |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters