@xyo-network/xns-record-payload-plugins 3.0.3 → 3.0.5
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/Address/Payload.d.ts +16 -0
- package/dist/browser/Address/Payload.d.ts.map +1 -0
- package/dist/browser/Address/index.d.ts +2 -0
- package/dist/browser/Address/index.d.ts.map +1 -0
- package/dist/browser/DNS/Witness/Config.d.ts +12 -0
- package/dist/browser/DNS/Witness/Config.d.ts.map +1 -0
- package/dist/browser/DNS/Witness/Params.d.ts +5 -0
- package/dist/browser/DNS/Witness/Params.d.ts.map +1 -0
- package/dist/browser/DNS/Witness/Payload/Payload.d.ts +4 -0
- package/dist/browser/DNS/Witness/Payload/Payload.d.ts.map +1 -0
- package/dist/browser/DNS/Witness/Payload/Request.d.ts +9 -0
- package/dist/browser/DNS/Witness/Payload/Request.d.ts.map +1 -0
- package/dist/browser/DNS/Witness/Payload/Response.d.ts +8 -0
- package/dist/browser/DNS/Witness/Payload/Response.d.ts.map +1 -0
- package/dist/browser/DNS/Witness/Payload/index.d.ts +4 -0
- package/dist/browser/DNS/Witness/Payload/index.d.ts.map +1 -0
- package/dist/browser/DNS/Witness/Schema.d.ts +3 -0
- package/dist/browser/DNS/Witness/Schema.d.ts.map +1 -0
- package/dist/browser/DNS/Witness/index.d.ts +4 -0
- package/dist/browser/DNS/Witness/index.d.ts.map +1 -0
- package/dist/browser/DNS/index.d.ts +3 -0
- package/dist/browser/DNS/index.d.ts.map +1 -0
- package/dist/browser/DNS/types/Answer.d.ts +5 -0
- package/dist/browser/DNS/types/Answer.d.ts.map +1 -0
- package/dist/browser/DNS/types/Header.d.ts +38 -0
- package/dist/browser/DNS/types/Header.d.ts.map +1 -0
- package/dist/browser/DNS/types/OperationCodes.d.ts +4 -0
- package/dist/browser/DNS/types/OperationCodes.d.ts.map +1 -0
- package/dist/browser/DNS/types/Record.d.ts +8 -0
- package/dist/browser/DNS/types/Record.d.ts.map +1 -0
- package/dist/browser/DNS/types/Request.d.ts +13 -0
- package/dist/browser/DNS/types/Request.d.ts.map +1 -0
- package/dist/browser/DNS/types/ResourceRecord.d.ts +5 -0
- package/dist/browser/DNS/types/ResourceRecord.d.ts.map +1 -0
- package/dist/browser/DNS/types/Response.d.ts +11 -0
- package/dist/browser/DNS/types/Response.d.ts.map +1 -0
- package/dist/browser/DNS/types/ResponseCodes.d.ts +4 -0
- package/dist/browser/DNS/types/ResponseCodes.d.ts.map +1 -0
- package/dist/browser/DNS/types/index.d.ts +9 -0
- package/dist/browser/DNS/types/index.d.ts.map +1 -0
- package/dist/browser/Domain/Domain.d.ts +19 -0
- package/dist/browser/Domain/Domain.d.ts.map +1 -0
- package/dist/browser/Domain/DomainLease.d.ts +18 -0
- package/dist/browser/Domain/DomainLease.d.ts.map +1 -0
- package/dist/browser/Domain/index.d.ts +3 -0
- package/dist/browser/Domain/index.d.ts.map +1 -0
- package/dist/browser/DomainRegistration/DomainRegistration.d.ts +20 -0
- package/dist/browser/DomainRegistration/DomainRegistration.d.ts.map +1 -0
- package/dist/browser/DomainRegistration/DomainRegistrationLease.d.ts +24 -0
- package/dist/browser/DomainRegistration/DomainRegistrationLease.d.ts.map +1 -0
- package/dist/browser/DomainRegistration/index.d.ts +3 -0
- package/dist/browser/DomainRegistration/index.d.ts.map +1 -0
- package/dist/browser/Duration/Duration.d.ts +5 -0
- package/dist/browser/Duration/Duration.d.ts.map +1 -0
- package/dist/browser/Duration/index.d.ts +3 -0
- package/dist/browser/Duration/index.d.ts.map +1 -0
- package/dist/browser/Duration/validation/index.d.ts +3 -0
- package/dist/browser/Duration/validation/index.d.ts.map +1 -0
- package/dist/browser/Duration/validation/validateBoundWitness.d.ts +3 -0
- package/dist/browser/Duration/validation/validateBoundWitness.d.ts.map +1 -0
- package/dist/browser/Duration/validation/validateBoundWitnessAndDuration.d.ts +5 -0
- package/dist/browser/Duration/validation/validateBoundWitnessAndDuration.d.ts.map +1 -0
- package/dist/browser/Duration/validation/validateBoundWitnessWithDuration.d.ts +5 -0
- package/dist/browser/Duration/validation/validateBoundWitnessWithDuration.d.ts.map +1 -0
- package/dist/browser/Duration/validation/validateDuration.d.ts +4 -0
- package/dist/browser/Duration/validation/validateDuration.d.ts.map +1 -0
- package/dist/browser/diviner/DomainLeaseEstimateDiviner/ErrorDetails/ErrorCodes.d.ts +4 -0
- package/dist/browser/diviner/DomainLeaseEstimateDiviner/ErrorDetails/ErrorCodes.d.ts.map +1 -0
- package/dist/browser/diviner/DomainLeaseEstimateDiviner/ErrorDetails/Payload.d.ts +22 -0
- package/dist/browser/diviner/DomainLeaseEstimateDiviner/ErrorDetails/Payload.d.ts.map +1 -0
- package/dist/browser/diviner/DomainLeaseEstimateDiviner/ErrorDetails/index.d.ts +3 -0
- package/dist/browser/diviner/DomainLeaseEstimateDiviner/ErrorDetails/index.d.ts.map +1 -0
- package/dist/browser/diviner/DomainLeaseEstimateDiviner/Schema.d.ts +3 -0
- package/dist/browser/diviner/DomainLeaseEstimateDiviner/Schema.d.ts.map +1 -0
- package/dist/browser/diviner/DomainLeaseEstimateDiviner/index.d.ts +3 -0
- package/dist/browser/diviner/DomainLeaseEstimateDiviner/index.d.ts.map +1 -0
- package/dist/browser/diviner/index.d.ts +2 -0
- package/dist/browser/diviner/index.d.ts.map +1 -0
- package/dist/browser/index.d.ts +7 -125
- package/dist/browser/index.d.ts.map +1 -0
- package/dist/browser/index.mjs +404 -26
- package/dist/browser/index.mjs.map +1 -1
- package/dist/neutral/Address/Payload.d.ts +16 -0
- package/dist/neutral/Address/Payload.d.ts.map +1 -0
- package/dist/neutral/Address/index.d.ts +2 -0
- package/dist/neutral/Address/index.d.ts.map +1 -0
- package/dist/neutral/DNS/Witness/Config.d.ts +12 -0
- package/dist/neutral/DNS/Witness/Config.d.ts.map +1 -0
- package/dist/neutral/DNS/Witness/Params.d.ts +5 -0
- package/dist/neutral/DNS/Witness/Params.d.ts.map +1 -0
- package/dist/neutral/DNS/Witness/Payload/Payload.d.ts +4 -0
- package/dist/neutral/DNS/Witness/Payload/Payload.d.ts.map +1 -0
- package/dist/neutral/DNS/Witness/Payload/Request.d.ts +9 -0
- package/dist/neutral/DNS/Witness/Payload/Request.d.ts.map +1 -0
- package/dist/neutral/DNS/Witness/Payload/Response.d.ts +8 -0
- package/dist/neutral/DNS/Witness/Payload/Response.d.ts.map +1 -0
- package/dist/neutral/DNS/Witness/Payload/index.d.ts +4 -0
- package/dist/neutral/DNS/Witness/Payload/index.d.ts.map +1 -0
- package/dist/neutral/DNS/Witness/Schema.d.ts +3 -0
- package/dist/neutral/DNS/Witness/Schema.d.ts.map +1 -0
- package/dist/neutral/DNS/Witness/index.d.ts +4 -0
- package/dist/neutral/DNS/Witness/index.d.ts.map +1 -0
- package/dist/neutral/DNS/index.d.ts +3 -0
- package/dist/neutral/DNS/index.d.ts.map +1 -0
- package/dist/neutral/DNS/types/Answer.d.ts +5 -0
- package/dist/neutral/DNS/types/Answer.d.ts.map +1 -0
- package/dist/neutral/DNS/types/Header.d.ts +38 -0
- package/dist/neutral/DNS/types/Header.d.ts.map +1 -0
- package/dist/neutral/DNS/types/OperationCodes.d.ts +4 -0
- package/dist/neutral/DNS/types/OperationCodes.d.ts.map +1 -0
- package/dist/neutral/DNS/types/Record.d.ts +8 -0
- package/dist/neutral/DNS/types/Record.d.ts.map +1 -0
- package/dist/neutral/DNS/types/Request.d.ts +13 -0
- package/dist/neutral/DNS/types/Request.d.ts.map +1 -0
- package/dist/neutral/DNS/types/ResourceRecord.d.ts +5 -0
- package/dist/neutral/DNS/types/ResourceRecord.d.ts.map +1 -0
- package/dist/neutral/DNS/types/Response.d.ts +11 -0
- package/dist/neutral/DNS/types/Response.d.ts.map +1 -0
- package/dist/neutral/DNS/types/ResponseCodes.d.ts +4 -0
- package/dist/neutral/DNS/types/ResponseCodes.d.ts.map +1 -0
- package/dist/neutral/DNS/types/index.d.ts +9 -0
- package/dist/neutral/DNS/types/index.d.ts.map +1 -0
- package/dist/neutral/Domain/Domain.d.ts +19 -0
- package/dist/neutral/Domain/Domain.d.ts.map +1 -0
- package/dist/neutral/Domain/DomainLease.d.ts +18 -0
- package/dist/neutral/Domain/DomainLease.d.ts.map +1 -0
- package/dist/neutral/Domain/index.d.ts +3 -0
- package/dist/neutral/Domain/index.d.ts.map +1 -0
- package/dist/neutral/DomainRegistration/DomainRegistration.d.ts +20 -0
- package/dist/neutral/DomainRegistration/DomainRegistration.d.ts.map +1 -0
- package/dist/neutral/DomainRegistration/DomainRegistrationLease.d.ts +24 -0
- package/dist/neutral/DomainRegistration/DomainRegistrationLease.d.ts.map +1 -0
- package/dist/neutral/DomainRegistration/index.d.ts +3 -0
- package/dist/neutral/DomainRegistration/index.d.ts.map +1 -0
- package/dist/neutral/Duration/Duration.d.ts +5 -0
- package/dist/neutral/Duration/Duration.d.ts.map +1 -0
- package/dist/neutral/Duration/index.d.ts +3 -0
- package/dist/neutral/Duration/index.d.ts.map +1 -0
- package/dist/neutral/Duration/validation/index.d.ts +3 -0
- package/dist/neutral/Duration/validation/index.d.ts.map +1 -0
- package/dist/neutral/Duration/validation/validateBoundWitness.d.ts +3 -0
- package/dist/neutral/Duration/validation/validateBoundWitness.d.ts.map +1 -0
- package/dist/neutral/Duration/validation/validateBoundWitnessAndDuration.d.ts +5 -0
- package/dist/neutral/Duration/validation/validateBoundWitnessAndDuration.d.ts.map +1 -0
- package/dist/neutral/Duration/validation/validateBoundWitnessWithDuration.d.ts +5 -0
- package/dist/neutral/Duration/validation/validateBoundWitnessWithDuration.d.ts.map +1 -0
- package/dist/neutral/Duration/validation/validateDuration.d.ts +4 -0
- package/dist/neutral/Duration/validation/validateDuration.d.ts.map +1 -0
- package/dist/neutral/diviner/DomainLeaseEstimateDiviner/ErrorDetails/ErrorCodes.d.ts +4 -0
- package/dist/neutral/diviner/DomainLeaseEstimateDiviner/ErrorDetails/ErrorCodes.d.ts.map +1 -0
- package/dist/neutral/diviner/DomainLeaseEstimateDiviner/ErrorDetails/Payload.d.ts +22 -0
- package/dist/neutral/diviner/DomainLeaseEstimateDiviner/ErrorDetails/Payload.d.ts.map +1 -0
- package/dist/neutral/diviner/DomainLeaseEstimateDiviner/ErrorDetails/index.d.ts +3 -0
- package/dist/neutral/diviner/DomainLeaseEstimateDiviner/ErrorDetails/index.d.ts.map +1 -0
- package/dist/neutral/diviner/DomainLeaseEstimateDiviner/Schema.d.ts +3 -0
- package/dist/neutral/diviner/DomainLeaseEstimateDiviner/Schema.d.ts.map +1 -0
- package/dist/neutral/diviner/DomainLeaseEstimateDiviner/index.d.ts +3 -0
- package/dist/neutral/diviner/DomainLeaseEstimateDiviner/index.d.ts.map +1 -0
- package/dist/neutral/diviner/index.d.ts +2 -0
- package/dist/neutral/diviner/index.d.ts.map +1 -0
- package/dist/neutral/index.d.ts +7 -125
- package/dist/neutral/index.d.ts.map +1 -0
- package/dist/neutral/index.mjs +404 -26
- package/dist/neutral/index.mjs.map +1 -1
- package/dist/node/Address/Payload.d.ts +16 -0
- package/dist/node/Address/Payload.d.ts.map +1 -0
- package/dist/node/Address/index.d.ts +2 -0
- package/dist/node/Address/index.d.ts.map +1 -0
- package/dist/node/DNS/Witness/Config.d.ts +12 -0
- package/dist/node/DNS/Witness/Config.d.ts.map +1 -0
- package/dist/node/DNS/Witness/Params.d.ts +5 -0
- package/dist/node/DNS/Witness/Params.d.ts.map +1 -0
- package/dist/node/DNS/Witness/Payload/Payload.d.ts +4 -0
- package/dist/node/DNS/Witness/Payload/Payload.d.ts.map +1 -0
- package/dist/node/DNS/Witness/Payload/Request.d.ts +9 -0
- package/dist/node/DNS/Witness/Payload/Request.d.ts.map +1 -0
- package/dist/node/DNS/Witness/Payload/Response.d.ts +8 -0
- package/dist/node/DNS/Witness/Payload/Response.d.ts.map +1 -0
- package/dist/node/DNS/Witness/Payload/index.d.ts +4 -0
- package/dist/node/DNS/Witness/Payload/index.d.ts.map +1 -0
- package/dist/node/DNS/Witness/Schema.d.ts +3 -0
- package/dist/node/DNS/Witness/Schema.d.ts.map +1 -0
- package/dist/node/DNS/Witness/index.d.ts +4 -0
- package/dist/node/DNS/Witness/index.d.ts.map +1 -0
- package/dist/node/DNS/index.d.ts +3 -0
- package/dist/node/DNS/index.d.ts.map +1 -0
- package/dist/node/DNS/types/Answer.d.ts +5 -0
- package/dist/node/DNS/types/Answer.d.ts.map +1 -0
- package/dist/node/DNS/types/Header.d.ts +38 -0
- package/dist/node/DNS/types/Header.d.ts.map +1 -0
- package/dist/node/DNS/types/OperationCodes.d.ts +4 -0
- package/dist/node/DNS/types/OperationCodes.d.ts.map +1 -0
- package/dist/node/DNS/types/Record.d.ts +8 -0
- package/dist/node/DNS/types/Record.d.ts.map +1 -0
- package/dist/node/DNS/types/Request.d.ts +13 -0
- package/dist/node/DNS/types/Request.d.ts.map +1 -0
- package/dist/node/DNS/types/ResourceRecord.d.ts +5 -0
- package/dist/node/DNS/types/ResourceRecord.d.ts.map +1 -0
- package/dist/node/DNS/types/Response.d.ts +11 -0
- package/dist/node/DNS/types/Response.d.ts.map +1 -0
- package/dist/node/DNS/types/ResponseCodes.d.ts +4 -0
- package/dist/node/DNS/types/ResponseCodes.d.ts.map +1 -0
- package/dist/node/DNS/types/index.d.ts +9 -0
- package/dist/node/DNS/types/index.d.ts.map +1 -0
- package/dist/node/Domain/Domain.d.ts +19 -0
- package/dist/node/Domain/Domain.d.ts.map +1 -0
- package/dist/node/Domain/DomainLease.d.ts +18 -0
- package/dist/node/Domain/DomainLease.d.ts.map +1 -0
- package/dist/node/Domain/index.d.ts +3 -0
- package/dist/node/Domain/index.d.ts.map +1 -0
- package/dist/node/DomainRegistration/DomainRegistration.d.ts +20 -0
- package/dist/node/DomainRegistration/DomainRegistration.d.ts.map +1 -0
- package/dist/node/DomainRegistration/DomainRegistrationLease.d.ts +24 -0
- package/dist/node/DomainRegistration/DomainRegistrationLease.d.ts.map +1 -0
- package/dist/node/DomainRegistration/index.d.ts +3 -0
- package/dist/node/DomainRegistration/index.d.ts.map +1 -0
- package/dist/node/Duration/Duration.d.ts +5 -0
- package/dist/node/Duration/Duration.d.ts.map +1 -0
- package/dist/node/Duration/index.d.ts +3 -0
- package/dist/node/Duration/index.d.ts.map +1 -0
- package/dist/node/Duration/validation/index.d.ts +3 -0
- package/dist/node/Duration/validation/index.d.ts.map +1 -0
- package/dist/node/Duration/validation/validateBoundWitness.d.ts +3 -0
- package/dist/node/Duration/validation/validateBoundWitness.d.ts.map +1 -0
- package/dist/node/Duration/validation/validateBoundWitnessAndDuration.d.ts +5 -0
- package/dist/node/Duration/validation/validateBoundWitnessAndDuration.d.ts.map +1 -0
- package/dist/node/Duration/validation/validateBoundWitnessWithDuration.d.ts +5 -0
- package/dist/node/Duration/validation/validateBoundWitnessWithDuration.d.ts.map +1 -0
- package/dist/node/Duration/validation/validateDuration.d.ts +4 -0
- package/dist/node/Duration/validation/validateDuration.d.ts.map +1 -0
- package/dist/node/diviner/DomainLeaseEstimateDiviner/ErrorDetails/ErrorCodes.d.ts +4 -0
- package/dist/node/diviner/DomainLeaseEstimateDiviner/ErrorDetails/ErrorCodes.d.ts.map +1 -0
- package/dist/node/diviner/DomainLeaseEstimateDiviner/ErrorDetails/Payload.d.ts +22 -0
- package/dist/node/diviner/DomainLeaseEstimateDiviner/ErrorDetails/Payload.d.ts.map +1 -0
- package/dist/node/diviner/DomainLeaseEstimateDiviner/ErrorDetails/index.d.ts +3 -0
- package/dist/node/diviner/DomainLeaseEstimateDiviner/ErrorDetails/index.d.ts.map +1 -0
- package/dist/node/diviner/DomainLeaseEstimateDiviner/Schema.d.ts +3 -0
- package/dist/node/diviner/DomainLeaseEstimateDiviner/Schema.d.ts.map +1 -0
- package/dist/node/diviner/DomainLeaseEstimateDiviner/index.d.ts +3 -0
- package/dist/node/diviner/DomainLeaseEstimateDiviner/index.d.ts.map +1 -0
- package/dist/node/diviner/index.d.ts +2 -0
- package/dist/node/diviner/index.d.ts.map +1 -0
- package/dist/node/index.d.ts +7 -125
- package/dist/node/index.d.ts.map +1 -0
- package/dist/node/index.mjs +404 -26
- package/dist/node/index.mjs.map +1 -1
- package/package.json +32 -30
- package/src/DNS/Witness/Config.ts +24 -0
- package/src/DNS/Witness/Params.ts +6 -0
- package/src/DNS/Witness/Payload/Payload.ts +4 -0
- package/src/DNS/Witness/Payload/Request.ts +40 -0
- package/src/DNS/Witness/Payload/Response.ts +29 -0
- package/src/DNS/Witness/Payload/index.ts +3 -0
- package/src/DNS/Witness/Schema.ts +2 -0
- package/src/DNS/Witness/index.ts +3 -0
- package/src/DNS/index.ts +2 -0
- package/src/DNS/types/Answer.ts +5 -0
- package/src/DNS/types/Header.ts +95 -0
- package/src/DNS/types/OperationCodes.ts +13 -0
- package/src/DNS/types/Record.ts +9 -0
- package/src/DNS/types/Request.ts +38 -0
- package/src/DNS/types/ResourceRecord.ts +229 -0
- package/src/DNS/types/Response.ts +12 -0
- package/src/DNS/types/ResponseCodes.ts +34 -0
- package/src/DNS/types/index.ts +8 -0
- package/src/Domain/Domain.ts +3 -1
- package/src/Domain/DomainLease.ts +3 -1
- package/src/DomainRegistration/DomainRegistration.ts +3 -1
- package/src/DomainRegistration/DomainRegistrationLease.ts +3 -1
- package/src/diviner/DomainLeaseEstimateDiviner/ErrorDetails/ErrorCodes.ts +27 -9
- package/src/diviner/DomainLeaseEstimateDiviner/ErrorDetails/Payload.ts +3 -1
- package/src/index.ts +1 -0
package/dist/browser/index.d.ts
CHANGED
|
@@ -1,125 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
type TopLevelDomain = 'xyo';
|
|
9
|
-
interface DomainFields {
|
|
10
|
-
domain: string;
|
|
11
|
-
tld: TopLevelDomain;
|
|
12
|
-
}
|
|
13
|
-
type Domain = Payload<DomainFields, DomainSchema>;
|
|
14
|
-
declare const isDomain: (x?: unknown | null) => x is _xyo_network_payload_model.SchemaFields & _xyo_network_payload_model.PayloadFields & DomainFields & {
|
|
15
|
-
schema: "network.xyo.ns.domain";
|
|
16
|
-
};
|
|
17
|
-
declare const isDomainWithSources: (x?: unknown | null) => x is _xyo_network_payload_model.WithSources<_xyo_network_payload_model.SchemaFields & _xyo_network_payload_model.PayloadFields & DomainFields & {
|
|
18
|
-
schema: "network.xyo.ns.domain";
|
|
19
|
-
}>;
|
|
20
|
-
declare const isDomainWithMeta: (x?: unknown | null) => x is _xyo_network_payload_model.WithMeta<_xyo_network_payload_model.SchemaFields & _xyo_network_payload_model.PayloadFields & DomainFields & {
|
|
21
|
-
schema: "network.xyo.ns.domain";
|
|
22
|
-
}, void>;
|
|
23
|
-
|
|
24
|
-
interface DurationFields {
|
|
25
|
-
exp: number;
|
|
26
|
-
nbf: number;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
declare const validateBoundWitnessWithDuration: (recordBw: BoundWitness, recordPayload: Payload<DurationFields>) => Promise<boolean>;
|
|
30
|
-
|
|
31
|
-
declare const validateDuration: (recordPayload: Payload<DurationFields>) => boolean;
|
|
32
|
-
|
|
33
|
-
type DomainLeaseSchema = 'network.xyo.ns.domain.lease';
|
|
34
|
-
declare const DomainLeaseSchema: DomainLeaseSchema;
|
|
35
|
-
interface DomainLeaseFields extends DomainFields, DurationFields {
|
|
36
|
-
}
|
|
37
|
-
type DomainLease = Payload<DomainLeaseFields, DomainLeaseSchema>;
|
|
38
|
-
declare const isDomainLease: (x?: unknown | null) => x is _xyo_network_payload_model.SchemaFields & _xyo_network_payload_model.PayloadFields & DomainLeaseFields & {
|
|
39
|
-
schema: "network.xyo.ns.domain.lease";
|
|
40
|
-
};
|
|
41
|
-
declare const isDomainLeaseWithSources: (x?: unknown | null) => x is _xyo_network_payload_model.WithSources<_xyo_network_payload_model.SchemaFields & _xyo_network_payload_model.PayloadFields & DomainLeaseFields & {
|
|
42
|
-
schema: "network.xyo.ns.domain.lease";
|
|
43
|
-
}>;
|
|
44
|
-
declare const isDomainLeaseWithMeta: (x?: unknown | null) => x is _xyo_network_payload_model.WithMeta<_xyo_network_payload_model.SchemaFields & _xyo_network_payload_model.PayloadFields & DomainLeaseFields & {
|
|
45
|
-
schema: "network.xyo.ns.domain.lease";
|
|
46
|
-
}>;
|
|
47
|
-
|
|
48
|
-
type AddressRecordSchema = 'network.xyo.ns.record.address';
|
|
49
|
-
declare const AddressRecordSchema: AddressRecordSchema;
|
|
50
|
-
interface AddressRecordFields extends DomainFields {
|
|
51
|
-
address: Address[];
|
|
52
|
-
}
|
|
53
|
-
type AddressRecord = Payload<AddressRecordFields, AddressRecordSchema>;
|
|
54
|
-
declare const isAddressRecord: (x?: unknown | null) => x is _xyo_network_payload_model.SchemaFields & _xyo_network_payload_model.PayloadFields & AddressRecordFields & {
|
|
55
|
-
schema: "network.xyo.ns.record.address";
|
|
56
|
-
};
|
|
57
|
-
declare const isAddressRecordWithMeta: (x?: unknown | null) => x is WithMeta<_xyo_network_payload_model.SchemaFields & _xyo_network_payload_model.PayloadFields & AddressRecordFields & {
|
|
58
|
-
schema: "network.xyo.ns.record.address";
|
|
59
|
-
}>;
|
|
60
|
-
|
|
61
|
-
declare const DomainLeaseEstimateDivinerValidationErrorDetailsSchema: "network.xyo.diviner.ns.domain.registration.lease.estimate.validation.error.details";
|
|
62
|
-
type DomainLeaseEstimateDivinerValidationErrorDetailsSchema = typeof DomainLeaseEstimateDivinerValidationErrorDetailsSchema;
|
|
63
|
-
|
|
64
|
-
interface ErrorDetails<TErrorCode extends string | undefined = string | undefined> {
|
|
65
|
-
[key: string]: any;
|
|
66
|
-
code: TErrorCode;
|
|
67
|
-
detail?: string;
|
|
68
|
-
title?: string;
|
|
69
|
-
}
|
|
70
|
-
type ErrorDetailsDictionary<T extends number = number> = {
|
|
71
|
-
readonly [K in T]: ErrorDetails<`${K}`>;
|
|
72
|
-
};
|
|
73
|
-
type DomainLeaseEstimateDivinerValidationErrorDetails<TErrorCode extends string | undefined = string> = Payload<ErrorDetails<TErrorCode>, DomainLeaseEstimateDivinerValidationErrorDetailsSchema>;
|
|
74
|
-
declare const isDomainLeaseEstimateDivinerValidationErrorDetails: (x?: unknown | null) => x is _xyo_network_payload_model.SchemaFields & _xyo_network_payload_model.PayloadFields & ErrorDetails<string> & {
|
|
75
|
-
schema: "network.xyo.diviner.ns.domain.registration.lease.estimate.validation.error.details";
|
|
76
|
-
};
|
|
77
|
-
declare const isDomainLeaseEstimateDivinerValidationErrorDetailsWithSources: (x?: unknown | null) => x is _xyo_network_payload_model.WithSources<_xyo_network_payload_model.SchemaFields & _xyo_network_payload_model.PayloadFields & ErrorDetails<string> & {
|
|
78
|
-
schema: "network.xyo.diviner.ns.domain.registration.lease.estimate.validation.error.details";
|
|
79
|
-
}>;
|
|
80
|
-
declare const isDomainLeaseEstimateDivinerValidationErrorDetailsWithMeta: (x?: unknown | null) => x is _xyo_network_payload_model.WithMeta<_xyo_network_payload_model.SchemaFields & _xyo_network_payload_model.PayloadFields & ErrorDetails<string> & {
|
|
81
|
-
schema: "network.xyo.diviner.ns.domain.registration.lease.estimate.validation.error.details";
|
|
82
|
-
}>;
|
|
83
|
-
|
|
84
|
-
type DomainLeaseEstimateDivinerErrorDetailsDictionaryErrorCode = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8;
|
|
85
|
-
declare const DomainLeaseEstimateDivinerErrorDetailsDictionary: Readonly<Readonly<Record<DomainLeaseEstimateDivinerErrorDetailsDictionaryErrorCode, DomainLeaseEstimateDivinerValidationErrorDetails>> & ErrorDetailsDictionary>;
|
|
86
|
-
|
|
87
|
-
declare const DomainRegistrationSchema: "network.xyo.ns.domain.registration";
|
|
88
|
-
type DomainRegistrationSchema = typeof DomainRegistrationSchema;
|
|
89
|
-
interface DomainRegistrationFields extends DomainFields {
|
|
90
|
-
registrant: Address[];
|
|
91
|
-
registrar: Address[];
|
|
92
|
-
}
|
|
93
|
-
type DomainRegistration = Payload<DomainRegistrationFields, DomainRegistrationSchema>;
|
|
94
|
-
declare const isDomainRegistration: (x?: unknown | null) => x is _xyo_network_payload_model.SchemaFields & _xyo_network_payload_model.PayloadFields & DomainRegistrationFields & {
|
|
95
|
-
schema: "network.xyo.ns.domain.registration";
|
|
96
|
-
};
|
|
97
|
-
declare const isDomainRegistrationWithSources: (x?: unknown | null) => x is _xyo_network_payload_model.WithSources<_xyo_network_payload_model.SchemaFields & _xyo_network_payload_model.PayloadFields & DomainRegistrationFields & {
|
|
98
|
-
schema: "network.xyo.ns.domain.registration";
|
|
99
|
-
}>;
|
|
100
|
-
declare const isDomainRegistrationWithMeta: (x?: unknown | null) => x is _xyo_network_payload_model.WithMeta<_xyo_network_payload_model.SchemaFields & _xyo_network_payload_model.PayloadFields & DomainRegistrationFields & {
|
|
101
|
-
schema: "network.xyo.ns.domain.registration";
|
|
102
|
-
}>;
|
|
103
|
-
|
|
104
|
-
declare const DomainRegistrationLeaseSchema: "network.xyo.ns.domain.registration.lease";
|
|
105
|
-
type DomainRegistrationLeaseSchema = typeof DomainRegistrationLeaseSchema;
|
|
106
|
-
interface DomainRegistrationLeaseFields extends DomainRegistrationFields, DurationFields {
|
|
107
|
-
}
|
|
108
|
-
type DomainRegistrationLease = Payload<DomainRegistrationLeaseFields, DomainRegistrationLeaseSchema>;
|
|
109
|
-
declare const isDomainRegistrationLease: (x?: unknown | null) => x is _xyo_network_payload_model.SchemaFields & _xyo_network_payload_model.PayloadFields & DomainRegistrationLeaseFields & {
|
|
110
|
-
schema: "network.xyo.ns.domain.registration.lease";
|
|
111
|
-
};
|
|
112
|
-
declare const isDomainRegistrationLeaseWithSources: (x?: unknown | null) => x is _xyo_network_payload_model.WithSources<_xyo_network_payload_model.SchemaFields & _xyo_network_payload_model.PayloadFields & DomainRegistrationLeaseFields & {
|
|
113
|
-
schema: "network.xyo.ns.domain.registration.lease";
|
|
114
|
-
}>;
|
|
115
|
-
declare const isDomainRegistrationLeaseSources: (x?: unknown | null) => x is _xyo_network_payload_model.WithSources<_xyo_network_payload_model.SchemaFields & _xyo_network_payload_model.PayloadFields & DomainRegistrationLeaseFields & {
|
|
116
|
-
schema: "network.xyo.ns.domain.registration.lease";
|
|
117
|
-
}>;
|
|
118
|
-
declare const isDomainRegistrationLeaseWithMeta: (x?: unknown | null) => x is _xyo_network_payload_model.WithMeta<_xyo_network_payload_model.SchemaFields & _xyo_network_payload_model.PayloadFields & DomainRegistrationLeaseFields & {
|
|
119
|
-
schema: "network.xyo.ns.domain.registration.lease";
|
|
120
|
-
}>;
|
|
121
|
-
declare const isDomainRegistrationLeaseMeta: (x?: unknown | null) => x is _xyo_network_payload_model.WithMeta<_xyo_network_payload_model.SchemaFields & _xyo_network_payload_model.PayloadFields & DomainRegistrationLeaseFields & {
|
|
122
|
-
schema: "network.xyo.ns.domain.registration.lease";
|
|
123
|
-
}>;
|
|
124
|
-
|
|
125
|
-
export { type AddressRecord, type AddressRecordFields, AddressRecordSchema, type Domain, type DomainFields, type DomainLease, DomainLeaseEstimateDivinerErrorDetailsDictionary, type DomainLeaseEstimateDivinerErrorDetailsDictionaryErrorCode, type DomainLeaseEstimateDivinerValidationErrorDetails, DomainLeaseEstimateDivinerValidationErrorDetailsSchema, type DomainLeaseFields, DomainLeaseSchema, type DomainRegistration, type DomainRegistrationFields, type DomainRegistrationLease, type DomainRegistrationLeaseFields, DomainRegistrationLeaseSchema, DomainRegistrationSchema, DomainSchema, type DurationFields, type ErrorDetails, type ErrorDetailsDictionary, type TopLevelDomain, isAddressRecord, isAddressRecordWithMeta, isDomain, isDomainLease, isDomainLeaseEstimateDivinerValidationErrorDetails, isDomainLeaseEstimateDivinerValidationErrorDetailsWithMeta, isDomainLeaseEstimateDivinerValidationErrorDetailsWithSources, isDomainLeaseWithMeta, isDomainLeaseWithSources, isDomainRegistration, isDomainRegistrationLease, isDomainRegistrationLeaseMeta, isDomainRegistrationLeaseSources, isDomainRegistrationLeaseWithMeta, isDomainRegistrationLeaseWithSources, isDomainRegistrationWithMeta, isDomainRegistrationWithSources, isDomainWithMeta, isDomainWithSources, validateBoundWitnessWithDuration, validateDuration };
|
|
1
|
+
export * from './Address/index.ts';
|
|
2
|
+
export * from './diviner/index.ts';
|
|
3
|
+
export * from './DNS/index.ts';
|
|
4
|
+
export * from './Domain/index.ts';
|
|
5
|
+
export * from './DomainRegistration/index.ts';
|
|
6
|
+
export * from './Duration/index.ts';
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAA;AAClC,cAAc,oBAAoB,CAAA;AAClC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,mBAAmB,CAAA;AACjC,cAAc,+BAA+B,CAAA;AAC7C,cAAc,qBAAqB,CAAA"}
|
package/dist/browser/index.mjs
CHANGED
|
@@ -9,53 +9,415 @@ var DomainLeaseEstimateDivinerValidationErrorDetailsSchema = "network.xyo.divine
|
|
|
9
9
|
|
|
10
10
|
// src/diviner/DomainLeaseEstimateDiviner/ErrorDetails/ErrorCodes.ts
|
|
11
11
|
var DomainLeaseEstimateDivinerErrorDetailsDictionary = {
|
|
12
|
-
0: {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
12
|
+
0: {
|
|
13
|
+
code: "0",
|
|
14
|
+
schema: DomainLeaseEstimateDivinerValidationErrorDetailsSchema,
|
|
15
|
+
title: "Success"
|
|
16
|
+
},
|
|
17
|
+
1: {
|
|
18
|
+
code: "1",
|
|
19
|
+
schema: DomainLeaseEstimateDivinerValidationErrorDetailsSchema,
|
|
20
|
+
title: "Invalid casing"
|
|
21
|
+
},
|
|
22
|
+
2: {
|
|
23
|
+
code: "2",
|
|
24
|
+
schema: DomainLeaseEstimateDivinerValidationErrorDetailsSchema,
|
|
25
|
+
title: "Invalid coin signature"
|
|
26
|
+
},
|
|
27
|
+
3: {
|
|
28
|
+
code: "3",
|
|
29
|
+
schema: DomainLeaseEstimateDivinerValidationErrorDetailsSchema,
|
|
30
|
+
title: "Invalid length"
|
|
31
|
+
},
|
|
32
|
+
4: {
|
|
33
|
+
code: "4",
|
|
34
|
+
schema: DomainLeaseEstimateDivinerValidationErrorDetailsSchema,
|
|
35
|
+
title: "Invalid name"
|
|
36
|
+
},
|
|
37
|
+
5: {
|
|
38
|
+
code: "5",
|
|
39
|
+
schema: DomainLeaseEstimateDivinerValidationErrorDetailsSchema,
|
|
40
|
+
title: "Reserved fragment"
|
|
41
|
+
},
|
|
42
|
+
6: {
|
|
43
|
+
code: "6",
|
|
44
|
+
schema: DomainLeaseEstimateDivinerValidationErrorDetailsSchema,
|
|
45
|
+
title: "Reserved name"
|
|
46
|
+
},
|
|
47
|
+
7: {
|
|
48
|
+
code: "7",
|
|
49
|
+
schema: DomainLeaseEstimateDivinerValidationErrorDetailsSchema,
|
|
50
|
+
title: "Reserved string"
|
|
51
|
+
},
|
|
52
|
+
8: {
|
|
53
|
+
code: "8",
|
|
54
|
+
schema: DomainLeaseEstimateDivinerValidationErrorDetailsSchema,
|
|
55
|
+
title: "Invalid TLD"
|
|
56
|
+
}
|
|
21
57
|
};
|
|
22
58
|
|
|
23
59
|
// src/diviner/DomainLeaseEstimateDiviner/ErrorDetails/Payload.ts
|
|
24
|
-
import {
|
|
60
|
+
import {
|
|
61
|
+
isPayloadOfSchemaType as isPayloadOfSchemaType2,
|
|
62
|
+
isPayloadOfSchemaTypeWithMeta,
|
|
63
|
+
isPayloadOfSchemaTypeWithSources
|
|
64
|
+
} from "@xyo-network/payload-model";
|
|
25
65
|
var isDomainLeaseEstimateDivinerValidationErrorDetails = isPayloadOfSchemaType2(
|
|
26
66
|
DomainLeaseEstimateDivinerValidationErrorDetailsSchema
|
|
27
67
|
);
|
|
28
68
|
var isDomainLeaseEstimateDivinerValidationErrorDetailsWithSources = isPayloadOfSchemaTypeWithSources(DomainLeaseEstimateDivinerValidationErrorDetailsSchema);
|
|
29
69
|
var isDomainLeaseEstimateDivinerValidationErrorDetailsWithMeta = isPayloadOfSchemaTypeWithMeta(DomainLeaseEstimateDivinerValidationErrorDetailsSchema);
|
|
30
70
|
|
|
71
|
+
// src/DNS/types/OperationCodes.ts
|
|
72
|
+
var DNSQueryOpcodes = {
|
|
73
|
+
QUERY: 0,
|
|
74
|
+
IQUERY: 1,
|
|
75
|
+
STATUS: 2,
|
|
76
|
+
NOTIFY: 4,
|
|
77
|
+
UPDATE: 5,
|
|
78
|
+
DSO: 6
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
// src/DNS/types/ResponseCodes.ts
|
|
82
|
+
var DNSRcodes = {
|
|
83
|
+
NOERROR: 0,
|
|
84
|
+
FORMERR: 1,
|
|
85
|
+
SERVFAIL: 2,
|
|
86
|
+
NXDOMAIN: 3,
|
|
87
|
+
NOTIMP: 4,
|
|
88
|
+
REFUSED: 5,
|
|
89
|
+
YXDOMAIN: 6,
|
|
90
|
+
YXRRSET: 7,
|
|
91
|
+
NXRRSET: 8,
|
|
92
|
+
NOTAUTH: 9,
|
|
93
|
+
NOTZONE: 10,
|
|
94
|
+
BADSIG: 16,
|
|
95
|
+
BADKEY: 17,
|
|
96
|
+
BADTIME: 18
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
// src/DNS/types/Header.ts
|
|
100
|
+
var StandardRequestHeader = {
|
|
101
|
+
ID: 0,
|
|
102
|
+
QR: 0,
|
|
103
|
+
// Query/Response Flag (0 = Query)
|
|
104
|
+
Opcode: DNSQueryOpcodes.QUERY,
|
|
105
|
+
// Operation Code (0 for standard query)
|
|
106
|
+
AA: 0,
|
|
107
|
+
// Authoritative Answer (0 in query)
|
|
108
|
+
TC: 0,
|
|
109
|
+
// Truncation (0 for non-truncated)
|
|
110
|
+
RD: 1,
|
|
111
|
+
// Recursion Desired (1 if recursion is requested)
|
|
112
|
+
RCODE: DNSRcodes.NOERROR,
|
|
113
|
+
// Response Code (always 0 in query)
|
|
114
|
+
QDCOUNT: 1,
|
|
115
|
+
ANCOUNT: 0,
|
|
116
|
+
NSCOUNT: 0,
|
|
117
|
+
ARCOUNT: 0
|
|
118
|
+
};
|
|
119
|
+
|
|
120
|
+
// src/DNS/types/ResourceRecord.ts
|
|
121
|
+
var DNSResourceRecordTypes = {
|
|
122
|
+
"A": 1,
|
|
123
|
+
// a host address
|
|
124
|
+
"NS": 2,
|
|
125
|
+
// an authoritative name server
|
|
126
|
+
"MD": 3,
|
|
127
|
+
// a mail destination (OBSOLETE - use MX)
|
|
128
|
+
"MF": 4,
|
|
129
|
+
// a mail forwarder (OBSOLETE - use MX)
|
|
130
|
+
"CNAME": 5,
|
|
131
|
+
// the canonical name for an alias
|
|
132
|
+
"SOA": 6,
|
|
133
|
+
// marks the start of a zone of authority
|
|
134
|
+
"MB": 7,
|
|
135
|
+
// a mailbox domain name (EXPERIMENTAL)
|
|
136
|
+
"MG": 8,
|
|
137
|
+
// a mail group member (EXPERIMENTAL)
|
|
138
|
+
"MR": 9,
|
|
139
|
+
// a mail rename domain name (EXPERIMENTAL)
|
|
140
|
+
"NULL": 10,
|
|
141
|
+
// a null RR (EXPERIMENTAL)
|
|
142
|
+
"WKS": 11,
|
|
143
|
+
// a well known service description
|
|
144
|
+
"PTR": 12,
|
|
145
|
+
// a domain name pointer
|
|
146
|
+
"HINFO": 13,
|
|
147
|
+
// host information
|
|
148
|
+
"MINFO": 14,
|
|
149
|
+
// mailbox or mail list information
|
|
150
|
+
"MX": 15,
|
|
151
|
+
// mail exchange
|
|
152
|
+
"TXT": 16,
|
|
153
|
+
// text strings
|
|
154
|
+
"RP": 17,
|
|
155
|
+
// for Responsible Person
|
|
156
|
+
"AFSDB": 18,
|
|
157
|
+
// for AFS Data Base location
|
|
158
|
+
"X25": 19,
|
|
159
|
+
// for X.25 PSDN address
|
|
160
|
+
"ISDN": 20,
|
|
161
|
+
// for ISDN address
|
|
162
|
+
"RT": 21,
|
|
163
|
+
// for Route Through
|
|
164
|
+
"NSAP": 22,
|
|
165
|
+
// for NSAP address, NSAP style A record (DEPRECATED)
|
|
166
|
+
"NSAP-PTR": 23,
|
|
167
|
+
// for domain name pointer, NSAP style (DEPRECATED)
|
|
168
|
+
"SIG": 24,
|
|
169
|
+
// for security signature
|
|
170
|
+
"KEY": 25,
|
|
171
|
+
// for security key
|
|
172
|
+
"PX": 26,
|
|
173
|
+
// X.400 mail mapping information
|
|
174
|
+
"GPOS": 27,
|
|
175
|
+
// Geographical Position
|
|
176
|
+
"AAAA": 28,
|
|
177
|
+
// IP6 Address
|
|
178
|
+
"LOC": 29,
|
|
179
|
+
// Location Information
|
|
180
|
+
"NXT": 30,
|
|
181
|
+
// Next Domain (OBSOLETE)
|
|
182
|
+
"EID": 31,
|
|
183
|
+
// Endpoint Identifier
|
|
184
|
+
"NIMLOC": 32,
|
|
185
|
+
// Nimrod Locator
|
|
186
|
+
"SRV": 33,
|
|
187
|
+
// Server Selection
|
|
188
|
+
"ATMA": 34,
|
|
189
|
+
// ATM Address
|
|
190
|
+
"NAPTR": 35,
|
|
191
|
+
// Naming Authority Pointer
|
|
192
|
+
"KX": 36,
|
|
193
|
+
// Key Exchanger
|
|
194
|
+
"CERT": 37,
|
|
195
|
+
// CERT
|
|
196
|
+
"A6": 38,
|
|
197
|
+
// A6 (OBSOLETE - use AAAA)
|
|
198
|
+
"DNAME": 39,
|
|
199
|
+
// DNAME
|
|
200
|
+
"SINK": 40,
|
|
201
|
+
// SINK
|
|
202
|
+
"OPT": 41,
|
|
203
|
+
// OPT
|
|
204
|
+
"APL": 42,
|
|
205
|
+
// APL
|
|
206
|
+
"DS": 43,
|
|
207
|
+
// Delegation Signer
|
|
208
|
+
"SSHFP": 44,
|
|
209
|
+
// SSH Key Fingerprint
|
|
210
|
+
"IPSECKEY": 45,
|
|
211
|
+
// IPSECKEY
|
|
212
|
+
"RRSIG": 46,
|
|
213
|
+
// RRSIG
|
|
214
|
+
"NSEC": 47,
|
|
215
|
+
// NSEC
|
|
216
|
+
"DNSKEY": 48,
|
|
217
|
+
// DNSKEY
|
|
218
|
+
"DHCID": 49,
|
|
219
|
+
// DHCID
|
|
220
|
+
"NSEC3": 50,
|
|
221
|
+
// NSEC3
|
|
222
|
+
"NSEC3PARAM": 51,
|
|
223
|
+
// NSEC3PARAM
|
|
224
|
+
"TLSA": 52,
|
|
225
|
+
// TLSA
|
|
226
|
+
"SMIMEA": 53,
|
|
227
|
+
// S/MIME cert association
|
|
228
|
+
"HIP": 55,
|
|
229
|
+
// Host Identity Protocol
|
|
230
|
+
"NINFO": 56,
|
|
231
|
+
// NINFO
|
|
232
|
+
"RKEY": 57,
|
|
233
|
+
// RKEY
|
|
234
|
+
"TALINK": 58,
|
|
235
|
+
// Trust Anchor LINK
|
|
236
|
+
"CDS": 59,
|
|
237
|
+
// Child DS
|
|
238
|
+
"CDNSKEY": 60,
|
|
239
|
+
// DNSKEY(s) the Child wants reflected in DS
|
|
240
|
+
"OPENPGPKEY": 61,
|
|
241
|
+
// OpenPGP Key
|
|
242
|
+
"CSYNC": 62,
|
|
243
|
+
// Child-To-Parent Synchronization
|
|
244
|
+
"ZONEMD": 63,
|
|
245
|
+
// Message Digest Over Zone Data
|
|
246
|
+
"SVCB": 64,
|
|
247
|
+
// General-purpose service binding
|
|
248
|
+
"HTTPS": 65,
|
|
249
|
+
// SVCB-compatible type for use with HTTP
|
|
250
|
+
"SPF": 99,
|
|
251
|
+
"UINFO": 100,
|
|
252
|
+
"UID": 101,
|
|
253
|
+
"GID": 102,
|
|
254
|
+
"UNSPEC": 103,
|
|
255
|
+
"NID": 104,
|
|
256
|
+
"L32": 105,
|
|
257
|
+
"L64": 106,
|
|
258
|
+
"LP": 107,
|
|
259
|
+
"EUI48": 108,
|
|
260
|
+
// an EUI-48 address
|
|
261
|
+
"EUI64": 109,
|
|
262
|
+
// an EUI-64 address
|
|
263
|
+
"NXNAME": 128,
|
|
264
|
+
// NXDOMAIN indicator for Compact Denial of Existence
|
|
265
|
+
"TKEY": 249,
|
|
266
|
+
// Transaction Key
|
|
267
|
+
"TSIG": 250,
|
|
268
|
+
// Transaction Signature
|
|
269
|
+
"IXFR": 251,
|
|
270
|
+
// incremental transfer
|
|
271
|
+
"AXFR": 252,
|
|
272
|
+
// transfer of an entire zone
|
|
273
|
+
"MAILB": 253,
|
|
274
|
+
// mailbox-related RRs (MB, MG or MR)
|
|
275
|
+
"MAILA": 254,
|
|
276
|
+
// mail agent RRs (OBSOLETE - see MX)
|
|
277
|
+
"*": 255,
|
|
278
|
+
// A request for some or all records the server has available
|
|
279
|
+
"URI": 256,
|
|
280
|
+
// URI
|
|
281
|
+
"CAA": 257,
|
|
282
|
+
// Certification Authority Restriction
|
|
283
|
+
"AVC": 258,
|
|
284
|
+
// Application Visibility and Control
|
|
285
|
+
"DOA": 259,
|
|
286
|
+
// Digital Object Architecture
|
|
287
|
+
"AMTRELAY": 260,
|
|
288
|
+
// Automatic Multicast Tunneling Relay
|
|
289
|
+
"RESINFO": 261,
|
|
290
|
+
// Resolver Information as Key/Value Pairs
|
|
291
|
+
"WALLET": 262,
|
|
292
|
+
// Public wallet address
|
|
293
|
+
"CLA": 263,
|
|
294
|
+
// BP Convergence Layer Adapter
|
|
295
|
+
"IPN": 264,
|
|
296
|
+
// BP Node Number
|
|
297
|
+
"TA": 32768,
|
|
298
|
+
// DNSSEC Trust Authorities
|
|
299
|
+
"DLV": 32769,
|
|
300
|
+
// DNSSEC Lookaside Validation (OBSOLETE)
|
|
301
|
+
// NOTE: Custom types here chosen within the Private Use Range
|
|
302
|
+
// https://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml#dns-parameters-4
|
|
303
|
+
// https://www.rfc-editor.org/rfc/rfc5226
|
|
304
|
+
// as, per the RFC, the Private Use Range is reserved
|
|
305
|
+
// "For private or local use only, with the type and
|
|
306
|
+
// purpose defined by the local site. No attempt is made to
|
|
307
|
+
// prevent multiple sites from using the same value in
|
|
308
|
+
// different (and incompatible) ways. There is no need for
|
|
309
|
+
// IANA to review such assignments (since IANA does not record
|
|
310
|
+
// them) and assignments are not generally useful for broad
|
|
311
|
+
// interoperability. It is the responsibility of the sites
|
|
312
|
+
// making use of the Private Use range to ensure that no
|
|
313
|
+
// conflicts occur (within the intended scope of use)."
|
|
314
|
+
// If we want to apply for a custom reserved code later
|
|
315
|
+
// on, once the usage is proven enough we can absolutely
|
|
316
|
+
// do that.
|
|
317
|
+
"XYOA": 65432,
|
|
318
|
+
// XYO Address
|
|
319
|
+
"XYOH": 65433
|
|
320
|
+
// XYO Hash
|
|
321
|
+
};
|
|
322
|
+
var findDNSResourceRecordTypesByValue = (value) => {
|
|
323
|
+
for (const key in DNSResourceRecordTypes) {
|
|
324
|
+
const resourceRecordType = key;
|
|
325
|
+
if (DNSResourceRecordTypes[resourceRecordType] === value) {
|
|
326
|
+
return resourceRecordType;
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
return void 0;
|
|
330
|
+
};
|
|
331
|
+
|
|
332
|
+
// src/DNS/types/Request.ts
|
|
333
|
+
var getRequestFor = (domain, type = DNSResourceRecordTypes.A) => {
|
|
334
|
+
return {
|
|
335
|
+
...StandardRequestHeader,
|
|
336
|
+
ID: getRandomId(),
|
|
337
|
+
Question: [{
|
|
338
|
+
name: domain,
|
|
339
|
+
type,
|
|
340
|
+
class: 1
|
|
341
|
+
}]
|
|
342
|
+
};
|
|
343
|
+
};
|
|
344
|
+
var getRandomId = () => {
|
|
345
|
+
return Math.floor(Math.random() * 65536);
|
|
346
|
+
};
|
|
347
|
+
|
|
348
|
+
// src/DNS/Witness/Schema.ts
|
|
349
|
+
var DNSSchema = "network.xyo.dns";
|
|
350
|
+
|
|
351
|
+
// src/DNS/Witness/Config.ts
|
|
352
|
+
var DNSWitnessConfigSchema = `${DNSSchema}.witness.config`;
|
|
353
|
+
|
|
354
|
+
// src/DNS/Witness/Payload/Request.ts
|
|
355
|
+
import {
|
|
356
|
+
isPayloadOfSchemaType as isPayloadOfSchemaType3,
|
|
357
|
+
isPayloadOfSchemaTypeWithMeta as isPayloadOfSchemaTypeWithMeta2,
|
|
358
|
+
isPayloadOfSchemaTypeWithSources as isPayloadOfSchemaTypeWithSources2
|
|
359
|
+
} from "@xyo-network/payload-model";
|
|
360
|
+
var isDNSRequest = isPayloadOfSchemaType3(DNSSchema);
|
|
361
|
+
var isDNSRequestWithSources = isPayloadOfSchemaTypeWithSources2(DNSSchema);
|
|
362
|
+
var isDNSRequestWithMeta = isPayloadOfSchemaTypeWithMeta2(DNSSchema);
|
|
363
|
+
var getDnsRequestFor = (domain, type = DNSResourceRecordTypes.A) => {
|
|
364
|
+
return { ...getRequestFor(domain, type), schema: DNSSchema };
|
|
365
|
+
};
|
|
366
|
+
|
|
367
|
+
// src/DNS/Witness/Payload/Response.ts
|
|
368
|
+
import {
|
|
369
|
+
isPayloadOfSchemaType as isPayloadOfSchemaType4,
|
|
370
|
+
isPayloadOfSchemaTypeWithMeta as isPayloadOfSchemaTypeWithMeta3,
|
|
371
|
+
isPayloadOfSchemaTypeWithSources as isPayloadOfSchemaTypeWithSources3
|
|
372
|
+
} from "@xyo-network/payload-model";
|
|
373
|
+
var isDNSResponse = isPayloadOfSchemaType4(DNSSchema);
|
|
374
|
+
var isDNSResponseWithSources = isPayloadOfSchemaTypeWithSources3(DNSSchema);
|
|
375
|
+
var isDNSResponseWithMeta = isPayloadOfSchemaTypeWithMeta3(DNSSchema);
|
|
376
|
+
|
|
31
377
|
// src/Domain/Domain.ts
|
|
32
|
-
import {
|
|
378
|
+
import {
|
|
379
|
+
isPayloadOfSchemaType as isPayloadOfSchemaType5,
|
|
380
|
+
isPayloadOfSchemaTypeWithMeta as isPayloadOfSchemaTypeWithMeta4,
|
|
381
|
+
isPayloadOfSchemaTypeWithSources as isPayloadOfSchemaTypeWithSources4
|
|
382
|
+
} from "@xyo-network/payload-model";
|
|
33
383
|
var DomainSchema = "network.xyo.ns.domain";
|
|
34
|
-
var isDomain =
|
|
35
|
-
var isDomainWithSources =
|
|
36
|
-
var isDomainWithMeta =
|
|
384
|
+
var isDomain = isPayloadOfSchemaType5(DomainSchema);
|
|
385
|
+
var isDomainWithSources = isPayloadOfSchemaTypeWithSources4(DomainSchema);
|
|
386
|
+
var isDomainWithMeta = isPayloadOfSchemaTypeWithMeta4(DomainSchema);
|
|
37
387
|
|
|
38
388
|
// src/Domain/DomainLease.ts
|
|
39
|
-
import {
|
|
389
|
+
import {
|
|
390
|
+
isPayloadOfSchemaType as isPayloadOfSchemaType6,
|
|
391
|
+
isPayloadOfSchemaTypeWithMeta as isPayloadOfSchemaTypeWithMeta5,
|
|
392
|
+
isPayloadOfSchemaTypeWithSources as isPayloadOfSchemaTypeWithSources5
|
|
393
|
+
} from "@xyo-network/payload-model";
|
|
40
394
|
var DomainLeaseSchema = "network.xyo.ns.domain.lease";
|
|
41
|
-
var isDomainLease =
|
|
42
|
-
var isDomainLeaseWithSources =
|
|
43
|
-
var isDomainLeaseWithMeta =
|
|
395
|
+
var isDomainLease = isPayloadOfSchemaType6(DomainLeaseSchema);
|
|
396
|
+
var isDomainLeaseWithSources = isPayloadOfSchemaTypeWithSources5(DomainLeaseSchema);
|
|
397
|
+
var isDomainLeaseWithMeta = isPayloadOfSchemaTypeWithMeta5(DomainLeaseSchema);
|
|
44
398
|
|
|
45
399
|
// src/DomainRegistration/DomainRegistration.ts
|
|
46
|
-
import {
|
|
400
|
+
import {
|
|
401
|
+
isPayloadOfSchemaType as isPayloadOfSchemaType7,
|
|
402
|
+
isPayloadOfSchemaTypeWithMeta as isPayloadOfSchemaTypeWithMeta6,
|
|
403
|
+
isPayloadOfSchemaTypeWithSources as isPayloadOfSchemaTypeWithSources6
|
|
404
|
+
} from "@xyo-network/payload-model";
|
|
47
405
|
var DomainRegistrationSchema = `${DomainSchema}.registration`;
|
|
48
|
-
var isDomainRegistration =
|
|
49
|
-
var isDomainRegistrationWithSources =
|
|
50
|
-
var isDomainRegistrationWithMeta =
|
|
406
|
+
var isDomainRegistration = isPayloadOfSchemaType7(DomainRegistrationSchema);
|
|
407
|
+
var isDomainRegistrationWithSources = isPayloadOfSchemaTypeWithSources6(DomainRegistrationSchema);
|
|
408
|
+
var isDomainRegistrationWithMeta = isPayloadOfSchemaTypeWithMeta6(DomainRegistrationSchema);
|
|
51
409
|
|
|
52
410
|
// src/DomainRegistration/DomainRegistrationLease.ts
|
|
53
|
-
import {
|
|
411
|
+
import {
|
|
412
|
+
isPayloadOfSchemaType as isPayloadOfSchemaType8,
|
|
413
|
+
isPayloadOfSchemaTypeWithMeta as isPayloadOfSchemaTypeWithMeta7,
|
|
414
|
+
isPayloadOfSchemaTypeWithSources as isPayloadOfSchemaTypeWithSources7
|
|
415
|
+
} from "@xyo-network/payload-model";
|
|
54
416
|
var DomainRegistrationLeaseSchema = `${DomainRegistrationSchema}.lease`;
|
|
55
|
-
var isDomainRegistrationLease =
|
|
56
|
-
var isDomainRegistrationLeaseWithSources =
|
|
417
|
+
var isDomainRegistrationLease = isPayloadOfSchemaType8(DomainRegistrationLeaseSchema);
|
|
418
|
+
var isDomainRegistrationLeaseWithSources = isPayloadOfSchemaTypeWithSources7(DomainRegistrationLeaseSchema);
|
|
57
419
|
var isDomainRegistrationLeaseSources = isDomainRegistrationLeaseWithSources;
|
|
58
|
-
var isDomainRegistrationLeaseWithMeta =
|
|
420
|
+
var isDomainRegistrationLeaseWithMeta = isPayloadOfSchemaTypeWithMeta7(DomainRegistrationLeaseSchema);
|
|
59
421
|
var isDomainRegistrationLeaseMeta = isDomainRegistrationLeaseWithMeta;
|
|
60
422
|
|
|
61
423
|
// src/Duration/validation/validateBoundWitness.ts
|
|
@@ -102,14 +464,30 @@ var validateBoundWitnessWithDuration = async (recordBw, recordPayload) => {
|
|
|
102
464
|
};
|
|
103
465
|
export {
|
|
104
466
|
AddressRecordSchema,
|
|
467
|
+
DNSQueryOpcodes,
|
|
468
|
+
DNSRcodes,
|
|
469
|
+
DNSResourceRecordTypes,
|
|
470
|
+
DNSSchema,
|
|
471
|
+
DNSWitnessConfigSchema,
|
|
105
472
|
DomainLeaseEstimateDivinerErrorDetailsDictionary,
|
|
106
473
|
DomainLeaseEstimateDivinerValidationErrorDetailsSchema,
|
|
107
474
|
DomainLeaseSchema,
|
|
108
475
|
DomainRegistrationLeaseSchema,
|
|
109
476
|
DomainRegistrationSchema,
|
|
110
477
|
DomainSchema,
|
|
478
|
+
StandardRequestHeader,
|
|
479
|
+
findDNSResourceRecordTypesByValue,
|
|
480
|
+
getDnsRequestFor,
|
|
481
|
+
getRandomId,
|
|
482
|
+
getRequestFor,
|
|
111
483
|
isAddressRecord,
|
|
112
484
|
isAddressRecordWithMeta,
|
|
485
|
+
isDNSRequest,
|
|
486
|
+
isDNSRequestWithMeta,
|
|
487
|
+
isDNSRequestWithSources,
|
|
488
|
+
isDNSResponse,
|
|
489
|
+
isDNSResponseWithMeta,
|
|
490
|
+
isDNSResponseWithSources,
|
|
113
491
|
isDomain,
|
|
114
492
|
isDomainLease,
|
|
115
493
|
isDomainLeaseEstimateDivinerValidationErrorDetails,
|