mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-11-28 08:05:51 +00:00
fix: add AMM to BaseLedgerEntry and AccountObject types (#2449)
- Add AMM to BaseLedgerEntry and AccountObject types. - Add amm_account to amm_info request - Add AMMID to AccountRoot Co-authored-by: Caleb Kniffen <ckniffen@ripple.com>
This commit is contained in:
@@ -75,4 +75,12 @@ export default interface AMM extends BaseLedgerEntry {
|
||||
* type, so this value is always 0.
|
||||
*/
|
||||
Flags: 0
|
||||
/**
|
||||
* This field is missing on AMM but is present on all other account_object returned objects.
|
||||
*/
|
||||
PreviousTxnID: never
|
||||
/**
|
||||
* This field is missing on AMM but is present on all other account_object returned objects.
|
||||
*/
|
||||
PreviousTxnLgrSeq: never
|
||||
}
|
||||
|
||||
@@ -38,6 +38,12 @@ export default interface AccountRoot extends BaseLedgerEntry {
|
||||
* `asfAccountTxnID` flag enabled.
|
||||
*/
|
||||
AccountTxnID?: string
|
||||
/**
|
||||
* The ledger entry ID of the corresponding AMM ledger entry.
|
||||
* Set during account creation; cannot be modified.
|
||||
* If present, indicates that this is a special AMM AccountRoot; always omitted on non-AMM accounts.
|
||||
*/
|
||||
AMMID?: string
|
||||
/**
|
||||
* A domain associated with this account. In JSON, this is the hexadecimal
|
||||
* for the ASCII representation of the domain.
|
||||
|
||||
@@ -3,6 +3,7 @@ import AccountRoot, {
|
||||
AccountRootFlagsInterface,
|
||||
} from './AccountRoot'
|
||||
import Amendments, { Majority, AMENDMENTS_ID } from './Amendments'
|
||||
import AMM, { VoteSlot } from './AMM'
|
||||
import Check from './Check'
|
||||
import DepositPreauth from './DepositPreauth'
|
||||
import DirectoryNode from './DirectoryNode'
|
||||
@@ -30,6 +31,7 @@ export {
|
||||
AccountRootFlagsInterface,
|
||||
AMENDMENTS_ID,
|
||||
Amendments,
|
||||
AMM,
|
||||
Check,
|
||||
DepositPreauth,
|
||||
DirectoryNode,
|
||||
@@ -55,4 +57,5 @@ export {
|
||||
SignerList,
|
||||
SignerListFlags,
|
||||
Ticket,
|
||||
VoteSlot,
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import {
|
||||
AMM,
|
||||
Check,
|
||||
DepositPreauth,
|
||||
Escrow,
|
||||
@@ -12,6 +13,7 @@ import {
|
||||
import { BaseRequest, BaseResponse, LookupByLedgerRequest } from './baseMethod'
|
||||
|
||||
export type AccountObjectType =
|
||||
| 'amm'
|
||||
| 'check'
|
||||
| 'deposit_preauth'
|
||||
| 'escrow'
|
||||
@@ -64,6 +66,7 @@ export interface AccountObjectsRequest
|
||||
* PayChannel, a SignerList, a Ticket, or a RippleState.
|
||||
*/
|
||||
export type AccountObject =
|
||||
| AMM
|
||||
| Check
|
||||
| DepositPreauth
|
||||
| Escrow
|
||||
|
||||
@@ -11,15 +11,20 @@ import { BaseRequest, BaseResponse } from './baseMethod'
|
||||
export interface AMMInfoRequest extends BaseRequest {
|
||||
command: 'amm_info'
|
||||
|
||||
/**
|
||||
* The address of the AMM Account to look up.
|
||||
*/
|
||||
amm_account?: string
|
||||
|
||||
/**
|
||||
* One of the assets of the AMM pool to look up.
|
||||
*/
|
||||
asset: Currency
|
||||
asset?: Currency
|
||||
|
||||
/**
|
||||
* The other asset of the AMM pool.
|
||||
*/
|
||||
asset2: Currency
|
||||
asset2?: Currency
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user