@xyo-network/xns-record-payload-plugins 2.91.9 → 2.91.11
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/browser/Domain/Domain.d.cts +12 -0
- package/dist/browser/Domain/Domain.d.cts.map +1 -1
- package/dist/browser/Domain/Domain.d.mts +12 -0
- package/dist/browser/Domain/Domain.d.mts.map +1 -1
- package/dist/browser/Domain/Domain.d.ts +12 -0
- package/dist/browser/Domain/Domain.d.ts.map +1 -1
- package/dist/browser/Domain/DomainLease.d.cts +12 -0
- package/dist/browser/Domain/DomainLease.d.cts.map +1 -1
- package/dist/browser/Domain/DomainLease.d.mts +12 -0
- package/dist/browser/Domain/DomainLease.d.mts.map +1 -1
- package/dist/browser/Domain/DomainLease.d.ts +12 -0
- package/dist/browser/Domain/DomainLease.d.ts.map +1 -1
- package/dist/browser/DomainRegistration/DomainRegistration.d.cts +12 -0
- package/dist/browser/DomainRegistration/DomainRegistration.d.cts.map +1 -1
- package/dist/browser/DomainRegistration/DomainRegistration.d.mts +12 -0
- package/dist/browser/DomainRegistration/DomainRegistration.d.mts.map +1 -1
- package/dist/browser/DomainRegistration/DomainRegistration.d.ts +12 -0
- package/dist/browser/DomainRegistration/DomainRegistration.d.ts.map +1 -1
- package/dist/browser/DomainRegistration/DomainRegistrationLease.d.cts +12 -0
- package/dist/browser/DomainRegistration/DomainRegistrationLease.d.cts.map +1 -1
- package/dist/browser/DomainRegistration/DomainRegistrationLease.d.mts +12 -0
- package/dist/browser/DomainRegistration/DomainRegistrationLease.d.mts.map +1 -1
- package/dist/browser/DomainRegistration/DomainRegistrationLease.d.ts +12 -0
- package/dist/browser/DomainRegistration/DomainRegistrationLease.d.ts.map +1 -1
- package/dist/browser/index.cjs +16 -0
- package/dist/browser/index.cjs.map +1 -1
- package/dist/browser/index.js +20 -4
- package/dist/browser/index.js.map +1 -1
- package/dist/node/Domain/Domain.d.cts +12 -0
- package/dist/node/Domain/Domain.d.cts.map +1 -1
- package/dist/node/Domain/Domain.d.mts +12 -0
- package/dist/node/Domain/Domain.d.mts.map +1 -1
- package/dist/node/Domain/Domain.d.ts +12 -0
- package/dist/node/Domain/Domain.d.ts.map +1 -1
- package/dist/node/Domain/DomainLease.d.cts +12 -0
- package/dist/node/Domain/DomainLease.d.cts.map +1 -1
- package/dist/node/Domain/DomainLease.d.mts +12 -0
- package/dist/node/Domain/DomainLease.d.mts.map +1 -1
- package/dist/node/Domain/DomainLease.d.ts +12 -0
- package/dist/node/Domain/DomainLease.d.ts.map +1 -1
- package/dist/node/DomainRegistration/DomainRegistration.d.cts +12 -0
- package/dist/node/DomainRegistration/DomainRegistration.d.cts.map +1 -1
- package/dist/node/DomainRegistration/DomainRegistration.d.mts +12 -0
- package/dist/node/DomainRegistration/DomainRegistration.d.mts.map +1 -1
- package/dist/node/DomainRegistration/DomainRegistration.d.ts +12 -0
- package/dist/node/DomainRegistration/DomainRegistration.d.ts.map +1 -1
- package/dist/node/DomainRegistration/DomainRegistrationLease.d.cts +12 -0
- package/dist/node/DomainRegistration/DomainRegistrationLease.d.cts.map +1 -1
- package/dist/node/DomainRegistration/DomainRegistrationLease.d.mts +12 -0
- package/dist/node/DomainRegistration/DomainRegistrationLease.d.mts.map +1 -1
- package/dist/node/DomainRegistration/DomainRegistrationLease.d.ts +12 -0
- package/dist/node/DomainRegistration/DomainRegistrationLease.d.ts.map +1 -1
- package/dist/node/index.cjs +24 -0
- package/dist/node/index.cjs.map +1 -1
- package/dist/node/index.js +20 -4
- package/dist/node/index.js.map +1 -1
- package/package.json +8 -8
- package/src/Domain/Domain.ts +11 -1
- package/src/Domain/DomainLease.ts +11 -1
- package/src/DomainRegistration/DomainRegistration.ts +11 -1
- package/src/DomainRegistration/DomainRegistrationLease.ts +11 -1
|
@@ -18,4 +18,16 @@ export type DomainLease = Payload<DomainLeaseFields, DomainLeaseSchema>;
|
|
|
18
18
|
export declare const isDomainLease: (x?: unknown) => x is import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & DomainLeaseFields & {
|
|
19
19
|
schema: "network.xyo.ns.domain.lease";
|
|
20
20
|
};
|
|
21
|
+
/**
|
|
22
|
+
* Identity function for DomainLease payload with sources
|
|
23
|
+
*/
|
|
24
|
+
export declare const isDomainLeaseWithSources: (x?: unknown) => x is import("@xyo-network/payload-model").WithSources<import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & DomainLeaseFields & {
|
|
25
|
+
schema: "network.xyo.ns.domain.lease";
|
|
26
|
+
}>;
|
|
27
|
+
/**
|
|
28
|
+
* Identity function for DomainLease payload with meta
|
|
29
|
+
*/
|
|
30
|
+
export declare const isDomainLeaseWithMeta: (x?: unknown) => x is import("@xyo-network/payload-model").WithMeta<import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & DomainLeaseFields & {
|
|
31
|
+
schema: "network.xyo.ns.domain.lease";
|
|
32
|
+
}>;
|
|
21
33
|
//# sourceMappingURL=DomainLease.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DomainLease.d.ts","sourceRoot":"","sources":["../../../src/Domain/DomainLease.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"DomainLease.d.ts","sourceRoot":"","sources":["../../../src/Domain/DomainLease.ts"],"names":[],"mappings":"AAAA,OAAO,EAA0F,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAE5I,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AAEvC,MAAM,MAAM,iBAAiB,GAAG,6BAA6B,CAAA;AAC7D,eAAO,MAAM,iBAAiB,EAAE,iBAAiD,CAAA;AAEjF;;GAEG;AACH,MAAM,WAAW,iBAAkB,SAAQ,YAAY,EAAE,cAAc;CAAG;AAE1E;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,OAAO,CAAC,iBAAiB,EAAE,iBAAiB,CAAC,CAAA;AAEvE;;GAEG;AACH,eAAO,MAAM,aAAa;;CAAwD,CAAA;AAElF;;GAEG;AACH,eAAO,MAAM,wBAAwB;;EAAmE,CAAA;AAExG;;GAEG;AACH,eAAO,MAAM,qBAAqB;;EAAgE,CAAA"}
|
|
@@ -18,4 +18,16 @@ export type DomainLease = Payload<DomainLeaseFields, DomainLeaseSchema>;
|
|
|
18
18
|
export declare const isDomainLease: (x?: unknown) => x is import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & DomainLeaseFields & {
|
|
19
19
|
schema: "network.xyo.ns.domain.lease";
|
|
20
20
|
};
|
|
21
|
+
/**
|
|
22
|
+
* Identity function for DomainLease payload with sources
|
|
23
|
+
*/
|
|
24
|
+
export declare const isDomainLeaseWithSources: (x?: unknown) => x is import("@xyo-network/payload-model").WithSources<import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & DomainLeaseFields & {
|
|
25
|
+
schema: "network.xyo.ns.domain.lease";
|
|
26
|
+
}>;
|
|
27
|
+
/**
|
|
28
|
+
* Identity function for DomainLease payload with meta
|
|
29
|
+
*/
|
|
30
|
+
export declare const isDomainLeaseWithMeta: (x?: unknown) => x is import("@xyo-network/payload-model").WithMeta<import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & DomainLeaseFields & {
|
|
31
|
+
schema: "network.xyo.ns.domain.lease";
|
|
32
|
+
}>;
|
|
21
33
|
//# sourceMappingURL=DomainLease.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DomainLease.d.ts","sourceRoot":"","sources":["../../../src/Domain/DomainLease.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"DomainLease.d.ts","sourceRoot":"","sources":["../../../src/Domain/DomainLease.ts"],"names":[],"mappings":"AAAA,OAAO,EAA0F,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAE5I,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AAEvC,MAAM,MAAM,iBAAiB,GAAG,6BAA6B,CAAA;AAC7D,eAAO,MAAM,iBAAiB,EAAE,iBAAiD,CAAA;AAEjF;;GAEG;AACH,MAAM,WAAW,iBAAkB,SAAQ,YAAY,EAAE,cAAc;CAAG;AAE1E;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,OAAO,CAAC,iBAAiB,EAAE,iBAAiB,CAAC,CAAA;AAEvE;;GAEG;AACH,eAAO,MAAM,aAAa;;CAAwD,CAAA;AAElF;;GAEG;AACH,eAAO,MAAM,wBAAwB;;EAAmE,CAAA;AAExG;;GAEG;AACH,eAAO,MAAM,qBAAqB;;EAAgE,CAAA"}
|
|
@@ -18,4 +18,16 @@ export type DomainLease = Payload<DomainLeaseFields, DomainLeaseSchema>;
|
|
|
18
18
|
export declare const isDomainLease: (x?: unknown) => x is import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & DomainLeaseFields & {
|
|
19
19
|
schema: "network.xyo.ns.domain.lease";
|
|
20
20
|
};
|
|
21
|
+
/**
|
|
22
|
+
* Identity function for DomainLease payload with sources
|
|
23
|
+
*/
|
|
24
|
+
export declare const isDomainLeaseWithSources: (x?: unknown) => x is import("@xyo-network/payload-model").WithSources<import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & DomainLeaseFields & {
|
|
25
|
+
schema: "network.xyo.ns.domain.lease";
|
|
26
|
+
}>;
|
|
27
|
+
/**
|
|
28
|
+
* Identity function for DomainLease payload with meta
|
|
29
|
+
*/
|
|
30
|
+
export declare const isDomainLeaseWithMeta: (x?: unknown) => x is import("@xyo-network/payload-model").WithMeta<import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & DomainLeaseFields & {
|
|
31
|
+
schema: "network.xyo.ns.domain.lease";
|
|
32
|
+
}>;
|
|
21
33
|
//# sourceMappingURL=DomainLease.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DomainLease.d.ts","sourceRoot":"","sources":["../../../src/Domain/DomainLease.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"DomainLease.d.ts","sourceRoot":"","sources":["../../../src/Domain/DomainLease.ts"],"names":[],"mappings":"AAAA,OAAO,EAA0F,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAE5I,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AAEvC,MAAM,MAAM,iBAAiB,GAAG,6BAA6B,CAAA;AAC7D,eAAO,MAAM,iBAAiB,EAAE,iBAAiD,CAAA;AAEjF;;GAEG;AACH,MAAM,WAAW,iBAAkB,SAAQ,YAAY,EAAE,cAAc;CAAG;AAE1E;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,OAAO,CAAC,iBAAiB,EAAE,iBAAiB,CAAC,CAAA;AAEvE;;GAEG;AACH,eAAO,MAAM,aAAa;;CAAwD,CAAA;AAElF;;GAEG;AACH,eAAO,MAAM,wBAAwB;;EAAmE,CAAA;AAExG;;GAEG;AACH,eAAO,MAAM,qBAAqB;;EAAgE,CAAA"}
|
|
@@ -23,4 +23,16 @@ export type DomainRegistration = Payload<DomainRegistrationFields, DomainRegistr
|
|
|
23
23
|
export declare const isDomainRegistration: (x?: unknown) => x is import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & DomainRegistrationFields & {
|
|
24
24
|
schema: "network.xyo.ns.domain.registration";
|
|
25
25
|
};
|
|
26
|
+
/**
|
|
27
|
+
* Identity function for DomainRegistration payload with sources
|
|
28
|
+
*/
|
|
29
|
+
export declare const isDomainRegistrationWithSources: (x?: unknown) => x is import("@xyo-network/payload-model").WithSources<import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & DomainRegistrationFields & {
|
|
30
|
+
schema: "network.xyo.ns.domain.registration";
|
|
31
|
+
}>;
|
|
32
|
+
/**
|
|
33
|
+
* Identity function for DomainRegistration payload with meta
|
|
34
|
+
*/
|
|
35
|
+
export declare const isDomainRegistrationWithMeta: (x?: unknown) => x is import("@xyo-network/payload-model").WithMeta<import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & DomainRegistrationFields & {
|
|
36
|
+
schema: "network.xyo.ns.domain.registration";
|
|
37
|
+
}>;
|
|
26
38
|
//# sourceMappingURL=DomainRegistration.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DomainRegistration.d.ts","sourceRoot":"","sources":["../../../src/DomainRegistration/DomainRegistration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AACrC,OAAO,
|
|
1
|
+
{"version":3,"file":"DomainRegistration.d.ts","sourceRoot":"","sources":["../../../src/DomainRegistration/DomainRegistration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AACrC,OAAO,EAA0F,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAE5I,OAAO,EAAE,YAAY,EAAgB,MAAM,WAAW,CAAA;AAEtD,eAAO,MAAM,wBAAwB,sCAA0C,CAAA;AAC/E,MAAM,MAAM,wBAAwB,GAAG,OAAO,wBAAwB,CAAA;AAEtE,MAAM,WAAW,wBAAyB,SAAQ,YAAY;IAC5D;;OAEG;IACH,UAAU,EAAE,OAAO,EAAE,CAAA;IACrB;;OAEG;IACH,SAAS,EAAE,OAAO,EAAE,CAAA;CACrB;AAED;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG,OAAO,CAAC,wBAAwB,EAAE,wBAAwB,CAAC,CAAA;AAE5F;;GAEG;AACH,eAAO,MAAM,oBAAoB;;CAAsE,CAAA;AAEvG;;GAEG;AACH,eAAO,MAAM,+BAA+B;;EAAiF,CAAA;AAE7H;;GAEG;AACH,eAAO,MAAM,4BAA4B;;EAA8E,CAAA"}
|
|
@@ -23,4 +23,16 @@ export type DomainRegistration = Payload<DomainRegistrationFields, DomainRegistr
|
|
|
23
23
|
export declare const isDomainRegistration: (x?: unknown) => x is import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & DomainRegistrationFields & {
|
|
24
24
|
schema: "network.xyo.ns.domain.registration";
|
|
25
25
|
};
|
|
26
|
+
/**
|
|
27
|
+
* Identity function for DomainRegistration payload with sources
|
|
28
|
+
*/
|
|
29
|
+
export declare const isDomainRegistrationWithSources: (x?: unknown) => x is import("@xyo-network/payload-model").WithSources<import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & DomainRegistrationFields & {
|
|
30
|
+
schema: "network.xyo.ns.domain.registration";
|
|
31
|
+
}>;
|
|
32
|
+
/**
|
|
33
|
+
* Identity function for DomainRegistration payload with meta
|
|
34
|
+
*/
|
|
35
|
+
export declare const isDomainRegistrationWithMeta: (x?: unknown) => x is import("@xyo-network/payload-model").WithMeta<import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & DomainRegistrationFields & {
|
|
36
|
+
schema: "network.xyo.ns.domain.registration";
|
|
37
|
+
}>;
|
|
26
38
|
//# sourceMappingURL=DomainRegistration.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DomainRegistration.d.ts","sourceRoot":"","sources":["../../../src/DomainRegistration/DomainRegistration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AACrC,OAAO,
|
|
1
|
+
{"version":3,"file":"DomainRegistration.d.ts","sourceRoot":"","sources":["../../../src/DomainRegistration/DomainRegistration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AACrC,OAAO,EAA0F,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAE5I,OAAO,EAAE,YAAY,EAAgB,MAAM,WAAW,CAAA;AAEtD,eAAO,MAAM,wBAAwB,sCAA0C,CAAA;AAC/E,MAAM,MAAM,wBAAwB,GAAG,OAAO,wBAAwB,CAAA;AAEtE,MAAM,WAAW,wBAAyB,SAAQ,YAAY;IAC5D;;OAEG;IACH,UAAU,EAAE,OAAO,EAAE,CAAA;IACrB;;OAEG;IACH,SAAS,EAAE,OAAO,EAAE,CAAA;CACrB;AAED;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG,OAAO,CAAC,wBAAwB,EAAE,wBAAwB,CAAC,CAAA;AAE5F;;GAEG;AACH,eAAO,MAAM,oBAAoB;;CAAsE,CAAA;AAEvG;;GAEG;AACH,eAAO,MAAM,+BAA+B;;EAAiF,CAAA;AAE7H;;GAEG;AACH,eAAO,MAAM,4BAA4B;;EAA8E,CAAA"}
|
|
@@ -23,4 +23,16 @@ export type DomainRegistration = Payload<DomainRegistrationFields, DomainRegistr
|
|
|
23
23
|
export declare const isDomainRegistration: (x?: unknown) => x is import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & DomainRegistrationFields & {
|
|
24
24
|
schema: "network.xyo.ns.domain.registration";
|
|
25
25
|
};
|
|
26
|
+
/**
|
|
27
|
+
* Identity function for DomainRegistration payload with sources
|
|
28
|
+
*/
|
|
29
|
+
export declare const isDomainRegistrationWithSources: (x?: unknown) => x is import("@xyo-network/payload-model").WithSources<import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & DomainRegistrationFields & {
|
|
30
|
+
schema: "network.xyo.ns.domain.registration";
|
|
31
|
+
}>;
|
|
32
|
+
/**
|
|
33
|
+
* Identity function for DomainRegistration payload with meta
|
|
34
|
+
*/
|
|
35
|
+
export declare const isDomainRegistrationWithMeta: (x?: unknown) => x is import("@xyo-network/payload-model").WithMeta<import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & DomainRegistrationFields & {
|
|
36
|
+
schema: "network.xyo.ns.domain.registration";
|
|
37
|
+
}>;
|
|
26
38
|
//# sourceMappingURL=DomainRegistration.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DomainRegistration.d.ts","sourceRoot":"","sources":["../../../src/DomainRegistration/DomainRegistration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AACrC,OAAO,
|
|
1
|
+
{"version":3,"file":"DomainRegistration.d.ts","sourceRoot":"","sources":["../../../src/DomainRegistration/DomainRegistration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AACrC,OAAO,EAA0F,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAE5I,OAAO,EAAE,YAAY,EAAgB,MAAM,WAAW,CAAA;AAEtD,eAAO,MAAM,wBAAwB,sCAA0C,CAAA;AAC/E,MAAM,MAAM,wBAAwB,GAAG,OAAO,wBAAwB,CAAA;AAEtE,MAAM,WAAW,wBAAyB,SAAQ,YAAY;IAC5D;;OAEG;IACH,UAAU,EAAE,OAAO,EAAE,CAAA;IACrB;;OAEG;IACH,SAAS,EAAE,OAAO,EAAE,CAAA;CACrB;AAED;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG,OAAO,CAAC,wBAAwB,EAAE,wBAAwB,CAAC,CAAA;AAE5F;;GAEG;AACH,eAAO,MAAM,oBAAoB;;CAAsE,CAAA;AAEvG;;GAEG;AACH,eAAO,MAAM,+BAA+B;;EAAiF,CAAA;AAE7H;;GAEG;AACH,eAAO,MAAM,4BAA4B;;EAA8E,CAAA"}
|
|
@@ -15,4 +15,16 @@ export type DomainRegistrationLease = Payload<DomainRegistrationLeaseFields, Dom
|
|
|
15
15
|
export declare const isDomainRegistrationLease: (x?: unknown) => x is import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & DomainRegistrationLeaseFields & {
|
|
16
16
|
schema: "network.xyo.ns.domain.registration.lease";
|
|
17
17
|
};
|
|
18
|
+
/**
|
|
19
|
+
* Identity function for DomainRegistrationLease payload with sources
|
|
20
|
+
*/
|
|
21
|
+
export declare const isDomainRegistrationLeaseSources: (x?: unknown) => x is import("@xyo-network/payload-model").WithSources<import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & DomainRegistrationLeaseFields & {
|
|
22
|
+
schema: "network.xyo.ns.domain.registration.lease";
|
|
23
|
+
}>;
|
|
24
|
+
/**
|
|
25
|
+
* Identity function for DomainRegistrationLease payload with meta
|
|
26
|
+
*/
|
|
27
|
+
export declare const isDomainRegistrationLeaseMeta: (x?: unknown) => x is import("@xyo-network/payload-model").WithMeta<import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & DomainRegistrationLeaseFields & {
|
|
28
|
+
schema: "network.xyo.ns.domain.registration.lease";
|
|
29
|
+
}>;
|
|
18
30
|
//# sourceMappingURL=DomainRegistrationLease.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DomainRegistrationLease.d.ts","sourceRoot":"","sources":["../../../src/DomainRegistration/DomainRegistrationLease.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"DomainRegistrationLease.d.ts","sourceRoot":"","sources":["../../../src/DomainRegistration/DomainRegistrationLease.ts"],"names":[],"mappings":"AAAA,OAAO,EAA0F,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAE5I,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAC5C,OAAO,EAAE,wBAAwB,EAA4B,MAAM,sBAAsB,CAAA;AAEzF,eAAO,MAAM,6BAA6B,4CAA+C,CAAA;AACzF,MAAM,MAAM,6BAA6B,GAAG,OAAO,6BAA6B,CAAA;AAEhF,MAAM,WAAW,6BAA8B,SAAQ,wBAAwB,EAAE,cAAc;CAAG;AAElG;;GAEG;AACH,MAAM,MAAM,uBAAuB,GAAG,OAAO,CAAC,6BAA6B,EAAE,6BAA6B,CAAC,CAAA;AAE3G;;GAEG;AACH,eAAO,MAAM,yBAAyB;;CAAgF,CAAA;AAEtH;;GAEG;AACH,eAAO,MAAM,gCAAgC;;EAA2F,CAAA;AAExI;;GAEG;AACH,eAAO,MAAM,6BAA6B;;EAAwF,CAAA"}
|
|
@@ -15,4 +15,16 @@ export type DomainRegistrationLease = Payload<DomainRegistrationLeaseFields, Dom
|
|
|
15
15
|
export declare const isDomainRegistrationLease: (x?: unknown) => x is import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & DomainRegistrationLeaseFields & {
|
|
16
16
|
schema: "network.xyo.ns.domain.registration.lease";
|
|
17
17
|
};
|
|
18
|
+
/**
|
|
19
|
+
* Identity function for DomainRegistrationLease payload with sources
|
|
20
|
+
*/
|
|
21
|
+
export declare const isDomainRegistrationLeaseSources: (x?: unknown) => x is import("@xyo-network/payload-model").WithSources<import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & DomainRegistrationLeaseFields & {
|
|
22
|
+
schema: "network.xyo.ns.domain.registration.lease";
|
|
23
|
+
}>;
|
|
24
|
+
/**
|
|
25
|
+
* Identity function for DomainRegistrationLease payload with meta
|
|
26
|
+
*/
|
|
27
|
+
export declare const isDomainRegistrationLeaseMeta: (x?: unknown) => x is import("@xyo-network/payload-model").WithMeta<import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & DomainRegistrationLeaseFields & {
|
|
28
|
+
schema: "network.xyo.ns.domain.registration.lease";
|
|
29
|
+
}>;
|
|
18
30
|
//# sourceMappingURL=DomainRegistrationLease.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DomainRegistrationLease.d.ts","sourceRoot":"","sources":["../../../src/DomainRegistration/DomainRegistrationLease.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"DomainRegistrationLease.d.ts","sourceRoot":"","sources":["../../../src/DomainRegistration/DomainRegistrationLease.ts"],"names":[],"mappings":"AAAA,OAAO,EAA0F,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAE5I,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAC5C,OAAO,EAAE,wBAAwB,EAA4B,MAAM,sBAAsB,CAAA;AAEzF,eAAO,MAAM,6BAA6B,4CAA+C,CAAA;AACzF,MAAM,MAAM,6BAA6B,GAAG,OAAO,6BAA6B,CAAA;AAEhF,MAAM,WAAW,6BAA8B,SAAQ,wBAAwB,EAAE,cAAc;CAAG;AAElG;;GAEG;AACH,MAAM,MAAM,uBAAuB,GAAG,OAAO,CAAC,6BAA6B,EAAE,6BAA6B,CAAC,CAAA;AAE3G;;GAEG;AACH,eAAO,MAAM,yBAAyB;;CAAgF,CAAA;AAEtH;;GAEG;AACH,eAAO,MAAM,gCAAgC;;EAA2F,CAAA;AAExI;;GAEG;AACH,eAAO,MAAM,6BAA6B;;EAAwF,CAAA"}
|
|
@@ -15,4 +15,16 @@ export type DomainRegistrationLease = Payload<DomainRegistrationLeaseFields, Dom
|
|
|
15
15
|
export declare const isDomainRegistrationLease: (x?: unknown) => x is import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & DomainRegistrationLeaseFields & {
|
|
16
16
|
schema: "network.xyo.ns.domain.registration.lease";
|
|
17
17
|
};
|
|
18
|
+
/**
|
|
19
|
+
* Identity function for DomainRegistrationLease payload with sources
|
|
20
|
+
*/
|
|
21
|
+
export declare const isDomainRegistrationLeaseSources: (x?: unknown) => x is import("@xyo-network/payload-model").WithSources<import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & DomainRegistrationLeaseFields & {
|
|
22
|
+
schema: "network.xyo.ns.domain.registration.lease";
|
|
23
|
+
}>;
|
|
24
|
+
/**
|
|
25
|
+
* Identity function for DomainRegistrationLease payload with meta
|
|
26
|
+
*/
|
|
27
|
+
export declare const isDomainRegistrationLeaseMeta: (x?: unknown) => x is import("@xyo-network/payload-model").WithMeta<import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & DomainRegistrationLeaseFields & {
|
|
28
|
+
schema: "network.xyo.ns.domain.registration.lease";
|
|
29
|
+
}>;
|
|
18
30
|
//# sourceMappingURL=DomainRegistrationLease.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DomainRegistrationLease.d.ts","sourceRoot":"","sources":["../../../src/DomainRegistration/DomainRegistrationLease.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"DomainRegistrationLease.d.ts","sourceRoot":"","sources":["../../../src/DomainRegistration/DomainRegistrationLease.ts"],"names":[],"mappings":"AAAA,OAAO,EAA0F,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAE5I,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAC5C,OAAO,EAAE,wBAAwB,EAA4B,MAAM,sBAAsB,CAAA;AAEzF,eAAO,MAAM,6BAA6B,4CAA+C,CAAA;AACzF,MAAM,MAAM,6BAA6B,GAAG,OAAO,6BAA6B,CAAA;AAEhF,MAAM,WAAW,6BAA8B,SAAQ,wBAAwB,EAAE,cAAc;CAAG;AAElG;;GAEG;AACH,MAAM,MAAM,uBAAuB,GAAG,OAAO,CAAC,6BAA6B,EAAE,6BAA6B,CAAC,CAAA;AAE3G;;GAEG;AACH,eAAO,MAAM,yBAAyB;;CAAgF,CAAA;AAEtH;;GAEG;AACH,eAAO,MAAM,gCAAgC;;EAA2F,CAAA;AAExI;;GAEG;AACH,eAAO,MAAM,6BAA6B;;EAAwF,CAAA"}
|
package/dist/node/index.cjs
CHANGED
|
@@ -29,8 +29,16 @@ __export(src_exports, {
|
|
|
29
29
|
isAddressRecordWithMeta: () => isAddressRecordWithMeta,
|
|
30
30
|
isDomain: () => isDomain,
|
|
31
31
|
isDomainLease: () => isDomainLease,
|
|
32
|
+
isDomainLeaseWithMeta: () => isDomainLeaseWithMeta,
|
|
33
|
+
isDomainLeaseWithSources: () => isDomainLeaseWithSources,
|
|
32
34
|
isDomainRegistration: () => isDomainRegistration,
|
|
33
35
|
isDomainRegistrationLease: () => isDomainRegistrationLease,
|
|
36
|
+
isDomainRegistrationLeaseMeta: () => isDomainRegistrationLeaseMeta,
|
|
37
|
+
isDomainRegistrationLeaseSources: () => isDomainRegistrationLeaseSources,
|
|
38
|
+
isDomainRegistrationWithMeta: () => isDomainRegistrationWithMeta,
|
|
39
|
+
isDomainRegistrationWithSources: () => isDomainRegistrationWithSources,
|
|
40
|
+
isDomainWithMeta: () => isDomainWithMeta,
|
|
41
|
+
isDomainWithSources: () => isDomainWithSources,
|
|
34
42
|
validateBoundWitnessWithDuration: () => validateBoundWitnessWithDuration,
|
|
35
43
|
validateDuration: () => validateDuration
|
|
36
44
|
});
|
|
@@ -46,21 +54,29 @@ var isAddressRecordWithMeta = (0, import_payload_model.isPayloadOfSchemaType)(Ad
|
|
|
46
54
|
var import_payload_model2 = require("@xyo-network/payload-model");
|
|
47
55
|
var DomainSchema = "network.xyo.ns.domain";
|
|
48
56
|
var isDomain = (0, import_payload_model2.isPayloadOfSchemaType)(DomainSchema);
|
|
57
|
+
var isDomainWithSources = (0, import_payload_model2.isPayloadOfSchemaTypeWithSources)(DomainSchema);
|
|
58
|
+
var isDomainWithMeta = (0, import_payload_model2.isPayloadOfSchemaTypeWithMeta)(DomainSchema);
|
|
49
59
|
|
|
50
60
|
// src/Domain/DomainLease.ts
|
|
51
61
|
var import_payload_model3 = require("@xyo-network/payload-model");
|
|
52
62
|
var DomainLeaseSchema = "network.xyo.ns.domain.lease";
|
|
53
63
|
var isDomainLease = (0, import_payload_model3.isPayloadOfSchemaType)(DomainLeaseSchema);
|
|
64
|
+
var isDomainLeaseWithSources = (0, import_payload_model3.isPayloadOfSchemaTypeWithSources)(DomainLeaseSchema);
|
|
65
|
+
var isDomainLeaseWithMeta = (0, import_payload_model3.isPayloadOfSchemaTypeWithMeta)(DomainLeaseSchema);
|
|
54
66
|
|
|
55
67
|
// src/DomainRegistration/DomainRegistration.ts
|
|
56
68
|
var import_payload_model4 = require("@xyo-network/payload-model");
|
|
57
69
|
var DomainRegistrationSchema = `${DomainSchema}.registration`;
|
|
58
70
|
var isDomainRegistration = (0, import_payload_model4.isPayloadOfSchemaType)(DomainRegistrationSchema);
|
|
71
|
+
var isDomainRegistrationWithSources = (0, import_payload_model4.isPayloadOfSchemaTypeWithSources)(DomainRegistrationSchema);
|
|
72
|
+
var isDomainRegistrationWithMeta = (0, import_payload_model4.isPayloadOfSchemaTypeWithMeta)(DomainRegistrationSchema);
|
|
59
73
|
|
|
60
74
|
// src/DomainRegistration/DomainRegistrationLease.ts
|
|
61
75
|
var import_payload_model5 = require("@xyo-network/payload-model");
|
|
62
76
|
var DomainRegistrationLeaseSchema = `${DomainRegistrationSchema}.lease`;
|
|
63
77
|
var isDomainRegistrationLease = (0, import_payload_model5.isPayloadOfSchemaType)(DomainRegistrationLeaseSchema);
|
|
78
|
+
var isDomainRegistrationLeaseSources = (0, import_payload_model5.isPayloadOfSchemaTypeWithSources)(DomainRegistrationLeaseSchema);
|
|
79
|
+
var isDomainRegistrationLeaseMeta = (0, import_payload_model5.isPayloadOfSchemaTypeWithMeta)(DomainRegistrationLeaseSchema);
|
|
64
80
|
|
|
65
81
|
// src/Duration/validation/validateBoundWitness.ts
|
|
66
82
|
var import_boundwitness_validator = require("@xyo-network/boundwitness-validator");
|
|
@@ -122,8 +138,16 @@ var validateBoundWitnessWithDuration = async (recordBw, recordPayload) => {
|
|
|
122
138
|
isAddressRecordWithMeta,
|
|
123
139
|
isDomain,
|
|
124
140
|
isDomainLease,
|
|
141
|
+
isDomainLeaseWithMeta,
|
|
142
|
+
isDomainLeaseWithSources,
|
|
125
143
|
isDomainRegistration,
|
|
126
144
|
isDomainRegistrationLease,
|
|
145
|
+
isDomainRegistrationLeaseMeta,
|
|
146
|
+
isDomainRegistrationLeaseSources,
|
|
147
|
+
isDomainRegistrationWithMeta,
|
|
148
|
+
isDomainRegistrationWithSources,
|
|
149
|
+
isDomainWithMeta,
|
|
150
|
+
isDomainWithSources,
|
|
127
151
|
validateBoundWitnessWithDuration,
|
|
128
152
|
validateDuration
|
|
129
153
|
});
|
package/dist/node/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/index.ts","../../src/Address/Payload.ts","../../src/Domain/Domain.ts","../../src/Domain/DomainLease.ts","../../src/DomainRegistration/DomainRegistration.ts","../../src/DomainRegistration/DomainRegistrationLease.ts","../../src/Duration/validation/validateBoundWitness.ts","../../src/Duration/validation/validateBoundWitnessAndDuration.ts","../../src/Duration/validation/validateDuration.ts","../../src/Duration/validation/validateBoundWitnessWithDuration.ts"],"sourcesContent":["export * from './Address'\nexport * from './Domain'\nexport * from './DomainRegistration'\nexport * from './Duration'\n","import { Address } from '@xylabs/hex'\nimport { isPayloadOfSchemaType, Payload, WithMeta } from '@xyo-network/payload-model'\n\nimport { DomainFields } from '../Domain'\n\nexport type AddressRecordSchema = 'network.xyo.ns.record.address'\nexport const AddressRecordSchema: AddressRecordSchema = 'network.xyo.ns.record.address'\n\nexport interface AddressRecordFields extends DomainFields {\n /**\n * The address the record points to\n */\n address: Address[]\n}\n\n/**\n * An address record points a domain to an address\n */\nexport type AddressRecord = Payload<AddressRecordFields, AddressRecordSchema>\n\nexport const isAddressRecord = isPayloadOfSchemaType<AddressRecord>(AddressRecordSchema)\nexport const isAddressRecordWithMeta = isPayloadOfSchemaType<WithMeta<AddressRecord>>(AddressRecordSchema)\n","import { isPayloadOfSchemaType, Payload } from '@xyo-network/payload-model'\n\nexport type DomainSchema = 'network.xyo.ns.domain'\nexport const DomainSchema: DomainSchema = 'network.xyo.ns.domain'\n\n/**\n * The supported TLDs for XNS\n */\nexport type TopLevelDomain = 'xyo'\n\n/**\n * The fields for a domain record\n */\nexport interface DomainFields {\n /**\n * The XNS domain of the record\n */\n domain: string\n\n /**\n * The Top-Level Domain of the domain\n */\n tld: TopLevelDomain\n}\n\n/**\n * A domain record is a record of a domain\n */\nexport type Domain = Payload<DomainFields, DomainSchema>\n\n/**\n * Identity function for Domain payload\n */\nexport const isDomain = isPayloadOfSchemaType<Domain>(DomainSchema)\n","import { isPayloadOfSchemaType, Payload } from '@xyo-network/payload-model'\n\nimport { DurationFields } from '../Duration'\nimport { DomainFields } from './Domain'\n\nexport type DomainLeaseSchema = 'network.xyo.ns.domain.lease'\nexport const DomainLeaseSchema: DomainLeaseSchema = 'network.xyo.ns.domain.lease'\n\n/**\n * A domain is leased for a duration\n */\nexport interface DomainLeaseFields extends DomainFields, DurationFields {}\n\n/**\n * A domain lease is a record of a domain and the duration it is leased for\n */\nexport type DomainLease = Payload<DomainLeaseFields, DomainLeaseSchema>\n\n/**\n * Identity function for DomainLease payload\n */\nexport const isDomainLease = isPayloadOfSchemaType<DomainLease>(DomainLeaseSchema)\n","import { Address } from '@xylabs/hex'\nimport { isPayloadOfSchemaType, Payload } from '@xyo-network/payload-model'\n\nimport { DomainFields, DomainSchema } from '../Domain'\n\nexport const DomainRegistrationSchema = `${DomainSchema}.registration` as const\nexport type DomainRegistrationSchema = typeof DomainRegistrationSchema\n\nexport interface DomainRegistrationFields extends DomainFields {\n /**\n * The registrant of the domain\n */\n registrant: Address[]\n /**\n * The registrar of the domain\n */\n registrar: Address[]\n}\n\n/**\n * Delegation of a domain to a registrar by a registrant\n */\nexport type DomainRegistration = Payload<DomainRegistrationFields, DomainRegistrationSchema>\n\n/**\n * Identity function for DomainRegistration payload\n */\nexport const isDomainRegistration = isPayloadOfSchemaType<DomainRegistration>(DomainRegistrationSchema)\n","import { isPayloadOfSchemaType, Payload } from '@xyo-network/payload-model'\n\nimport { DurationFields } from '../Duration'\nimport { DomainRegistrationFields, DomainRegistrationSchema } from './DomainRegistration'\n\nexport const DomainRegistrationLeaseSchema = `${DomainRegistrationSchema}.lease` as const\nexport type DomainRegistrationLeaseSchema = typeof DomainRegistrationLeaseSchema\n\nexport interface DomainRegistrationLeaseFields extends DomainRegistrationFields, DurationFields {}\n\n/**\n * Temporal delegation of a domain to a registrar by a registrant\n */\nexport type DomainRegistrationLease = Payload<DomainRegistrationLeaseFields, DomainRegistrationLeaseSchema>\n\n/**\n * Identity function for DomainRegistrationLease payload\n */\nexport const isDomainRegistrationLease = isPayloadOfSchemaType<DomainRegistrationLease>(DomainRegistrationLeaseSchema)\n","import { BoundWitness } from '@xyo-network/boundwitness-model'\nimport { BoundWitnessValidator } from '@xyo-network/boundwitness-validator'\n\n// BW Validations\nexport const validateBoundWitness = async (recordBw: BoundWitness, requiredSchemas: string[] = []): Promise<boolean> => {\n // If the BW does not include all of the required schemas\n if (!requiredSchemas.every((requiredSchema) => recordBw.payload_schemas.includes(requiredSchema))) return false\n // If the BW is valid (does not include any errors)\n const validator = new BoundWitnessValidator(recordBw)\n const errors = await validator.validate()\n return errors.length === 0\n}\n","import { BoundWitness } from '@xyo-network/boundwitness-model'\nimport { PayloadBuilder } from '@xyo-network/payload-builder'\nimport { Payload } from '@xyo-network/payload-model'\n\nimport { DurationFields } from '../Duration'\n\n// BW & Record Validations\nexport const validateBoundWitnessAndDuration = async (recordBw: BoundWitness, recordPayload: Payload<DurationFields>): Promise<boolean> => {\n if (!(await recordIsInBoundWitness(recordBw, recordPayload))) return false\n if (!recordIsTemporallyValidToBoundWitness(recordBw, recordPayload)) return false\n return true\n}\n\nconst recordIsInBoundWitness = async (recordBw: BoundWitness, recordPayload: Payload): Promise<boolean> => {\n const hash = await PayloadBuilder.dataHash(recordPayload)\n return recordBw.payload_hashes.includes(hash)\n}\n\nconst recordIsTemporallyValidToBoundWitness = (recordBw: BoundWitness, recordPayload: Payload<DurationFields>): boolean => {\n const { timestamp } = recordBw\n const { exp } = recordPayload\n return exp > timestamp\n}\n","// import { isAddress } from '@xylabs/hex'\nimport { Payload } from '@xyo-network/payload-model'\n\nimport { DurationFields } from '../Duration'\n\n// Record Validations\nexport const validateDuration = (recordPayload: Payload<DurationFields>): boolean => {\n // if (!isValidAddress(recordPayload)) return false\n if (!isWithinDelegatedTimeframe(recordPayload)) return false\n return true\n}\n\n// const isValidAddress = (recordPayload: Payload<DomainLeaseFields>): boolean => {\n// return isAddress(recordPayload.nameserver, { prefix: false })\n// }\n\nconst isWithinDelegatedTimeframe = (recordPayload: Payload<DurationFields>, now = Date.now()): boolean => {\n // nbf < now < exp\n return recordPayload.nbf < now && now < recordPayload.exp\n}\n","import { BoundWitness } from '@xyo-network/boundwitness-model'\nimport { Payload } from '@xyo-network/payload-model'\n\nimport { DurationFields } from '../Duration'\nimport { validateBoundWitness } from './validateBoundWitness'\nimport { validateBoundWitnessAndDuration } from './validateBoundWitnessAndDuration'\nimport { validateDuration } from './validateDuration'\n\nexport const validateBoundWitnessWithDuration = async (recordBw: BoundWitness, recordPayload: Payload<DurationFields>): Promise<boolean> => {\n // Validate the BW\n if (!(await validateBoundWitness(recordBw, [recordPayload.schema]))) return false\n // Validate the record\n if (!validateDuration(recordPayload)) return false\n // Validate the record relative to the BW\n if (!(await validateBoundWitnessAndDuration(recordBw, recordPayload))) return false\n return true\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACCA,2BAAyD;AAKlD,IAAM,sBAA2C;AAcjD,IAAM,sBAAkB,4CAAqC,mBAAmB;AAChF,IAAM,8BAA0B,4CAA+C,mBAAmB;;;ACrBzG,IAAAA,wBAA+C;AAGxC,IAAM,eAA6B;AA8BnC,IAAM,eAAW,6CAA8B,YAAY;;;ACjClE,IAAAC,wBAA+C;AAMxC,IAAM,oBAAuC;AAe7C,IAAM,oBAAgB,6CAAmC,iBAAiB;;;ACpBjF,IAAAC,wBAA+C;AAIxC,IAAM,2BAA2B,GAAG,YAAY;AAsBhD,IAAM,2BAAuB,6CAA0C,wBAAwB;;;AC3BtG,IAAAC,wBAA+C;AAKxC,IAAM,gCAAgC,GAAG,wBAAwB;AAajE,IAAM,gCAA4B,6CAA+C,6BAA6B;;;ACjBrH,oCAAsC;AAG/B,IAAM,uBAAuB,OAAO,UAAwB,kBAA4B,CAAC,MAAwB;AAEtH,MAAI,CAAC,gBAAgB,MAAM,CAAC,mBAAmB,SAAS,gBAAgB,SAAS,cAAc,CAAC;AAAG,WAAO;AAE1G,QAAM,YAAY,IAAI,oDAAsB,QAAQ;AACpD,QAAM,SAAS,MAAM,UAAU,SAAS;AACxC,SAAO,OAAO,WAAW;AAC3B;;;ACVA,6BAA+B;AAMxB,IAAM,kCAAkC,OAAO,UAAwB,kBAA6D;AACzI,MAAI,CAAE,MAAM,uBAAuB,UAAU,aAAa;AAAI,WAAO;AACrE,MAAI,CAAC,sCAAsC,UAAU,aAAa;AAAG,WAAO;AAC5E,SAAO;AACT;AAEA,IAAM,yBAAyB,OAAO,UAAwB,kBAA6C;AACzG,QAAM,OAAO,MAAM,sCAAe,SAAS,aAAa;AACxD,SAAO,SAAS,eAAe,SAAS,IAAI;AAC9C;AAEA,IAAM,wCAAwC,CAAC,UAAwB,kBAAoD;AACzH,QAAM,EAAE,UAAU,IAAI;AACtB,QAAM,EAAE,IAAI,IAAI;AAChB,SAAO,MAAM;AACf;;;AChBO,IAAM,mBAAmB,CAAC,kBAAoD;AAEnF,MAAI,CAAC,2BAA2B,aAAa;AAAG,WAAO;AACvD,SAAO;AACT;AAMA,IAAM,6BAA6B,CAAC,eAAwC,MAAM,KAAK,IAAI,MAAe;AAExG,SAAO,cAAc,MAAM,OAAO,MAAM,cAAc;AACxD;;;ACXO,IAAM,mCAAmC,OAAO,UAAwB,kBAA6D;AAE1I,MAAI,CAAE,MAAM,qBAAqB,UAAU,CAAC,cAAc,MAAM,CAAC;AAAI,WAAO;AAE5E,MAAI,CAAC,iBAAiB,aAAa;AAAG,WAAO;AAE7C,MAAI,CAAE,MAAM,gCAAgC,UAAU,aAAa;AAAI,WAAO;AAC9E,SAAO;AACT;","names":["import_payload_model","import_payload_model","import_payload_model","import_payload_model"]}
|
|
1
|
+
{"version":3,"sources":["../../src/index.ts","../../src/Address/Payload.ts","../../src/Domain/Domain.ts","../../src/Domain/DomainLease.ts","../../src/DomainRegistration/DomainRegistration.ts","../../src/DomainRegistration/DomainRegistrationLease.ts","../../src/Duration/validation/validateBoundWitness.ts","../../src/Duration/validation/validateBoundWitnessAndDuration.ts","../../src/Duration/validation/validateDuration.ts","../../src/Duration/validation/validateBoundWitnessWithDuration.ts"],"sourcesContent":["export * from './Address'\nexport * from './Domain'\nexport * from './DomainRegistration'\nexport * from './Duration'\n","import { Address } from '@xylabs/hex'\nimport { isPayloadOfSchemaType, Payload, WithMeta } from '@xyo-network/payload-model'\n\nimport { DomainFields } from '../Domain'\n\nexport type AddressRecordSchema = 'network.xyo.ns.record.address'\nexport const AddressRecordSchema: AddressRecordSchema = 'network.xyo.ns.record.address'\n\nexport interface AddressRecordFields extends DomainFields {\n /**\n * The address the record points to\n */\n address: Address[]\n}\n\n/**\n * An address record points a domain to an address\n */\nexport type AddressRecord = Payload<AddressRecordFields, AddressRecordSchema>\n\nexport const isAddressRecord = isPayloadOfSchemaType<AddressRecord>(AddressRecordSchema)\nexport const isAddressRecordWithMeta = isPayloadOfSchemaType<WithMeta<AddressRecord>>(AddressRecordSchema)\n","import { isPayloadOfSchemaType, isPayloadOfSchemaTypeWithMeta, isPayloadOfSchemaTypeWithSources, Payload } from '@xyo-network/payload-model'\n\nexport type DomainSchema = 'network.xyo.ns.domain'\nexport const DomainSchema: DomainSchema = 'network.xyo.ns.domain'\n\n/**\n * The supported TLDs for XNS\n */\nexport type TopLevelDomain = 'xyo'\n\n/**\n * The fields for a domain record\n */\nexport interface DomainFields {\n /**\n * The XNS domain of the record\n */\n domain: string\n\n /**\n * The Top-Level Domain of the domain\n */\n tld: TopLevelDomain\n}\n\n/**\n * A domain record is a record of a domain\n */\nexport type Domain = Payload<DomainFields, DomainSchema>\n\n/**\n * Identity function for Domain payload\n */\nexport const isDomain = isPayloadOfSchemaType<Domain>(DomainSchema)\n\n/**\n * Identity function for Domain payload with sources\n */\nexport const isDomainWithSources = isPayloadOfSchemaTypeWithSources<Domain>(DomainSchema)\n\n/**\n * Identity function for Domain payload with meta\n */\nexport const isDomainWithMeta = isPayloadOfSchemaTypeWithMeta<Domain>(DomainSchema)\n","import { isPayloadOfSchemaType, isPayloadOfSchemaTypeWithMeta, isPayloadOfSchemaTypeWithSources, Payload } from '@xyo-network/payload-model'\n\nimport { DurationFields } from '../Duration'\nimport { DomainFields } from './Domain'\n\nexport type DomainLeaseSchema = 'network.xyo.ns.domain.lease'\nexport const DomainLeaseSchema: DomainLeaseSchema = 'network.xyo.ns.domain.lease'\n\n/**\n * A domain is leased for a duration\n */\nexport interface DomainLeaseFields extends DomainFields, DurationFields {}\n\n/**\n * A domain lease is a record of a domain and the duration it is leased for\n */\nexport type DomainLease = Payload<DomainLeaseFields, DomainLeaseSchema>\n\n/**\n * Identity function for DomainLease payload\n */\nexport const isDomainLease = isPayloadOfSchemaType<DomainLease>(DomainLeaseSchema)\n\n/**\n * Identity function for DomainLease payload with sources\n */\nexport const isDomainLeaseWithSources = isPayloadOfSchemaTypeWithSources<DomainLease>(DomainLeaseSchema)\n\n/**\n * Identity function for DomainLease payload with meta\n */\nexport const isDomainLeaseWithMeta = isPayloadOfSchemaTypeWithMeta<DomainLease>(DomainLeaseSchema)\n","import { Address } from '@xylabs/hex'\nimport { isPayloadOfSchemaType, isPayloadOfSchemaTypeWithMeta, isPayloadOfSchemaTypeWithSources, Payload } from '@xyo-network/payload-model'\n\nimport { DomainFields, DomainSchema } from '../Domain'\n\nexport const DomainRegistrationSchema = `${DomainSchema}.registration` as const\nexport type DomainRegistrationSchema = typeof DomainRegistrationSchema\n\nexport interface DomainRegistrationFields extends DomainFields {\n /**\n * The registrant of the domain\n */\n registrant: Address[]\n /**\n * The registrar of the domain\n */\n registrar: Address[]\n}\n\n/**\n * Delegation of a domain to a registrar by a registrant\n */\nexport type DomainRegistration = Payload<DomainRegistrationFields, DomainRegistrationSchema>\n\n/**\n * Identity function for DomainRegistration payload\n */\nexport const isDomainRegistration = isPayloadOfSchemaType<DomainRegistration>(DomainRegistrationSchema)\n\n/**\n * Identity function for DomainRegistration payload with sources\n */\nexport const isDomainRegistrationWithSources = isPayloadOfSchemaTypeWithSources<DomainRegistration>(DomainRegistrationSchema)\n\n/**\n * Identity function for DomainRegistration payload with meta\n */\nexport const isDomainRegistrationWithMeta = isPayloadOfSchemaTypeWithMeta<DomainRegistration>(DomainRegistrationSchema)\n","import { isPayloadOfSchemaType, isPayloadOfSchemaTypeWithMeta, isPayloadOfSchemaTypeWithSources, Payload } from '@xyo-network/payload-model'\n\nimport { DurationFields } from '../Duration'\nimport { DomainRegistrationFields, DomainRegistrationSchema } from './DomainRegistration'\n\nexport const DomainRegistrationLeaseSchema = `${DomainRegistrationSchema}.lease` as const\nexport type DomainRegistrationLeaseSchema = typeof DomainRegistrationLeaseSchema\n\nexport interface DomainRegistrationLeaseFields extends DomainRegistrationFields, DurationFields {}\n\n/**\n * Temporal delegation of a domain to a registrar by a registrant\n */\nexport type DomainRegistrationLease = Payload<DomainRegistrationLeaseFields, DomainRegistrationLeaseSchema>\n\n/**\n * Identity function for DomainRegistrationLease payload\n */\nexport const isDomainRegistrationLease = isPayloadOfSchemaType<DomainRegistrationLease>(DomainRegistrationLeaseSchema)\n\n/**\n * Identity function for DomainRegistrationLease payload with sources\n */\nexport const isDomainRegistrationLeaseSources = isPayloadOfSchemaTypeWithSources<DomainRegistrationLease>(DomainRegistrationLeaseSchema)\n\n/**\n * Identity function for DomainRegistrationLease payload with meta\n */\nexport const isDomainRegistrationLeaseMeta = isPayloadOfSchemaTypeWithMeta<DomainRegistrationLease>(DomainRegistrationLeaseSchema)\n","import { BoundWitness } from '@xyo-network/boundwitness-model'\nimport { BoundWitnessValidator } from '@xyo-network/boundwitness-validator'\n\n// BW Validations\nexport const validateBoundWitness = async (recordBw: BoundWitness, requiredSchemas: string[] = []): Promise<boolean> => {\n // If the BW does not include all of the required schemas\n if (!requiredSchemas.every((requiredSchema) => recordBw.payload_schemas.includes(requiredSchema))) return false\n // If the BW is valid (does not include any errors)\n const validator = new BoundWitnessValidator(recordBw)\n const errors = await validator.validate()\n return errors.length === 0\n}\n","import { BoundWitness } from '@xyo-network/boundwitness-model'\nimport { PayloadBuilder } from '@xyo-network/payload-builder'\nimport { Payload } from '@xyo-network/payload-model'\n\nimport { DurationFields } from '../Duration'\n\n// BW & Record Validations\nexport const validateBoundWitnessAndDuration = async (recordBw: BoundWitness, recordPayload: Payload<DurationFields>): Promise<boolean> => {\n if (!(await recordIsInBoundWitness(recordBw, recordPayload))) return false\n if (!recordIsTemporallyValidToBoundWitness(recordBw, recordPayload)) return false\n return true\n}\n\nconst recordIsInBoundWitness = async (recordBw: BoundWitness, recordPayload: Payload): Promise<boolean> => {\n const hash = await PayloadBuilder.dataHash(recordPayload)\n return recordBw.payload_hashes.includes(hash)\n}\n\nconst recordIsTemporallyValidToBoundWitness = (recordBw: BoundWitness, recordPayload: Payload<DurationFields>): boolean => {\n const { timestamp } = recordBw\n const { exp } = recordPayload\n return exp > timestamp\n}\n","// import { isAddress } from '@xylabs/hex'\nimport { Payload } from '@xyo-network/payload-model'\n\nimport { DurationFields } from '../Duration'\n\n// Record Validations\nexport const validateDuration = (recordPayload: Payload<DurationFields>): boolean => {\n // if (!isValidAddress(recordPayload)) return false\n if (!isWithinDelegatedTimeframe(recordPayload)) return false\n return true\n}\n\n// const isValidAddress = (recordPayload: Payload<DomainLeaseFields>): boolean => {\n// return isAddress(recordPayload.nameserver, { prefix: false })\n// }\n\nconst isWithinDelegatedTimeframe = (recordPayload: Payload<DurationFields>, now = Date.now()): boolean => {\n // nbf < now < exp\n return recordPayload.nbf < now && now < recordPayload.exp\n}\n","import { BoundWitness } from '@xyo-network/boundwitness-model'\nimport { Payload } from '@xyo-network/payload-model'\n\nimport { DurationFields } from '../Duration'\nimport { validateBoundWitness } from './validateBoundWitness'\nimport { validateBoundWitnessAndDuration } from './validateBoundWitnessAndDuration'\nimport { validateDuration } from './validateDuration'\n\nexport const validateBoundWitnessWithDuration = async (recordBw: BoundWitness, recordPayload: Payload<DurationFields>): Promise<boolean> => {\n // Validate the BW\n if (!(await validateBoundWitness(recordBw, [recordPayload.schema]))) return false\n // Validate the record\n if (!validateDuration(recordPayload)) return false\n // Validate the record relative to the BW\n if (!(await validateBoundWitnessAndDuration(recordBw, recordPayload))) return false\n return true\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACCA,2BAAyD;AAKlD,IAAM,sBAA2C;AAcjD,IAAM,sBAAkB,4CAAqC,mBAAmB;AAChF,IAAM,8BAA0B,4CAA+C,mBAAmB;;;ACrBzG,IAAAA,wBAAgH;AAGzG,IAAM,eAA6B;AA8BnC,IAAM,eAAW,6CAA8B,YAAY;AAK3D,IAAM,0BAAsB,wDAAyC,YAAY;AAKjF,IAAM,uBAAmB,qDAAsC,YAAY;;;AC3ClF,IAAAC,wBAAgH;AAMzG,IAAM,oBAAuC;AAe7C,IAAM,oBAAgB,6CAAmC,iBAAiB;AAK1E,IAAM,+BAA2B,wDAA8C,iBAAiB;AAKhG,IAAM,4BAAwB,qDAA2C,iBAAiB;;;AC9BjG,IAAAC,wBAAgH;AAIzG,IAAM,2BAA2B,GAAG,YAAY;AAsBhD,IAAM,2BAAuB,6CAA0C,wBAAwB;AAK/F,IAAM,sCAAkC,wDAAqD,wBAAwB;AAKrH,IAAM,mCAA+B,qDAAkD,wBAAwB;;;ACrCtH,IAAAC,wBAAgH;AAKzG,IAAM,gCAAgC,GAAG,wBAAwB;AAajE,IAAM,gCAA4B,6CAA+C,6BAA6B;AAK9G,IAAM,uCAAmC,wDAA0D,6BAA6B;AAKhI,IAAM,oCAAgC,qDAAuD,6BAA6B;;;AC3BjI,oCAAsC;AAG/B,IAAM,uBAAuB,OAAO,UAAwB,kBAA4B,CAAC,MAAwB;AAEtH,MAAI,CAAC,gBAAgB,MAAM,CAAC,mBAAmB,SAAS,gBAAgB,SAAS,cAAc,CAAC;AAAG,WAAO;AAE1G,QAAM,YAAY,IAAI,oDAAsB,QAAQ;AACpD,QAAM,SAAS,MAAM,UAAU,SAAS;AACxC,SAAO,OAAO,WAAW;AAC3B;;;ACVA,6BAA+B;AAMxB,IAAM,kCAAkC,OAAO,UAAwB,kBAA6D;AACzI,MAAI,CAAE,MAAM,uBAAuB,UAAU,aAAa;AAAI,WAAO;AACrE,MAAI,CAAC,sCAAsC,UAAU,aAAa;AAAG,WAAO;AAC5E,SAAO;AACT;AAEA,IAAM,yBAAyB,OAAO,UAAwB,kBAA6C;AACzG,QAAM,OAAO,MAAM,sCAAe,SAAS,aAAa;AACxD,SAAO,SAAS,eAAe,SAAS,IAAI;AAC9C;AAEA,IAAM,wCAAwC,CAAC,UAAwB,kBAAoD;AACzH,QAAM,EAAE,UAAU,IAAI;AACtB,QAAM,EAAE,IAAI,IAAI;AAChB,SAAO,MAAM;AACf;;;AChBO,IAAM,mBAAmB,CAAC,kBAAoD;AAEnF,MAAI,CAAC,2BAA2B,aAAa;AAAG,WAAO;AACvD,SAAO;AACT;AAMA,IAAM,6BAA6B,CAAC,eAAwC,MAAM,KAAK,IAAI,MAAe;AAExG,SAAO,cAAc,MAAM,OAAO,MAAM,cAAc;AACxD;;;ACXO,IAAM,mCAAmC,OAAO,UAAwB,kBAA6D;AAE1I,MAAI,CAAE,MAAM,qBAAqB,UAAU,CAAC,cAAc,MAAM,CAAC;AAAI,WAAO;AAE5E,MAAI,CAAC,iBAAiB,aAAa;AAAG,WAAO;AAE7C,MAAI,CAAE,MAAM,gCAAgC,UAAU,aAAa;AAAI,WAAO;AAC9E,SAAO;AACT;","names":["import_payload_model","import_payload_model","import_payload_model","import_payload_model"]}
|
package/dist/node/index.js
CHANGED
|
@@ -5,24 +5,32 @@ var isAddressRecord = isPayloadOfSchemaType(AddressRecordSchema);
|
|
|
5
5
|
var isAddressRecordWithMeta = isPayloadOfSchemaType(AddressRecordSchema);
|
|
6
6
|
|
|
7
7
|
// src/Domain/Domain.ts
|
|
8
|
-
import { isPayloadOfSchemaType as isPayloadOfSchemaType2 } from "@xyo-network/payload-model";
|
|
8
|
+
import { isPayloadOfSchemaType as isPayloadOfSchemaType2, isPayloadOfSchemaTypeWithMeta, isPayloadOfSchemaTypeWithSources } from "@xyo-network/payload-model";
|
|
9
9
|
var DomainSchema = "network.xyo.ns.domain";
|
|
10
10
|
var isDomain = isPayloadOfSchemaType2(DomainSchema);
|
|
11
|
+
var isDomainWithSources = isPayloadOfSchemaTypeWithSources(DomainSchema);
|
|
12
|
+
var isDomainWithMeta = isPayloadOfSchemaTypeWithMeta(DomainSchema);
|
|
11
13
|
|
|
12
14
|
// src/Domain/DomainLease.ts
|
|
13
|
-
import { isPayloadOfSchemaType as isPayloadOfSchemaType3 } from "@xyo-network/payload-model";
|
|
15
|
+
import { isPayloadOfSchemaType as isPayloadOfSchemaType3, isPayloadOfSchemaTypeWithMeta as isPayloadOfSchemaTypeWithMeta2, isPayloadOfSchemaTypeWithSources as isPayloadOfSchemaTypeWithSources2 } from "@xyo-network/payload-model";
|
|
14
16
|
var DomainLeaseSchema = "network.xyo.ns.domain.lease";
|
|
15
17
|
var isDomainLease = isPayloadOfSchemaType3(DomainLeaseSchema);
|
|
18
|
+
var isDomainLeaseWithSources = isPayloadOfSchemaTypeWithSources2(DomainLeaseSchema);
|
|
19
|
+
var isDomainLeaseWithMeta = isPayloadOfSchemaTypeWithMeta2(DomainLeaseSchema);
|
|
16
20
|
|
|
17
21
|
// src/DomainRegistration/DomainRegistration.ts
|
|
18
|
-
import { isPayloadOfSchemaType as isPayloadOfSchemaType4 } from "@xyo-network/payload-model";
|
|
22
|
+
import { isPayloadOfSchemaType as isPayloadOfSchemaType4, isPayloadOfSchemaTypeWithMeta as isPayloadOfSchemaTypeWithMeta3, isPayloadOfSchemaTypeWithSources as isPayloadOfSchemaTypeWithSources3 } from "@xyo-network/payload-model";
|
|
19
23
|
var DomainRegistrationSchema = `${DomainSchema}.registration`;
|
|
20
24
|
var isDomainRegistration = isPayloadOfSchemaType4(DomainRegistrationSchema);
|
|
25
|
+
var isDomainRegistrationWithSources = isPayloadOfSchemaTypeWithSources3(DomainRegistrationSchema);
|
|
26
|
+
var isDomainRegistrationWithMeta = isPayloadOfSchemaTypeWithMeta3(DomainRegistrationSchema);
|
|
21
27
|
|
|
22
28
|
// src/DomainRegistration/DomainRegistrationLease.ts
|
|
23
|
-
import { isPayloadOfSchemaType as isPayloadOfSchemaType5 } from "@xyo-network/payload-model";
|
|
29
|
+
import { isPayloadOfSchemaType as isPayloadOfSchemaType5, isPayloadOfSchemaTypeWithMeta as isPayloadOfSchemaTypeWithMeta4, isPayloadOfSchemaTypeWithSources as isPayloadOfSchemaTypeWithSources4 } from "@xyo-network/payload-model";
|
|
24
30
|
var DomainRegistrationLeaseSchema = `${DomainRegistrationSchema}.lease`;
|
|
25
31
|
var isDomainRegistrationLease = isPayloadOfSchemaType5(DomainRegistrationLeaseSchema);
|
|
32
|
+
var isDomainRegistrationLeaseSources = isPayloadOfSchemaTypeWithSources4(DomainRegistrationLeaseSchema);
|
|
33
|
+
var isDomainRegistrationLeaseMeta = isPayloadOfSchemaTypeWithMeta4(DomainRegistrationLeaseSchema);
|
|
26
34
|
|
|
27
35
|
// src/Duration/validation/validateBoundWitness.ts
|
|
28
36
|
import { BoundWitnessValidator } from "@xyo-network/boundwitness-validator";
|
|
@@ -83,8 +91,16 @@ export {
|
|
|
83
91
|
isAddressRecordWithMeta,
|
|
84
92
|
isDomain,
|
|
85
93
|
isDomainLease,
|
|
94
|
+
isDomainLeaseWithMeta,
|
|
95
|
+
isDomainLeaseWithSources,
|
|
86
96
|
isDomainRegistration,
|
|
87
97
|
isDomainRegistrationLease,
|
|
98
|
+
isDomainRegistrationLeaseMeta,
|
|
99
|
+
isDomainRegistrationLeaseSources,
|
|
100
|
+
isDomainRegistrationWithMeta,
|
|
101
|
+
isDomainRegistrationWithSources,
|
|
102
|
+
isDomainWithMeta,
|
|
103
|
+
isDomainWithSources,
|
|
88
104
|
validateBoundWitnessWithDuration,
|
|
89
105
|
validateDuration
|
|
90
106
|
};
|
package/dist/node/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/Address/Payload.ts","../../src/Domain/Domain.ts","../../src/Domain/DomainLease.ts","../../src/DomainRegistration/DomainRegistration.ts","../../src/DomainRegistration/DomainRegistrationLease.ts","../../src/Duration/validation/validateBoundWitness.ts","../../src/Duration/validation/validateBoundWitnessAndDuration.ts","../../src/Duration/validation/validateDuration.ts","../../src/Duration/validation/validateBoundWitnessWithDuration.ts"],"sourcesContent":["import { Address } from '@xylabs/hex'\nimport { isPayloadOfSchemaType, Payload, WithMeta } from '@xyo-network/payload-model'\n\nimport { DomainFields } from '../Domain'\n\nexport type AddressRecordSchema = 'network.xyo.ns.record.address'\nexport const AddressRecordSchema: AddressRecordSchema = 'network.xyo.ns.record.address'\n\nexport interface AddressRecordFields extends DomainFields {\n /**\n * The address the record points to\n */\n address: Address[]\n}\n\n/**\n * An address record points a domain to an address\n */\nexport type AddressRecord = Payload<AddressRecordFields, AddressRecordSchema>\n\nexport const isAddressRecord = isPayloadOfSchemaType<AddressRecord>(AddressRecordSchema)\nexport const isAddressRecordWithMeta = isPayloadOfSchemaType<WithMeta<AddressRecord>>(AddressRecordSchema)\n","import { isPayloadOfSchemaType, Payload } from '@xyo-network/payload-model'\n\nexport type DomainSchema = 'network.xyo.ns.domain'\nexport const DomainSchema: DomainSchema = 'network.xyo.ns.domain'\n\n/**\n * The supported TLDs for XNS\n */\nexport type TopLevelDomain = 'xyo'\n\n/**\n * The fields for a domain record\n */\nexport interface DomainFields {\n /**\n * The XNS domain of the record\n */\n domain: string\n\n /**\n * The Top-Level Domain of the domain\n */\n tld: TopLevelDomain\n}\n\n/**\n * A domain record is a record of a domain\n */\nexport type Domain = Payload<DomainFields, DomainSchema>\n\n/**\n * Identity function for Domain payload\n */\nexport const isDomain = isPayloadOfSchemaType<Domain>(DomainSchema)\n","import { isPayloadOfSchemaType, Payload } from '@xyo-network/payload-model'\n\nimport { DurationFields } from '../Duration'\nimport { DomainFields } from './Domain'\n\nexport type DomainLeaseSchema = 'network.xyo.ns.domain.lease'\nexport const DomainLeaseSchema: DomainLeaseSchema = 'network.xyo.ns.domain.lease'\n\n/**\n * A domain is leased for a duration\n */\nexport interface DomainLeaseFields extends DomainFields, DurationFields {}\n\n/**\n * A domain lease is a record of a domain and the duration it is leased for\n */\nexport type DomainLease = Payload<DomainLeaseFields, DomainLeaseSchema>\n\n/**\n * Identity function for DomainLease payload\n */\nexport const isDomainLease = isPayloadOfSchemaType<DomainLease>(DomainLeaseSchema)\n","import { Address } from '@xylabs/hex'\nimport { isPayloadOfSchemaType, Payload } from '@xyo-network/payload-model'\n\nimport { DomainFields, DomainSchema } from '../Domain'\n\nexport const DomainRegistrationSchema = `${DomainSchema}.registration` as const\nexport type DomainRegistrationSchema = typeof DomainRegistrationSchema\n\nexport interface DomainRegistrationFields extends DomainFields {\n /**\n * The registrant of the domain\n */\n registrant: Address[]\n /**\n * The registrar of the domain\n */\n registrar: Address[]\n}\n\n/**\n * Delegation of a domain to a registrar by a registrant\n */\nexport type DomainRegistration = Payload<DomainRegistrationFields, DomainRegistrationSchema>\n\n/**\n * Identity function for DomainRegistration payload\n */\nexport const isDomainRegistration = isPayloadOfSchemaType<DomainRegistration>(DomainRegistrationSchema)\n","import { isPayloadOfSchemaType, Payload } from '@xyo-network/payload-model'\n\nimport { DurationFields } from '../Duration'\nimport { DomainRegistrationFields, DomainRegistrationSchema } from './DomainRegistration'\n\nexport const DomainRegistrationLeaseSchema = `${DomainRegistrationSchema}.lease` as const\nexport type DomainRegistrationLeaseSchema = typeof DomainRegistrationLeaseSchema\n\nexport interface DomainRegistrationLeaseFields extends DomainRegistrationFields, DurationFields {}\n\n/**\n * Temporal delegation of a domain to a registrar by a registrant\n */\nexport type DomainRegistrationLease = Payload<DomainRegistrationLeaseFields, DomainRegistrationLeaseSchema>\n\n/**\n * Identity function for DomainRegistrationLease payload\n */\nexport const isDomainRegistrationLease = isPayloadOfSchemaType<DomainRegistrationLease>(DomainRegistrationLeaseSchema)\n","import { BoundWitness } from '@xyo-network/boundwitness-model'\nimport { BoundWitnessValidator } from '@xyo-network/boundwitness-validator'\n\n// BW Validations\nexport const validateBoundWitness = async (recordBw: BoundWitness, requiredSchemas: string[] = []): Promise<boolean> => {\n // If the BW does not include all of the required schemas\n if (!requiredSchemas.every((requiredSchema) => recordBw.payload_schemas.includes(requiredSchema))) return false\n // If the BW is valid (does not include any errors)\n const validator = new BoundWitnessValidator(recordBw)\n const errors = await validator.validate()\n return errors.length === 0\n}\n","import { BoundWitness } from '@xyo-network/boundwitness-model'\nimport { PayloadBuilder } from '@xyo-network/payload-builder'\nimport { Payload } from '@xyo-network/payload-model'\n\nimport { DurationFields } from '../Duration'\n\n// BW & Record Validations\nexport const validateBoundWitnessAndDuration = async (recordBw: BoundWitness, recordPayload: Payload<DurationFields>): Promise<boolean> => {\n if (!(await recordIsInBoundWitness(recordBw, recordPayload))) return false\n if (!recordIsTemporallyValidToBoundWitness(recordBw, recordPayload)) return false\n return true\n}\n\nconst recordIsInBoundWitness = async (recordBw: BoundWitness, recordPayload: Payload): Promise<boolean> => {\n const hash = await PayloadBuilder.dataHash(recordPayload)\n return recordBw.payload_hashes.includes(hash)\n}\n\nconst recordIsTemporallyValidToBoundWitness = (recordBw: BoundWitness, recordPayload: Payload<DurationFields>): boolean => {\n const { timestamp } = recordBw\n const { exp } = recordPayload\n return exp > timestamp\n}\n","// import { isAddress } from '@xylabs/hex'\nimport { Payload } from '@xyo-network/payload-model'\n\nimport { DurationFields } from '../Duration'\n\n// Record Validations\nexport const validateDuration = (recordPayload: Payload<DurationFields>): boolean => {\n // if (!isValidAddress(recordPayload)) return false\n if (!isWithinDelegatedTimeframe(recordPayload)) return false\n return true\n}\n\n// const isValidAddress = (recordPayload: Payload<DomainLeaseFields>): boolean => {\n// return isAddress(recordPayload.nameserver, { prefix: false })\n// }\n\nconst isWithinDelegatedTimeframe = (recordPayload: Payload<DurationFields>, now = Date.now()): boolean => {\n // nbf < now < exp\n return recordPayload.nbf < now && now < recordPayload.exp\n}\n","import { BoundWitness } from '@xyo-network/boundwitness-model'\nimport { Payload } from '@xyo-network/payload-model'\n\nimport { DurationFields } from '../Duration'\nimport { validateBoundWitness } from './validateBoundWitness'\nimport { validateBoundWitnessAndDuration } from './validateBoundWitnessAndDuration'\nimport { validateDuration } from './validateDuration'\n\nexport const validateBoundWitnessWithDuration = async (recordBw: BoundWitness, recordPayload: Payload<DurationFields>): Promise<boolean> => {\n // Validate the BW\n if (!(await validateBoundWitness(recordBw, [recordPayload.schema]))) return false\n // Validate the record\n if (!validateDuration(recordPayload)) return false\n // Validate the record relative to the BW\n if (!(await validateBoundWitnessAndDuration(recordBw, recordPayload))) return false\n return true\n}\n"],"mappings":";AACA,SAAS,6BAAgD;AAKlD,IAAM,sBAA2C;AAcjD,IAAM,kBAAkB,sBAAqC,mBAAmB;AAChF,IAAM,0BAA0B,sBAA+C,mBAAmB;;;ACrBzG,SAAS,yBAAAA,8BAAsC;AAGxC,IAAM,eAA6B;AA8BnC,IAAM,WAAWA,uBAA8B,YAAY;;;ACjClE,SAAS,yBAAAC,8BAAsC;AAMxC,IAAM,oBAAuC;AAe7C,IAAM,gBAAgBA,uBAAmC,iBAAiB;;;ACpBjF,SAAS,yBAAAC,8BAAsC;AAIxC,IAAM,2BAA2B,GAAG,YAAY;AAsBhD,IAAM,uBAAuBC,uBAA0C,wBAAwB;;;AC3BtG,SAAS,yBAAAC,8BAAsC;AAKxC,IAAM,gCAAgC,GAAG,wBAAwB;AAajE,IAAM,4BAA4BC,uBAA+C,6BAA6B;;;ACjBrH,SAAS,6BAA6B;AAG/B,IAAM,uBAAuB,OAAO,UAAwB,kBAA4B,CAAC,MAAwB;AAEtH,MAAI,CAAC,gBAAgB,MAAM,CAAC,mBAAmB,SAAS,gBAAgB,SAAS,cAAc,CAAC;AAAG,WAAO;AAE1G,QAAM,YAAY,IAAI,sBAAsB,QAAQ;AACpD,QAAM,SAAS,MAAM,UAAU,SAAS;AACxC,SAAO,OAAO,WAAW;AAC3B;;;ACVA,SAAS,sBAAsB;AAMxB,IAAM,kCAAkC,OAAO,UAAwB,kBAA6D;AACzI,MAAI,CAAE,MAAM,uBAAuB,UAAU,aAAa;AAAI,WAAO;AACrE,MAAI,CAAC,sCAAsC,UAAU,aAAa;AAAG,WAAO;AAC5E,SAAO;AACT;AAEA,IAAM,yBAAyB,OAAO,UAAwB,kBAA6C;AACzG,QAAM,OAAO,MAAM,eAAe,SAAS,aAAa;AACxD,SAAO,SAAS,eAAe,SAAS,IAAI;AAC9C;AAEA,IAAM,wCAAwC,CAAC,UAAwB,kBAAoD;AACzH,QAAM,EAAE,UAAU,IAAI;AACtB,QAAM,EAAE,IAAI,IAAI;AAChB,SAAO,MAAM;AACf;;;AChBO,IAAM,mBAAmB,CAAC,kBAAoD;AAEnF,MAAI,CAAC,2BAA2B,aAAa;AAAG,WAAO;AACvD,SAAO;AACT;AAMA,IAAM,6BAA6B,CAAC,eAAwC,MAAM,KAAK,IAAI,MAAe;AAExG,SAAO,cAAc,MAAM,OAAO,MAAM,cAAc;AACxD;;;ACXO,IAAM,mCAAmC,OAAO,UAAwB,kBAA6D;AAE1I,MAAI,CAAE,MAAM,qBAAqB,UAAU,CAAC,cAAc,MAAM,CAAC;AAAI,WAAO;AAE5E,MAAI,CAAC,iBAAiB,aAAa;AAAG,WAAO;AAE7C,MAAI,CAAE,MAAM,gCAAgC,UAAU,aAAa;AAAI,WAAO;AAC9E,SAAO;AACT;","names":["isPayloadOfSchemaType","isPayloadOfSchemaType","isPayloadOfSchemaType","isPayloadOfSchemaType","isPayloadOfSchemaType","isPayloadOfSchemaType"]}
|
|
1
|
+
{"version":3,"sources":["../../src/Address/Payload.ts","../../src/Domain/Domain.ts","../../src/Domain/DomainLease.ts","../../src/DomainRegistration/DomainRegistration.ts","../../src/DomainRegistration/DomainRegistrationLease.ts","../../src/Duration/validation/validateBoundWitness.ts","../../src/Duration/validation/validateBoundWitnessAndDuration.ts","../../src/Duration/validation/validateDuration.ts","../../src/Duration/validation/validateBoundWitnessWithDuration.ts"],"sourcesContent":["import { Address } from '@xylabs/hex'\nimport { isPayloadOfSchemaType, Payload, WithMeta } from '@xyo-network/payload-model'\n\nimport { DomainFields } from '../Domain'\n\nexport type AddressRecordSchema = 'network.xyo.ns.record.address'\nexport const AddressRecordSchema: AddressRecordSchema = 'network.xyo.ns.record.address'\n\nexport interface AddressRecordFields extends DomainFields {\n /**\n * The address the record points to\n */\n address: Address[]\n}\n\n/**\n * An address record points a domain to an address\n */\nexport type AddressRecord = Payload<AddressRecordFields, AddressRecordSchema>\n\nexport const isAddressRecord = isPayloadOfSchemaType<AddressRecord>(AddressRecordSchema)\nexport const isAddressRecordWithMeta = isPayloadOfSchemaType<WithMeta<AddressRecord>>(AddressRecordSchema)\n","import { isPayloadOfSchemaType, isPayloadOfSchemaTypeWithMeta, isPayloadOfSchemaTypeWithSources, Payload } from '@xyo-network/payload-model'\n\nexport type DomainSchema = 'network.xyo.ns.domain'\nexport const DomainSchema: DomainSchema = 'network.xyo.ns.domain'\n\n/**\n * The supported TLDs for XNS\n */\nexport type TopLevelDomain = 'xyo'\n\n/**\n * The fields for a domain record\n */\nexport interface DomainFields {\n /**\n * The XNS domain of the record\n */\n domain: string\n\n /**\n * The Top-Level Domain of the domain\n */\n tld: TopLevelDomain\n}\n\n/**\n * A domain record is a record of a domain\n */\nexport type Domain = Payload<DomainFields, DomainSchema>\n\n/**\n * Identity function for Domain payload\n */\nexport const isDomain = isPayloadOfSchemaType<Domain>(DomainSchema)\n\n/**\n * Identity function for Domain payload with sources\n */\nexport const isDomainWithSources = isPayloadOfSchemaTypeWithSources<Domain>(DomainSchema)\n\n/**\n * Identity function for Domain payload with meta\n */\nexport const isDomainWithMeta = isPayloadOfSchemaTypeWithMeta<Domain>(DomainSchema)\n","import { isPayloadOfSchemaType, isPayloadOfSchemaTypeWithMeta, isPayloadOfSchemaTypeWithSources, Payload } from '@xyo-network/payload-model'\n\nimport { DurationFields } from '../Duration'\nimport { DomainFields } from './Domain'\n\nexport type DomainLeaseSchema = 'network.xyo.ns.domain.lease'\nexport const DomainLeaseSchema: DomainLeaseSchema = 'network.xyo.ns.domain.lease'\n\n/**\n * A domain is leased for a duration\n */\nexport interface DomainLeaseFields extends DomainFields, DurationFields {}\n\n/**\n * A domain lease is a record of a domain and the duration it is leased for\n */\nexport type DomainLease = Payload<DomainLeaseFields, DomainLeaseSchema>\n\n/**\n * Identity function for DomainLease payload\n */\nexport const isDomainLease = isPayloadOfSchemaType<DomainLease>(DomainLeaseSchema)\n\n/**\n * Identity function for DomainLease payload with sources\n */\nexport const isDomainLeaseWithSources = isPayloadOfSchemaTypeWithSources<DomainLease>(DomainLeaseSchema)\n\n/**\n * Identity function for DomainLease payload with meta\n */\nexport const isDomainLeaseWithMeta = isPayloadOfSchemaTypeWithMeta<DomainLease>(DomainLeaseSchema)\n","import { Address } from '@xylabs/hex'\nimport { isPayloadOfSchemaType, isPayloadOfSchemaTypeWithMeta, isPayloadOfSchemaTypeWithSources, Payload } from '@xyo-network/payload-model'\n\nimport { DomainFields, DomainSchema } from '../Domain'\n\nexport const DomainRegistrationSchema = `${DomainSchema}.registration` as const\nexport type DomainRegistrationSchema = typeof DomainRegistrationSchema\n\nexport interface DomainRegistrationFields extends DomainFields {\n /**\n * The registrant of the domain\n */\n registrant: Address[]\n /**\n * The registrar of the domain\n */\n registrar: Address[]\n}\n\n/**\n * Delegation of a domain to a registrar by a registrant\n */\nexport type DomainRegistration = Payload<DomainRegistrationFields, DomainRegistrationSchema>\n\n/**\n * Identity function for DomainRegistration payload\n */\nexport const isDomainRegistration = isPayloadOfSchemaType<DomainRegistration>(DomainRegistrationSchema)\n\n/**\n * Identity function for DomainRegistration payload with sources\n */\nexport const isDomainRegistrationWithSources = isPayloadOfSchemaTypeWithSources<DomainRegistration>(DomainRegistrationSchema)\n\n/**\n * Identity function for DomainRegistration payload with meta\n */\nexport const isDomainRegistrationWithMeta = isPayloadOfSchemaTypeWithMeta<DomainRegistration>(DomainRegistrationSchema)\n","import { isPayloadOfSchemaType, isPayloadOfSchemaTypeWithMeta, isPayloadOfSchemaTypeWithSources, Payload } from '@xyo-network/payload-model'\n\nimport { DurationFields } from '../Duration'\nimport { DomainRegistrationFields, DomainRegistrationSchema } from './DomainRegistration'\n\nexport const DomainRegistrationLeaseSchema = `${DomainRegistrationSchema}.lease` as const\nexport type DomainRegistrationLeaseSchema = typeof DomainRegistrationLeaseSchema\n\nexport interface DomainRegistrationLeaseFields extends DomainRegistrationFields, DurationFields {}\n\n/**\n * Temporal delegation of a domain to a registrar by a registrant\n */\nexport type DomainRegistrationLease = Payload<DomainRegistrationLeaseFields, DomainRegistrationLeaseSchema>\n\n/**\n * Identity function for DomainRegistrationLease payload\n */\nexport const isDomainRegistrationLease = isPayloadOfSchemaType<DomainRegistrationLease>(DomainRegistrationLeaseSchema)\n\n/**\n * Identity function for DomainRegistrationLease payload with sources\n */\nexport const isDomainRegistrationLeaseSources = isPayloadOfSchemaTypeWithSources<DomainRegistrationLease>(DomainRegistrationLeaseSchema)\n\n/**\n * Identity function for DomainRegistrationLease payload with meta\n */\nexport const isDomainRegistrationLeaseMeta = isPayloadOfSchemaTypeWithMeta<DomainRegistrationLease>(DomainRegistrationLeaseSchema)\n","import { BoundWitness } from '@xyo-network/boundwitness-model'\nimport { BoundWitnessValidator } from '@xyo-network/boundwitness-validator'\n\n// BW Validations\nexport const validateBoundWitness = async (recordBw: BoundWitness, requiredSchemas: string[] = []): Promise<boolean> => {\n // If the BW does not include all of the required schemas\n if (!requiredSchemas.every((requiredSchema) => recordBw.payload_schemas.includes(requiredSchema))) return false\n // If the BW is valid (does not include any errors)\n const validator = new BoundWitnessValidator(recordBw)\n const errors = await validator.validate()\n return errors.length === 0\n}\n","import { BoundWitness } from '@xyo-network/boundwitness-model'\nimport { PayloadBuilder } from '@xyo-network/payload-builder'\nimport { Payload } from '@xyo-network/payload-model'\n\nimport { DurationFields } from '../Duration'\n\n// BW & Record Validations\nexport const validateBoundWitnessAndDuration = async (recordBw: BoundWitness, recordPayload: Payload<DurationFields>): Promise<boolean> => {\n if (!(await recordIsInBoundWitness(recordBw, recordPayload))) return false\n if (!recordIsTemporallyValidToBoundWitness(recordBw, recordPayload)) return false\n return true\n}\n\nconst recordIsInBoundWitness = async (recordBw: BoundWitness, recordPayload: Payload): Promise<boolean> => {\n const hash = await PayloadBuilder.dataHash(recordPayload)\n return recordBw.payload_hashes.includes(hash)\n}\n\nconst recordIsTemporallyValidToBoundWitness = (recordBw: BoundWitness, recordPayload: Payload<DurationFields>): boolean => {\n const { timestamp } = recordBw\n const { exp } = recordPayload\n return exp > timestamp\n}\n","// import { isAddress } from '@xylabs/hex'\nimport { Payload } from '@xyo-network/payload-model'\n\nimport { DurationFields } from '../Duration'\n\n// Record Validations\nexport const validateDuration = (recordPayload: Payload<DurationFields>): boolean => {\n // if (!isValidAddress(recordPayload)) return false\n if (!isWithinDelegatedTimeframe(recordPayload)) return false\n return true\n}\n\n// const isValidAddress = (recordPayload: Payload<DomainLeaseFields>): boolean => {\n// return isAddress(recordPayload.nameserver, { prefix: false })\n// }\n\nconst isWithinDelegatedTimeframe = (recordPayload: Payload<DurationFields>, now = Date.now()): boolean => {\n // nbf < now < exp\n return recordPayload.nbf < now && now < recordPayload.exp\n}\n","import { BoundWitness } from '@xyo-network/boundwitness-model'\nimport { Payload } from '@xyo-network/payload-model'\n\nimport { DurationFields } from '../Duration'\nimport { validateBoundWitness } from './validateBoundWitness'\nimport { validateBoundWitnessAndDuration } from './validateBoundWitnessAndDuration'\nimport { validateDuration } from './validateDuration'\n\nexport const validateBoundWitnessWithDuration = async (recordBw: BoundWitness, recordPayload: Payload<DurationFields>): Promise<boolean> => {\n // Validate the BW\n if (!(await validateBoundWitness(recordBw, [recordPayload.schema]))) return false\n // Validate the record\n if (!validateDuration(recordPayload)) return false\n // Validate the record relative to the BW\n if (!(await validateBoundWitnessAndDuration(recordBw, recordPayload))) return false\n return true\n}\n"],"mappings":";AACA,SAAS,6BAAgD;AAKlD,IAAM,sBAA2C;AAcjD,IAAM,kBAAkB,sBAAqC,mBAAmB;AAChF,IAAM,0BAA0B,sBAA+C,mBAAmB;;;ACrBzG,SAAS,yBAAAA,wBAAuB,+BAA+B,wCAAiD;AAGzG,IAAM,eAA6B;AA8BnC,IAAM,WAAWA,uBAA8B,YAAY;AAK3D,IAAM,sBAAsB,iCAAyC,YAAY;AAKjF,IAAM,mBAAmB,8BAAsC,YAAY;;;AC3ClF,SAAS,yBAAAC,wBAAuB,iCAAAC,gCAA+B,oCAAAC,yCAAiD;AAMzG,IAAM,oBAAuC;AAe7C,IAAM,gBAAgBF,uBAAmC,iBAAiB;AAK1E,IAAM,2BAA2BE,kCAA8C,iBAAiB;AAKhG,IAAM,wBAAwBD,+BAA2C,iBAAiB;;;AC9BjG,SAAS,yBAAAE,wBAAuB,iCAAAC,gCAA+B,oCAAAC,yCAAiD;AAIzG,IAAM,2BAA2B,GAAG,YAAY;AAsBhD,IAAM,uBAAuBC,uBAA0C,wBAAwB;AAK/F,IAAM,kCAAkCC,kCAAqD,wBAAwB;AAKrH,IAAM,+BAA+BC,+BAAkD,wBAAwB;;;ACrCtH,SAAS,yBAAAC,wBAAuB,iCAAAC,gCAA+B,oCAAAC,yCAAiD;AAKzG,IAAM,gCAAgC,GAAG,wBAAwB;AAajE,IAAM,4BAA4BC,uBAA+C,6BAA6B;AAK9G,IAAM,mCAAmCC,kCAA0D,6BAA6B;AAKhI,IAAM,gCAAgCC,+BAAuD,6BAA6B;;;AC3BjI,SAAS,6BAA6B;AAG/B,IAAM,uBAAuB,OAAO,UAAwB,kBAA4B,CAAC,MAAwB;AAEtH,MAAI,CAAC,gBAAgB,MAAM,CAAC,mBAAmB,SAAS,gBAAgB,SAAS,cAAc,CAAC;AAAG,WAAO;AAE1G,QAAM,YAAY,IAAI,sBAAsB,QAAQ;AACpD,QAAM,SAAS,MAAM,UAAU,SAAS;AACxC,SAAO,OAAO,WAAW;AAC3B;;;ACVA,SAAS,sBAAsB;AAMxB,IAAM,kCAAkC,OAAO,UAAwB,kBAA6D;AACzI,MAAI,CAAE,MAAM,uBAAuB,UAAU,aAAa;AAAI,WAAO;AACrE,MAAI,CAAC,sCAAsC,UAAU,aAAa;AAAG,WAAO;AAC5E,SAAO;AACT;AAEA,IAAM,yBAAyB,OAAO,UAAwB,kBAA6C;AACzG,QAAM,OAAO,MAAM,eAAe,SAAS,aAAa;AACxD,SAAO,SAAS,eAAe,SAAS,IAAI;AAC9C;AAEA,IAAM,wCAAwC,CAAC,UAAwB,kBAAoD;AACzH,QAAM,EAAE,UAAU,IAAI;AACtB,QAAM,EAAE,IAAI,IAAI;AAChB,SAAO,MAAM;AACf;;;AChBO,IAAM,mBAAmB,CAAC,kBAAoD;AAEnF,MAAI,CAAC,2BAA2B,aAAa;AAAG,WAAO;AACvD,SAAO;AACT;AAMA,IAAM,6BAA6B,CAAC,eAAwC,MAAM,KAAK,IAAI,MAAe;AAExG,SAAO,cAAc,MAAM,OAAO,MAAM,cAAc;AACxD;;;ACXO,IAAM,mCAAmC,OAAO,UAAwB,kBAA6D;AAE1I,MAAI,CAAE,MAAM,qBAAqB,UAAU,CAAC,cAAc,MAAM,CAAC;AAAI,WAAO;AAE5E,MAAI,CAAC,iBAAiB,aAAa;AAAG,WAAO;AAE7C,MAAI,CAAE,MAAM,gCAAgC,UAAU,aAAa;AAAI,WAAO;AAC9E,SAAO;AACT;","names":["isPayloadOfSchemaType","isPayloadOfSchemaType","isPayloadOfSchemaTypeWithMeta","isPayloadOfSchemaTypeWithSources","isPayloadOfSchemaType","isPayloadOfSchemaTypeWithMeta","isPayloadOfSchemaTypeWithSources","isPayloadOfSchemaType","isPayloadOfSchemaTypeWithSources","isPayloadOfSchemaTypeWithMeta","isPayloadOfSchemaType","isPayloadOfSchemaTypeWithMeta","isPayloadOfSchemaTypeWithSources","isPayloadOfSchemaType","isPayloadOfSchemaTypeWithSources","isPayloadOfSchemaTypeWithMeta"]}
|
package/package.json
CHANGED
|
@@ -11,17 +11,17 @@
|
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
13
|
"@xylabs/hex": "^3.1.7",
|
|
14
|
-
"@xyo-network/boundwitness-model": "^2.94.
|
|
15
|
-
"@xyo-network/boundwitness-validator": "^2.94.
|
|
16
|
-
"@xyo-network/payload-builder": "^2.94.
|
|
17
|
-
"@xyo-network/payload-model": "^2.94.
|
|
14
|
+
"@xyo-network/boundwitness-model": "^2.94.33",
|
|
15
|
+
"@xyo-network/boundwitness-validator": "^2.94.33",
|
|
16
|
+
"@xyo-network/payload-builder": "^2.94.33",
|
|
17
|
+
"@xyo-network/payload-model": "^2.94.33"
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|
|
20
20
|
"@xylabs/ts-scripts-yarn3": "^3.9.0",
|
|
21
21
|
"@xylabs/tsconfig": "^3.9.0",
|
|
22
|
-
"@xyo-network/account": "^2.94.
|
|
23
|
-
"@xyo-network/boundwitness-builder": "^2.94.
|
|
24
|
-
"typescript": "^5.4.
|
|
22
|
+
"@xyo-network/account": "^2.94.33",
|
|
23
|
+
"@xyo-network/boundwitness-builder": "^2.94.33",
|
|
24
|
+
"typescript": "^5.4.5"
|
|
25
25
|
},
|
|
26
26
|
"description": "Typescript/Javascript Plugins for XYO Platform",
|
|
27
27
|
"exports": {
|
|
@@ -62,6 +62,6 @@
|
|
|
62
62
|
"url": "https://github.com/XYOracleNetwork/plugins.git"
|
|
63
63
|
},
|
|
64
64
|
"sideEffects": false,
|
|
65
|
-
"version": "2.91.
|
|
65
|
+
"version": "2.91.11",
|
|
66
66
|
"type": "module"
|
|
67
67
|
}
|
package/src/Domain/Domain.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { isPayloadOfSchemaType, Payload } from '@xyo-network/payload-model'
|
|
1
|
+
import { isPayloadOfSchemaType, isPayloadOfSchemaTypeWithMeta, isPayloadOfSchemaTypeWithSources, Payload } from '@xyo-network/payload-model'
|
|
2
2
|
|
|
3
3
|
export type DomainSchema = 'network.xyo.ns.domain'
|
|
4
4
|
export const DomainSchema: DomainSchema = 'network.xyo.ns.domain'
|
|
@@ -32,3 +32,13 @@ export type Domain = Payload<DomainFields, DomainSchema>
|
|
|
32
32
|
* Identity function for Domain payload
|
|
33
33
|
*/
|
|
34
34
|
export const isDomain = isPayloadOfSchemaType<Domain>(DomainSchema)
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Identity function for Domain payload with sources
|
|
38
|
+
*/
|
|
39
|
+
export const isDomainWithSources = isPayloadOfSchemaTypeWithSources<Domain>(DomainSchema)
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Identity function for Domain payload with meta
|
|
43
|
+
*/
|
|
44
|
+
export const isDomainWithMeta = isPayloadOfSchemaTypeWithMeta<Domain>(DomainSchema)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { isPayloadOfSchemaType, Payload } from '@xyo-network/payload-model'
|
|
1
|
+
import { isPayloadOfSchemaType, isPayloadOfSchemaTypeWithMeta, isPayloadOfSchemaTypeWithSources, Payload } from '@xyo-network/payload-model'
|
|
2
2
|
|
|
3
3
|
import { DurationFields } from '../Duration'
|
|
4
4
|
import { DomainFields } from './Domain'
|
|
@@ -20,3 +20,13 @@ export type DomainLease = Payload<DomainLeaseFields, DomainLeaseSchema>
|
|
|
20
20
|
* Identity function for DomainLease payload
|
|
21
21
|
*/
|
|
22
22
|
export const isDomainLease = isPayloadOfSchemaType<DomainLease>(DomainLeaseSchema)
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Identity function for DomainLease payload with sources
|
|
26
|
+
*/
|
|
27
|
+
export const isDomainLeaseWithSources = isPayloadOfSchemaTypeWithSources<DomainLease>(DomainLeaseSchema)
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Identity function for DomainLease payload with meta
|
|
31
|
+
*/
|
|
32
|
+
export const isDomainLeaseWithMeta = isPayloadOfSchemaTypeWithMeta<DomainLease>(DomainLeaseSchema)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Address } from '@xylabs/hex'
|
|
2
|
-
import { isPayloadOfSchemaType, Payload } from '@xyo-network/payload-model'
|
|
2
|
+
import { isPayloadOfSchemaType, isPayloadOfSchemaTypeWithMeta, isPayloadOfSchemaTypeWithSources, Payload } from '@xyo-network/payload-model'
|
|
3
3
|
|
|
4
4
|
import { DomainFields, DomainSchema } from '../Domain'
|
|
5
5
|
|
|
@@ -26,3 +26,13 @@ export type DomainRegistration = Payload<DomainRegistrationFields, DomainRegistr
|
|
|
26
26
|
* Identity function for DomainRegistration payload
|
|
27
27
|
*/
|
|
28
28
|
export const isDomainRegistration = isPayloadOfSchemaType<DomainRegistration>(DomainRegistrationSchema)
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Identity function for DomainRegistration payload with sources
|
|
32
|
+
*/
|
|
33
|
+
export const isDomainRegistrationWithSources = isPayloadOfSchemaTypeWithSources<DomainRegistration>(DomainRegistrationSchema)
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Identity function for DomainRegistration payload with meta
|
|
37
|
+
*/
|
|
38
|
+
export const isDomainRegistrationWithMeta = isPayloadOfSchemaTypeWithMeta<DomainRegistration>(DomainRegistrationSchema)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { isPayloadOfSchemaType, Payload } from '@xyo-network/payload-model'
|
|
1
|
+
import { isPayloadOfSchemaType, isPayloadOfSchemaTypeWithMeta, isPayloadOfSchemaTypeWithSources, Payload } from '@xyo-network/payload-model'
|
|
2
2
|
|
|
3
3
|
import { DurationFields } from '../Duration'
|
|
4
4
|
import { DomainRegistrationFields, DomainRegistrationSchema } from './DomainRegistration'
|
|
@@ -17,3 +17,13 @@ export type DomainRegistrationLease = Payload<DomainRegistrationLeaseFields, Dom
|
|
|
17
17
|
* Identity function for DomainRegistrationLease payload
|
|
18
18
|
*/
|
|
19
19
|
export const isDomainRegistrationLease = isPayloadOfSchemaType<DomainRegistrationLease>(DomainRegistrationLeaseSchema)
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Identity function for DomainRegistrationLease payload with sources
|
|
23
|
+
*/
|
|
24
|
+
export const isDomainRegistrationLeaseSources = isPayloadOfSchemaTypeWithSources<DomainRegistrationLease>(DomainRegistrationLeaseSchema)
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Identity function for DomainRegistrationLease payload with meta
|
|
28
|
+
*/
|
|
29
|
+
export const isDomainRegistrationLeaseMeta = isPayloadOfSchemaTypeWithMeta<DomainRegistrationLease>(DomainRegistrationLeaseSchema)
|