@tradetrust-tt/dnsprove 2.10.1 → 2.11.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 +3 -2
- package/package.json +1 -1
- package/src/index.test.ts +24 -8
- package/src/records/dnsTxt.ts +2 -0
package/dist/records/dnsTxt.js
CHANGED
|
@@ -24,6 +24,7 @@ let EthereumNetworks = exports.EthereumNetworks = void 0;
|
|
|
24
24
|
EthereumNetworks["sepolia"] = "11155111";
|
|
25
25
|
EthereumNetworks["polygon"] = "137";
|
|
26
26
|
EthereumNetworks["polygonMumbai"] = "80001";
|
|
27
|
+
EthereumNetworks["polygonAmoy"] = "80002";
|
|
27
28
|
EthereumNetworks["local"] = "1337";
|
|
28
29
|
EthereumNetworks["xdc"] = "50";
|
|
29
30
|
EthereumNetworks["xdcapothem"] = "51";
|
|
@@ -35,7 +36,7 @@ let HederaNetworks = exports.HederaNetworks = void 0;
|
|
|
35
36
|
HederaNetworks["testnet"] = "296";
|
|
36
37
|
})(HederaNetworks || (exports.HederaNetworks = HederaNetworks = {}));
|
|
37
38
|
const HederaNetworkIdT = exports.HederaNetworkIdT = (0, _runtypes.Union)((0, _runtypes.Literal)(HederaNetworks.mainnet), (0, _runtypes.Literal)(HederaNetworks.testnet));
|
|
38
|
-
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.polygonMumbai), (0, _runtypes.Literal)(EthereumNetworks.xdc), (0, _runtypes.Literal)(EthereumNetworks.xdcapothem), (0, _runtypes.Literal)(EthereumNetworks.stabilityTestnet), (0, _runtypes.Literal)(EthereumNetworks.local));
|
|
39
|
+
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.polygonMumbai), (0, _runtypes.Literal)(EthereumNetworks.polygonAmoy), (0, _runtypes.Literal)(EthereumNetworks.xdc), (0, _runtypes.Literal)(EthereumNetworks.xdcapothem), (0, _runtypes.Literal)(EthereumNetworks.stabilityTestnet), (0, _runtypes.Literal)(EthereumNetworks.local));
|
|
39
40
|
const OpenAttestationDNSTextRecordT = exports.OpenAttestationDNSTextRecordT = (0, _runtypes.Union)((0, _runtypes.Record)({
|
|
40
41
|
type: RecordTypesT,
|
|
41
42
|
net: (0, _runtypes.Literal)("ethereum"),
|
|
@@ -11,6 +11,7 @@ export declare enum EthereumNetworks {
|
|
|
11
11
|
sepolia = "11155111",
|
|
12
12
|
polygon = "137",
|
|
13
13
|
polygonMumbai = "80001",
|
|
14
|
+
polygonAmoy = "80002",
|
|
14
15
|
local = "1337",
|
|
15
16
|
xdc = "50",
|
|
16
17
|
xdcapothem = "51",
|
|
@@ -21,11 +22,11 @@ export declare enum HederaNetworks {
|
|
|
21
22
|
testnet = "296"
|
|
22
23
|
}
|
|
23
24
|
export declare const HederaNetworkIdT: Union<[Literal<HederaNetworks.mainnet>, Literal<HederaNetworks.testnet>]>;
|
|
24
|
-
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.polygonMumbai>, Literal<EthereumNetworks.xdc>, Literal<EthereumNetworks.xdcapothem>, Literal<EthereumNetworks.stabilityTestnet>, Literal<EthereumNetworks.local>]>;
|
|
25
|
+
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.polygonMumbai>, Literal<EthereumNetworks.polygonAmoy>, Literal<EthereumNetworks.xdc>, Literal<EthereumNetworks.xdcapothem>, Literal<EthereumNetworks.stabilityTestnet>, Literal<EthereumNetworks.local>]>;
|
|
25
26
|
export declare const OpenAttestationDNSTextRecordT: Union<[import("runtypes").Intersect<[Record<{
|
|
26
27
|
type: Literal<"openatts">;
|
|
27
28
|
net: Literal<"ethereum">;
|
|
28
|
-
netId: Union<[Literal<EthereumNetworks.homestead>, Literal<EthereumNetworks.ropsten>, Literal<EthereumNetworks.rinkeby>, Literal<EthereumNetworks.goerli>, Literal<EthereumNetworks.sepolia>, Literal<EthereumNetworks.polygon>, Literal<EthereumNetworks.polygonMumbai>, Literal<EthereumNetworks.xdc>, Literal<EthereumNetworks.xdcapothem>, Literal<EthereumNetworks.stabilityTestnet>, Literal<EthereumNetworks.local>]>;
|
|
29
|
+
netId: Union<[Literal<EthereumNetworks.homestead>, Literal<EthereumNetworks.ropsten>, Literal<EthereumNetworks.rinkeby>, Literal<EthereumNetworks.goerli>, Literal<EthereumNetworks.sepolia>, Literal<EthereumNetworks.polygon>, Literal<EthereumNetworks.polygonMumbai>, Literal<EthereumNetworks.polygonAmoy>, Literal<EthereumNetworks.xdc>, Literal<EthereumNetworks.xdcapothem>, Literal<EthereumNetworks.stabilityTestnet>, Literal<EthereumNetworks.local>]>;
|
|
29
30
|
addr: import("runtypes").Constraint<String, string, unknown>;
|
|
30
31
|
}, false>, Partial<{
|
|
31
32
|
dnssec: Boolean;
|
package/package.json
CHANGED
package/src/index.test.ts
CHANGED
|
@@ -257,16 +257,32 @@ describe("queryDns", () => {
|
|
|
257
257
|
});
|
|
258
258
|
|
|
259
259
|
describe("getDocumentStoreRecords for Hedera", () => {
|
|
260
|
-
const sampleDnsTextRecord =
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
260
|
+
const sampleDnsTextRecord = [
|
|
261
|
+
{
|
|
262
|
+
type: "openatts",
|
|
263
|
+
net: "hedera",
|
|
264
|
+
netId: "296",
|
|
265
|
+
dnssec: false,
|
|
266
|
+
addr: "0x3DE43bfd3D771931E46CbBd4EDE0D3d95C85f81A",
|
|
267
|
+
},
|
|
268
|
+
{
|
|
269
|
+
addr: "0x222B69788e2e9B7FB93a3a0fE258D4604Dc7df21",
|
|
270
|
+
dnssec: false,
|
|
271
|
+
net: "hedera",
|
|
272
|
+
netId: "295",
|
|
273
|
+
type: "openatts",
|
|
274
|
+
},
|
|
275
|
+
{
|
|
276
|
+
addr: "0x222B69788e2e9B7FB93a3a0fE258D4604Dc7df21",
|
|
277
|
+
dnssec: false,
|
|
278
|
+
net: "hedera",
|
|
279
|
+
netId: "296",
|
|
280
|
+
type: "openatts",
|
|
281
|
+
},
|
|
282
|
+
];
|
|
267
283
|
|
|
268
284
|
test("it should work with trustlv.org", async () => {
|
|
269
285
|
const records = await getDocumentStoreRecords("trustlv.org");
|
|
270
|
-
expect(records).toStrictEqual(
|
|
286
|
+
expect(records).toStrictEqual(sampleDnsTextRecord);
|
|
271
287
|
});
|
|
272
288
|
});
|
package/src/records/dnsTxt.ts
CHANGED
|
@@ -21,6 +21,7 @@ export enum EthereumNetworks {
|
|
|
21
21
|
sepolia = "11155111",
|
|
22
22
|
polygon = "137",
|
|
23
23
|
polygonMumbai = "80001",
|
|
24
|
+
polygonAmoy = "80002",
|
|
24
25
|
local = "1337",
|
|
25
26
|
xdc = "50",
|
|
26
27
|
xdcapothem = "51",
|
|
@@ -41,6 +42,7 @@ export const EthereumNetworkIdT = Union(
|
|
|
41
42
|
Literal(EthereumNetworks.sepolia),
|
|
42
43
|
Literal(EthereumNetworks.polygon),
|
|
43
44
|
Literal(EthereumNetworks.polygonMumbai),
|
|
45
|
+
Literal(EthereumNetworks.polygonAmoy),
|
|
44
46
|
Literal(EthereumNetworks.xdc),
|
|
45
47
|
Literal(EthereumNetworks.xdcapothem),
|
|
46
48
|
Literal(EthereumNetworks.stabilityTestnet),
|