UNPKG

@bithomp/xrpl-api

Version:

A Bithomp JavaScript/TypeScript library for interacting with the XRP Ledger

174 lines (173 loc) 6.31 kB
import { LedgerEntry, AccountSetAsfFlags } from "xrpl"; import { QueueData } from "../types/queue_data"; export declare enum XahauAccountRootFlags { lsfTshCollect = 33554432, lsfURITokenIssuer = 1073741824, lsfDisallowIncomingRemit = 2147483648 } export declare const AccountRootFlagsKeys: { passwordSpent: LedgerEntry.AccountRootFlags; requireDestTag: LedgerEntry.AccountRootFlags; requireAuth: LedgerEntry.AccountRootFlags; depositAuth: LedgerEntry.AccountRootFlags; disallowXRP: LedgerEntry.AccountRootFlags; disableMaster: LedgerEntry.AccountRootFlags; noFreeze: LedgerEntry.AccountRootFlags; globalFreeze: LedgerEntry.AccountRootFlags; defaultRipple: LedgerEntry.AccountRootFlags; disallowIncomingNFTokenOffer: LedgerEntry.AccountRootFlags; disallowIncomingCheck: LedgerEntry.AccountRootFlags; disallowIncomingPayChan: LedgerEntry.AccountRootFlags; disallowIncomingTrustline: LedgerEntry.AccountRootFlags; }; export declare const XRPLAccountRootFlagsKeys: { allowTrustLineClawback: LedgerEntry.AccountRootFlags; passwordSpent: LedgerEntry.AccountRootFlags; requireDestTag: LedgerEntry.AccountRootFlags; requireAuth: LedgerEntry.AccountRootFlags; depositAuth: LedgerEntry.AccountRootFlags; disallowXRP: LedgerEntry.AccountRootFlags; disableMaster: LedgerEntry.AccountRootFlags; noFreeze: LedgerEntry.AccountRootFlags; globalFreeze: LedgerEntry.AccountRootFlags; defaultRipple: LedgerEntry.AccountRootFlags; disallowIncomingNFTokenOffer: LedgerEntry.AccountRootFlags; disallowIncomingCheck: LedgerEntry.AccountRootFlags; disallowIncomingPayChan: LedgerEntry.AccountRootFlags; disallowIncomingTrustline: LedgerEntry.AccountRootFlags; }; export declare const XahauAccountRootFlagsKeys: { tshCollect: XahauAccountRootFlags; uriTokenIssuer: XahauAccountRootFlags; disallowIncomingRemit: XahauAccountRootFlags; passwordSpent: LedgerEntry.AccountRootFlags; requireDestTag: LedgerEntry.AccountRootFlags; requireAuth: LedgerEntry.AccountRootFlags; depositAuth: LedgerEntry.AccountRootFlags; disallowXRP: LedgerEntry.AccountRootFlags; disableMaster: LedgerEntry.AccountRootFlags; noFreeze: LedgerEntry.AccountRootFlags; globalFreeze: LedgerEntry.AccountRootFlags; defaultRipple: LedgerEntry.AccountRootFlags; disallowIncomingNFTokenOffer: LedgerEntry.AccountRootFlags; disallowIncomingCheck: LedgerEntry.AccountRootFlags; disallowIncomingPayChan: LedgerEntry.AccountRootFlags; disallowIncomingTrustline: LedgerEntry.AccountRootFlags; }; export declare function getAccountRootFlagsKeys(): Record<string, number>; export interface AccountRootFlagsKeysInterface { passwordSpent?: boolean; requireDestTag?: boolean; requireAuth?: boolean; depositAuth?: boolean; disallowXRP?: boolean; disableMaster?: boolean; noFreeze?: boolean; globalFreeze?: boolean; defaultRipple?: boolean; disallowIncomingNFTokenOffer?: boolean; disallowIncomingCheck?: boolean; disallowIncomingPayChan?: boolean; disallowIncomingTrustline?: boolean; allowTrustLineClawback?: boolean; tshCollect?: boolean; uriTokenIssuer?: boolean; disallowIncomingRemit?: boolean; } export declare enum XahauAccountSetAsfFlags { asfTshCollect = 11, asfDisallowIncomingRemit = 16 } export declare const AccountSetFlags: { requireDestinationTag: AccountSetAsfFlags; requireAuthorization: AccountSetAsfFlags; depositAuth: AccountSetAsfFlags; disallowIncomingXRP: AccountSetAsfFlags; disableMasterKey: AccountSetAsfFlags; enableTransactionIDTracking: AccountSetAsfFlags; noFreeze: AccountSetAsfFlags; globalFreeze: AccountSetAsfFlags; defaultRipple: AccountSetAsfFlags; authorizedMinter: AccountSetAsfFlags; disallowIncomingNFTokenOffer: AccountSetAsfFlags; disallowIncomingCheck: AccountSetAsfFlags; disallowIncomingPayChan: AccountSetAsfFlags; disallowIncomingTrustline: AccountSetAsfFlags; allowTrustLineClawback: AccountSetAsfFlags; tshCollect: XahauAccountSetAsfFlags; disallowIncomingRemit: XahauAccountSetAsfFlags; }; export declare const SignerListFlagsKeys: { oneOwnerCount: LedgerEntry.SignerListFlags; }; export interface SignerListFlagsKeysInterface { oneOwnerCount?: boolean; } export declare const AccountFields: { EmailHash: { name: string; encoding: string; length: number; defaults: string; }; MessageKey: { name: string; }; Domain: { name: string; encoding: string; }; TransferRate: { name: string; defaults: number; shift: number; }; TickSize: { name: string; defaults: number; }; RegularKey: { name: string; }; NFTokenMinter: { name: string; }; WalletLocator: { name: string; }; }; export interface AccountInfoResponse extends AccountSignerListResponse { account_data: AccountInfoDataResponse; ledger_current_index?: number; ledger_index?: number; queue_data?: QueueData; validated?: boolean; } export interface AccountSignerListResponse { signer_lists?: LedgerEntry.SignerList[]; } export interface AccountInfoDataResponse extends LedgerEntry.AccountRoot, AccountSignerListResponse { } export interface AccountFieldsInterface { blackholed?: boolean; emailHash?: string; messageKey?: string; domain?: string; transferRate?: number; tickSize?: number; regularKey?: string; nftokenMinter?: string; walletLocator?: string; } export interface AccountSettingsInterface extends AccountFieldsInterface, AccountRootFlagsKeysInterface { } export declare function getSettings(accountInfo: AccountInfoDataResponse, excludeFalse?: boolean): AccountSettingsInterface; export declare function parseAccountFlags(value: number, options?: { excludeFalse?: boolean; }): AccountRootFlagsKeysInterface; export declare function parseAccountFields(accountInfo: AccountInfoDataResponse, options?: { excludeFalse?: boolean; }): AccountFieldsInterface; export declare function parseSignerListFlags(value: number, options?: { excludeFalse?: boolean; }): SignerListFlagsKeysInterface;