@bithomp/xrpl-api
Version:
A Bithomp JavaScript/TypeScript library for interacting with the XRP Ledger
53 lines (52 loc) • 1.61 kB
TypeScript
import { TransactionMetadata } from "xrpl";
import { FormattedIssuedCurrency, FormattedAmount } from "../../types";
interface FormattedAuctionSlot {
account: string;
authAccounts?: string[];
discountedFee?: number;
expiration?: number;
price?: FormattedAmount;
timeInterval?: number;
}
interface FormattedVoteSlot {
account: string;
tradingFee?: number;
voteWeight?: number;
}
interface FormattedAmmSummaryInterface {
status?: "created" | "modified" | "deleted";
ammID?: string;
account?: string;
asset?: FormattedIssuedCurrency;
asset2?: FormattedIssuedCurrency;
auctionSlot: FormattedAuctionSlot;
lpTokenBalance: FormattedAmount;
tradingFee: number;
ownerNode: string;
voteSlots: FormattedVoteSlot[];
lpTokenBalanceChange?: FormattedAmount;
tradingFeeChanges?: number;
voteSlotsChanges?: FormattedAmmVoteSlotChanges[];
auctionSlotChanges?: FormattedAuctionSlotChanges;
}
interface FormattedAuctionSlotChanges {
accountChanges?: string;
authAccountsChanges?: {
status: string;
account: string;
}[];
discountedFeeChange?: number;
expirationChange?: number;
priceChange?: FormattedAmount;
timeIntervalChange?: number;
}
interface FormattedAmmVoteSlotChanges {
status: "added" | "modified" | "removed";
account: string;
tradingFee?: number;
voteWeight?: number;
tradingFeeChange?: number;
voteWeightChange?: number;
}
declare function parseAmmChanges(metadata: TransactionMetadata): FormattedAmmSummaryInterface | undefined;
export { parseAmmChanges };