@ensdomains/ensjs 4.1.2 → 4.2.2
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/clients/decorators/subgraph.d.ts +1 -1
- package/dist/clients/decorators/wallet.d.ts +3 -3
- package/dist/contracts/addEnsContracts.d.ts +6 -1
- package/dist/contracts/addEnsContracts.js +20 -1
- package/dist/contracts/addEnsContracts.js.map +1 -1
- package/dist/contracts/bulkRenewal.d.ts +6 -0
- package/dist/contracts/bulkRenewal.js +7 -0
- package/dist/contracts/bulkRenewal.js.map +1 -1
- package/dist/contracts/consts.d.ts +35 -59
- package/dist/contracts/consts.js +35 -60
- package/dist/contracts/consts.js.map +1 -1
- package/dist/contracts/ethRegistrarController.d.ts +394 -27
- package/dist/contracts/ethRegistrarController.js +180 -34
- package/dist/contracts/ethRegistrarController.js.map +1 -1
- package/dist/errors/utils.js +1 -0
- package/dist/errors/utils.js.map +1 -1
- package/dist/errors/version.d.ts +1 -1
- package/dist/errors/version.js +1 -1
- package/dist/errors/version.js.map +1 -1
- package/dist/functions/public/batch.js.map +1 -1
- package/dist/functions/public/getName.js.map +1 -1
- package/dist/functions/public/getRecords.js +2 -2
- package/dist/functions/public/getRecords.js.map +1 -1
- package/dist/functions/subgraph/client.js +1 -0
- package/dist/functions/subgraph/client.js.map +1 -1
- package/dist/functions/subgraph/getDecodedName.d.ts +5 -1
- package/dist/functions/subgraph/getDecodedName.js +5 -1
- package/dist/functions/subgraph/getDecodedName.js.map +1 -1
- package/dist/functions/subgraph/getNameHistory.d.ts +3 -0
- package/dist/functions/subgraph/getNameHistory.js +3 -0
- package/dist/functions/subgraph/getNameHistory.js.map +1 -1
- package/dist/functions/subgraph/getNamesForAddress.d.ts +3 -0
- package/dist/functions/subgraph/getNamesForAddress.js +4 -0
- package/dist/functions/subgraph/getNamesForAddress.js.map +1 -1
- package/dist/functions/subgraph/getSubgraphRecords.d.ts +4 -1
- package/dist/functions/subgraph/getSubgraphRecords.js +4 -1
- package/dist/functions/subgraph/getSubgraphRecords.js.map +1 -1
- package/dist/functions/subgraph/getSubgraphRegistrant.d.ts +3 -0
- package/dist/functions/subgraph/getSubgraphRegistrant.js +3 -0
- package/dist/functions/subgraph/getSubgraphRegistrant.js.map +1 -1
- package/dist/functions/subgraph/getSubnames.d.ts +3 -0
- package/dist/functions/subgraph/getSubnames.js +3 -0
- package/dist/functions/subgraph/getSubnames.js.map +1 -1
- package/dist/functions/wallet/commitName.d.ts +1 -1
- package/dist/functions/wallet/commitName.js +2 -2
- package/dist/functions/wallet/commitName.js.map +1 -1
- package/dist/functions/wallet/registerName.d.ts +1 -1
- package/dist/functions/wallet/registerName.js +4 -7
- package/dist/functions/wallet/registerName.js.map +1 -1
- package/dist/functions/wallet/renewNames.d.ts +5 -3
- package/dist/functions/wallet/renewNames.js +4 -3
- package/dist/functions/wallet/renewNames.js.map +1 -1
- package/dist/functions/wallet/setContentHashRecord.d.ts +1 -1
- package/dist/functions/wallet/setContentHashRecord.js +1 -1
- package/dist/subgraph.d.ts +11 -0
- package/dist/subgraph.js +11 -0
- package/dist/subgraph.js.map +1 -1
- package/dist/utils/checkSafeUniversalResolverData.js.map +1 -1
- package/dist/utils/consts.d.ts +1 -0
- package/dist/utils/consts.js +1 -0
- package/dist/utils/consts.js.map +1 -1
- package/dist/utils/encoders/encodeAbi.js.map +1 -1
- package/dist/utils/generateFunction.js.map +1 -1
- package/dist/utils/index.d.ts +2 -3
- package/dist/utils/index.js +2 -3
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/labels.js +4 -2
- package/dist/utils/labels.js.map +1 -1
- package/dist/utils/registerHelpers.d.ts +20 -27
- package/dist/utils/registerHelpers.js +19 -33
- package/dist/utils/registerHelpers.js.map +1 -1
- package/dist/wallet.d.ts +0 -2
- package/dist/wallet.js +0 -2
- package/dist/wallet.js.map +1 -1
- package/package.json +6 -7
- package/src/@types/dns-packet/index.d.ts +1 -0
- package/src/@types/pako.d.ts +4 -1
- package/src/clients/decorators/subgraph.ts +1 -1
- package/src/clients/decorators/wallet.ts +3 -3
- package/src/contracts/addEnsContracts.ts +32 -1
- package/src/contracts/bulkRenewal.ts +7 -0
- package/src/contracts/consts.ts +39 -60
- package/src/contracts/ethRegistrarController.ts +181 -34
- package/src/errors/utils.ts +1 -0
- package/src/errors/version.ts +1 -1
- package/src/functions/public/batch.ts +1 -0
- package/src/functions/public/getName.ts +1 -0
- package/src/functions/public/getRecords.ts +8 -2
- package/src/functions/subgraph/client.ts +1 -0
- package/src/functions/subgraph/getDecodedName.ts +5 -1
- package/src/functions/subgraph/getNameHistory.ts +3 -0
- package/src/functions/subgraph/getNamesForAddress.ts +4 -0
- package/src/functions/subgraph/getSubgraphRecords.ts +4 -1
- package/src/functions/subgraph/getSubgraphRegistrant.ts +3 -0
- package/src/functions/subgraph/getSubnames.ts +3 -0
- package/src/functions/wallet/commitName.ts +2 -2
- package/src/functions/wallet/registerName.ts +4 -8
- package/src/functions/wallet/renewNames.ts +12 -3
- package/src/functions/wallet/setContentHashRecord.ts +1 -1
- package/src/subgraph.ts +11 -0
- package/src/types.ts +2 -0
- package/src/utils/checkSafeUniversalResolverData.ts +1 -0
- package/src/utils/consts.ts +2 -0
- package/src/utils/encoders/encodeAbi.ts +1 -0
- package/src/utils/generateFunction.ts +6 -0
- package/src/utils/index.ts +5 -20
- package/src/utils/labels.ts +8 -4
- package/src/utils/registerHelpers.ts +40 -64
- package/src/wallet.ts +0 -14
- package/dist/functions/wallet/legacyCommitName.d.ts +0 -40
- package/dist/functions/wallet/legacyCommitName.js +0 -72
- package/dist/functions/wallet/legacyCommitName.js.map +0 -1
- package/dist/functions/wallet/legacyRegisterName.d.ts +0 -59
- package/dist/functions/wallet/legacyRegisterName.js +0 -93
- package/dist/functions/wallet/legacyRegisterName.js.map +0 -1
- package/dist/utils/legacyRegisterHelpers.d.ts +0 -48
- package/dist/utils/legacyRegisterHelpers.js +0 -45
- package/dist/utils/legacyRegisterHelpers.js.map +0 -1
- package/src/functions/wallet/legacyCommitName.ts +0 -127
- package/src/functions/wallet/legacyRegisterName.ts +0 -159
- package/src/utils/legacyRegisterHelpers.ts +0 -147
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { type Address, type Hex } from 'viem';
|
|
2
|
-
import { type EncodeChildFusesInputObject } from './fuses.js';
|
|
3
2
|
import { type RecordOptions } from './generateRecordCallArray.js';
|
|
3
|
+
export declare enum ReverseRecordParameter {
|
|
4
|
+
None = 0,
|
|
5
|
+
Ethereum = 1,
|
|
6
|
+
Default = 2
|
|
7
|
+
}
|
|
4
8
|
export type RegistrationParameters = {
|
|
5
9
|
/** Name to register */
|
|
6
10
|
name: string;
|
|
@@ -15,35 +19,24 @@ export type RegistrationParameters = {
|
|
|
15
19
|
/** Records to set upon registration */
|
|
16
20
|
records?: RecordOptions;
|
|
17
21
|
/** Sets primary name upon registration */
|
|
18
|
-
reverseRecord?:
|
|
19
|
-
/**
|
|
20
|
-
|
|
22
|
+
reverseRecord?: ReverseRecordParameter;
|
|
23
|
+
/** Referrer for registration */
|
|
24
|
+
referrer?: Hex;
|
|
25
|
+
};
|
|
26
|
+
export type RegistrationCallData = {
|
|
27
|
+
label: string;
|
|
28
|
+
owner: Address;
|
|
29
|
+
duration: bigint;
|
|
30
|
+
secret: Hex;
|
|
31
|
+
resolver: Address;
|
|
32
|
+
data: Hex[];
|
|
33
|
+
reverseRecord: ReverseRecordParameter;
|
|
34
|
+
referrer: Hex;
|
|
21
35
|
};
|
|
22
|
-
export type CommitmentTuple = [
|
|
23
|
-
labelHash: Hex,
|
|
24
|
-
owner: Address,
|
|
25
|
-
duration: bigint,
|
|
26
|
-
secret: Hex,
|
|
27
|
-
resolver: Address,
|
|
28
|
-
data: Hex[],
|
|
29
|
-
reverseRecord: boolean,
|
|
30
|
-
ownerControlledFuses: number
|
|
31
|
-
];
|
|
32
|
-
export type RegistrationTuple = [
|
|
33
|
-
label: string,
|
|
34
|
-
owner: Address,
|
|
35
|
-
duration: bigint,
|
|
36
|
-
secret: Hex,
|
|
37
|
-
resolver: Address,
|
|
38
|
-
data: Hex[],
|
|
39
|
-
reverseRecord: boolean,
|
|
40
|
-
ownerControlledFuses: number
|
|
41
|
-
];
|
|
42
36
|
export declare const randomSecret: ({ platformDomain, campaign, }?: {
|
|
43
37
|
platformDomain?: string;
|
|
44
38
|
campaign?: number;
|
|
45
39
|
}) => `0x${string}`;
|
|
46
|
-
export declare const
|
|
47
|
-
export declare const
|
|
48
|
-
export declare const makeCommitmentFromTuple: (params: CommitmentTuple) => Hex;
|
|
40
|
+
export declare const makeRegistrationCallData: ({ name, owner, duration, resolverAddress, records: { coins, ...records }, reverseRecord, secret, referrer, }: RegistrationParameters) => RegistrationCallData;
|
|
41
|
+
export declare const makeCommitmentFromCallData: (callData: RegistrationCallData) => Hex;
|
|
49
42
|
export declare const makeCommitment: (params: RegistrationParameters) => Hex;
|
|
@@ -1,9 +1,14 @@
|
|
|
1
|
-
import { encodeAbiParameters, keccak256,
|
|
1
|
+
import { encodeAbiParameters, keccak256, pad, parseAbiParameters, toBytes, toHex, } from 'viem';
|
|
2
2
|
import { CampaignReferenceTooLargeError, ResolverAddressRequiredError, } from '../errors/utils.js';
|
|
3
3
|
import { EMPTY_ADDRESS } from './consts.js';
|
|
4
|
-
import { encodeFuses } from './fuses.js';
|
|
5
4
|
import { generateRecordCallArray, } from './generateRecordCallArray.js';
|
|
6
5
|
import { namehash } from './normalise.js';
|
|
6
|
+
export var ReverseRecordParameter;
|
|
7
|
+
(function (ReverseRecordParameter) {
|
|
8
|
+
ReverseRecordParameter[ReverseRecordParameter["None"] = 0] = "None";
|
|
9
|
+
ReverseRecordParameter[ReverseRecordParameter["Ethereum"] = 1] = "Ethereum";
|
|
10
|
+
ReverseRecordParameter[ReverseRecordParameter["Default"] = 2] = "Default";
|
|
11
|
+
})(ReverseRecordParameter || (ReverseRecordParameter = {}));
|
|
7
12
|
const cryptoRef = (typeof crypto !== 'undefined' && crypto) ||
|
|
8
13
|
(typeof window !== 'undefined' &&
|
|
9
14
|
typeof window.crypto !== 'undefined' &&
|
|
@@ -27,12 +32,9 @@ export const randomSecret = ({ platformDomain, campaign, } = {}) => {
|
|
|
27
32
|
}
|
|
28
33
|
return toHex(bytes);
|
|
29
34
|
};
|
|
30
|
-
export const
|
|
31
|
-
const
|
|
35
|
+
export const makeRegistrationCallData = ({ name, owner, duration, resolverAddress = EMPTY_ADDRESS, records: { coins = [], ...records } = { coins: [], texts: [] }, reverseRecord, secret, referrer = '0x0000000000000000000000000000000000000000000000000000000000000000', }) => {
|
|
36
|
+
const label = name.split('.')[0];
|
|
32
37
|
const hash = namehash(name);
|
|
33
|
-
const fuseData = fuses
|
|
34
|
-
? encodeFuses({ restriction: 'child', input: fuses })
|
|
35
|
-
: 0;
|
|
36
38
|
if (reverseRecord &&
|
|
37
39
|
!coins.find((c) => (typeof c.coin === 'string' && c.coin.toLowerCase() === 'eth') ||
|
|
38
40
|
(typeof c.coin === 'string'
|
|
@@ -52,37 +54,21 @@ export const makeCommitmentTuple = ({ name, owner, duration, resolverAddress = E
|
|
|
52
54
|
resolverAddress,
|
|
53
55
|
records,
|
|
54
56
|
reverseRecord,
|
|
55
|
-
fuses,
|
|
56
57
|
},
|
|
57
58
|
});
|
|
58
|
-
return
|
|
59
|
-
|
|
59
|
+
return {
|
|
60
|
+
label,
|
|
60
61
|
owner,
|
|
61
|
-
BigInt(duration),
|
|
62
|
+
duration: BigInt(duration),
|
|
62
63
|
secret,
|
|
63
|
-
resolverAddress,
|
|
64
|
+
resolver: resolverAddress,
|
|
64
65
|
data,
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
66
|
+
reverseRecord: reverseRecord ?? 0,
|
|
67
|
+
referrer: referrer,
|
|
68
|
+
};
|
|
68
69
|
};
|
|
69
|
-
export const
|
|
70
|
-
|
|
71
|
-
const [_labelhash, ...commitmentData] = makeCommitmentTuple(params);
|
|
72
|
-
const label = params.name.split('.')[0];
|
|
73
|
-
return [label, ...commitmentData];
|
|
70
|
+
export const makeCommitmentFromCallData = (callData) => {
|
|
71
|
+
return keccak256(encodeAbiParameters(parseAbiParameters('(string label,address owner,uint256 duration,bytes32 secret,address resolver,bytes[] data,uint8 reverseRecord,bytes32 referrer)'), [callData]));
|
|
74
72
|
};
|
|
75
|
-
export const
|
|
76
|
-
return keccak256(encodeAbiParameters([
|
|
77
|
-
{ name: 'name', type: 'bytes32' },
|
|
78
|
-
{ name: 'owner', type: 'address' },
|
|
79
|
-
{ name: 'duration', type: 'uint256' },
|
|
80
|
-
{ name: 'secret', type: 'bytes32' },
|
|
81
|
-
{ name: 'resolver', type: 'address' },
|
|
82
|
-
{ name: 'data', type: 'bytes[]' },
|
|
83
|
-
{ name: 'reverseRecord', type: 'bool' },
|
|
84
|
-
{ name: 'ownerControlledFuses', type: 'uint16' },
|
|
85
|
-
], params));
|
|
86
|
-
};
|
|
87
|
-
export const makeCommitment = (params) => makeCommitmentFromTuple(makeCommitmentTuple(params));
|
|
73
|
+
export const makeCommitment = (params) => makeCommitmentFromCallData(makeRegistrationCallData(params));
|
|
88
74
|
//# sourceMappingURL=registerHelpers.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registerHelpers.js","sourceRoot":"","sources":["../../src/utils/registerHelpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,mBAAmB,EACnB,SAAS,EACT,
|
|
1
|
+
{"version":3,"file":"registerHelpers.js","sourceRoot":"","sources":["../../src/utils/registerHelpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,mBAAmB,EACnB,SAAS,EACT,GAAG,EACH,kBAAkB,EAClB,OAAO,EACP,KAAK,GACN,MAAM,MAAM,CAAA;AACb,OAAO,EACL,8BAA8B,EAC9B,4BAA4B,GAC7B,MAAM,oBAAoB,CAAA;AAC3B,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAC3C,OAAO,EAEL,uBAAuB,GACxB,MAAM,8BA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C,EAAE,CAAA;IAEN,IAAI,IAAI,CAAC,MAAM,GAAG,CAAC,IAAI,eAAe,KAAK,aAAa;QACtD,MAAM,IAAI,4BAA4B,CAAC;YACrC,IAAI,EAAE;gBACJ,IAAI;gBACJ,KAAK;gBACL,QAAQ;gBACR,eAAe;gBACf,OAAO;gBACP,aAAa;aACd;SACF,CAAC,CAAA;IAEJ,OAAO;QACL,KAAK;QACL,KAAK;QACL,QAAQ,EAAE,MAAM,CAAC,QAAQ,CAAC;QAC1B,MAAM;QACN,QAAQ,EAAE,eAAe;QACzB,IAAI;QACJ,aAAa,EAAE,aAAa,IAAI,CAAC;QACjC,QAAQ,EAAE,QAAQ;KACnB,CAAA;AACH,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,0BAA0B,GAAG,CACxC,QAA8B,EACzB,EAAE;IACP,OAAO,SAAS,CACd,mBAAmB,CACjB,kBAAkB,CAChB,iIAAiI,CAClI,EACD,CAAC,QAAQ,CAAC,CACX,CACF,CAAA;AACH,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,MAA8B,EAAO,EAAE,CACpE,0BAA0B,CAAC,wBAAwB,CAAC,MAAM,CAAC,CAAC,CAAA"}
|
package/dist/wallet.d.ts
CHANGED
|
@@ -2,8 +2,6 @@ export { default as clearRecords, type ClearRecordsDataParameters, type ClearRec
|
|
|
2
2
|
export { default as commitName, type CommitNameDataParameters, type CommitNameDataReturnType, type CommitNameParameters, type CommitNameReturnType, } from './functions/wallet/commitName.js';
|
|
3
3
|
export { default as createSubname, type CreateSubnameDataParameters, type CreateSubnameDataReturnType, type CreateSubnameParameters, type CreateSubnameReturnType, } from './functions/wallet/createSubname.js';
|
|
4
4
|
export { default as deleteSubname, type DeleteSubnameDataParameters, type DeleteSubnameDataReturnType, type DeleteSubnameParameters, type DeleteSubnameReturnType, } from './functions/wallet/deleteSubname.js';
|
|
5
|
-
export { default as legacyCommitName, type LegacyCommitNameDataParameters, type LegacyCommitNameDataReturnType, type LegacyCommitNameParameters, type LegacyCommitNameReturnType, } from './functions/wallet/legacyCommitName.js';
|
|
6
|
-
export { default as legacyRegisterName, type LegacyRegisterNameDataParameters, type LegacyRegisterNameDataReturnType, type LegacyRegisterNameParameters, type LegacyRegisterNameReturnType, } from './functions/wallet/legacyRegisterName.js';
|
|
7
5
|
export { default as registerName, type RegisterNameDataParameters, type RegisterNameDataReturnType, type RegisterNameParameters, type RegisterNameReturnType, } from './functions/wallet/registerName.js';
|
|
8
6
|
export { default as renewNames, type RenewNamesDataParameters, type RenewNamesDataReturnType, type RenewNamesParameters, type RenewNamesReturnType, } from './functions/wallet/renewNames.js';
|
|
9
7
|
export { default as setAbiRecord, type SetAbiRecordDataParameters, type SetAbiRecordDataReturnType, type SetAbiRecordParameters, type SetAbiRecordReturnType, } from './functions/wallet/setAbiRecord.js';
|
package/dist/wallet.js
CHANGED
|
@@ -2,8 +2,6 @@ export { default as clearRecords, } from './functions/wallet/clearRecords.js';
|
|
|
2
2
|
export { default as commitName, } from './functions/wallet/commitName.js';
|
|
3
3
|
export { default as createSubname, } from './functions/wallet/createSubname.js';
|
|
4
4
|
export { default as deleteSubname, } from './functions/wallet/deleteSubname.js';
|
|
5
|
-
export { default as legacyCommitName, } from './functions/wallet/legacyCommitName.js';
|
|
6
|
-
export { default as legacyRegisterName, } from './functions/wallet/legacyRegisterName.js';
|
|
7
5
|
export { default as registerName, } from './functions/wallet/registerName.js';
|
|
8
6
|
export { default as renewNames, } from './functions/wallet/renewNames.js';
|
|
9
7
|
export { default as setAbiRecord, } from './functions/wallet/setAbiRecord.js';
|
package/dist/wallet.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wallet.js","sourceRoot":"","sources":["../src/wallet.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,IAAI,YAAY,GAKxB,MAAM,oCAAoC,CAAA;AAC3C,OAAO,EACL,OAAO,IAAI,UAAU,GAKtB,MAAM,kCAAkC,CAAA;AAC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,oCAAoC,CAAA;AAC3C,OAAO,EACL,OAAO,IAAI,UAAU,GAKtB,MAAM,kCAAkC,CAAA;AACzC,OAAO,EACL,OAAO,IAAI,QAAQ,GAKpB,MAAM,gCAAgC,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ensdomains/ensjs",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.2.2",
|
|
4
4
|
"description": "ENS javascript library for contract interaction",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
"@adraffy/ens-normalize": "1.10.1",
|
|
73
73
|
"@ensdomains/address-encoder": "1.1.3",
|
|
74
74
|
"@ensdomains/content-hash": "3.1.0-rc.1",
|
|
75
|
-
"@ensdomains/dnsprovejs": "
|
|
75
|
+
"@ensdomains/dnsprovejs": "0.5.1",
|
|
76
76
|
"abitype": "^1.0.0",
|
|
77
77
|
"dns-packet": "^5.3.1",
|
|
78
78
|
"graphql": "^16.11.0",
|
|
@@ -81,8 +81,7 @@
|
|
|
81
81
|
"ts-pattern": "^5.4.0"
|
|
82
82
|
},
|
|
83
83
|
"devDependencies": {
|
|
84
|
-
"@ensdomains/
|
|
85
|
-
"@ensdomains/ens-contracts": "1.5.2",
|
|
84
|
+
"@ensdomains/ens-contracts": "1.6.0",
|
|
86
85
|
"@ensdomains/ens-test-env": "^1.0.1",
|
|
87
86
|
"@ensdomains/hardhat-toolbox-viem-extended": "^0.0.5",
|
|
88
87
|
"@nomicfoundation/hardhat-toolbox-viem": "^3.0.0",
|
|
@@ -97,8 +96,8 @@
|
|
|
97
96
|
"dotenv": "^16.0.0",
|
|
98
97
|
"ethers": "^5.7.2",
|
|
99
98
|
"happy-dom": "^13.3.8",
|
|
100
|
-
"hardhat": "2.
|
|
101
|
-
"hardhat-abi-exporter": "^2.
|
|
99
|
+
"hardhat": "^2.22.2",
|
|
100
|
+
"hardhat-abi-exporter": "^2.9.0",
|
|
102
101
|
"hardhat-deploy": "^1.0.2",
|
|
103
102
|
"jsonfile": "^6.1.0",
|
|
104
103
|
"multiformats": "^12.0.1",
|
|
@@ -123,7 +122,7 @@
|
|
|
123
122
|
"test": "vitest --no-file-parallelism",
|
|
124
123
|
"test:watch": "vitest --watch --no-file-parallelism",
|
|
125
124
|
"clean": "rm -rf ./dist ./README.md ./LICENSE",
|
|
126
|
-
"lint": "
|
|
125
|
+
"lint": "biome check ./src",
|
|
127
126
|
"build": "tsc --project tsconfig.build.json",
|
|
128
127
|
"tsn": "TS_NODE_PROJECT=tsconfig.node.json node --loader ts-node/esm",
|
|
129
128
|
"prepublish": "pnpm build && cp ../../README.md ../../LICENSE ./",
|
package/src/@types/pako.d.ts
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
// Thibault Poisson <https://github.com/OrIOg>
|
|
7
7
|
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
8
8
|
|
|
9
|
-
enum constants {
|
|
9
|
+
declare enum constants {
|
|
10
10
|
// FlushValues
|
|
11
11
|
Z_NO_FLUSH = 0,
|
|
12
12
|
Z_PARTIAL_FLUSH = 1,
|
|
@@ -61,6 +61,7 @@ interface DeflateOptions {
|
|
|
61
61
|
windowBits?: number | undefined
|
|
62
62
|
memLevel?: number | undefined
|
|
63
63
|
strategy?: StrategyValues | undefined
|
|
64
|
+
// biome-ignore lint/suspicious/noExplicitAny: third-party type definition
|
|
64
65
|
dictionary?: any
|
|
65
66
|
raw?: boolean | undefined
|
|
66
67
|
chunkSize?: number | undefined
|
|
@@ -73,12 +74,14 @@ interface DeflateFunctionOptions {
|
|
|
73
74
|
windowBits?: number | undefined
|
|
74
75
|
memLevel?: number | undefined
|
|
75
76
|
strategy?: StrategyValues | undefined
|
|
77
|
+
// biome-ignore lint/suspicious/noExplicitAny: third-party type definition
|
|
76
78
|
dictionary?: any
|
|
77
79
|
raw?: boolean | undefined
|
|
78
80
|
}
|
|
79
81
|
|
|
80
82
|
interface InflateOptions {
|
|
81
83
|
windowBits?: number | undefined
|
|
84
|
+
// biome-ignore lint/suspicious/noExplicitAny: third-party type definition
|
|
82
85
|
dictionary?: any
|
|
83
86
|
raw?: boolean | undefined
|
|
84
87
|
to?: 'string' | undefined
|
|
@@ -29,7 +29,7 @@ export type EnsSubgraphActions = {
|
|
|
29
29
|
/**
|
|
30
30
|
* Gets the full name for a name with unknown labels from the subgraph.
|
|
31
31
|
* @param parameters - {@link GetDecodedNameParameters}
|
|
32
|
-
* @returns Full name, or null if name was
|
|
32
|
+
* @returns Full name, or null if name was not found. {@link GetDecodedNameReturnType}
|
|
33
33
|
*
|
|
34
34
|
* @example
|
|
35
35
|
* import { createPublicClient, http } from 'viem'
|
|
@@ -138,7 +138,7 @@ export type EnsWalletActions<
|
|
|
138
138
|
resolverAddress,
|
|
139
139
|
records,
|
|
140
140
|
reverseRecord,
|
|
141
|
-
|
|
141
|
+
referrer,
|
|
142
142
|
...txArgs
|
|
143
143
|
}: CommitNameParameters<
|
|
144
144
|
TChain,
|
|
@@ -254,7 +254,7 @@ export type EnsWalletActions<
|
|
|
254
254
|
resolverAddress,
|
|
255
255
|
records,
|
|
256
256
|
reverseRecord,
|
|
257
|
-
|
|
257
|
+
referrer,
|
|
258
258
|
value,
|
|
259
259
|
...txArgs
|
|
260
260
|
}: RegisterNameParameters<
|
|
@@ -423,7 +423,7 @@ export type EnsWalletActions<
|
|
|
423
423
|
* }).extend(ensWalletActions)
|
|
424
424
|
* const hash = await wallet.setContentHashRecord({
|
|
425
425
|
* name: 'ens.eth',
|
|
426
|
-
*
|
|
426
|
+
* contentHash: 'ipns://k51qzi5uqu5djdczd6zw0grmo23j2vkj9uzvujencg15s5rlkq0ss4ivll8wqw',
|
|
427
427
|
* resolverAddress: '0x4976fb03C32e5B8cfe2b6cCB31c09Ba78EBaBa41',
|
|
428
428
|
* })
|
|
429
429
|
* // 0x...
|
|
@@ -8,9 +8,14 @@ import {
|
|
|
8
8
|
supportedChains,
|
|
9
9
|
} from './consts.js'
|
|
10
10
|
|
|
11
|
+
type AddEnsContractsOptions = {
|
|
12
|
+
subgraphApiKey?: string
|
|
13
|
+
}
|
|
14
|
+
|
|
11
15
|
/**
|
|
12
16
|
* Adds ENS contract addresses to the viem chain
|
|
13
17
|
* @param chain - The viem {@link Chain} object to add the ENS contracts to
|
|
18
|
+
* @param options.subgraphApiKey - The API key to use for the ENS subgraph
|
|
14
19
|
*
|
|
15
20
|
* @example
|
|
16
21
|
* import { createPublicClient, http } from 'viem'
|
|
@@ -22,7 +27,10 @@ import {
|
|
|
22
27
|
* transport: http(),
|
|
23
28
|
* })
|
|
24
29
|
*/
|
|
25
|
-
export const addEnsContracts = <const TChain extends Chain>(
|
|
30
|
+
export const addEnsContracts = <const TChain extends Chain>(
|
|
31
|
+
chain: TChain,
|
|
32
|
+
options?: AddEnsContractsOptions,
|
|
33
|
+
) => {
|
|
26
34
|
if (!chain) throw new NoChainError()
|
|
27
35
|
if (!supportedChains.includes(chain.id as SupportedChain))
|
|
28
36
|
throw new UnsupportedChainError({
|
|
@@ -37,6 +45,29 @@ export const addEnsContracts = <const TChain extends Chain>(chain: TChain) => {
|
|
|
37
45
|
},
|
|
38
46
|
subgraphs: {
|
|
39
47
|
...subgraphs[chain.id as SupportedChain],
|
|
48
|
+
...(options?.subgraphApiKey
|
|
49
|
+
? {
|
|
50
|
+
ens: {
|
|
51
|
+
url: getSubgraphUrl(
|
|
52
|
+
chain.id as SupportedChain,
|
|
53
|
+
options.subgraphApiKey,
|
|
54
|
+
),
|
|
55
|
+
},
|
|
56
|
+
}
|
|
57
|
+
: {}),
|
|
40
58
|
},
|
|
41
59
|
} as unknown as CheckedChainWithEns<TChain>
|
|
42
60
|
}
|
|
61
|
+
|
|
62
|
+
const getSubgraphUrl = (chainId: SupportedChain, subgraphApiKey?: string) => {
|
|
63
|
+
if (!subgraphApiKey) {
|
|
64
|
+
return subgraphs[chainId].ens.url
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
switch (chainId) {
|
|
68
|
+
case 1:
|
|
69
|
+
return `https://gateway-arbitrum.network.thegraph.com/api/${subgraphApiKey}/subgraphs/id/5XqPmWe6gjyrJtFn9cLy237i4cWw2j9HcUJEXsP5qGtH`
|
|
70
|
+
case 11155111:
|
|
71
|
+
return `https://gateway-arbitrum.network.thegraph.com/api/${subgraphApiKey}/subgraphs/id/G1SxZs317YUb9nQX3CC98hDyvxfMJNZH5pPRGpNrtvwN`
|
|
72
|
+
}
|
|
73
|
+
}
|
|
@@ -26,13 +26,20 @@ export const bulkRenewalRenewAllSnippet = [
|
|
|
26
26
|
{
|
|
27
27
|
inputs: [
|
|
28
28
|
{
|
|
29
|
+
internalType: 'string[]',
|
|
29
30
|
name: 'names',
|
|
30
31
|
type: 'string[]',
|
|
31
32
|
},
|
|
32
33
|
{
|
|
34
|
+
internalType: 'uint256',
|
|
33
35
|
name: 'duration',
|
|
34
36
|
type: 'uint256',
|
|
35
37
|
},
|
|
38
|
+
{
|
|
39
|
+
internalType: 'bytes32',
|
|
40
|
+
name: 'referrer',
|
|
41
|
+
type: 'bytes32',
|
|
42
|
+
},
|
|
36
43
|
],
|
|
37
44
|
name: 'renewAll',
|
|
38
45
|
outputs: [],
|
package/src/contracts/consts.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Account, Address, Chain, Client, Transport } from 'viem'
|
|
2
|
-
import {
|
|
2
|
+
import { mainnet, sepolia } from 'viem/chains'
|
|
3
3
|
import type { Assign, Prettify } from '../types.js'
|
|
4
4
|
|
|
5
5
|
type ChainContract = {
|
|
@@ -7,7 +7,7 @@ type ChainContract = {
|
|
|
7
7
|
blockCreated?: number
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
-
export const supportedChains = [mainnet.id, sepolia.id
|
|
10
|
+
export const supportedChains = [mainnet.id, sepolia.id] as const
|
|
11
11
|
export const supportedContracts = [
|
|
12
12
|
'ensBaseRegistrarImplementation',
|
|
13
13
|
'ensBulkRenewal',
|
|
@@ -18,10 +18,13 @@ export const supportedContracts = [
|
|
|
18
18
|
'ensPublicResolver',
|
|
19
19
|
'ensRegistry',
|
|
20
20
|
'ensReverseRegistrar',
|
|
21
|
+
'ensDefaultReverseRegistrar',
|
|
21
22
|
'ensUniversalResolver',
|
|
23
|
+
'wrappedEthRegistrarController',
|
|
24
|
+
'wrappedPublicResolver',
|
|
25
|
+
'wrappedBulkRenewal',
|
|
22
26
|
'legacyEthRegistrarController',
|
|
23
27
|
'legacyPublicResolver',
|
|
24
|
-
'ensDefaultReverseRegistrar',
|
|
25
28
|
] as const
|
|
26
29
|
|
|
27
30
|
export type SupportedChain = (typeof supportedChains)[number]
|
|
@@ -33,7 +36,7 @@ export const addresses = {
|
|
|
33
36
|
address: '0x57f1887a8BF19b14fC0dF6Fd9B2acc9Af147eA85',
|
|
34
37
|
},
|
|
35
38
|
ensBulkRenewal: {
|
|
36
|
-
address: '
|
|
39
|
+
address: '0xc649947a460B135e6B9a70Ee2FB429aDBB529290',
|
|
37
40
|
},
|
|
38
41
|
ensDnsRegistrar: {
|
|
39
42
|
address: '0xB32cB5677a7C971689228EC835800432B339bA2B',
|
|
@@ -42,13 +45,13 @@ export const addresses = {
|
|
|
42
45
|
address: '0x0fc3152971714E5ed7723FAFa650F86A4BaF30C5',
|
|
43
46
|
},
|
|
44
47
|
ensEthRegistrarController: {
|
|
45
|
-
address: '
|
|
48
|
+
address: '0x59E16fcCd424Cc24e280Be16E11Bcd56fb0CE547',
|
|
46
49
|
},
|
|
47
50
|
ensNameWrapper: {
|
|
48
51
|
address: '0xD4416b13d2b3a9aBae7AcD5D6C2BbDBE25686401',
|
|
49
52
|
},
|
|
50
53
|
ensPublicResolver: {
|
|
51
|
-
address: '
|
|
54
|
+
address: '0xF29100983E058B709F3D539b0c765937B804AC15',
|
|
52
55
|
},
|
|
53
56
|
ensRegistry: {
|
|
54
57
|
address: '0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e',
|
|
@@ -56,58 +59,26 @@ export const addresses = {
|
|
|
56
59
|
ensReverseRegistrar: {
|
|
57
60
|
address: '0xa58E81fe9b61B5c3fE2AFD33CF304c454AbFc7Cb',
|
|
58
61
|
},
|
|
59
|
-
ensUniversalResolver: {
|
|
60
|
-
address: '0xaBd80E8a13596fEeA40Fd26fD6a24c3fe76F05fB',
|
|
61
|
-
},
|
|
62
|
-
legacyEthRegistrarController: {
|
|
63
|
-
address: '0x283Af0B28c62C092C9727F1Ee09c02CA627EB7F5',
|
|
64
|
-
},
|
|
65
|
-
legacyPublicResolver: {
|
|
66
|
-
address: '0x4976fb03C32e5B8cfe2b6cCB31c09Ba78EBaBa41',
|
|
67
|
-
},
|
|
68
62
|
ensDefaultReverseRegistrar: {
|
|
69
63
|
address: '0x283F227c4Bd38ecE252C4Ae7ECE650B0e913f1f9',
|
|
70
64
|
},
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
ensBaseRegistrarImplementation: {
|
|
74
|
-
address: '0x57f1887a8BF19b14fC0dF6Fd9B2acc9Af147eA85',
|
|
75
|
-
},
|
|
76
|
-
ensBulkRenewal: {
|
|
77
|
-
address: '0xbc4cfB363F948E64Cd73Da6438F64CB37E2e33d1',
|
|
78
|
-
},
|
|
79
|
-
ensDnsRegistrar: {
|
|
80
|
-
address: '0x458d278AEd4cE82BAeC384170f39198b01B8351c',
|
|
81
|
-
},
|
|
82
|
-
ensDnssecImpl: {
|
|
83
|
-
address: '0x283af0b28c62c092c9727f1ee09c02ca627eb7f5',
|
|
84
|
-
},
|
|
85
|
-
ensEthRegistrarController: {
|
|
86
|
-
address: '0xF404D2F84BC1735f7D9948F032D61F5fFfD9D3C3',
|
|
87
|
-
},
|
|
88
|
-
ensNameWrapper: {
|
|
89
|
-
address: '0xab50971078225D365994dc1Edcb9b7FD72Bb4862',
|
|
90
|
-
},
|
|
91
|
-
ensPublicResolver: {
|
|
92
|
-
address: '0x5a692ffe769A9B3D0e61F7446F5cAED650044C36',
|
|
65
|
+
ensUniversalResolver: {
|
|
66
|
+
address: '0xED73a03F19e8D849E44a39252d222c6ad5217E1e',
|
|
93
67
|
},
|
|
94
|
-
|
|
95
|
-
address: '
|
|
68
|
+
wrappedEthRegistrarController: {
|
|
69
|
+
address: '0x253553366Da8546fC250F225fe3d25d0C782303b',
|
|
96
70
|
},
|
|
97
|
-
|
|
98
|
-
address: '
|
|
71
|
+
wrappedPublicResolver: {
|
|
72
|
+
address: '0x231b0Ee14048e9dCcD1d247744d114a4EB5E8E63',
|
|
99
73
|
},
|
|
100
|
-
|
|
101
|
-
address: '
|
|
74
|
+
wrappedBulkRenewal: {
|
|
75
|
+
address: '0xa12159e5131b1eEf6B4857EEE3e1954744b5033A',
|
|
102
76
|
},
|
|
103
77
|
legacyEthRegistrarController: {
|
|
104
|
-
address: '
|
|
78
|
+
address: '0x283Af0B28c62C092C9727F1Ee09c02CA627EB7F5',
|
|
105
79
|
},
|
|
106
80
|
legacyPublicResolver: {
|
|
107
|
-
address: '
|
|
108
|
-
},
|
|
109
|
-
ensDefaultReverseRegistrar: {
|
|
110
|
-
address: '0x0000000000000000000000000000000000000000',
|
|
81
|
+
address: '0x4976fb03C32e5B8cfe2b6cCB31c09Ba78EBaBa41',
|
|
111
82
|
},
|
|
112
83
|
},
|
|
113
84
|
[sepolia.id]: {
|
|
@@ -115,7 +86,7 @@ export const addresses = {
|
|
|
115
86
|
address: '0x57f1887a8BF19b14fC0dF6Fd9B2acc9Af147eA85',
|
|
116
87
|
},
|
|
117
88
|
ensBulkRenewal: {
|
|
118
|
-
address: '
|
|
89
|
+
address: '0x6394b694a8C0DC716e447802E568F0Fb2c4E0965',
|
|
119
90
|
},
|
|
120
91
|
ensDnsRegistrar: {
|
|
121
92
|
address: '0x5a07C75Ae469Bf3ee2657B588e8E6ABAC6741b4f',
|
|
@@ -124,22 +95,34 @@ export const addresses = {
|
|
|
124
95
|
address: '0xe62E4b6cE018Ad6e916fcC24545e20a33b9d8653',
|
|
125
96
|
},
|
|
126
97
|
ensEthRegistrarController: {
|
|
127
|
-
address: '
|
|
98
|
+
address: '0xfb3cE5D01e0f33f41DbB39035dB9745962F1f968',
|
|
128
99
|
},
|
|
129
100
|
ensNameWrapper: {
|
|
130
101
|
address: '0x0635513f179D50A207757E05759CbD106d7dFcE8',
|
|
131
102
|
},
|
|
132
103
|
ensPublicResolver: {
|
|
133
|
-
address: '
|
|
104
|
+
address: '0xE99638b40E4Fff0129D56f03b55b6bbC4BBE49b5',
|
|
134
105
|
},
|
|
135
106
|
ensRegistry: {
|
|
136
107
|
address: '0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e',
|
|
137
108
|
},
|
|
109
|
+
ensDefaultReverseRegistrar: {
|
|
110
|
+
address: '0x4F382928805ba0e23B30cFB75fC9E848e82DFD47',
|
|
111
|
+
},
|
|
138
112
|
ensReverseRegistrar: {
|
|
139
113
|
address: '0xA0a1AbcDAe1a2a4A2EF8e9113Ff0e02DD81DC0C6',
|
|
140
114
|
},
|
|
141
115
|
ensUniversalResolver: {
|
|
142
|
-
address: '
|
|
116
|
+
address: '0x3c85752a5d47DD09D677C645Ff2A938B38fbFEbA',
|
|
117
|
+
},
|
|
118
|
+
wrappedEthRegistrarController: {
|
|
119
|
+
address: '0x4477cAc137F3353Ca35060E01E5aEb777a1Ca01B',
|
|
120
|
+
},
|
|
121
|
+
wrappedPublicResolver: {
|
|
122
|
+
address: '0x8948458626811dd0c23EB25Cc74291247077cC51',
|
|
123
|
+
},
|
|
124
|
+
wrappedBulkRenewal: {
|
|
125
|
+
address: '0x4EF77b90762Eddb33C8Eba5B5a19558DaE53D7a1',
|
|
143
126
|
},
|
|
144
127
|
legacyEthRegistrarController: {
|
|
145
128
|
address: '0x7e02892cfc2Bfd53a75275451d73cF620e793fc0',
|
|
@@ -147,9 +130,6 @@ export const addresses = {
|
|
|
147
130
|
legacyPublicResolver: {
|
|
148
131
|
address: '0x0CeEC524b2807841739D3B5E161F5bf1430FFA48',
|
|
149
132
|
},
|
|
150
|
-
ensDefaultReverseRegistrar: {
|
|
151
|
-
address: '0x4F382928805ba0e23B30cFB75fC9E848e82DFD47',
|
|
152
|
-
},
|
|
153
133
|
},
|
|
154
134
|
} as const satisfies Record<
|
|
155
135
|
SupportedChain,
|
|
@@ -168,11 +148,6 @@ export const subgraphs = {
|
|
|
168
148
|
url: 'https://api.thegraph.com/subgraphs/name/ensdomains/ens',
|
|
169
149
|
},
|
|
170
150
|
},
|
|
171
|
-
17000: {
|
|
172
|
-
ens: {
|
|
173
|
-
url: 'https://api.studio.thegraph.com/query/49574/ensholesky/version/latest',
|
|
174
|
-
},
|
|
175
|
-
},
|
|
176
151
|
11155111: {
|
|
177
152
|
ens: {
|
|
178
153
|
url: 'https://api.studio.thegraph.com/query/49574/enssepolia/version/latest',
|
|
@@ -188,8 +163,12 @@ type EnsChainContracts = {
|
|
|
188
163
|
ensPublicResolver: ChainContract
|
|
189
164
|
ensRegistry: ChainContract
|
|
190
165
|
ensReverseRegistrar: ChainContract
|
|
166
|
+
ensDefaultReverseRegistrar: ChainContract
|
|
191
167
|
ensBulkRenewal: ChainContract
|
|
192
168
|
ensDnssecImpl: ChainContract
|
|
169
|
+
wrappedEthRegistrarController: ChainContract
|
|
170
|
+
wrappedPublicResolver: ChainContract
|
|
171
|
+
wrappedBulkRenewal: ChainContract
|
|
193
172
|
legacyEthRegistrarController: ChainContract
|
|
194
173
|
legacyPublicResolver: ChainContract
|
|
195
174
|
}
|