@ensdomains/ensjs 3.0.0-alpha.19 → 3.0.0-alpha.20
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.
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import { BigNumber } from 'ethers';
|
|
2
2
|
import { ENSArgs } from '..';
|
|
3
|
+
import { CurrentFuses } from '../utils/fuses';
|
|
3
4
|
declare const _default: {
|
|
4
5
|
raw: ({ contracts }: ENSArgs<"contracts">, name: string) => Promise<{
|
|
5
6
|
to: string;
|
|
6
7
|
data: string;
|
|
7
8
|
}>;
|
|
8
9
|
decode: ({ contracts }: ENSArgs<"contracts">, data: string) => Promise<{
|
|
9
|
-
fuseObj:
|
|
10
|
-
[k: string]: boolean;
|
|
11
|
-
};
|
|
10
|
+
fuseObj: CurrentFuses;
|
|
12
11
|
expiryDate: Date;
|
|
13
12
|
rawFuses: BigNumber;
|
|
14
13
|
owner: any;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -231,9 +231,7 @@ export declare class ENS {
|
|
|
231
231
|
data: string;
|
|
232
232
|
}>;
|
|
233
233
|
decode: ({ contracts }: ENSArgs<"contracts">, data: string) => Promise<{
|
|
234
|
-
fuseObj:
|
|
235
|
-
[k: string]: boolean;
|
|
236
|
-
};
|
|
234
|
+
fuseObj: import("./utils/fuses").CurrentFuses;
|
|
237
235
|
expiryDate: Date;
|
|
238
236
|
rawFuses: ethers.BigNumber;
|
|
239
237
|
owner: any;
|
|
@@ -19,6 +19,9 @@ declare const fullFuseEnum: {
|
|
|
19
19
|
PARENT_CANNOT_CONTROL: 64;
|
|
20
20
|
};
|
|
21
21
|
export declare type FuseObj = typeof fuseEnum;
|
|
22
|
+
export declare type CurrentFuses = {
|
|
23
|
+
[f in keyof FuseObj]: boolean;
|
|
24
|
+
};
|
|
22
25
|
export declare type UnnamedFuseType = typeof unnamedFuses;
|
|
23
26
|
export declare type Fuse = keyof FuseObj;
|
|
24
27
|
export declare type UnnamedFuseValues = UnnamedFuseType[number];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ensdomains/ensjs",
|
|
3
|
-
"version": "3.0.0-alpha.
|
|
3
|
+
"version": "3.0.0-alpha.20",
|
|
4
4
|
"description": "ENS javascript library for contract interaction",
|
|
5
5
|
"main": "./dist/cjs/index.js",
|
|
6
6
|
"module": "./dist/esm/index.mjs",
|
|
@@ -37,6 +37,9 @@
|
|
|
37
37
|
],
|
|
38
38
|
"utils/*": [
|
|
39
39
|
"./dist/types/utils/*"
|
|
40
|
+
],
|
|
41
|
+
"generated/*": [
|
|
42
|
+
"./dist/types/generated/*"
|
|
40
43
|
]
|
|
41
44
|
}
|
|
42
45
|
},
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BigNumber } from 'ethers'
|
|
2
2
|
import { ENSArgs } from '..'
|
|
3
|
-
import { fuseEnum } from '../utils/fuses'
|
|
3
|
+
import { CurrentFuses, fuseEnum } from '../utils/fuses'
|
|
4
4
|
import { namehash } from '../utils/normalise'
|
|
5
5
|
|
|
6
6
|
const raw = async ({ contracts }: ENSArgs<'contracts'>, name: string) => {
|
|
@@ -38,7 +38,7 @@ const decode = async ({ contracts }: ENSArgs<'contracts'>, data: string) => {
|
|
|
38
38
|
const expiryDate = new Date(expiry * 1000)
|
|
39
39
|
|
|
40
40
|
return {
|
|
41
|
-
fuseObj,
|
|
41
|
+
fuseObj: fuseObj as CurrentFuses,
|
|
42
42
|
expiryDate,
|
|
43
43
|
rawFuses: fuses,
|
|
44
44
|
owner,
|
package/src/utils/fuses.ts
CHANGED
|
@@ -29,6 +29,7 @@ const fullFuseEnum = {
|
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
export type FuseObj = typeof fuseEnum
|
|
32
|
+
export type CurrentFuses = { [f in keyof FuseObj]: boolean }
|
|
32
33
|
export type UnnamedFuseType = typeof unnamedFuses
|
|
33
34
|
export type Fuse = keyof FuseObj
|
|
34
35
|
export type UnnamedFuseValues = UnnamedFuseType[number]
|