Skip to content

Commit

Permalink
Merge pull request #234 from TheLindaProjectInc/develop
Browse files Browse the repository at this point in the history
Merge develop into main
  • Loading branch information
SeqSEE committed Jun 13, 2023
2 parents 10bdcef + 7050bc4 commit 2a01d82
Show file tree
Hide file tree
Showing 46 changed files with 5,818 additions and 5,542 deletions.
1,720 changes: 774 additions & 946 deletions docs/assets/main.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/assets/search.js

Large diffs are not rendered by default.

813 changes: 450 additions & 363 deletions docs/assets/style.css

Large diffs are not rendered by default.

254 changes: 134 additions & 120 deletions docs/classes/BaseResolver.html

Large diffs are not rendered by default.

280 changes: 147 additions & 133 deletions docs/classes/DefaultReverseResolver.html

Large diffs are not rendered by default.

250 changes: 132 additions & 118 deletions docs/classes/MNS.html

Large diffs are not rendered by default.

566 changes: 295 additions & 271 deletions docs/classes/Name.html

Large diffs are not rendered by default.

929 changes: 494 additions & 435 deletions docs/classes/PublicResolver.html

Large diffs are not rendered by default.

140 changes: 74 additions & 66 deletions docs/classes/Resolver.html

Large diffs are not rendered by default.

638 changes: 332 additions & 306 deletions docs/classes/registrars.MrxRegistrar.MrxRegistrar.html

Large diffs are not rendered by default.

Large diffs are not rendered by default.

480 changes: 259 additions & 221 deletions docs/classes/registrars.ReverseRegistrar.ReverseRegistrar.html

Large diffs are not rendered by default.

330 changes: 179 additions & 151 deletions docs/classes/registrars.TestRegistrar.TestRegistrar.html

Large diffs are not rendered by default.

72 changes: 31 additions & 41 deletions docs/functions/getMNSAddress.html

Large diffs are not rendered by default.

76 changes: 33 additions & 43 deletions docs/functions/getMNSContract.html

Large diffs are not rendered by default.

76 changes: 33 additions & 43 deletions docs/functions/getResolverContract.html

Large diffs are not rendered by default.

76 changes: 33 additions & 43 deletions docs/functions/getReverseRegistrarContract.html

Large diffs are not rendered by default.

72 changes: 31 additions & 41 deletions docs/functions/labelhash.html

Large diffs are not rendered by default.

94 changes: 41 additions & 53 deletions docs/index.html

Large diffs are not rendered by default.

236 changes: 121 additions & 115 deletions docs/interfaces/Deployment.html

Large diffs are not rendered by default.

161 changes: 92 additions & 69 deletions docs/interfaces/profiles.ABIResolver.html

Large diffs are not rendered by default.

216 changes: 121 additions & 95 deletions docs/interfaces/profiles.AddrResolver.html

Large diffs are not rendered by default.

151 changes: 86 additions & 65 deletions docs/interfaces/profiles.ContentHashResolver.html

Large diffs are not rendered by default.

271 changes: 150 additions & 121 deletions docs/interfaces/profiles.DNSResolver.html

Large diffs are not rendered by default.

161 changes: 92 additions & 69 deletions docs/interfaces/profiles.InterfaceResolver.html

Large diffs are not rendered by default.

151 changes: 86 additions & 65 deletions docs/interfaces/profiles.NameResolver.html

Large diffs are not rendered by default.

156 changes: 89 additions & 67 deletions docs/interfaces/profiles.PubkeyResolver.html

Large diffs are not rendered by default.

161 changes: 92 additions & 69 deletions docs/interfaces/profiles.TextResolver.html

Large diffs are not rendered by default.

96 changes: 43 additions & 53 deletions docs/modules.html

Large diffs are not rendered by default.

85 changes: 46 additions & 39 deletions docs/modules/profiles.html

Large diffs are not rendered by default.

64 changes: 39 additions & 25 deletions docs/modules/registrars.MrxRegistrar.html

Large diffs are not rendered by default.

64 changes: 39 additions & 25 deletions docs/modules/registrars.MrxRegistrarController.html

Large diffs are not rendered by default.

64 changes: 39 additions & 25 deletions docs/modules/registrars.ReverseRegistrar.html

Large diffs are not rendered by default.

64 changes: 39 additions & 25 deletions docs/modules/registrars.TestRegistrar.html

Large diffs are not rendered by default.

64 changes: 38 additions & 26 deletions docs/modules/registrars.html

Large diffs are not rendered by default.

72 changes: 31 additions & 41 deletions docs/variables/CONTRACTS.html

Large diffs are not rendered by default.

68 changes: 29 additions & 39 deletions docs/variables/namehash.html

Large diffs are not rendered by default.

1,610 changes: 772 additions & 838 deletions package-lock.json

Large diffs are not rendered by default.

11 changes: 6 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@metrixnames/mnslib",
"version": "2.1.9",
"version": "2.1.10",
"description": "Library for interacting with the Metrix Name Service",
"repository": "TheLindaProjectInc/mnslib",
"source": "src/index.ts",
Expand Down Expand Up @@ -46,7 +46,7 @@
"@istanbuljs/nyc-config-typescript": "^1.0.2",
"@types/locks": "^0.2.1",
"@types/mocha": "^10.0.1",
"@types/node": "^18.0.4",
"@types/node": "^20.3.1",
"@types/node-fetch": "^2.6.1",
"@typescript-eslint/eslint-plugin": "^5.23.0",
"@typescript-eslint/parser": "^5.23.0",
Expand All @@ -57,17 +57,18 @@
"prettier": "^2.6.2",
"source-map-support": "^0.5.21",
"ts-node": "^10.8.0",
"typedoc": "^0.23.7",
"typedoc": "^0.24.4",
"typescript": "4.9.5"
},
"dependencies": {
"@ensdomains/address-encoder": "^0.2.20",
"@ensdomains/eth-ens-namehash": "^2.0.15",
"@metrixcoin/metrilib": "^1.5.7-beta",
"@metrixcoin/metrilib": "^1.5.19-beta",
"bs58": "^5.0.0",
"content-hash": "^2.5.2",
"ethers": "^6.0.3",
"locks": "^0.2.2",
"node-fetch": "^2.6.1"
}
},
"optionalDependencies": { "fsevents": "*" }
}
14 changes: 7 additions & 7 deletions src/index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,42 +23,42 @@ describe('mnslib tests', () => {
]);
const exists = recordExists ? recordExists.toString() === 'true' : false;
equal(exists, true);
}).timeout(10000);
}).timeout(30000);

it('should have a ttl', async () => {
const ttl = await name.getTTL();
equal(!isNaN(ttl), true);
}).timeout(10000);
}).timeout(30000);

it('should return expected TestNet MRX address', async () => {
const address = await name.getAddress('MRX');
equal(address, 'maTQfd4w7mqCzGL32RgBFMYY9ehCmjLEGf');
}).timeout(10000);
}).timeout(30000);

it('should return expected TestNet address', async () => {
const address = await name.getAddress();
equal(address, '0xC87bB8Ab63De99A58a5339217C4A1C92f0FBFEFe');
}).timeout(10000);
}).timeout(30000);

it('should return expected TestNet owner', async () => {
const owner = await name.getOwner();
equal(
owner.toLowerCase().replace('0x', ''),
'c87bb8ab63de99a58a5339217c4a1c92f0fbfefe'
);
}).timeout(10000);
}).timeout(30000);

it('should return expected TestNet name given Ethereum checksum address', async () => {
const addrName = await mns.getName(
'0xC87bB8Ab63De99A58a5339217C4A1C92f0FBFEFe'
);
equal(addrName, first);
}).timeout(10000);
}).timeout(30000);

it('should return expected TestNet name given hex address', async () => {
const addrName = await mns.getName(
'c87bb8ab63de99a58a5339217c4a1c92f0fbfefe'
);
equal(addrName, first);
}).timeout(10000);
}).timeout(30000);
});
4 changes: 2 additions & 2 deletions src/mns/registrar/addr.reverse/ReverseRegistrar.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ describe('ReverseRegistrar tests', () => {
resolver.replace('0x', '').toLowerCase(),
CONTRACTS[network].DefaultReverseResolver
);
}).timeout(10000);
}).timeout(30000);

it('should match the MNS address', async () => {
const registry = await registrar.mns();
equal(registry.replace('0x', '').toLowerCase(), getMNSAddress(network));
}).timeout(10000);
}).timeout(30000);
});
10 changes: 5 additions & 5 deletions src/mns/registrar/mrx/MrxRegistrar.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,25 +15,25 @@ describe('MRXRegistrar tests', () => {
baseNode,
'0xc47342cbb5c26e3ba5e8293b0ab45469187c57ecfdf5f32b29af8c38eabdd2b2'
);
}).timeout(10000);
}).timeout(30000);

it('should match the MNS address', async () => {
const registry = await registrar.mns();
equal(registry.replace('0x', '').toLowerCase(), getMNSAddress(network));
}).timeout(10000);
}).timeout(30000);

it('should return a total supply', async () => {
const supply = await registrar.totalSupply();
equal(isNaN(Number(supply)), false);
}).timeout(10000);
}).timeout(30000);

it('should return "MNS" as symbol', async () => {
const symbol = await registrar.symbol();
equal(symbol, 'MNS');
}).timeout(10000);
}).timeout(30000);

it('should return "Metrix Name Service" as symbol', async () => {
const name = await registrar.name();
equal(name, 'Metrix Name Service');
}).timeout(10000);
}).timeout(30000);
});
8 changes: 4 additions & 4 deletions src/mns/registrar/mrx/MrxRegistrarController.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ describe('MRXRegistrarController tests', () => {
BigInt(60 * 60 * 24 * 365)
);
equal(isNaN(Number(price)), false);
}).timeout(10000);
}).timeout(30000);

it('should be a valid name', async () => {
const valid = await controller.valid('pyropets');
equal(valid, true);
}).timeout(10000);
}).timeout(30000);

it('should makeCommitmentWithConfig', async () => {
const commitment = await controller.makeCommitmentWithConfig(
Expand All @@ -32,10 +32,10 @@ describe('MRXRegistrarController tests', () => {
`0x${controller.address}`
);
notEqual(commitment, ethers.ZeroHash);
}).timeout(10000);
}).timeout(30000);

it('should be an invalid name', async () => {
const valid = await controller.valid('test....');
equal(valid, false);
}).timeout(10000);
}).timeout(30000);
});
4 changes: 2 additions & 2 deletions src/mns/registrar/test/TestRegistrar.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ describe('TestRegistrar tests', () => {
rootNode,
'0x04f740db81dc36c853ab4205bddd785f46e79ccedca351fc6dfcbd8cc9a33dd6'
);
}).timeout(10000);
}).timeout(30000);

it('should match the MNS address', async () => {
const registry = await registrar.mns();
equal(registry.replace('0x', '').toLowerCase(), getMNSAddress(network));
}).timeout(10000);
}).timeout(30000);
});
4 changes: 2 additions & 2 deletions src/mns/resolver/DefaultReverseResolver.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ describe('DefaultReverseResolver tests', () => {
it('should match the default reverse resolver address', async () => {
const address = await name.getResolver();
equal(address.replace('0x', '').toLowerCase(), resolver.address);
}).timeout(10000);
}).timeout(30000);

it('should match resolver.name(hash) address', async () => {
const label = await resolver.name(name.hash);
equal('first.mrx', label);
}).timeout(10000);
}).timeout(30000);
});
4 changes: 2 additions & 2 deletions src/mns/resolver/PublicResolver.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ describe('PublicResolver tests', () => {
it('should match the public resolver address', async () => {
const address: string = await name.getResolverAddr();
equal(address.replace('0x', '').toLowerCase(), resolver.address);
}).timeout(10000);
}).timeout(30000);

it('should match name.getAddress() address', async () => {
equal(await name.getAddress(), await resolver.addr(name.hash));
}).timeout(10000);
}).timeout(30000);
});

0 comments on commit 2a01d82

Please sign in to comment.