@tradetrust-tt/dnsprove 2.13.2 → 2.14.0
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/records/dnsTxt.js +2 -1
- package/dist/ts/records/dnsTxt.d.ts +4 -3
- package/package.json +1 -1
- package/src/index.test.ts +17 -0
- package/src/records/dnsTxt.ts +4 -1
package/dist/records/dnsTxt.js
CHANGED
|
@@ -31,6 +31,7 @@ let EthereumNetworks = exports.EthereumNetworks = void 0;
|
|
|
31
31
|
EthereumNetworks["stability"] = "101010";
|
|
32
32
|
EthereumNetworks["hedera"] = "295";
|
|
33
33
|
EthereumNetworks["hederatestnet"] = "296";
|
|
34
|
+
EthereumNetworks["astron"] = "1338";
|
|
34
35
|
})(EthereumNetworks || (exports.EthereumNetworks = EthereumNetworks = {}));
|
|
35
36
|
let HederaNetworks = exports.HederaNetworks = void 0;
|
|
36
37
|
(function (HederaNetworks) {
|
|
@@ -38,7 +39,7 @@ let HederaNetworks = exports.HederaNetworks = void 0;
|
|
|
38
39
|
HederaNetworks["testnet"] = "296";
|
|
39
40
|
})(HederaNetworks || (exports.HederaNetworks = HederaNetworks = {}));
|
|
40
41
|
const HederaNetworkIdT = exports.HederaNetworkIdT = (0, _runtypes.Union)((0, _runtypes.Literal)(HederaNetworks.mainnet), (0, _runtypes.Literal)(HederaNetworks.testnet));
|
|
41
|
-
const EthereumNetworkIdT = exports.EthereumNetworkIdT = (0, _runtypes.Union)((0, _runtypes.Literal)(EthereumNetworks.homestead), (0, _runtypes.Literal)(EthereumNetworks.ropsten), (0, _runtypes.Literal)(EthereumNetworks.rinkeby), (0, _runtypes.Literal)(EthereumNetworks.goerli), (0, _runtypes.Literal)(EthereumNetworks.sepolia), (0, _runtypes.Literal)(EthereumNetworks.polygon), (0, _runtypes.Literal)(EthereumNetworks.polygonAmoy), (0, _runtypes.Literal)(EthereumNetworks.xdc), (0, _runtypes.Literal)(EthereumNetworks.xdcapothem), (0, _runtypes.Literal)(EthereumNetworks.stabilityTestnet), (0, _runtypes.Literal)(EthereumNetworks.stability), (0, _runtypes.Literal)(EthereumNetworks.local), (0, _runtypes.Literal)(EthereumNetworks.hedera), (0, _runtypes.Literal)(EthereumNetworks.hederatestnet));
|
|
42
|
+
const EthereumNetworkIdT = exports.EthereumNetworkIdT = (0, _runtypes.Union)((0, _runtypes.Literal)(EthereumNetworks.homestead), (0, _runtypes.Literal)(EthereumNetworks.ropsten), (0, _runtypes.Literal)(EthereumNetworks.rinkeby), (0, _runtypes.Literal)(EthereumNetworks.goerli), (0, _runtypes.Literal)(EthereumNetworks.sepolia), (0, _runtypes.Literal)(EthereumNetworks.polygon), (0, _runtypes.Literal)(EthereumNetworks.polygonAmoy), (0, _runtypes.Literal)(EthereumNetworks.xdc), (0, _runtypes.Literal)(EthereumNetworks.xdcapothem), (0, _runtypes.Literal)(EthereumNetworks.stabilityTestnet), (0, _runtypes.Literal)(EthereumNetworks.stability), (0, _runtypes.Literal)(EthereumNetworks.local), (0, _runtypes.Literal)(EthereumNetworks.hedera), (0, _runtypes.Literal)(EthereumNetworks.hederatestnet), (0, _runtypes.Literal)(EthereumNetworks.astron));
|
|
42
43
|
const OpenAttestationDNSTextRecordT = exports.OpenAttestationDNSTextRecordT = (0, _runtypes.Union)((0, _runtypes.Record)({
|
|
43
44
|
type: RecordTypesT,
|
|
44
45
|
net: (0, _runtypes.Literal)("ethereum"),
|
|
@@ -17,18 +17,19 @@ export declare enum EthereumNetworks {
|
|
|
17
17
|
stabilityTestnet = "20180427",
|
|
18
18
|
stability = "101010",
|
|
19
19
|
hedera = "295",
|
|
20
|
-
hederatestnet = "296"
|
|
20
|
+
hederatestnet = "296",
|
|
21
|
+
astron = "1338"
|
|
21
22
|
}
|
|
22
23
|
export declare enum HederaNetworks {
|
|
23
24
|
mainnet = "295",
|
|
24
25
|
testnet = "296"
|
|
25
26
|
}
|
|
26
27
|
export declare const HederaNetworkIdT: Union<[Literal<HederaNetworks.mainnet>, Literal<HederaNetworks.testnet>]>;
|
|
27
|
-
export declare const EthereumNetworkIdT: Union<[Literal<EthereumNetworks.homestead>, Literal<EthereumNetworks.ropsten>, Literal<EthereumNetworks.rinkeby>, Literal<EthereumNetworks.goerli>, Literal<EthereumNetworks.sepolia>, Literal<EthereumNetworks.polygon>, Literal<EthereumNetworks.polygonAmoy>, Literal<EthereumNetworks.xdc>, Literal<EthereumNetworks.xdcapothem>, Literal<EthereumNetworks.stabilityTestnet>, Literal<EthereumNetworks.stability>, Literal<EthereumNetworks.local>, Literal<EthereumNetworks.hedera>, Literal<EthereumNetworks.hederatestnet>]>;
|
|
28
|
+
export declare const EthereumNetworkIdT: Union<[Literal<EthereumNetworks.homestead>, Literal<EthereumNetworks.ropsten>, Literal<EthereumNetworks.rinkeby>, Literal<EthereumNetworks.goerli>, Literal<EthereumNetworks.sepolia>, Literal<EthereumNetworks.polygon>, Literal<EthereumNetworks.polygonAmoy>, Literal<EthereumNetworks.xdc>, Literal<EthereumNetworks.xdcapothem>, Literal<EthereumNetworks.stabilityTestnet>, Literal<EthereumNetworks.stability>, Literal<EthereumNetworks.local>, Literal<EthereumNetworks.hedera>, Literal<EthereumNetworks.hederatestnet>, Literal<EthereumNetworks.astron>]>;
|
|
28
29
|
export declare const OpenAttestationDNSTextRecordT: Union<[import("runtypes").Intersect<[Record<{
|
|
29
30
|
type: Literal<"openatts">;
|
|
30
31
|
net: Literal<"ethereum">;
|
|
31
|
-
netId: Union<[Literal<EthereumNetworks.homestead>, Literal<EthereumNetworks.ropsten>, Literal<EthereumNetworks.rinkeby>, Literal<EthereumNetworks.goerli>, Literal<EthereumNetworks.sepolia>, Literal<EthereumNetworks.polygon>, Literal<EthereumNetworks.polygonAmoy>, Literal<EthereumNetworks.xdc>, Literal<EthereumNetworks.xdcapothem>, Literal<EthereumNetworks.stabilityTestnet>, Literal<EthereumNetworks.stability>, Literal<EthereumNetworks.local>, Literal<EthereumNetworks.hedera>, Literal<EthereumNetworks.hederatestnet>]>;
|
|
32
|
+
netId: Union<[Literal<EthereumNetworks.homestead>, Literal<EthereumNetworks.ropsten>, Literal<EthereumNetworks.rinkeby>, Literal<EthereumNetworks.goerli>, Literal<EthereumNetworks.sepolia>, Literal<EthereumNetworks.polygon>, Literal<EthereumNetworks.polygonAmoy>, Literal<EthereumNetworks.xdc>, Literal<EthereumNetworks.xdcapothem>, Literal<EthereumNetworks.stabilityTestnet>, Literal<EthereumNetworks.stability>, Literal<EthereumNetworks.local>, Literal<EthereumNetworks.hedera>, Literal<EthereumNetworks.hederatestnet>, Literal<EthereumNetworks.astron>]>;
|
|
32
33
|
addr: import("runtypes").Constraint<String, string, unknown>;
|
|
33
34
|
}, false>, Partial<{
|
|
34
35
|
dnssec: Boolean;
|
package/package.json
CHANGED
package/src/index.test.ts
CHANGED
|
@@ -328,3 +328,20 @@ describe("getDocumentStoreRecords for Hedera", () => {
|
|
|
328
328
|
expect(records).toStrictEqual(sampleDnsTextRecord);
|
|
329
329
|
});
|
|
330
330
|
});
|
|
331
|
+
|
|
332
|
+
describe("getDocumentStoreRecords for Astron", () => {
|
|
333
|
+
const sampleDnsTextRecord = [
|
|
334
|
+
{
|
|
335
|
+
type: "openatts",
|
|
336
|
+
net: "ethereum",
|
|
337
|
+
netId: "1338",
|
|
338
|
+
addr: "0x0D5da59B93e8AC9b1781CE5694fbcE626586F4c9",
|
|
339
|
+
dnssec: false,
|
|
340
|
+
},
|
|
341
|
+
];
|
|
342
|
+
|
|
343
|
+
test("it should work with astronlayer2.bitfactory.cn", async () => {
|
|
344
|
+
const records = await getDocumentStoreRecords("astronlayer2.bitfactory.cn");
|
|
345
|
+
expect(records).toStrictEqual(sampleDnsTextRecord);
|
|
346
|
+
});
|
|
347
|
+
});
|
package/src/records/dnsTxt.ts
CHANGED
|
@@ -28,12 +28,14 @@ export enum EthereumNetworks {
|
|
|
28
28
|
stability = "101010",
|
|
29
29
|
hedera = "295",
|
|
30
30
|
hederatestnet = "296",
|
|
31
|
+
astron = "1338",
|
|
31
32
|
}
|
|
32
33
|
|
|
33
34
|
export enum HederaNetworks {
|
|
34
35
|
mainnet = "295",
|
|
35
36
|
testnet = "296",
|
|
36
37
|
}
|
|
38
|
+
|
|
37
39
|
export const HederaNetworkIdT = Union(Literal(HederaNetworks.mainnet), Literal(HederaNetworks.testnet));
|
|
38
40
|
|
|
39
41
|
export const EthereumNetworkIdT = Union(
|
|
@@ -50,7 +52,8 @@ export const EthereumNetworkIdT = Union(
|
|
|
50
52
|
Literal(EthereumNetworks.stability),
|
|
51
53
|
Literal(EthereumNetworks.local),
|
|
52
54
|
Literal(EthereumNetworks.hedera),
|
|
53
|
-
Literal(EthereumNetworks.hederatestnet)
|
|
55
|
+
Literal(EthereumNetworks.hederatestnet),
|
|
56
|
+
Literal(EthereumNetworks.astron)
|
|
54
57
|
);
|
|
55
58
|
|
|
56
59
|
export const OpenAttestationDNSTextRecordT = Union(
|