@unicitylabs/nostr-js-sdk 0.3.1 → 0.3.2
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.
- package/dist/browser/index.js +14 -0
- package/dist/browser/index.js.map +1 -1
- package/dist/browser/index.min.js +1 -1
- package/dist/browser/index.min.js.map +1 -1
- package/dist/browser/index.umd.js +14 -0
- package/dist/browser/index.umd.js.map +1 -1
- package/dist/browser/index.umd.min.js +5 -5
- package/dist/browser/index.umd.min.js.map +1 -1
- package/dist/cjs/protocol/Filter.js +14 -0
- package/dist/cjs/protocol/Filter.js.map +1 -1
- package/dist/esm/protocol/Filter.js +14 -0
- package/dist/esm/protocol/Filter.js.map +1 -1
- package/dist/types/protocol/Filter.d.ts +10 -0
- package/dist/types/protocol/Filter.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/browser/index.js
CHANGED
|
@@ -5373,6 +5373,7 @@ class Filter {
|
|
|
5373
5373
|
'#p';
|
|
5374
5374
|
'#t';
|
|
5375
5375
|
'#d';
|
|
5376
|
+
'#h';
|
|
5376
5377
|
since;
|
|
5377
5378
|
until;
|
|
5378
5379
|
limit;
|
|
@@ -5396,6 +5397,8 @@ class Filter {
|
|
|
5396
5397
|
this['#t'] = [...data['#t']];
|
|
5397
5398
|
if (data['#d'])
|
|
5398
5399
|
this['#d'] = [...data['#d']];
|
|
5400
|
+
if (data['#h'])
|
|
5401
|
+
this['#h'] = [...data['#h']];
|
|
5399
5402
|
if (data.since !== undefined)
|
|
5400
5403
|
this.since = data.since;
|
|
5401
5404
|
if (data.until !== undefined)
|
|
@@ -5432,6 +5435,8 @@ class Filter {
|
|
|
5432
5435
|
result['#t'] = this['#t'];
|
|
5433
5436
|
if (this['#d'] && this['#d'].length > 0)
|
|
5434
5437
|
result['#d'] = this['#d'];
|
|
5438
|
+
if (this['#h'] && this['#h'].length > 0)
|
|
5439
|
+
result['#h'] = this['#h'];
|
|
5435
5440
|
if (this.since !== undefined)
|
|
5436
5441
|
result.since = this.since;
|
|
5437
5442
|
if (this.until !== undefined)
|
|
@@ -5518,6 +5523,15 @@ class FilterBuilder {
|
|
|
5518
5523
|
}
|
|
5519
5524
|
return this;
|
|
5520
5525
|
}
|
|
5526
|
+
hTags(hTagsOrFirst, ...rest) {
|
|
5527
|
+
if (Array.isArray(hTagsOrFirst)) {
|
|
5528
|
+
this.data['#h'] = [...hTagsOrFirst];
|
|
5529
|
+
}
|
|
5530
|
+
else {
|
|
5531
|
+
this.data['#h'] = [hTagsOrFirst, ...rest];
|
|
5532
|
+
}
|
|
5533
|
+
return this;
|
|
5534
|
+
}
|
|
5521
5535
|
/**
|
|
5522
5536
|
* Set minimum timestamp (inclusive).
|
|
5523
5537
|
* @param since Unix timestamp in seconds
|