pmcf 1.91.2 → 1.92.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/package.json +1 -1
- package/src/address.mjs +32 -0
- package/src/module.mjs +1 -0
- package/types/address.d.mts +17 -0
- package/types/module.d.mts +1 -0
package/package.json
CHANGED
package/src/address.mjs
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { Base } from "./base.mjs";
|
|
2
|
+
import { addType } from "./types.mjs";
|
|
3
|
+
|
|
4
|
+
const AddressTypeDefinition = {
|
|
5
|
+
name: "address",
|
|
6
|
+
owners: ["location", "owner", "network", "root"],
|
|
7
|
+
priority: 0.6,
|
|
8
|
+
constructWithIdentifierOnly: true,
|
|
9
|
+
properties: {
|
|
10
|
+
address: {
|
|
11
|
+
type: "string",
|
|
12
|
+
collection: false,
|
|
13
|
+
writeable: false,
|
|
14
|
+
identifier: true
|
|
15
|
+
},
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
export class Address extends Base {
|
|
21
|
+
static {
|
|
22
|
+
addType(this);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
static get typeDefinition() {
|
|
26
|
+
return AddressTypeDefinition;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
constructor(owner, address) {
|
|
30
|
+
super(owner, address);
|
|
31
|
+
}
|
|
32
|
+
}
|
package/src/module.mjs
CHANGED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export class Address extends Base {
|
|
2
|
+
static get typeDefinition(): {
|
|
3
|
+
name: string;
|
|
4
|
+
owners: string[];
|
|
5
|
+
priority: number;
|
|
6
|
+
constructWithIdentifierOnly: boolean;
|
|
7
|
+
properties: {
|
|
8
|
+
address: {
|
|
9
|
+
type: string;
|
|
10
|
+
collection: boolean;
|
|
11
|
+
writeable: boolean;
|
|
12
|
+
identifier: boolean;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
import { Base } from "./base.mjs";
|
package/types/module.d.mts
CHANGED