ncc-02-js 0.2.4 → 0.2.5
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/README.md +1 -1
- package/dist/index.cjs +4 -1
- package/dist/index.mjs +4 -1
- package/dist/resolver.d.ts +4 -1
- package/package.json +1 -1
- package/src/resolver.js +4 -1
package/README.md
CHANGED
|
@@ -26,7 +26,7 @@ npm install ncc-02-js
|
|
|
26
26
|
import { NCC02Resolver } from 'ncc-02-js';
|
|
27
27
|
|
|
28
28
|
// Initialize with relay URLs and optional trusted CA pubkeys
|
|
29
|
-
const resolver = new NCC02Resolver(['wss://
|
|
29
|
+
const resolver = new NCC02Resolver(['wss://192.0.2.1:443'], {
|
|
30
30
|
trustedCAPubkeys: ['npub1...'] // Trusted third-party certifiers
|
|
31
31
|
});
|
|
32
32
|
|
package/dist/index.cjs
CHANGED
|
@@ -7679,7 +7679,10 @@ var NCC02Resolver = class {
|
|
|
7679
7679
|
* @param {string[]} relays - List of relay URLs.
|
|
7680
7680
|
* @param {Object} [options={}]
|
|
7681
7681
|
* @param {SimplePool} [options.pool] - Shared SimplePool instance.
|
|
7682
|
-
* @param {string[]} [options.trustedCAPubkeys=[]] - List of trusted CA pubkeys.
|
|
7682
|
+
* @param {string[]} [options.trustedCAPubkeys=[]] - List of trusted CA pubkeys (hex or npub).
|
|
7683
|
+
* These are the ONLY pubkeys whose attestation signatures (Kind 30060) will be accepted
|
|
7684
|
+
* by the resolver. This allows you to define your own web of trust or rely on specific
|
|
7685
|
+
* community auditors. If empty, all attestations are ignored (effectively disabling attestation checks).
|
|
7683
7686
|
*/
|
|
7684
7687
|
constructor(relays, options = {}) {
|
|
7685
7688
|
if (!Array.isArray(relays)) {
|
package/dist/index.mjs
CHANGED
|
@@ -7645,7 +7645,10 @@ var NCC02Resolver = class {
|
|
|
7645
7645
|
* @param {string[]} relays - List of relay URLs.
|
|
7646
7646
|
* @param {Object} [options={}]
|
|
7647
7647
|
* @param {SimplePool} [options.pool] - Shared SimplePool instance.
|
|
7648
|
-
* @param {string[]} [options.trustedCAPubkeys=[]] - List of trusted CA pubkeys.
|
|
7648
|
+
* @param {string[]} [options.trustedCAPubkeys=[]] - List of trusted CA pubkeys (hex or npub).
|
|
7649
|
+
* These are the ONLY pubkeys whose attestation signatures (Kind 30060) will be accepted
|
|
7650
|
+
* by the resolver. This allows you to define your own web of trust or rely on specific
|
|
7651
|
+
* community auditors. If empty, all attestations are ignored (effectively disabling attestation checks).
|
|
7649
7652
|
*/
|
|
7650
7653
|
constructor(relays, options = {}) {
|
|
7651
7654
|
if (!Array.isArray(relays)) {
|
package/dist/resolver.d.ts
CHANGED
|
@@ -29,7 +29,10 @@ export class NCC02Resolver {
|
|
|
29
29
|
* @param {string[]} relays - List of relay URLs.
|
|
30
30
|
* @param {Object} [options={}]
|
|
31
31
|
* @param {SimplePool} [options.pool] - Shared SimplePool instance.
|
|
32
|
-
* @param {string[]} [options.trustedCAPubkeys=[]] - List of trusted CA pubkeys.
|
|
32
|
+
* @param {string[]} [options.trustedCAPubkeys=[]] - List of trusted CA pubkeys (hex or npub).
|
|
33
|
+
* These are the ONLY pubkeys whose attestation signatures (Kind 30060) will be accepted
|
|
34
|
+
* by the resolver. This allows you to define your own web of trust or rely on specific
|
|
35
|
+
* community auditors. If empty, all attestations are ignored (effectively disabling attestation checks).
|
|
33
36
|
*/
|
|
34
37
|
constructor(relays: string[], options?: {
|
|
35
38
|
pool?: SimplePool;
|
package/package.json
CHANGED
package/src/resolver.js
CHANGED
|
@@ -36,7 +36,10 @@ export class NCC02Resolver {
|
|
|
36
36
|
* @param {string[]} relays - List of relay URLs.
|
|
37
37
|
* @param {Object} [options={}]
|
|
38
38
|
* @param {SimplePool} [options.pool] - Shared SimplePool instance.
|
|
39
|
-
* @param {string[]} [options.trustedCAPubkeys=[]] - List of trusted CA pubkeys.
|
|
39
|
+
* @param {string[]} [options.trustedCAPubkeys=[]] - List of trusted CA pubkeys (hex or npub).
|
|
40
|
+
* These are the ONLY pubkeys whose attestation signatures (Kind 30060) will be accepted
|
|
41
|
+
* by the resolver. This allows you to define your own web of trust or rely on specific
|
|
42
|
+
* community auditors. If empty, all attestations are ignored (effectively disabling attestation checks).
|
|
40
43
|
*/
|
|
41
44
|
constructor(relays, options = {}) {
|
|
42
45
|
if (!Array.isArray(relays)) {
|