Comparing version 1.0.2 to 1.0.3
@@ -37,2 +37,4 @@ import Arweave from 'arweave'; | ||
to(recipients: string | string[]): this; | ||
min(min: number): void; | ||
max(max: number): void; | ||
limit(limit: number): this; | ||
@@ -39,0 +41,0 @@ sort(sort: 'HEIGHT_DESC' | 'HEIGHT_ASC'): this; |
@@ -95,2 +95,16 @@ "use strict"; | ||
} | ||
min(min) { | ||
this.checkSearchType(); | ||
if (!this.options.block) { | ||
this.options.block = {}; | ||
} | ||
this.options.block.min = min; | ||
} | ||
max(max) { | ||
this.checkSearchType(); | ||
if (!this.options.block) { | ||
this.options.block = {}; | ||
} | ||
this.options.block.max = max; | ||
} | ||
limit(limit) { | ||
@@ -179,3 +193,8 @@ this.checkSearchType(); | ||
const edges = res.transactions.edges; | ||
this.after = edges[edges.length - 1].cursor; | ||
if (edges && edges.length) { | ||
this.after = edges[edges.length - 1].cursor; | ||
} | ||
else { | ||
this.after = ''; | ||
} | ||
return edges; | ||
@@ -185,3 +204,8 @@ } | ||
const edges = res.blocks.edges; | ||
this.after = edges[edges.length - 1].cursor; | ||
if (edges && edges.length) { | ||
this.after = edges[edges.length - 1].cursor; | ||
} | ||
else { | ||
this.after = ''; | ||
} | ||
return edges; | ||
@@ -188,0 +212,0 @@ } |
{ | ||
"name": "ardb", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"main": "lib/ardb.js", | ||
@@ -5,0 +5,0 @@ "repository": "https://github.com/cedriking/ardb.git", |
@@ -91,2 +91,8 @@ # ArDB | ||
```js | ||
min(min: number) | ||
max(max: number) | ||
``` | ||
- Find transactions within a given block height range. | ||
```js | ||
limit(limit: number) | ||
@@ -93,0 +99,0 @@ ``` |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
24679
580
192