@bithomp/xrpl-api 3.2.4 → 3.2.7
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.
|
@@ -11,6 +11,7 @@ export interface GetTransactionsOptions {
|
|
|
11
11
|
marker?: any;
|
|
12
12
|
balanceChanges?: boolean;
|
|
13
13
|
specification?: boolean;
|
|
14
|
+
includeRawTransactions?: boolean;
|
|
14
15
|
}
|
|
15
16
|
export declare function getTransactions(account: string, options?: GetTransactionsOptions): Promise<object | ErrorResponse>;
|
|
16
17
|
export interface FindTransactionsOptions extends GetTransactionsOptions {
|
|
@@ -24,6 +25,5 @@ export interface FindTransactionsOptions extends GetTransactionsOptions {
|
|
|
24
25
|
timeout?: number;
|
|
25
26
|
legacy?: boolean;
|
|
26
27
|
formatted?: boolean;
|
|
27
|
-
includeRawTransactions?: boolean;
|
|
28
28
|
}
|
|
29
29
|
export declare function findTransactions(account: string, options?: FindTransactionsOptions): Promise<object[] | ErrorResponse>;
|
package/lib/ledger/account_tx.js
CHANGED
|
@@ -101,10 +101,13 @@ async function getTransactions(account, options = { limit: DEFAULT_LIMIT }) {
|
|
|
101
101
|
transaction.balanceChanges = (0, xrpl_1.getBalanceChanges)(transaction.meta);
|
|
102
102
|
}
|
|
103
103
|
if (options.specification === true) {
|
|
104
|
-
const
|
|
104
|
+
const includeRawTransaction = options.includeRawTransactions === true;
|
|
105
|
+
const details = (0, transaction_1.getAccountTxDetails)(transaction, includeRawTransaction);
|
|
105
106
|
transaction.specification = details.specification;
|
|
106
107
|
transaction.outcome = details.outcome;
|
|
107
|
-
|
|
108
|
+
if (includeRawTransaction) {
|
|
109
|
+
transaction.rawTransaction = details.rawTransaction;
|
|
110
|
+
}
|
|
108
111
|
}
|
|
109
112
|
}
|
|
110
113
|
}
|
|
@@ -163,10 +166,13 @@ async function findTransactions(account, options = { limit: DEFAULT_LIMIT, timeo
|
|
|
163
166
|
newTransaction.balanceChanges = (0, xrpl_1.getBalanceChanges)(newTransaction.meta);
|
|
164
167
|
}
|
|
165
168
|
if (loadOptions.specification === true) {
|
|
166
|
-
const
|
|
169
|
+
const includeRawTransaction = options.includeRawTransactions === true;
|
|
170
|
+
const details = (0, transaction_1.getAccountTxDetails)(newTransaction, includeRawTransaction);
|
|
167
171
|
newTransaction.specification = details.specification;
|
|
168
172
|
newTransaction.outcome = details.outcome;
|
|
169
|
-
|
|
173
|
+
if (includeRawTransaction) {
|
|
174
|
+
newTransaction.rawTransaction = details.rawTransaction;
|
|
175
|
+
}
|
|
170
176
|
}
|
|
171
177
|
}
|
|
172
178
|
}
|
|
@@ -93,10 +93,13 @@ async function getTransaction(transaction, options = {}) {
|
|
|
93
93
|
result.balanceChanges = xrpl.getBalanceChanges(result.meta);
|
|
94
94
|
}
|
|
95
95
|
if (options.specification === true) {
|
|
96
|
-
const
|
|
96
|
+
const includeRawTransaction = options.includeRawTransaction === true;
|
|
97
|
+
const details = (0, transaction_1.getTxDetails)(result, includeRawTransaction, undefined, options.definitions);
|
|
97
98
|
result.specification = details.specification;
|
|
98
99
|
result.outcome = details.outcome;
|
|
99
|
-
|
|
100
|
+
if (includeRawTransaction) {
|
|
101
|
+
result.rawTransaction = details.rawTransaction;
|
|
102
|
+
}
|
|
100
103
|
}
|
|
101
104
|
}
|
|
102
105
|
return result;
|
|
@@ -165,10 +168,13 @@ async function getTransactionByCTID(ctid, options = {}) {
|
|
|
165
168
|
result.balanceChanges = xrpl.getBalanceChanges(result.meta);
|
|
166
169
|
}
|
|
167
170
|
if (options.specification === true) {
|
|
168
|
-
const
|
|
171
|
+
const includeRawTransaction = options.includeRawTransaction === true;
|
|
172
|
+
const details = (0, transaction_1.getTxDetails)(result, includeRawTransaction, undefined, options.definitions);
|
|
169
173
|
result.specification = details.specification;
|
|
170
174
|
result.outcome = details.outcome;
|
|
171
|
-
|
|
175
|
+
if (includeRawTransaction) {
|
|
176
|
+
result.rawTransaction = details.rawTransaction;
|
|
177
|
+
}
|
|
172
178
|
}
|
|
173
179
|
return result;
|
|
174
180
|
}
|