@bithomp/xrpl-api 3.5.0 → 3.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (180) hide show
  1. package/lib/client.js +3 -2
  2. package/lib/common/index.d.ts +2 -0
  3. package/lib/common/index.js +3 -1
  4. package/lib/ledger/transaction.js +4 -4
  5. package/lib/models/account_info.js +1 -1
  6. package/lib/models/index.d.ts +2 -1
  7. package/lib/models/index.js +3 -1
  8. package/lib/parse/ledger/amount.js +3 -0
  9. package/lib/parse/ledger/batch-flags.d.ts +5 -0
  10. package/lib/parse/ledger/batch-flags.js +8 -0
  11. package/lib/parse/ledger/global-flags.d.ts +4 -0
  12. package/lib/parse/ledger/global-flags.js +8 -0
  13. package/lib/parse/ledger/ledger.js +35 -1
  14. package/lib/parse/ledger/tx-account-set-flags.d.ts +4 -0
  15. package/lib/parse/ledger/tx-account-set-flags.js +42 -0
  16. package/lib/parse/ledger/tx-amm-clawback-flags.d.ts +6 -0
  17. package/lib/parse/ledger/tx-amm-clawback-flags.js +8 -0
  18. package/lib/parse/ledger/tx-amm-deposit-flags.d.ts +6 -0
  19. package/lib/parse/ledger/tx-amm-deposit-flags.js +8 -0
  20. package/lib/parse/ledger/tx-amm-withdraw-flags.d.ts +6 -0
  21. package/lib/parse/ledger/tx-amm-withdraw-flags.js +8 -0
  22. package/lib/parse/ledger/tx-batch-flags.d.ts +6 -0
  23. package/lib/parse/ledger/tx-batch-flags.js +8 -0
  24. package/lib/parse/ledger/tx-global-flags.d.ts +5 -0
  25. package/lib/parse/ledger/tx-global-flags.js +8 -0
  26. package/lib/parse/ledger/tx-mptoken-authorize-flags.d.ts +6 -0
  27. package/lib/parse/ledger/tx-mptoken-authorize-flags.js +8 -0
  28. package/lib/parse/ledger/tx-mptoken-issuance-create-flags.d.ts +6 -0
  29. package/lib/parse/ledger/tx-mptoken-issuance-create-flags.js +8 -0
  30. package/lib/parse/ledger/tx-mptoken-issuance-set-flags.d.ts +6 -0
  31. package/lib/parse/ledger/tx-mptoken-issuance-set-flags.js +8 -0
  32. package/lib/parse/ledger/tx-nftoken-mint-flags.d.ts +6 -0
  33. package/lib/parse/ledger/tx-nftoken-mint-flags.js +8 -0
  34. package/lib/parse/ledger/tx-nftoken-offer-create-flags.d.ts +6 -0
  35. package/lib/parse/ledger/tx-nftoken-offer-create-flags.js +8 -0
  36. package/lib/parse/ledger/tx-offer-create-flags.d.ts +6 -0
  37. package/lib/parse/ledger/tx-offer-create-flags.js +8 -0
  38. package/lib/parse/ledger/tx-payment-flags.d.ts +6 -0
  39. package/lib/parse/ledger/tx-payment-flags.js +8 -0
  40. package/lib/parse/ledger/tx-trust-set-flags.d.ts +6 -0
  41. package/lib/parse/ledger/tx-trust-set-flags.js +8 -0
  42. package/lib/parse/ledger/tx-uritoken-mint-flags.d.ts +6 -0
  43. package/lib/parse/ledger/tx-uritoken-mint-flags.js +8 -0
  44. package/lib/parse/outcome/emitted_txns.d.ts +1 -1
  45. package/lib/parse/outcome/emitted_txns.js +6 -5
  46. package/lib/parse/outcome.js +9 -9
  47. package/lib/parse/specification/account-delete.d.ts +1 -1
  48. package/lib/parse/specification/account-delete.js +3 -1
  49. package/lib/parse/specification/amendment.d.ts +1 -1
  50. package/lib/parse/specification/amendment.js +3 -1
  51. package/lib/parse/specification/amm-bid.d.ts +1 -1
  52. package/lib/parse/specification/amm-bid.js +3 -1
  53. package/lib/parse/specification/amm-clawback.d.ts +1 -1
  54. package/lib/parse/specification/amm-clawback.js +3 -3
  55. package/lib/parse/specification/amm-create.d.ts +1 -1
  56. package/lib/parse/specification/amm-create.js +3 -1
  57. package/lib/parse/specification/amm-delete.d.ts +1 -1
  58. package/lib/parse/specification/amm-delete.js +3 -1
  59. package/lib/parse/specification/amm-deposit.d.ts +1 -1
  60. package/lib/parse/specification/amm-deposit.js +3 -3
  61. package/lib/parse/specification/amm-vote.d.ts +1 -1
  62. package/lib/parse/specification/amm-vote.js +3 -1
  63. package/lib/parse/specification/amm-withdraw.d.ts +1 -1
  64. package/lib/parse/specification/amm-withdraw.js +3 -3
  65. package/lib/parse/specification/batch.d.ts +4 -0
  66. package/lib/parse/specification/batch.js +83 -0
  67. package/lib/parse/specification/check-cancel.d.ts +1 -1
  68. package/lib/parse/specification/check-cancel.js +3 -1
  69. package/lib/parse/specification/check-cash.d.ts +1 -1
  70. package/lib/parse/specification/check-cash.js +3 -1
  71. package/lib/parse/specification/check-create.d.ts +1 -1
  72. package/lib/parse/specification/check-create.js +3 -1
  73. package/lib/parse/specification/clawback.d.ts +1 -1
  74. package/lib/parse/specification/clawback.js +3 -1
  75. package/lib/parse/specification/credential-accept.d.ts +2 -1
  76. package/lib/parse/specification/credential-accept.js +3 -1
  77. package/lib/parse/specification/credential-create.d.ts +2 -1
  78. package/lib/parse/specification/credential-create.js +3 -1
  79. package/lib/parse/specification/credential-delete.d.ts +2 -1
  80. package/lib/parse/specification/credential-delete.js +4 -2
  81. package/lib/parse/specification/delegate-set.d.ts +1 -1
  82. package/lib/parse/specification/delegate-set.js +3 -1
  83. package/lib/parse/specification/deposit-preauth.d.ts +1 -1
  84. package/lib/parse/specification/deposit-preauth.js +12 -1
  85. package/lib/parse/specification/did-delete.d.ts +1 -1
  86. package/lib/parse/specification/did-delete.js +3 -1
  87. package/lib/parse/specification/did-set.d.ts +1 -1
  88. package/lib/parse/specification/did-set.js +3 -1
  89. package/lib/parse/specification/escrow-cancel.d.ts +1 -1
  90. package/lib/parse/specification/escrow-cancel.js +3 -1
  91. package/lib/parse/specification/escrow-create.d.ts +1 -1
  92. package/lib/parse/specification/escrow-create.js +3 -1
  93. package/lib/parse/specification/escrow-finish.d.ts +1 -1
  94. package/lib/parse/specification/escrow-finish.js +3 -1
  95. package/lib/parse/specification/fee-update.d.ts +1 -1
  96. package/lib/parse/specification/fee-update.js +3 -1
  97. package/lib/parse/specification/genesis-mint.d.ts +1 -1
  98. package/lib/parse/specification/genesis-mint.js +3 -1
  99. package/lib/parse/specification/mptoken-authorize.d.ts +1 -1
  100. package/lib/parse/specification/mptoken-authorize.js +3 -3
  101. package/lib/parse/specification/mptoken-issuance-create.d.ts +1 -1
  102. package/lib/parse/specification/mptoken-issuance-create.js +3 -3
  103. package/lib/parse/specification/mptoken-issuance-destroy.d.ts +1 -1
  104. package/lib/parse/specification/mptoken-issuance-destroy.js +3 -1
  105. package/lib/parse/specification/mptoken-issuance-set.d.ts +1 -1
  106. package/lib/parse/specification/mptoken-issuance-set.js +3 -3
  107. package/lib/parse/specification/nftoken-accept-offer.d.ts +1 -1
  108. package/lib/parse/specification/nftoken-accept-offer.js +3 -3
  109. package/lib/parse/specification/nftoken-burn.d.ts +1 -1
  110. package/lib/parse/specification/nftoken-burn.js +3 -3
  111. package/lib/parse/specification/nftoken-cancel-offer.d.ts +1 -1
  112. package/lib/parse/specification/nftoken-cancel-offer.js +3 -3
  113. package/lib/parse/specification/nftoken-create-offer.d.ts +1 -1
  114. package/lib/parse/specification/nftoken-create-offer.js +3 -5
  115. package/lib/parse/specification/nftoken-mint.d.ts +1 -1
  116. package/lib/parse/specification/nftoken-mint.js +3 -3
  117. package/lib/parse/specification/nftoken-modify.d.ts +1 -1
  118. package/lib/parse/specification/nftoken-modify.js +3 -3
  119. package/lib/parse/specification/offer-cancel.d.ts +1 -1
  120. package/lib/parse/specification/offer-cancel.js +3 -1
  121. package/lib/parse/specification/offer-create.d.ts +1 -1
  122. package/lib/parse/specification/offer-create.js +6 -6
  123. package/lib/parse/specification/oracle-delete.d.ts +1 -1
  124. package/lib/parse/specification/oracle-delete.js +3 -1
  125. package/lib/parse/specification/oracle-set.d.ts +1 -1
  126. package/lib/parse/specification/oracle-set.js +3 -1
  127. package/lib/parse/specification/payment-channel-claim.d.ts +1 -1
  128. package/lib/parse/specification/payment-channel-claim.js +3 -1
  129. package/lib/parse/specification/payment-channel-create.d.ts +1 -1
  130. package/lib/parse/specification/payment-channel-create.js +3 -1
  131. package/lib/parse/specification/payment-channel-fund.d.ts +1 -1
  132. package/lib/parse/specification/payment-channel-fund.js +3 -1
  133. package/lib/parse/specification/payment.d.ts +1 -1
  134. package/lib/parse/specification/payment.js +8 -3
  135. package/lib/parse/specification/remit.d.ts +1 -1
  136. package/lib/parse/specification/remit.js +3 -1
  137. package/lib/parse/specification/set-remarks.d.ts +1 -1
  138. package/lib/parse/specification/set-remarks.js +3 -1
  139. package/lib/parse/specification/settings.d.ts +2 -1
  140. package/lib/parse/specification/settings.js +3 -1
  141. package/lib/parse/specification/ticket-create.d.ts +1 -1
  142. package/lib/parse/specification/ticket-create.js +3 -1
  143. package/lib/parse/specification/trust-set.d.ts +1 -1
  144. package/lib/parse/specification/trust-set.js +6 -1
  145. package/lib/parse/specification/unrecognized.d.ts +1 -1
  146. package/lib/parse/specification/unrecognized.js +3 -1
  147. package/lib/parse/specification/uritoken-burn.d.ts +1 -1
  148. package/lib/parse/specification/uritoken-burn.js +3 -1
  149. package/lib/parse/specification/uritoken-buy.d.ts +1 -1
  150. package/lib/parse/specification/uritoken-buy.js +3 -1
  151. package/lib/parse/specification/uritoken-cancel-sell-offer.d.ts +1 -1
  152. package/lib/parse/specification/uritoken-cancel-sell-offer.js +3 -1
  153. package/lib/parse/specification/uritoken-create-sell-offer.d.ts +1 -1
  154. package/lib/parse/specification/uritoken-create-sell-offer.js +3 -1
  155. package/lib/parse/specification/uritoken-mint.d.ts +1 -1
  156. package/lib/parse/specification/uritoken-mint.js +3 -3
  157. package/lib/parse/transaction.d.ts +118 -1
  158. package/lib/parse/transaction.js +8 -4
  159. package/lib/types/amm.d.ts +8 -7
  160. package/lib/types/amm.js +46 -6
  161. package/lib/types/batch.d.ts +21 -0
  162. package/lib/types/batch.js +26 -0
  163. package/lib/types/credentials.d.ts +1 -1
  164. package/lib/types/deposits.d.ts +6 -0
  165. package/lib/types/global.d.ts +19 -0
  166. package/lib/types/global.js +28 -0
  167. package/lib/types/mptokens.d.ts +7 -3
  168. package/lib/types/mptokens.js +44 -0
  169. package/lib/types/nftokens.d.ts +5 -2
  170. package/lib/types/nftokens.js +30 -0
  171. package/lib/types/offers.d.ts +3 -1
  172. package/lib/types/offers.js +16 -0
  173. package/lib/types/payments.d.ts +13 -0
  174. package/lib/types/payments.js +23 -0
  175. package/lib/types/specification.d.ts +2 -0
  176. package/lib/types/trustlines.d.ts +21 -1
  177. package/lib/types/trustlines.js +26 -1
  178. package/lib/types/uritokens.d.ts +3 -1
  179. package/lib/types/uritokens.js +16 -0
  180. package/package.json +7 -7
@@ -26,10 +26,127 @@ import { FormattedCredentialCreateSpecification, FormattedCredentialAcceptSpecif
26
26
  import { FormattedDelegateSetSpecification } from "../types/delegate";
27
27
  import { FormattedSetRemarksSpecification } from "../types/remarks";
28
28
  import { FormattedGenesisMintSpecification } from "../types/genesis_mint";
29
+ import { FormattedBatchSpecification } from "../types/batch";
29
30
  import { FormattedAmendmentSpecification } from "../types/amendments";
30
31
  import { FormattedFeeUpdateSpecification } from "../types/fees";
32
+ import parseSettings from "./specification/settings";
33
+ import parseAccountDelete from "./specification/account-delete";
34
+ import parseCheckCancel from "./specification/check-cancel";
35
+ import parseCheckCash from "./specification/check-cash";
36
+ import parseCheckCreate from "./specification/check-create";
37
+ import parseDepositPreauth from "./specification/deposit-preauth";
38
+ import parseEscrowCancel from "./specification/escrow-cancel";
39
+ import parseEscrowCreation from "./specification/escrow-create";
40
+ import parseEscrowFinish from "./specification/escrow-finish";
41
+ import parseOfferCancel from "./specification/offer-cancel";
42
+ import parseOfferCreate from "./specification/offer-create";
43
+ import parsePayment from "./specification/payment";
44
+ import parsePaymentChannelClaim from "./specification/payment-channel-claim";
45
+ import parsePaymentChannelCreate from "./specification/payment-channel-create";
46
+ import parsePaymentChannelFund from "./specification/payment-channel-fund";
47
+ import parseTicketCreate from "./specification/ticket-create";
48
+ import parseTrustSet from "./specification/trust-set";
49
+ import parseNFTokenBurn from "./specification/nftoken-burn";
50
+ import parseNFTokenMint from "./specification/nftoken-mint";
51
+ import parseNFTokenModify from "./specification/nftoken-modify";
52
+ import parseNFTokenCancelOffer from "./specification/nftoken-cancel-offer";
53
+ import parseNFTokenCreateOffer from "./specification/nftoken-create-offer";
54
+ import parseNFTokenAcceptOffer from "./specification/nftoken-accept-offer";
55
+ import parseURITokenBurn from "./specification/uritoken-burn";
56
+ import parseURITokenBuy from "./specification/uritoken-buy";
57
+ import parseURITokenCancelSellOffer from "./specification/uritoken-cancel-sell-offer";
58
+ import parseURITokenCreateSellOffer from "./specification/uritoken-create-sell-offer";
59
+ import parseURITokenMint from "./specification/uritoken-mint";
60
+ import parseImport from "./specification/import";
61
+ import parseInvoke from "./specification/invoke";
62
+ import parseUNLReport from "./specification/unl-report";
63
+ import parseRemit from "./specification/remit";
64
+ import parseClawback from "./specification/clawback";
65
+ import parseAmmBid from "./specification/amm-bid";
66
+ import parseAmmCreate from "./specification/amm-create";
67
+ import parseAmmDelete from "./specification/amm-delete";
68
+ import parseAmmDeposit from "./specification/amm-deposit";
69
+ import parseAmmWithdraw from "./specification/amm-withdraw";
70
+ import parseAmmVote from "./specification/amm-vote";
71
+ import parseAmmClawback from "./specification/amm-clawback";
72
+ import parseDIDSet from "./specification/did-set";
73
+ import parseDIDDelete from "./specification/did-delete";
74
+ import parseOracleSet from "./specification/oracle-set";
75
+ import parseOracleDelete from "./specification/oracle-delete";
76
+ import parseMPTokenIssuanceCreate from "./specification/mptoken-issuance-create";
77
+ import parseMPTokenAuthorize from "./specification/mptoken-authorize";
78
+ import parseMPTokenIssuanceSet from "./specification/mptoken-issuance-set";
79
+ import parseMPTokenIssuanceDestroy from "./specification/mptoken-issuance-destroy";
80
+ import parseDelegateSet from "./specification/delegate-set";
81
+ import parseSetRemarks from "./specification/set-remarks";
82
+ import parseCredentialCreate from "./specification/credential-create";
83
+ import parseCredentialAccept from "./specification/credential-accept";
84
+ import parseCredentialDelete from "./specification/credential-delete";
85
+ import parseGenesisMint from "./specification/genesis-mint";
86
+ import parseBatch from "./specification/batch";
87
+ import parseAmendment from "./specification/amendment";
88
+ import parseFeeUpdate from "./specification/fee-update";
31
89
  declare function parseTransactionType(type: string): string;
32
- export type FormattedSpecification = FormattedUnrecognizedParserSpecification | FormattedSettingsSpecification | FormattedAccountDeleteSpecification | FormattedCheckCancelSpecification | FormattedCheckCashSpecification | FormattedCheckCreateSpecification | FormattedDepositPreauthSpecification | FormattedEscrowCancelSpecification | FormattedEscrowCreateSpecification | FormattedEscrowFinishSpecification | FormattedOfferCancelSpecification | FormattedOfferCreateSpecification | FormattedPaymentSpecification | FormattedPaymentChannelClaimSpecification | FormattedPaymentChannelCreateSpecification | FormattedPaymentChannelFundSpecification | FormattedTicketCreateSpecification | FormattedTrustlineSpecification | FormattedNFTokenBurnSpecification | FormattedNFTokenMintSpecification | FormattedNFTokenModifySpecification | FormattedNFTokenCancelOfferSpecification | FormattedNFTokenCreateOfferSpecification | FormattedNFTokenAcceptOfferSpecification | FormattedURITokenBurnSpecification | FormattedURITokenBuySpecification | FormattedURITokenCreateSellOfferSpecification | FormattedURITokenCancelSellOfferSpecification | FormattedURITokenMintSpecification | FormattedImportSpecification | FormattedInvokeSpecification | FormattedUNLReportSpecification | FormattedRemitsSpecification | FormattedClawbackSpecification | FormattedAmmBidSpecification | FormattedAmmCreateSpecification | FormattedAmmDeleteSpecification | FormattedAmmDepositSpecification | FormattedAmmWithdrawSpecification | FormattedAmmVoteSpecification | FormattedAmmClawbackSpecification | FormattedGenesisMintSpecification | FormattedAmendmentSpecification | FormattedFeeUpdateSpecification | FormattedDIDSetSpecification | FormattedDIDDeleteSpecification | FormattedOracleSetSpecification | FormattedOracleDeleteSpecification | FormattedMPTokenIssuanceCreateSpecification | FormattedMPTokenAuthorizeSpecification | FormattedMPTokenIssuanceSetSpecification | FormattedMPTokenIssuanceDestroySpecification | FormattedCredentialCreateSpecification | FormattedCredentialAcceptSpecification | FormattedCredentialDeleteSpecification | FormattedDelegateSetSpecification | FormattedSetRemarksSpecification;
90
+ export declare const parserTypeFunc: {
91
+ settings: typeof parseSettings;
92
+ accountDelete: typeof parseAccountDelete;
93
+ checkCancel: typeof parseCheckCancel;
94
+ checkCash: typeof parseCheckCash;
95
+ checkCreate: typeof parseCheckCreate;
96
+ depositPreauth: typeof parseDepositPreauth;
97
+ escrowCancellation: typeof parseEscrowCancel;
98
+ escrowCreation: typeof parseEscrowCreation;
99
+ escrowExecution: typeof parseEscrowFinish;
100
+ orderCancellation: typeof parseOfferCancel;
101
+ order: typeof parseOfferCreate;
102
+ payment: typeof parsePayment;
103
+ paymentChannelClaim: typeof parsePaymentChannelClaim;
104
+ paymentChannelCreate: typeof parsePaymentChannelCreate;
105
+ paymentChannelFund: typeof parsePaymentChannelFund;
106
+ ticketCreate: typeof parseTicketCreate;
107
+ trustline: typeof parseTrustSet;
108
+ nftokenBurn: typeof parseNFTokenBurn;
109
+ nftokenMint: typeof parseNFTokenMint;
110
+ NFTokenModify: typeof parseNFTokenModify;
111
+ nftokenCancelOffer: typeof parseNFTokenCancelOffer;
112
+ nftokenCreateOffer: typeof parseNFTokenCreateOffer;
113
+ nftokenAcceptOffer: typeof parseNFTokenAcceptOffer;
114
+ uritokenBurn: typeof parseURITokenBurn;
115
+ uritokenBuy: typeof parseURITokenBuy;
116
+ uritokenCreateSellOffer: typeof parseURITokenCreateSellOffer;
117
+ uritokenCancelSellOffer: typeof parseURITokenCancelSellOffer;
118
+ uritokenMint: typeof parseURITokenMint;
119
+ import: typeof parseImport;
120
+ invoke: typeof parseInvoke;
121
+ unlReport: typeof parseUNLReport;
122
+ remit: typeof parseRemit;
123
+ clawback: typeof parseClawback;
124
+ ammBid: typeof parseAmmBid;
125
+ ammCreate: typeof parseAmmCreate;
126
+ ammDelete: typeof parseAmmDelete;
127
+ ammDeposit: typeof parseAmmDeposit;
128
+ ammWithdraw: typeof parseAmmWithdraw;
129
+ ammVote: typeof parseAmmVote;
130
+ AMMClawback: typeof parseAmmClawback;
131
+ didSet: typeof parseDIDSet;
132
+ didDelete: typeof parseDIDDelete;
133
+ oracleSet: typeof parseOracleSet;
134
+ oracleDelete: typeof parseOracleDelete;
135
+ MPTokenIssuanceCreate: typeof parseMPTokenIssuanceCreate;
136
+ MPTokenAuthorize: typeof parseMPTokenAuthorize;
137
+ MPTokenIssuanceSet: typeof parseMPTokenIssuanceSet;
138
+ MPTokenIssuanceDestroy: typeof parseMPTokenIssuanceDestroy;
139
+ CredentialCreate: typeof parseCredentialCreate;
140
+ CredentialAccept: typeof parseCredentialAccept;
141
+ CredentialDelete: typeof parseCredentialDelete;
142
+ DelegateSet: typeof parseDelegateSet;
143
+ SetRemarks: typeof parseSetRemarks;
144
+ genesisMint: typeof parseGenesisMint;
145
+ Batch: typeof parseBatch;
146
+ amendment: typeof parseAmendment;
147
+ feeUpdate: typeof parseFeeUpdate;
148
+ };
149
+ export type FormattedSpecification = FormattedUnrecognizedParserSpecification | FormattedSettingsSpecification | FormattedAccountDeleteSpecification | FormattedCheckCancelSpecification | FormattedCheckCashSpecification | FormattedCheckCreateSpecification | FormattedDepositPreauthSpecification | FormattedEscrowCancelSpecification | FormattedEscrowCreateSpecification | FormattedEscrowFinishSpecification | FormattedOfferCancelSpecification | FormattedOfferCreateSpecification | FormattedPaymentSpecification | FormattedPaymentChannelClaimSpecification | FormattedPaymentChannelCreateSpecification | FormattedPaymentChannelFundSpecification | FormattedTicketCreateSpecification | FormattedTrustlineSpecification | FormattedNFTokenBurnSpecification | FormattedNFTokenMintSpecification | FormattedNFTokenModifySpecification | FormattedNFTokenCancelOfferSpecification | FormattedNFTokenCreateOfferSpecification | FormattedNFTokenAcceptOfferSpecification | FormattedURITokenBurnSpecification | FormattedURITokenBuySpecification | FormattedURITokenCreateSellOfferSpecification | FormattedURITokenCancelSellOfferSpecification | FormattedURITokenMintSpecification | FormattedImportSpecification | FormattedInvokeSpecification | FormattedUNLReportSpecification | FormattedRemitsSpecification | FormattedClawbackSpecification | FormattedAmmBidSpecification | FormattedAmmCreateSpecification | FormattedAmmDeleteSpecification | FormattedAmmDepositSpecification | FormattedAmmWithdrawSpecification | FormattedAmmVoteSpecification | FormattedAmmClawbackSpecification | FormattedDIDSetSpecification | FormattedDIDDeleteSpecification | FormattedOracleSetSpecification | FormattedOracleDeleteSpecification | FormattedMPTokenIssuanceCreateSpecification | FormattedMPTokenAuthorizeSpecification | FormattedMPTokenIssuanceSetSpecification | FormattedMPTokenIssuanceDestroySpecification | FormattedCredentialCreateSpecification | FormattedCredentialAcceptSpecification | FormattedCredentialDeleteSpecification | FormattedDelegateSetSpecification | FormattedSetRemarksSpecification | FormattedGenesisMintSpecification | FormattedBatchSpecification | FormattedAmendmentSpecification | FormattedFeeUpdateSpecification;
33
150
  export interface FormattedTransaction {
34
151
  type: string;
35
152
  address: string;
@@ -3,6 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.parserTypeFunc = void 0;
6
7
  exports.parseTransactionType = parseTransactionType;
7
8
  exports.parseTransaction = parseTransaction;
8
9
  const common_1 = require("../common");
@@ -63,6 +64,7 @@ const credential_create_1 = __importDefault(require("./specification/credential-
63
64
  const credential_accept_1 = __importDefault(require("./specification/credential-accept"));
64
65
  const credential_delete_1 = __importDefault(require("./specification/credential-delete"));
65
66
  const genesis_mint_1 = __importDefault(require("./specification/genesis-mint"));
67
+ const batch_1 = __importDefault(require("./specification/batch"));
66
68
  const amendment_1 = __importDefault(require("./specification/amendment"));
67
69
  const fee_update_1 = __importDefault(require("./specification/fee-update"));
68
70
  const transactionTypeToType = {
@@ -122,13 +124,14 @@ const transactionTypeToType = {
122
124
  DelegateSet: "DelegateSet",
123
125
  SetRemarks: "SetRemarks",
124
126
  GenesisMint: "genesisMint",
127
+ Batch: "Batch",
125
128
  EnableAmendment: "amendment",
126
129
  SetFee: "feeUpdate",
127
130
  };
128
131
  function parseTransactionType(type) {
129
132
  return transactionTypeToType[type] || type;
130
133
  }
131
- const parserTypeFunc = {
134
+ exports.parserTypeFunc = {
132
135
  settings: settings_1.default,
133
136
  accountDelete: account_delete_1.default,
134
137
  checkCancel: check_cancel_1.default,
@@ -183,6 +186,7 @@ const parserTypeFunc = {
183
186
  DelegateSet: delegate_set_1.default,
184
187
  SetRemarks: set_remarks_1.default,
185
188
  genesisMint: genesis_mint_1.default,
189
+ Batch: batch_1.default,
186
190
  amendment: amendment_1.default,
187
191
  feeUpdate: fee_update_1.default,
188
192
  };
@@ -192,14 +196,14 @@ function parseTransaction(tx, includeRawTransaction, nativeCurrency, definitions
192
196
  universalTx = { ...universalTx, ...universalTx.tx_json };
193
197
  }
194
198
  const type = parseTransactionType(universalTx.TransactionType);
195
- const parser = parserTypeFunc[type];
196
- const specification = parser ? parser(universalTx) : (0, unrecognized_1.default)(universalTx);
199
+ const parser = exports.parserTypeFunc[type];
200
+ const specification = parser ? parser(universalTx, nativeCurrency, definitions) : (0, unrecognized_1.default)(universalTx);
197
201
  if (!parser && includeRawTransaction !== false) {
198
202
  includeRawTransaction = true;
199
203
  }
200
204
  const outcome = (0, outcome_1.parseOutcome)(universalTx, nativeCurrency, definitions);
201
205
  return (0, common_1.removeUndefined)({
202
- type: type,
206
+ type,
203
207
  address: (0, account_1.parseAccount)(universalTx.Account),
204
208
  sequence: universalTx.Sequence,
205
209
  ticketSequence: universalTx.TicketSequence,
@@ -1,6 +1,7 @@
1
- import { AMMDepositFlags, AMMWithdrawFlags } from "xrpl";
1
+ import { AMMDepositFlags, AMMWithdrawFlags, AMMClawbackFlags } from "xrpl";
2
2
  import { FormattedBaseSpecification } from "./specification";
3
3
  import { FormattedAmount, FormattedIssuedCurrency } from "./amounts";
4
+ import { TxGlobalFlagsKeysInterface } from "./global";
4
5
  export interface VoteSlotInterface {
5
6
  VoteEntry: {
6
7
  Account: string;
@@ -16,7 +17,8 @@ export declare const AMMDepositFlagsKeys: {
16
17
  limitLPToken: AMMDepositFlags;
17
18
  twoAssetIfEmpty: AMMDepositFlags;
18
19
  };
19
- export interface AMMDepositFlagsKeysInterface {
20
+ export declare function getAMMDepositFlagsKeys(nativeCurrency?: string): Record<string, number>;
21
+ export interface AMMDepositFlagsKeysInterface extends TxGlobalFlagsKeysInterface {
20
22
  lpToken?: boolean;
21
23
  singleAsset?: boolean;
22
24
  twoAsset?: boolean;
@@ -32,7 +34,8 @@ export declare const AMMWithdrawFlagsKeys: {
32
34
  oneAssetLPToken: AMMWithdrawFlags;
33
35
  limitLPToken: AMMWithdrawFlags;
34
36
  };
35
- export interface AMMWithdrawFlagsKeysInterface {
37
+ export declare function getAMMWithdrawFlagsKeys(nativeCurrency?: string): Record<string, number>;
38
+ export interface AMMWithdrawFlagsKeysInterface extends TxGlobalFlagsKeysInterface {
36
39
  lpToken?: boolean;
37
40
  withdrawAll?: boolean;
38
41
  oneAssetWithdrawAll?: boolean;
@@ -41,13 +44,11 @@ export interface AMMWithdrawFlagsKeysInterface {
41
44
  oneAssetLPToken?: boolean;
42
45
  limitLPToken?: boolean;
43
46
  }
44
- export declare enum AMMClawbackFlags {
45
- tfClawTwoAssets = 1
46
- }
47
47
  export declare const AMMClawbackFlagsKeys: {
48
48
  clawTwoAssets: AMMClawbackFlags;
49
49
  };
50
- export interface AMMClawbackFlagsKeysInterface {
50
+ export declare function getAMMClawbackFlagsKeys(nativeCurrency?: string): Record<string, number>;
51
+ export interface AMMClawbackFlagsKeysInterface extends TxGlobalFlagsKeysInterface {
51
52
  clawTwoAssets?: boolean;
52
53
  }
53
54
  export type FormattedAmmBidSpecification = {
package/lib/types/amm.js CHANGED
@@ -1,7 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AMMClawbackFlagsKeys = exports.AMMClawbackFlags = exports.AMMWithdrawFlagsKeys = exports.AMMDepositFlagsKeys = void 0;
3
+ exports.AMMClawbackFlagsKeys = exports.AMMWithdrawFlagsKeys = exports.AMMDepositFlagsKeys = void 0;
4
+ exports.getAMMDepositFlagsKeys = getAMMDepositFlagsKeys;
5
+ exports.getAMMWithdrawFlagsKeys = getAMMWithdrawFlagsKeys;
6
+ exports.getAMMClawbackFlagsKeys = getAMMClawbackFlagsKeys;
4
7
  const xrpl_1 = require("xrpl");
8
+ const global_1 = require("./global");
9
+ const common_1 = require("../common");
5
10
  exports.AMMDepositFlagsKeys = {
6
11
  lpToken: xrpl_1.AMMDepositFlags.tfLPToken,
7
12
  singleAsset: xrpl_1.AMMDepositFlags.tfSingleAsset,
@@ -10,6 +15,19 @@ exports.AMMDepositFlagsKeys = {
10
15
  limitLPToken: xrpl_1.AMMDepositFlags.tfLimitLPToken,
11
16
  twoAssetIfEmpty: xrpl_1.AMMDepositFlags.tfTwoAssetIfEmpty,
12
17
  };
18
+ const nativeCurrencyAMMDepositFlags = {};
19
+ function getAMMDepositFlagsKeys(nativeCurrency) {
20
+ if (!nativeCurrency) {
21
+ nativeCurrency = common_1.MAINNET_NATIVE_CURRENCY;
22
+ }
23
+ if (!nativeCurrencyAMMDepositFlags[nativeCurrency]) {
24
+ nativeCurrencyAMMDepositFlags[nativeCurrency] = {
25
+ ...(0, global_1.getTxGlobalFlagsKeys)(nativeCurrency),
26
+ ...exports.AMMDepositFlagsKeys,
27
+ };
28
+ }
29
+ return nativeCurrencyAMMDepositFlags[nativeCurrency];
30
+ }
13
31
  exports.AMMWithdrawFlagsKeys = {
14
32
  lpToken: xrpl_1.AMMWithdrawFlags.tfLPToken,
15
33
  withdrawAll: xrpl_1.AMMWithdrawFlags.tfWithdrawAll,
@@ -19,10 +37,32 @@ exports.AMMWithdrawFlagsKeys = {
19
37
  oneAssetLPToken: xrpl_1.AMMWithdrawFlags.tfOneAssetLPToken,
20
38
  limitLPToken: xrpl_1.AMMWithdrawFlags.tfLimitLPToken,
21
39
  };
22
- var AMMClawbackFlags;
23
- (function (AMMClawbackFlags) {
24
- AMMClawbackFlags[AMMClawbackFlags["tfClawTwoAssets"] = 1] = "tfClawTwoAssets";
25
- })(AMMClawbackFlags || (exports.AMMClawbackFlags = AMMClawbackFlags = {}));
40
+ const nativeCurrencyAMMWithdrawFlags = {};
41
+ function getAMMWithdrawFlagsKeys(nativeCurrency) {
42
+ if (!nativeCurrency) {
43
+ nativeCurrency = common_1.MAINNET_NATIVE_CURRENCY;
44
+ }
45
+ if (!nativeCurrencyAMMWithdrawFlags[nativeCurrency]) {
46
+ nativeCurrencyAMMWithdrawFlags[nativeCurrency] = {
47
+ ...(0, global_1.getTxGlobalFlagsKeys)(nativeCurrency),
48
+ ...exports.AMMWithdrawFlagsKeys,
49
+ };
50
+ }
51
+ return nativeCurrencyAMMWithdrawFlags[nativeCurrency];
52
+ }
26
53
  exports.AMMClawbackFlagsKeys = {
27
- clawTwoAssets: AMMClawbackFlags.tfClawTwoAssets,
54
+ clawTwoAssets: xrpl_1.AMMClawbackFlags.tfClawTwoAssets,
28
55
  };
56
+ const nativeCurrencyAMMClawbackFlags = {};
57
+ function getAMMClawbackFlagsKeys(nativeCurrency) {
58
+ if (!nativeCurrency) {
59
+ nativeCurrency = common_1.MAINNET_NATIVE_CURRENCY;
60
+ }
61
+ if (!nativeCurrencyAMMClawbackFlags[nativeCurrency]) {
62
+ nativeCurrencyAMMClawbackFlags[nativeCurrency] = {
63
+ ...(0, global_1.getTxGlobalFlagsKeys)(nativeCurrency),
64
+ ...exports.AMMClawbackFlagsKeys,
65
+ };
66
+ }
67
+ return nativeCurrencyAMMClawbackFlags[nativeCurrency];
68
+ }
@@ -0,0 +1,21 @@
1
+ import { BatchFlags } from "xrpl/dist/npm/models/transactions/batch";
2
+ import { FormattedBaseSpecification } from "./specification";
3
+ import { FormattedTransaction } from "../parse/transaction";
4
+ import { TxGlobalFlagsKeysInterface } from "./global";
5
+ export declare const BatchFlagsKeys: {
6
+ allOrNothing: BatchFlags;
7
+ onlyOne: BatchFlags;
8
+ untilFailure: BatchFlags;
9
+ independent: BatchFlags;
10
+ };
11
+ export declare function getBatchFlagsKeys(nativeCurrency?: string): Record<string, number>;
12
+ export interface BatchFlagsKeysInterface extends TxGlobalFlagsKeysInterface {
13
+ allOrNothing?: boolean;
14
+ onlyOne?: boolean;
15
+ untilFailure?: boolean;
16
+ independent?: boolean;
17
+ }
18
+ export type FormattedBatchSpecification = {
19
+ transactions: FormattedTransaction[];
20
+ flags?: BatchFlagsKeysInterface;
21
+ } & FormattedBaseSpecification;
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BatchFlagsKeys = void 0;
4
+ exports.getBatchFlagsKeys = getBatchFlagsKeys;
5
+ const batch_1 = require("xrpl/dist/npm/models/transactions/batch");
6
+ const global_1 = require("./global");
7
+ const common_1 = require("../common");
8
+ const nativeCurrencyBatchFlags = {};
9
+ exports.BatchFlagsKeys = {
10
+ allOrNothing: batch_1.BatchFlags.tfAllOrNothing,
11
+ onlyOne: batch_1.BatchFlags.tfOnlyOne,
12
+ untilFailure: batch_1.BatchFlags.tfUntilFailure,
13
+ independent: batch_1.BatchFlags.tfIndependent,
14
+ };
15
+ function getBatchFlagsKeys(nativeCurrency) {
16
+ if (!nativeCurrency) {
17
+ nativeCurrency = common_1.MAINNET_NATIVE_CURRENCY;
18
+ }
19
+ if (!nativeCurrencyBatchFlags[nativeCurrency]) {
20
+ nativeCurrencyBatchFlags[nativeCurrency] = {
21
+ ...(0, global_1.getTxGlobalFlagsKeys)(nativeCurrency),
22
+ ...exports.BatchFlagsKeys,
23
+ };
24
+ }
25
+ return nativeCurrencyBatchFlags[nativeCurrency];
26
+ }
@@ -11,7 +11,7 @@ export interface CredentialFlagsKeysInterface {
11
11
  export type FormattedCredentialCreateSpecification = {
12
12
  subject?: string;
13
13
  credentialType?: string;
14
- expiration?: number;
14
+ expiration?: number | string;
15
15
  uri?: string;
16
16
  } & FormattedBaseSpecification;
17
17
  export type FormattedCredentialAcceptSpecification = {
@@ -1,5 +1,11 @@
1
1
  import { FormattedBaseSpecification } from "./specification";
2
+ export interface FormattedAuthorizeCredentials {
3
+ issuer?: string;
4
+ type?: string;
5
+ }
2
6
  export type FormattedDepositPreauthSpecification = {
3
7
  authorize?: string;
4
8
  unauthorize?: string;
9
+ authorizeCredentials?: FormattedAuthorizeCredentials[];
10
+ unauthorizeCredentials?: FormattedAuthorizeCredentials[];
5
11
  } & FormattedBaseSpecification;
@@ -0,0 +1,19 @@
1
+ export declare enum GlobalFlags {
2
+ tfFullyCanonicalSig = 2147483648,
3
+ tfInnerBatchTxn = 1073741824
4
+ }
5
+ export interface TxGlobalFlagsKeysInterface {
6
+ fullyCanonicalSig?: boolean;
7
+ innerBatchTxn?: boolean;
8
+ }
9
+ export declare const TxGlobalFlagsKeys: {
10
+ fullyCanonicalSig: GlobalFlags;
11
+ };
12
+ export declare const XRPLTxGlobalFlagsKeys: {
13
+ innerBatchTxn: GlobalFlags;
14
+ fullyCanonicalSig: GlobalFlags;
15
+ };
16
+ export declare const XahauTxGlobalFlagsKeys: {
17
+ fullyCanonicalSig: GlobalFlags;
18
+ };
19
+ export declare function getTxGlobalFlagsKeys(nativeCurrency?: string): Record<string, number>;
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.XahauTxGlobalFlagsKeys = exports.XRPLTxGlobalFlagsKeys = exports.TxGlobalFlagsKeys = exports.GlobalFlags = void 0;
4
+ exports.getTxGlobalFlagsKeys = getTxGlobalFlagsKeys;
5
+ const common_1 = require("../common");
6
+ var GlobalFlags;
7
+ (function (GlobalFlags) {
8
+ GlobalFlags[GlobalFlags["tfFullyCanonicalSig"] = 2147483648] = "tfFullyCanonicalSig";
9
+ GlobalFlags[GlobalFlags["tfInnerBatchTxn"] = 1073741824] = "tfInnerBatchTxn";
10
+ })(GlobalFlags || (exports.GlobalFlags = GlobalFlags = {}));
11
+ exports.TxGlobalFlagsKeys = {
12
+ fullyCanonicalSig: GlobalFlags.tfFullyCanonicalSig,
13
+ };
14
+ exports.XRPLTxGlobalFlagsKeys = {
15
+ ...exports.TxGlobalFlagsKeys,
16
+ innerBatchTxn: GlobalFlags.tfInnerBatchTxn,
17
+ };
18
+ exports.XahauTxGlobalFlagsKeys = {
19
+ ...exports.TxGlobalFlagsKeys,
20
+ };
21
+ function getTxGlobalFlagsKeys(nativeCurrency) {
22
+ if (nativeCurrency === common_1.XAHAU_NATIVE_CURRENCY) {
23
+ return exports.XahauTxGlobalFlagsKeys;
24
+ }
25
+ else {
26
+ return exports.XRPLTxGlobalFlagsKeys;
27
+ }
28
+ }
@@ -1,5 +1,6 @@
1
1
  import { MPTokenIssuanceCreateFlags, MPTokenIssuanceSetFlags, MPTokenAuthorizeFlags } from "xrpl";
2
2
  import { FormattedBaseSpecification } from "./specification";
3
+ import { TxGlobalFlagsKeysInterface } from "./global";
3
4
  export declare const MPTokenIssuanceCreateFlagsKeys: {
4
5
  canLock: MPTokenIssuanceCreateFlags;
5
6
  requireAuth: MPTokenIssuanceCreateFlags;
@@ -8,7 +9,8 @@ export declare const MPTokenIssuanceCreateFlagsKeys: {
8
9
  canTransfer: MPTokenIssuanceCreateFlags;
9
10
  canClawback: MPTokenIssuanceCreateFlags;
10
11
  };
11
- export interface MPTokenIssuanceCreateFlagsKeysInterface {
12
+ export declare function getMPTokenIssuanceCreateFlagsKeys(nativeCurrency?: string): Record<string, number>;
13
+ export interface MPTokenIssuanceCreateFlagsKeysInterface extends TxGlobalFlagsKeysInterface {
12
14
  canLock?: boolean;
13
15
  requireAuth?: boolean;
14
16
  canEscrow?: boolean;
@@ -20,14 +22,16 @@ export declare const MPTokenIssuanceSetFlagsKeys: {
20
22
  lock: MPTokenIssuanceSetFlags;
21
23
  unlock: MPTokenIssuanceSetFlags;
22
24
  };
23
- export interface MPTokenIssuanceSetFlagsKeysInterface {
25
+ export declare function getMPTokenIssuanceSetFlagsKeys(nativeCurrency?: string): Record<string, number>;
26
+ export interface MPTokenIssuanceSetFlagsKeysInterface extends TxGlobalFlagsKeysInterface {
24
27
  lock?: boolean;
25
28
  unlock?: boolean;
26
29
  }
27
30
  export declare const MPTokenAuthorizeFlagsKeys: {
28
31
  unauthorize: MPTokenAuthorizeFlags;
29
32
  };
30
- export interface MPTokenAuthorizeFlagsKeysInterface {
33
+ export declare function getMPTokenAuthorizeFlagsKeys(nativeCurrency?: string): Record<string, number>;
34
+ export interface MPTokenAuthorizeFlagsKeysInterface extends TxGlobalFlagsKeysInterface {
31
35
  unauthorize?: boolean;
32
36
  }
33
37
  export type FormattedMPTokenAuthorizeSpecification = {
@@ -1,7 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.MPTokenAuthorizeFlagsKeys = exports.MPTokenIssuanceSetFlagsKeys = exports.MPTokenIssuanceCreateFlagsKeys = void 0;
4
+ exports.getMPTokenIssuanceCreateFlagsKeys = getMPTokenIssuanceCreateFlagsKeys;
5
+ exports.getMPTokenIssuanceSetFlagsKeys = getMPTokenIssuanceSetFlagsKeys;
6
+ exports.getMPTokenAuthorizeFlagsKeys = getMPTokenAuthorizeFlagsKeys;
4
7
  const xrpl_1 = require("xrpl");
8
+ const global_1 = require("./global");
9
+ const common_1 = require("../common");
5
10
  exports.MPTokenIssuanceCreateFlagsKeys = {
6
11
  canLock: xrpl_1.MPTokenIssuanceCreateFlags.tfMPTCanLock,
7
12
  requireAuth: xrpl_1.MPTokenIssuanceCreateFlags.tfMPTRequireAuth,
@@ -10,10 +15,49 @@ exports.MPTokenIssuanceCreateFlagsKeys = {
10
15
  canTransfer: xrpl_1.MPTokenIssuanceCreateFlags.tfMPTCanTransfer,
11
16
  canClawback: xrpl_1.MPTokenIssuanceCreateFlags.tfMPTCanClawback,
12
17
  };
18
+ const nativeCurrencyMPTokenIssuanceCreateFlags = {};
19
+ function getMPTokenIssuanceCreateFlagsKeys(nativeCurrency) {
20
+ if (!nativeCurrency) {
21
+ nativeCurrency = common_1.MAINNET_NATIVE_CURRENCY;
22
+ }
23
+ if (!nativeCurrencyMPTokenIssuanceCreateFlags[nativeCurrency]) {
24
+ nativeCurrencyMPTokenIssuanceCreateFlags[nativeCurrency] = {
25
+ ...(0, global_1.getTxGlobalFlagsKeys)(nativeCurrency),
26
+ ...exports.MPTokenIssuanceCreateFlagsKeys,
27
+ };
28
+ }
29
+ return nativeCurrencyMPTokenIssuanceCreateFlags[nativeCurrency];
30
+ }
13
31
  exports.MPTokenIssuanceSetFlagsKeys = {
14
32
  lock: xrpl_1.MPTokenIssuanceSetFlags.tfMPTLock,
15
33
  unlock: xrpl_1.MPTokenIssuanceSetFlags.tfMPTUnlock,
16
34
  };
35
+ const nativeCurrencyMPTokenIssuanceSetFlags = {};
36
+ function getMPTokenIssuanceSetFlagsKeys(nativeCurrency) {
37
+ if (!nativeCurrency) {
38
+ nativeCurrency = common_1.MAINNET_NATIVE_CURRENCY;
39
+ }
40
+ if (!nativeCurrencyMPTokenIssuanceSetFlags[nativeCurrency]) {
41
+ nativeCurrencyMPTokenIssuanceSetFlags[nativeCurrency] = {
42
+ ...(0, global_1.getTxGlobalFlagsKeys)(nativeCurrency),
43
+ ...exports.MPTokenIssuanceSetFlagsKeys,
44
+ };
45
+ }
46
+ return nativeCurrencyMPTokenIssuanceSetFlags[nativeCurrency];
47
+ }
17
48
  exports.MPTokenAuthorizeFlagsKeys = {
18
49
  unauthorize: xrpl_1.MPTokenAuthorizeFlags.tfMPTUnauthorize,
19
50
  };
51
+ const nativeCurrencyMPTokenAuthorizeFlags = {};
52
+ function getMPTokenAuthorizeFlagsKeys(nativeCurrency) {
53
+ if (!nativeCurrency) {
54
+ nativeCurrency = common_1.MAINNET_NATIVE_CURRENCY;
55
+ }
56
+ if (!nativeCurrencyMPTokenAuthorizeFlags[nativeCurrency]) {
57
+ nativeCurrencyMPTokenAuthorizeFlags[nativeCurrency] = {
58
+ ...(0, global_1.getTxGlobalFlagsKeys)(nativeCurrency),
59
+ ...exports.MPTokenAuthorizeFlagsKeys,
60
+ };
61
+ }
62
+ return nativeCurrencyMPTokenAuthorizeFlags[nativeCurrency];
63
+ }
@@ -2,6 +2,7 @@ import { NFTokenMintFlags, NFTokenCreateOfferFlags } from "xrpl";
2
2
  import { FormattedBaseSpecification } from "./specification";
3
3
  import { Amount } from "./amounts";
4
4
  import { FormattedSourceAddress, FormattedDestinationAddress } from "./account";
5
+ import { TxGlobalFlagsKeysInterface } from "./global";
5
6
  export declare const NFTokenFlagsKeys: {
6
7
  burnable: NFTokenMintFlags;
7
8
  onlyXRP: NFTokenMintFlags;
@@ -9,7 +10,8 @@ export declare const NFTokenFlagsKeys: {
9
10
  transferable: NFTokenMintFlags;
10
11
  mutable: NFTokenMintFlags;
11
12
  };
12
- export interface NFTokenFlagsKeysInterface {
13
+ export declare function getNFTokenMintFlagsKeys(nativeCurrency?: string): Record<string, number>;
14
+ export interface NFTokenFlagsKeysInterface extends TxGlobalFlagsKeysInterface {
13
15
  burnable?: boolean;
14
16
  onlyXRP?: boolean;
15
17
  trustLine?: boolean;
@@ -19,7 +21,8 @@ export interface NFTokenFlagsKeysInterface {
19
21
  export declare const NFTokenOfferFlagsKeys: {
20
22
  sellToken: NFTokenCreateOfferFlags;
21
23
  };
22
- export interface NFTokenOfferFlagsKeysInterface {
24
+ export declare function getNFTokenOfferCreateFlagsKeys(nativeCurrency?: string): Record<string, number>;
25
+ export interface NFTokenOfferFlagsKeysInterface extends TxGlobalFlagsKeysInterface {
23
26
  sellToken?: boolean;
24
27
  }
25
28
  export type FormattedNFTokenBurnSpecification = {
@@ -1,7 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.NFTokenOfferFlagsKeys = exports.NFTokenFlagsKeys = void 0;
4
+ exports.getNFTokenMintFlagsKeys = getNFTokenMintFlagsKeys;
5
+ exports.getNFTokenOfferCreateFlagsKeys = getNFTokenOfferCreateFlagsKeys;
4
6
  const xrpl_1 = require("xrpl");
7
+ const global_1 = require("./global");
8
+ const common_1 = require("../common");
5
9
  exports.NFTokenFlagsKeys = {
6
10
  burnable: xrpl_1.NFTokenMintFlags.tfBurnable,
7
11
  onlyXRP: xrpl_1.NFTokenMintFlags.tfOnlyXRP,
@@ -9,6 +13,32 @@ exports.NFTokenFlagsKeys = {
9
13
  transferable: xrpl_1.NFTokenMintFlags.tfTransferable,
10
14
  mutable: xrpl_1.NFTokenMintFlags.tfMutable,
11
15
  };
16
+ const nativeCurrencyNFTokenMintFlags = {};
17
+ function getNFTokenMintFlagsKeys(nativeCurrency) {
18
+ if (!nativeCurrency) {
19
+ nativeCurrency = common_1.MAINNET_NATIVE_CURRENCY;
20
+ }
21
+ if (!nativeCurrencyNFTokenMintFlags[nativeCurrency]) {
22
+ nativeCurrencyNFTokenMintFlags[nativeCurrency] = {
23
+ ...(0, global_1.getTxGlobalFlagsKeys)(nativeCurrency),
24
+ ...exports.NFTokenFlagsKeys,
25
+ };
26
+ }
27
+ return nativeCurrencyNFTokenMintFlags[nativeCurrency];
28
+ }
12
29
  exports.NFTokenOfferFlagsKeys = {
13
30
  sellToken: xrpl_1.NFTokenCreateOfferFlags.tfSellNFToken,
14
31
  };
32
+ const nativeCurrencyNFTokenOfferCreateFlags = {};
33
+ function getNFTokenOfferCreateFlagsKeys(nativeCurrency) {
34
+ if (!nativeCurrency) {
35
+ nativeCurrency = common_1.MAINNET_NATIVE_CURRENCY;
36
+ }
37
+ if (!nativeCurrencyNFTokenOfferCreateFlags[nativeCurrency]) {
38
+ nativeCurrencyNFTokenOfferCreateFlags[nativeCurrency] = {
39
+ ...(0, global_1.getTxGlobalFlagsKeys)(nativeCurrency),
40
+ ...exports.NFTokenOfferFlagsKeys,
41
+ };
42
+ }
43
+ return nativeCurrencyNFTokenOfferCreateFlags[nativeCurrency];
44
+ }
@@ -1,13 +1,15 @@
1
1
  import { LedgerEntry, OfferCreateFlags } from "xrpl";
2
2
  import { FormattedBaseSpecification } from "./specification";
3
3
  import { FormattedIssuedCurrencyAmount } from "./amounts";
4
+ import { TxGlobalFlagsKeysInterface } from "./global";
4
5
  export declare const OfferCreateFlagsKeys: {
5
6
  passive: OfferCreateFlags;
6
7
  immediateOrCancel: OfferCreateFlags;
7
8
  fillOrKill: OfferCreateFlags;
8
9
  sell: OfferCreateFlags;
9
10
  };
10
- export interface OfferCreateFlagsKeysInterface {
11
+ export declare function getOfferCreateFlagsKeys(nativeCurrency?: string): Record<string, number>;
12
+ export interface OfferCreateFlagsKeysInterface extends TxGlobalFlagsKeysInterface {
11
13
  passive: boolean;
12
14
  immediateOrCancel: boolean;
13
15
  fillOrKill: boolean;
@@ -1,14 +1,30 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.OfferFlagsKeys = exports.OfferCreateFlagsKeys = void 0;
4
+ exports.getOfferCreateFlagsKeys = getOfferCreateFlagsKeys;
4
5
  const xrpl_1 = require("xrpl");
5
6
  const { OfferFlags } = xrpl_1.LedgerEntry;
7
+ const global_1 = require("./global");
8
+ const common_1 = require("../common");
6
9
  exports.OfferCreateFlagsKeys = {
7
10
  passive: xrpl_1.OfferCreateFlags.tfPassive,
8
11
  immediateOrCancel: xrpl_1.OfferCreateFlags.tfImmediateOrCancel,
9
12
  fillOrKill: xrpl_1.OfferCreateFlags.tfFillOrKill,
10
13
  sell: xrpl_1.OfferCreateFlags.tfSell,
11
14
  };
15
+ const nativeCurrencyOfferCreateFlags = {};
16
+ function getOfferCreateFlagsKeys(nativeCurrency) {
17
+ if (!nativeCurrency) {
18
+ nativeCurrency = common_1.MAINNET_NATIVE_CURRENCY;
19
+ }
20
+ if (!nativeCurrencyOfferCreateFlags[nativeCurrency]) {
21
+ nativeCurrencyOfferCreateFlags[nativeCurrency] = {
22
+ ...(0, global_1.getTxGlobalFlagsKeys)(nativeCurrency),
23
+ ...exports.OfferCreateFlagsKeys,
24
+ };
25
+ }
26
+ return nativeCurrencyOfferCreateFlags[nativeCurrency];
27
+ }
12
28
  exports.OfferFlagsKeys = {
13
29
  passive: OfferFlags.lsfPassive,
14
30
  sell: OfferFlags.lsfSell,