@bithomp/xrpl-api 2.7.7 → 2.7.9

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.
@@ -40,6 +40,7 @@ async function getAccountLines(account, options = {}) {
40
40
  currency: options.currency,
41
41
  ledger_index: options.ledgerIndex || "validated",
42
42
  limit: options.limit,
43
+ marker: options.marker,
43
44
  });
44
45
  if (!response) {
45
46
  return {
@@ -100,15 +100,15 @@ async function getAccountAllOffers(account, options = {}) {
100
100
  response.limit = accountOffers.length;
101
101
  break;
102
102
  }
103
- if (response.offers.length === 0) {
104
- break;
105
- }
106
103
  if (response.marker) {
107
104
  options.marker = response.marker;
108
105
  }
109
106
  else {
110
107
  break;
111
108
  }
109
+ if (response.offers.length === 0) {
110
+ break;
111
+ }
112
112
  }
113
113
  if (response.error) {
114
114
  const { error, error_code, error_message, status, validated } = response;
@@ -2,10 +2,14 @@ import { LedgerIndex } from "../models/ledger";
2
2
  import { OrderbookInfo } from "../models/book_offers";
3
3
  import { IssuedCurrency } from "../types";
4
4
  import { ErrorResponse } from "../models/base_model";
5
- export interface GetGetBookOffers {
5
+ export interface GetGetBookOffersOptions {
6
6
  ledgerIndex?: LedgerIndex;
7
7
  limit?: number;
8
8
  marker?: any;
9
9
  }
10
- export declare function getBookOffers(taker: string, takerGets: IssuedCurrency, takerPays: IssuedCurrency, options?: GetGetBookOffers): Promise<object | ErrorResponse>;
11
- export declare function getOrderbook(taker: string, orderbook: OrderbookInfo, options?: GetGetBookOffers): Promise<object | ErrorResponse>;
10
+ export declare function getBookOffers(taker: string, takerGets: IssuedCurrency, takerPays: IssuedCurrency, options?: GetGetBookOffersOptions): Promise<object | ErrorResponse>;
11
+ export interface GetGetOrderBookOptions {
12
+ ledgerIndex?: LedgerIndex;
13
+ limit?: number;
14
+ }
15
+ export declare function getOrderbook(taker: string, orderbook: OrderbookInfo, options?: GetGetOrderBookOptions): Promise<object | ErrorResponse>;
@@ -41,6 +41,7 @@ async function getBookOffers(taker, takerGets, takerPays, options = {}) {
41
41
  taker_pays: takerPays,
42
42
  ledger_index: options.ledgerIndex || "validated",
43
43
  limit: options.limit,
44
+ marker: options.marker,
44
45
  });
45
46
  if (!response) {
46
47
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bithomp/xrpl-api",
3
- "version": "2.7.7",
3
+ "version": "2.7.9",
4
4
  "description": "A Bithomp JavaScript/TypeScript library for interacting with the XRP Ledger",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",