@xyo-network/dns 7.0.14 → 7.0.15
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/neutral/index.d.ts +1 -8
- package/dist/neutral/index.d.ts.map +1 -1
- package/dist/neutral/index.mjs +2 -60
- package/dist/neutral/index.mjs.map +3 -3
- package/package.json +34 -4
- package/dist/neutral/DnsRecordType.d.ts +0 -16
- package/dist/neutral/DnsRecordType.d.ts.map +0 -1
- package/dist/neutral/DnsReturnCode.d.ts +0 -14
- package/dist/neutral/DnsReturnCode.d.ts.map +0 -1
- package/dist/neutral/GoogleDnsResult.d.ts +0 -17
- package/dist/neutral/GoogleDnsResult.d.ts.map +0 -1
- package/dist/neutral/GoogleDnsResultAnswer.d.ts +0 -8
- package/dist/neutral/GoogleDnsResultAnswer.d.ts.map +0 -1
- package/dist/neutral/GoogleDnsResultQuestion.d.ts +0 -11
- package/dist/neutral/GoogleDnsResultQuestion.d.ts.map +0 -1
- package/dist/neutral/domainExists.d.ts +0 -8
- package/dist/neutral/domainExists.d.ts.map +0 -1
- package/dist/neutral/domainResolve.d.ts +0 -9
- package/dist/neutral/domainResolve.d.ts.map +0 -1
- package/dist/neutral/googleDnsOverHttps.d.ts +0 -5
- package/dist/neutral/googleDnsOverHttps.d.ts.map +0 -1
package/dist/neutral/index.d.ts
CHANGED
|
@@ -1,9 +1,2 @@
|
|
|
1
|
-
export * from '
|
|
2
|
-
export * from './DnsReturnCode.ts';
|
|
3
|
-
export * from './domainExists.ts';
|
|
4
|
-
export * from './domainResolve.ts';
|
|
5
|
-
export * from './googleDnsOverHttps.ts';
|
|
6
|
-
export * from './GoogleDnsResult.ts';
|
|
7
|
-
export * from './GoogleDnsResultAnswer.ts';
|
|
8
|
-
export * from './GoogleDnsResultQuestion.ts';
|
|
1
|
+
export * from '@xyo-network/sdk-protocol/dns';
|
|
9
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,cAAc,+BAA+B,CAAA"}
|
package/dist/neutral/index.mjs
CHANGED
|
@@ -1,61 +1,3 @@
|
|
|
1
|
-
// src/
|
|
2
|
-
|
|
3
|
-
A: 1,
|
|
4
|
-
AAAA: 28,
|
|
5
|
-
CAA: 257,
|
|
6
|
-
CNAME: 5,
|
|
7
|
-
DNAME: 39,
|
|
8
|
-
MX: 15,
|
|
9
|
-
NS: 2,
|
|
10
|
-
PTR: 12,
|
|
11
|
-
SOA: 6,
|
|
12
|
-
SPF: 99,
|
|
13
|
-
SRV: 33,
|
|
14
|
-
TXT: 16
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
// src/DnsReturnCode.ts
|
|
18
|
-
var DnsReturnCode = {
|
|
19
|
-
NoError: 0,
|
|
20
|
-
QueryFormatError: 1,
|
|
21
|
-
ServerFailed: 2,
|
|
22
|
-
DomainDoesNotExist: 3,
|
|
23
|
-
NotImplemented: 4,
|
|
24
|
-
Refused: 5,
|
|
25
|
-
NameShouldNotExist: 6,
|
|
26
|
-
RRSetShouldNotExist: 7,
|
|
27
|
-
NotAuthoritative: 8,
|
|
28
|
-
NotInZone: 9
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
// src/domainResolve.ts
|
|
32
|
-
import { isDefined } from "@ariestools/sdk";
|
|
33
|
-
|
|
34
|
-
// src/googleDnsOverHttps.ts
|
|
35
|
-
import { fetchJson } from "@ariestools/sdk";
|
|
36
|
-
var googleDnsOverHttps = async (name, type = DnsRecordType.A) => {
|
|
37
|
-
const response = await fetchJson(`https://dns.google/resolve?name=${name}&type=${type}`);
|
|
38
|
-
return response.data ?? void 0;
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
// src/domainResolve.ts
|
|
42
|
-
var domainResolve = async (domain, type = DnsRecordType.A) => {
|
|
43
|
-
if (isDefined(domain)) {
|
|
44
|
-
return await googleDnsOverHttps(domain, type);
|
|
45
|
-
}
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
// src/domainExists.ts
|
|
49
|
-
var domainExists = async (domain) => {
|
|
50
|
-
if (domain === void 0) return false;
|
|
51
|
-
const dnsResult = await domainResolve(domain);
|
|
52
|
-
return dnsResult?.Status === DnsReturnCode.NoError;
|
|
53
|
-
};
|
|
54
|
-
export {
|
|
55
|
-
DnsRecordType,
|
|
56
|
-
DnsReturnCode,
|
|
57
|
-
domainExists,
|
|
58
|
-
domainResolve,
|
|
59
|
-
googleDnsOverHttps
|
|
60
|
-
};
|
|
1
|
+
// src/index.ts
|
|
2
|
+
export * from "@xyo-network/sdk-protocol/dns";
|
|
61
3
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../src/
|
|
4
|
-
"sourcesContent": ["
|
|
5
|
-
"mappings": ";
|
|
3
|
+
"sources": ["../../src/index.ts"],
|
|
4
|
+
"sourcesContent": ["// Compatibility shim: this package re-exports from @xyo-network/sdk-protocol.\nexport * from '@xyo-network/sdk-protocol/dns'\n"],
|
|
5
|
+
"mappings": ";AACA,cAAc;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xyo-network/dns",
|
|
3
|
-
"version": "7.0.
|
|
3
|
+
"version": "7.0.15",
|
|
4
4
|
"description": "Primary SDK for using XYO Protocol 2.0",
|
|
5
5
|
"homepage": "https://xyo.network",
|
|
6
6
|
"bugs": {
|
|
@@ -33,23 +33,52 @@
|
|
|
33
33
|
"!**/*.test.*",
|
|
34
34
|
"README.md"
|
|
35
35
|
],
|
|
36
|
+
"dependencies": {
|
|
37
|
+
"@xyo-network/sdk-protocol": "~7.0.15"
|
|
38
|
+
},
|
|
36
39
|
"devDependencies": {
|
|
37
40
|
"@ariestools/sdk": "~8.0.2",
|
|
41
|
+
"@ariestools/threads": "~8.0.2",
|
|
42
|
+
"@bitauth/libauth": "~3.0.0",
|
|
43
|
+
"@metamask/providers": "~22.1.1",
|
|
44
|
+
"@noble/post-quantum": "~0.6.1",
|
|
38
45
|
"@opentelemetry/api": "~1.9.1",
|
|
39
46
|
"@opentelemetry/sdk-trace-base": "~2.9.0",
|
|
40
|
-
"@
|
|
41
|
-
"@
|
|
47
|
+
"@scure/base": "~2.2.0",
|
|
48
|
+
"@scure/bip39": "~2.2.0",
|
|
49
|
+
"@xylabs/toolchain": "~8.6.7",
|
|
50
|
+
"@xylabs/tsconfig": "~8.6.7",
|
|
51
|
+
"ajv": "~8.20.0",
|
|
42
52
|
"async-mutex": "~0.5.0",
|
|
53
|
+
"debug": "~4.4.3",
|
|
43
54
|
"eslint": "~10.6.0",
|
|
44
55
|
"eslint-import-resolver-typescript": "~4.4.5",
|
|
56
|
+
"ethers": "~6.17.0",
|
|
57
|
+
"hash-wasm": "~4.12.0",
|
|
58
|
+
"idb": "~8.0.3",
|
|
59
|
+
"observable-fns": "~0.6.1",
|
|
45
60
|
"typescript": "~6.0.3",
|
|
61
|
+
"webextension-polyfill": "~0.12.0",
|
|
46
62
|
"zod": "~4.4.3"
|
|
47
63
|
},
|
|
48
64
|
"peerDependencies": {
|
|
49
65
|
"@ariestools/sdk": "^8.0.2",
|
|
66
|
+
"@ariestools/threads": "^8.0.2",
|
|
67
|
+
"@bitauth/libauth": "^3.0.0",
|
|
68
|
+
"@metamask/providers": "^22.1.1",
|
|
69
|
+
"@noble/post-quantum": "^0.6.1",
|
|
50
70
|
"@opentelemetry/api": "^1.9.1",
|
|
51
71
|
"@opentelemetry/sdk-trace-base": "^2.9.0",
|
|
72
|
+
"@scure/base": "^2.2.0",
|
|
73
|
+
"@scure/bip39": "^2.2.0",
|
|
74
|
+
"ajv": "^8.20.0",
|
|
52
75
|
"async-mutex": "^0.5.0",
|
|
76
|
+
"debug": "^4.4.3",
|
|
77
|
+
"ethers": "^6.17.0",
|
|
78
|
+
"hash-wasm": "^4.12.0",
|
|
79
|
+
"idb": "^8.0.3",
|
|
80
|
+
"observable-fns": "^0.6.1",
|
|
81
|
+
"webextension-polyfill": "^0.12.0",
|
|
53
82
|
"zod": "^4.4.3"
|
|
54
83
|
},
|
|
55
84
|
"engines": {
|
|
@@ -57,5 +86,6 @@
|
|
|
57
86
|
},
|
|
58
87
|
"publishConfig": {
|
|
59
88
|
"access": "public"
|
|
60
|
-
}
|
|
89
|
+
},
|
|
90
|
+
"deprecated": "Use @xyo-network/sdk-protocol/dns instead. Replace @xyo-network/dns with @xyo-network/sdk-protocol/dns. This package is a compatibility shim only and will not receive further updates."
|
|
61
91
|
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
export declare const DnsRecordType: {
|
|
2
|
-
readonly A: 1;
|
|
3
|
-
readonly AAAA: 28;
|
|
4
|
-
readonly CAA: 257;
|
|
5
|
-
readonly CNAME: 5;
|
|
6
|
-
readonly DNAME: 39;
|
|
7
|
-
readonly MX: 15;
|
|
8
|
-
readonly NS: 2;
|
|
9
|
-
readonly PTR: 12;
|
|
10
|
-
readonly SOA: 6;
|
|
11
|
-
readonly SPF: 99;
|
|
12
|
-
readonly SRV: 33;
|
|
13
|
-
readonly TXT: 16;
|
|
14
|
-
};
|
|
15
|
-
export type DnsRecordType = typeof DnsRecordType[keyof typeof DnsRecordType];
|
|
16
|
-
//# sourceMappingURL=DnsRecordType.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DnsRecordType.d.ts","sourceRoot":"","sources":["../../src/DnsRecordType.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,aAAa;;;;;;;;;;;;;CAahB,CAAA;AAEV,MAAM,MAAM,aAAa,GAAG,OAAO,aAAa,CAAC,MAAM,OAAO,aAAa,CAAC,CAAA"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export declare const DnsReturnCode: {
|
|
2
|
-
NoError: number;
|
|
3
|
-
QueryFormatError: number;
|
|
4
|
-
ServerFailed: number;
|
|
5
|
-
DomainDoesNotExist: number;
|
|
6
|
-
NotImplemented: number;
|
|
7
|
-
Refused: number;
|
|
8
|
-
NameShouldNotExist: number;
|
|
9
|
-
RRSetShouldNotExist: number;
|
|
10
|
-
NotAuthoritative: number;
|
|
11
|
-
NotInZone: number;
|
|
12
|
-
};
|
|
13
|
-
export type DnsReturnCode = typeof DnsReturnCode[keyof typeof DnsReturnCode];
|
|
14
|
-
//# sourceMappingURL=DnsReturnCode.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DnsReturnCode.d.ts","sourceRoot":"","sources":["../../src/DnsReturnCode.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,aAAa;;;;;;;;;;;CAWzB,CAAA;AAED,MAAM,MAAM,aAAa,GAAG,OAAO,aAAa,CAAC,MAAM,OAAO,aAAa,CAAC,CAAA"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import type { DnsReturnCode } from './DnsReturnCode.ts';
|
|
2
|
-
import type { GoogleDnsResultAnswer } from './GoogleDnsResultAnswer.ts';
|
|
3
|
-
import type { GoogleDnsResultQuestion } from './GoogleDnsResultQuestion.ts';
|
|
4
|
-
export interface GoogleDnsResult {
|
|
5
|
-
AD?: boolean;
|
|
6
|
-
Answer?: GoogleDnsResultAnswer[];
|
|
7
|
-
Authority?: GoogleDnsResultAnswer[];
|
|
8
|
-
CD?: boolean;
|
|
9
|
-
Comment?: string;
|
|
10
|
-
Question?: GoogleDnsResultQuestion[];
|
|
11
|
-
RA?: boolean;
|
|
12
|
-
RD?: boolean;
|
|
13
|
-
Status?: DnsReturnCode;
|
|
14
|
-
TC?: boolean;
|
|
15
|
-
edns_client_subnet?: string;
|
|
16
|
-
}
|
|
17
|
-
//# sourceMappingURL=GoogleDnsResult.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"GoogleDnsResult.d.ts","sourceRoot":"","sources":["../../src/GoogleDnsResult.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AACvD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAA;AACvE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAA;AAE3E,MAAM,WAAW,eAAe;IAC9B,EAAE,CAAC,EAAE,OAAO,CAAA;IACZ,MAAM,CAAC,EAAE,qBAAqB,EAAE,CAAA;IAChC,SAAS,CAAC,EAAE,qBAAqB,EAAE,CAAA;IACnC,EAAE,CAAC,EAAE,OAAO,CAAA;IACZ,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,QAAQ,CAAC,EAAE,uBAAuB,EAAE,CAAA;IACpC,EAAE,CAAC,EAAE,OAAO,CAAA;IACZ,EAAE,CAAC,EAAE,OAAO,CAAA;IACZ,MAAM,CAAC,EAAE,aAAa,CAAA;IACtB,EAAE,CAAC,EAAE,OAAO,CAAA;IACZ,kBAAkB,CAAC,EAAE,MAAM,CAAA;CAC5B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"GoogleDnsResultAnswer.d.ts","sourceRoot":"","sources":["../../src/GoogleDnsResultAnswer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAEvD,MAAM,WAAW,qBAAqB;IACpC,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,aAAa,CAAA;CACrB"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { DnsRecordType } from './DnsRecordType.ts';
|
|
2
|
-
export interface GoogleDnsResultQuestion {
|
|
3
|
-
cd?: boolean;
|
|
4
|
-
ct?: string;
|
|
5
|
-
do?: boolean;
|
|
6
|
-
edns_client_subnet?: string;
|
|
7
|
-
name?: string;
|
|
8
|
-
random_padding?: string;
|
|
9
|
-
type?: DnsRecordType;
|
|
10
|
-
}
|
|
11
|
-
//# sourceMappingURL=GoogleDnsResultQuestion.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"GoogleDnsResultQuestion.d.ts","sourceRoot":"","sources":["../../src/GoogleDnsResultQuestion.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAEvD,MAAM,WAAW,uBAAuB;IACtC,EAAE,CAAC,EAAE,OAAO,CAAA;IACZ,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,EAAE,CAAC,EAAE,OAAO,CAAA;IACZ,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAC3B,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,IAAI,CAAC,EAAE,aAAa,CAAA;CACrB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"domainExists.d.ts","sourceRoot":"","sources":["../../src/domainExists.ts"],"names":[],"mappings":"AAGA;;;;GAIG;AACH,QAAA,MAAM,YAAY,GAAU,SAAS,MAAM,qBAI1C,CAAA;AAED,OAAO,EAAE,YAAY,EAAE,CAAA"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { DnsRecordType } from './DnsRecordType.ts';
|
|
2
|
-
/**
|
|
3
|
-
* Resolves DNS information (resolves using DNS)
|
|
4
|
-
* @param domain - string
|
|
5
|
-
* @returns GoogleDnsResult
|
|
6
|
-
*/
|
|
7
|
-
declare const domainResolve: (domain?: string, type?: DnsRecordType) => Promise<import("./GoogleDnsResult.ts").GoogleDnsResult | undefined>;
|
|
8
|
-
export { domainResolve };
|
|
9
|
-
//# sourceMappingURL=domainResolve.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"domainResolve.d.ts","sourceRoot":"","sources":["../../src/domainResolve.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAGlD;;;;GAIG;AACH,QAAA,MAAM,aAAa,GAAU,SAAS,MAAM,EAAE,OAAM,aAA+B,wEAIlF,CAAA;AAED,OAAO,EAAE,aAAa,EAAE,CAAA"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { DnsRecordType } from './DnsRecordType.ts';
|
|
2
|
-
import type { GoogleDnsResult } from './GoogleDnsResult.ts';
|
|
3
|
-
declare const googleDnsOverHttps: (name: string, type?: DnsRecordType) => Promise<GoogleDnsResult | undefined>;
|
|
4
|
-
export { googleDnsOverHttps };
|
|
5
|
-
//# sourceMappingURL=googleDnsOverHttps.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"googleDnsOverHttps.d.ts","sourceRoot":"","sources":["../../src/googleDnsOverHttps.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAClD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAE3D,QAAA,MAAM,kBAAkB,GAAU,MAAM,MAAM,EAAE,OAAM,aAA+B,KAAG,OAAO,CAAC,eAAe,GAAG,SAAS,CAG1H,CAAA;AAED,OAAO,EAAE,kBAAkB,EAAE,CAAA"}
|