@bithomp/xrpl-api 2.7.6 → 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 {
@@ -45,6 +45,7 @@ async function getAccountOffers(account, options = {}) {
45
45
  account,
46
46
  ledger_index: options.ledgerIndex || "validated",
47
47
  limit: options.limit,
48
+ marker: options.marker,
48
49
  });
49
50
  if (!response) {
50
51
  return {
@@ -105,6 +106,9 @@ async function getAccountAllOffers(account, options = {}) {
105
106
  else {
106
107
  break;
107
108
  }
109
+ if (response.offers.length === 0) {
110
+ break;
111
+ }
108
112
  }
109
113
  if (response.error) {
110
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.6",
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",