feat(types): define new account_flags field (#2352)

The `account_flags` field was added to the `account_info` response for `rippled@1.11.0`
This commit is contained in:
Caleb Kniffen
2023-06-27 15:14:48 -05:00
committed by GitHub
parent b152ebc4ce
commit 97552cc1a5
3 changed files with 68 additions and 1 deletions

View File

@@ -11,6 +11,7 @@ Subscribe to [the **xrpl-announce** mailing list](https://groups.google.com/g/xr
* Add `nft_page` to `ledger_entry` request.
* Add types for `NFTokenPage` and `NFTokenOffer` LedgerEntries.
* Add type for NFToken object that is stored on a `NFTokenPage`.
* Add type for `account_info`'s `account_flags` property.
## 2.8.0 (2023-06-13)

View File

@@ -73,6 +73,62 @@ interface QueueData {
transactions?: QueueTransaction[]
}
export interface AccountInfoAccountFlags {
/**
* Enable rippling on this address's trust lines by default. Required for issuing addresses; discouraged for others.
*/
defaultRipple: boolean
/**
* This account can only receive funds from transactions it sends, and from preauthorized accounts.
* (It has DepositAuth enabled.)
*/
depositAuth: boolean
/**
* Disallows use of the master key to sign transactions for this account.
*/
disableMasterKey: boolean
/**
* Disallow incoming Checks from other accounts.
*/
disallowIncomingCheck?: boolean
/**
* Disallow incoming NFTOffers from other accounts. Part of the DisallowIncoming amendment.
*/
disallowIncomingNFTokenOffer?: boolean
/**
* Disallow incoming PayChannels from other accounts. Part of the DisallowIncoming amendment.
*/
disallowIncomingPayChan?: boolean
/**
* Disallow incoming Trustlines from other accounts. Part of the DisallowIncoming amendment.
*/
disallowIncomingTrustline?: boolean
/**
* Client applications should not send XRP to this account. Not enforced by rippled.
*/
disallowIncomingXRP: boolean
/**
* All assets issued by this address are frozen.
*/
globalFreeze: boolean
/**
* This address cannot freeze trust lines connected to it. Once enabled, cannot be disabled.
*/
noFreeze: boolean
/**
* The account has used its free SetRegularKey transaction.
*/
passwordSpent: boolean
/**
* This account must individually approve other users for those users to hold this account's issued currencies.
*/
requireAuthorization: boolean
/**
* Requires incoming payments to specify a Destination Tag.
*/
requireDestinationTag: boolean
}
/**
* Response expected from an {@link AccountInfoRequest}.
*
@@ -89,6 +145,11 @@ export interface AccountInfoResponse extends BaseResponse {
* present.
*/
account_data: AccountRoot & { signer_lists?: SignerList[] }
/**
* A map of account flags parsed out. This will only be available for rippled nodes 1.11.0 and higher.
*/
account_flags?: AccountInfoAccountFlags
/**
* The ledger index of the current in-progress ledger, which was used when
* retrieving this information.

View File

@@ -6,7 +6,11 @@ import {
AccountCurrenciesRequest,
AccountCurrenciesResponse,
} from './accountCurrencies'
import { AccountInfoRequest, AccountInfoResponse } from './accountInfo'
import {
AccountInfoAccountFlags,
AccountInfoRequest,
AccountInfoResponse,
} from './accountInfo'
import { AccountLinesRequest, AccountLinesResponse } from './accountLines'
import { AccountNFTsRequest, AccountNFTsResponse } from './accountNFTs'
import { AccountObjectsRequest, AccountObjectsResponse } from './accountObjects'
@@ -184,6 +188,7 @@ export {
AccountChannelsResponse,
AccountCurrenciesRequest,
AccountCurrenciesResponse,
AccountInfoAccountFlags,
AccountInfoRequest,
AccountInfoResponse,
AccountLinesRequest,