// Generated by scripts/generate-validators.ts. Do not edit. // @ts-nocheck "use strict";export const validateAdapterRequest = validate10;const schema11 = {"type":"object","additionalProperties":false,"required":["protocol","id","operation","payload"],"properties":{"protocol":{"type":"string","const":"psbt-lab.adapter/0.2"},"id":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$"},"operation":{"type":"string","enum":["hello","native-parse","inspect","roundtrip","sign","combine","finalize","finalize-inputs","extract","convert","construct","musig2-nonce","musig2-partial-sign","musig2-aggregate","silent-payment-send","silent-payment-send-advanced","silent-payment-spend"]},"payload":{"type":"object","required":[],"additionalProperties":true}}};const pattern0 = new RegExp("^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$", "u");function validate10(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){if(data.protocol === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "protocol"},message:"must have required property '"+"protocol"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.id === undefined){const err1 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "id"},message:"must have required property '"+"id"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data.operation === undefined){const err2 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "operation"},message:"must have required property '"+"operation"+"'"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}if(data.payload === undefined){const err3 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "payload"},message:"must have required property '"+"payload"+"'"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}for(const key0 in data){if(!((((key0 === "protocol") || (key0 === "id")) || (key0 === "operation")) || (key0 === "payload"))){const err4 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}if(data.protocol !== undefined){let data0 = data.protocol;if(typeof data0 !== "string"){const err5 = {instancePath:instancePath+"/protocol",schemaPath:"#/properties/protocol/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}if("psbt-lab.adapter/0.2" !== data0){const err6 = {instancePath:instancePath+"/protocol",schemaPath:"#/properties/protocol/const",keyword:"const",params:{allowedValue: "psbt-lab.adapter/0.2"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}if(data.id !== undefined){let data1 = data.id;if(typeof data1 === "string"){if(!pattern0.test(data1)){const err7 = {instancePath:instancePath+"/id",schemaPath:"#/properties/id/pattern",keyword:"pattern",params:{pattern: "^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$"},message:"must match pattern \""+"^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$"+"\""};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}}else {const err8 = {instancePath:instancePath+"/id",schemaPath:"#/properties/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}}if(data.operation !== undefined){let data2 = data.operation;if(typeof data2 !== "string"){const err9 = {instancePath:instancePath+"/operation",schemaPath:"#/properties/operation/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}if(!(((((((((((((((((data2 === "hello") || (data2 === "native-parse")) || (data2 === "inspect")) || (data2 === "roundtrip")) || (data2 === "sign")) || (data2 === "combine")) || (data2 === "finalize")) || (data2 === "finalize-inputs")) || (data2 === "extract")) || (data2 === "convert")) || (data2 === "construct")) || (data2 === "musig2-nonce")) || (data2 === "musig2-partial-sign")) || (data2 === "musig2-aggregate")) || (data2 === "silent-payment-send")) || (data2 === "silent-payment-send-advanced")) || (data2 === "silent-payment-spend"))){const err10 = {instancePath:instancePath+"/operation",schemaPath:"#/properties/operation/enum",keyword:"enum",params:{allowedValues: schema11.properties.operation.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}}if(data.payload !== undefined){let data3 = data.payload;if(data3 && typeof data3 == "object" && !Array.isArray(data3)){}else {const err11 = {instancePath:instancePath+"/payload",schemaPath:"#/properties/payload/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}}}else {const err12 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}validate10.errors = vErrors;return errors === 0;}export const validateAdapterResponse = validate11;const schema12 = {"type":"object","additionalProperties":false,"required":["protocol","id","status","implementation"],"properties":{"protocol":{"type":"string","const":"psbt-lab.adapter/0.2"},"id":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$"},"status":{"type":"string","enum":["ok","unsupported","rejected","crashed","timeout"]},"implementation":{"type":"object","additionalProperties":false,"required":["name","version","artifactDigest"],"properties":{"name":{"type":"string","minLength":1,"maxLength":128},"version":{"type":"string","minLength":1,"maxLength":128},"artifactDigest":{"type":"string","pattern":"^sha256:[0-9a-f]{64}$"},"sourceRevision":{"type":"string","minLength":1,"maxLength":256}}},"output":{"type":"object","required":[],"additionalProperties":true},"error":{"type":"object","additionalProperties":false,"required":["class","message"],"properties":{"class":{"type":"string","minLength":1,"maxLength":128},"message":{"type":"string","minLength":1,"maxLength":2048},"retryable":{"type":"boolean"}}}},"oneOf":[{"properties":{"status":{"const":"ok"},"output":{"type":"object","required":[],"additionalProperties":true},"error":false},"required":["output"]},{"properties":{"status":{"enum":["unsupported","rejected","crashed","timeout"]},"error":{"type":"object","additionalProperties":false,"required":["class","message"],"properties":{"class":{"type":"string","minLength":1,"maxLength":128},"message":{"type":"string","minLength":1,"maxLength":2048},"retryable":{"type":"boolean"}}},"output":false},"required":["error"]}]};function func2(value){let length=0;for(let index=0;index=0xd800&&code<=0xdbff&&index+1 128){const err9 = {instancePath:instancePath+"/error/class",schemaPath:"#/oneOf/1/properties/error/properties/class/maxLength",keyword:"maxLength",params:{limit: 128},message:"must NOT have more than 128 characters"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}if(func2(data5) < 1){const err10 = {instancePath:instancePath+"/error/class",schemaPath:"#/oneOf/1/properties/error/properties/class/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}}else {const err11 = {instancePath:instancePath+"/error/class",schemaPath:"#/oneOf/1/properties/error/properties/class/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}}if(data4.message !== undefined){let data6 = data4.message;if(typeof data6 === "string"){if(func2(data6) > 2048){const err12 = {instancePath:instancePath+"/error/message",schemaPath:"#/oneOf/1/properties/error/properties/message/maxLength",keyword:"maxLength",params:{limit: 2048},message:"must NOT have more than 2048 characters"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}if(func2(data6) < 1){const err13 = {instancePath:instancePath+"/error/message",schemaPath:"#/oneOf/1/properties/error/properties/message/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}}else {const err14 = {instancePath:instancePath+"/error/message",schemaPath:"#/oneOf/1/properties/error/properties/message/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}}if(data4.retryable !== undefined){if(typeof data4.retryable !== "boolean"){const err15 = {instancePath:instancePath+"/error/retryable",schemaPath:"#/oneOf/1/properties/error/properties/retryable/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}}}else {const err16 = {instancePath:instancePath+"/error",schemaPath:"#/oneOf/1/properties/error/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}}if(data.output !== undefined){const err17 = {instancePath:instancePath+"/output",schemaPath:"#/oneOf/1/properties/output/false schema",keyword:"false schema",params:{},message:"boolean schema is false"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}}var _valid0 = _errs7 === errors;if(_valid0 && valid0){valid0 = false;passing0 = [passing0, 1];}else {if(_valid0){valid0 = true;passing0 = 1;}}if(!valid0){const err18 = {instancePath,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas: passing0},message:"must match exactly one schema in oneOf"};if(vErrors === null){vErrors = [err18];}else {vErrors.push(err18);}errors++;}else {errors = _errs1;if(vErrors !== null){if(_errs1){vErrors.length = _errs1;}else {vErrors = null;}}}if(data && typeof data == "object" && !Array.isArray(data)){if(data.protocol === undefined){const err19 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "protocol"},message:"must have required property '"+"protocol"+"'"};if(vErrors === null){vErrors = [err19];}else {vErrors.push(err19);}errors++;}if(data.id === undefined){const err20 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "id"},message:"must have required property '"+"id"+"'"};if(vErrors === null){vErrors = [err20];}else {vErrors.push(err20);}errors++;}if(data.status === undefined){const err21 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "status"},message:"must have required property '"+"status"+"'"};if(vErrors === null){vErrors = [err21];}else {vErrors.push(err21);}errors++;}if(data.implementation === undefined){const err22 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "implementation"},message:"must have required property '"+"implementation"+"'"};if(vErrors === null){vErrors = [err22];}else {vErrors.push(err22);}errors++;}for(const key1 in data){if(!((((((key1 === "protocol") || (key1 === "id")) || (key1 === "status")) || (key1 === "implementation")) || (key1 === "output")) || (key1 === "error"))){const err23 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key1},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err23];}else {vErrors.push(err23);}errors++;}}if(data.protocol !== undefined){let data9 = data.protocol;if(typeof data9 !== "string"){const err24 = {instancePath:instancePath+"/protocol",schemaPath:"#/properties/protocol/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err24];}else {vErrors.push(err24);}errors++;}if("psbt-lab.adapter/0.2" !== data9){const err25 = {instancePath:instancePath+"/protocol",schemaPath:"#/properties/protocol/const",keyword:"const",params:{allowedValue: "psbt-lab.adapter/0.2"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err25];}else {vErrors.push(err25);}errors++;}}if(data.id !== undefined){let data10 = data.id;if(typeof data10 === "string"){if(!pattern0.test(data10)){const err26 = {instancePath:instancePath+"/id",schemaPath:"#/properties/id/pattern",keyword:"pattern",params:{pattern: "^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$"},message:"must match pattern \""+"^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$"+"\""};if(vErrors === null){vErrors = [err26];}else {vErrors.push(err26);}errors++;}}else {const err27 = {instancePath:instancePath+"/id",schemaPath:"#/properties/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err27];}else {vErrors.push(err27);}errors++;}}if(data.status !== undefined){let data11 = data.status;if(typeof data11 !== "string"){const err28 = {instancePath:instancePath+"/status",schemaPath:"#/properties/status/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err28];}else {vErrors.push(err28);}errors++;}if(!(((((data11 === "ok") || (data11 === "unsupported")) || (data11 === "rejected")) || (data11 === "crashed")) || (data11 === "timeout"))){const err29 = {instancePath:instancePath+"/status",schemaPath:"#/properties/status/enum",keyword:"enum",params:{allowedValues: schema12.properties.status.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err29];}else {vErrors.push(err29);}errors++;}}if(data.implementation !== undefined){let data12 = data.implementation;if(data12 && typeof data12 == "object" && !Array.isArray(data12)){if(data12.name === undefined){const err30 = {instancePath:instancePath+"/implementation",schemaPath:"#/properties/implementation/required",keyword:"required",params:{missingProperty: "name"},message:"must have required property '"+"name"+"'"};if(vErrors === null){vErrors = [err30];}else {vErrors.push(err30);}errors++;}if(data12.version === undefined){const err31 = {instancePath:instancePath+"/implementation",schemaPath:"#/properties/implementation/required",keyword:"required",params:{missingProperty: "version"},message:"must have required property '"+"version"+"'"};if(vErrors === null){vErrors = [err31];}else {vErrors.push(err31);}errors++;}if(data12.artifactDigest === undefined){const err32 = {instancePath:instancePath+"/implementation",schemaPath:"#/properties/implementation/required",keyword:"required",params:{missingProperty: "artifactDigest"},message:"must have required property '"+"artifactDigest"+"'"};if(vErrors === null){vErrors = [err32];}else {vErrors.push(err32);}errors++;}for(const key2 in data12){if(!((((key2 === "name") || (key2 === "version")) || (key2 === "artifactDigest")) || (key2 === "sourceRevision"))){const err33 = {instancePath:instancePath+"/implementation",schemaPath:"#/properties/implementation/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key2},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err33];}else {vErrors.push(err33);}errors++;}}if(data12.name !== undefined){let data13 = data12.name;if(typeof data13 === "string"){if(func2(data13) > 128){const err34 = {instancePath:instancePath+"/implementation/name",schemaPath:"#/properties/implementation/properties/name/maxLength",keyword:"maxLength",params:{limit: 128},message:"must NOT have more than 128 characters"};if(vErrors === null){vErrors = [err34];}else {vErrors.push(err34);}errors++;}if(func2(data13) < 1){const err35 = {instancePath:instancePath+"/implementation/name",schemaPath:"#/properties/implementation/properties/name/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err35];}else {vErrors.push(err35);}errors++;}}else {const err36 = {instancePath:instancePath+"/implementation/name",schemaPath:"#/properties/implementation/properties/name/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err36];}else {vErrors.push(err36);}errors++;}}if(data12.version !== undefined){let data14 = data12.version;if(typeof data14 === "string"){if(func2(data14) > 128){const err37 = {instancePath:instancePath+"/implementation/version",schemaPath:"#/properties/implementation/properties/version/maxLength",keyword:"maxLength",params:{limit: 128},message:"must NOT have more than 128 characters"};if(vErrors === null){vErrors = [err37];}else {vErrors.push(err37);}errors++;}if(func2(data14) < 1){const err38 = {instancePath:instancePath+"/implementation/version",schemaPath:"#/properties/implementation/properties/version/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err38];}else {vErrors.push(err38);}errors++;}}else {const err39 = {instancePath:instancePath+"/implementation/version",schemaPath:"#/properties/implementation/properties/version/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err39];}else {vErrors.push(err39);}errors++;}}if(data12.artifactDigest !== undefined){let data15 = data12.artifactDigest;if(typeof data15 === "string"){if(!pattern2.test(data15)){const err40 = {instancePath:instancePath+"/implementation/artifactDigest",schemaPath:"#/properties/implementation/properties/artifactDigest/pattern",keyword:"pattern",params:{pattern: "^sha256:[0-9a-f]{64}$"},message:"must match pattern \""+"^sha256:[0-9a-f]{64}$"+"\""};if(vErrors === null){vErrors = [err40];}else {vErrors.push(err40);}errors++;}}else {const err41 = {instancePath:instancePath+"/implementation/artifactDigest",schemaPath:"#/properties/implementation/properties/artifactDigest/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err41];}else {vErrors.push(err41);}errors++;}}if(data12.sourceRevision !== undefined){let data16 = data12.sourceRevision;if(typeof data16 === "string"){if(func2(data16) > 256){const err42 = {instancePath:instancePath+"/implementation/sourceRevision",schemaPath:"#/properties/implementation/properties/sourceRevision/maxLength",keyword:"maxLength",params:{limit: 256},message:"must NOT have more than 256 characters"};if(vErrors === null){vErrors = [err42];}else {vErrors.push(err42);}errors++;}if(func2(data16) < 1){const err43 = {instancePath:instancePath+"/implementation/sourceRevision",schemaPath:"#/properties/implementation/properties/sourceRevision/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err43];}else {vErrors.push(err43);}errors++;}}else {const err44 = {instancePath:instancePath+"/implementation/sourceRevision",schemaPath:"#/properties/implementation/properties/sourceRevision/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err44];}else {vErrors.push(err44);}errors++;}}}else {const err45 = {instancePath:instancePath+"/implementation",schemaPath:"#/properties/implementation/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err45];}else {vErrors.push(err45);}errors++;}}if(data.output !== undefined){let data17 = data.output;if(data17 && typeof data17 == "object" && !Array.isArray(data17)){}else {const err46 = {instancePath:instancePath+"/output",schemaPath:"#/properties/output/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err46];}else {vErrors.push(err46);}errors++;}}if(data.error !== undefined){let data18 = data.error;if(data18 && typeof data18 == "object" && !Array.isArray(data18)){if(data18.class === undefined){const err47 = {instancePath:instancePath+"/error",schemaPath:"#/properties/error/required",keyword:"required",params:{missingProperty: "class"},message:"must have required property '"+"class"+"'"};if(vErrors === null){vErrors = [err47];}else {vErrors.push(err47);}errors++;}if(data18.message === undefined){const err48 = {instancePath:instancePath+"/error",schemaPath:"#/properties/error/required",keyword:"required",params:{missingProperty: "message"},message:"must have required property '"+"message"+"'"};if(vErrors === null){vErrors = [err48];}else {vErrors.push(err48);}errors++;}for(const key3 in data18){if(!(((key3 === "class") || (key3 === "message")) || (key3 === "retryable"))){const err49 = {instancePath:instancePath+"/error",schemaPath:"#/properties/error/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key3},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err49];}else {vErrors.push(err49);}errors++;}}if(data18.class !== undefined){let data19 = data18.class;if(typeof data19 === "string"){if(func2(data19) > 128){const err50 = {instancePath:instancePath+"/error/class",schemaPath:"#/properties/error/properties/class/maxLength",keyword:"maxLength",params:{limit: 128},message:"must NOT have more than 128 characters"};if(vErrors === null){vErrors = [err50];}else {vErrors.push(err50);}errors++;}if(func2(data19) < 1){const err51 = {instancePath:instancePath+"/error/class",schemaPath:"#/properties/error/properties/class/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err51];}else {vErrors.push(err51);}errors++;}}else {const err52 = {instancePath:instancePath+"/error/class",schemaPath:"#/properties/error/properties/class/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err52];}else {vErrors.push(err52);}errors++;}}if(data18.message !== undefined){let data20 = data18.message;if(typeof data20 === "string"){if(func2(data20) > 2048){const err53 = {instancePath:instancePath+"/error/message",schemaPath:"#/properties/error/properties/message/maxLength",keyword:"maxLength",params:{limit: 2048},message:"must NOT have more than 2048 characters"};if(vErrors === null){vErrors = [err53];}else {vErrors.push(err53);}errors++;}if(func2(data20) < 1){const err54 = {instancePath:instancePath+"/error/message",schemaPath:"#/properties/error/properties/message/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err54];}else {vErrors.push(err54);}errors++;}}else {const err55 = {instancePath:instancePath+"/error/message",schemaPath:"#/properties/error/properties/message/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err55];}else {vErrors.push(err55);}errors++;}}if(data18.retryable !== undefined){if(typeof data18.retryable !== "boolean"){const err56 = {instancePath:instancePath+"/error/retryable",schemaPath:"#/properties/error/properties/retryable/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};if(vErrors === null){vErrors = [err56];}else {vErrors.push(err56);}errors++;}}}else {const err57 = {instancePath:instancePath+"/error",schemaPath:"#/properties/error/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err57];}else {vErrors.push(err57);}errors++;}}}else {const err58 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err58];}else {vErrors.push(err58);}errors++;}validate11.errors = vErrors;return errors === 0;}export const validateAdapterHelloCapabilities = validate12;const schema13 = {"type":"object","additionalProperties":false,"required":["operations","roles","psbtVersions","scriptTypes"],"properties":{"operations":{"type":"array","minItems":1,"maxItems":17,"uniqueItems":true,"items":{"type":"string","enum":["hello","native-parse","inspect","roundtrip","sign","combine","finalize","finalize-inputs","extract","convert","construct","musig2-nonce","musig2-partial-sign","musig2-aggregate","silent-payment-send","silent-payment-send-advanced","silent-payment-spend"]}},"roles":{"type":"array","minItems":1,"maxItems":7,"uniqueItems":true,"items":{"type":"string","enum":["parser","updater","signer","combiner","finalizer","extractor","constructor"]}},"psbtVersions":{"type":"array","minItems":1,"maxItems":2,"uniqueItems":true,"items":{"type":"integer","enum":[0,2]}},"scriptTypes":{"type":"array","minItems":1,"maxItems":7,"uniqueItems":true,"items":{"type":"string","enum":["p2pkh","p2sh-p2wpkh","p2sh-p2wsh","p2wpkh","p2wsh","p2tr-keypath","p2tr-scriptpath"]}},"operationScriptTypes":{"type":"object","additionalProperties":false,"required":[],"properties":{"inspect":{"type":"array","maxItems":7,"uniqueItems":true,"items":{"type":"string","enum":["p2pkh","p2sh-p2wpkh","p2sh-p2wsh","p2wpkh","p2wsh","p2tr-keypath","p2tr-scriptpath"]}},"roundtrip":{"type":"array","maxItems":7,"uniqueItems":true,"items":{"type":"string","enum":["p2pkh","p2sh-p2wpkh","p2sh-p2wsh","p2wpkh","p2wsh","p2tr-keypath","p2tr-scriptpath"]}},"sign":{"type":"array","maxItems":7,"uniqueItems":true,"items":{"type":"string","enum":["p2pkh","p2sh-p2wpkh","p2sh-p2wsh","p2wpkh","p2wsh","p2tr-keypath","p2tr-scriptpath"]}},"combine":{"type":"array","maxItems":7,"uniqueItems":true,"items":{"type":"string","enum":["p2pkh","p2sh-p2wpkh","p2sh-p2wsh","p2wpkh","p2wsh","p2tr-keypath","p2tr-scriptpath"]}},"finalize":{"type":"array","maxItems":7,"uniqueItems":true,"items":{"type":"string","enum":["p2pkh","p2sh-p2wpkh","p2sh-p2wsh","p2wpkh","p2wsh","p2tr-keypath","p2tr-scriptpath"]}},"finalize-inputs":{"type":"array","maxItems":7,"uniqueItems":true,"items":{"type":"string","enum":["p2pkh","p2sh-p2wpkh","p2sh-p2wsh","p2wpkh","p2wsh","p2tr-keypath","p2tr-scriptpath"]}},"extract":{"type":"array","maxItems":7,"uniqueItems":true,"items":{"type":"string","enum":["p2pkh","p2sh-p2wpkh","p2sh-p2wsh","p2wpkh","p2wsh","p2tr-keypath","p2tr-scriptpath"]}},"convert":{"type":"array","maxItems":7,"uniqueItems":true,"items":{"type":"string","enum":["p2pkh","p2sh-p2wpkh","p2sh-p2wsh","p2wpkh","p2wsh","p2tr-keypath","p2tr-scriptpath"]}},"construct":{"type":"array","maxItems":7,"uniqueItems":true,"items":{"type":"string","enum":["p2pkh","p2sh-p2wpkh","p2sh-p2wsh","p2wpkh","p2wsh","p2tr-keypath","p2tr-scriptpath"]}},"musig2-nonce":{"type":"array","maxItems":7,"uniqueItems":true,"items":{"type":"string","enum":["p2pkh","p2sh-p2wpkh","p2sh-p2wsh","p2wpkh","p2wsh","p2tr-keypath","p2tr-scriptpath"]}},"musig2-partial-sign":{"type":"array","maxItems":7,"uniqueItems":true,"items":{"type":"string","enum":["p2pkh","p2sh-p2wpkh","p2sh-p2wsh","p2wpkh","p2wsh","p2tr-keypath","p2tr-scriptpath"]}},"musig2-aggregate":{"type":"array","maxItems":7,"uniqueItems":true,"items":{"type":"string","enum":["p2pkh","p2sh-p2wpkh","p2sh-p2wsh","p2wpkh","p2wsh","p2tr-keypath","p2tr-scriptpath"]}},"silent-payment-send":{"type":"array","maxItems":7,"uniqueItems":true,"items":{"type":"string","enum":["p2pkh","p2sh-p2wpkh","p2sh-p2wsh","p2wpkh","p2wsh","p2tr-keypath","p2tr-scriptpath"]}},"silent-payment-send-advanced":{"type":"array","maxItems":7,"uniqueItems":true,"items":{"type":"string","enum":["p2pkh","p2sh-p2wpkh","p2sh-p2wsh","p2wpkh","p2wsh","p2tr-keypath","p2tr-scriptpath"]}},"silent-payment-spend":{"type":"array","maxItems":7,"uniqueItems":true,"items":{"type":"string","enum":["p2pkh","p2sh-p2wpkh","p2sh-p2wsh","p2wpkh","p2wsh","p2tr-keypath","p2tr-scriptpath"]}}}},"features":{"type":"array","maxItems":64,"uniqueItems":true,"items":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$"}}}};const func16 = Object.prototype.hasOwnProperty;function validate12(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){if(data.operations === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "operations"},message:"must have required property '"+"operations"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.roles === undefined){const err1 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "roles"},message:"must have required property '"+"roles"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data.psbtVersions === undefined){const err2 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "psbtVersions"},message:"must have required property '"+"psbtVersions"+"'"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}if(data.scriptTypes === undefined){const err3 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "scriptTypes"},message:"must have required property '"+"scriptTypes"+"'"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}for(const key0 in data){if(!((((((key0 === "operations") || (key0 === "roles")) || (key0 === "psbtVersions")) || (key0 === "scriptTypes")) || (key0 === "operationScriptTypes")) || (key0 === "features"))){const err4 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}if(data.operations !== undefined){let data0 = data.operations;if(Array.isArray(data0)){if(data0.length > 17){const err5 = {instancePath:instancePath+"/operations",schemaPath:"#/properties/operations/maxItems",keyword:"maxItems",params:{limit: 17},message:"must NOT have more than 17 items"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}if(data0.length < 1){const err6 = {instancePath:instancePath+"/operations",schemaPath:"#/properties/operations/minItems",keyword:"minItems",params:{limit: 1},message:"must NOT have fewer than 1 items"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}const len0 = data0.length;for(let i0=0; i0 1){const indices0 = {};for(;i1--;){let item0 = data0[i1];if(typeof item0 !== "string"){continue;}if(typeof indices0[item0] == "number"){j0 = indices0[item0];const err9 = {instancePath:instancePath+"/operations",schemaPath:"#/properties/operations/uniqueItems",keyword:"uniqueItems",params:{i: i1, j: j0},message:"must NOT have duplicate items (items ## "+j0+" and "+i1+" are identical)"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;break;}indices0[item0] = i1;}}}else {const err10 = {instancePath:instancePath+"/operations",schemaPath:"#/properties/operations/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}}if(data.roles !== undefined){let data2 = data.roles;if(Array.isArray(data2)){if(data2.length > 7){const err11 = {instancePath:instancePath+"/roles",schemaPath:"#/properties/roles/maxItems",keyword:"maxItems",params:{limit: 7},message:"must NOT have more than 7 items"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}if(data2.length < 1){const err12 = {instancePath:instancePath+"/roles",schemaPath:"#/properties/roles/minItems",keyword:"minItems",params:{limit: 1},message:"must NOT have fewer than 1 items"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}const len1 = data2.length;for(let i2=0; i2 1){const indices1 = {};for(;i3--;){let item1 = data2[i3];if(typeof item1 !== "string"){continue;}if(typeof indices1[item1] == "number"){j1 = indices1[item1];const err15 = {instancePath:instancePath+"/roles",schemaPath:"#/properties/roles/uniqueItems",keyword:"uniqueItems",params:{i: i3, j: j1},message:"must NOT have duplicate items (items ## "+j1+" and "+i3+" are identical)"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;break;}indices1[item1] = i3;}}}else {const err16 = {instancePath:instancePath+"/roles",schemaPath:"#/properties/roles/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}}if(data.psbtVersions !== undefined){let data4 = data.psbtVersions;if(Array.isArray(data4)){if(data4.length > 2){const err17 = {instancePath:instancePath+"/psbtVersions",schemaPath:"#/properties/psbtVersions/maxItems",keyword:"maxItems",params:{limit: 2},message:"must NOT have more than 2 items"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}if(data4.length < 1){const err18 = {instancePath:instancePath+"/psbtVersions",schemaPath:"#/properties/psbtVersions/minItems",keyword:"minItems",params:{limit: 1},message:"must NOT have fewer than 1 items"};if(vErrors === null){vErrors = [err18];}else {vErrors.push(err18);}errors++;}const len2 = data4.length;for(let i4=0; i4 1){const indices2 = {};for(;i5--;){let item2 = data4[i5];if(!(((typeof item2 == "number") && (!(item2 % 1) && !isNaN(item2))) && (isFinite(item2)))){continue;}if(typeof indices2[item2] == "number"){j2 = indices2[item2];const err21 = {instancePath:instancePath+"/psbtVersions",schemaPath:"#/properties/psbtVersions/uniqueItems",keyword:"uniqueItems",params:{i: i5, j: j2},message:"must NOT have duplicate items (items ## "+j2+" and "+i5+" are identical)"};if(vErrors === null){vErrors = [err21];}else {vErrors.push(err21);}errors++;break;}indices2[item2] = i5;}}}else {const err22 = {instancePath:instancePath+"/psbtVersions",schemaPath:"#/properties/psbtVersions/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err22];}else {vErrors.push(err22);}errors++;}}if(data.scriptTypes !== undefined){let data6 = data.scriptTypes;if(Array.isArray(data6)){if(data6.length > 7){const err23 = {instancePath:instancePath+"/scriptTypes",schemaPath:"#/properties/scriptTypes/maxItems",keyword:"maxItems",params:{limit: 7},message:"must NOT have more than 7 items"};if(vErrors === null){vErrors = [err23];}else {vErrors.push(err23);}errors++;}if(data6.length < 1){const err24 = {instancePath:instancePath+"/scriptTypes",schemaPath:"#/properties/scriptTypes/minItems",keyword:"minItems",params:{limit: 1},message:"must NOT have fewer than 1 items"};if(vErrors === null){vErrors = [err24];}else {vErrors.push(err24);}errors++;}const len3 = data6.length;for(let i6=0; i6 1){const indices3 = {};for(;i7--;){let item3 = data6[i7];if(typeof item3 !== "string"){continue;}if(typeof indices3[item3] == "number"){j3 = indices3[item3];const err27 = {instancePath:instancePath+"/scriptTypes",schemaPath:"#/properties/scriptTypes/uniqueItems",keyword:"uniqueItems",params:{i: i7, j: j3},message:"must NOT have duplicate items (items ## "+j3+" and "+i7+" are identical)"};if(vErrors === null){vErrors = [err27];}else {vErrors.push(err27);}errors++;break;}indices3[item3] = i7;}}}else {const err28 = {instancePath:instancePath+"/scriptTypes",schemaPath:"#/properties/scriptTypes/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err28];}else {vErrors.push(err28);}errors++;}}if(data.operationScriptTypes !== undefined){let data8 = data.operationScriptTypes;if(data8 && typeof data8 == "object" && !Array.isArray(data8)){for(const key1 in data8){if(!(func16.call(schema13.properties.operationScriptTypes.properties, key1))){const err29 = {instancePath:instancePath+"/operationScriptTypes",schemaPath:"#/properties/operationScriptTypes/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key1},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err29];}else {vErrors.push(err29);}errors++;}}if(data8.inspect !== undefined){let data9 = data8.inspect;if(Array.isArray(data9)){if(data9.length > 7){const err30 = {instancePath:instancePath+"/operationScriptTypes/inspect",schemaPath:"#/properties/operationScriptTypes/properties/inspect/maxItems",keyword:"maxItems",params:{limit: 7},message:"must NOT have more than 7 items"};if(vErrors === null){vErrors = [err30];}else {vErrors.push(err30);}errors++;}const len4 = data9.length;for(let i8=0; i8 1){const indices4 = {};for(;i9--;){let item4 = data9[i9];if(typeof item4 !== "string"){continue;}if(typeof indices4[item4] == "number"){j4 = indices4[item4];const err33 = {instancePath:instancePath+"/operationScriptTypes/inspect",schemaPath:"#/properties/operationScriptTypes/properties/inspect/uniqueItems",keyword:"uniqueItems",params:{i: i9, j: j4},message:"must NOT have duplicate items (items ## "+j4+" and "+i9+" are identical)"};if(vErrors === null){vErrors = [err33];}else {vErrors.push(err33);}errors++;break;}indices4[item4] = i9;}}}else {const err34 = {instancePath:instancePath+"/operationScriptTypes/inspect",schemaPath:"#/properties/operationScriptTypes/properties/inspect/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err34];}else {vErrors.push(err34);}errors++;}}if(data8.roundtrip !== undefined){let data11 = data8.roundtrip;if(Array.isArray(data11)){if(data11.length > 7){const err35 = {instancePath:instancePath+"/operationScriptTypes/roundtrip",schemaPath:"#/properties/operationScriptTypes/properties/roundtrip/maxItems",keyword:"maxItems",params:{limit: 7},message:"must NOT have more than 7 items"};if(vErrors === null){vErrors = [err35];}else {vErrors.push(err35);}errors++;}const len5 = data11.length;for(let i10=0; i10 1){const indices5 = {};for(;i11--;){let item5 = data11[i11];if(typeof item5 !== "string"){continue;}if(typeof indices5[item5] == "number"){j5 = indices5[item5];const err38 = {instancePath:instancePath+"/operationScriptTypes/roundtrip",schemaPath:"#/properties/operationScriptTypes/properties/roundtrip/uniqueItems",keyword:"uniqueItems",params:{i: i11, j: j5},message:"must NOT have duplicate items (items ## "+j5+" and "+i11+" are identical)"};if(vErrors === null){vErrors = [err38];}else {vErrors.push(err38);}errors++;break;}indices5[item5] = i11;}}}else {const err39 = {instancePath:instancePath+"/operationScriptTypes/roundtrip",schemaPath:"#/properties/operationScriptTypes/properties/roundtrip/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err39];}else {vErrors.push(err39);}errors++;}}if(data8.sign !== undefined){let data13 = data8.sign;if(Array.isArray(data13)){if(data13.length > 7){const err40 = {instancePath:instancePath+"/operationScriptTypes/sign",schemaPath:"#/properties/operationScriptTypes/properties/sign/maxItems",keyword:"maxItems",params:{limit: 7},message:"must NOT have more than 7 items"};if(vErrors === null){vErrors = [err40];}else {vErrors.push(err40);}errors++;}const len6 = data13.length;for(let i12=0; i12 1){const indices6 = {};for(;i13--;){let item6 = data13[i13];if(typeof item6 !== "string"){continue;}if(typeof indices6[item6] == "number"){j6 = indices6[item6];const err43 = {instancePath:instancePath+"/operationScriptTypes/sign",schemaPath:"#/properties/operationScriptTypes/properties/sign/uniqueItems",keyword:"uniqueItems",params:{i: i13, j: j6},message:"must NOT have duplicate items (items ## "+j6+" and "+i13+" are identical)"};if(vErrors === null){vErrors = [err43];}else {vErrors.push(err43);}errors++;break;}indices6[item6] = i13;}}}else {const err44 = {instancePath:instancePath+"/operationScriptTypes/sign",schemaPath:"#/properties/operationScriptTypes/properties/sign/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err44];}else {vErrors.push(err44);}errors++;}}if(data8.combine !== undefined){let data15 = data8.combine;if(Array.isArray(data15)){if(data15.length > 7){const err45 = {instancePath:instancePath+"/operationScriptTypes/combine",schemaPath:"#/properties/operationScriptTypes/properties/combine/maxItems",keyword:"maxItems",params:{limit: 7},message:"must NOT have more than 7 items"};if(vErrors === null){vErrors = [err45];}else {vErrors.push(err45);}errors++;}const len7 = data15.length;for(let i14=0; i14 1){const indices7 = {};for(;i15--;){let item7 = data15[i15];if(typeof item7 !== "string"){continue;}if(typeof indices7[item7] == "number"){j7 = indices7[item7];const err48 = {instancePath:instancePath+"/operationScriptTypes/combine",schemaPath:"#/properties/operationScriptTypes/properties/combine/uniqueItems",keyword:"uniqueItems",params:{i: i15, j: j7},message:"must NOT have duplicate items (items ## "+j7+" and "+i15+" are identical)"};if(vErrors === null){vErrors = [err48];}else {vErrors.push(err48);}errors++;break;}indices7[item7] = i15;}}}else {const err49 = {instancePath:instancePath+"/operationScriptTypes/combine",schemaPath:"#/properties/operationScriptTypes/properties/combine/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err49];}else {vErrors.push(err49);}errors++;}}if(data8.finalize !== undefined){let data17 = data8.finalize;if(Array.isArray(data17)){if(data17.length > 7){const err50 = {instancePath:instancePath+"/operationScriptTypes/finalize",schemaPath:"#/properties/operationScriptTypes/properties/finalize/maxItems",keyword:"maxItems",params:{limit: 7},message:"must NOT have more than 7 items"};if(vErrors === null){vErrors = [err50];}else {vErrors.push(err50);}errors++;}const len8 = data17.length;for(let i16=0; i16 1){const indices8 = {};for(;i17--;){let item8 = data17[i17];if(typeof item8 !== "string"){continue;}if(typeof indices8[item8] == "number"){j8 = indices8[item8];const err53 = {instancePath:instancePath+"/operationScriptTypes/finalize",schemaPath:"#/properties/operationScriptTypes/properties/finalize/uniqueItems",keyword:"uniqueItems",params:{i: i17, j: j8},message:"must NOT have duplicate items (items ## "+j8+" and "+i17+" are identical)"};if(vErrors === null){vErrors = [err53];}else {vErrors.push(err53);}errors++;break;}indices8[item8] = i17;}}}else {const err54 = {instancePath:instancePath+"/operationScriptTypes/finalize",schemaPath:"#/properties/operationScriptTypes/properties/finalize/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err54];}else {vErrors.push(err54);}errors++;}}if(data8["finalize-inputs"] !== undefined){let data19 = data8["finalize-inputs"];if(Array.isArray(data19)){if(data19.length > 7){const err55 = {instancePath:instancePath+"/operationScriptTypes/finalize-inputs",schemaPath:"#/properties/operationScriptTypes/properties/finalize-inputs/maxItems",keyword:"maxItems",params:{limit: 7},message:"must NOT have more than 7 items"};if(vErrors === null){vErrors = [err55];}else {vErrors.push(err55);}errors++;}const len9 = data19.length;for(let i18=0; i18 1){const indices9 = {};for(;i19--;){let item9 = data19[i19];if(typeof item9 !== "string"){continue;}if(typeof indices9[item9] == "number"){j9 = indices9[item9];const err58 = {instancePath:instancePath+"/operationScriptTypes/finalize-inputs",schemaPath:"#/properties/operationScriptTypes/properties/finalize-inputs/uniqueItems",keyword:"uniqueItems",params:{i: i19, j: j9},message:"must NOT have duplicate items (items ## "+j9+" and "+i19+" are identical)"};if(vErrors === null){vErrors = [err58];}else {vErrors.push(err58);}errors++;break;}indices9[item9] = i19;}}}else {const err59 = {instancePath:instancePath+"/operationScriptTypes/finalize-inputs",schemaPath:"#/properties/operationScriptTypes/properties/finalize-inputs/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err59];}else {vErrors.push(err59);}errors++;}}if(data8.extract !== undefined){let data21 = data8.extract;if(Array.isArray(data21)){if(data21.length > 7){const err60 = {instancePath:instancePath+"/operationScriptTypes/extract",schemaPath:"#/properties/operationScriptTypes/properties/extract/maxItems",keyword:"maxItems",params:{limit: 7},message:"must NOT have more than 7 items"};if(vErrors === null){vErrors = [err60];}else {vErrors.push(err60);}errors++;}const len10 = data21.length;for(let i20=0; i20 1){const indices10 = {};for(;i21--;){let item10 = data21[i21];if(typeof item10 !== "string"){continue;}if(typeof indices10[item10] == "number"){j10 = indices10[item10];const err63 = {instancePath:instancePath+"/operationScriptTypes/extract",schemaPath:"#/properties/operationScriptTypes/properties/extract/uniqueItems",keyword:"uniqueItems",params:{i: i21, j: j10},message:"must NOT have duplicate items (items ## "+j10+" and "+i21+" are identical)"};if(vErrors === null){vErrors = [err63];}else {vErrors.push(err63);}errors++;break;}indices10[item10] = i21;}}}else {const err64 = {instancePath:instancePath+"/operationScriptTypes/extract",schemaPath:"#/properties/operationScriptTypes/properties/extract/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err64];}else {vErrors.push(err64);}errors++;}}if(data8.convert !== undefined){let data23 = data8.convert;if(Array.isArray(data23)){if(data23.length > 7){const err65 = {instancePath:instancePath+"/operationScriptTypes/convert",schemaPath:"#/properties/operationScriptTypes/properties/convert/maxItems",keyword:"maxItems",params:{limit: 7},message:"must NOT have more than 7 items"};if(vErrors === null){vErrors = [err65];}else {vErrors.push(err65);}errors++;}const len11 = data23.length;for(let i22=0; i22 1){const indices11 = {};for(;i23--;){let item11 = data23[i23];if(typeof item11 !== "string"){continue;}if(typeof indices11[item11] == "number"){j11 = indices11[item11];const err68 = {instancePath:instancePath+"/operationScriptTypes/convert",schemaPath:"#/properties/operationScriptTypes/properties/convert/uniqueItems",keyword:"uniqueItems",params:{i: i23, j: j11},message:"must NOT have duplicate items (items ## "+j11+" and "+i23+" are identical)"};if(vErrors === null){vErrors = [err68];}else {vErrors.push(err68);}errors++;break;}indices11[item11] = i23;}}}else {const err69 = {instancePath:instancePath+"/operationScriptTypes/convert",schemaPath:"#/properties/operationScriptTypes/properties/convert/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err69];}else {vErrors.push(err69);}errors++;}}if(data8.construct !== undefined){let data25 = data8.construct;if(Array.isArray(data25)){if(data25.length > 7){const err70 = {instancePath:instancePath+"/operationScriptTypes/construct",schemaPath:"#/properties/operationScriptTypes/properties/construct/maxItems",keyword:"maxItems",params:{limit: 7},message:"must NOT have more than 7 items"};if(vErrors === null){vErrors = [err70];}else {vErrors.push(err70);}errors++;}const len12 = data25.length;for(let i24=0; i24 1){const indices12 = {};for(;i25--;){let item12 = data25[i25];if(typeof item12 !== "string"){continue;}if(typeof indices12[item12] == "number"){j12 = indices12[item12];const err73 = {instancePath:instancePath+"/operationScriptTypes/construct",schemaPath:"#/properties/operationScriptTypes/properties/construct/uniqueItems",keyword:"uniqueItems",params:{i: i25, j: j12},message:"must NOT have duplicate items (items ## "+j12+" and "+i25+" are identical)"};if(vErrors === null){vErrors = [err73];}else {vErrors.push(err73);}errors++;break;}indices12[item12] = i25;}}}else {const err74 = {instancePath:instancePath+"/operationScriptTypes/construct",schemaPath:"#/properties/operationScriptTypes/properties/construct/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err74];}else {vErrors.push(err74);}errors++;}}if(data8["musig2-nonce"] !== undefined){let data27 = data8["musig2-nonce"];if(Array.isArray(data27)){if(data27.length > 7){const err75 = {instancePath:instancePath+"/operationScriptTypes/musig2-nonce",schemaPath:"#/properties/operationScriptTypes/properties/musig2-nonce/maxItems",keyword:"maxItems",params:{limit: 7},message:"must NOT have more than 7 items"};if(vErrors === null){vErrors = [err75];}else {vErrors.push(err75);}errors++;}const len13 = data27.length;for(let i26=0; i26 1){const indices13 = {};for(;i27--;){let item13 = data27[i27];if(typeof item13 !== "string"){continue;}if(typeof indices13[item13] == "number"){j13 = indices13[item13];const err78 = {instancePath:instancePath+"/operationScriptTypes/musig2-nonce",schemaPath:"#/properties/operationScriptTypes/properties/musig2-nonce/uniqueItems",keyword:"uniqueItems",params:{i: i27, j: j13},message:"must NOT have duplicate items (items ## "+j13+" and "+i27+" are identical)"};if(vErrors === null){vErrors = [err78];}else {vErrors.push(err78);}errors++;break;}indices13[item13] = i27;}}}else {const err79 = {instancePath:instancePath+"/operationScriptTypes/musig2-nonce",schemaPath:"#/properties/operationScriptTypes/properties/musig2-nonce/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err79];}else {vErrors.push(err79);}errors++;}}if(data8["musig2-partial-sign"] !== undefined){let data29 = data8["musig2-partial-sign"];if(Array.isArray(data29)){if(data29.length > 7){const err80 = {instancePath:instancePath+"/operationScriptTypes/musig2-partial-sign",schemaPath:"#/properties/operationScriptTypes/properties/musig2-partial-sign/maxItems",keyword:"maxItems",params:{limit: 7},message:"must NOT have more than 7 items"};if(vErrors === null){vErrors = [err80];}else {vErrors.push(err80);}errors++;}const len14 = data29.length;for(let i28=0; i28 1){const indices14 = {};for(;i29--;){let item14 = data29[i29];if(typeof item14 !== "string"){continue;}if(typeof indices14[item14] == "number"){j14 = indices14[item14];const err83 = {instancePath:instancePath+"/operationScriptTypes/musig2-partial-sign",schemaPath:"#/properties/operationScriptTypes/properties/musig2-partial-sign/uniqueItems",keyword:"uniqueItems",params:{i: i29, j: j14},message:"must NOT have duplicate items (items ## "+j14+" and "+i29+" are identical)"};if(vErrors === null){vErrors = [err83];}else {vErrors.push(err83);}errors++;break;}indices14[item14] = i29;}}}else {const err84 = {instancePath:instancePath+"/operationScriptTypes/musig2-partial-sign",schemaPath:"#/properties/operationScriptTypes/properties/musig2-partial-sign/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err84];}else {vErrors.push(err84);}errors++;}}if(data8["musig2-aggregate"] !== undefined){let data31 = data8["musig2-aggregate"];if(Array.isArray(data31)){if(data31.length > 7){const err85 = {instancePath:instancePath+"/operationScriptTypes/musig2-aggregate",schemaPath:"#/properties/operationScriptTypes/properties/musig2-aggregate/maxItems",keyword:"maxItems",params:{limit: 7},message:"must NOT have more than 7 items"};if(vErrors === null){vErrors = [err85];}else {vErrors.push(err85);}errors++;}const len15 = data31.length;for(let i30=0; i30 1){const indices15 = {};for(;i31--;){let item15 = data31[i31];if(typeof item15 !== "string"){continue;}if(typeof indices15[item15] == "number"){j15 = indices15[item15];const err88 = {instancePath:instancePath+"/operationScriptTypes/musig2-aggregate",schemaPath:"#/properties/operationScriptTypes/properties/musig2-aggregate/uniqueItems",keyword:"uniqueItems",params:{i: i31, j: j15},message:"must NOT have duplicate items (items ## "+j15+" and "+i31+" are identical)"};if(vErrors === null){vErrors = [err88];}else {vErrors.push(err88);}errors++;break;}indices15[item15] = i31;}}}else {const err89 = {instancePath:instancePath+"/operationScriptTypes/musig2-aggregate",schemaPath:"#/properties/operationScriptTypes/properties/musig2-aggregate/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err89];}else {vErrors.push(err89);}errors++;}}if(data8["silent-payment-send"] !== undefined){let data33 = data8["silent-payment-send"];if(Array.isArray(data33)){if(data33.length > 7){const err90 = {instancePath:instancePath+"/operationScriptTypes/silent-payment-send",schemaPath:"#/properties/operationScriptTypes/properties/silent-payment-send/maxItems",keyword:"maxItems",params:{limit: 7},message:"must NOT have more than 7 items"};if(vErrors === null){vErrors = [err90];}else {vErrors.push(err90);}errors++;}const len16 = data33.length;for(let i32=0; i32 1){const indices16 = {};for(;i33--;){let item16 = data33[i33];if(typeof item16 !== "string"){continue;}if(typeof indices16[item16] == "number"){j16 = indices16[item16];const err93 = {instancePath:instancePath+"/operationScriptTypes/silent-payment-send",schemaPath:"#/properties/operationScriptTypes/properties/silent-payment-send/uniqueItems",keyword:"uniqueItems",params:{i: i33, j: j16},message:"must NOT have duplicate items (items ## "+j16+" and "+i33+" are identical)"};if(vErrors === null){vErrors = [err93];}else {vErrors.push(err93);}errors++;break;}indices16[item16] = i33;}}}else {const err94 = {instancePath:instancePath+"/operationScriptTypes/silent-payment-send",schemaPath:"#/properties/operationScriptTypes/properties/silent-payment-send/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err94];}else {vErrors.push(err94);}errors++;}}if(data8["silent-payment-send-advanced"] !== undefined){let data35 = data8["silent-payment-send-advanced"];if(Array.isArray(data35)){if(data35.length > 7){const err95 = {instancePath:instancePath+"/operationScriptTypes/silent-payment-send-advanced",schemaPath:"#/properties/operationScriptTypes/properties/silent-payment-send-advanced/maxItems",keyword:"maxItems",params:{limit: 7},message:"must NOT have more than 7 items"};if(vErrors === null){vErrors = [err95];}else {vErrors.push(err95);}errors++;}const len17 = data35.length;for(let i34=0; i34 1){const indices17 = {};for(;i35--;){let item17 = data35[i35];if(typeof item17 !== "string"){continue;}if(typeof indices17[item17] == "number"){j17 = indices17[item17];const err98 = {instancePath:instancePath+"/operationScriptTypes/silent-payment-send-advanced",schemaPath:"#/properties/operationScriptTypes/properties/silent-payment-send-advanced/uniqueItems",keyword:"uniqueItems",params:{i: i35, j: j17},message:"must NOT have duplicate items (items ## "+j17+" and "+i35+" are identical)"};if(vErrors === null){vErrors = [err98];}else {vErrors.push(err98);}errors++;break;}indices17[item17] = i35;}}}else {const err99 = {instancePath:instancePath+"/operationScriptTypes/silent-payment-send-advanced",schemaPath:"#/properties/operationScriptTypes/properties/silent-payment-send-advanced/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err99];}else {vErrors.push(err99);}errors++;}}if(data8["silent-payment-spend"] !== undefined){let data37 = data8["silent-payment-spend"];if(Array.isArray(data37)){if(data37.length > 7){const err100 = {instancePath:instancePath+"/operationScriptTypes/silent-payment-spend",schemaPath:"#/properties/operationScriptTypes/properties/silent-payment-spend/maxItems",keyword:"maxItems",params:{limit: 7},message:"must NOT have more than 7 items"};if(vErrors === null){vErrors = [err100];}else {vErrors.push(err100);}errors++;}const len18 = data37.length;for(let i36=0; i36 1){const indices18 = {};for(;i37--;){let item18 = data37[i37];if(typeof item18 !== "string"){continue;}if(typeof indices18[item18] == "number"){j18 = indices18[item18];const err103 = {instancePath:instancePath+"/operationScriptTypes/silent-payment-spend",schemaPath:"#/properties/operationScriptTypes/properties/silent-payment-spend/uniqueItems",keyword:"uniqueItems",params:{i: i37, j: j18},message:"must NOT have duplicate items (items ## "+j18+" and "+i37+" are identical)"};if(vErrors === null){vErrors = [err103];}else {vErrors.push(err103);}errors++;break;}indices18[item18] = i37;}}}else {const err104 = {instancePath:instancePath+"/operationScriptTypes/silent-payment-spend",schemaPath:"#/properties/operationScriptTypes/properties/silent-payment-spend/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err104];}else {vErrors.push(err104);}errors++;}}}else {const err105 = {instancePath:instancePath+"/operationScriptTypes",schemaPath:"#/properties/operationScriptTypes/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err105];}else {vErrors.push(err105);}errors++;}}if(data.features !== undefined){let data39 = data.features;if(Array.isArray(data39)){if(data39.length > 64){const err106 = {instancePath:instancePath+"/features",schemaPath:"#/properties/features/maxItems",keyword:"maxItems",params:{limit: 64},message:"must NOT have more than 64 items"};if(vErrors === null){vErrors = [err106];}else {vErrors.push(err106);}errors++;}const len19 = data39.length;for(let i38=0; i38 1){const indices19 = {};for(;i39--;){let item19 = data39[i39];if(typeof item19 !== "string"){continue;}if(typeof indices19[item19] == "number"){j19 = indices19[item19];const err109 = {instancePath:instancePath+"/features",schemaPath:"#/properties/features/uniqueItems",keyword:"uniqueItems",params:{i: i39, j: j19},message:"must NOT have duplicate items (items ## "+j19+" and "+i39+" are identical)"};if(vErrors === null){vErrors = [err109];}else {vErrors.push(err109);}errors++;break;}indices19[item19] = i39;}}}else {const err110 = {instancePath:instancePath+"/features",schemaPath:"#/properties/features/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err110];}else {vErrors.push(err110);}errors++;}}}else {const err111 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err111];}else {vErrors.push(err111);}errors++;}validate12.errors = vErrors;return errors === 0;}export const validateAdapterManifest = validate13;const schema14 = {"$schema":"http://json-schema.org/draft-07/schema#","$id":"https://psbt-interop-lab.dev/schemas/adapter-manifest-0.1.json","title":"PSBT Interop Lab Adapter Manifest","type":"object","additionalProperties":false,"required":["schema","adapters"],"properties":{"schema":{"const":"psbt-lab.adapters/0.1"},"adapters":{"type":"array","minItems":1,"maxItems":32,"items":{"type":"object","additionalProperties":false,"required":["id","command","expected"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$"},"command":{"type":"string","minLength":1,"maxLength":1024},"args":{"type":"array","maxItems":64,"items":{"type":"string","maxLength":4096}},"cwd":{"type":"string","minLength":1,"maxLength":4096},"env":{"type":"object","maxProperties":64,"propertyNames":{"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"properties":{"PSBT_LAB_FIXTURE_COMMITMENTS":false},"additionalProperties":{"type":"string","maxLength":4096}},"timeoutMs":{"type":"integer","minimum":100,"maximum":120000},"expected":{"type":"object","additionalProperties":false,"required":["name","version","sourceRevision"],"properties":{"name":{"type":"string","minLength":1,"maxLength":128},"version":{"type":"string","minLength":1,"maxLength":128},"sourceRevision":{"type":"string","minLength":1,"maxLength":256},"artifactDigest":{"type":"string","pattern":"^sha256:[0-9a-f]{64}$"}}}}}}}};const pattern5 = new RegExp("^[A-Za-z_][A-Za-z0-9_]*$", "u");function validate13(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="https://psbt-interop-lab.dev/schemas/adapter-manifest-0.1.json" */;let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){if(data.schema === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "schema"},message:"must have required property '"+"schema"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.adapters === undefined){const err1 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "adapters"},message:"must have required property '"+"adapters"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}for(const key0 in data){if(!((key0 === "schema") || (key0 === "adapters"))){const err2 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}if(data.schema !== undefined){if("psbt-lab.adapters/0.1" !== data.schema){const err3 = {instancePath:instancePath+"/schema",schemaPath:"#/properties/schema/const",keyword:"const",params:{allowedValue: "psbt-lab.adapters/0.1"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}}if(data.adapters !== undefined){let data1 = data.adapters;if(Array.isArray(data1)){if(data1.length > 32){const err4 = {instancePath:instancePath+"/adapters",schemaPath:"#/properties/adapters/maxItems",keyword:"maxItems",params:{limit: 32},message:"must NOT have more than 32 items"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}if(data1.length < 1){const err5 = {instancePath:instancePath+"/adapters",schemaPath:"#/properties/adapters/minItems",keyword:"minItems",params:{limit: 1},message:"must NOT have fewer than 1 items"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}const len0 = data1.length;for(let i0=0; i0 1024){const err12 = {instancePath:instancePath+"/adapters/" + i0+"/command",schemaPath:"#/properties/adapters/items/properties/command/maxLength",keyword:"maxLength",params:{limit: 1024},message:"must NOT have more than 1024 characters"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}if(func2(data4) < 1){const err13 = {instancePath:instancePath+"/adapters/" + i0+"/command",schemaPath:"#/properties/adapters/items/properties/command/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}}else {const err14 = {instancePath:instancePath+"/adapters/" + i0+"/command",schemaPath:"#/properties/adapters/items/properties/command/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}}if(data2.args !== undefined){let data5 = data2.args;if(Array.isArray(data5)){if(data5.length > 64){const err15 = {instancePath:instancePath+"/adapters/" + i0+"/args",schemaPath:"#/properties/adapters/items/properties/args/maxItems",keyword:"maxItems",params:{limit: 64},message:"must NOT have more than 64 items"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}const len1 = data5.length;for(let i1=0; i1 4096){const err16 = {instancePath:instancePath+"/adapters/" + i0+"/args/" + i1,schemaPath:"#/properties/adapters/items/properties/args/items/maxLength",keyword:"maxLength",params:{limit: 4096},message:"must NOT have more than 4096 characters"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}}else {const err17 = {instancePath:instancePath+"/adapters/" + i0+"/args/" + i1,schemaPath:"#/properties/adapters/items/properties/args/items/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}}}else {const err18 = {instancePath:instancePath+"/adapters/" + i0+"/args",schemaPath:"#/properties/adapters/items/properties/args/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err18];}else {vErrors.push(err18);}errors++;}}if(data2.cwd !== undefined){let data7 = data2.cwd;if(typeof data7 === "string"){if(func2(data7) > 4096){const err19 = {instancePath:instancePath+"/adapters/" + i0+"/cwd",schemaPath:"#/properties/adapters/items/properties/cwd/maxLength",keyword:"maxLength",params:{limit: 4096},message:"must NOT have more than 4096 characters"};if(vErrors === null){vErrors = [err19];}else {vErrors.push(err19);}errors++;}if(func2(data7) < 1){const err20 = {instancePath:instancePath+"/adapters/" + i0+"/cwd",schemaPath:"#/properties/adapters/items/properties/cwd/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err20];}else {vErrors.push(err20);}errors++;}}else {const err21 = {instancePath:instancePath+"/adapters/" + i0+"/cwd",schemaPath:"#/properties/adapters/items/properties/cwd/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err21];}else {vErrors.push(err21);}errors++;}}if(data2.env !== undefined){let data8 = data2.env;if(data8 && typeof data8 == "object" && !Array.isArray(data8)){if(Object.keys(data8).length > 64){const err22 = {instancePath:instancePath+"/adapters/" + i0+"/env",schemaPath:"#/properties/adapters/items/properties/env/maxProperties",keyword:"maxProperties",params:{limit: 64},message:"must NOT have more than 64 properties"};if(vErrors === null){vErrors = [err22];}else {vErrors.push(err22);}errors++;}for(const key2 in data8){const _errs20 = errors;if(typeof key2 === "string"){if(!pattern5.test(key2)){const err23 = {instancePath:instancePath+"/adapters/" + i0+"/env",schemaPath:"#/properties/adapters/items/properties/env/propertyNames/pattern",keyword:"pattern",params:{pattern: "^[A-Za-z_][A-Za-z0-9_]*$"},message:"must match pattern \""+"^[A-Za-z_][A-Za-z0-9_]*$"+"\"",propertyName:key2};if(vErrors === null){vErrors = [err23];}else {vErrors.push(err23);}errors++;}}var valid6 = _errs20 === errors;if(!valid6){const err24 = {instancePath:instancePath+"/adapters/" + i0+"/env",schemaPath:"#/properties/adapters/items/properties/env/propertyNames",keyword:"propertyNames",params:{propertyName: key2},message:"property name must be valid"};if(vErrors === null){vErrors = [err24];}else {vErrors.push(err24);}errors++;}}for(const key3 in data8){if(!(key3 === "PSBT_LAB_FIXTURE_COMMITMENTS")){let data9 = data8[key3];if(typeof data9 === "string"){if(func2(data9) > 4096){const err25 = {instancePath:instancePath+"/adapters/" + i0+"/env/" + key3.replace(/~/g, "~0").replace(/\//g, "~1"),schemaPath:"#/properties/adapters/items/properties/env/additionalProperties/maxLength",keyword:"maxLength",params:{limit: 4096},message:"must NOT have more than 4096 characters"};if(vErrors === null){vErrors = [err25];}else {vErrors.push(err25);}errors++;}}else {const err26 = {instancePath:instancePath+"/adapters/" + i0+"/env/" + key3.replace(/~/g, "~0").replace(/\//g, "~1"),schemaPath:"#/properties/adapters/items/properties/env/additionalProperties/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err26];}else {vErrors.push(err26);}errors++;}}}if(data8.PSBT_LAB_FIXTURE_COMMITMENTS !== undefined){const err27 = {instancePath:instancePath+"/adapters/" + i0+"/env/PSBT_LAB_FIXTURE_COMMITMENTS",schemaPath:"#/properties/adapters/items/properties/env/properties/PSBT_LAB_FIXTURE_COMMITMENTS/false schema",keyword:"false schema",params:{},message:"boolean schema is false"};if(vErrors === null){vErrors = [err27];}else {vErrors.push(err27);}errors++;}}else {const err28 = {instancePath:instancePath+"/adapters/" + i0+"/env",schemaPath:"#/properties/adapters/items/properties/env/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err28];}else {vErrors.push(err28);}errors++;}}if(data2.timeoutMs !== undefined){let data11 = data2.timeoutMs;if(!(((typeof data11 == "number") && (!(data11 % 1) && !isNaN(data11))) && (isFinite(data11)))){const err29 = {instancePath:instancePath+"/adapters/" + i0+"/timeoutMs",schemaPath:"#/properties/adapters/items/properties/timeoutMs/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err29];}else {vErrors.push(err29);}errors++;}if((typeof data11 == "number") && (isFinite(data11))){if(data11 > 120000 || isNaN(data11)){const err30 = {instancePath:instancePath+"/adapters/" + i0+"/timeoutMs",schemaPath:"#/properties/adapters/items/properties/timeoutMs/maximum",keyword:"maximum",params:{comparison: "<=", limit: 120000},message:"must be <= 120000"};if(vErrors === null){vErrors = [err30];}else {vErrors.push(err30);}errors++;}if(data11 < 100 || isNaN(data11)){const err31 = {instancePath:instancePath+"/adapters/" + i0+"/timeoutMs",schemaPath:"#/properties/adapters/items/properties/timeoutMs/minimum",keyword:"minimum",params:{comparison: ">=", limit: 100},message:"must be >= 100"};if(vErrors === null){vErrors = [err31];}else {vErrors.push(err31);}errors++;}}}if(data2.expected !== undefined){let data12 = data2.expected;if(data12 && typeof data12 == "object" && !Array.isArray(data12)){if(data12.name === undefined){const err32 = {instancePath:instancePath+"/adapters/" + i0+"/expected",schemaPath:"#/properties/adapters/items/properties/expected/required",keyword:"required",params:{missingProperty: "name"},message:"must have required property '"+"name"+"'"};if(vErrors === null){vErrors = [err32];}else {vErrors.push(err32);}errors++;}if(data12.version === undefined){const err33 = {instancePath:instancePath+"/adapters/" + i0+"/expected",schemaPath:"#/properties/adapters/items/properties/expected/required",keyword:"required",params:{missingProperty: "version"},message:"must have required property '"+"version"+"'"};if(vErrors === null){vErrors = [err33];}else {vErrors.push(err33);}errors++;}if(data12.sourceRevision === undefined){const err34 = {instancePath:instancePath+"/adapters/" + i0+"/expected",schemaPath:"#/properties/adapters/items/properties/expected/required",keyword:"required",params:{missingProperty: "sourceRevision"},message:"must have required property '"+"sourceRevision"+"'"};if(vErrors === null){vErrors = [err34];}else {vErrors.push(err34);}errors++;}for(const key4 in data12){if(!((((key4 === "name") || (key4 === "version")) || (key4 === "sourceRevision")) || (key4 === "artifactDigest"))){const err35 = {instancePath:instancePath+"/adapters/" + i0+"/expected",schemaPath:"#/properties/adapters/items/properties/expected/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key4},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err35];}else {vErrors.push(err35);}errors++;}}if(data12.name !== undefined){let data13 = data12.name;if(typeof data13 === "string"){if(func2(data13) > 128){const err36 = {instancePath:instancePath+"/adapters/" + i0+"/expected/name",schemaPath:"#/properties/adapters/items/properties/expected/properties/name/maxLength",keyword:"maxLength",params:{limit: 128},message:"must NOT have more than 128 characters"};if(vErrors === null){vErrors = [err36];}else {vErrors.push(err36);}errors++;}if(func2(data13) < 1){const err37 = {instancePath:instancePath+"/adapters/" + i0+"/expected/name",schemaPath:"#/properties/adapters/items/properties/expected/properties/name/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err37];}else {vErrors.push(err37);}errors++;}}else {const err38 = {instancePath:instancePath+"/adapters/" + i0+"/expected/name",schemaPath:"#/properties/adapters/items/properties/expected/properties/name/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err38];}else {vErrors.push(err38);}errors++;}}if(data12.version !== undefined){let data14 = data12.version;if(typeof data14 === "string"){if(func2(data14) > 128){const err39 = {instancePath:instancePath+"/adapters/" + i0+"/expected/version",schemaPath:"#/properties/adapters/items/properties/expected/properties/version/maxLength",keyword:"maxLength",params:{limit: 128},message:"must NOT have more than 128 characters"};if(vErrors === null){vErrors = [err39];}else {vErrors.push(err39);}errors++;}if(func2(data14) < 1){const err40 = {instancePath:instancePath+"/adapters/" + i0+"/expected/version",schemaPath:"#/properties/adapters/items/properties/expected/properties/version/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err40];}else {vErrors.push(err40);}errors++;}}else {const err41 = {instancePath:instancePath+"/adapters/" + i0+"/expected/version",schemaPath:"#/properties/adapters/items/properties/expected/properties/version/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err41];}else {vErrors.push(err41);}errors++;}}if(data12.sourceRevision !== undefined){let data15 = data12.sourceRevision;if(typeof data15 === "string"){if(func2(data15) > 256){const err42 = {instancePath:instancePath+"/adapters/" + i0+"/expected/sourceRevision",schemaPath:"#/properties/adapters/items/properties/expected/properties/sourceRevision/maxLength",keyword:"maxLength",params:{limit: 256},message:"must NOT have more than 256 characters"};if(vErrors === null){vErrors = [err42];}else {vErrors.push(err42);}errors++;}if(func2(data15) < 1){const err43 = {instancePath:instancePath+"/adapters/" + i0+"/expected/sourceRevision",schemaPath:"#/properties/adapters/items/properties/expected/properties/sourceRevision/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err43];}else {vErrors.push(err43);}errors++;}}else {const err44 = {instancePath:instancePath+"/adapters/" + i0+"/expected/sourceRevision",schemaPath:"#/properties/adapters/items/properties/expected/properties/sourceRevision/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err44];}else {vErrors.push(err44);}errors++;}}if(data12.artifactDigest !== undefined){let data16 = data12.artifactDigest;if(typeof data16 === "string"){if(!pattern2.test(data16)){const err45 = {instancePath:instancePath+"/adapters/" + i0+"/expected/artifactDigest",schemaPath:"#/properties/adapters/items/properties/expected/properties/artifactDigest/pattern",keyword:"pattern",params:{pattern: "^sha256:[0-9a-f]{64}$"},message:"must match pattern \""+"^sha256:[0-9a-f]{64}$"+"\""};if(vErrors === null){vErrors = [err45];}else {vErrors.push(err45);}errors++;}}else {const err46 = {instancePath:instancePath+"/adapters/" + i0+"/expected/artifactDigest",schemaPath:"#/properties/adapters/items/properties/expected/properties/artifactDigest/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err46];}else {vErrors.push(err46);}errors++;}}}else {const err47 = {instancePath:instancePath+"/adapters/" + i0+"/expected",schemaPath:"#/properties/adapters/items/properties/expected/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err47];}else {vErrors.push(err47);}errors++;}}}else {const err48 = {instancePath:instancePath+"/adapters/" + i0,schemaPath:"#/properties/adapters/items/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err48];}else {vErrors.push(err48);}errors++;}}}else {const err49 = {instancePath:instancePath+"/adapters",schemaPath:"#/properties/adapters/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err49];}else {vErrors.push(err49);}errors++;}}}else {const err50 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err50];}else {vErrors.push(err50);}errors++;}validate13.errors = vErrors;return errors === 0;}export const validateCustomSuiteManifest = validate14;const schema15 = {"$schema":"http://json-schema.org/draft-07/schema#","$id":"https://psbt-interop-lab.dev/schemas/suite-manifest-0.2.json","title":"PSBT Interop Lab Custom Suite Manifest","type":"object","additionalProperties":false,"required":["schema","fixtures","scenarios"],"properties":{"schema":{"enum":["psbt-lab.suite/0.1","psbt-lab.suite/0.2"]},"fixtures":{"type":"array","maxItems":32,"items":{"$ref":"#/definitions/fixture"}},"parserFixtures":{"type":"array","maxItems":32,"items":{"$ref":"#/definitions/parserFixture"}},"scenarios":{"type":"array","minItems":1,"maxItems":64,"items":{"$ref":"#/definitions/scenario"}}},"definitions":{"safeId":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$"},"descriptor":{"enum":["p2pkh","p2wpkh","p2sh-p2wpkh","p2sh-p2wsh-2-of-3","p2wsh-single-key","p2wsh-2-of-3","p2tr-keypath","p2tr-scriptpath"]},"fixtureInput":{"type":"object","additionalProperties":false,"required":["descriptor","sequence"],"properties":{"descriptor":{"$ref":"#/definitions/descriptor"},"sequence":{"type":"integer","minimum":0,"maximum":4294967293}}},"fixedOutput":{"type":"object","additionalProperties":false,"required":["descriptor","amountSats"],"properties":{"descriptor":{"$ref":"#/definitions/descriptor"},"amountSats":{"type":"integer","minimum":1,"maximum":2100000000000000}}},"remainderOutput":{"type":"object","additionalProperties":false,"required":["descriptor","remainder"],"properties":{"descriptor":{"$ref":"#/definitions/descriptor"},"remainder":{"const":true}}},"fixture":{"type":"object","additionalProperties":false,"required":["id","inputs","outputs","feeSats","locktime","transactionVersion"],"properties":{"id":{"$ref":"#/definitions/safeId"},"inputs":{"type":"array","minItems":1,"maxItems":8,"items":{"$ref":"#/definitions/fixtureInput"}},"outputs":{"type":"array","minItems":1,"maxItems":8,"items":{"oneOf":[{"$ref":"#/definitions/fixedOutput"},{"$ref":"#/definitions/remainderOutput"}]}},"feeSats":{"type":"integer","minimum":1,"maximum":100000000},"locktime":{"type":"integer","minimum":0,"maximum":4294967295},"transactionVersion":{"const":2}}},"parserFixture":{"type":"object","additionalProperties":false,"required":["id","psbt","sha256"],"properties":{"id":{"$ref":"#/definitions/safeId"},"psbt":{"type":"string","minLength":8,"maxLength":5592408},"sha256":{"type":"string","pattern":"^sha256:[0-9a-f]{64}$"}}},"adapterStep":{"type":"object","additionalProperties":false,"required":["id","adapter","operation","input"],"properties":{"id":{"$ref":"#/definitions/safeId"},"adapter":{"$ref":"#/definitions/safeId"},"operation":{"enum":["roundtrip","sign","finalize-inputs"]},"input":{"$ref":"#/definitions/safeId"}}},"combineStep":{"type":"object","additionalProperties":false,"required":["id","adapter","operation","inputs"],"properties":{"id":{"$ref":"#/definitions/safeId"},"adapter":{"$ref":"#/definitions/safeId"},"operation":{"const":"combine"},"inputs":{"type":"array","minItems":2,"maxItems":8,"items":{"$ref":"#/definitions/safeId"}}}},"coreStep":{"type":"object","additionalProperties":false,"required":["id","operation","input"],"properties":{"id":{"$ref":"#/definitions/safeId"},"operation":{"enum":["core-finalize","core-policy-check"]},"input":{"$ref":"#/definitions/safeId"}}},"mapLocation":{"oneOf":[{"type":"object","additionalProperties":false,"required":["kind"],"properties":{"kind":{"const":"global"}}},{"type":"object","additionalProperties":false,"required":["kind","index"],"properties":{"kind":{"enum":["input","output"]},"index":{"type":"integer","minimum":0,"maximum":255}}}]},"entryMutationBase":{"type":"object","properties":{"location":{"$ref":"#/definitions/mapLocation"},"keyType":{"type":"integer","minimum":0,"maximum":255},"keyDataHex":{"type":"string","pattern":"^(?:[0-9a-fA-F]{2})*$","maxLength":2048}}},"mutationRecipe":{"oneOf":[{"type":"object","additionalProperties":false,"required":["kind","location","keyType","valueHex"],"properties":{"kind":{"enum":["replace-value","set-entry"]},"location":{"$ref":"#/definitions/mapLocation"},"keyType":{"type":"integer","minimum":0,"maximum":255},"keyDataHex":{"type":"string","pattern":"^(?:[0-9a-fA-F]{2})*$","maxLength":2048},"valueHex":{"type":"string","pattern":"^(?:[0-9a-fA-F]{2})*$","maxLength":131072}}},{"type":"object","additionalProperties":false,"required":["kind","location","keyType"],"properties":{"kind":{"enum":["delete-entry","duplicate-entry"]},"location":{"$ref":"#/definitions/mapLocation"},"keyType":{"type":"integer","minimum":0,"maximum":255},"keyDataHex":{"type":"string","pattern":"^(?:[0-9a-fA-F]{2})*$","maxLength":2048}}},{"type":"object","additionalProperties":false,"required":["kind","offset","mask"],"properties":{"kind":{"const":"xor-byte"},"offset":{"type":"integer","minimum":0,"maximum":4194303},"mask":{"type":"integer","minimum":1,"maximum":255}}},{"type":"object","additionalProperties":false,"required":["kind","byteLength"],"properties":{"kind":{"const":"truncate"},"byteLength":{"type":"integer","minimum":5,"maximum":4194303}}},{"type":"object","additionalProperties":false,"required":["kind","valueHex"],"properties":{"kind":{"const":"append-bytes"},"valueHex":{"type":"string","pattern":"^(?:[0-9a-fA-F]{2})+$","maxLength":131072}}}]},"mutateStep":{"type":"object","additionalProperties":false,"required":["id","operation","input","recipes"],"properties":{"id":{"$ref":"#/definitions/safeId"},"operation":{"const":"mutate"},"input":{"$ref":"#/definitions/safeId"},"recipes":{"type":"array","minItems":1,"maxItems":64,"items":{"$ref":"#/definitions/mutationRecipe"}}}},"compareParsersStep":{"type":"object","additionalProperties":false,"required":["id","operation","input","adapters","expected"],"properties":{"id":{"$ref":"#/definitions/safeId"},"operation":{"const":"compare-parsers"},"input":{"$ref":"#/definitions/safeId"},"adapters":{"type":"array","minItems":1,"maxItems":16,"items":{"$ref":"#/definitions/safeId"}},"expected":{"type":"object","additionalProperties":{"oneOf":[{"enum":["accepted","rejected","unsupported","crashed","timeout"]},{"type":"object","additionalProperties":false,"required":["classification"],"properties":{"classification":{"enum":["accepted","rejected","unsupported","crashed","timeout"]},"facts":{"type":"object","additionalProperties":false,"required":["psbtVersion","inputs","outputs"],"properties":{"psbtVersion":{"enum":[0,2]},"inputs":{"type":"integer","minimum":0,"maximum":9007199254740991},"outputs":{"type":"integer","minimum":0,"maximum":9007199254740991}}}}}]},"minProperties":2,"maxProperties":17}}},"scenario":{"type":"object","additionalProperties":false,"required":["id","title","fixture","steps"],"properties":{"id":{"$ref":"#/definitions/safeId"},"title":{"type":"string","minLength":1,"maxLength":256},"fixture":{"$ref":"#/definitions/safeId"},"steps":{"type":"array","minItems":1,"maxItems":32,"items":{"oneOf":[{"$ref":"#/definitions/adapterStep"},{"$ref":"#/definitions/combineStep"},{"$ref":"#/definitions/coreStep"},{"$ref":"#/definitions/mutateStep"},{"$ref":"#/definitions/compareParsersStep"}]}}}}}};const schema16 = {"type":"object","additionalProperties":false,"required":["id","inputs","outputs","feeSats","locktime","transactionVersion"],"properties":{"id":{"$ref":"#/definitions/safeId"},"inputs":{"type":"array","minItems":1,"maxItems":8,"items":{"$ref":"#/definitions/fixtureInput"}},"outputs":{"type":"array","minItems":1,"maxItems":8,"items":{"oneOf":[{"$ref":"#/definitions/fixedOutput"},{"$ref":"#/definitions/remainderOutput"}]}},"feeSats":{"type":"integer","minimum":1,"maximum":100000000},"locktime":{"type":"integer","minimum":0,"maximum":4294967295},"transactionVersion":{"const":2}}};const schema17 = {"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$"};const schema18 = {"type":"object","additionalProperties":false,"required":["descriptor","sequence"],"properties":{"descriptor":{"$ref":"#/definitions/descriptor"},"sequence":{"type":"integer","minimum":0,"maximum":4294967293}}};const schema19 = {"enum":["p2pkh","p2wpkh","p2sh-p2wpkh","p2sh-p2wsh-2-of-3","p2wsh-single-key","p2wsh-2-of-3","p2tr-keypath","p2tr-scriptpath"]};function validate16(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){if(data.descriptor === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "descriptor"},message:"must have required property '"+"descriptor"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.sequence === undefined){const err1 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "sequence"},message:"must have required property '"+"sequence"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}for(const key0 in data){if(!((key0 === "descriptor") || (key0 === "sequence"))){const err2 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}if(data.descriptor !== undefined){let data0 = data.descriptor;if(!((((((((data0 === "p2pkh") || (data0 === "p2wpkh")) || (data0 === "p2sh-p2wpkh")) || (data0 === "p2sh-p2wsh-2-of-3")) || (data0 === "p2wsh-single-key")) || (data0 === "p2wsh-2-of-3")) || (data0 === "p2tr-keypath")) || (data0 === "p2tr-scriptpath"))){const err3 = {instancePath:instancePath+"/descriptor",schemaPath:"#/definitions/descriptor/enum",keyword:"enum",params:{allowedValues: schema19.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}}if(data.sequence !== undefined){let data1 = data.sequence;if(!(((typeof data1 == "number") && (!(data1 % 1) && !isNaN(data1))) && (isFinite(data1)))){const err4 = {instancePath:instancePath+"/sequence",schemaPath:"#/properties/sequence/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}if((typeof data1 == "number") && (isFinite(data1))){if(data1 > 4294967293 || isNaN(data1)){const err5 = {instancePath:instancePath+"/sequence",schemaPath:"#/properties/sequence/maximum",keyword:"maximum",params:{comparison: "<=", limit: 4294967293},message:"must be <= 4294967293"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}if(data1 < 0 || isNaN(data1)){const err6 = {instancePath:instancePath+"/sequence",schemaPath:"#/properties/sequence/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}}}else {const err7 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}validate16.errors = vErrors;return errors === 0;}const schema20 = {"type":"object","additionalProperties":false,"required":["descriptor","amountSats"],"properties":{"descriptor":{"$ref":"#/definitions/descriptor"},"amountSats":{"type":"integer","minimum":1,"maximum":2100000000000000}}};function validate18(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){if(data.descriptor === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "descriptor"},message:"must have required property '"+"descriptor"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.amountSats === undefined){const err1 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "amountSats"},message:"must have required property '"+"amountSats"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}for(const key0 in data){if(!((key0 === "descriptor") || (key0 === "amountSats"))){const err2 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}if(data.descriptor !== undefined){let data0 = data.descriptor;if(!((((((((data0 === "p2pkh") || (data0 === "p2wpkh")) || (data0 === "p2sh-p2wpkh")) || (data0 === "p2sh-p2wsh-2-of-3")) || (data0 === "p2wsh-single-key")) || (data0 === "p2wsh-2-of-3")) || (data0 === "p2tr-keypath")) || (data0 === "p2tr-scriptpath"))){const err3 = {instancePath:instancePath+"/descriptor",schemaPath:"#/definitions/descriptor/enum",keyword:"enum",params:{allowedValues: schema19.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}}if(data.amountSats !== undefined){let data1 = data.amountSats;if(!(((typeof data1 == "number") && (!(data1 % 1) && !isNaN(data1))) && (isFinite(data1)))){const err4 = {instancePath:instancePath+"/amountSats",schemaPath:"#/properties/amountSats/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}if((typeof data1 == "number") && (isFinite(data1))){if(data1 > 2100000000000000 || isNaN(data1)){const err5 = {instancePath:instancePath+"/amountSats",schemaPath:"#/properties/amountSats/maximum",keyword:"maximum",params:{comparison: "<=", limit: 2100000000000000},message:"must be <= 2100000000000000"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}if(data1 < 1 || isNaN(data1)){const err6 = {instancePath:instancePath+"/amountSats",schemaPath:"#/properties/amountSats/minimum",keyword:"minimum",params:{comparison: ">=", limit: 1},message:"must be >= 1"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}}}else {const err7 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}validate18.errors = vErrors;return errors === 0;}const schema22 = {"type":"object","additionalProperties":false,"required":["descriptor","remainder"],"properties":{"descriptor":{"$ref":"#/definitions/descriptor"},"remainder":{"const":true}}};function validate20(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){if(data.descriptor === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "descriptor"},message:"must have required property '"+"descriptor"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.remainder === undefined){const err1 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "remainder"},message:"must have required property '"+"remainder"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}for(const key0 in data){if(!((key0 === "descriptor") || (key0 === "remainder"))){const err2 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}if(data.descriptor !== undefined){let data0 = data.descriptor;if(!((((((((data0 === "p2pkh") || (data0 === "p2wpkh")) || (data0 === "p2sh-p2wpkh")) || (data0 === "p2sh-p2wsh-2-of-3")) || (data0 === "p2wsh-single-key")) || (data0 === "p2wsh-2-of-3")) || (data0 === "p2tr-keypath")) || (data0 === "p2tr-scriptpath"))){const err3 = {instancePath:instancePath+"/descriptor",schemaPath:"#/definitions/descriptor/enum",keyword:"enum",params:{allowedValues: schema19.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}}if(data.remainder !== undefined){if(true !== data.remainder){const err4 = {instancePath:instancePath+"/remainder",schemaPath:"#/properties/remainder/const",keyword:"const",params:{allowedValue: true},message:"must be equal to constant"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}}else {const err5 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}validate20.errors = vErrors;return errors === 0;}function validate15(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){if(data.id === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "id"},message:"must have required property '"+"id"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.inputs === undefined){const err1 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "inputs"},message:"must have required property '"+"inputs"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data.outputs === undefined){const err2 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "outputs"},message:"must have required property '"+"outputs"+"'"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}if(data.feeSats === undefined){const err3 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "feeSats"},message:"must have required property '"+"feeSats"+"'"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}if(data.locktime === undefined){const err4 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "locktime"},message:"must have required property '"+"locktime"+"'"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}if(data.transactionVersion === undefined){const err5 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "transactionVersion"},message:"must have required property '"+"transactionVersion"+"'"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}for(const key0 in data){if(!((((((key0 === "id") || (key0 === "inputs")) || (key0 === "outputs")) || (key0 === "feeSats")) || (key0 === "locktime")) || (key0 === "transactionVersion"))){const err6 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}if(data.id !== undefined){let data0 = data.id;if(typeof data0 === "string"){if(!pattern0.test(data0)){const err7 = {instancePath:instancePath+"/id",schemaPath:"#/definitions/safeId/pattern",keyword:"pattern",params:{pattern: "^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$"},message:"must match pattern \""+"^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$"+"\""};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}}else {const err8 = {instancePath:instancePath+"/id",schemaPath:"#/definitions/safeId/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}}if(data.inputs !== undefined){let data1 = data.inputs;if(Array.isArray(data1)){if(data1.length > 8){const err9 = {instancePath:instancePath+"/inputs",schemaPath:"#/properties/inputs/maxItems",keyword:"maxItems",params:{limit: 8},message:"must NOT have more than 8 items"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}if(data1.length < 1){const err10 = {instancePath:instancePath+"/inputs",schemaPath:"#/properties/inputs/minItems",keyword:"minItems",params:{limit: 1},message:"must NOT have fewer than 1 items"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}const len0 = data1.length;for(let i0=0; i0 8){const err12 = {instancePath:instancePath+"/outputs",schemaPath:"#/properties/outputs/maxItems",keyword:"maxItems",params:{limit: 8},message:"must NOT have more than 8 items"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}if(data3.length < 1){const err13 = {instancePath:instancePath+"/outputs",schemaPath:"#/properties/outputs/minItems",keyword:"minItems",params:{limit: 1},message:"must NOT have fewer than 1 items"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}const len1 = data3.length;for(let i1=0; i1 100000000 || isNaN(data5)){const err17 = {instancePath:instancePath+"/feeSats",schemaPath:"#/properties/feeSats/maximum",keyword:"maximum",params:{comparison: "<=", limit: 100000000},message:"must be <= 100000000"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}if(data5 < 1 || isNaN(data5)){const err18 = {instancePath:instancePath+"/feeSats",schemaPath:"#/properties/feeSats/minimum",keyword:"minimum",params:{comparison: ">=", limit: 1},message:"must be >= 1"};if(vErrors === null){vErrors = [err18];}else {vErrors.push(err18);}errors++;}}}if(data.locktime !== undefined){let data6 = data.locktime;if(!(((typeof data6 == "number") && (!(data6 % 1) && !isNaN(data6))) && (isFinite(data6)))){const err19 = {instancePath:instancePath+"/locktime",schemaPath:"#/properties/locktime/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err19];}else {vErrors.push(err19);}errors++;}if((typeof data6 == "number") && (isFinite(data6))){if(data6 > 4294967295 || isNaN(data6)){const err20 = {instancePath:instancePath+"/locktime",schemaPath:"#/properties/locktime/maximum",keyword:"maximum",params:{comparison: "<=", limit: 4294967295},message:"must be <= 4294967295"};if(vErrors === null){vErrors = [err20];}else {vErrors.push(err20);}errors++;}if(data6 < 0 || isNaN(data6)){const err21 = {instancePath:instancePath+"/locktime",schemaPath:"#/properties/locktime/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err21];}else {vErrors.push(err21);}errors++;}}}if(data.transactionVersion !== undefined){if(2 !== data.transactionVersion){const err22 = {instancePath:instancePath+"/transactionVersion",schemaPath:"#/properties/transactionVersion/const",keyword:"const",params:{allowedValue: 2},message:"must be equal to constant"};if(vErrors === null){vErrors = [err22];}else {vErrors.push(err22);}errors++;}}}else {const err23 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err23];}else {vErrors.push(err23);}errors++;}validate15.errors = vErrors;return errors === 0;}const schema24 = {"type":"object","additionalProperties":false,"required":["id","psbt","sha256"],"properties":{"id":{"$ref":"#/definitions/safeId"},"psbt":{"type":"string","minLength":8,"maxLength":5592408},"sha256":{"type":"string","pattern":"^sha256:[0-9a-f]{64}$"}}};function validate23(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){if(data.id === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "id"},message:"must have required property '"+"id"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.psbt === undefined){const err1 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "psbt"},message:"must have required property '"+"psbt"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data.sha256 === undefined){const err2 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "sha256"},message:"must have required property '"+"sha256"+"'"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}for(const key0 in data){if(!(((key0 === "id") || (key0 === "psbt")) || (key0 === "sha256"))){const err3 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}}if(data.id !== undefined){let data0 = data.id;if(typeof data0 === "string"){if(!pattern0.test(data0)){const err4 = {instancePath:instancePath+"/id",schemaPath:"#/definitions/safeId/pattern",keyword:"pattern",params:{pattern: "^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$"},message:"must match pattern \""+"^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$"+"\""};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}else {const err5 = {instancePath:instancePath+"/id",schemaPath:"#/definitions/safeId/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}if(data.psbt !== undefined){let data1 = data.psbt;if(typeof data1 === "string"){if(func2(data1) > 5592408){const err6 = {instancePath:instancePath+"/psbt",schemaPath:"#/properties/psbt/maxLength",keyword:"maxLength",params:{limit: 5592408},message:"must NOT have more than 5592408 characters"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}if(func2(data1) < 8){const err7 = {instancePath:instancePath+"/psbt",schemaPath:"#/properties/psbt/minLength",keyword:"minLength",params:{limit: 8},message:"must NOT have fewer than 8 characters"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}}else {const err8 = {instancePath:instancePath+"/psbt",schemaPath:"#/properties/psbt/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}}if(data.sha256 !== undefined){let data2 = data.sha256;if(typeof data2 === "string"){if(!pattern2.test(data2)){const err9 = {instancePath:instancePath+"/sha256",schemaPath:"#/properties/sha256/pattern",keyword:"pattern",params:{pattern: "^sha256:[0-9a-f]{64}$"},message:"must match pattern \""+"^sha256:[0-9a-f]{64}$"+"\""};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}}else {const err10 = {instancePath:instancePath+"/sha256",schemaPath:"#/properties/sha256/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}}}else {const err11 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}validate23.errors = vErrors;return errors === 0;}const schema26 = {"type":"object","additionalProperties":false,"required":["id","title","fixture","steps"],"properties":{"id":{"$ref":"#/definitions/safeId"},"title":{"type":"string","minLength":1,"maxLength":256},"fixture":{"$ref":"#/definitions/safeId"},"steps":{"type":"array","minItems":1,"maxItems":32,"items":{"oneOf":[{"$ref":"#/definitions/adapterStep"},{"$ref":"#/definitions/combineStep"},{"$ref":"#/definitions/coreStep"},{"$ref":"#/definitions/mutateStep"},{"$ref":"#/definitions/compareParsersStep"}]}}}};const schema29 = {"type":"object","additionalProperties":false,"required":["id","adapter","operation","input"],"properties":{"id":{"$ref":"#/definitions/safeId"},"adapter":{"$ref":"#/definitions/safeId"},"operation":{"enum":["roundtrip","sign","finalize-inputs"]},"input":{"$ref":"#/definitions/safeId"}}};function validate26(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){if(data.id === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "id"},message:"must have required property '"+"id"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.adapter === undefined){const err1 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "adapter"},message:"must have required property '"+"adapter"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data.operation === undefined){const err2 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "operation"},message:"must have required property '"+"operation"+"'"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}if(data.input === undefined){const err3 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "input"},message:"must have required property '"+"input"+"'"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}for(const key0 in data){if(!((((key0 === "id") || (key0 === "adapter")) || (key0 === "operation")) || (key0 === "input"))){const err4 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}if(data.id !== undefined){let data0 = data.id;if(typeof data0 === "string"){if(!pattern0.test(data0)){const err5 = {instancePath:instancePath+"/id",schemaPath:"#/definitions/safeId/pattern",keyword:"pattern",params:{pattern: "^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$"},message:"must match pattern \""+"^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$"+"\""};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}else {const err6 = {instancePath:instancePath+"/id",schemaPath:"#/definitions/safeId/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}if(data.adapter !== undefined){let data1 = data.adapter;if(typeof data1 === "string"){if(!pattern0.test(data1)){const err7 = {instancePath:instancePath+"/adapter",schemaPath:"#/definitions/safeId/pattern",keyword:"pattern",params:{pattern: "^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$"},message:"must match pattern \""+"^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$"+"\""};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}}else {const err8 = {instancePath:instancePath+"/adapter",schemaPath:"#/definitions/safeId/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}}if(data.operation !== undefined){let data2 = data.operation;if(!(((data2 === "roundtrip") || (data2 === "sign")) || (data2 === "finalize-inputs"))){const err9 = {instancePath:instancePath+"/operation",schemaPath:"#/properties/operation/enum",keyword:"enum",params:{allowedValues: schema29.properties.operation.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}}if(data.input !== undefined){let data3 = data.input;if(typeof data3 === "string"){if(!pattern0.test(data3)){const err10 = {instancePath:instancePath+"/input",schemaPath:"#/definitions/safeId/pattern",keyword:"pattern",params:{pattern: "^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$"},message:"must match pattern \""+"^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$"+"\""};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}}else {const err11 = {instancePath:instancePath+"/input",schemaPath:"#/definitions/safeId/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}}}else {const err12 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}validate26.errors = vErrors;return errors === 0;}const schema33 = {"type":"object","additionalProperties":false,"required":["id","adapter","operation","inputs"],"properties":{"id":{"$ref":"#/definitions/safeId"},"adapter":{"$ref":"#/definitions/safeId"},"operation":{"const":"combine"},"inputs":{"type":"array","minItems":2,"maxItems":8,"items":{"$ref":"#/definitions/safeId"}}}};function validate28(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){if(data.id === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "id"},message:"must have required property '"+"id"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.adapter === undefined){const err1 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "adapter"},message:"must have required property '"+"adapter"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data.operation === undefined){const err2 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "operation"},message:"must have required property '"+"operation"+"'"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}if(data.inputs === undefined){const err3 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "inputs"},message:"must have required property '"+"inputs"+"'"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}for(const key0 in data){if(!((((key0 === "id") || (key0 === "adapter")) || (key0 === "operation")) || (key0 === "inputs"))){const err4 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}if(data.id !== undefined){let data0 = data.id;if(typeof data0 === "string"){if(!pattern0.test(data0)){const err5 = {instancePath:instancePath+"/id",schemaPath:"#/definitions/safeId/pattern",keyword:"pattern",params:{pattern: "^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$"},message:"must match pattern \""+"^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$"+"\""};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}else {const err6 = {instancePath:instancePath+"/id",schemaPath:"#/definitions/safeId/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}if(data.adapter !== undefined){let data1 = data.adapter;if(typeof data1 === "string"){if(!pattern0.test(data1)){const err7 = {instancePath:instancePath+"/adapter",schemaPath:"#/definitions/safeId/pattern",keyword:"pattern",params:{pattern: "^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$"},message:"must match pattern \""+"^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$"+"\""};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}}else {const err8 = {instancePath:instancePath+"/adapter",schemaPath:"#/definitions/safeId/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}}if(data.operation !== undefined){if("combine" !== data.operation){const err9 = {instancePath:instancePath+"/operation",schemaPath:"#/properties/operation/const",keyword:"const",params:{allowedValue: "combine"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}}if(data.inputs !== undefined){let data3 = data.inputs;if(Array.isArray(data3)){if(data3.length > 8){const err10 = {instancePath:instancePath+"/inputs",schemaPath:"#/properties/inputs/maxItems",keyword:"maxItems",params:{limit: 8},message:"must NOT have more than 8 items"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}if(data3.length < 2){const err11 = {instancePath:instancePath+"/inputs",schemaPath:"#/properties/inputs/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}const len0 = data3.length;for(let i0=0; i0 255 || isNaN(data4)){const err15 = {instancePath:instancePath+"/location/index",schemaPath:"#/definitions/mapLocation/oneOf/1/properties/index/maximum",keyword:"maximum",params:{comparison: "<=", limit: 255},message:"must be <= 255"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}if(data4 < 0 || isNaN(data4)){const err16 = {instancePath:instancePath+"/location/index",schemaPath:"#/definitions/mapLocation/oneOf/1/properties/index/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}}}}else {const err17 = {instancePath:instancePath+"/location",schemaPath:"#/definitions/mapLocation/oneOf/1/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}var _valid1 = _errs12 === errors;if(_valid1 && valid3){valid3 = false;passing1 = [passing1, 1];}else {if(_valid1){valid3 = true;passing1 = 1;}}if(!valid3){const err18 = {instancePath:instancePath+"/location",schemaPath:"#/definitions/mapLocation/oneOf",keyword:"oneOf",params:{passingSchemas: passing1},message:"must match exactly one schema in oneOf"};if(vErrors === null){vErrors = [err18];}else {vErrors.push(err18);}errors++;}else {errors = _errs7;if(vErrors !== null){if(_errs7){vErrors.length = _errs7;}else {vErrors = null;}}}}if(data.keyType !== undefined){let data5 = data.keyType;if(!(((typeof data5 == "number") && (!(data5 % 1) && !isNaN(data5))) && (isFinite(data5)))){const err19 = {instancePath:instancePath+"/keyType",schemaPath:"#/oneOf/0/properties/keyType/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err19];}else {vErrors.push(err19);}errors++;}if((typeof data5 == "number") && (isFinite(data5))){if(data5 > 255 || isNaN(data5)){const err20 = {instancePath:instancePath+"/keyType",schemaPath:"#/oneOf/0/properties/keyType/maximum",keyword:"maximum",params:{comparison: "<=", limit: 255},message:"must be <= 255"};if(vErrors === null){vErrors = [err20];}else {vErrors.push(err20);}errors++;}if(data5 < 0 || isNaN(data5)){const err21 = {instancePath:instancePath+"/keyType",schemaPath:"#/oneOf/0/properties/keyType/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err21];}else {vErrors.push(err21);}errors++;}}}if(data.keyDataHex !== undefined){let data6 = data.keyDataHex;if(typeof data6 === "string"){if(func2(data6) > 2048){const err22 = {instancePath:instancePath+"/keyDataHex",schemaPath:"#/oneOf/0/properties/keyDataHex/maxLength",keyword:"maxLength",params:{limit: 2048},message:"must NOT have more than 2048 characters"};if(vErrors === null){vErrors = [err22];}else {vErrors.push(err22);}errors++;}if(!pattern22.test(data6)){const err23 = {instancePath:instancePath+"/keyDataHex",schemaPath:"#/oneOf/0/properties/keyDataHex/pattern",keyword:"pattern",params:{pattern: "^(?:[0-9a-fA-F]{2})*$"},message:"must match pattern \""+"^(?:[0-9a-fA-F]{2})*$"+"\""};if(vErrors === null){vErrors = [err23];}else {vErrors.push(err23);}errors++;}}else {const err24 = {instancePath:instancePath+"/keyDataHex",schemaPath:"#/oneOf/0/properties/keyDataHex/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err24];}else {vErrors.push(err24);}errors++;}}if(data.valueHex !== undefined){let data7 = data.valueHex;if(typeof data7 === "string"){if(func2(data7) > 131072){const err25 = {instancePath:instancePath+"/valueHex",schemaPath:"#/oneOf/0/properties/valueHex/maxLength",keyword:"maxLength",params:{limit: 131072},message:"must NOT have more than 131072 characters"};if(vErrors === null){vErrors = [err25];}else {vErrors.push(err25);}errors++;}if(!pattern22.test(data7)){const err26 = {instancePath:instancePath+"/valueHex",schemaPath:"#/oneOf/0/properties/valueHex/pattern",keyword:"pattern",params:{pattern: "^(?:[0-9a-fA-F]{2})*$"},message:"must match pattern \""+"^(?:[0-9a-fA-F]{2})*$"+"\""};if(vErrors === null){vErrors = [err26];}else {vErrors.push(err26);}errors++;}}else {const err27 = {instancePath:instancePath+"/valueHex",schemaPath:"#/oneOf/0/properties/valueHex/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err27];}else {vErrors.push(err27);}errors++;}}}else {const err28 = {instancePath,schemaPath:"#/oneOf/0/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err28];}else {vErrors.push(err28);}errors++;}var _valid0 = _errs1 === errors;if(_valid0){valid0 = true;passing0 = 0;}const _errs24 = errors;if(data && typeof data == "object" && !Array.isArray(data)){if(data.kind === undefined){const err29 = {instancePath,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty: "kind"},message:"must have required property '"+"kind"+"'"};if(vErrors === null){vErrors = [err29];}else {vErrors.push(err29);}errors++;}if(data.location === undefined){const err30 = {instancePath,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty: "location"},message:"must have required property '"+"location"+"'"};if(vErrors === null){vErrors = [err30];}else {vErrors.push(err30);}errors++;}if(data.keyType === undefined){const err31 = {instancePath,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty: "keyType"},message:"must have required property '"+"keyType"+"'"};if(vErrors === null){vErrors = [err31];}else {vErrors.push(err31);}errors++;}for(const key3 in data){if(!((((key3 === "kind") || (key3 === "location")) || (key3 === "keyType")) || (key3 === "keyDataHex"))){const err32 = {instancePath,schemaPath:"#/oneOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key3},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err32];}else {vErrors.push(err32);}errors++;}}if(data.kind !== undefined){let data8 = data.kind;if(!((data8 === "delete-entry") || (data8 === "duplicate-entry"))){const err33 = {instancePath:instancePath+"/kind",schemaPath:"#/oneOf/1/properties/kind/enum",keyword:"enum",params:{allowedValues: schema43.oneOf[1].properties.kind.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err33];}else {vErrors.push(err33);}errors++;}}if(data.location !== undefined){let data9 = data.location;const _errs30 = errors;let valid8 = false;let passing2 = null;const _errs31 = errors;if(data9 && typeof data9 == "object" && !Array.isArray(data9)){if(data9.kind === undefined){const err34 = {instancePath:instancePath+"/location",schemaPath:"#/definitions/mapLocation/oneOf/0/required",keyword:"required",params:{missingProperty: "kind"},message:"must have required property '"+"kind"+"'"};if(vErrors === null){vErrors = [err34];}else {vErrors.push(err34);}errors++;}for(const key4 in data9){if(!(key4 === "kind")){const err35 = {instancePath:instancePath+"/location",schemaPath:"#/definitions/mapLocation/oneOf/0/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key4},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err35];}else {vErrors.push(err35);}errors++;}}if(data9.kind !== undefined){if("global" !== data9.kind){const err36 = {instancePath:instancePath+"/location/kind",schemaPath:"#/definitions/mapLocation/oneOf/0/properties/kind/const",keyword:"const",params:{allowedValue: "global"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err36];}else {vErrors.push(err36);}errors++;}}}else {const err37 = {instancePath:instancePath+"/location",schemaPath:"#/definitions/mapLocation/oneOf/0/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err37];}else {vErrors.push(err37);}errors++;}var _valid2 = _errs31 === errors;if(_valid2){valid8 = true;passing2 = 0;}const _errs35 = errors;if(data9 && typeof data9 == "object" && !Array.isArray(data9)){if(data9.kind === undefined){const err38 = {instancePath:instancePath+"/location",schemaPath:"#/definitions/mapLocation/oneOf/1/required",keyword:"required",params:{missingProperty: "kind"},message:"must have required property '"+"kind"+"'"};if(vErrors === null){vErrors = [err38];}else {vErrors.push(err38);}errors++;}if(data9.index === undefined){const err39 = {instancePath:instancePath+"/location",schemaPath:"#/definitions/mapLocation/oneOf/1/required",keyword:"required",params:{missingProperty: "index"},message:"must have required property '"+"index"+"'"};if(vErrors === null){vErrors = [err39];}else {vErrors.push(err39);}errors++;}for(const key5 in data9){if(!((key5 === "kind") || (key5 === "index"))){const err40 = {instancePath:instancePath+"/location",schemaPath:"#/definitions/mapLocation/oneOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key5},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err40];}else {vErrors.push(err40);}errors++;}}if(data9.kind !== undefined){let data11 = data9.kind;if(!((data11 === "input") || (data11 === "output"))){const err41 = {instancePath:instancePath+"/location/kind",schemaPath:"#/definitions/mapLocation/oneOf/1/properties/kind/enum",keyword:"enum",params:{allowedValues: schema44.oneOf[1].properties.kind.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err41];}else {vErrors.push(err41);}errors++;}}if(data9.index !== undefined){let data12 = data9.index;if(!(((typeof data12 == "number") && (!(data12 % 1) && !isNaN(data12))) && (isFinite(data12)))){const err42 = {instancePath:instancePath+"/location/index",schemaPath:"#/definitions/mapLocation/oneOf/1/properties/index/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err42];}else {vErrors.push(err42);}errors++;}if((typeof data12 == "number") && (isFinite(data12))){if(data12 > 255 || isNaN(data12)){const err43 = {instancePath:instancePath+"/location/index",schemaPath:"#/definitions/mapLocation/oneOf/1/properties/index/maximum",keyword:"maximum",params:{comparison: "<=", limit: 255},message:"must be <= 255"};if(vErrors === null){vErrors = [err43];}else {vErrors.push(err43);}errors++;}if(data12 < 0 || isNaN(data12)){const err44 = {instancePath:instancePath+"/location/index",schemaPath:"#/definitions/mapLocation/oneOf/1/properties/index/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err44];}else {vErrors.push(err44);}errors++;}}}}else {const err45 = {instancePath:instancePath+"/location",schemaPath:"#/definitions/mapLocation/oneOf/1/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err45];}else {vErrors.push(err45);}errors++;}var _valid2 = _errs35 === errors;if(_valid2 && valid8){valid8 = false;passing2 = [passing2, 1];}else {if(_valid2){valid8 = true;passing2 = 1;}}if(!valid8){const err46 = {instancePath:instancePath+"/location",schemaPath:"#/definitions/mapLocation/oneOf",keyword:"oneOf",params:{passingSchemas: passing2},message:"must match exactly one schema in oneOf"};if(vErrors === null){vErrors = [err46];}else {vErrors.push(err46);}errors++;}else {errors = _errs30;if(vErrors !== null){if(_errs30){vErrors.length = _errs30;}else {vErrors = null;}}}}if(data.keyType !== undefined){let data13 = data.keyType;if(!(((typeof data13 == "number") && (!(data13 % 1) && !isNaN(data13))) && (isFinite(data13)))){const err47 = {instancePath:instancePath+"/keyType",schemaPath:"#/oneOf/1/properties/keyType/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err47];}else {vErrors.push(err47);}errors++;}if((typeof data13 == "number") && (isFinite(data13))){if(data13 > 255 || isNaN(data13)){const err48 = {instancePath:instancePath+"/keyType",schemaPath:"#/oneOf/1/properties/keyType/maximum",keyword:"maximum",params:{comparison: "<=", limit: 255},message:"must be <= 255"};if(vErrors === null){vErrors = [err48];}else {vErrors.push(err48);}errors++;}if(data13 < 0 || isNaN(data13)){const err49 = {instancePath:instancePath+"/keyType",schemaPath:"#/oneOf/1/properties/keyType/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err49];}else {vErrors.push(err49);}errors++;}}}if(data.keyDataHex !== undefined){let data14 = data.keyDataHex;if(typeof data14 === "string"){if(func2(data14) > 2048){const err50 = {instancePath:instancePath+"/keyDataHex",schemaPath:"#/oneOf/1/properties/keyDataHex/maxLength",keyword:"maxLength",params:{limit: 2048},message:"must NOT have more than 2048 characters"};if(vErrors === null){vErrors = [err50];}else {vErrors.push(err50);}errors++;}if(!pattern22.test(data14)){const err51 = {instancePath:instancePath+"/keyDataHex",schemaPath:"#/oneOf/1/properties/keyDataHex/pattern",keyword:"pattern",params:{pattern: "^(?:[0-9a-fA-F]{2})*$"},message:"must match pattern \""+"^(?:[0-9a-fA-F]{2})*$"+"\""};if(vErrors === null){vErrors = [err51];}else {vErrors.push(err51);}errors++;}}else {const err52 = {instancePath:instancePath+"/keyDataHex",schemaPath:"#/oneOf/1/properties/keyDataHex/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err52];}else {vErrors.push(err52);}errors++;}}}else {const err53 = {instancePath,schemaPath:"#/oneOf/1/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err53];}else {vErrors.push(err53);}errors++;}var _valid0 = _errs24 === errors;if(_valid0 && valid0){valid0 = false;passing0 = [passing0, 1];}else {if(_valid0){valid0 = true;passing0 = 1;}const _errs45 = errors;if(data && typeof data == "object" && !Array.isArray(data)){if(data.kind === undefined){const err54 = {instancePath,schemaPath:"#/oneOf/2/required",keyword:"required",params:{missingProperty: "kind"},message:"must have required property '"+"kind"+"'"};if(vErrors === null){vErrors = [err54];}else {vErrors.push(err54);}errors++;}if(data.offset === undefined){const err55 = {instancePath,schemaPath:"#/oneOf/2/required",keyword:"required",params:{missingProperty: "offset"},message:"must have required property '"+"offset"+"'"};if(vErrors === null){vErrors = [err55];}else {vErrors.push(err55);}errors++;}if(data.mask === undefined){const err56 = {instancePath,schemaPath:"#/oneOf/2/required",keyword:"required",params:{missingProperty: "mask"},message:"must have required property '"+"mask"+"'"};if(vErrors === null){vErrors = [err56];}else {vErrors.push(err56);}errors++;}for(const key6 in data){if(!(((key6 === "kind") || (key6 === "offset")) || (key6 === "mask"))){const err57 = {instancePath,schemaPath:"#/oneOf/2/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key6},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err57];}else {vErrors.push(err57);}errors++;}}if(data.kind !== undefined){if("xor-byte" !== data.kind){const err58 = {instancePath:instancePath+"/kind",schemaPath:"#/oneOf/2/properties/kind/const",keyword:"const",params:{allowedValue: "xor-byte"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err58];}else {vErrors.push(err58);}errors++;}}if(data.offset !== undefined){let data16 = data.offset;if(!(((typeof data16 == "number") && (!(data16 % 1) && !isNaN(data16))) && (isFinite(data16)))){const err59 = {instancePath:instancePath+"/offset",schemaPath:"#/oneOf/2/properties/offset/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err59];}else {vErrors.push(err59);}errors++;}if((typeof data16 == "number") && (isFinite(data16))){if(data16 > 4194303 || isNaN(data16)){const err60 = {instancePath:instancePath+"/offset",schemaPath:"#/oneOf/2/properties/offset/maximum",keyword:"maximum",params:{comparison: "<=", limit: 4194303},message:"must be <= 4194303"};if(vErrors === null){vErrors = [err60];}else {vErrors.push(err60);}errors++;}if(data16 < 0 || isNaN(data16)){const err61 = {instancePath:instancePath+"/offset",schemaPath:"#/oneOf/2/properties/offset/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err61];}else {vErrors.push(err61);}errors++;}}}if(data.mask !== undefined){let data17 = data.mask;if(!(((typeof data17 == "number") && (!(data17 % 1) && !isNaN(data17))) && (isFinite(data17)))){const err62 = {instancePath:instancePath+"/mask",schemaPath:"#/oneOf/2/properties/mask/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err62];}else {vErrors.push(err62);}errors++;}if((typeof data17 == "number") && (isFinite(data17))){if(data17 > 255 || isNaN(data17)){const err63 = {instancePath:instancePath+"/mask",schemaPath:"#/oneOf/2/properties/mask/maximum",keyword:"maximum",params:{comparison: "<=", limit: 255},message:"must be <= 255"};if(vErrors === null){vErrors = [err63];}else {vErrors.push(err63);}errors++;}if(data17 < 1 || isNaN(data17)){const err64 = {instancePath:instancePath+"/mask",schemaPath:"#/oneOf/2/properties/mask/minimum",keyword:"minimum",params:{comparison: ">=", limit: 1},message:"must be >= 1"};if(vErrors === null){vErrors = [err64];}else {vErrors.push(err64);}errors++;}}}}else {const err65 = {instancePath,schemaPath:"#/oneOf/2/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err65];}else {vErrors.push(err65);}errors++;}var _valid0 = _errs45 === errors;if(_valid0 && valid0){valid0 = false;passing0 = [passing0, 2];}else {if(_valid0){valid0 = true;passing0 = 2;}const _errs53 = errors;if(data && typeof data == "object" && !Array.isArray(data)){if(data.kind === undefined){const err66 = {instancePath,schemaPath:"#/oneOf/3/required",keyword:"required",params:{missingProperty: "kind"},message:"must have required property '"+"kind"+"'"};if(vErrors === null){vErrors = [err66];}else {vErrors.push(err66);}errors++;}if(data.byteLength === undefined){const err67 = {instancePath,schemaPath:"#/oneOf/3/required",keyword:"required",params:{missingProperty: "byteLength"},message:"must have required property '"+"byteLength"+"'"};if(vErrors === null){vErrors = [err67];}else {vErrors.push(err67);}errors++;}for(const key7 in data){if(!((key7 === "kind") || (key7 === "byteLength"))){const err68 = {instancePath,schemaPath:"#/oneOf/3/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key7},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err68];}else {vErrors.push(err68);}errors++;}}if(data.kind !== undefined){if("truncate" !== data.kind){const err69 = {instancePath:instancePath+"/kind",schemaPath:"#/oneOf/3/properties/kind/const",keyword:"const",params:{allowedValue: "truncate"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err69];}else {vErrors.push(err69);}errors++;}}if(data.byteLength !== undefined){let data19 = data.byteLength;if(!(((typeof data19 == "number") && (!(data19 % 1) && !isNaN(data19))) && (isFinite(data19)))){const err70 = {instancePath:instancePath+"/byteLength",schemaPath:"#/oneOf/3/properties/byteLength/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err70];}else {vErrors.push(err70);}errors++;}if((typeof data19 == "number") && (isFinite(data19))){if(data19 > 4194303 || isNaN(data19)){const err71 = {instancePath:instancePath+"/byteLength",schemaPath:"#/oneOf/3/properties/byteLength/maximum",keyword:"maximum",params:{comparison: "<=", limit: 4194303},message:"must be <= 4194303"};if(vErrors === null){vErrors = [err71];}else {vErrors.push(err71);}errors++;}if(data19 < 5 || isNaN(data19)){const err72 = {instancePath:instancePath+"/byteLength",schemaPath:"#/oneOf/3/properties/byteLength/minimum",keyword:"minimum",params:{comparison: ">=", limit: 5},message:"must be >= 5"};if(vErrors === null){vErrors = [err72];}else {vErrors.push(err72);}errors++;}}}}else {const err73 = {instancePath,schemaPath:"#/oneOf/3/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err73];}else {vErrors.push(err73);}errors++;}var _valid0 = _errs53 === errors;if(_valid0 && valid0){valid0 = false;passing0 = [passing0, 3];}else {if(_valid0){valid0 = true;passing0 = 3;}const _errs59 = errors;if(data && typeof data == "object" && !Array.isArray(data)){if(data.kind === undefined){const err74 = {instancePath,schemaPath:"#/oneOf/4/required",keyword:"required",params:{missingProperty: "kind"},message:"must have required property '"+"kind"+"'"};if(vErrors === null){vErrors = [err74];}else {vErrors.push(err74);}errors++;}if(data.valueHex === undefined){const err75 = {instancePath,schemaPath:"#/oneOf/4/required",keyword:"required",params:{missingProperty: "valueHex"},message:"must have required property '"+"valueHex"+"'"};if(vErrors === null){vErrors = [err75];}else {vErrors.push(err75);}errors++;}for(const key8 in data){if(!((key8 === "kind") || (key8 === "valueHex"))){const err76 = {instancePath,schemaPath:"#/oneOf/4/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key8},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err76];}else {vErrors.push(err76);}errors++;}}if(data.kind !== undefined){if("append-bytes" !== data.kind){const err77 = {instancePath:instancePath+"/kind",schemaPath:"#/oneOf/4/properties/kind/const",keyword:"const",params:{allowedValue: "append-bytes"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err77];}else {vErrors.push(err77);}errors++;}}if(data.valueHex !== undefined){let data21 = data.valueHex;if(typeof data21 === "string"){if(func2(data21) > 131072){const err78 = {instancePath:instancePath+"/valueHex",schemaPath:"#/oneOf/4/properties/valueHex/maxLength",keyword:"maxLength",params:{limit: 131072},message:"must NOT have more than 131072 characters"};if(vErrors === null){vErrors = [err78];}else {vErrors.push(err78);}errors++;}if(!pattern25.test(data21)){const err79 = {instancePath:instancePath+"/valueHex",schemaPath:"#/oneOf/4/properties/valueHex/pattern",keyword:"pattern",params:{pattern: "^(?:[0-9a-fA-F]{2})+$"},message:"must match pattern \""+"^(?:[0-9a-fA-F]{2})+$"+"\""};if(vErrors === null){vErrors = [err79];}else {vErrors.push(err79);}errors++;}}else {const err80 = {instancePath:instancePath+"/valueHex",schemaPath:"#/oneOf/4/properties/valueHex/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err80];}else {vErrors.push(err80);}errors++;}}}else {const err81 = {instancePath,schemaPath:"#/oneOf/4/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err81];}else {vErrors.push(err81);}errors++;}var _valid0 = _errs59 === errors;if(_valid0 && valid0){valid0 = false;passing0 = [passing0, 4];}else {if(_valid0){valid0 = true;passing0 = 4;}}}}}if(!valid0){const err82 = {instancePath,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas: passing0},message:"must match exactly one schema in oneOf"};if(vErrors === null){vErrors = [err82];}else {vErrors.push(err82);}errors++;}else {errors = _errs0;if(vErrors !== null){if(_errs0){vErrors.length = _errs0;}else {vErrors = null;}}}validate33.errors = vErrors;return errors === 0;}function validate32(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){if(data.id === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "id"},message:"must have required property '"+"id"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.operation === undefined){const err1 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "operation"},message:"must have required property '"+"operation"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data.input === undefined){const err2 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "input"},message:"must have required property '"+"input"+"'"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}if(data.recipes === undefined){const err3 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "recipes"},message:"must have required property '"+"recipes"+"'"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}for(const key0 in data){if(!((((key0 === "id") || (key0 === "operation")) || (key0 === "input")) || (key0 === "recipes"))){const err4 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}if(data.id !== undefined){let data0 = data.id;if(typeof data0 === "string"){if(!pattern0.test(data0)){const err5 = {instancePath:instancePath+"/id",schemaPath:"#/definitions/safeId/pattern",keyword:"pattern",params:{pattern: "^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$"},message:"must match pattern \""+"^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$"+"\""};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}else {const err6 = {instancePath:instancePath+"/id",schemaPath:"#/definitions/safeId/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}if(data.operation !== undefined){if("mutate" !== data.operation){const err7 = {instancePath:instancePath+"/operation",schemaPath:"#/properties/operation/const",keyword:"const",params:{allowedValue: "mutate"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}}if(data.input !== undefined){let data2 = data.input;if(typeof data2 === "string"){if(!pattern0.test(data2)){const err8 = {instancePath:instancePath+"/input",schemaPath:"#/definitions/safeId/pattern",keyword:"pattern",params:{pattern: "^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$"},message:"must match pattern \""+"^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$"+"\""};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}}else {const err9 = {instancePath:instancePath+"/input",schemaPath:"#/definitions/safeId/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}}if(data.recipes !== undefined){let data3 = data.recipes;if(Array.isArray(data3)){if(data3.length > 64){const err10 = {instancePath:instancePath+"/recipes",schemaPath:"#/properties/recipes/maxItems",keyword:"maxItems",params:{limit: 64},message:"must NOT have more than 64 items"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}if(data3.length < 1){const err11 = {instancePath:instancePath+"/recipes",schemaPath:"#/properties/recipes/minItems",keyword:"minItems",params:{limit: 1},message:"must NOT have fewer than 1 items"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}const len0 = data3.length;for(let i0=0; i0 16){const err11 = {instancePath:instancePath+"/adapters",schemaPath:"#/properties/adapters/maxItems",keyword:"maxItems",params:{limit: 16},message:"must NOT have more than 16 items"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}if(data3.length < 1){const err12 = {instancePath:instancePath+"/adapters",schemaPath:"#/properties/adapters/minItems",keyword:"minItems",params:{limit: 1},message:"must NOT have fewer than 1 items"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}const len0 = data3.length;for(let i0=0; i0 17){const err16 = {instancePath:instancePath+"/expected",schemaPath:"#/properties/expected/maxProperties",keyword:"maxProperties",params:{limit: 17},message:"must NOT have more than 17 properties"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}if(Object.keys(data5).length < 2){const err17 = {instancePath:instancePath+"/expected",schemaPath:"#/properties/expected/minProperties",keyword:"minProperties",params:{limit: 2},message:"must NOT have fewer than 2 properties"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}for(const key1 in data5){let data6 = data5[key1];const _errs18 = errors;let valid7 = false;let passing0 = null;const _errs19 = errors;if(!(((((data6 === "accepted") || (data6 === "rejected")) || (data6 === "unsupported")) || (data6 === "crashed")) || (data6 === "timeout"))){const err18 = {instancePath:instancePath+"/expected/" + key1.replace(/~/g, "~0").replace(/\//g, "~1"),schemaPath:"#/properties/expected/additionalProperties/oneOf/0/enum",keyword:"enum",params:{allowedValues: schema46.properties.expected.additionalProperties.oneOf[0].enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err18];}else {vErrors.push(err18);}errors++;}var _valid0 = _errs19 === errors;if(_valid0){valid7 = true;passing0 = 0;}const _errs20 = errors;if(data6 && typeof data6 == "object" && !Array.isArray(data6)){if(data6.classification === undefined){const err19 = {instancePath:instancePath+"/expected/" + key1.replace(/~/g, "~0").replace(/\//g, "~1"),schemaPath:"#/properties/expected/additionalProperties/oneOf/1/required",keyword:"required",params:{missingProperty: "classification"},message:"must have required property '"+"classification"+"'"};if(vErrors === null){vErrors = [err19];}else {vErrors.push(err19);}errors++;}for(const key2 in data6){if(!((key2 === "classification") || (key2 === "facts"))){const err20 = {instancePath:instancePath+"/expected/" + key1.replace(/~/g, "~0").replace(/\//g, "~1"),schemaPath:"#/properties/expected/additionalProperties/oneOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key2},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err20];}else {vErrors.push(err20);}errors++;}}if(data6.classification !== undefined){let data7 = data6.classification;if(!(((((data7 === "accepted") || (data7 === "rejected")) || (data7 === "unsupported")) || (data7 === "crashed")) || (data7 === "timeout"))){const err21 = {instancePath:instancePath+"/expected/" + key1.replace(/~/g, "~0").replace(/\//g, "~1")+"/classification",schemaPath:"#/properties/expected/additionalProperties/oneOf/1/properties/classification/enum",keyword:"enum",params:{allowedValues: schema46.properties.expected.additionalProperties.oneOf[1].properties.classification.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err21];}else {vErrors.push(err21);}errors++;}}if(data6.facts !== undefined){let data8 = data6.facts;if(data8 && typeof data8 == "object" && !Array.isArray(data8)){if(data8.psbtVersion === undefined){const err22 = {instancePath:instancePath+"/expected/" + key1.replace(/~/g, "~0").replace(/\//g, "~1")+"/facts",schemaPath:"#/properties/expected/additionalProperties/oneOf/1/properties/facts/required",keyword:"required",params:{missingProperty: "psbtVersion"},message:"must have required property '"+"psbtVersion"+"'"};if(vErrors === null){vErrors = [err22];}else {vErrors.push(err22);}errors++;}if(data8.inputs === undefined){const err23 = {instancePath:instancePath+"/expected/" + key1.replace(/~/g, "~0").replace(/\//g, "~1")+"/facts",schemaPath:"#/properties/expected/additionalProperties/oneOf/1/properties/facts/required",keyword:"required",params:{missingProperty: "inputs"},message:"must have required property '"+"inputs"+"'"};if(vErrors === null){vErrors = [err23];}else {vErrors.push(err23);}errors++;}if(data8.outputs === undefined){const err24 = {instancePath:instancePath+"/expected/" + key1.replace(/~/g, "~0").replace(/\//g, "~1")+"/facts",schemaPath:"#/properties/expected/additionalProperties/oneOf/1/properties/facts/required",keyword:"required",params:{missingProperty: "outputs"},message:"must have required property '"+"outputs"+"'"};if(vErrors === null){vErrors = [err24];}else {vErrors.push(err24);}errors++;}for(const key3 in data8){if(!(((key3 === "psbtVersion") || (key3 === "inputs")) || (key3 === "outputs"))){const err25 = {instancePath:instancePath+"/expected/" + key1.replace(/~/g, "~0").replace(/\//g, "~1")+"/facts",schemaPath:"#/properties/expected/additionalProperties/oneOf/1/properties/facts/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key3},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err25];}else {vErrors.push(err25);}errors++;}}if(data8.psbtVersion !== undefined){let data9 = data8.psbtVersion;if(!((data9 === 0) || (data9 === 2))){const err26 = {instancePath:instancePath+"/expected/" + key1.replace(/~/g, "~0").replace(/\//g, "~1")+"/facts/psbtVersion",schemaPath:"#/properties/expected/additionalProperties/oneOf/1/properties/facts/properties/psbtVersion/enum",keyword:"enum",params:{allowedValues: schema46.properties.expected.additionalProperties.oneOf[1].properties.facts.properties.psbtVersion.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err26];}else {vErrors.push(err26);}errors++;}}if(data8.inputs !== undefined){let data10 = data8.inputs;if(!(((typeof data10 == "number") && (!(data10 % 1) && !isNaN(data10))) && (isFinite(data10)))){const err27 = {instancePath:instancePath+"/expected/" + key1.replace(/~/g, "~0").replace(/\//g, "~1")+"/facts/inputs",schemaPath:"#/properties/expected/additionalProperties/oneOf/1/properties/facts/properties/inputs/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err27];}else {vErrors.push(err27);}errors++;}if((typeof data10 == "number") && (isFinite(data10))){if(data10 > 9007199254740991 || isNaN(data10)){const err28 = {instancePath:instancePath+"/expected/" + key1.replace(/~/g, "~0").replace(/\//g, "~1")+"/facts/inputs",schemaPath:"#/properties/expected/additionalProperties/oneOf/1/properties/facts/properties/inputs/maximum",keyword:"maximum",params:{comparison: "<=", limit: 9007199254740991},message:"must be <= 9007199254740991"};if(vErrors === null){vErrors = [err28];}else {vErrors.push(err28);}errors++;}if(data10 < 0 || isNaN(data10)){const err29 = {instancePath:instancePath+"/expected/" + key1.replace(/~/g, "~0").replace(/\//g, "~1")+"/facts/inputs",schemaPath:"#/properties/expected/additionalProperties/oneOf/1/properties/facts/properties/inputs/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err29];}else {vErrors.push(err29);}errors++;}}}if(data8.outputs !== undefined){let data11 = data8.outputs;if(!(((typeof data11 == "number") && (!(data11 % 1) && !isNaN(data11))) && (isFinite(data11)))){const err30 = {instancePath:instancePath+"/expected/" + key1.replace(/~/g, "~0").replace(/\//g, "~1")+"/facts/outputs",schemaPath:"#/properties/expected/additionalProperties/oneOf/1/properties/facts/properties/outputs/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err30];}else {vErrors.push(err30);}errors++;}if((typeof data11 == "number") && (isFinite(data11))){if(data11 > 9007199254740991 || isNaN(data11)){const err31 = {instancePath:instancePath+"/expected/" + key1.replace(/~/g, "~0").replace(/\//g, "~1")+"/facts/outputs",schemaPath:"#/properties/expected/additionalProperties/oneOf/1/properties/facts/properties/outputs/maximum",keyword:"maximum",params:{comparison: "<=", limit: 9007199254740991},message:"must be <= 9007199254740991"};if(vErrors === null){vErrors = [err31];}else {vErrors.push(err31);}errors++;}if(data11 < 0 || isNaN(data11)){const err32 = {instancePath:instancePath+"/expected/" + key1.replace(/~/g, "~0").replace(/\//g, "~1")+"/facts/outputs",schemaPath:"#/properties/expected/additionalProperties/oneOf/1/properties/facts/properties/outputs/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err32];}else {vErrors.push(err32);}errors++;}}}}else {const err33 = {instancePath:instancePath+"/expected/" + key1.replace(/~/g, "~0").replace(/\//g, "~1")+"/facts",schemaPath:"#/properties/expected/additionalProperties/oneOf/1/properties/facts/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err33];}else {vErrors.push(err33);}errors++;}}}else {const err34 = {instancePath:instancePath+"/expected/" + key1.replace(/~/g, "~0").replace(/\//g, "~1"),schemaPath:"#/properties/expected/additionalProperties/oneOf/1/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err34];}else {vErrors.push(err34);}errors++;}var _valid0 = _errs20 === errors;if(_valid0 && valid7){valid7 = false;passing0 = [passing0, 1];}else {if(_valid0){valid7 = true;passing0 = 1;}}if(!valid7){const err35 = {instancePath:instancePath+"/expected/" + key1.replace(/~/g, "~0").replace(/\//g, "~1"),schemaPath:"#/properties/expected/additionalProperties/oneOf",keyword:"oneOf",params:{passingSchemas: passing0},message:"must match exactly one schema in oneOf"};if(vErrors === null){vErrors = [err35];}else {vErrors.push(err35);}errors++;}else {errors = _errs18;if(vErrors !== null){if(_errs18){vErrors.length = _errs18;}else {vErrors = null;}}}}}else {const err36 = {instancePath:instancePath+"/expected",schemaPath:"#/properties/expected/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err36];}else {vErrors.push(err36);}errors++;}}}else {const err37 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err37];}else {vErrors.push(err37);}errors++;}validate36.errors = vErrors;return errors === 0;}function validate25(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){if(data.id === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "id"},message:"must have required property '"+"id"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.title === undefined){const err1 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "title"},message:"must have required property '"+"title"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data.fixture === undefined){const err2 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "fixture"},message:"must have required property '"+"fixture"+"'"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}if(data.steps === undefined){const err3 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "steps"},message:"must have required property '"+"steps"+"'"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}for(const key0 in data){if(!((((key0 === "id") || (key0 === "title")) || (key0 === "fixture")) || (key0 === "steps"))){const err4 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}if(data.id !== undefined){let data0 = data.id;if(typeof data0 === "string"){if(!pattern0.test(data0)){const err5 = {instancePath:instancePath+"/id",schemaPath:"#/definitions/safeId/pattern",keyword:"pattern",params:{pattern: "^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$"},message:"must match pattern \""+"^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$"+"\""};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}else {const err6 = {instancePath:instancePath+"/id",schemaPath:"#/definitions/safeId/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}if(data.title !== undefined){let data1 = data.title;if(typeof data1 === "string"){if(func2(data1) > 256){const err7 = {instancePath:instancePath+"/title",schemaPath:"#/properties/title/maxLength",keyword:"maxLength",params:{limit: 256},message:"must NOT have more than 256 characters"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}if(func2(data1) < 1){const err8 = {instancePath:instancePath+"/title",schemaPath:"#/properties/title/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}}else {const err9 = {instancePath:instancePath+"/title",schemaPath:"#/properties/title/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}}if(data.fixture !== undefined){let data2 = data.fixture;if(typeof data2 === "string"){if(!pattern0.test(data2)){const err10 = {instancePath:instancePath+"/fixture",schemaPath:"#/definitions/safeId/pattern",keyword:"pattern",params:{pattern: "^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$"},message:"must match pattern \""+"^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$"+"\""};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}}else {const err11 = {instancePath:instancePath+"/fixture",schemaPath:"#/definitions/safeId/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}}if(data.steps !== undefined){let data3 = data.steps;if(Array.isArray(data3)){if(data3.length > 32){const err12 = {instancePath:instancePath+"/steps",schemaPath:"#/properties/steps/maxItems",keyword:"maxItems",params:{limit: 32},message:"must NOT have more than 32 items"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}if(data3.length < 1){const err13 = {instancePath:instancePath+"/steps",schemaPath:"#/properties/steps/minItems",keyword:"minItems",params:{limit: 1},message:"must NOT have fewer than 1 items"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}const len0 = data3.length;for(let i0=0; i0 32){const err5 = {instancePath:instancePath+"/fixtures",schemaPath:"#/properties/fixtures/maxItems",keyword:"maxItems",params:{limit: 32},message:"must NOT have more than 32 items"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}const len0 = data1.length;for(let i0=0; i0 32){const err7 = {instancePath:instancePath+"/parserFixtures",schemaPath:"#/properties/parserFixtures/maxItems",keyword:"maxItems",params:{limit: 32},message:"must NOT have more than 32 items"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}const len1 = data3.length;for(let i1=0; i1 64){const err9 = {instancePath:instancePath+"/scenarios",schemaPath:"#/properties/scenarios/maxItems",keyword:"maxItems",params:{limit: 64},message:"must NOT have more than 64 items"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}if(data5.length < 1){const err10 = {instancePath:instancePath+"/scenarios",schemaPath:"#/properties/scenarios/minItems",keyword:"minItems",params:{limit: 1},message:"must NOT have fewer than 1 items"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}const len2 = data5.length;for(let i2=0; i2