@xyo-network/core 2.20.45 → 2.20.46
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/cjs/BoundWitness/Builder/Builder.d.ts +22 -22
- package/dist/cjs/BoundWitness/Builder/Builder.js +67 -67
- package/dist/cjs/BoundWitness/Builder/index.d.ts +1 -1
- package/dist/cjs/BoundWitness/Builder/index.js +4 -4
- package/dist/cjs/BoundWitness/Validator/BodyValidator.d.ts +18 -18
- package/dist/cjs/BoundWitness/Validator/BodyValidator.js +90 -90
- package/dist/cjs/BoundWitness/Validator/MetaValidator.d.ts +14 -14
- package/dist/cjs/BoundWitness/Validator/MetaValidator.js +69 -69
- package/dist/cjs/BoundWitness/Validator/Validator.d.ts +12 -12
- package/dist/cjs/BoundWitness/Validator/Validator.js +45 -45
- package/dist/cjs/BoundWitness/Validator/index.d.ts +3 -3
- package/dist/cjs/BoundWitness/Validator/index.js +6 -6
- package/dist/cjs/BoundWitness/Validator/ip-regex.d.ts +9 -9
- package/dist/cjs/BoundWitness/Validator/ip-regex.js +19 -19
- package/dist/cjs/BoundWitness/Validator/is-ip.d.ts +4 -4
- package/dist/cjs/BoundWitness/Validator/is-ip.js +20 -20
- package/dist/cjs/BoundWitness/Wrapper/Wrapper.d.ts +13 -13
- package/dist/cjs/BoundWitness/Wrapper/Wrapper.js +29 -29
- package/dist/cjs/BoundWitness/Wrapper/index.d.ts +1 -1
- package/dist/cjs/BoundWitness/Wrapper/index.js +4 -4
- package/dist/cjs/BoundWitness/index.d.ts +4 -4
- package/dist/cjs/BoundWitness/index.js +7 -7
- package/dist/cjs/BoundWitness/models/Body/XyoBoundWitnessBody.d.ts +11 -11
- package/dist/cjs/BoundWitness/models/Body/XyoBoundWitnessBody.js +2 -2
- package/dist/cjs/BoundWitness/models/Body/XyoBoundWitnessBodySchema.d.ts +37 -37
- package/dist/cjs/BoundWitness/models/Body/XyoBoundWitnessBodySchema.js +19 -19
- package/dist/cjs/BoundWitness/models/Body/index.d.ts +2 -2
- package/dist/cjs/BoundWitness/models/Body/index.js +5 -5
- package/dist/cjs/BoundWitness/models/Meta/XyoBoundWitnessMeta.d.ts +13 -13
- package/dist/cjs/BoundWitness/models/Meta/XyoBoundWitnessMeta.js +2 -2
- package/dist/cjs/BoundWitness/models/Meta/XyoBoundWitnessMetaSchema.d.ts +85 -85
- package/dist/cjs/BoundWitness/models/Meta/XyoBoundWitnessMetaSchema.js +27 -27
- package/dist/cjs/BoundWitness/models/Meta/index.d.ts +2 -2
- package/dist/cjs/BoundWitness/models/Meta/index.js +5 -5
- package/dist/cjs/BoundWitness/models/WithXyoBoundWitnessMeta.d.ts +4 -4
- package/dist/cjs/BoundWitness/models/WithXyoBoundWitnessMeta.js +2 -2
- package/dist/cjs/BoundWitness/models/XyoBoundWitness.d.ts +5 -5
- package/dist/cjs/BoundWitness/models/XyoBoundWitness.js +2 -2
- package/dist/cjs/BoundWitness/models/XyoBoundWitnessSchema.d.ts +75 -75
- package/dist/cjs/BoundWitness/models/XyoBoundWitnessSchema.js +16 -16
- package/dist/cjs/BoundWitness/models/index.d.ts +5 -5
- package/dist/cjs/BoundWitness/models/index.js +8 -8
- package/dist/cjs/Hasher/XyoAbstractHasher.d.ts +11 -11
- package/dist/cjs/Hasher/XyoAbstractHasher.js +33 -33
- package/dist/cjs/Hasher/XyoHasher.d.ts +6 -6
- package/dist/cjs/Hasher/XyoHasher.js +14 -14
- package/dist/cjs/Hasher/index.d.ts +5 -5
- package/dist/cjs/Hasher/index.js +8 -8
- package/dist/cjs/Hasher/removeEmptyFields.d.ts +1 -1
- package/dist/cjs/Hasher/removeEmptyFields.js +19 -19
- package/dist/cjs/Hasher/removeFields.d.ts +6 -6
- package/dist/cjs/Hasher/removeFields.js +28 -28
- package/dist/cjs/Hasher/sortFields.d.ts +1 -1
- package/dist/cjs/Hasher/sortFields.js +26 -26
- package/dist/cjs/Huri/Huri.d.ts +29 -26
- package/dist/cjs/Huri/Huri.js +110 -100
- package/dist/cjs/Huri/Huri.js.map +1 -1
- package/dist/cjs/Huri/index.d.ts +1 -1
- package/dist/cjs/Huri/index.js +4 -4
- package/dist/cjs/Payload/Builder/Builder.d.ts +14 -14
- package/dist/cjs/Payload/Builder/Builder.js +30 -30
- package/dist/cjs/Payload/Builder/index.d.ts +1 -1
- package/dist/cjs/Payload/Builder/index.js +4 -4
- package/dist/cjs/Payload/Validator/BodyValidator.d.ts +11 -11
- package/dist/cjs/Payload/Validator/BodyValidator.js +30 -30
- package/dist/cjs/Payload/Validator/MetaValidator.d.ts +9 -9
- package/dist/cjs/Payload/Validator/MetaValidator.js +36 -36
- package/dist/cjs/Payload/Validator/Validator.d.ts +11 -11
- package/dist/cjs/Payload/Validator/Validator.js +18 -18
- package/dist/cjs/Payload/Validator/index.d.ts +3 -3
- package/dist/cjs/Payload/Validator/index.js +6 -6
- package/dist/cjs/Payload/Wrapper/Validator.d.ts +9 -9
- package/dist/cjs/Payload/Wrapper/Validator.js +18 -18
- package/dist/cjs/Payload/Wrapper/Wrapper.d.ts +12 -9
- package/dist/cjs/Payload/Wrapper/Wrapper.js +30 -20
- package/dist/cjs/Payload/Wrapper/Wrapper.js.map +1 -1
- package/dist/cjs/Payload/Wrapper/index.d.ts +2 -2
- package/dist/cjs/Payload/Wrapper/index.js +5 -5
- package/dist/cjs/Payload/index.d.ts +4 -4
- package/dist/cjs/Payload/index.js +7 -7
- package/dist/cjs/Payload/models/Body.d.ts +6 -6
- package/dist/cjs/Payload/models/Body.js +2 -2
- package/dist/cjs/Payload/models/Meta.d.ts +10 -10
- package/dist/cjs/Payload/models/Meta.js +2 -2
- package/dist/cjs/Payload/models/WithXyoPayloadMeta.d.ts +4 -4
- package/dist/cjs/Payload/models/WithXyoPayloadMeta.js +2 -2
- package/dist/cjs/Payload/models/XyoPayload.d.ts +4 -4
- package/dist/cjs/Payload/models/XyoPayload.js +2 -2
- package/dist/cjs/Payload/models/index.d.ts +4 -4
- package/dist/cjs/Payload/models/index.js +7 -7
- package/dist/cjs/Query/QueryPayload.d.ts +11 -11
- package/dist/cjs/Query/QueryPayload.js +2 -2
- package/dist/cjs/Query/index.d.ts +1 -1
- package/dist/cjs/Query/index.js +4 -4
- package/dist/cjs/Schema/Payload.d.ts +10 -10
- package/dist/cjs/Schema/Payload.js +2 -2
- package/dist/cjs/Schema/index.d.ts +1 -1
- package/dist/cjs/Schema/index.js +4 -4
- package/dist/cjs/SchemaNameValidator.d.ts +73 -73
- package/dist/cjs/SchemaNameValidator.js +134 -134
- package/dist/cjs/Test/index.d.ts +2 -2
- package/dist/cjs/Test/index.js +5 -5
- package/dist/cjs/Test/testBoundWitness.d.ts +3 -3
- package/dist/cjs/Test/testBoundWitness.js +16 -16
- package/dist/cjs/Test/testPayload.d.ts +4 -4
- package/dist/cjs/Test/testPayload.js +18 -18
- package/dist/cjs/Wallet/Account/Account.d.ts +36 -36
- package/dist/cjs/Wallet/Account/Account.js +78 -78
- package/dist/cjs/Wallet/Account/Key/Data/AbstractData.d.ts +12 -12
- package/dist/cjs/Wallet/Account/Key/Data/AbstractData.js +15 -15
- package/dist/cjs/Wallet/Account/Key/Data/Data.d.ts +15 -15
- package/dist/cjs/Wallet/Account/Key/Data/Data.js +39 -39
- package/dist/cjs/Wallet/Account/Key/Data/XyoDataLike.d.ts +4 -4
- package/dist/cjs/Wallet/Account/Key/Data/XyoDataLike.js +2 -2
- package/dist/cjs/Wallet/Account/Key/Data/index.d.ts +4 -4
- package/dist/cjs/Wallet/Account/Key/Data/index.js +7 -7
- package/dist/cjs/Wallet/Account/Key/Data/toUint8Array.d.ts +3 -3
- package/dist/cjs/Wallet/Account/Key/Data/toUint8Array.js +32 -32
- package/dist/cjs/Wallet/Account/Key/XyoAddressValue.d.ts +11 -11
- package/dist/cjs/Wallet/Account/Key/XyoAddressValue.js +48 -48
- package/dist/cjs/Wallet/Account/Key/XyoEllipticKey.d.ts +5 -5
- package/dist/cjs/Wallet/Account/Key/XyoEllipticKey.js +12 -12
- package/dist/cjs/Wallet/Account/Key/XyoKeyPair.d.ts +10 -10
- package/dist/cjs/Wallet/Account/Key/XyoKeyPair.js +22 -22
- package/dist/cjs/Wallet/Account/Key/XyoPrivateKey.d.ts +14 -14
- package/dist/cjs/Wallet/Account/Key/XyoPrivateKey.js +55 -55
- package/dist/cjs/Wallet/Account/Key/XyoPublicKey.d.ts +10 -10
- package/dist/cjs/Wallet/Account/Key/XyoPublicKey.js +21 -21
- package/dist/cjs/Wallet/Account/Key/index.d.ts +5 -5
- package/dist/cjs/Wallet/Account/Key/index.js +8 -8
- package/dist/cjs/Wallet/Account/index.d.ts +2 -2
- package/dist/cjs/Wallet/Account/index.js +5 -5
- package/dist/cjs/Wallet/Base/Base.d.ts +8 -8
- package/dist/cjs/Wallet/Base/Base.js +36 -36
- package/dist/cjs/Wallet/Base/Words.d.ts +2 -2
- package/dist/cjs/Wallet/Base/Words.js +2643 -2643
- package/dist/cjs/Wallet/Base/WordsPayload.d.ts +4 -4
- package/dist/cjs/Wallet/Base/WordsPayload.js +2 -2
- package/dist/cjs/Wallet/Base/index.d.ts +1 -1
- package/dist/cjs/Wallet/Base/index.js +4 -4
- package/dist/cjs/Wallet/index.d.ts +2 -2
- package/dist/cjs/Wallet/index.js +5 -5
- package/dist/cjs/Witness/LegacyWitness.d.ts +19 -14
- package/dist/cjs/Witness/LegacyWitness.js +31 -27
- package/dist/cjs/Witness/LegacyWitness.js.map +1 -1
- package/dist/cjs/Witness/QueryWitness.d.ts +9 -9
- package/dist/cjs/Witness/QueryWitness.js +24 -24
- package/dist/cjs/Witness/Witness.d.ts +5 -5
- package/dist/cjs/Witness/Witness.js +6 -6
- package/dist/cjs/Witness/index.d.ts +3 -3
- package/dist/cjs/Witness/index.js +6 -6
- package/dist/cjs/browser/core/Wallet/Web.d.ts +5 -5
- package/dist/cjs/browser/core/Wallet/Web.js +14 -14
- package/dist/cjs/browser/core/Wallet/index.d.ts +1 -1
- package/dist/cjs/browser/core/Wallet/index.js +4 -4
- package/dist/cjs/browser/core/index.d.ts +1 -1
- package/dist/cjs/browser/core/index.js +4 -4
- package/dist/cjs/browser/index.d.ts +1 -1
- package/dist/cjs/browser/index.js +4 -4
- package/dist/cjs/browserIndex.d.ts +2 -2
- package/dist/cjs/browserIndex.js +5 -5
- package/dist/cjs/index.d.ts +2 -2
- package/dist/cjs/index.js +5 -5
- package/dist/cjs/lib/dns/DnsRecordType.d.ts +14 -14
- package/dist/cjs/lib/dns/DnsRecordType.js +18 -18
- package/dist/cjs/lib/dns/DnsReturnCode.d.ts +13 -13
- package/dist/cjs/lib/dns/DnsReturnCode.js +17 -17
- package/dist/cjs/lib/dns/GoogleDnsResult.d.ts +16 -16
- package/dist/cjs/lib/dns/GoogleDnsResult.js +2 -2
- package/dist/cjs/lib/dns/GoogleDnsResultAnswer.d.ts +7 -7
- package/dist/cjs/lib/dns/GoogleDnsResultAnswer.js +2 -2
- package/dist/cjs/lib/dns/GoogleDnsResultQuestion.d.ts +10 -10
- package/dist/cjs/lib/dns/GoogleDnsResultQuestion.js +2 -2
- package/dist/cjs/lib/dns/domainExists.d.ts +7 -7
- package/dist/cjs/lib/dns/domainExists.js +18 -18
- package/dist/cjs/lib/dns/domainResolve.d.ts +8 -8
- package/dist/cjs/lib/dns/domainResolve.js +18 -18
- package/dist/cjs/lib/dns/googleDnsOverHttps.d.ts +4 -4
- package/dist/cjs/lib/dns/googleDnsOverHttps.js +10 -10
- package/dist/cjs/lib/dns/index.d.ts +8 -8
- package/dist/cjs/lib/dns/index.js +11 -11
- package/dist/cjs/lib/dumpErrors.d.ts +2 -2
- package/dist/cjs/lib/dumpErrors.js +9 -9
- package/dist/cjs/lib/exists.d.ts +1 -1
- package/dist/cjs/lib/exists.js +7 -7
- package/dist/cjs/lib/index.d.ts +4 -4
- package/dist/cjs/lib/index.js +7 -7
- package/dist/cjs/lib/isBrowser.d.ts +1 -1
- package/dist/cjs/lib/isBrowser.js +7 -7
- package/dist/cjs/lib/isXyoPayloadOfSchemaType.d.ts +6 -6
- package/dist/cjs/lib/isXyoPayloadOfSchemaType.js +9 -9
- package/dist/cjs/lib/typeOf/TypeOfTypes.d.ts +1 -1
- package/dist/cjs/lib/typeOf/TypeOfTypes.js +2 -2
- package/dist/cjs/lib/typeOf/ifDefined.d.ts +1 -1
- package/dist/cjs/lib/typeOf/ifDefined.js +15 -15
- package/dist/cjs/lib/typeOf/ifTypeOf.d.ts +2 -2
- package/dist/cjs/lib/typeOf/ifTypeOf.js +11 -11
- package/dist/cjs/lib/typeOf/index.d.ts +5 -5
- package/dist/cjs/lib/typeOf/index.js +8 -8
- package/dist/cjs/lib/typeOf/typeOf.d.ts +2 -2
- package/dist/cjs/lib/typeOf/typeOf.js +7 -7
- package/dist/cjs/lib/typeOf/validateType.d.ts +2 -2
- package/dist/cjs/lib/typeOf/validateType.js +17 -17
- package/dist/cjs/models/WithStringIndex.d.ts +1 -1
- package/dist/cjs/models/WithStringIndex.js +2 -2
- package/dist/cjs/models/index.d.ts +1 -1
- package/dist/cjs/models/index.js +4 -4
- package/dist/cjs/nodeIndex.d.ts +1 -1
- package/dist/cjs/nodeIndex.js +4 -4
- package/dist/cjs/shared.d.ts +11 -11
- package/dist/cjs/shared.js +14 -14
- package/dist/docs.json +1 -23434
- package/dist/esm/BoundWitness/Builder/Builder.d.ts +22 -22
- package/dist/esm/BoundWitness/Builder/Builder.js +65 -65
- package/dist/esm/BoundWitness/Builder/index.d.ts +1 -1
- package/dist/esm/BoundWitness/Builder/index.js +1 -1
- package/dist/esm/BoundWitness/Validator/BodyValidator.d.ts +18 -18
- package/dist/esm/BoundWitness/Validator/BodyValidator.js +85 -85
- package/dist/esm/BoundWitness/Validator/MetaValidator.d.ts +14 -14
- package/dist/esm/BoundWitness/Validator/MetaValidator.js +65 -65
- package/dist/esm/BoundWitness/Validator/Validator.d.ts +12 -12
- package/dist/esm/BoundWitness/Validator/Validator.js +40 -40
- package/dist/esm/BoundWitness/Validator/index.d.ts +3 -3
- package/dist/esm/BoundWitness/Validator/index.js +3 -3
- package/dist/esm/BoundWitness/Validator/ip-regex.d.ts +9 -9
- package/dist/esm/BoundWitness/Validator/ip-regex.js +15 -15
- package/dist/esm/BoundWitness/Validator/is-ip.d.ts +4 -4
- package/dist/esm/BoundWitness/Validator/is-ip.js +13 -13
- package/dist/esm/BoundWitness/Wrapper/Wrapper.d.ts +13 -13
- package/dist/esm/BoundWitness/Wrapper/Wrapper.js +23 -23
- package/dist/esm/BoundWitness/Wrapper/index.d.ts +1 -1
- package/dist/esm/BoundWitness/Wrapper/index.js +1 -1
- package/dist/esm/BoundWitness/index.d.ts +4 -4
- package/dist/esm/BoundWitness/index.js +4 -4
- package/dist/esm/BoundWitness/models/Body/XyoBoundWitnessBody.d.ts +11 -11
- package/dist/esm/BoundWitness/models/Body/XyoBoundWitnessBody.js +1 -1
- package/dist/esm/BoundWitness/models/Body/XyoBoundWitnessBodySchema.d.ts +37 -37
- package/dist/esm/BoundWitness/models/Body/XyoBoundWitnessBodySchema.js +16 -16
- package/dist/esm/BoundWitness/models/Body/index.d.ts +2 -2
- package/dist/esm/BoundWitness/models/Body/index.js +2 -2
- package/dist/esm/BoundWitness/models/Meta/XyoBoundWitnessMeta.d.ts +13 -13
- package/dist/esm/BoundWitness/models/Meta/XyoBoundWitnessMeta.js +1 -1
- package/dist/esm/BoundWitness/models/Meta/XyoBoundWitnessMetaSchema.d.ts +85 -85
- package/dist/esm/BoundWitness/models/Meta/XyoBoundWitnessMetaSchema.js +22 -22
- package/dist/esm/BoundWitness/models/Meta/index.d.ts +2 -2
- package/dist/esm/BoundWitness/models/Meta/index.js +2 -2
- package/dist/esm/BoundWitness/models/WithXyoBoundWitnessMeta.d.ts +4 -4
- package/dist/esm/BoundWitness/models/WithXyoBoundWitnessMeta.js +1 -1
- package/dist/esm/BoundWitness/models/XyoBoundWitness.d.ts +5 -5
- package/dist/esm/BoundWitness/models/XyoBoundWitness.js +1 -1
- package/dist/esm/BoundWitness/models/XyoBoundWitnessSchema.d.ts +75 -75
- package/dist/esm/BoundWitness/models/XyoBoundWitnessSchema.js +20 -20
- package/dist/esm/BoundWitness/models/index.d.ts +5 -5
- package/dist/esm/BoundWitness/models/index.js +5 -5
- package/dist/esm/Hasher/XyoAbstractHasher.d.ts +11 -11
- package/dist/esm/Hasher/XyoAbstractHasher.js +28 -28
- package/dist/esm/Hasher/XyoHasher.d.ts +6 -6
- package/dist/esm/Hasher/XyoHasher.js +10 -10
- package/dist/esm/Hasher/index.d.ts +5 -5
- package/dist/esm/Hasher/index.js +5 -5
- package/dist/esm/Hasher/removeEmptyFields.d.ts +1 -1
- package/dist/esm/Hasher/removeEmptyFields.js +15 -15
- package/dist/esm/Hasher/removeFields.d.ts +6 -6
- package/dist/esm/Hasher/removeFields.js +21 -21
- package/dist/esm/Hasher/sortFields.d.ts +1 -1
- package/dist/esm/Hasher/sortFields.js +22 -22
- package/dist/esm/Huri/Huri.d.ts +29 -26
- package/dist/esm/Huri/Huri.js +98 -89
- package/dist/esm/Huri/Huri.js.map +1 -1
- package/dist/esm/Huri/index.d.ts +1 -1
- package/dist/esm/Huri/index.js +1 -1
- package/dist/esm/Payload/Builder/Builder.d.ts +14 -14
- package/dist/esm/Payload/Builder/Builder.js +29 -29
- package/dist/esm/Payload/Builder/index.d.ts +1 -1
- package/dist/esm/Payload/Builder/index.js +1 -1
- package/dist/esm/Payload/Validator/BodyValidator.d.ts +11 -11
- package/dist/esm/Payload/Validator/BodyValidator.js +26 -26
- package/dist/esm/Payload/Validator/MetaValidator.d.ts +9 -9
- package/dist/esm/Payload/Validator/MetaValidator.js +33 -33
- package/dist/esm/Payload/Validator/Validator.d.ts +11 -11
- package/dist/esm/Payload/Validator/Validator.js +15 -15
- package/dist/esm/Payload/Validator/index.d.ts +3 -3
- package/dist/esm/Payload/Validator/index.js +3 -3
- package/dist/esm/Payload/Wrapper/Validator.d.ts +9 -9
- package/dist/esm/Payload/Wrapper/Validator.js +14 -14
- package/dist/esm/Payload/Wrapper/Wrapper.d.ts +12 -9
- package/dist/esm/Payload/Wrapper/Wrapper.js +23 -16
- package/dist/esm/Payload/Wrapper/Wrapper.js.map +1 -1
- package/dist/esm/Payload/Wrapper/index.d.ts +2 -2
- package/dist/esm/Payload/Wrapper/index.js +2 -2
- package/dist/esm/Payload/index.d.ts +4 -4
- package/dist/esm/Payload/index.js +4 -4
- package/dist/esm/Payload/models/Body.d.ts +6 -6
- package/dist/esm/Payload/models/Body.js +1 -1
- package/dist/esm/Payload/models/Meta.d.ts +10 -10
- package/dist/esm/Payload/models/Meta.js +1 -1
- package/dist/esm/Payload/models/WithXyoPayloadMeta.d.ts +4 -4
- package/dist/esm/Payload/models/WithXyoPayloadMeta.js +1 -1
- package/dist/esm/Payload/models/XyoPayload.d.ts +4 -4
- package/dist/esm/Payload/models/XyoPayload.js +1 -1
- package/dist/esm/Payload/models/index.d.ts +4 -4
- package/dist/esm/Payload/models/index.js +4 -4
- package/dist/esm/Query/QueryPayload.d.ts +11 -11
- package/dist/esm/Query/QueryPayload.js +1 -1
- package/dist/esm/Query/index.d.ts +1 -1
- package/dist/esm/Query/index.js +1 -1
- package/dist/esm/Schema/Payload.d.ts +10 -10
- package/dist/esm/Schema/Payload.js +1 -1
- package/dist/esm/Schema/index.d.ts +1 -1
- package/dist/esm/Schema/index.js +1 -1
- package/dist/esm/SchemaNameValidator.d.ts +73 -73
- package/dist/esm/SchemaNameValidator.js +116 -116
- package/dist/esm/Test/index.d.ts +2 -2
- package/dist/esm/Test/index.js +2 -2
- package/dist/esm/Test/testBoundWitness.d.ts +3 -3
- package/dist/esm/Test/testBoundWitness.js +13 -13
- package/dist/esm/Test/testPayload.d.ts +4 -4
- package/dist/esm/Test/testPayload.js +14 -14
- package/dist/esm/Wallet/Account/Account.d.ts +36 -36
- package/dist/esm/Wallet/Account/Account.js +70 -70
- package/dist/esm/Wallet/Account/Key/Data/AbstractData.d.ts +12 -12
- package/dist/esm/Wallet/Account/Key/Data/AbstractData.js +11 -11
- package/dist/esm/Wallet/Account/Key/Data/Data.d.ts +15 -15
- package/dist/esm/Wallet/Account/Key/Data/Data.js +34 -34
- package/dist/esm/Wallet/Account/Key/Data/XyoDataLike.d.ts +4 -4
- package/dist/esm/Wallet/Account/Key/Data/XyoDataLike.js +1 -1
- package/dist/esm/Wallet/Account/Key/Data/index.d.ts +4 -4
- package/dist/esm/Wallet/Account/Key/Data/index.js +4 -4
- package/dist/esm/Wallet/Account/Key/Data/toUint8Array.d.ts +3 -3
- package/dist/esm/Wallet/Account/Key/Data/toUint8Array.js +30 -30
- package/dist/esm/Wallet/Account/Key/XyoAddressValue.d.ts +11 -11
- package/dist/esm/Wallet/Account/Key/XyoAddressValue.js +44 -44
- package/dist/esm/Wallet/Account/Key/XyoEllipticKey.d.ts +5 -5
- package/dist/esm/Wallet/Account/Key/XyoEllipticKey.js +7 -7
- package/dist/esm/Wallet/Account/Key/XyoKeyPair.d.ts +10 -10
- package/dist/esm/Wallet/Account/Key/XyoKeyPair.js +17 -17
- package/dist/esm/Wallet/Account/Key/XyoPrivateKey.d.ts +14 -14
- package/dist/esm/Wallet/Account/Key/XyoPrivateKey.js +49 -49
- package/dist/esm/Wallet/Account/Key/XyoPublicKey.d.ts +10 -10
- package/dist/esm/Wallet/Account/Key/XyoPublicKey.js +17 -17
- package/dist/esm/Wallet/Account/Key/index.d.ts +5 -5
- package/dist/esm/Wallet/Account/Key/index.js +5 -5
- package/dist/esm/Wallet/Account/index.d.ts +2 -2
- package/dist/esm/Wallet/Account/index.js +2 -2
- package/dist/esm/Wallet/Base/Base.d.ts +8 -8
- package/dist/esm/Wallet/Base/Base.js +29 -29
- package/dist/esm/Wallet/Base/Words.d.ts +2 -2
- package/dist/esm/Wallet/Base/Words.js +2640 -2640
- package/dist/esm/Wallet/Base/WordsPayload.d.ts +4 -4
- package/dist/esm/Wallet/Base/WordsPayload.js +1 -1
- package/dist/esm/Wallet/Base/index.d.ts +1 -1
- package/dist/esm/Wallet/Base/index.js +1 -1
- package/dist/esm/Wallet/index.d.ts +2 -2
- package/dist/esm/Wallet/index.js +2 -2
- package/dist/esm/Witness/LegacyWitness.d.ts +19 -14
- package/dist/esm/Witness/LegacyWitness.js +21 -18
- package/dist/esm/Witness/LegacyWitness.js.map +1 -1
- package/dist/esm/Witness/QueryWitness.d.ts +9 -9
- package/dist/esm/Witness/QueryWitness.js +16 -16
- package/dist/esm/Witness/Witness.d.ts +5 -5
- package/dist/esm/Witness/Witness.js +2 -2
- package/dist/esm/Witness/index.d.ts +3 -3
- package/dist/esm/Witness/index.js +3 -3
- package/dist/esm/browser/core/Wallet/Web.d.ts +5 -5
- package/dist/esm/browser/core/Wallet/Web.js +10 -10
- package/dist/esm/browser/core/Wallet/index.d.ts +1 -1
- package/dist/esm/browser/core/Wallet/index.js +1 -1
- package/dist/esm/browser/core/index.d.ts +1 -1
- package/dist/esm/browser/core/index.js +1 -1
- package/dist/esm/browser/index.d.ts +1 -1
- package/dist/esm/browser/index.js +1 -1
- package/dist/esm/browserIndex.d.ts +2 -2
- package/dist/esm/browserIndex.js +2 -2
- package/dist/esm/index.d.ts +2 -2
- package/dist/esm/index.js +2 -2
- package/dist/esm/lib/dns/DnsRecordType.d.ts +14 -14
- package/dist/esm/lib/dns/DnsRecordType.js +15 -15
- package/dist/esm/lib/dns/DnsReturnCode.d.ts +13 -13
- package/dist/esm/lib/dns/DnsReturnCode.js +14 -14
- package/dist/esm/lib/dns/GoogleDnsResult.d.ts +16 -16
- package/dist/esm/lib/dns/GoogleDnsResult.js +1 -1
- package/dist/esm/lib/dns/GoogleDnsResultAnswer.d.ts +7 -7
- package/dist/esm/lib/dns/GoogleDnsResultAnswer.js +1 -1
- package/dist/esm/lib/dns/GoogleDnsResultQuestion.d.ts +10 -10
- package/dist/esm/lib/dns/GoogleDnsResultQuestion.js +1 -1
- package/dist/esm/lib/dns/domainExists.d.ts +7 -7
- package/dist/esm/lib/dns/domainExists.js +14 -14
- package/dist/esm/lib/dns/domainResolve.d.ts +8 -8
- package/dist/esm/lib/dns/domainResolve.js +14 -14
- package/dist/esm/lib/dns/googleDnsOverHttps.d.ts +4 -4
- package/dist/esm/lib/dns/googleDnsOverHttps.js +6 -6
- package/dist/esm/lib/dns/index.d.ts +8 -8
- package/dist/esm/lib/dns/index.js +8 -8
- package/dist/esm/lib/dumpErrors.d.ts +2 -2
- package/dist/esm/lib/dumpErrors.js +6 -6
- package/dist/esm/lib/exists.d.ts +1 -1
- package/dist/esm/lib/exists.js +3 -3
- package/dist/esm/lib/index.d.ts +4 -4
- package/dist/esm/lib/index.js +4 -4
- package/dist/esm/lib/isBrowser.d.ts +1 -1
- package/dist/esm/lib/isBrowser.js +3 -3
- package/dist/esm/lib/isXyoPayloadOfSchemaType.d.ts +6 -6
- package/dist/esm/lib/isXyoPayloadOfSchemaType.js +5 -5
- package/dist/esm/lib/typeOf/TypeOfTypes.d.ts +1 -1
- package/dist/esm/lib/typeOf/TypeOfTypes.js +1 -1
- package/dist/esm/lib/typeOf/ifDefined.d.ts +1 -1
- package/dist/esm/lib/typeOf/ifDefined.js +11 -11
- package/dist/esm/lib/typeOf/ifTypeOf.d.ts +2 -2
- package/dist/esm/lib/typeOf/ifTypeOf.js +7 -7
- package/dist/esm/lib/typeOf/index.d.ts +5 -5
- package/dist/esm/lib/typeOf/index.js +5 -5
- package/dist/esm/lib/typeOf/typeOf.d.ts +2 -2
- package/dist/esm/lib/typeOf/typeOf.js +3 -3
- package/dist/esm/lib/typeOf/validateType.d.ts +2 -2
- package/dist/esm/lib/typeOf/validateType.js +13 -13
- package/dist/esm/models/WithStringIndex.d.ts +1 -1
- package/dist/esm/models/WithStringIndex.js +1 -1
- package/dist/esm/models/index.d.ts +1 -1
- package/dist/esm/models/index.js +1 -1
- package/dist/esm/nodeIndex.d.ts +1 -1
- package/dist/esm/nodeIndex.js +1 -1
- package/dist/esm/shared.d.ts +11 -11
- package/dist/esm/shared.js +11 -11
- package/package.json +4 -14
- package/src/Huri/Huri.spec.ts +0 -1
- package/src/Huri/Huri.ts +15 -4
- package/src/Payload/Wrapper/Wrapper.ts +9 -0
- package/src/Witness/LegacyWitness.ts +8 -2
- package/src/Witness/Witness.spec.ts +2 -2
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
import { assertEx } from '@xylabs/sdk-js';
|
|
2
|
-
import { XyoAddressValue } from '../../Wallet';
|
|
3
|
-
import { XyoBoundWitnessBodyValidator } from './BodyValidator';
|
|
4
|
-
import { XyoBoundWitnessMetaValidator } from './MetaValidator';
|
|
5
|
-
const validateArraysSameLength = (a, b, message = 'Array length mismatch') => {
|
|
6
|
-
return a.length != b.length ? [Error(`${message} []`)] : [];
|
|
7
|
-
};
|
|
8
|
-
const validateSignature = (hash, address, signature) => {
|
|
9
|
-
if (!signature) {
|
|
10
|
-
return [Error(`Missing signature [${address}]`)];
|
|
11
|
-
}
|
|
12
|
-
if (!new XyoAddressValue(address).verify(hash, signature)) {
|
|
13
|
-
return [Error(`Invalid signature [${address}] [${signature}]`)];
|
|
14
|
-
}
|
|
15
|
-
return [];
|
|
16
|
-
};
|
|
17
|
-
class XyoBoundWitnessValidator {
|
|
18
|
-
constructor(bw) {
|
|
19
|
-
this.bw = bw;
|
|
20
|
-
this.body = new XyoBoundWitnessBodyValidator(bw, bw._payloads);
|
|
21
|
-
this.meta = new XyoBoundWitnessMetaValidator(bw);
|
|
22
|
-
}
|
|
23
|
-
signatures() {
|
|
24
|
-
const hash = assertEx(this.bw._hash, 'Missing _hash');
|
|
25
|
-
return [
|
|
26
|
-
...validateArraysSameLength(this.bw._signatures ?? [], this.bw.addresses, 'Length mismatch: address/_signature'),
|
|
27
|
-
...this.bw.addresses.reduce((errors, address, index) => {
|
|
28
|
-
errors.push(...validateSignature(hash, address, this.bw._signatures?.[index]));
|
|
29
|
-
return errors;
|
|
30
|
-
}, []),
|
|
31
|
-
];
|
|
32
|
-
}
|
|
33
|
-
all() {
|
|
34
|
-
const errors = [];
|
|
35
|
-
errors.push(...this.meta.all(), ...this.body.all());
|
|
36
|
-
errors.push(...this.signatures());
|
|
37
|
-
return errors;
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
export { XyoBoundWitnessValidator };
|
|
1
|
+
import { assertEx } from '@xylabs/sdk-js';
|
|
2
|
+
import { XyoAddressValue } from '../../Wallet';
|
|
3
|
+
import { XyoBoundWitnessBodyValidator } from './BodyValidator';
|
|
4
|
+
import { XyoBoundWitnessMetaValidator } from './MetaValidator';
|
|
5
|
+
const validateArraysSameLength = (a, b, message = 'Array length mismatch') => {
|
|
6
|
+
return a.length != b.length ? [Error(`${message} []`)] : [];
|
|
7
|
+
};
|
|
8
|
+
const validateSignature = (hash, address, signature) => {
|
|
9
|
+
if (!signature) {
|
|
10
|
+
return [Error(`Missing signature [${address}]`)];
|
|
11
|
+
}
|
|
12
|
+
if (!new XyoAddressValue(address).verify(hash, signature)) {
|
|
13
|
+
return [Error(`Invalid signature [${address}] [${signature}]`)];
|
|
14
|
+
}
|
|
15
|
+
return [];
|
|
16
|
+
};
|
|
17
|
+
class XyoBoundWitnessValidator {
|
|
18
|
+
constructor(bw) {
|
|
19
|
+
this.bw = bw;
|
|
20
|
+
this.body = new XyoBoundWitnessBodyValidator(bw, bw._payloads);
|
|
21
|
+
this.meta = new XyoBoundWitnessMetaValidator(bw);
|
|
22
|
+
}
|
|
23
|
+
signatures() {
|
|
24
|
+
const hash = assertEx(this.bw._hash, 'Missing _hash');
|
|
25
|
+
return [
|
|
26
|
+
...validateArraysSameLength(this.bw._signatures ?? [], this.bw.addresses, 'Length mismatch: address/_signature'),
|
|
27
|
+
...this.bw.addresses.reduce((errors, address, index) => {
|
|
28
|
+
errors.push(...validateSignature(hash, address, this.bw._signatures?.[index]));
|
|
29
|
+
return errors;
|
|
30
|
+
}, []),
|
|
31
|
+
];
|
|
32
|
+
}
|
|
33
|
+
all() {
|
|
34
|
+
const errors = [];
|
|
35
|
+
errors.push(...this.meta.all(), ...this.body.all());
|
|
36
|
+
errors.push(...this.signatures());
|
|
37
|
+
return errors;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
export { XyoBoundWitnessValidator };
|
|
41
41
|
//# sourceMappingURL=Validator.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from './BodyValidator';
|
|
2
|
-
export * from './MetaValidator';
|
|
3
|
-
export * from './Validator';
|
|
1
|
+
export * from './BodyValidator';
|
|
2
|
+
export * from './MetaValidator';
|
|
3
|
+
export * from './Validator';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from './BodyValidator';
|
|
2
|
-
export * from './MetaValidator';
|
|
3
|
-
export * from './Validator';
|
|
1
|
+
export * from './BodyValidator';
|
|
2
|
+
export * from './MetaValidator';
|
|
3
|
+
export * from './Validator';
|
|
4
4
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export interface Options {
|
|
2
|
-
readonly exact?: boolean;
|
|
3
|
-
readonly includeBoundaries?: boolean;
|
|
4
|
-
}
|
|
5
|
-
export declare const ipRegex: {
|
|
6
|
-
(options: Options): RegExp;
|
|
7
|
-
v4(options: Options): RegExp;
|
|
8
|
-
v6(options: Options): RegExp;
|
|
9
|
-
};
|
|
1
|
+
export interface Options {
|
|
2
|
+
readonly exact?: boolean;
|
|
3
|
+
readonly includeBoundaries?: boolean;
|
|
4
|
+
}
|
|
5
|
+
export declare const ipRegex: {
|
|
6
|
+
(options: Options): RegExp;
|
|
7
|
+
v4(options: Options): RegExp;
|
|
8
|
+
v6(options: Options): RegExp;
|
|
9
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
const word = '[a-fA-F\\d:]';
|
|
2
|
-
const boundry = (options) => (options && options.includeBoundaries ? `(?:(?<=\\s|^)(?=${word})|(?<=${word})(?=\\s|$))` : '');
|
|
3
|
-
const v4 = '(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}';
|
|
4
|
-
const v6segment = '[a-fA-F\\d]{1,4}';
|
|
1
|
+
const word = '[a-fA-F\\d:]';
|
|
2
|
+
const boundry = (options) => (options && options.includeBoundaries ? `(?:(?<=\\s|^)(?=${word})|(?<=${word})(?=\\s|$))` : '');
|
|
3
|
+
const v4 = '(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}';
|
|
4
|
+
const v6segment = '[a-fA-F\\d]{1,4}';
|
|
5
5
|
const v6 = `
|
|
6
6
|
(?:
|
|
7
7
|
(?:${v6segment}:){7}(?:${v6segment}|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8
|
|
@@ -13,15 +13,15 @@ const v6 = `
|
|
|
13
13
|
(?:${v6segment}:){1}(?:(?::${v6segment}){0,4}:${v4}|(?::${v6segment}){1,6}|:)| // 1:: 1::3:4:5:6:7:8 1::8 1::3:4:5:6:7:1.2.3.4
|
|
14
14
|
(?::(?:(?::${v6segment}){0,5}:${v4}|(?::${v6segment}){1,7}|:)) // ::2:3:4:5:6:7:8 ::2:3:4:5:6:7:8 ::8 ::1.2.3.4
|
|
15
15
|
)(?:%[0-9a-zA-Z]{1,})? // %eth0 %1
|
|
16
|
-
`
|
|
17
|
-
.replace(/\s*\/\/.*$/gm, '')
|
|
18
|
-
.replace(/\n/g, '')
|
|
19
|
-
.trim();
|
|
20
|
-
// Pre-compile only the exact regexes because adding a global flag make regexes stateful
|
|
21
|
-
const v46Exact = new RegExp(`(?:^${v4}$)|(?:^${v6}$)`);
|
|
22
|
-
const v4exact = new RegExp(`^${v4}$`);
|
|
23
|
-
const v6exact = new RegExp(`^${v6}$`);
|
|
24
|
-
export const ipRegex = (options) => options && options.exact ? v46Exact : new RegExp(`(?:${boundry(options)}${v4}${boundry(options)})|(?:${boundry(options)}${v6}${boundry(options)})`, 'g');
|
|
25
|
-
ipRegex.v4 = (options) => (options && options.exact ? v4exact : new RegExp(`${boundry(options)}${v4}${boundry(options)}`, 'g'));
|
|
26
|
-
ipRegex.v6 = (options) => (options && options.exact ? v6exact : new RegExp(`${boundry(options)}${v6}${boundry(options)}`, 'g'));
|
|
16
|
+
`
|
|
17
|
+
.replace(/\s*\/\/.*$/gm, '')
|
|
18
|
+
.replace(/\n/g, '')
|
|
19
|
+
.trim();
|
|
20
|
+
// Pre-compile only the exact regexes because adding a global flag make regexes stateful
|
|
21
|
+
const v46Exact = new RegExp(`(?:^${v4}$)|(?:^${v6}$)`);
|
|
22
|
+
const v4exact = new RegExp(`^${v4}$`);
|
|
23
|
+
const v6exact = new RegExp(`^${v6}$`);
|
|
24
|
+
export const ipRegex = (options) => options && options.exact ? v46Exact : new RegExp(`(?:${boundry(options)}${v4}${boundry(options)})|(?:${boundry(options)}${v6}${boundry(options)})`, 'g');
|
|
25
|
+
ipRegex.v4 = (options) => (options && options.exact ? v4exact : new RegExp(`${boundry(options)}${v4}${boundry(options)}`, 'g'));
|
|
26
|
+
ipRegex.v6 = (options) => (options && options.exact ? v6exact : new RegExp(`${boundry(options)}${v6}${boundry(options)}`, 'g'));
|
|
27
27
|
//# sourceMappingURL=ip-regex.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare function isIP(value: string): boolean;
|
|
2
|
-
export declare function isIPv6(value: string): boolean;
|
|
3
|
-
export declare function isIPv4(value: string): boolean;
|
|
4
|
-
export declare function ipVersion(value: string): 4 | 6 | undefined;
|
|
1
|
+
export declare function isIP(value: string): boolean;
|
|
2
|
+
export declare function isIPv6(value: string): boolean;
|
|
3
|
+
export declare function isIPv4(value: string): boolean;
|
|
4
|
+
export declare function ipVersion(value: string): 4 | 6 | undefined;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { ipRegex } from './ip-regex';
|
|
2
|
-
export function isIP(value) {
|
|
3
|
-
return ipRegex({ exact: true }).test(value);
|
|
4
|
-
}
|
|
5
|
-
export function isIPv6(value) {
|
|
6
|
-
return ipRegex.v6({ exact: true }).test(value);
|
|
7
|
-
}
|
|
8
|
-
export function isIPv4(value) {
|
|
9
|
-
return ipRegex.v4({ exact: true }).test(value);
|
|
10
|
-
}
|
|
11
|
-
export function ipVersion(value) {
|
|
12
|
-
return isIP(value) ? (isIPv6(value) ? 6 : 4) : undefined;
|
|
13
|
-
}
|
|
1
|
+
import { ipRegex } from './ip-regex';
|
|
2
|
+
export function isIP(value) {
|
|
3
|
+
return ipRegex({ exact: true }).test(value);
|
|
4
|
+
}
|
|
5
|
+
export function isIPv6(value) {
|
|
6
|
+
return ipRegex.v6({ exact: true }).test(value);
|
|
7
|
+
}
|
|
8
|
+
export function isIPv4(value) {
|
|
9
|
+
return ipRegex.v4({ exact: true }).test(value);
|
|
10
|
+
}
|
|
11
|
+
export function ipVersion(value) {
|
|
12
|
+
return isIP(value) ? (isIPv6(value) ? 6 : 4) : undefined;
|
|
13
|
+
}
|
|
14
14
|
//# sourceMappingURL=is-ip.js.map
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { XyoHasher } from '../../Hasher';
|
|
2
|
-
import { XyoBoundWitness } from '../models';
|
|
3
|
-
import { XyoBoundWitnessValidator } from '../Validator';
|
|
4
|
-
declare class XyoBoundWitnessWrapper<T extends XyoBoundWitness> extends XyoHasher<T> {
|
|
5
|
-
readonly bw: T;
|
|
6
|
-
constructor(bw: T);
|
|
7
|
-
get scrubbedFields(): Pick<T, string>;
|
|
8
|
-
private _validator?;
|
|
9
|
-
get validator(): XyoBoundWitnessValidator;
|
|
10
|
-
private _userAgent?;
|
|
11
|
-
get userAgent(): import("ua-parser-js").UAParserInstance;
|
|
12
|
-
}
|
|
13
|
-
export { XyoBoundWitnessWrapper };
|
|
1
|
+
import { XyoHasher } from '../../Hasher';
|
|
2
|
+
import { XyoBoundWitness } from '../models';
|
|
3
|
+
import { XyoBoundWitnessValidator } from '../Validator';
|
|
4
|
+
declare class XyoBoundWitnessWrapper<T extends XyoBoundWitness> extends XyoHasher<T> {
|
|
5
|
+
readonly bw: T;
|
|
6
|
+
constructor(bw: T);
|
|
7
|
+
get scrubbedFields(): Pick<T, string>;
|
|
8
|
+
private _validator?;
|
|
9
|
+
get validator(): XyoBoundWitnessValidator;
|
|
10
|
+
private _userAgent?;
|
|
11
|
+
get userAgent(): import("ua-parser-js").UAParserInstance;
|
|
12
|
+
}
|
|
13
|
+
export { XyoBoundWitnessWrapper };
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import pick from 'lodash/pick';
|
|
2
|
-
import { UAParser } from 'ua-parser-js';
|
|
3
|
-
import { XyoHasher } from '../../Hasher';
|
|
4
|
-
import { XyoBoundWitnessValidator } from '../Validator';
|
|
5
|
-
const scrubbedFields = ['_archive', '_client', '_hash', '_signatures', '_timestamp', '_user_agent', 'addresses', 'payload_schemas', 'previous_hashes', 'payload_hashes', 'schema'];
|
|
6
|
-
class XyoBoundWitnessWrapper extends XyoHasher {
|
|
7
|
-
constructor(bw) {
|
|
8
|
-
super(bw);
|
|
9
|
-
this.bw = bw;
|
|
10
|
-
}
|
|
11
|
-
get scrubbedFields() {
|
|
12
|
-
return pick(this.bw, scrubbedFields);
|
|
13
|
-
}
|
|
14
|
-
get validator() {
|
|
15
|
-
this._validator = this._validator ?? new XyoBoundWitnessValidator(this.bw);
|
|
16
|
-
return this._validator;
|
|
17
|
-
}
|
|
18
|
-
get userAgent() {
|
|
19
|
-
this._userAgent = this._userAgent ?? new UAParser(this.bw._user_agent);
|
|
20
|
-
return this._userAgent;
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
export { XyoBoundWitnessWrapper };
|
|
1
|
+
import pick from 'lodash/pick';
|
|
2
|
+
import { UAParser } from 'ua-parser-js';
|
|
3
|
+
import { XyoHasher } from '../../Hasher';
|
|
4
|
+
import { XyoBoundWitnessValidator } from '../Validator';
|
|
5
|
+
const scrubbedFields = ['_archive', '_client', '_hash', '_signatures', '_timestamp', '_user_agent', 'addresses', 'payload_schemas', 'previous_hashes', 'payload_hashes', 'schema'];
|
|
6
|
+
class XyoBoundWitnessWrapper extends XyoHasher {
|
|
7
|
+
constructor(bw) {
|
|
8
|
+
super(bw);
|
|
9
|
+
this.bw = bw;
|
|
10
|
+
}
|
|
11
|
+
get scrubbedFields() {
|
|
12
|
+
return pick(this.bw, scrubbedFields);
|
|
13
|
+
}
|
|
14
|
+
get validator() {
|
|
15
|
+
this._validator = this._validator ?? new XyoBoundWitnessValidator(this.bw);
|
|
16
|
+
return this._validator;
|
|
17
|
+
}
|
|
18
|
+
get userAgent() {
|
|
19
|
+
this._userAgent = this._userAgent ?? new UAParser(this.bw._user_agent);
|
|
20
|
+
return this._userAgent;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
export { XyoBoundWitnessWrapper };
|
|
24
24
|
//# sourceMappingURL=Wrapper.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './Wrapper';
|
|
1
|
+
export * from './Wrapper';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './Wrapper';
|
|
1
|
+
export * from './Wrapper';
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from './Builder';
|
|
2
|
-
export * from './models';
|
|
3
|
-
export * from './Validator';
|
|
4
|
-
export * from './Wrapper';
|
|
1
|
+
export * from './Builder';
|
|
2
|
+
export * from './models';
|
|
3
|
+
export * from './Validator';
|
|
4
|
+
export * from './Wrapper';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * from './Builder';
|
|
2
|
-
export * from './models';
|
|
3
|
-
export * from './Validator';
|
|
4
|
-
export * from './Wrapper';
|
|
1
|
+
export * from './Builder';
|
|
2
|
+
export * from './models';
|
|
3
|
+
export * from './Validator';
|
|
4
|
+
export * from './Wrapper';
|
|
5
5
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { XyoPayloadBody } from '../../../Payload';
|
|
2
|
-
interface XyoBoundWitnessBody extends XyoPayloadBody {
|
|
3
|
-
[key: string]: unknown;
|
|
4
|
-
addresses: string[];
|
|
5
|
-
previous_hash?: string;
|
|
6
|
-
payload_hashes: string[];
|
|
7
|
-
payload_schemas: string[];
|
|
8
|
-
previous_hashes: (string | null)[];
|
|
9
|
-
schema: string;
|
|
10
|
-
}
|
|
11
|
-
export type { XyoBoundWitnessBody };
|
|
1
|
+
import { XyoPayloadBody } from '../../../Payload';
|
|
2
|
+
interface XyoBoundWitnessBody extends XyoPayloadBody {
|
|
3
|
+
[key: string]: unknown;
|
|
4
|
+
addresses: string[];
|
|
5
|
+
previous_hash?: string;
|
|
6
|
+
payload_hashes: string[];
|
|
7
|
+
payload_schemas: string[];
|
|
8
|
+
previous_hashes: (string | null)[];
|
|
9
|
+
schema: string;
|
|
10
|
+
}
|
|
11
|
+
export type { XyoBoundWitnessBody };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
|
2
2
|
//# sourceMappingURL=XyoBoundWitnessBody.js.map
|
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
declare const XyoBoundWitnessBodySchema: {
|
|
2
|
-
$id: string;
|
|
3
|
-
additionalProperties: boolean;
|
|
4
|
-
properties: {
|
|
5
|
-
addresses: {
|
|
6
|
-
items: {
|
|
7
|
-
type: string;
|
|
8
|
-
};
|
|
9
|
-
type: string;
|
|
10
|
-
};
|
|
11
|
-
payload_hashes: {
|
|
12
|
-
items: {
|
|
13
|
-
type: string;
|
|
14
|
-
};
|
|
15
|
-
type: string;
|
|
16
|
-
};
|
|
17
|
-
payload_schemas: {
|
|
18
|
-
items: {
|
|
19
|
-
type: string;
|
|
20
|
-
};
|
|
21
|
-
type: string;
|
|
22
|
-
};
|
|
23
|
-
previous_hashes: {
|
|
24
|
-
items: {
|
|
25
|
-
nullable: boolean;
|
|
26
|
-
type: string;
|
|
27
|
-
};
|
|
28
|
-
type: string;
|
|
29
|
-
};
|
|
30
|
-
schema: {
|
|
31
|
-
type: string;
|
|
32
|
-
};
|
|
33
|
-
};
|
|
34
|
-
required: string[];
|
|
35
|
-
type: string;
|
|
36
|
-
};
|
|
37
|
-
export { XyoBoundWitnessBodySchema };
|
|
1
|
+
declare const XyoBoundWitnessBodySchema: {
|
|
2
|
+
$id: string;
|
|
3
|
+
additionalProperties: boolean;
|
|
4
|
+
properties: {
|
|
5
|
+
addresses: {
|
|
6
|
+
items: {
|
|
7
|
+
type: string;
|
|
8
|
+
};
|
|
9
|
+
type: string;
|
|
10
|
+
};
|
|
11
|
+
payload_hashes: {
|
|
12
|
+
items: {
|
|
13
|
+
type: string;
|
|
14
|
+
};
|
|
15
|
+
type: string;
|
|
16
|
+
};
|
|
17
|
+
payload_schemas: {
|
|
18
|
+
items: {
|
|
19
|
+
type: string;
|
|
20
|
+
};
|
|
21
|
+
type: string;
|
|
22
|
+
};
|
|
23
|
+
previous_hashes: {
|
|
24
|
+
items: {
|
|
25
|
+
nullable: boolean;
|
|
26
|
+
type: string;
|
|
27
|
+
};
|
|
28
|
+
type: string;
|
|
29
|
+
};
|
|
30
|
+
schema: {
|
|
31
|
+
type: string;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
required: string[];
|
|
35
|
+
type: string;
|
|
36
|
+
};
|
|
37
|
+
export { XyoBoundWitnessBodySchema };
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
//Should type as JSONSchemaType<XyoBoundWitnessBody> once ajv/eslint issue is fixed
|
|
2
|
-
//https://github.com/microsoft/TypeScript/issues/44851
|
|
3
|
-
const XyoBoundWitnessBodySchema = {
|
|
4
|
-
$id: 'https://schemas.xyo.network/2.0/boundwitness/body',
|
|
5
|
-
additionalProperties: false,
|
|
6
|
-
properties: {
|
|
7
|
-
addresses: { items: { type: 'string' }, type: 'array' },
|
|
8
|
-
payload_hashes: { items: { type: 'string' }, type: 'array' },
|
|
9
|
-
payload_schemas: { items: { type: 'string' }, type: 'array' },
|
|
10
|
-
previous_hashes: { items: { nullable: true, type: 'string' }, type: 'array' },
|
|
11
|
-
schema: { type: 'string' },
|
|
12
|
-
},
|
|
13
|
-
required: ['addresses', 'payload_hashes', 'payload_schemas', 'previous_hashes', 'schema'],
|
|
14
|
-
type: 'object',
|
|
15
|
-
};
|
|
16
|
-
export { XyoBoundWitnessBodySchema };
|
|
1
|
+
//Should type as JSONSchemaType<XyoBoundWitnessBody> once ajv/eslint issue is fixed
|
|
2
|
+
//https://github.com/microsoft/TypeScript/issues/44851
|
|
3
|
+
const XyoBoundWitnessBodySchema = {
|
|
4
|
+
$id: 'https://schemas.xyo.network/2.0/boundwitness/body',
|
|
5
|
+
additionalProperties: false,
|
|
6
|
+
properties: {
|
|
7
|
+
addresses: { items: { type: 'string' }, type: 'array' },
|
|
8
|
+
payload_hashes: { items: { type: 'string' }, type: 'array' },
|
|
9
|
+
payload_schemas: { items: { type: 'string' }, type: 'array' },
|
|
10
|
+
previous_hashes: { items: { nullable: true, type: 'string' }, type: 'array' },
|
|
11
|
+
schema: { type: 'string' },
|
|
12
|
+
},
|
|
13
|
+
required: ['addresses', 'payload_hashes', 'payload_schemas', 'previous_hashes', 'schema'],
|
|
14
|
+
type: 'object',
|
|
15
|
+
};
|
|
16
|
+
export { XyoBoundWitnessBodySchema };
|
|
17
17
|
//# sourceMappingURL=XyoBoundWitnessBodySchema.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './XyoBoundWitnessBody';
|
|
2
|
-
export * from './XyoBoundWitnessBodySchema';
|
|
1
|
+
export * from './XyoBoundWitnessBody';
|
|
2
|
+
export * from './XyoBoundWitnessBodySchema';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from './XyoBoundWitnessBody';
|
|
2
|
-
export * from './XyoBoundWitnessBodySchema';
|
|
1
|
+
export * from './XyoBoundWitnessBody';
|
|
2
|
+
export * from './XyoBoundWitnessBodySchema';
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { XyoPayloadBody } from '../../../Payload';
|
|
2
|
-
interface XyoBoundWitnessMeta {
|
|
3
|
-
[key: string]: unknown;
|
|
4
|
-
_client?: string;
|
|
5
|
-
_hash?: string;
|
|
6
|
-
_archive?: string;
|
|
7
|
-
_payloads?: XyoPayloadBody[];
|
|
8
|
-
_signatures?: string[];
|
|
9
|
-
_timestamp?: number;
|
|
10
|
-
_source_ip?: string;
|
|
11
|
-
_user_agent?: string;
|
|
12
|
-
}
|
|
13
|
-
export type { XyoBoundWitnessMeta };
|
|
1
|
+
import { XyoPayloadBody } from '../../../Payload';
|
|
2
|
+
interface XyoBoundWitnessMeta {
|
|
3
|
+
[key: string]: unknown;
|
|
4
|
+
_client?: string;
|
|
5
|
+
_hash?: string;
|
|
6
|
+
_archive?: string;
|
|
7
|
+
_payloads?: XyoPayloadBody[];
|
|
8
|
+
_signatures?: string[];
|
|
9
|
+
_timestamp?: number;
|
|
10
|
+
_source_ip?: string;
|
|
11
|
+
_user_agent?: string;
|
|
12
|
+
}
|
|
13
|
+
export type { XyoBoundWitnessMeta };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
|
2
2
|
//# sourceMappingURL=XyoBoundWitnessMeta.js.map
|